/* Home: the first-run welcome (until the main agent is set up) and, after
   setup, the two small rotating cards under the greeting (public/app.js
   homeWelcomeHtml, hydrateHomeCards). Rule zero: few words, big type,
   generous space; one solid action; untinted grays; dark labels pure white. */

/* ---------- the first-run welcome ---------- */
.home-start.home-welcome { gap: 0; }
.home-welcome .home-welcome-hero { width: 100%; max-width: 560px; margin: clamp(24px, 9vh, 104px) auto 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.home-start.home-welcome .welcome-title { order: 0; margin: 0 0 14px; max-width: 16ch; font-size: clamp(36px, 4.6vw, 54px); line-height: 1.06; font-weight: 700; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
.home-welcome .welcome-sentence { display: inline-block; }
.home-welcome .welcome-line { margin: 0 0 30px; max-width: 34ch; font-size: 19px; line-height: 1.45; color: var(--ink-2); text-wrap: balance; }
:root .home-welcome .btn.primary.welcome-cta { height: 52px; min-height: 52px; padding: 0 30px; font-size: 17px; font-weight: 600; }
.home-welcome .welcome-steps { list-style: none; width: 100%; max-width: 380px; margin: 44px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.home-welcome .welcome-step-row { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 12px; border-radius: var(--radius-box, 14px); color: var(--ink-2); text-decoration: none; }
@media (hover: hover) { .home-welcome a.welcome-step-row:hover { background: var(--hover); color: var(--ink); } }
.home-welcome a.welcome-step-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 0; }
.home-welcome .welcome-step-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--line-2); color: var(--ink-3); font-size: 15px; font-weight: 600; }
.home-welcome .welcome-step-mark svg { width: 16px; height: 16px; }
.home-welcome .welcome-step.is-current .welcome-step-mark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.home-welcome .welcome-step.is-current .welcome-step-row,
.home-welcome .welcome-step.is-done .welcome-step-row { color: var(--ink); }
.home-welcome .welcome-step.is-done .welcome-step-mark { border-color: var(--ink); color: var(--ink); }
.home-welcome .welcome-step-words { min-width: 0; }
.home-welcome .welcome-step-title { display: block; font-size: 17px; font-weight: 550; line-height: 1.3; }
.home-welcome .welcome-step-sub { display: block; margin-top: 2px; font-size: 15px; line-height: 1.35; color: var(--ink-3); }
.home-start.home-welcome > .composer.big { width: 100%; max-width: 640px; margin: 0 auto; box-shadow: none; }

/* ---------- after setup: two small cards under the greeting ---------- */
.home-start > .home-cards { position: relative; width: 100%; max-width: 640px; min-height: 66px; margin: 0 auto 20px; }
.home-cards[hidden] { display: none; }
.home-cards-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; transition: opacity .42s ease, transform .42s ease; animation: home-cards-in .42s ease both; }
.home-cards.is-leaving .home-cards-pair { opacity: 0; transform: translateY(4px); }
@keyframes home-cards-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.home-card { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; height: 66px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--radius-box, 14px); background: var(--panel); text-align: left; transition: background .15s ease, border-color .15s ease; }
@media (hover: hover) { .home-card:hover { background: var(--hover); border-color: var(--line-2); } }
.home-card:has(.home-card-go:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.home-card .integration-logo, .home-card .home-card-icon { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; }
.home-card .integration-logo img { width: 22px; height: 22px; }
.home-card-icon { display: grid; place-items: center; background: var(--panel-2); color: var(--ink); }
.home-card-icon svg { width: 20px; height: 20px; }
/* The whole card is the button (its ::after covers it); × sits above it. */
.home-card-go { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: 15px; font-weight: 550; line-height: 1.3; text-align: left; text-decoration: none; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home-card-go::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.home-card-go:focus-visible { outline: none; }
.home-card-x { position: absolute; z-index: 1; top: 4px; right: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--ink-3); font-size: 17px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s ease; }
.home-card:hover .home-card-x, .home-card:focus-within .home-card-x { opacity: 1; }
.home-card-x:hover { background: var(--hover); color: var(--ink); }
.home-card-x:focus-visible { opacity: 1; outline: 2px solid var(--ink); outline-offset: 0; }
@media (hover: none) { .home-card-x { opacity: .7; } }
@media (prefers-reduced-motion: reduce) {
  .home-cards-pair { animation: none; transition: none; }
  .home-cards.is-leaving .home-cards-pair { opacity: 1; transform: none; }
}

/* Narrow screens order Home's parts (greeting.css, styles.css): the cards stay right under the greeting. */
@media (max-width: 760px) { .chat-empty-inner .home-cards { order: 3; } }

/* ---------- phones: the same page, sized for a thumb ---------- */
@media (max-width: 600px) {
  [data-page="home"] .home-start.home-welcome .home-welcome-hero { margin: auto 0 24px; padding-top: 12px; }
  [data-page="home"] .home-start.home-welcome .welcome-title { max-width: 14ch; margin: 0 auto 12px; font-size: 36px; line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }
  .home-welcome .welcome-line { margin-bottom: 24px; font-size: 18px; }
  :root .home-welcome .btn.primary.welcome-cta { width: 100%; max-width: 360px; height: 54px; min-height: 54px; justify-content: center; }
  .home-welcome .welcome-steps { margin-top: 28px; }
  [data-page="home"] .home-start.home-welcome > .composer.big { max-width: none; margin-top: auto; }
  .home-start > .home-cards { min-height: 108px; margin-bottom: 12px; }
  .home-card { height: 108px; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 14px; }
  .home-card-go { flex: none; width: 100%; font-size: 16px; }
  .home-card-x { width: 32px; height: 32px; top: 6px; right: 6px; }
}
