/* =============================================================================
   home.css — the landing page (/), on the site's design system
   -----------------------------------------------------------------------------
   Built on design-system.css, which index.html links first (tokens in both
   themes, the body.th-page shell re-skin, the .th root, buttons, tags, faces,
   segmented control, section bands and their alternating strips). This file is
   the landing page's own components only; every colour is a --th-* token, and
   the light rules at the end lead with :root[data-theme="light"].

   The page, top to bottom:
     HERO        a gold-framed panel (the hubs' header frame, restated here so
                 this page does not link team-hub.css) holding the theme-specific
                 cookie art, the title, the site-wide search, popular builds,
                 quick links, a one-line snapshot, and the RIGHT NOW row
                 (codes, current update, Arena season) along its foot.
     BANDS       .th-bands: Look it up · Plan your teams · Stay current · News
                 Feed · Popular builds · About. Every second band sits on a strip.
     DIRECTORY   .lp-grid tiles in STATED layouts per width, so no band ends on
                 a ragged row (see the grid section). Mode tiles wear their
                 hub's accent through the .th-m-* classes.

   Responsive by container query on the .th root (one markup). The hero art is
   ONE crop at every width (the standard, squarer one; owner's call,
   2026-10-27), so its light-theme footprint rule at the end is one rule.

   Class names the tests and other code read, kept on purpose: .home-hero,
   .hero-bg-art, .hero-search, .hero-search-results, .live-tile(-violet),
   .live-k, .home-group, .group-head, .home-cards, .home-card, .home-btn,
   .bento-metrics, .metric-*, .metrics-*, .news-* (tests/landing-*.spec.mjs,
   tests/light-theme.spec.mjs, tests/funnel-events.spec.mjs).
   ========================================================================== */

/* ---------- root ---------- */
.th.home { padding-top: 0; padding-bottom: 28px; }

/* ---------- announcement ---------- */
/* One static card above the hero for a launch (the Graphic Studio,
   2026-11-08). Its art, three real graphics fanned, stands out of its top edge
   as the hero art stands out of the frame. The button's ::after makes the whole
   card its link (so the button never scales on press: a transform would make
   it the ::after's containing block mid-click, and the click would miss). The
   x hides it for this browser (the inline script after it). One row wide; the
   button drops under the copy at <=860 and the copy shortens at <=560.
   Retire it by deleting the markup, the script and these rules. */
.th .lp-announce {
  position: relative;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 4px 18px;
  margin-top: 40px;
  min-height: 88px;
  padding: 12px 12px 12px 18px;
  border-radius: 18px;
  border: 1px solid var(--th-gold-line);
  background:
    radial-gradient(460px 170px at 5% 50%, var(--th-gold-faint), transparent 72%),
    var(--th-surface-1);
  box-shadow: inset 0 0 0 3px rgba(var(--th-abyss-rgb), 0.45), var(--th-shadow-2);
}
.th .lp-announce[hidden] { display: none; }
/* the hero art stands 34px out of its frame, so the frame keeps clear of the card
   (~, not +: the card's script sits between them; a hidden card leaves the hero as it was) */
.th .lp-announce:not([hidden]) ~ .lp-hero { margin-top: 48px; }
.th .lp-announce-art { position: relative; align-self: stretch; }
.th .lp-announce-art img { position: absolute; left: -8px; bottom: -6px; width: 150px; max-width: none; height: auto; }
.th .lp-announce-k { display: flex; align-items: center; gap: 8px; min-width: 0; }
.th .lp-announce-name { font-family: "CookieRun KR", "Outfit", sans-serif; font-size: 20px; font-weight: 700; line-height: 1.15; color: var(--th-heading); }
.th .lp-announce-d { margin-top: 4px; font-size: 14px; line-height: 1.45; color: var(--th-ink-2); }
.th .lp-announce-short { display: none; }
.th .lp-announce-soon { color: var(--th-ink-3); }
.th .lp-announce-go { height: 42px; padding: 0 20px; font-size: 15px; }
.th .lp-announce-go:active { transform: none; }
.th .lp-announce-go svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.th .lp-announce-go::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.th .lp-announce-x {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--th-ink-3);
}
.th .lp-announce-x:hover { background: var(--th-btn-bg); color: var(--th-ink); }
.th .lp-announce-x:focus-visible { outline: 3px solid var(--th-btn-focus); outline-offset: 0; }
.th .lp-announce-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

