/* ===========================================================================
   home.css — the Home page (#/home). DESIGN.md §6.

   Loaded after app.css, so it replaces the foundation's placeholder hero block
   in app.css wholesale. Everything here is scoped to `.home` or `.view-home`.

   The page is a gallery: a full-bleed hero with an aurora mesh behind the
   collection's worth and a 3D fan of its best cards, then a column of sections
   on a 1240px measure. Every endless effect is gated twice — on
   `data-motion="full"` and on its section carrying `.is-live` (home.js sets it
   only while the section is on screen) — so at Reduced nothing drifts, tilts or
   shimmers, at Off nothing moves at all, and a Home scrolled out of sight costs
   nothing. Only transforms and opacity ever animate.
   =========================================================================== */

.view-home {
  scroll-behavior: smooth;
  /* The sticky-free layout means a hash jump would land under the top bar. */
  scroll-padding-top: 24px;
}
:root[data-motion="off"] .view-home,
:root[data-motion="reduced"] .view-home { scroll-behavior: auto; }

.home {
  --gut: clamp(16px, 4vw, 48px);
  --measure: 1240px;
  /* The page's own edge padding: centres the measure, keeps a gutter when narrow.
     Only ever used on `.home`'s direct children, where 100% is the page's width. */
  --edge: max(var(--gut), calc((100% - var(--measure)) / 2));
  /* glass over the aurora */
  --home-glass: color-mix(in srgb, var(--surface) 60%, transparent);
  --home-glass-line: color-mix(in srgb, var(--ink) 10%, transparent);
  --gold-hi: color-mix(in srgb, var(--gold) 55%, #fff);
  /* the leatherette grain on binder boards (generated, never fetched) */
  --home-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23g)'/%3E%3C/svg%3E");
  position: relative;
  padding-bottom: 8px;
  /* Belt and braces: nothing inside may ever widen the view. `clip` (not
     `hidden`) leaves the vertical axis alone. */
  overflow-x: clip;
}
:root[data-theme="light"] .home {
  --home-glass: color-mix(in srgb, #fff 66%, transparent);
  --home-glass-line: rgba(20,24,32,.09);
  --gold-hi: color-mix(in srgb, var(--gold) 72%, #fff);
}

/* Visually hidden, but read out. Home's own copy — shell.css owns `.sr-only`. */
.home-sr {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.home-ico, .home-arrow { display: inline-flex; flex: none; }
.home-ico svg, .home-arrow svg { display: block; }

/* ------------------------------------------------------------- section shell */

.home-sec {
  position: relative;
  padding: clamp(40px, 5vw, 80px) var(--edge) 0;
}

.home-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: clamp(16px, 2vw, 24px);
}
.home-head-text { min-width: 0; }
.home-h2 {
  margin: 0;
  font-size: clamp(20px, 1.4vw + 12px, 28px);
  letter-spacing: -0.028em;
  line-height: 1.15;
}
.home-sub {
  margin: 7px 0 0;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  max-width: 62ch;
}
.home-head .btn { flex: none; }
.home-head-tools { display: flex; align-items: center; gap: 8px; flex: none; }

.home-kicker {
  margin: 0;
  font-size: var(--fs-micro); font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-text);
}

/* Full motion: reveals travel a little further and settle more slowly than the
   app's default — this is the one page meant to feel like an arrival. Reduced
   keeps design.css's short fade; Off shows everything at once. */
:root[data-motion="full"] .home [data-reveal] {
  transition: opacity 620ms var(--ease-out), transform 820ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
:root[data-motion="full"] .home [data-reveal]:not(.is-revealed) { transform: translate3d(0, 22px, 0); }
:root[data-motion="full"] .home .home-chase-item[data-reveal]:not(.is-revealed) {
  transform: translate3d(0, 28px, 0) scale(.94);
}

/* The entrance children play once their container has been revealed. */
@keyframes home-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes home-fill { from { transform: scaleX(0); } }

/* ======================================================================= hero */

.home-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(20px, 3vw, 56px);
  /* Sized by its words and figures, and ending as far below them as a row of
     binder covers ends below its covers: the section after it then keeps the
     same gap above its heading as every other section does. */
  padding: clamp(28px, 4.2vw, 68px) var(--edge) 42px;
  overflow: hidden;
}

/* --- the aurora ------------------------------------------------------------ */

.home-sky {
  position: absolute; inset: 0; z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
/* the layer the pointer nudges (home.js writes its transform) */
.home-sky-drift { position: absolute; inset: -14%; }
/* Each blob is its own compositor layer while it drifts, so the sizes are
   capped: a soft gradient gains nothing from a bigger raster. */
.home-blob {
  position: absolute; display: block;
  width: clamp(380px, 56%, 980px); aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--blob) 72%, transparent) 0%,
    color-mix(in srgb, var(--blob) 26%, transparent) 48%,
    transparent 100%);
  opacity: var(--blob-o, .5);
}
.home-blob.is-a { --blob: var(--accent); --blob-o: .42; left: 2%; top: -8%; }
.home-blob.is-b { --blob: var(--accent-2); --blob-o: .38; right: 2%; top: 6%; width: clamp(340px, 50%, 900px); }
.home-blob.is-c { --blob: var(--gold); --blob-o: .15; left: 32%; bottom: -12%; width: clamp(300px, 44%, 820px); }
.home-blob.is-d {
  --blob: color-mix(in srgb, var(--accent) 50%, var(--accent-2)); --blob-o: .3;
  right: 26%; top: -10%; width: clamp(240px, 32%, 600px);
}
:root[data-theme="light"] .home-blob.is-a { --blob-o: .2; }
:root[data-theme="light"] .home-blob.is-b { --blob-o: .16; }
:root[data-theme="light"] .home-blob.is-c { --blob-o: .12; }
:root[data-theme="light"] .home-blob.is-d { --blob-o: .12; }

:root[data-motion="full"] .home-hero.is-live .home-blob {
  will-change: transform;
  animation: home-drift-a 26s ease-in-out infinite alternate;
}
:root[data-motion="full"] .home-hero.is-live .home-blob.is-b { animation-name: home-drift-b; animation-duration: 32s; }
:root[data-motion="full"] .home-hero.is-live .home-blob.is-c { animation-name: home-drift-c; animation-duration: 36s; }
:root[data-motion="full"] .home-hero.is-live .home-blob.is-d { animation-name: home-drift-b; animation-duration: 22s; animation-direction: alternate-reverse; }
@keyframes home-drift-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(12%, 10%, 0) scale(1.16); }
}
@keyframes home-drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.05) rotate(0deg); }
  to   { transform: translate3d(-14%, 12%, 0) scale(.9) rotate(24deg); }
}
@keyframes home-drift-c {
  from { transform: translate3d(0, 0, 0) scale(.95); }
  to   { transform: translate3d(-10%, -14%, 0) scale(1.2); }
}

