/* Pick2Stock League: design system. Reset, type, layout primitives, the fixed components from
   DESIGN.md (.btn, .ulink, .card, .pick, .steps, .icon-tile, .table, .empty) and the shell
   (header, nav, menu sheet, session pill, footer, toasts, loading and error states).
   View-specific styling lives in views.css; the landing page in home.css; motion in motion.css. */

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }

html, body { background: var(--bg); }
body {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-2);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01' off;
}
::selection { background: rgba(255, 255, 255, .35); color: var(--text); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
:focus:not(:focus-visible) { outline: none; }

/* ---------- type ---------- */

.h-hero, .h-1, .h-2, .h-3, .page-title {
  font-family: var(--f-sans);
  font-weight: 700;
  color: var(--text);
  letter-spacing: var(--track-head);
  line-height: var(--lh-head);
  text-wrap: balance;
  font-kerning: normal;
}
.h-hero { font-size: var(--t-hero); line-height: .95; }
.h-1, .page-title { font-size: var(--t-h1); }
.h-2 { font-size: var(--t-h2); line-height: 1; }
.h-3 { font-size: var(--t-h3); letter-spacing: -0.035em; line-height: 1.05; }

.eyebrow, .kicker {
  display: block;
  font-size: var(--t-eyebrow);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--muted);
}
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--text-2); font-weight: 400; max-width: 40rem; text-wrap: pretty; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: var(--t-sm); }
strong, b { font-weight: 600; color: var(--text); }

.num, .mono, .tnum, [data-live], [data-until], .cd {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}
.num { font-weight: 600; color: var(--text); }
.mono, .addr { font-family: var(--f-sans); font-weight: 500; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
code, kbd { font-family: var(--f-sans); font-variant-numeric: tabular-nums; font-size: .95em; color: var(--text); }

.sr-only, .visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */

.container, .wrap { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); border-top: 1px solid var(--line); position: relative; }
.section--alt { background: var(--bg-2); }
.hairline { height: 1px; background: var(--line); border: 0; margin: 0; }
.stack > * + * { margin-top: var(--sp-4); }

.section-head { display: grid; gap: var(--sp-5); align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head__main { display: grid; gap: 18px; max-width: 44rem; }
.section-head__aside { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr auto; }
  .section-head__aside { justify-content: flex-end; padding-bottom: 6px; }
}

/* ---------- links: the underline draws across on hover ---------- */

.ulink,
:where(p, li, dd, td, th, figcaption, .prose, .site-footer) a:not([class]),
.site-nav__link,
.footer-links a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1px;
  padding-bottom: 2px;
  transition: background-size var(--dur-link) var(--ease-soft), color var(--dur) var(--ease-soft);
}
.ulink:hover, .ulink:focus-visible,
:where(p, li, dd, td, th, figcaption, .prose, .site-footer) a:not([class]):hover,
:where(p, li, dd, td, th, figcaption, .prose, .site-footer) a:not([class]):focus-visible,
.site-nav__link:hover, .site-nav__link:focus-visible,
.footer-links a:hover, .footer-links a:focus-visible {
  background-size: 100% 1px;
  color: var(--text);
}
:where(p, li, dd, td, figcaption, .prose) a:not([class]) { color: var(--text); }
.ulink { color: var(--text); font-weight: 500; }
.ulink--arrow { display: inline-flex; align-items: center; gap: 8px; background-position: 0 100%; }
.ulink--arrow svg { transition: translate var(--dur) var(--ease-out); }
.ulink--arrow:hover svg { translate: 3px 0; }

/* ---------- buttons: frosted glass pills ---------- */

.btn {
  --btn-bg: var(--surface-2);
  --btn-bd: var(--line-2);
  --btn-blur: 14px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: 1px solid var(--btn-bd);
  background-color: var(--btn-bg);
  background-image: none;
  color: var(--text);
  font-family: var(--f-sans);
  font-size: .9375rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition:
    scale var(--dur) ease-out,
    filter var(--dur) ease-out,
    background-color var(--dur) ease-out,
    border-color var(--dur) ease-out,
    -webkit-backdrop-filter var(--dur) ease-out,
    backdrop-filter var(--dur) ease-out;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:hover {
  --btn-bg: #232323;
  --btn-bd: rgba(255, 255, 255, .26);
  scale: 1.03;
}
.btn:active { scale: .98; transition-duration: 90ms; }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-pill); }
.btn svg { width: 16px; height: 16px; flex: none; }