/* ---------- hero ---------- */
/* No z-index at rest: the raise below is scoped to an OPEN results list
   (tests/landing-layout.spec.mjs pins both halves). */
.th .lp-hero {
  position: relative;
  margin-top: 22px;
  border-radius: 22px;
  border: 1px solid var(--th-gold-line);
  background-color: var(--th-surface-1);
  background-image:
    radial-gradient(640px 420px at 78% 38%, rgba(140, 110, 255, 0.16), transparent 70%),
    radial-gradient(520px 360px at 94% 82%, rgba(255, 150, 70, 0.11), transparent 70%),
    linear-gradient(180deg, var(--th-surface-2), var(--th-ground));
  box-shadow: inset 0 0 0 4px rgba(var(--th-abyss-rgb), 0.55), inset 0 0 0 5px var(--th-gold-faint), var(--th-shadow-2);
}
.th .lp-hero:has(.hero-search-results:not([hidden])) { z-index: 20; }
.th .lp-hero .th-orn--bl { top: auto; bottom: -5px; left: 40px; }
.th .lp-hero .th-orn--br { top: auto; bottom: -5px; right: 40px; }

/* the art: the theme-specific crop, standing in the frame's right half and
   breaking out of its top edge; behind the copy, never under the pointer */
.th .lp-hero .hero-bg-art {
  position: absolute;
  z-index: 1;
  right: 24px;
  top: -34px;
  /* the standard crop is ~1:1, so its width is its height: sized to stand
     between the frame's top edge and the Right Now row */
  width: min(45%, 620px);
  pointer-events: none;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
}
.th .lp-hero .hero-bg-art picture { display: block; }
.th .lp-hero .hero-bg-art img { display: block; width: 100%; height: auto; }

.th .lp-hero-in { position: relative; z-index: 3; max-width: 640px; padding: 36px 0 0 40px; }
.th .lp-title { margin-top: 10px; font-size: 52px; line-height: 1.02; text-wrap: balance; }
.th .lp-title em { font-style: normal; color: var(--th-gold); white-space: nowrap; }
.th .lp-lede { margin-top: 12px; max-width: 540px; font-size: 16px; line-height: 1.55; color: var(--th-ink-2); }

/* search */
.th .lp-search {
  position: relative;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 6px 0 20px;
  border-radius: 999px;
  background: var(--th-surface-sunk);
  box-shadow: inset 0 0 0 1px var(--th-line-3), 0 10px 30px -18px rgba(0, 0, 0, 0.9);
}
.th .lp-search:focus-within { box-shadow: inset 0 0 0 2px var(--th-focus-color), var(--th-focus-ring); }
.th .lp-search > svg { color: var(--th-ink-3); }
.th .lp-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; font-size: 16px; }
.th .lp-search input:focus-visible { outline: none; }
.th .lp-search input::placeholder { color: var(--th-ink-3); opacity: 1; }
.th .lp-search input::-webkit-search-cancel-button { filter: grayscale(1); }
.th .lp-search .th-btn { height: 44px; padding: 0 22px; font-size: 15px; }

