/* GCC Wrapped Social. Colours, type and art come from the theme tokens (--x-*), set by
   theme.js from public/themes/. Defaults here are the GCC theme, for before it loads.
   No pill-shaped tags (DESIGN.md): qualifiers are plain text. */
:root {
  --x-bg: #f5f5f6; --x-surface: #fff; --x-ground-muted: #efeff1; --x-ink: #1e1e1e; --x-muted: #504f54;
  --x-faint: #6d6c71; --x-rule: #e1e1e4; --x-rule-strong: #cdcdd2; --x-accent: #a60000; --x-accent-hover: #8a0000;
  --x-accent-ink: #fff; --x-accent-soft: #f7e8e8; --x-bar: #a60000; --x-bar-ink: #fff; --x-bar-hover: rgba(255,255,255,.12);
  --x-bar-line: rgba(255,255,255,.4); --x-ok: #53682b; --x-bad: #cc0000; --x-bad-ink: #fff; --x-info: #005a8b;
  --x-scrim: rgba(30,30,30,.45); --x-shadow: 0 1px 2px rgba(30,30,30,.05), 0 2px 8px rgba(30,30,30,.04);
  --x-shadow-pop: 0 16px 48px rgba(30,30,30,.2);
  --x-sans: "Instrument Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --x-display: "Host Grotesk", "Instrument Sans", system-ui, sans-serif;
  --x-radius: 12px; --x-radius-control: 6px; --x-speed: 160ms; --x-ease: ease-out;
  --x-page-art: none; --x-header-art: none; --x-art-rendering: auto;
  --gap: 16px; --pad: 16px; --max: 1200px;
  color-scheme: light dark;
}
@media (min-width: 760px) { :root { --gap: 20px; --pad: 28px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font: 400 16px/1.5 var(--x-sans); color: var(--x-ink);
  background-color: var(--x-bg); background-image: var(--x-page-art, none); background-size: 192px 192px;
  image-rendering: var(--x-art-rendering);
}
img, canvas { image-rendering: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--x-display); line-height: 1.15; }
p { margin: 0; }
a { color: var(--x-accent); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--x-muted); font-size: 14px; }
:focus-visible { outline: 3px solid var(--x-accent); outline-offset: 2px; }

/* ---- top bar, with the theme's header art ---- */
.bar { position: relative; background: var(--x-bar); color: var(--x-bar-ink); overflow: hidden; }
.bar__art {
  position: absolute; inset: 0; background-image: var(--x-header-art, none); background-repeat: no-repeat;
  background-size: auto 100%; background-position: var(--x-header-art-position-narrow, left center); image-rendering: var(--x-art-rendering);
}
@media (min-width: 1024px) { .bar__art { background-size: cover; background-position: center; } }
.bar__in {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); min-height: 84px;
  padding-top: env(safe-area-inset-top);
}
.bar__brand {
  color: var(--x-bar-ink); text-decoration: none; font: 700 20px/1 var(--x-display); letter-spacing: .01em;
  text-shadow: 0 1px 3px rgba(0,0,0,.55); padding: 6px 10px; margin-left: -10px; border-radius: var(--x-radius-control);
}
.bar__tools { display: flex; gap: 8px; align-items: center; }
.control--bar, .btn--bar {
  background: rgba(0,0,0,.35); color: var(--x-bar-ink); border: 1px solid var(--x-bar-line);
  backdrop-filter: blur(4px);
}
.btn--bar:hover { background: rgba(0,0,0,.5); }

/* ---- page ---- */
.page { max-width: var(--max); margin: 0 auto; padding: calc(var(--pad) * 1.25) var(--pad) 64px; display: grid; gap: calc(var(--gap) * 2); }
.hero { display: grid; gap: 8px; padding: var(--pad); background: var(--x-surface); border: 1px solid var(--x-rule); border-radius: var(--x-radius); box-shadow: var(--x-shadow); }
.hero__eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--x-muted); }
.hero__title { font-size: clamp(30px, 6vw, 52px); font-weight: 600; }
.hero__title em { font-style: normal; color: var(--x-accent); }
.hero__lead { font-size: 17px; color: var(--x-muted); max-width: 60ch; }

.section { display: grid; gap: var(--gap); min-width: 0; }
.page > *, .grid > * { min-width: 0; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.section__head h2 { font-size: clamp(22px, 3.4vw, 28px); font-weight: 600; }
.section__aside { color: var(--x-muted); font-size: 14px; max-width: 60ch; }
.note { color: var(--x-muted); font-size: 14px; }

.grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; align-items: stretch; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; gap: 12px; padding: var(--pad); background: var(--x-surface); border: 1px solid var(--x-rule); border-radius: var(--x-radius); box-shadow: var(--x-shadow); min-width: 0; }
.card__title { font-size: 19px; font-weight: 600; }
.card__sub { color: var(--x-muted); font-size: 14px; margin-top: 2px; }
.card__sub-title { font: 600 13px/1.3 var(--x-sans); letter-spacing: .05em; text-transform: uppercase; color: var(--x-muted); margin-top: 8px; }
.card__body, .card__content { display: grid; gap: 10px; align-content: start; }
.big { font-size: 18px; }
.big strong { font: 700 34px/1 var(--x-display); color: var(--x-accent); margin-right: 4px; }