/* the only glass left: the hero button over the film (user, 2026-09-20) */
.hero__btn {
  --btn-bg: var(--glass);
  --btn-bd: var(--glass-bd);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, 0) 55%);
  -webkit-backdrop-filter: blur(var(--btn-blur)) saturate(1.2);
  backdrop-filter: blur(var(--btn-blur)) saturate(1.2);
  box-shadow: inset 0 1px 0 var(--glass-hi), inset 0 -1px 0 rgba(255, 255, 255, .03), var(--glass-shadow);
}
.hero__btn:hover { --btn-blur: 10px; --btn-bg: rgba(255, 255, 255, .12); filter: brightness(1.12); }
/* the primary keeps a brighter fill so the two still read as first and second */
.hero__btn.btn--primary {
  --btn-bg: rgba(255, 255, 255, .22);
  --btn-bd: rgba(255, 255, 255, .5);
  color: var(--text);
  -webkit-backdrop-filter: blur(var(--btn-blur)) saturate(1.2);
  backdrop-filter: blur(var(--btn-blur)) saturate(1.2);
  background-image: linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), var(--glass-shadow);
}
.hero__btn.btn--primary:hover { --btn-bg: rgba(255, 255, 255, .3); --btn-bd: rgba(255, 255, 255, .7); }

/* user, 2026-09-17: "replace any orange buttons/glows make them white/grey instead". The primary
   button is now a solid near-white pill with dark text; no ember tint and no glow. */