.th .hero-search-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: min(420px, 60vh);
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background: var(--th-surface-1);
  border: 1px solid var(--th-line-3);
  box-shadow: var(--th-shadow-pop);
}
.th .hero-search-results li a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 6px 12px 6px 6px;
  border-radius: 12px;
}
.th .hero-search-results li a:hover,
.th .hero-search-results li[aria-selected="true"] a { background: var(--th-surface-2); }
.th .hero-search-results li[aria-selected="true"] a { box-shadow: inset 0 0 0 1px var(--th-gold-line); }
.th .hero-search-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  overflow: hidden;
  background: var(--th-surface-3);
  font-size: 13px;
  font-weight: 800;
  color: var(--th-ink-3);
}
.th .hero-search-icon img { width: 100%; height: 100%; object-fit: cover; }
.th .hero-search-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.th .hero-search-title { font-size: 15px; font-weight: 700; color: var(--th-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th .hero-search-detail { font-size: 12.5px; color: var(--th-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th .hero-search-kind { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--th-ink-3); }
.th .hero-search-empty { display: block; padding: 12px; font-size: 14px; color: var(--th-ink-3); }

/* popular builds: round cookie chips */
.th .lp-popular { margin-top: 14px; display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; }
.th .lp-popular ul { display: flex; flex-wrap: wrap; gap: 8px; }
.th .lp-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px 0 3px;
  border-radius: 999px;
  background: var(--th-btn-bg);
  font-size: 13px;
  font-weight: 600;
  color: var(--th-ink);
  white-space: nowrap;
  transition: background-color 0.15s ease;
}
.th .lp-chip:hover { background: var(--th-btn-hover); }
.th .lp-chip:focus-visible { outline: 3px solid var(--th-btn-focus); outline-offset: 0; }
.th .lp-chip .th-face { border-radius: 50%; }
.th .lp-chip .th-face::after { border-radius: 50%; }
/* a cookie with no square portrait yet (release day) shows its initials */
.th .lp-chip .th-face:not(:has(.th-face-img)) .th-face-ini { visibility: visible; }

.th .lp-ctas { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; }

/* the one-line snapshot: keeps its space while pending, so nothing moves */
.th .lp-facts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 2px 18px; font-size: 13.5px; color: var(--th-ink-3); }
.th .lp-facts[data-pending] { visibility: hidden; }
.th .lp-facts b { color: var(--th-ink); font-weight: 700; }
.th .lp-facts span[hidden] { display: none; }

/* RIGHT NOW: three cells along the frame's foot */
.th .lp-now {
  position: relative;
  z-index: 2;
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--th-gold-line);
}
.th .lp-now-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px 22px 16px;
  transition: background-color 0.15s ease;
}
.th .lp-now-cell:first-child { border-bottom-left-radius: 21px; }
.th .lp-now-cell:last-child { border-bottom-right-radius: 21px; }
.th .lp-now-cell + .lp-now-cell { border-left: 1px dashed var(--th-line-2); }
.th .lp-now-cell:hover { background: var(--th-wash); }
.th .lp-now-cell:focus-visible { outline-offset: -3px; }
.th .lp-now-k { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; }
.th .live-k { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-gold); }
.th .lp-now-day { font-size: 12.5px; color: var(--th-ink-3); }
.th .lp-now-v {
  margin-top: 5px;
  font-family: "CookieRun KR", "Outfit", sans-serif;
  font-weight: 700;
  font-size: 19px;
  line-height: 1.15;
  color: var(--th-heading);
  overflow-wrap: anywhere;
}
.th .lp-now-d { margin-top: 3px; font-size: 13px; line-height: 1.4; color: var(--th-ink-3); }
.th .lp-now-bar { display: block; margin-top: 8px; height: 6px; border-radius: 99px; background: var(--th-track); overflow: hidden; }
.th .lp-now-bar[hidden] { display: none; }
.th .lp-now-bar i { display: block; width: 0; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--th-m2), var(--th-m1)); }
.th .lp-now .th-tag[hidden] { display: none; }

/* ---------- bands ---------- */
.th .lp-bands { margin-top: 12px; }
/* a hidden band (the News Feed before its data) takes no space */
.th .lp-bands > .th-band[hidden] { display: none; }

/* ---------- directory ---------- */
/* STATED LAYOUTS, so no band ends on a ragged row at any width:
     wide (>1180)   Look it up: 2 features + 5 (a 20-track grid: 10 + 10, then 4 x5)
                    Plan your teams: the two builders 2x2 side by side, then 8 modes
                    in fours
                    Stay current: three
     mid (861-1180) Look it up: Cookie-Dex across, then 6 in threes
                    Plan your teams: Team Builder 2x2, the Guide Builder 1x3 beside
                    it (art over words), then 8 in threes, two under the Team Builder
                    Stay current: three
     <=860          two columns: each band's first tile across (both builders),
                    the rest in pairs
     <=560          a phone: a tile is its art and name only, and the two builders
                    pair up at the head of their band */
