/* /welcome on the clean pattern set: Sigrix_new/site/Welcome v2.html, design repo commit 45b8c96
 * (the page moved to v2 at 6e77aaa).
 *
 * The page is Home v2's parts: the `.hm-hero` and its `.hm-actions` row, one `.hm-sec` shell and
 * `.hm-head` for "Popular right now", `.hm-eb`, `.hm-alt` and the clean card `.hm-card` in `.hm-grid`,
 * all in css/sx-home.css, which the shell bundle carries. The `wl-*` rules below are the prototype's
 * page layer (its `#wl-page` block), inverted the usual way: the prototype is authored at
 * data-theme="dark", so every value here is a token that each theme block already resolves, and
 * nothing needs a `[data-theme]` selector.
 *
 * Loaded from the page's own `extra_head`, so it comes after the shell bundle. What the page keeps
 * against the prototype, and why, is the 2026-11-08 entry for it in docs/reference/design_sync_log.md. The
 * role picker, the Hub's role-change request and the device sign-in page wear the design this page
 * left, from css/sx-welcome-card.css. */

/* A short page (no listings to show, in a tall window) keeps the footer at the foot of the window: the
   prototype's `.sx { min-height: 100vh; display: flex; flex-direction: column }` and `.wl { flex: 1 }`, on the
   body and on the wrapper this app puts the page's main in (named by what it holds, since the sheet may not
   dress the shell's `.container` bare). The prototype's 24px under the last section is the main's own: the
   `.welcome-main` reset in base.css leaves it none. */
body.welcome-page { min-height: 100vh; display: flex; flex-direction: column; }
body.welcome-page > div:has(main) { flex: 1 0 auto; }
body.welcome-page main { padding-bottom: 24px; }

/* ---------- Hero ---------- */
/* The wayfinder owns the gap above the title: `--sx-eb-gap`, which css/sx-eyebrow.css applies through
   `.sx-eb + * { margin-top: 0 }` (0,1,0). Home v2's `.hm-hero h1 { margin-top: 28px }` is (0,1,1) and
   outranks it; the prototype answers the same collision with `margin-top: 24px`, here the token decides,
   as it does on /about. The name in the title is the account's own, up to what its display name allows,
   so a long one breaks where it must instead of running out of the column. */
.hm-hero.wl-hero h1 {
  margin-top: 0;
  font-size: 56px;
  max-width: 14ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.hm-hero.wl-hero .lede {
  max-width: 50ch;
  font-size: 17px;
  text-wrap: pretty;
}
/* The button carries the keyword label (#3055), and `.sx-btn` is `white-space: nowrap` at a fixed 44px:
   at 320px "Browse the AI agent marketplace →" ran past the column and into the gutter. As on /about's
   hero and the v4 buy button (#6488) the label wraps and the button grows to hold it; where the label
   fits on one line the button is unchanged. (0,3,0), to outrank `.sx-btn.sx-btn--lg` on merit. `text-wrap: pretty`
   also sets the wrap mode where the engine knows it, so Chromium reads `white-space: normal` as redundant; it is
   the portable spelling, and the one that wraps the label in an engine that drops `text-wrap: pretty`. */
.wl-hero .sx-btn.sx-btn--lg {
  height: auto;
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  text-wrap: pretty;
}
.wl-top {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 56px;
  align-items: start;
}

/* ---------- What a new account is given: one hairline row, the figure in tabular figures ----------
   The prototype's "Welcome credits" row. Here it holds the live welcome coupon (a figure beside its
   words), or, with no figure, the notice that a spent or expired one is not given again. */
.wl-credit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px 18px;
  align-items: center;
  margin-top: 44px;
  padding: 18px 0;
  border-top: 1px solid var(--sx-line);
  border-bottom: 1px solid var(--sx-line);
}
.wl-credit--note { grid-template-columns: minmax(0, 1fr) auto; }
.wl-credit b {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wl-credit .t { font-size: 14px; font-weight: 600; }
.wl-credit .d { margin-top: 2px; font-size: 13px; color: var(--sx-text-2); text-wrap: pretty; }
/* The date stays whole: "Expires November / 22, 2026" read as two dates. */
.wl-nb { white-space: nowrap; }
/* The code is typed at checkout, so it is set apart in mono. */
.wl-code {
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--sx-surface-2);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  font-family: var(--sx-font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--sx-text);
}
/* The getting-started quest takes the row's place and its spacing: the meter brings 18px above itself,
   which collapses into this. */