/* row lists */
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--x-rule); border-radius: calc(var(--x-radius) - 4px); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 48px; }
.row + .row { border-top: 1px solid var(--x-rule); }
.row--you { background: var(--x-accent-soft); }
.row__lead { font-weight: 700; color: var(--x-muted); min-width: 2.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.row__main { flex: 1; min-width: 0; display: grid; }
.row__title { font-weight: 600; overflow-wrap: anywhere; }
.row__sub { color: var(--x-muted); font-size: 13px; overflow-wrap: anywhere; }
.row__end { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* states */
.state { color: var(--x-muted); padding: 12px 0; }
.state--error { color: var(--x-bad); }
.state--loading::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 2px solid var(--x-rule-strong); border-top-color: var(--x-accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .state--loading::before { animation: none; } }

/* controls */
.btn, .control {
  font: 600 15px/1 var(--x-sans); min-height: 40px; padding: 0 14px; border-radius: var(--x-radius-control);
  border: 1px solid var(--x-rule-strong); background: var(--x-surface); color: var(--x-ink); cursor: pointer;
  transition: background var(--x-speed) var(--x-ease), border-color var(--x-speed) var(--x-ease);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
.btn:hover { border-color: var(--x-ink); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--primary { background: var(--x-accent); border-color: var(--x-accent); color: var(--x-accent-ink); }
.btn--primary:hover:not(:disabled) { background: var(--x-accent-hover); border-color: var(--x-accent-hover); }
.btn--danger { color: var(--x-bad); border-color: currentColor; justify-self: start; }
.btn--small { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn--primary.btn--small, .card .btn--primary { justify-self: start; }
.control { font-weight: 500; cursor: auto; }
select.control { cursor: pointer; padding-right: 8px; }
.linkish { background: none; border: 0; padding: 4px; color: var(--x-accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkish:disabled { color: var(--x-muted); text-decoration: none; cursor: default; }
.inline { display: flex; gap: 8px; }
.inline .control { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .12em; font-family: ui-monospace, monospace; }
.code { font-family: ui-monospace, monospace; letter-spacing: .12em; font-size: 17px; margin: 0 6px; }
.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 4px; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--x-accent); margin: 0; }

/* ---- the cards strip: scrolls left to right, snaps to each card ---- */
.strip { position: relative; min-width: 0; }
.strip__list {
  list-style: none; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad) 16px;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(72vw, 300px); gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad); overscroll-behavior-x: contain;
  scrollbar-width: thin;
}
@media (min-width: 760px) { .strip__list { grid-auto-columns: 280px; } }
@media (min-width: 1200px) { .strip__list { margin: 0; padding-left: 0; padding-right: 0; scroll-padding: 0; } }
.strip__item { scroll-snap-align: start; display: grid; grid-template-rows: auto auto; align-content: start; gap: 8px; min-width: 0; }
.strip__img { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: var(--x-radius); box-shadow: var(--x-shadow); background: var(--x-ground-muted); display: block; }
.strip__foot { display: flex; align-items: center; gap: 8px; }
.strip__label { flex: 1; font-size: 14px; font-weight: 600; color: var(--x-muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.strip__arrow {
  display: none; position: absolute; top: calc(50% - 40px); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--x-rule-strong); background: var(--x-surface); color: var(--x-ink); font-size: 26px; line-height: 1;
  box-shadow: var(--x-shadow-pop); cursor: pointer;
}
.strip__arrow:disabled { opacity: 0; pointer-events: none; }
.strip__arrow--prev { left: -8px; } .strip__arrow--next { right: -8px; }
@media (hover: hover) and (min-width: 760px) { .strip__arrow { display: grid; place-items: center; } }

/* head-to-head */
.vs__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; margin-top: 8px; }
.vs__table caption { text-align: left; font: 600 16px var(--x-display); padding-bottom: 6px; }
.vs__table th, .vs__table td { padding: 8px 6px; text-align: left; border-top: 1px solid var(--x-rule); font-size: 14px; }
.vs__table thead th { border-top: 0; color: var(--x-muted); font-weight: 600; }
.vs__table tbody th { font-weight: 500; color: var(--x-muted); }
.vs__table .is-win { font-weight: 700; color: var(--x-accent); }

/* consent dialog */
.dialog { border: 0; padding: 0; border-radius: var(--x-radius); background: var(--x-surface); color: var(--x-ink); box-shadow: var(--x-shadow-pop); width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); }
.dialog::backdrop { background: var(--x-scrim); backdrop-filter: blur(2px); }
.consent { display: grid; gap: 14px; padding: 24px; }
.consent h2 { font-size: 26px; font-weight: 600; }
.consent__intro { font-weight: 500; }
.consent__who { padding: 10px 12px; background: var(--x-ground-muted); border-radius: var(--x-radius-control); font-size: 14px; }
.consent__part h3 { font: 600 16px/1.3 var(--x-sans); margin-bottom: 4px; }
.consent__part p, .consent__part li { color: var(--x-muted); font-size: 15px; }
.consent__part ul { margin: 0; padding-left: 20px; }
.consent__check { display: flex; gap: 10px; align-items: center; font-weight: 600; padding-top: 8px; border-top: 1px solid var(--x-rule); }
.consent__check input { width: 20px; height: 20px; accent-color: var(--x-accent); }
.consent__actions { display: flex; flex-wrap: wrap-reverse; gap: 10px; justify-content: flex-end; position: sticky; bottom: -24px; background: var(--x-surface); padding: 12px 0 0; }
@media (max-width: 520px) { .consent__actions .btn { flex: 1 1 100%; } .consent { padding: 18px; } }

/* narrow screens: keep the bar on one line */
.bar__brand { white-space: nowrap; }
@media (max-width: 520px) {
  .bar__in { min-height: 64px; gap: 8px; }
  .bar__brand { font-size: 17px; }
  .control--bar { max-width: 128px; min-height: 36px; padding: 0 6px; font-size: 13px; text-overflow: ellipsis; }
  .btn--bar { min-height: 36px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
}