.th .lp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.th .lp-grid--ref { grid-template-columns: repeat(20, minmax(0, 1fr)); }
.th .lp-grid--ref > .lp-tile { grid-column: span 4; }
.th .lp-grid--ref > .lp-tile--feature { grid-column: span 10; }
.th .lp-grid--teams > .lp-tile--feature { grid-column: span 2; grid-row: span 2; }
.th .lp-grid--live { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.th .lp-tile {
  position: relative;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 12px 16px 12px 10px;
  border-radius: 16px;
  background: var(--th-surface-1);
  border: 1px solid var(--th-line-2);
  box-shadow: var(--th-shadow-1);
  transition: transform 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}
.th .lp-tile:hover { transform: translateY(-2px); border-color: var(--th-gold-line); background: var(--th-surface-2); }
.th .lp-tile:focus-visible { outline: 3px solid var(--th-btn-focus); outline-offset: 2px; }
.th .lp-art { position: relative; display: grid; place-items: center; width: 76px; height: 88px; }
.th .lp-art::before {
  content: "";
  position: absolute;
  inset: 6px 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--th-m-rgb), 0.34), rgba(var(--th-m-rgb), 0) 68%);
}
.th .lp-art img { position: relative; width: auto; height: auto; max-width: 76px; max-height: 92px; filter: var(--th-art-drop); }
.th .lp-tx { min-width: 0; }
.th .lp-tile h3 { display: flex; align-items: center; gap: 6px; font-size: 17px; line-height: 1.15; }
.th .lp-tile h3 svg { width: 15px; height: 15px; color: var(--th-gold); opacity: 0; transform: translateX(-4px); transition: opacity 0.15s ease, transform 0.15s ease; }
.th .lp-tile:is(:hover, :focus-visible) h3 svg { opacity: 1; transform: none; }
.th .lp-tile p { margin-top: 4px; font-size: 13.5px; line-height: 1.42; color: var(--th-ink-2); }
.th .lp-meta { margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px; }
.th .lp-meta .th-tag { height: 20px; font-size: 11px; }
/* a game mode wears its hub's accent: the edge and the glow behind its art */
.th .lp-tile--mode { border-left: 3px solid rgba(var(--th-m-rgb), 0.85); }

/* the five small tiles of the first band, five abreast */
.th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) { grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding-left: 8px; }
.th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art { width: 58px; height: 80px; }
.th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art img { max-width: 58px; max-height: 84px; }
.th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) h3 { font-size: 16px; }

/* features: bigger art and title */
.th .lp-tile--feature { grid-template-columns: 120px minmax(0, 1fr); min-height: 140px; }
.th .lp-tile--feature .lp-art { width: 120px; height: 118px; }
.th .lp-tile--feature .lp-art img { max-width: 120px; max-height: 128px; }
.th .lp-tile--feature h3 { font-size: 21px; }
.th .lp-tile--feature p { font-size: 14px; }
.th .lp-grid--teams > .lp-tile--feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; padding: 18px 24px 18px 16px; }
.th .lp-grid--teams > .lp-tile--feature .lp-art { width: 100%; height: 220px; }
.th .lp-grid--teams > .lp-tile--feature .lp-art::before { inset: 0 10%; }
.th .lp-grid--teams > .lp-tile--feature .lp-art img { max-width: 100%; max-height: 232px; }
.th .lp-grid--teams > .lp-tile--feature h3 { font-size: 24px; }

/* ---------- News Feed ---------- */
.th .group-news .th-band-head { flex-wrap: wrap; }
.th .news-filters[hidden], .th .news-filter[hidden] { display: none; }
.th .news-rail-wrap { position: relative; }
.th .news-rail {
  /* positioned, and so is each card: the cards' visually-hidden labels are
     absolute, and with no positioned ancestor inside the scroller they
     resolved against one OUTSIDE it, escaped the scroll and widened the page
     to ~7,000px (the old landing page did the same, hidden by body's
     overflow-x: clip from the reader but not from a full-page render) */
  position: relative;
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 2px 0 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.th .news-card { position: relative; flex: 0 0 262px; scroll-snap-align: start; }
.th .news-card[hidden] { display: none; }
.th .news-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--th-surface-1);
  border: 1px solid var(--th-line-2);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.th .news-card-link:hover { border-color: var(--th-gold-line); background: var(--th-surface-2); }