.btn--primary {
  --btn-bg: var(--text);
  --btn-bd: rgba(255, 255, 255, .86);
  background-image: linear-gradient(180deg, #ffffff, #e4e4e4);
  color: #0a0a0a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.btn--primary:hover { --btn-bd: #ffffff; filter: brightness(1.04); }
.btn--quiet {
  --btn-bg: transparent;
  --btn-bd: var(--line-2);
  background-image: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: var(--text-2);
}
.btn--quiet:hover { --btn-bd: rgba(255, 255, 255, .28); color: var(--text); }
.btn--sm { min-height: 36px; padding: 0 16px; font-size: .875rem; }
.btn--lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn--block { display: flex; width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* old button names, kept so any markup still carrying them renders in the new system */
.btn-ink { --btn-bg: var(--text); --btn-bd: rgba(255, 255, 255, .86); color: #0a0a0a; background-image: linear-gradient(180deg, #ffffff, #e4e4e4); }
.btn-quiet { --btn-bg: transparent; --btn-bd: var(--line-2); box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn-block { display: flex; width: 100%; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hero__btn { background-color: var(--glass-solid); }
  .btn--primary, .btn-ink { background-color: #f2f2f2; }
  .btn--quiet, .btn-quiet { background-color: transparent; }
}

/* ---------- cards ---------- */

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  transition: scale var(--dur) ease-out, border-color var(--dur) ease-out, background-color var(--dur) ease-out;
}
.card:hover { scale: 1.01; border-color: var(--line-2); }
.card--flat:hover { scale: 1; border-color: var(--line); }
.card--pad { padding: clamp(20px, 3vw, 32px); }

/* ---------- icon tile ---------- */

.icon-tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: var(--r-tile);
  border: 1px solid var(--glass-bd);
  background: var(--glass) linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, 0));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
  color: var(--text);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.icon-tile svg { width: 22px; height: 22px; overflow: visible; }
.icon-tile--ember { color: var(--ember-2); border-color: var(--ember-line); background-color: var(--ember-tint); }

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.step {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "title" "text";
  align-content: start;
  column-gap: var(--sp-4);
  padding: 36px 0 40px;
  transition: scale var(--dur) ease-out;
}
.step + .step { border-top: 1px solid var(--line); }
.step__n {
  grid-area: n;
  font-size: clamp(2.5rem, 2rem + 1.6vw, 3.25rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.step__top { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.step__title { grid-area: title; margin-top: 20px; font-size: 1.125rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.05; color: var(--text); }
.step__text { grid-area: text; margin-top: 12px; color: var(--muted); line-height: 1.65; max-width: 34rem; }
.step:hover { scale: 1.01; }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 44px 32px 52px; }
  .step + .step { border-top: 0; border-left: 1px solid var(--line); }
}

/* ---------- pick toggles ---------- */

.pick {
  --pick-c: var(--text-2);
  --pick-tint: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  padding: 0 24px;
  border-radius: var(--r-input);
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  transition: scale var(--dur) ease-out, border-color var(--dur) ease-out, background-color var(--dur) ease-out, color var(--dur) ease-out;
}
.pick::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--pick-c);
  background: transparent center / 12px 12px no-repeat;
  transition: background-color var(--dur) ease-out, border-color var(--dur) ease-out;
}
.pick--yes { --pick-c: var(--yes); --pick-tint: var(--yes-tint); }
.pick--no { --pick-c: var(--no); --pick-tint: var(--no-tint); }
.pick:hover { scale: 1.02; border-color: var(--pick-c); }
.pick:active { scale: .98; }
.pick[aria-pressed="true"] { background: var(--pick-tint); border-color: var(--pick-c); color: var(--text); }
.pick[aria-pressed="true"]::before {
  background-color: var(--pick-c);
  border-color: var(--pick-c);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.3l2.3 2.3 4.8-5' fill='none' stroke='%230b0a0a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.pick[disabled], .pick[aria-disabled="true"] { opacity: .45; cursor: not-allowed; scale: 1; }

/* ---------- chips, badges, live dot ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03);
  color: var(--text-2);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .01em;
  white-space: nowrap;
}
.chip svg { width: 13px; height: 13px; }
.chip--yes, .chip-yes { color: var(--yes); border-color: var(--yes-line); background: var(--yes-tint); }
.chip--no, .chip-no { color: var(--no); border-color: var(--no-line); background: var(--no-tint); }
.chip--ember, .chip-live, .chip-open { color: var(--ember-2); border-color: var(--ember-line); background: var(--ember-tint); }
.chip--example { color: var(--ember-2); border-color: rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .08); text-transform: uppercase; letter-spacing: .12em; font-size: .6875rem; }

.live-dot {
  position: relative;
  display: inline-block;
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ember);
}
.ticker-badge {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 8px;
  border-radius: var(--r-tile);
  border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #202020, #171717);
  color: var(--text);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* ---------- tables ---------- */

.table-wrap { width: 100%; overflow-x: auto; }
/* wide screens: the header sticks to the page, so the wrapper must not clip vertically (2026-09-20) */
@media (min-width: 720px) { .table-wrap { overflow-x: clip; overflow-y: visible; } }
.table { width: 100%; font-variant-numeric: tabular-nums; }
.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: var(--t-eyebrow);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.table td { padding: 18px 16px; border-bottom: 1px solid var(--line); color: var(--text-2); vertical-align: middle; }
.table tbody tr { transition: scale var(--dur) ease-out, background-color var(--dur) ease-out; transform-origin: center; }
.table tbody tr:hover { background: rgba(255, 255, 255, .025); scale: 1.005; }
.table .is-num, .table td.num, .table th.num { text-align: right; }
.table td.num { color: var(--text); font-weight: 600; }
@media (min-width: 720px) {
  .table thead th { position: sticky; top: var(--header-h); z-index: 1; }
}
@media (max-width: 719px) {
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack, .table--stack tbody, .table--stack tr, .table--stack td { display: block; width: 100%; }
  .table--stack tr { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .table--stack td { padding: 0; border: 0; }
  .table--stack td[data-label]::before { content: attr(data-label) " "; color: var(--faint); font-size: .75rem; }
}

/* ---------- empty, loading, error states ---------- */

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: clamp(32px, 6vw, 56px) 0;
  text-align: center;
}
.empty .icon-tile { margin-bottom: 8px; }
.empty__title { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.035em; line-height: 1.2; color: var(--text); }
.empty__text { max-width: 26rem; font-size: .9375rem; color: var(--muted); line-height: 1.6; }
.empty .btn { margin-top: 14px; }

.state { display: grid; justify-items: start; gap: 14px; padding-block: 48px; }
.state-loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9375rem; }
.state-body { color: var(--muted); max-width: 36rem; }
.state-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.view-shell-state { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding: clamp(48px, 10vw, 120px) var(--gutter); min-height: 50vh; }

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--line-2);
  border-top-color: var(--ember);
  animation: p2s-spin .8s linear infinite;
}
@keyframes p2s-spin { to { transform: rotate(360deg); } }