.wl-quest { margin-top: 44px; }

/* ---------- First steps: a rail card with a count and a checklist ---------- */
.wl-card {
  padding: 22px;
  border-radius: var(--sx-r-lg);
  background: var(--sx-surface);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
}
.wl-prog { display: flex; align-items: baseline; gap: 8px; margin-top: 14px; }
.wl-prog b {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.wl-prog span { font-size: 13.5px; color: var(--sx-text-2); }
/* The fill is drawn empty and the script writes its width (a style attribute in the markup would be
   dropped by the page's CSP). The script writes 0% as well, so a cut of the sheet in a browser that runs it reads
   `width: 0` as redundant; it is what the page draws before the script runs and without it, when the count
   reads 0 / 3 and the bar must read empty. */
.wl-bar {
  height: 6px;
  margin-top: 12px;
  border-radius: 999px;
  background: var(--sx-bg-2);
  box-shadow: 0 0 0 1px var(--sx-line) inset;
  overflow: hidden;
}
.wl-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--sx-brand-3);
  transition: width 0.24s;
}
.wl-bar.is-ready i { background: var(--sx-ok); }
.wl-steps { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--sx-line); }
.wl-st {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--sx-line);
}
/* The tick is a button beside the step's link, never inside it. */
.wl-ck {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  box-shadow: 0 0 0 1.5px var(--sx-line-2) inset;
  font: 500 11px var(--sx-font-mono);
  color: var(--sx-text-3);
  transition: background 0.14s, box-shadow 0.14s, color 0.14s;
}
.wl-ck:hover { box-shadow: 0 0 0 1.5px var(--sx-text-3) inset; color: var(--sx-text-2); }
.wl-ck[aria-pressed="true"] { background: var(--sx-ok); box-shadow: none; color: var(--sx-bg); }
.wl-ck:focus-visible,
.wl-sl:focus-visible { outline: 2px solid var(--sx-brand-3); }
/* The ring's 2px offset is the shell's (`a:focus-visible`, `button:focus-visible`). The shell also rounds every
   focused link to 8px, which would round the ring the prototype draws around the link's own 6px; the tick keeps
   its circle, which that rule does not reach. */
.wl-sl:focus-visible { border-radius: 6px; }
/* The number shows until the step is ticked, then the tick: both are in the markup, and the button's
   own state says which. */
.wl-ck .wl-tick { display: none; }
.wl-ck[aria-pressed="true"] .wl-num { display: none; }
.wl-ck[aria-pressed="true"] .wl-tick { display: block; }
.wl-sl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  align-items: center;
  border-radius: 6px;
}
.wl-sl .t {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  transition: color 0.14s;
}
.wl-sl .d { grid-column: 1; font-size: 13px; line-height: 1.45; color: var(--sx-text-2); }
.wl-sl svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--sx-text-3);
  transition: transform 0.14s, color 0.14s;
}
.wl-sl:hover .t { color: var(--sx-brand-3); }
.wl-sl:hover svg { color: var(--sx-text); transform: translateX(2px); }
.wl-st.is-done .wl-sl .t { color: var(--sx-text-2); }
.wl-cap { margin-top: 14px; font-size: 12.5px; color: var(--sx-text-3); }

/* ---------- Popular right now ---------- */
/* The prototype's `hm-card-v2` block gives the clean card's title a two-line clamp as part of the card, which
   the shell's `.hm-card-t` carries only inside `.sx-listing-grid` and `.mp-grid` (the Browse and hub grids):
   a listing's title is its seller's, and one of four lines would lengthen the whole row of cards. The rest of
   that block (the cover, the card, its body, description and foot) is the shell's already. */
.wl-grid .hm-card-t {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

@media (max-width: 1040px) {
  .wl-top { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hm-hero.wl-hero h1 { font-size: 46px; }
}
@media (max-width: 720px) {
  .hm-hero.wl-hero h1 { font-size: 38px; }
}
@media (max-width: 560px) {
  .wl-credit { grid-template-columns: auto minmax(0, 1fr); }
  .wl-credit--note { grid-template-columns: minmax(0, 1fr); }
  .wl-credit .hm-alt { grid-column: 1 / -1; }
}
/* Under a thumb the tick is 44px wide, and responsive.css's floor makes it 44px tall. Declared after the
   rule it overrides on purpose: a media query adds no specificity, so folding this upward would leave the
   tick at its desktop size. */
@media (pointer: coarse) {
  .wl-ck { min-width: 44px; }
}