.th .news-card-link:focus-visible { outline-offset: -3px; }
.th .news-card-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--th-surface-3); }
/* out of flow, so no thumbnail (an X photo is any shape) can stretch a card */
.th .news-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.th .news-card-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
}
.th .news-card-play::after { content: ""; position: absolute; left: 15px; top: 12px; border: 7px solid transparent; border-left: 11px solid #ffffff; border-right: 0; }
.th .news-card-tag {
  position: absolute;
  right: 8px;
  top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
}
.th .news-card-body { display: flex; flex-direction: column; gap: 5px; flex: 1; padding: 10px 12px 12px; }
.th .news-card-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--th-ink-3); }
.th .news-card-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 5px; color: #ffffff; background: #000000; }
.th .news-card-badge--youtube { background: #e1251b; }
.th .news-card-badge svg { width: 11px; height: 11px; stroke: none; }
.th .news-card-author { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--th-ink-2); }
.th .news-card-time { margin-left: auto; white-space: nowrap; }
.th .news-card-text {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--th-ink);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.th .news-card-action { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--th-link); }
.th .news-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.th .news-rail-nav { position: absolute; z-index: 2; top: calc(50% - 40px); background: var(--th-surface-1); box-shadow: var(--th-shadow-pop); }
.th .news-rail-nav:hover { background: var(--th-surface-2); }
.th .news-rail-nav:disabled { display: none; }
.th .news-rail-nav-prev { left: -12px; }
.th .news-rail-nav-next { right: -12px; }

/* ---------- popular builds ---------- */
.th .lp-pop { display: flex; flex-wrap: wrap; gap: 8px; }
.th .lp-pop .lp-chip { height: 40px; padding-right: 15px; font-size: 14px; }
.th .home-popular-links-copy { margin-top: 14px; max-width: 980px; font-size: 13.5px; line-height: 1.6; color: var(--th-ink-3); }
.th .home-popular-links-copy a { color: var(--th-ink-2); text-decoration: underline; text-decoration-color: var(--th-line-3); text-underline-offset: 2px; }
.th .home-popular-links-copy a:hover { color: var(--th-link); text-decoration-color: currentColor; }

/* ---------- about ---------- */
.th .lp-about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.th .lp-panel { position: relative; padding: 20px 22px; border-radius: 18px; background: var(--th-surface-1); border: 1px solid var(--th-line-2); box-shadow: var(--th-shadow-1); }
.th .lp-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.th .lp-points h3 { font-size: 16px; }
.th .lp-points p { margin-top: 5px; font-size: 13.5px; line-height: 1.5; color: var(--th-ink-2); }
.th .lp-points-panel .lp-ctas { margin-top: 18px; }

/* the full snapshot: Herb Cookie beside three headline numbers, then the
   build and site counts in two small clusters */
.th .bento-metrics { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; align-items: center; }
.th .lp-stats-art { width: 92px; height: auto; align-self: center; }
.th .lp-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; min-width: 0; }
.th .metrics-primary-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--th-line-2); }
.th .metric-item { display: flex; flex-direction: column; min-width: 0; }
.th .metric-val { font-family: "CookieRun KR", "Outfit", sans-serif; font-weight: 700; font-size: 20px; line-height: 1.1; color: var(--th-heading); }
.th .metric-item-primary .metric-val { font-size: 28px; }
.th .metric-label { margin-top: 3px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--th-ink-3); }
.th .metrics-cluster-title { margin-bottom: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--th-gold); }
.th .metrics-mini-grid { display: grid; gap: 10px; }
.th .metrics-mini-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.th .metrics-mini-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* text and its two buttons; no portrait here (owner's call, 2026-10-27: it
   stays on /about/) */