.skeleton, .sk {
  display: block;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04) 0%, rgba(255, 255, 255, .08) 50%, rgba(255, 255, 255, .04) 100%) 0 0 / 200% 100%;
  animation: p2s-shimmer 1.6s linear infinite;
}
@keyframes p2s-shimmer { to { background-position: -200% 0; } }

.is-loading { color: var(--faint); }
.is-unavailable { color: var(--muted); }

/* ---------- shell: skip link ---------- */

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  translate: 0 -160%;
  transition: translate var(--dur) var(--ease-out);
}
.skip-link:focus { translate: 0 0; }

/* ---------- shell: header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background-color 300ms ease, border-color 300ms ease, -webkit-backdrop-filter 300ms ease, backdrop-filter 300ms ease;
  border-bottom: 1px solid transparent;
  background: rgba(10, 10, 10, 0);
}
.site-header.is-solid, .site-header[data-menu="open"] {
  background: rgba(10, 10, 10, .72);
  border-bottom-color: rgba(255, 255, 255, .07);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  backdrop-filter: blur(18px) saturate(1.3);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header.is-solid, .site-header[data-menu="open"] { background: rgba(10, 10, 10, .96); }
}
.site-header__inner {
  height: 100%;
  width: 100%;
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
}
@media (min-width: 1000px) {
  .site-header__inner { grid-template-columns: 1fr auto 1fr; }
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; justify-self: start; }
/* the user's logo: assets/img/logo-mark.png, white line mark on transparent (user, 2026-09-20) */
.brand__mark { width: 30px; height: 30px; flex: none; object-fit: contain; transition: translate var(--dur) var(--ease-out); }
.brand:hover .brand__mark { translate: 0 -1.5px; }
.brand__name { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.03em; }

.site-nav__list { display: flex; align-items: center; gap: 30px; }
.site-nav__link {
  position: relative;
  font-size: .9375rem;
  font-weight: 500;
  color: rgba(242, 242, 242, .78);
  white-space: nowrap;
}
.site-nav__link[aria-current="page"] { color: var(--text); background-size: 100% 1px; }
/* user, 2026-09-18: no dot above the active link; the underline alone marks it */

.site-header__end { display: flex; align-items: center; justify-content: flex-end; gap: 10px; justify-self: end; }

.nav-toggle {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  transition: scale var(--dur) ease-out, background-color var(--dur) ease-out, border-color var(--dur) ease-out;
}
.nav-toggle:hover { scale: 1.04; filter: brightness(1.12); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 1px;
  background: var(--text);
  transition: translate 260ms var(--ease-out), rotate 260ms var(--ease-out), opacity 200ms;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { translate: 0 -5px; }
.nav-toggle__bars::after { translate: 0 5px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { translate: 0 0; rotate: 45deg; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { translate: 0 0; rotate: -45deg; }

/* mobile: the nav becomes a sheet under the header */
@media (max-width: 999px) {
  .site-nav {
    position: fixed;
    top: calc(var(--header-h) + 8px);
    left: 12px;
    right: 12px;
    z-index: 49;
    padding: 10px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(17, 17, 17, .86);
    -webkit-backdrop-filter: blur(22px) saturate(1.3);
    backdrop-filter: blur(22px) saturate(1.3);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7);
    opacity: 0;
    visibility: hidden;
    translate: 0 -8px;
    scale: .98;
    transform-origin: top center;
    transition: opacity 240ms ease, translate 320ms var(--ease-out), scale 320ms var(--ease-out), visibility 0s linear 320ms;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; translate: 0 0; scale: 1; transition-delay: 0s; }
  .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav__list li + li { border-top: 1px solid rgba(255, 255, 255, .06); }
  .site-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px;
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    background-image: none;
  }
  .site-nav__link::after {
    content: "";
    width: 8px;
    height: 8px;
    border-top: 1.5px solid var(--muted);
    border-right: 1.5px solid var(--muted);
    rotate: 45deg;
  }
  .site-nav .site-nav__link { opacity: 0; translate: 0 6px; transition: opacity 280ms ease, translate 380ms var(--ease-out); }
  .site-nav.is-open .site-nav__link { opacity: 1; translate: 0 0; }
  .site-nav.is-open li:nth-child(2) .site-nav__link { transition-delay: 30ms; }
  .site-nav.is-open li:nth-child(3) .site-nav__link { transition-delay: 60ms; }
  .site-nav.is-open li:nth-child(4) .site-nav__link { transition-delay: 90ms; }
  .site-nav.is-open li:nth-child(5) .site-nav__link { transition-delay: 120ms; }
  .site-nav.is-open li:nth-child(6) .site-nav__link { transition-delay: 150ms; }
  .menu-scrim {
    position: fixed; inset: 0; z-index: 48; background: rgba(4, 4, 4, .5);
    opacity: 0; visibility: hidden; transition: opacity 240ms ease, visibility 0s linear 240ms;
  }
  .site-header[data-menu="open"] ~ .menu-scrim { opacity: 1; visibility: visible; transition-delay: 0s; }
}
@media (min-width: 1000px) {
  .nav-toggle, .menu-scrim { display: none; }
}

/* ---------- shell: session pill and panel ---------- */

.session-slot { position: relative; }
.session { position: relative; }
.session-btn { max-width: 220px; }
.session-btn .session-btn-label { overflow: hidden; text-overflow: ellipsis; }
.session-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--yes); box-shadow: 0 0 8px rgba(126, 224, 184, .7); flex: none; }
@media (max-width: 480px) { .session-btn { max-width: 140px; padding-inline: 14px; } }