/* a dot grid, like a gallery floor, fading out toward the edges */
.home-sky-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px,
    color-mix(in srgb, var(--ink) 18%, transparent) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 72% 64% at 68% 44%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 72% 64% at 68% 44%, #000 0%, transparent 78%);
  opacity: .45;
}
/* the hero melts into the page below it */
.home-sky::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 36%;
  background: linear-gradient(180deg, transparent, var(--bg));
}

/* the pool of light that follows the pointer (home.js places it; Full motion only) */
.home-glow {
  position: absolute; left: 0; top: 0;
  width: 560px; height: 560px; margin: -280px 0 0 -280px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--accent) 22%, transparent), transparent);
  opacity: 0;
  transition: opacity 700ms var(--ease-out);
}
:root[data-theme="light"] .home-glow {
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 14%, transparent), transparent);
}
:root[data-motion="full"] .home-hero.is-lit .home-glow { opacity: 1; }

/* --- the words ------------------------------------------------------------- */

.home-hero-copy {
  position: relative; z-index: 1; min-width: 0;
  /* The worth figure sizes itself to this column (see .home-worth). */
  container-type: inline-size;
}

.home-hello {
  display: inline-flex; align-items: center; gap: 9px;
  max-width: 100%;
  margin: 0 0 clamp(16px, 1.8vw, 24px);
  padding: 6px 14px 6px 11px;
  border-radius: var(--radius-pill);
  background: var(--home-glass);
  border: 1px solid var(--home-glass-line);
  box-shadow: var(--glass-edge);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  font-size: 12.5px; font-weight: 550; color: var(--ink-2);
  white-space: nowrap;
}
.home-hello b { color: var(--ink); font-weight: 650; }
.home-hello-day { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.home-hello-day::before { content: "·"; margin-right: 9px; color: var(--ink-3); }
.home-pulse {
  position: relative; flex: none;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 70%, transparent);
}
.home-pulse::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; background: var(--accent);
  opacity: 0;
}
.home-hello.is-warn .home-pulse { background: var(--gold); box-shadow: 0 0 10px color-mix(in srgb, var(--gold) 70%, transparent); }
.home-hello.is-warn .home-pulse::after { background: var(--gold); }
:root[data-motion="full"] .home-hero.is-live .home-pulse::after {
  animation: home-ping 2.8s var(--ease-out) infinite;
}
@keyframes home-ping {
  0%       { transform: scale(1); opacity: .6; }
  70%, 100% { transform: scale(3.4); opacity: 0; }
}