.th .lp-me { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.th .lp-me h3 { margin-top: 4px; font-size: 22px; }
.th .lp-me p:not(.th-label) { margin-top: 6px; max-width: 780px; font-size: 14px; line-height: 1.55; color: var(--th-ink-2); }
.th .lp-me .lp-ctas { margin-top: 0; flex-direction: column; align-items: stretch; }

/* ---------- responsive (container queries on the .th root) ---------- */
@container th (max-width: 1180px) {
  .th .lp-announce:not([hidden]) ~ .lp-hero { margin-top: 28px; }
  .th .lp-hero .hero-bg-art { width: 44%; top: -12px; right: 4px; }
  .th .lp-hero-in { max-width: 58%; }
  .th .lp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th .lp-grid--ref { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .th .lp-grid--ref > .lp-tile, .th .lp-grid--ref > .lp-tile--feature { grid-column: auto; }
  .th .lp-grid--ref > .lp-tile:first-child { grid-column: 1 / -1; }
  /* the Tier List drops to an ordinary tile */
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2),
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) { grid-template-columns: 76px minmax(0, 1fr); gap: 14px; min-height: 112px; padding-left: 10px; }
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) .lp-art,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art { width: 76px; height: 88px; }
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) .lp-art img,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art img { max-width: 76px; max-height: 92px; }
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) h3 { font-size: 17px; }
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) p { font-size: 13.5px; }
  /* the Guide Builder stands tall beside the Team Builder, its art over its words */
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) { grid-column: auto; grid-row: span 3; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 12px; padding: 18px 18px 20px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) .lp-art { height: 190px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) .lp-art img { max-height: 200px; }
  .th .lp-about { grid-template-columns: minmax(0, 1fr); }
}
@container th (max-width: 860px) {
  /* the button drops under the copy; the x keeps the corner */
  .th .lp-announce { grid-template-columns: 132px minmax(0, 1fr); padding: 12px 14px 14px 16px; }
  .th .lp-announce-art { grid-row: 1 / span 2; }
  .th .lp-announce-art img { width: 144px; }
  .th .lp-announce-k { padding-right: 36px; }
  .th .lp-announce-go { grid-column: 2; justify-self: start; height: 38px; margin-top: 8px; font-size: 14px; }
  .th .lp-announce-x { position: absolute; top: 6px; right: 6px; }
  .th .lp-hero-in { max-width: none; padding-right: 32px; }
  .th .lp-title { max-width: 56%; font-size: 42px; }
  .th .lp-lede { max-width: 56%; }
  /* the standard crop is as tall as it is wide, so narrower here than the
     wide crop was: it stands beside the title and clears the intro */
  .th .lp-hero .hero-bg-art { width: 41%; top: -14px; right: 0; }
  .th .lp-now { grid-template-columns: minmax(0, 1fr); }
  .th .lp-now-cell + .lp-now-cell { border-left: 0; border-top: 1px dashed var(--th-line-2); }
  .th .lp-now-cell:first-child { border-bottom-left-radius: 0; }
  .th .lp-now-cell:last-child { border-bottom-left-radius: 21px; }
  .th .lp-grid, .th .lp-grid--ref { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th .lp-grid--teams > .lp-tile--feature { grid-row: auto; grid-template-columns: 150px minmax(0, 1fr); }
  .th .lp-grid--teams > .lp-tile--feature .lp-art { height: 150px; }
  .th .lp-grid--teams > .lp-tile--feature .lp-art img { max-height: 160px; }
  /* both builders across again, art beside words */
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) { grid-column: span 2; grid-row: auto; grid-template-columns: 150px minmax(0, 1fr); align-content: normal; gap: 20px; padding: 18px 24px 18px 16px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) .lp-art { height: 150px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(2) .lp-art img { max-height: 160px; }
  .th .lp-grid--live > .lp-tile:first-child { grid-column: 1 / -1; }
  .th .lp-points { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .th .lp-me { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .th .lp-me .lp-ctas { flex-direction: row; }
  .th .news-rail-nav { display: none; }
}
@container th (max-width: 560px) {
  /* a phone: the short line, a smaller button, the art inside the card */
  /* 120px tall at least: the art sits on the card's foot, and a shorter card
     (one line of copy) lifts it into the New tag above it */
  .th .lp-announce { grid-template-columns: 92px minmax(0, 1fr); gap: 2px 12px; margin-top: 16px; min-height: 120px; padding: 10px 10px 12px 12px; border-radius: 16px; }
  .th .lp-announce-art img { left: -6px; bottom: -4px; width: 104px; }
  .th .lp-announce-name { font-size: 17px; }
  .th .lp-announce-d { margin-top: 2px; font-size: 13px; line-height: 1.4; }
  .th .lp-announce-long, .th .lp-announce-soon { display: none; }
  .th .lp-announce-short { display: inline; }
  .th .lp-announce-go { height: 34px; margin-top: 7px; padding: 0 14px; font-size: 13.5px; }
  .th .lp-announce-go::after { border-radius: 16px; }
  .th .lp-announce-x { top: 2px; right: 2px; }
  /* The New tag stands in the room the art leaves above itself, centred on the
     art's 92px column (12px of padding + 46px) and level with the name (owner,
     2026-11-09), so the name has its row to itself. */
  .th .lp-announce-k .th-tag { position: absolute; top: 10px; left: 58px; transform: translateX(-50%); }
  .th .lp-announce:not([hidden]) ~ .lp-hero { margin-top: 18px; }
  .th .lp-hero { margin-top: 14px; border-radius: 20px; }
  .th .lp-hero .th-orn--tl, .th .lp-hero .th-orn--bl { left: 26px; }
  .th .lp-hero .th-orn--tr, .th .lp-hero .th-orn--br { right: 26px; }
  .th .lp-hero-in { padding: 22px 16px 0; }
  .th .lp-hero-in > .th-kicker { max-width: 54%; font-size: 11px; line-height: 1.35; }
  .th .lp-title { max-width: 60%; font-size: 31px; }
  .th .lp-lede { max-width: none; font-size: 15px; }
  .th .lp-hero .hero-bg-art { width: 50%; top: -6px; right: -6px; }
  .th .lp-search { height: 52px; padding-left: 16px; }
  .th .lp-search .th-btn { height: 40px; padding: 0 16px; }
  /* NO sideways scrolling in the hero (owner's call, 2026-10-27: a swipe row
     hides its last items from most readers). The popular builds become a row
     of faces with no names (each link keeps its name, visually hidden, and a
     title), and the quick links drop the Cookie-Dex, whose tile is the first
     thing below the hero. Both wrap rather than scroll if a phone is narrower
     still. */
  .th .lp-popular > .th-label { display: none; }
  .th .lp-popular ul { gap: 6px; }
  .th .lp-popular .lp-chip { height: auto; padding: 0; background: none; border-radius: 50%; }
  .th .lp-popular .lp-chip .th-face { width: 36px; height: 36px; }
  .th .lp-popular .lp-chip:hover .th-face::after { box-shadow: inset 0 0 0 2px var(--th-gold-line); }
  .th .lp-popular .lp-chip-name { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .th .lp-hero .lp-ctas { margin-top: 12px; gap: 8px; }
  .th .lp-hero .lp-ctas .th-btn { height: 36px; padding: 0 14px; }
  .th .lp-hero .lp-ctas .th-btn:first-child { display: none; }
  /* the snapshot on one line (wraps only below ~350px) */
  .th .lp-facts { margin-top: 12px; gap: 2px 12px; font-size: 13px; }
  .th .lp-facts span { white-space: nowrap; }
  .th .lp-now { margin-top: 20px; }
  .th .lp-now-cell { padding: 11px 16px 12px; }
  .th .lp-now-v { font-size: 17px; }
  .th .lp-now-cell:last-child { border-bottom-left-radius: 19px; border-bottom-right-radius: 19px; }

  /* two tiles to a row, each its art and name (the description and tags are
     what the destination page itself says) */
  .th .lp-grid { gap: 10px; }
  .th .lp-grid > .lp-tile:first-child { grid-column: 1 / -1; }
  .th .lp-grid > .lp-tile,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature),
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2),
  .th .lp-grid--teams > .lp-tile--feature {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: start;
    gap: 6px;
    min-height: 0;
    padding: 12px 10px 14px;
    text-align: center;
  }
  .th .lp-grid > .lp-tile .lp-art,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art,
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) .lp-art { width: 72px; height: 78px; }
  .th .lp-grid > .lp-tile .lp-art img,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) .lp-art img,
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) .lp-art img { max-width: 72px; max-height: 82px; }
  .th .lp-grid > .lp-tile:first-child .lp-art { width: 100px; height: 92px; }
  .th .lp-grid > .lp-tile:first-child .lp-art img { max-width: 100px; max-height: 96px; }
  .th .lp-grid > .lp-tile h3,
  .th .lp-grid--ref > .lp-tile:not(.lp-tile--feature) h3,
  .th .lp-grid--ref > .lp-tile--feature:nth-child(2) h3,
  .th .lp-grid--teams > .lp-tile--feature h3 { justify-content: center; font-size: 15px; }
  .th .lp-grid > .lp-tile h3 svg { display: none; }
  .th .lp-grid > .lp-tile :is(p, .lp-meta) { display: none; }
  .th .lp-tile--mode { border-left-width: 1px; border-top: 3px solid rgba(var(--th-m-rgb), 0.85); }
  /* the two builders side by side, a pair at the head of their band */
  .th .lp-grid--teams > .lp-tile--feature:nth-child(n) { grid-column: auto; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 6px; padding: 12px 10px 14px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(n) .lp-art { width: 88px; height: 86px; }
  .th .lp-grid--teams > .lp-tile--feature:nth-child(n) .lp-art img { max-width: 88px; max-height: 90px; }

  .th .group-news .th-band-head { grid-template-areas: "k rule rule rule" "name name name name" "meta meta meta meta" "tools tools tools tools"; }
  .th .group-news .news-filters { grid-area: tools; justify-self: start; margin-top: 10px; }
  .th .news-rail { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .th .news-card { flex-basis: 224px; }

  .th .lp-pop { gap: 6px; }
  .th .lp-pop .lp-chip { height: 36px; padding-right: 12px; font-size: 13px; }
  .th .lp-pop .th-face { width: 28px; height: 28px; }
  .th .lp-panel { padding: 16px; }
  .th .bento-metrics { grid-template-columns: 64px minmax(0, 1fr); align-items: start; }
  .th .lp-stats-art { width: 64px; }
  .th .lp-stats { grid-template-columns: minmax(0, 1fr); }
  .th .metric-item-primary .metric-val { font-size: 22px; }
}
@container th (max-width: 360px) {
  /* the name keeps one line (its New tag stands above the art) */
  .th .lp-announce-name { font-size: 16px; white-space: nowrap; }
  .th .lp-title { font-size: 27px; }
  .th .lp-search .th-btn { padding: 0 13px; }
  /* the narrowest phones: the faces a touch smaller */
  .th .lp-popular .lp-chip .th-face { width: 34px; height: 34px; }
  .th .lp-hero .lp-ctas .th-btn { padding: 0 12px; font-size: 13.5px; }
  .th .lp-facts { gap: 2px 10px; font-size: 12.5px; }
}

@container th (max-width: 300px) {
  /* a 320px phone: the quick links and the snapshot still hold one line */
  .th .lp-hero .lp-ctas { gap: 6px; }
  .th .lp-hero .lp-ctas .th-btn { padding: 0 10px; font-size: 13px; }
  .th .lp-facts { gap: 2px 8px; font-size: 12px; }
  .th .lp-popular ul { gap: 5px; }
  .th .lp-popular .lp-chip .th-face { width: 32px; height: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .th .lp-tile, .th .lp-tile h3 svg { transition: none; }
  .th .lp-tile:hover { transform: none; }
}

/* ---------- light ---------- */
/* the frame is a white card (light-theme.spec.mjs reads its colour) */
:root[data-theme="light"] .th .lp-hero {
  background-color: #ffffff;
  background-image:
    radial-gradient(640px 420px at 78% 38%, rgba(106, 63, 220, 0.1), transparent 70%),
    radial-gradient(520px 360px at 94% 82%, rgba(255, 150, 70, 0.1), transparent 70%),
    linear-gradient(180deg, #ffffff, #faf6ff);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6), inset 0 0 0 5px var(--th-gold-faint), var(--th-shadow-2);
}
:root[data-theme="light"] .th .lp-hero .hero-bg-art { filter: none; }
:root[data-theme="light"] .th .lp-announce {
  background:
    radial-gradient(460px 170px at 5% 50%, rgba(240, 170, 60, 0.14), transparent 72%),
    #ffffff;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.6), 0 3px 0 var(--th-ledge);
}
:root[data-theme="light"] .th .lp-search { background: #ffffff; box-shadow: inset 0 0 0 1px var(--th-line-3), 0 3px 0 var(--th-ledge); }
:root[data-theme="light"] .th .lp-tile,
:root[data-theme="light"] .th .lp-panel,
:root[data-theme="light"] .th .news-card-link { box-shadow: 0 3px 0 var(--th-ledge); }
:root[data-theme="light"] .th .news-card-badge--x { background: #14161d; }

/* The light crops are the dark artwork with its glow margin trimmed: 100px
   off every side, the characters at the same size and in the same place.
   Drawn at 100% they would come out larger and shifted, so each is set back
   to the dark crop's footprint. Percentage margins resolve against the
   picture's WIDTH on all four sides, which is exactly what makes one number
   right for top and bottom too: 100px of a 2291px-wide crop is 4.365%. */
:root[data-theme="light"] .th .lp-hero .hero-bg-art img {
  width: 91.27%; /* 2091 / 2291 */
  margin: 4.365%; /* 100 / 2291 */
}