.session-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 60;
  width: min(340px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(19, 19, 19, .92);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .75);
  color: var(--text-2);
  animation: p2s-pop 260ms var(--ease-out);
}
@media (max-width: 999px) { .session-panel { position: fixed; top: calc(var(--header-h) + 8px); right: 12px; } }
@keyframes p2s-pop { from { opacity: 0; translate: 0 -6px; scale: .98; } }
.session-panel-title { font-size: 1rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.session-panel-note, .session-panel-empty { font-size: .875rem; color: var(--muted); line-height: 1.55; }
.session-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.session-handle { font-weight: 600; color: var(--text); }
.session-address { color: var(--muted); font-size: .875rem; }
.session-links { display: grid; gap: 2px; }
.session-links a { display: block; padding: 8px 0; color: var(--text-2); }
.session-error { font-size: .875rem; color: var(--danger); }
.wallet-list { display: grid; gap: 8px; }
.wallet-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border-radius: var(--r-input);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  transition: scale var(--dur) ease-out, border-color var(--dur) ease-out, background-color var(--dur) ease-out;
}
.wallet-btn:hover { scale: 1.02; border-color: rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .06); }
.wallet-icon { width: 24px; height: 24px; border-radius: 2px; flex: none; }
.wallet-blank { background: var(--line-2); }

/* ---------- shell: main and footer ---------- */

/* at least a full screen, so the footer never jumps up while pages change (user, 2026-09-18) */
.app-main { flex: 1 0 auto; width: 100%; min-height: 100vh; min-height: 100svh; padding-top: var(--header-h); outline: none; }
/* the old page fades out untouched before the swap (src/app.js route) */
.app-main > .view { transition: opacity 160ms ease; }
.app-main > .view.is-leaving { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .app-main > .view { transition: none; } }
.app-main[data-view="home"] { padding-top: 0; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding-block: 72px 40px; }
.site-footer__grid { display: grid; gap: 40px; }
.site-footer__about { max-width: 26rem; display: grid; gap: 18px; }
.site-footer__about p { font-size: .9375rem; color: var(--muted); line-height: 1.65; }
.footer-col h2 { margin-bottom: 18px; }
.footer-links { display: grid; gap: 14px; }
.footer-links a { color: var(--text-2); font-size: .9375rem; }
.site-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  margin-top: 56px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: .875rem;
  color: var(--text-2);
}
.site-footer__meta .eyebrow { display: inline; margin-right: 10px; color: var(--faint); }
.footer-notes { margin-top: 24px; display: grid; gap: 6px; max-width: 58rem; }
.footer-notes li { font-size: .8125rem; color: var(--faint); line-height: 1.6; }
@media (min-width: 800px) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- toasts ---------- */