.home-title {
  margin: 0;
  font-size: clamp(15px, .5vw + 12px, 18px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.home-title.is-display {
  /* DESIGN §1 caps the display step at 44px; the hero headline is the one place
     that goes past it — at 1440 a 44px line reads as a sub-head, not a stage. */
  font-size: clamp(36px, 3.6vw + 14px, 64px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}
.home-grad { color: var(--accent-text); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .home-grad {
    background: linear-gradient(96deg, var(--accent) 6%, var(--accent-2) 94%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
  :root[data-theme="light"] .home-grad {
    background: linear-gradient(96deg, var(--accent-text) 4%, var(--accent-2) 96%);
    -webkit-background-clip: text; background-clip: text;
  }
}

/* The collection's worth: the biggest thing on the page, in gold. It sizes to
   its column by how many characters it holds (home.js sets --chars), so a
   seven-figure shelf never runs into the fan. */
.home-worth {
  margin: 8px 0 0;
  font-size: clamp(38px, 4.6vw + 20px, 104px);
  font-size: min(clamp(38px, 4.6vw + 20px, 104px), calc(100cqi / (var(--chars, 9) * .6)));
  line-height: 1;
  font-weight: 720;
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-worth .home-money { color: var(--gold-text); }
@supports (background-clip: text) or (-webkit-background-clip: text) {
  .home-worth .home-money:not(.is-masked):not(.is-none) {
    background: linear-gradient(100deg,
      var(--gold) 0%, var(--gold-hi) 36%, var(--gold) 58%,
      color-mix(in srgb, var(--gold) 70%, #5a3a08) 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    /* the descenders of a gradient-filled line are clipped without a little room */
    padding-bottom: .06em;
  }
  :root[data-theme="light"] .home-worth .home-money:not(.is-masked):not(.is-none) {
    background-image: linear-gradient(100deg, #7a5712 0%, #a67c22 45%, #8a6519 70%, #664609 100%);
  }
}
.home-worth .home-money.is-masked { color: var(--ink-3); letter-spacing: .04em; }
.home-worth .home-money.is-none { color: var(--ink-3); }

.home-worth-note {
  margin: 12px 0 0;
  color: var(--ink-3);
  font-size: var(--fs-sm);
  max-width: 56ch;
}
.home-worth-note .home-money { color: var(--gold-text); font-weight: 650; }
.home-worth-note .home-money.is-masked { color: var(--ink-3); }

.home-lede {
  margin: clamp(14px, 1.6vw, 20px) 0 0;
  color: var(--ink-2);
  font-size: clamp(14.5px, .4vw + 13px, 16.5px);
  line-height: 1.55;
  max-width: 46ch;
  text-wrap: pretty;
}

/* The numbers that matter, each a link to its page: a colour of its own, and its badge
   at the top right (home.js kpis). */
.home-kpis {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 620px;
  margin: clamp(20px, 2.4vw, 30px) 0 0;
  padding: 0;
}
.home-kpi-item { display: flex; min-width: 0; --kpi: var(--accent); }
.home-kpi-item.is-cards { --kpi: #a78bfa; }
.home-kpi-item.is-display { --kpi: var(--gold); }
.home-kpi-item.is-watch { --kpi: #2dd4bf; }
.home-kpi {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1; min-width: 0;
  padding: 12px 13px 11px;
  color: inherit; text-decoration: none;
  border-radius: 18px;
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--kpi) 8%, transparent), transparent 58%),
    var(--home-glass);
  border: 1px solid color-mix(in srgb, var(--kpi) 13%, var(--home-glass-line));
  /* a shadow under it, only touched by its colour: not a glow */
  box-shadow: var(--glass-edge), 0 12px 26px -20px color-mix(in srgb, var(--kpi) 22%, rgba(0,0,0,.6));
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
  transition: border-color var(--t-1) var(--ease-out), box-shadow var(--t-2) var(--ease-out), transform var(--t-2) var(--ease-out);
}
.home-kpi:hover {
  border-color: color-mix(in srgb, var(--kpi) 32%, var(--home-glass-line));
  box-shadow: var(--glass-edge), 0 16px 32px -20px color-mix(in srgb, var(--kpi) 36%, rgba(0,0,0,.6));
}
:root[data-motion="full"] .home-kpi:hover { transform: translateY(-3px); }
.home-kpi:focus-visible { outline: 2px solid var(--kpi); outline-offset: 2px; }
.home-kpi:active { transform: none; }
/* a soft light in the tile's colour, behind its picture */
.home-kpi-glow {
  position: absolute; z-index: -1; right: -46px; top: -58px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--kpi) 22%, transparent), transparent);
  opacity: .35; pointer-events: none;
  transition: opacity var(--t-2) var(--ease-out), transform var(--t-3, .4s) var(--ease-out);
}
.home-kpi:hover .home-kpi-glow { opacity: .6; transform: scale(1.12); }
/* The badge in the top right corner, beside the number rather than on a row of its own. */
.home-kpi-top { position: absolute; top: 11px; right: 11px; display: flex; }
.home-kpi-ico {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 11px;
  color: color-mix(in srgb, var(--kpi) 80%, #fff);
  background: linear-gradient(145deg, color-mix(in srgb, var(--kpi) 30%, transparent), color-mix(in srgb, var(--kpi) 12%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--kpi) 32%, transparent), 0 4px 10px -8px color-mix(in srgb, var(--kpi) 50%, transparent);
}
.home-kpi-ico svg { display: block; }
:root[data-motion="full"] .home-kpi-ico { transition: transform var(--t-2) var(--ease-out); }
:root[data-motion="full"] .home-kpi:hover .home-kpi-ico { transform: translateY(-1px) scale(1.06); }
/* Where the tile goes: a small arrow at its foot, brighter on hover. */
.home-kpi-go {
  position: absolute; right: 12px; bottom: 13px;
  width: 14px; height: 14px; color: var(--ink-3); opacity: .7;
  transition: transform var(--t-2) var(--ease-out), opacity var(--t-1) var(--ease-out), color var(--t-1) var(--ease-out);
}
.home-kpi-go svg { display: block; width: 100%; height: 100%; }
.home-kpi:hover .home-kpi-go, .home-kpi:focus-visible .home-kpi-go { opacity: 1; color: color-mix(in srgb, var(--kpi) 80%, var(--ink)); transform: translateX(2px); }
.home-kpi-text { display: flex; flex-direction: column; min-width: 0; padding-right: 16px; }
/* Clear of the badge in the top right corner (its 36px and 11px in, less the tile's own 13px). */
.home-kpi-value, .home-kpi-label { padding-right: 40px; }
/* A narrow tile (four across in a tight row): a smaller badge, and the number with it. */
.home-kpi { container-type: inline-size; }
@container (max-width: 150px) {
  .home-kpi-top { top: 8px; right: 8px; }
  .home-kpi-ico { width: 28px; height: 28px; border-radius: 9px; }
  .home-kpi-ico svg { width: 15px; height: 15px; }
  .home-kpi-value { font-size: 22px; }
  .home-kpi-value, .home-kpi-label { padding-right: 26px; }
  .home-kpi-label { letter-spacing: .05em; }
}
.home-kpi-value {
  font-size: clamp(24px, .9vw + 17px, 31px);
  font-weight: 760; letter-spacing: -0.04em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-kpi-label {
  margin-top: 4px;
  font-size: 10.5px; font-weight: 750;
  text-transform: uppercase; letter-spacing: .09em;
  color: color-mix(in srgb, var(--kpi) 45%, var(--ink-2));
}
.home-kpi-sub {
  margin-top: 2px;
  font-size: 11.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.home-kpi-link { color: var(--accent-text); font-weight: 600; text-decoration: none; }
.home-kpi-link:hover { text-decoration: underline; }
/* How many of the cards are found: a thin bar along the foot. */
.home-kpi-meter { height: 4px; margin-top: -2px; margin-right: 18px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.home-kpi-meter i {
  display: block; height: 100%; border-radius: inherit; transform-origin: left center; transform: scaleX(var(--p, 0));
  background: linear-gradient(90deg, color-mix(in srgb, var(--kpi) 55%, #fff), var(--kpi));
}

:root[data-theme="light"] .home-kpi-item.is-cards { --kpi: #7c3aed; }
:root[data-theme="light"] .home-kpi-item.is-watch { --kpi: #0d9488; }
:root[data-theme="light"] .home-kpi-ico { color: color-mix(in srgb, var(--kpi) 85%, #000); }
:root[data-theme="light"] .home-kpi-label { color: color-mix(in srgb, var(--kpi) 60%, var(--ink-2)); }
.home-num.is-quiet { color: var(--ink-3); }

.home-ring { flex: none; width: 36px; height: 36px; display: block; }
.home-ring svg { width: 100%; height: 100%; display: block; transform: rotate(-90deg); }
.home-ring-track { fill: none; stroke: color-mix(in srgb, var(--ink) 12%, transparent); stroke-width: 4.5; }
.home-ring-fill {
  fill: none; stroke: var(--accent); stroke-width: 4.5; stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--p, 0));
  filter: drop-shadow(0 0 4px color-mix(in srgb, var(--accent) 45%, transparent));
}

.home-cta {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-top: clamp(22px, 2.6vw, 32px);
}
.home-cta .btn-lg { height: 46px; padding: 0 22px; font-size: 14.5px; }
.home-cta .btn-primary { padding: 0 22px 0 26px; }
.home-cta .btn:not(.btn-primary) {
  background: var(--home-glass);
  border-color: var(--home-glass-line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.home-cta-main { max-width: 100%; }
.home-cta-name {
  min-width: 0; max-width: 18ch;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 750;
}
.home-arrow { transition: transform var(--t-2) var(--ease-out); }
.btn:hover .home-arrow, .btn:focus-visible .home-arrow { transform: translateX(3px); }

.home-fact-row { margin-top: 18px; min-height: 20px; }
/* Only the out-of-reach note fills it; empty, it takes no room. */
.home-fact-row:has(> .home-fact:empty) { display: none; }
.home-worth-note[hidden] { display: none; }
.home-fact {
  display: flex; align-items: center; gap: 8px;
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.home-fact-dot {
  flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 80%, var(--ink));
}

/* --- the fan --------------------------------------------------------------- */

.home-hero-art {
  position: relative; z-index: 1;
  min-width: 0;
  display: grid; place-items: center;
}
/* The stage's empty floor under the cards (about a fifth of it, at every
   size) does not count towards the hero's height: the hero ends 42px below
   whichever is lower, its figures or its cards. */
.home-hero-art { margin-bottom: calc(clamp(300px, 36vw, 520px) * -.18); }

.home-stage {
  position: relative;
  width: 100%;
  height: clamp(300px, 36vw, 520px);
  display: grid; place-items: center;
  perspective: 1400px;
  perspective-origin: 50% 36%;
}

/* The fan is one card wide; every card is placed from the middle by the four
   numbers home.js sets on its slot: --x (its offset from the centre, in cards),
   --x2 (that squared, for the arc), --d (its depth rank) and --i (its rank). */
.home-fan {
  --w: clamp(112px, 12.4vw, 196px);
  position: relative;
  width: var(--w);
  aspect-ratio: var(--card-ratio);
  margin-top: -5%;
  transform-style: preserve-3d;
}
.home-fan-slot {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  /* Neighbours sit 84px apart in depth — more than a card rotated this far (and
     tilted on hover) ever leans — so no two cards can cut through each other. */
  transform:
    translate3d(calc(var(--x) * var(--w) * .6), calc(var(--x2) * var(--w) * .06), calc(var(--d) * -84px))
    rotateZ(calc(var(--x) * 6.5deg))
    rotateY(calc(var(--x) * -8deg));
}
/* dealt out from the middle as the hero arrives (Full motion only) */
:root[data-motion="full"] .home-hero-art.is-revealed .home-fan-slot {
  animation: home-deal 1150ms var(--ease-out) calc(120ms + var(--i) * 95ms) backwards;
}
@keyframes home-deal {
  from { opacity: 0; transform: translate3d(0, 70px, -140px) rotateZ(0deg) rotateY(0deg); }
}
.home-fan-bob { position: absolute; inset: 0; transform-style: preserve-3d; }
:root[data-motion="full"] .home-hero.is-live .home-fan-bob {
  animation: home-bob 6.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1.3s);
}
@keyframes home-bob {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -11px; }
}

.home-fan-card {
  /* design.css makes [data-foil] relative; this card fills its slot instead */
  position: absolute; inset: 0;
  display: block;
  /* Its layers (foil, sheen, price) stack and blend inside it, never against
     the fan's 3D scene — with or without the tilt's transform. */
  isolation: isolate;
  border-radius: calc(var(--w) * .055);
  overflow: hidden;
  background: var(--pocket);
  box-shadow:
    0 30px 46px -22px rgba(0,0,0,.8),
    0 0 0 1px rgba(255,255,255,.14);
  color: inherit;
  text-decoration: none;
}
:root[data-theme="light"] .home-fan-card {
  box-shadow: 0 26px 40px -22px rgba(20,24,32,.45), 0 0 0 1px rgba(20,24,32,.08);
}
.home-fan-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
a.home-fan-card:focus-visible { outline: 2px solid rgba(255,255,255,.92); outline-offset: 3px; }

/* The holographic wash: the foil gradient, much bigger than the card, slid
   against the art as the fan leans (home.js moves it). */
.home-holo {
  position: absolute; inset: -60%; z-index: 2;
  pointer-events: none;
  background: var(--foil);
  mix-blend-mode: color-dodge;
  opacity: .13;
}
:root[data-theme="light"] .home-holo { opacity: .1; }
:root:not([data-motion="full"]) .home-holo { opacity: .07; }

/* a sheen that sweeps across each card now and then */
.home-shine {
  position: absolute; inset: 0; z-index: 3;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
}
.home-shine::before {
  content: "";
  position: absolute; top: -20%; bottom: -20%; left: 0; width: 46%;
  background: linear-gradient(100deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.34) 50%, rgba(255,255,255,0) 100%);
  transform: translateX(-170%) skewX(-16deg);
  opacity: 0;
}
:root[data-motion="full"] .home-hero.is-live .home-shine::before {
  opacity: 1;
  animation: home-sweep 8s var(--ease-in-out) infinite;
  animation-delay: calc(1.6s + var(--i) * .5s);
}
@keyframes home-sweep {
  0%        { transform: translateX(-170%) skewX(-16deg); }
  20%, 100% { transform: translateX(340%) skewX(-16deg); }
}

.home-fan-price {
  position: absolute; left: 7px; bottom: 7px; z-index: 5;
  padding: 3px 9px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, #05060a 72%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #f4e3bd;
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.home-fan-price .home-money.is-masked { color: #d8dae3; }

.home-card-blank {
  display: block; width: 100%; height: 100%;
  background: linear-gradient(150deg, var(--bg-3), var(--bg-2));
}

/* the back of a card, for a fan with nothing to hold yet */
.home-fan-card.is-blank {
  background:
    radial-gradient(120% 90% at 30% 8%, color-mix(in srgb, var(--accent) 34%, var(--bg-3)), transparent 62%),
    radial-gradient(100% 80% at 90% 100%, color-mix(in srgb, var(--accent-2) 30%, var(--bg-2)), transparent 70%),
    var(--bg-2);
  box-shadow: 0 30px 46px -22px rgba(0,0,0,.7), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
:root[data-theme="light"] .home-fan-card.is-blank {
  box-shadow: 0 26px 40px -22px rgba(20,24,32,.35), inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}
.home-card-back {
  position: absolute; inset: 7%;
  display: grid; place-items: center;
  border-radius: calc(var(--w) * .035);
  border: 1px solid color-mix(in srgb, var(--ink) 16%, transparent);
  color: color-mix(in srgb, var(--accent) 70%, var(--ink));
}
.home-card-back svg { width: 40%; height: auto; opacity: .75; }

/* the shadow the fan casts on the floor */
.home-fan-floor {
  position: absolute; left: 50%; bottom: 9%;
  width: min(86%, 540px); height: 56px;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.5), rgba(0,0,0,0));
}
:root[data-theme="light"] .home-fan-floor {
  background: radial-gradient(closest-side, rgba(20,24,32,.2), rgba(20,24,32,0));
}
/* ========================================================= binder covers */

/* A binder shut, as the Binders page shows it (binder-cover.js; shell.css's
   .bcard-cover frame and .bcard-binder, binder.css's own spine and cover).
   Here it only lifts on hover, and the big one floats while it is on screen. */
.home-cover {
  display: block;
  width: 100%;
  transition: transform 520ms var(--ease-out);
}
.home-cover > .bcard-cover { width: 100%; }
/* Only its name on the cover here (binder-cover.js meta: false): no rule under it, and the
   name sits a little lower beneath the window. A Cover Studio design keeps its own placing. */
.home-cover .cover-rule { display: none; }
/* …and the name in a regular weight, not bold (a design's own lettering keeps its font). */
.home-cover .cover-name { font-weight: 500; letter-spacing: 0; }
.home-cover .bcover:not(.is-designed) .cover-title { position: relative; top: calc(var(--cover-w, 420px) * .07); }
/* On the row a wide binder's cover is short: its name and count, without the Open hint. */
.home-cover.is-md .bcard-binder.is-wide .cover-hint { display: none; }
.home-bc-plus { display: grid; place-items: center; width: 100%; height: 100%; color: rgba(255,255,255,.72); }
.home-bc-plus svg { width: 34%; height: auto; }

/* The big cover in the first-run panel floats while it is on screen. */
:root[data-motion="full"] .home-first-card.is-live .home-cover.is-lg {
  animation: home-float 7s ease-in-out infinite;
}
@keyframes home-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -8px; }
}

/* ============================================================ first run */

.home-first-card {
  position: relative; isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(22px, 3.2vw, 48px);
  border-radius: 26px;
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 60%),
    radial-gradient(80% 110% at 0% 100%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 62%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge), var(--shadow-2);
  overflow: hidden;
}
.home-first-copy { min-width: 0; }
.home-h2.is-big { margin-top: 8px; font-size: clamp(24px, 1.8vw + 14px, 36px); letter-spacing: -0.035em; text-wrap: balance; }
.home-first-lede { margin: 12px 0 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; max-width: 52ch; }
.home-steps { list-style: none; display: grid; gap: 14px; margin: 22px 0 0; padding: 0; }
:root[data-motion="full"] .home-first-card.is-revealed .home-step {
  animation: home-rise 700ms var(--ease-out) calc(200ms + var(--i) * 110ms) backwards;
}
.home-step { display: flex; align-items: flex-start; gap: 14px; }
.home-step-n {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 13px; font-weight: 750;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent);
}
.home-step-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.home-step-text b { font-size: 14.5px; font-weight: 650; }
.home-step-text span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

.home-first-art {
  position: relative;
  display: grid; place-items: center;
  min-height: 260px;
  perspective: 900px;
}
.home-first-art .home-cover { width: min(190px, 72%); }
.home-first-halo {
  position: absolute; left: 50%; top: 50%;
  width: 120%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 22%, transparent), transparent);
}

.home-feats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1vw, 14px);
  margin-top: clamp(12px, 1.4vw, 18px);
}
:root[data-motion="full"] .home-feats.is-revealed > .home-feat {
  animation: home-rise 700ms var(--ease-out) calc(var(--i) * 70ms) backwards;
}
.home-feat {
  min-width: 0;
  padding: 16px 18px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border: 1px solid var(--line-soft);
}
.home-feat-ico {
  display: grid; place-items: center;
  width: 32px; height: 32px; margin-bottom: 12px;
  border-radius: 10px;
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.home-feat-title { margin: 0; font-size: 14px; letter-spacing: -0.01em; }
.home-feat-body { margin: 5px 0 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }

/* =================================================== recently updated binders */

.home-shelf {
  position: relative;
  --fade-l: 0px;
  --fade-r: 56px;
}
.home-shelf.is-scrolled { --fade-l: 40px; }
.home-shelf.is-end { --fade-r: 0px; }

.home-shelf-row {
  display: flex;
  gap: clamp(16px, 1.8vw, 28px);
  list-style: none;
  margin: 0;
  /* room above for the lift, below for the shadows */
  padding: 16px 6px 20px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 6px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.home-shelf-row::-webkit-scrollbar { display: none; }
.home-shelf-item { flex: none; scroll-snap-align: start; }
:root[data-motion="full"] .home-shelf.is-revealed .home-shelf-item {
  animation: home-rise 760ms var(--ease-out) calc(min(var(--i), 8) * 70ms) backwards;
}

.home-nav-btn { width: 34px; height: 34px; padding: 0; border-radius: 50%; }
.home-nav-btn svg { display: block; }
.home-nav-btn[disabled] { opacity: .35; }

.home-bc {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  width: clamp(128px, 11vw, 158px);
  color: inherit; text-decoration: none;
  border-radius: 12px;
}
.home-bc:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
.home-bc-stage {
  display: block;
  margin-bottom: 8px;
  padding-right: 10px;           /* the opening edge, when it turns */
  perspective: 700px;
  perspective-origin: 50% 40%;
}
:root[data-motion="full"] .home-bc:hover .home-cover,
:root[data-motion="full"] .home-bc:focus-visible .home-cover { transform: translateY(-6px); }
.home-bc-name {
  font-size: 13.5px; font-weight: 650; letter-spacing: -0.012em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-1) var(--ease-out);
}
.home-bc:hover .home-bc-name { color: var(--accent-text); }
.home-bc-meta {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--ink-3);
  white-space: nowrap;
}
.home-bc-count { overflow: hidden; text-overflow: ellipsis; }
.home-bc-value .home-money { color: var(--gold-text); font-weight: 650; font-variant-numeric: tabular-nums; }
.home-bc-value .home-money.is-masked { color: var(--ink-3); }
.home-bc .home-bar { height: 4px; margin-top: 2px; }
.home-bc-when { font-size: 11px; color: var(--ink-3); }

/* the end of the row, when there are more binders than it shows */
.home-bc-ghost {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  aspect-ratio: .8;
  border-radius: 4px 10px 10px 4px;
  border: 1.5px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
  color: var(--ink-2);
  transition: border-color var(--t-2) var(--ease-out), color var(--t-2) var(--ease-out);
}
.home-bc-ghost b { font-size: 24px; font-weight: 750; letter-spacing: -0.03em; color: var(--ink); }
.home-bc-ghost span { font-size: 12px; }
.home-bc.is-more:hover .home-bc-ghost { border-color: var(--accent); color: var(--accent-text); }

/* ================================================================ chase cards */

.home-chase-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(18px, 1.8vw, 28px) clamp(12px, 1.3vw, 20px);
  margin: 0; padding: 0;
}
.home-chase-item { min-width: 0; }

.home-chase {
  /* The visually-hidden label inside must position against the card. */
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  color: inherit; text-decoration: none;
  border-radius: 12px;
}
a.home-chase:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
/* the lift on hover is `translate`, so it adds to the tilt's own transform */
.home-chase-lift {
  position: relative; display: block;
  isolation: isolate;
  transition: translate 340ms var(--ease-out);
}
.home-chase-lift::after {
  content: "";
  position: absolute; left: 8%; right: 8%; bottom: -10px; z-index: -1;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(0,0,0,.6), rgba(0,0,0,0));
  opacity: .45;
  transition: opacity 340ms var(--ease-out), transform 340ms var(--ease-out);
}
:root[data-theme="light"] .home-chase-lift::after {
  background: radial-gradient(closest-side, rgba(20,24,32,.3), rgba(20,24,32,0));
}
:root[data-motion="full"] a.home-chase:hover .home-chase-lift { translate: 0 -8px; }
a.home-chase:hover .home-chase-lift::after { opacity: 1; transform: translateY(10px) scale(1.08); }

.home-chase-art {
  position: relative; display: block;
  aspect-ratio: var(--card-ratio);
  border-radius: 9px;
  overflow: hidden;
  background: var(--pocket);
  box-shadow: var(--shadow-card), 0 0 0 1px var(--hairline);
}
.home-chase-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-chase-rank {
  position: absolute; left: 6px; top: 6px; z-index: 5;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums;
  color: #fff;
  background: color-mix(in srgb, #05060a 70%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
}
.home-chase-rank.is-1 { color: #2a1c02; background: linear-gradient(135deg, #fbe3a0, #c8952f); box-shadow: 0 0 12px rgba(227,182,101,.5); }
.home-chase-rank.is-2 { color: #1b1f27; background: linear-gradient(135deg, #f3f5f9, #9aa3b2); }
.home-chase-rank.is-3 { color: #2a1405; background: linear-gradient(135deg, #f0bd98, #a8663b); }
.home-chase-price {
  position: absolute; left: 6px; bottom: 6px; z-index: 5;
  padding: 2px 8px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, #05060a 74%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: #f6e6c2; font-size: 11.5px; font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.15);
}
.home-chase-price .home-money.is-masked { color: #d8dae3; }
.home-chase-est {
  position: absolute; right: 6px; top: 6px; z-index: 5;
  padding: 1px 6px; border-radius: var(--radius-pill);
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: color-mix(in srgb, #05060a 66%, transparent);
  color: #ded3b6;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.14);
}
.home-chase-body { display: block; min-width: 0; }
.home-chase-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  /* Two lines whether the name needs them or not, so every binder chip below
     sits on the same line across the row. */
  min-height: 2.7em;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
}
a.home-chase:hover .home-chase-name { color: var(--accent-text); }
.home-chase-meta {
  display: flex; align-items: center; gap: 6px;
  margin-top: 3px;
  font-size: 11.5px; color: var(--ink-3);
  min-width: 0;
}
.home-chase-meta > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-dot-cover {
  flex: none; width: 8px; height: 8px; border-radius: 2px;
  background: var(--cover, #2f6f4f);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

/* ================================================================ your games */

.home-games-wrap { position: relative; }
.home-games { display: flex; flex-wrap: nowrap; padding: 4px 0 8px; }
/* Without the marquee (too few games, or Motion not Full) the row scrolls by hand. */
.home-games:not([data-marquee]) { overflow-x: auto; overscroll-behavior-x: contain; }
/* On a phone a hand-scrolled row cut the second game off mid-word at the edge: they wrap instead. */
@media (max-width: 640px) {
  .home-games:not([data-marquee]) { flex-wrap: wrap; row-gap: 10px; overflow-x: visible; }
}
:root[data-motion="off"] .home-games[data-marquee] { overflow-x: auto; }

.home-game {
  flex: none;
  display: inline-flex; align-items: center; gap: 10px;
  margin-right: 12px;
  padding: 7px 16px 7px 7px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--glass-edge);
  font-size: 13px; white-space: nowrap;
  color: inherit; text-decoration: none;
  transition: border-color var(--t-2) var(--ease-out);
}
a.home-game:hover, a.home-game:focus-visible { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.home-game.is-loading { height: 44px; border: 0; }
.home-game b { font-weight: 650; letter-spacing: -0.01em; }
.home-game-n { color: var(--ink-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.home-game-mark {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 11px; font-weight: 800; letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

.home-note {
  margin: 14px 0 0;
  font-size: var(--fs-sm); color: var(--ink-3);
  max-width: 76ch;
}

/* ============================================================ empty states */

.home-empty {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: clamp(18px, 2vw, 26px);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--line);
  background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.home-empty p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.home-empty-line { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }

/* ==================================================================== footer */

.home-foot {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 14px;
  margin: clamp(48px, 5vw, 84px) var(--edge) 0;
  padding: 22px 0 40px;
  border-top: 1px solid var(--line-soft);
}
.home-foot-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
@media (hover: none) { .home-foot-link { min-height: 40px; display: inline-flex; align-items: center; } }
.home-foot-link {
  appearance: none;
  background: none; border: 0;
  padding: 6px 12px; border-radius: var(--radius-pill);
  color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: color var(--t-1) var(--ease-out), background var(--t-1) var(--ease-out);
}
.home-foot-link:hover { color: var(--ink); background: var(--bg-3); }
.home-foot-note { margin: 0; color: var(--ink-3); font-size: var(--fs-sm); }

/* ================================================================== skeleton */

.home-hero.is-loading { min-height: min(70vh, 720px); }
.home-skel-fan {
  position: relative;
  width: clamp(112px, 12.4vw, 196px);
  aspect-ratio: var(--card-ratio);
}
.home-skel-card {
  position: absolute; inset: 0;
  border-radius: 12px;
  rotate: calc((var(--i) - 1) * 9deg);
  translate: calc((var(--i) - 1) * 62%) calc((var(--i) - 1) * (var(--i) - 1) * 12px);
}
.home-skel-card:nth-child(2) { z-index: 1; }
.home-skel-row { display: flex; gap: 22px; overflow: hidden; }
.home-skel-cover {
  flex: none;
  width: clamp(128px, 11vw, 158px);
  aspect-ratio: .8;
  border-radius: 4px 10px 10px 4px;
}

/* ============================================================ value over time
   Insights in brief (home.js valueSection): the hero's small line under the
   worth, and a section with the last 30 days as a line and the biggest mover.
   Up and down are said by an arrow and a word as well as by colour. */

.home { --home-up: #34d399; --home-down: #fb7185; }
:root[data-theme="light"] .home { --home-up: #047857; --home-down: #be123c; }

.home-delta {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px 3px 8px;
  border-radius: var(--radius-pill);
  font-size: 12.5px; font-weight: 650;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  color: var(--ink-2);
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}
.home-delta > span[aria-hidden] { font-size: .72em; }
.home-delta b { font-weight: 720; }
.home-delta.is-up { color: var(--home-up); background: color-mix(in srgb, var(--home-up) 13%, transparent); }
.home-delta.is-down { color: var(--home-down); background: color-mix(in srgb, var(--home-down) 13%, transparent); }

/* The hero's line: a tiny sparkline, the change, "30 days", opening Insights. */
.home-trend {
  display: inline-flex; align-items: center; gap: 10px;
  max-width: 100%;
  margin-top: 12px;
  padding: 5px 12px 5px 8px;
  border-radius: var(--radius-pill);
  background: var(--home-glass);
  border: 1px solid var(--home-glass-line);
  box-shadow: var(--glass-edge);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  color: var(--ink-2); font-size: 12.5px; text-decoration: none;
  transition: border-color var(--t-2) var(--ease-out);
}
.home-trend:hover, .home-trend:focus-visible { border-color: color-mix(in srgb, var(--gold) 45%, var(--home-glass-line)); }
.home-trend .home-delta { padding: 0; background: none; }
.home-trend-spark { display: inline-flex; color: var(--gold); }
.home-trend.is-up .home-trend-spark { color: var(--home-up); }
.home-trend.is-down .home-trend-spark { color: var(--home-down); }
.home-trend-spark .spark { display: block; width: 72px; height: 22px; }
.home-trend-when { color: var(--ink-3); white-space: nowrap; }
.home-trend .home-arrow { color: var(--ink-3); }
.home-trend:hover .home-arrow { transform: translateX(3px); }

.home-value {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr);
  gap: clamp(14px, 2vw, 24px);
  padding: clamp(16px, 2vw, 24px);
  border-radius: var(--radius-lg);
  background: var(--home-glass);
  border: 1px solid var(--home-glass-line);
  box-shadow: var(--glass-edge), var(--shadow-1);
}
.home-value-main { display: flex; flex-direction: column; min-width: 0; color: var(--gold); }
.home-value-main.is-up { color: var(--home-up); }
.home-value-main.is-down { color: var(--home-down); }
.home-value-now {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px;
  margin: 0; color: var(--ink);
}
.home-value-now > span:first-child {
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
  flex-basis: 100%;
}
.home-value-change {
  font-size: clamp(24px, 1.4vw + 16px, 34px); font-weight: 720; letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.home-value-change > span[aria-hidden] { font-size: .5em; vertical-align: .3em; }
.home-value-change.is-up { color: var(--home-up); }
.home-value-change.is-down { color: var(--home-down); }
.home-value-spark { display: block; margin-top: 14px; border-radius: 12px; color: inherit; }
.home-value-spark .spark { display: block; width: 100%; height: auto; max-height: 150px; }
.home-value-axis {
  display: flex; justify-content: space-between;
  margin: 6px 0 0; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.home-value-empty { margin: 12px 0 0; color: var(--ink-2); font-size: var(--fs-sm); max-width: 56ch; }

.home-value-side {
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
  padding: 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--home-glass-line);
  color: inherit; text-decoration: none;
  transition: border-color var(--t-2) var(--ease-out), transform var(--t-2) var(--ease-out);
}
a.home-value-side:hover, a.home-value-side:focus-visible { border-color: color-mix(in srgb, var(--accent) 45%, var(--home-glass-line)); }
:root[data-motion="full"] a.home-value-side:hover { transform: translateY(-2px); }
.home-value-card { display: flex; align-items: center; gap: 14px; min-width: 0; }
.home-value-art {
  flex: none; position: relative;
  width: 74px; aspect-ratio: var(--card-ratio);
  border-radius: 7px; overflow: hidden;
  background: var(--bg-3);
  box-shadow: var(--shadow-card);
}
.home-value-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-value-info { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.home-value-name {
  font-size: 14.5px; font-weight: 680; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
a.home-value-side:hover .home-value-name { color: var(--accent-text); }
.home-value-where { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--ink-3); }
.home-value-where > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home-value-prices { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.home-value.is-loading .home-value-main { gap: 0; }

@media (max-width: 760px) {
  .home-value { grid-template-columns: minmax(0, 1fr); }
}

/* ============================================================== watchlist
   home.js loadWatch: up to three columns — at its target, moved most since it
   was watched (or the newest), and the alerts told lately. */
.home-watch {
  display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
  padding: clamp(14px, 1.8vw, 20px);
  border-radius: var(--radius-lg);
  background: var(--home-glass);
  border: 1px solid var(--home-glass-line);
  box-shadow: var(--glass-edge), var(--shadow-1);
}
.home-watch.is-1 { --cols: 1; }
.home-watch.is-2 { --cols: 2; }
.home-watch-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.home-watch-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.home-watch-empty { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }
.home-watch-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 6px 8px; margin: 0 -8px; border-radius: 10px;
  color: inherit; text-decoration: none;
  transition: background var(--t-1) var(--ease-out);
}
.home-watch-row.is-alert { grid-template-columns: auto minmax(0, 1fr); }
@media (hover: hover) { .home-watch-row:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); } }
.home-watch-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.home-watch-art {
  width: 30px; aspect-ratio: var(--card-ratio); border-radius: 4px; overflow: hidden;
  background: var(--pocket); box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.home-watch-art img, .home-watch-art .home-card-blank { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-watch-info { display: grid; gap: 2px; min-width: 0; }
.home-watch-name { font-size: 13.5px; font-weight: 640; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-watch-row.is-unread .home-watch-name::before {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; vertical-align: 1px;
  border-radius: 50%; background: var(--accent);
}
.home-watch-sub { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-watch-spark { width: 52px; height: 18px; }
.home-watch-now { font-size: 13.5px; font-weight: 700; color: var(--gold-text); font-variant-numeric: tabular-nums; }
.home-watch-pct { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-watch-pct.is-up { color: var(--home-up); }
.home-watch-pct.is-down { color: var(--home-down); }
@media (max-width: 1000px) {
  .home-watch, .home-watch.is-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .home-watch-spark { display: none; }
  .home-watch-row { grid-template-columns: auto minmax(0, 1fr) auto; }
}

/* ======================================================== customize home
   home-layout.js: the button under the last section, and its dialog — a list
   of the sections with a grip to drag, arrows to move and a switch to show. */
.home-customize { display: flex; justify-content: center; margin-top: 40px; }
.home-customize .btn { gap: 7px; color: var(--ink-2); }
.modal.hl-modal { width: min(560px, 100%); max-height: min(720px, 92vh); }
.hl-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.hl-row {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 12px;
  background: var(--bg-2); border: 1px solid var(--line);
  transition: opacity var(--t-1) var(--ease-out), box-shadow var(--t-1) var(--ease-out);
}
.hl-row.is-hidden .hl-text { opacity: .5; }
.hl-row.is-dragging { position: relative; z-index: 1; box-shadow: 0 10px 26px rgba(0,0,0,.4); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.hl-grip {
  display: grid; place-items: center; width: 26px; height: 34px; border-radius: 8px;
  color: var(--ink-3); cursor: grab; touch-action: none;
}
.hl-row.is-dragging .hl-grip { cursor: grabbing; color: var(--accent-text); }
.hl-text { display: grid; gap: 1px; min-width: 0; }
.hl-text b { font-size: 14px; font-weight: 650; }
.hl-text span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hl-moves { display: inline-flex; gap: 2px; }
.hl-move {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 8px; cursor: pointer;
  color: var(--ink-2); background: none; border: 1px solid transparent;
}
@media (hover: hover) { .hl-move:hover { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink); } }
.hl-move:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.hl-row:first-child .hl-move:first-child, .hl-row:last-child .hl-move:last-child { visibility: hidden; }
/* the switch: a checkbox drawn as a pill */
.hl-show { position: relative; display: inline-flex; cursor: pointer; }
.hl-show-input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.hl-switch {
  width: 38px; height: 22px; border-radius: var(--radius-pill); position: relative;
  background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background var(--t-1) var(--ease-out);
}
.hl-switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform var(--t-1) var(--ease-out);
}
.hl-show-input:checked + .hl-switch { background: var(--accent); }
.hl-show-input:checked + .hl-switch::after { transform: translateX(16px); }
.hl-show-input:focus-visible + .hl-switch { outline: 2px solid var(--accent); outline-offset: 2px; }
.hl-dlg .modal-foot .hl-reset { margin-right: auto; }
@media (max-width: 480px) {
  .hl-row { gap: 6px; padding: 7px 8px; }
  .hl-text span { display: none; }
}

/* ================================================================ responsive */

@media (max-width: 1100px) {
  .home-chase-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .home-hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    gap: 6px;
    padding-bottom: 42px;
  }
  .home-stage { height: clamp(290px, 56vw, 400px); }
  .home-hero-art { margin-bottom: calc(clamp(290px, 56vw, 400px) * -.18); }
  .home-fan { --w: clamp(100px, 21vw, 168px); }
  .home-skel-fan { width: clamp(100px, 21vw, 168px); margin: 40px 0; }
  .home-first-card { grid-template-columns: minmax(0, 1fr); }
  .home-first-art { order: -1; min-height: 210px; }
  .home-feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .home-chase-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Touch, or too narrow for them: the row is swiped, not stepped. */
@media (hover: none), (max-width: 699px) {
  .home-nav-btn { display: none; }
}

@media (max-width: 640px) {
  .home-head { flex-wrap: wrap; align-items: flex-start; }
  /* The row runs out to the screen edges, and scrolls from the gutter. Here
     --edge is exactly --gut, so the bleed lines up with the section's padding. */
  .home-shelf-row {
    margin-inline: calc(var(--gut) * -1);
    padding-inline: var(--gut);
    scroll-padding-inline: var(--gut);
  }
  .home-feats { grid-template-columns: minmax(0, 1fr); }
  .home-foot { flex-direction: column; align-items: flex-start; }
}

/* With shelves, a fourth figure (On display): four across where they fit, two by two where they do not. */
.home-kpis.has-kits { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 780px; }
/* Four across, a tile is narrow: its line (the shelves' "17 complete in box · 3 sealed")
   takes a second line rather than lose its end to an ellipsis. */
.home-kpis.has-kits .home-kpi-sub {
  white-space: normal;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
}
/* Two by two wherever the hero's left column is narrow: beside the fan up to 1180px (a phone on its
   side among them, its hero still two columns above 900px), and stacked on a phone held upright. */
@media (max-width: 1180px) and (min-width: 901px), (max-width: 640px) {
  .home-kpis.has-kits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .home-hero { padding-top: 24px; }
  .home-kpis { gap: 9px; }
  .home-kpi { padding: 10px 10px 10px; gap: 7px; }
  .home-kpi-top { top: 9px; right: 9px; }
  .home-kpi-value, .home-kpi-label { padding-right: 34px; }
  .home-kpi-go { right: 9px; bottom: 10px; }
  .home-kpi-ico { width: 32px; height: 32px; border-radius: 10px; }
  .home-kpi-label { letter-spacing: .05em; }
  .home-hello-day { display: none; }
  /* Two pill buttons will not sit side by side here; stacked, they line up. */
  .home-cta { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .home-cta .btn-lg { width: 100%; }
  .home-cta-name { max-width: none; flex: 0 1 auto; }
  .home-first-art .home-cover { width: 150px; }
}

@media (max-width: 480px) {
  .home-chase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Twelve cards is a long scroll on a phone: two rows fewer. */
  .home-chase-item:nth-child(n + 9) { display: none; }
}

/* ===================================================================== print */
/* app.css hides the whole view when printing; this is belt and braces. */
@media print {
  .home-sky, .home-stage, .home-holo, .home-shine { display: none !important; }
}

/* A phone: no greeting pill above the worth — the room goes to the figure. (The
   "Out of reach" pill is news, not a greeting: it stays.) */
@media (max-width: 760px) {
  .home-hello:not(.is-warn) { display: none; }
  /* No most valuable cards on a phone — neither the hero's fan nor the ranked grid: the room goes to the figures. */
  .home-hero-art, .home-chase-sec { display: none; }
}

/* ------------------------------------------------------------ Your Spaces
   The room last walked into, big, with a few others beside it (spaces.js). */
.home-spaces { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.home-spaces.is-one { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.home-spaces-more { display: grid; gap: 10px; align-content: start; }
.home-space {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 14px; align-items: center; min-width: 0;
  padding: 8px; border-radius: var(--radius-lg); color: inherit; text-decoration: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--ink) 4%, var(--bg-2)), var(--bg-2));
  border: 1px solid var(--line); box-shadow: var(--glass-edge), var(--shadow-1);
  transition: transform var(--t-2) var(--ease-out), box-shadow var(--t-2) var(--ease-out), border-color var(--t-2) var(--ease-out);
}
.home-space:hover, .home-space:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 16%, var(--line)); box-shadow: var(--glass-edge), var(--shadow-2); }
.home-space.is-main { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; padding: 10px 22px 10px 10px; }
.home-space-pic {
  position: relative; display: block; aspect-ratio: 16 / 10; border-radius: calc(var(--radius-lg) - 4px); overflow: hidden;
  background: radial-gradient(120% 90% at 30% 20%, color-mix(in srgb, #8b5cf6 30%, #10131c), #0a0c12);
}
.home-space-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 600ms var(--ease-out); }
.home-space:hover .home-space-pic img { transform: scale(1.04); }
.home-space-body { display: grid; gap: 4px; min-width: 0; }
.home-space-kicker { font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
.home-space-name { font-size: 15px; font-weight: 720; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-space.is-main .home-space-name { font-size: clamp(19px, 1vw + 12px, 26px); letter-spacing: -0.025em; }
.home-space-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 12.5px; color: var(--ink-3); }
.home-space-stars { color: #f5c542; letter-spacing: 1px; }
.home-space-go { justify-self: start; margin-top: 10px; pointer-events: none; }
/* None yet: what a Space is, and the way in. */
.home-space-invite {
  display: flex; align-items: center; gap: 18px; max-width: 860px; padding: 18px 22px; border-radius: var(--radius-lg);
  color: inherit; text-decoration: none; background: var(--home-glass); border: 1px solid var(--home-glass-line);
  transition: transform var(--t-2) var(--ease-out), border-color var(--t-2) var(--ease-out);
}
.home-space-invite:hover { transform: translateY(-2px); border-color: color-mix(in srgb, #8b5cf6 50%, var(--home-glass-line)); }
.home-space-invite .home-space-meta { font-size: 13.5px; }
.home-space-cube { position: relative; flex: none; width: 44px; height: 44px; }
.home-space-cube i { position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(135deg, #06b6d4, #8b5cf6); opacity: .9; transform: rotate(45deg) scale(.72); }
.home-space-cube i:nth-child(2) { transform: rotate(45deg) scale(.5) translate(-30%, -30%); opacity: .55; }
.home-space-cube i:nth-child(3) { transform: rotate(45deg) scale(.3) translate(60%, 60%); opacity: .4; }
@media (max-width: 760px) {
  .home-spaces { grid-template-columns: minmax(0, 1fr); }
  .home-space.is-main { grid-template-columns: minmax(0, 1fr); padding: 8px 8px 16px; gap: 12px; }
  .home-space.is-main .home-space-body { padding: 0 8px; }
  .home-space { grid-template-columns: 104px minmax(0, 1fr); }
}