.toast-host {
  position: fixed;
  z-index: 90;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  translate: -50% 0;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 12px 12px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(22, 22, 22, .92);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .8);
  color: var(--text);
  animation: p2s-toast 320ms var(--ease-out);
}
.toast-text { flex: 1; font-size: .9375rem; line-height: 1.45; }
.toast-success { border-color: var(--yes-line); }
.toast-error { border-color: var(--no-line); }
.toast-close { flex: none; min-height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); font-size: .8125rem; font-weight: 600; color: var(--text-2); }
.toast-close:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.toast.is-leaving { opacity: 0; translate: 0 8px; transition: opacity 180ms, translate 180ms; }
@keyframes p2s-toast { from { opacity: 0; translate: 0 12px; } }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .btn:hover, .btn:active, .card:hover, .step:hover, .pick:hover, .pick:active,
  .table tbody tr:hover, .wallet-btn:hover, .nav-toggle:hover { scale: 1; }
  .spinner, .skeleton, .sk { animation-duration: 2.4s; }
  .site-nav, .site-nav .site-nav__link, .session-panel, .toast { transition: none; animation: none; }
}

/* ---------- x-scroll sliders (src/ui/xscroll.js) ----------
   User, 2026-09-18: How it works, Rules in brief and the rulebook are sliders on the x axis that
   scrolling down moves through. Pinned mode: the pin sticks under the header while the track slides.
   Native mode (narrow, reduced motion, or too tall to pin): a sideways swipe with snap points. */
.xs { position: relative; }
.xs__pin { display: grid; align-content: center; gap: clamp(28px, 4.5vh, 52px); padding-block: var(--section-y); }
.xs__head .section-head, .xs__head .vsec__head { margin-bottom: 0; }
/* full page width; src/ui/xscroll.js sets the exact width and offset without the scrollbar */
.xs__viewport { width: 100vw; margin-left: calc(50% - 50vw); overflow: hidden; }
.xs__track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; will-change: transform; }
/* user, 2026-09-18: "make the boxes bigger" (was clamp(280px, 27vw, 380px)) */
.xs__track > * { flex: 0 0 var(--xs-w, clamp(320px, 36vw, 540px)); min-width: 0; }
.xs__progress { position: relative; height: 2px; overflow: hidden; background: var(--line); }
.xs__progress i { position: absolute; inset: 0; background: var(--text); transform-origin: left center; transform: scaleX(var(--xs-p, 0)); }

.xs.is-pinned .xs__pin {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  padding-block: clamp(24px, 5vh, 56px);
  /* clip vertically only, so a slider inside a content-width page still runs to the screen edges */
  overflow-x: visible;
  overflow-y: clip;
}

.xs.is-native .xs__viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.xs.is-native .xs__viewport::-webkit-scrollbar { display: none; }
.xs.is-native .xs__track > * { scroll-snap-align: start; }
@media (max-width: 719px) {
  .xs__track > * { flex-basis: min(86vw, 380px) !important; }
}

/* one slide pattern for every slider: a hairline between slides, generous side padding */
.xs-slide { display: grid; align-content: start; gap: 14px; padding: 10px clamp(28px, 3.4vw, 56px); border-left: 1px solid var(--line); }
.xs__track > .xs-slide:first-child { padding-left: 0; border-left: 0; }
.section.xs { padding-block: 0; }

/* ---------- header: X logo and contract address (user, 2026-09-18; values in src/brand.js) ---------- */
.hdr-x {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  transition: scale var(--dur) ease-out, border-color var(--dur) ease-out, background-color var(--dur) ease-out;
}
.hdr-x:hover { scale: 1.05; border-color: rgba(255, 255, 255, .3); background-color: #232323; }
.hdr-x.is-pending { cursor: default; }
.hdr-x.is-pending:hover { scale: 1; }
.hdr-ca {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: .8125rem;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: scale var(--dur) ease-out, border-color var(--dur) ease-out;
}
.hdr-ca:not(:disabled):hover { scale: 1.03; border-color: rgba(255, 255, 255, .3); }
.hdr-ca:disabled { cursor: default; }
.hdr-ca__k { font-size: .75rem; font-weight: 600; letter-spacing: .08em; color: var(--text-2); }
.hdr-ca__v:empty { display: none; }
.hdr-ca.is-pending .hdr-ca__v { color: var(--text-2); }
/* shown wherever the header has room: hidden only on small phones, and where the centred nav is tightest */
@media (max-width: 479px), (min-width: 1000px) and (max-width: 1099px) { .hdr-ca { display: none; } }
@media (max-width: 380px) { .hdr-x { display: none; } }
