/*
 * base.css: YieldGift design system. Tokens, type, primitives.
 *
 * Identity: WHITE AND GREY, no violet and no other brand colour (user,
 * 2026-09-13: "lets just make the site white and grey no violet"). The page is
 * white; sections with .band--lavender (historical class name) are light grey;
 * .on-night (historical name) is a dark charcoal surface, used for the hero
 * film stage. Each redefines the same role tokens, so components follow the
 * surface they sit on. The raw --night/--violet/--lilac names are kept only so
 * older modules keep resolving; they hold greys now.
 *
 * The one idea the palette encodes: principal is INK (solid, heavy, it stays),
 * yield is GREY / WHITE (light, it moves). Never colour a principal figure as
 * yield or a yield figure as ink. Only status colours (warning, error) carry hue.
 *
 * Fonts (loaded in index.html), per the user's type spec 2026-09-13 (Geist replaced Inter + Roboto Mono):
 *   Geist 700       major headings (.t-hero/.t-h1/.t-h2): letter-spacing -.04em, line-height .95-1
 *                   (user, 2026-09-13: bold modern grotesk, large, heavy, clean)
 *   Geist 600       minor headings (.t-h3)
 *   Geist 400-500   body
 *   Geist 500-600   buttons, navigation, labels
 *   Geist 500-600   numbers and stats, always with tabular figures
 *   Geist Mono      wallet addresses and transaction hashes only (--f-code)
 * --f-mono is the historical name for the figure/label font; it is Geist now.
 */

:root {
  /* raw greys (legacy names; components use the role tokens below) */
  --night: #1c1c1f;
  --night-2: #26262a;
  --lavender: #f4f4f5;
  --navy: #18181b;
  --violet: #a1a1aa;
  --violet-deep: #71717a;
  --lilac: #d4d4d8;

  /* white (default) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --ink: #111113;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;

  --brand: #18181b;
  --brand-2: #52525b;
  --brand-wash: rgba(24, 24, 27, .06);

  --yield: #66666e;            /* yield figures and text: grey, AA on white */
  --yield-bright: #a1a1aa;     /* particles, dots, strokes */
  --yield-soft: #71717a;
  --yield-wash: rgba(24, 24, 27, .045);
  --yield-glow: none;
  --yield-btn: #18181b;
  --yield-btn-fg: #ffffff;

  --warn: #8a5200;
  --warn-wash: #fbf3e4;
  --danger: #b42318;
  --danger-wash: #fdecea;
  --demo: #3f3f46;             /* the demo/dev banner: neutral grey */
  --demo-wash: #f4f4f5;

  --focus: #18181b;
  --shadow-1: 0 1px 2px rgba(17, 17, 19, .05), 0 8px 24px rgba(17, 17, 19, .06);
  --shadow-2: 0 2px 6px rgba(17, 17, 19, .06), 0 24px 60px rgba(17, 17, 19, .10);

  /* frosted glass (buttons, chips) */
  --glass-bg: rgba(255, 255, 255, .62);
  --glass-bd: rgba(17, 17, 19, .12);
  --glass-hi: rgba(255, 255, 255, .9);
  --glass-primary: rgba(17, 17, 19, .88);
  --glass-primary-bd: rgba(17, 17, 19, .55);
  --glass-primary-fg: #ffffff;
  --glass-primary-solid: #18181b;
  --glass-solid: #ffffff;
  --glass-shadow: 0 6px 20px rgba(17, 17, 19, .08);

  --f-display: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-body: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-code: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* type scale */
  --t-hero: clamp(3rem, 1.2rem + 6.6vw, 7rem);
  --t-h1: clamp(2.25rem, 1.4rem + 3.2vw, 4rem);
  --t-h2: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  --t-h3: 1.375rem;
  --t-lead: clamp(1.0625rem, .95rem + .45vw, 1.3125rem);
  --t-body: 1rem;
  --t-small: .875rem;
  --t-micro: .75rem;

  /* spacing (4px base) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 144px;

  /* crisp radii (user, 2026-09-18: "decrease the corner radius by 50%", then "lower it again by 45%":
     about 28% of the old 10/16/24/28px; pills became 7px rounded rectangles too) */
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 7px;
  --r-xl: 8px;
  --r-pill: 7px;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);
  --dur-1: 140ms;
  --dur-2: 260ms;
  --dur-3: 520ms;

  color-scheme: light;
}

/* dark charcoal surface (the hero film stage) */
.on-night {
  --bg: #1c1c1f;
  --surface: #26262a;
  --surface-2: #2f2f34;
  --ink: #fafafa;
  --ink-2: #d4d4d8;
  --muted: #a1a1aa;
  --line: #34343a;
  --line-strong: #46464d;

  --brand: #fafafa;
  --brand-2: #d4d4d8;
  --brand-wash: rgba(255, 255, 255, .08);

  --yield: #ffffff;
  --yield-bright: #ffffff;
  --yield-soft: #d4d4d8;
  --yield-wash: rgba(255, 255, 255, .07);
  --yield-glow: 0 0 18px rgba(255, 255, 255, .2);
  --yield-btn: rgba(255, 255, 255, .92);
  --yield-btn-fg: #111113;

  --warn: #f2b55a;
  --warn-wash: #2c2515;
  --danger: #ff8a7a;
  --danger-wash: #321a17;
  --demo: #d4d4d8;
  --demo-wash: #2a2a2e;

  --focus: #fafafa;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .35);
  --shadow-2: 0 2px 8px rgba(0, 0, 0, .5), 0 28px 70px rgba(0, 0, 0, .45);

  --glass-bg: rgba(255, 255, 255, .08);
  --glass-bd: rgba(255, 255, 255, .2);
  --glass-hi: rgba(255, 255, 255, .24);
  --glass-primary: rgba(255, 255, 255, .9);
  --glass-primary-bd: rgba(255, 255, 255, .6);
  --glass-primary-fg: #111113;
  --glass-primary-solid: #fafafa;
  --glass-solid: #2a2a2e;
  --glass-shadow: 0 6px 22px rgba(0, 0, 0, .3);

  color-scheme: dark;
}

/* light grey band (historical class name) */
.band--lavender {
  --bg: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #e9e9ec;
  --line: #e0e0e4;
  --line-strong: #d0d0d5;
  --glass-bg: rgba(255, 255, 255, .7);
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
}

/* a full-bleed section band; its content sits in a .wrap inside */
.band { position: relative; }
.band--night, .on-night { background: var(--bg); color: var(--ink); }

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-body)/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--yield-wash); color: var(--ink); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- type */
.t-hero, .t-h1, .t-h2, .t-h3 { font-family: var(--f-display); text-wrap: balance; }
.t-hero { font-size: var(--t-hero); line-height: .95; letter-spacing: -.04em; font-weight: 700; }
.t-h1   { font-size: var(--t-h1);   line-height: .96; letter-spacing: -.04em; font-weight: 700; }
.t-h2   { font-size: var(--t-h2);   line-height: 1; letter-spacing: -.04em; font-weight: 700; }
.t-h3   { font-size: var(--t-h3);   line-height: 1.22; letter-spacing: -.014em; font-weight: 600; }
.t-lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; max-width: 58ch; }
.t-small { font-size: var(--t-small); }
.t-muted { color: var(--muted); }
.label {
  font: 500 var(--t-micro)/1.2 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mono, .fig { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.fig { letter-spacing: -.02em; }
.addr { font: 400 .8125rem/1.3 var(--f-code); word-break: break-all; }

/* principal vs yield: the core encoding */
.is-principal { color: var(--ink); }
.is-yield { color: var(--yield); }
.money {
  display: inline-flex; align-items: baseline; gap: .28em;
  font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.03em;
  white-space: nowrap;
}
.money .unit { font-size: .55em; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.money .sign { margin-right: -.12em; }

/* ---------------------------------------------------------------- layout */
.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; gap: var(--stack-gap, var(--s-4)); }
.row { display: flex; align-items: center; gap: var(--row-gap, var(--s-3)); flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------------------------------------------------------------- buttons */
/*
 * Frosted-glass pill buttons (user, 2026-09-13): backdrop blur, slight
 * transparency, a soft border and a gentle top highlight. Hover lowers the
 * blur a little and brightens; motion.css adds the small scale-up (and skips it
 * under reduced motion). Without backdrop-filter support each variant falls
 * back to a solid fill so the label never sits on raw page content.
 */
.btn {
  --btn-bg: var(--glass-primary); --btn-fg: var(--glass-primary-fg); --btn-bd: var(--glass-primary-bd);
  --btn-solid: var(--glass-primary-solid);
  --btn-blur: 14px; --btn-bright: 1;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  -webkit-backdrop-filter: blur(var(--btn-blur)) saturate(1.5); backdrop-filter: blur(var(--btn-blur)) saturate(1.5);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  filter: brightness(var(--btn-bright));
  font: 500 .9375rem/1 var(--f-body); letter-spacing: -.005em;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--dur-1) var(--ease-out), background-color var(--dur-2), border-color var(--dur-2), color var(--dur-2),
    box-shadow var(--dur-2), filter var(--dur-2) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { --btn-blur: 10px; --btn-bright: 1.12; box-shadow: inset 0 1px 0 var(--glass-hi), var(--shadow-1); }
.btn:active { --btn-bright: 1.02; transform: translateY(1px); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: var(--r-pill); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .42; cursor: not-allowed; box-shadow: none; transform: none; --btn-bright: 1; }
.btn .arrow { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }
.btn--secondary { --btn-bg: var(--glass-bg); --btn-fg: var(--ink); --btn-bd: var(--glass-bd); --btn-solid: var(--glass-solid); }
.btn--secondary:hover { --btn-bd: color-mix(in srgb, var(--ink) 40%, transparent); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-bd: transparent; --btn-solid: transparent; padding: 0 14px; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.btn--ghost:hover { --btn-bg: var(--glass-bg); box-shadow: none; }
.btn--danger { --btn-bg: var(--glass-bg); --btn-fg: var(--danger); --btn-bd: color-mix(in srgb, var(--danger) 45%, transparent); --btn-solid: var(--glass-solid); }
.btn--danger:hover { --btn-bg: var(--danger-wash); }
.btn--yield { --btn-bg: var(--yield-btn); --btn-fg: var(--yield-btn-fg); --btn-bd: var(--glass-hi); --btn-solid: var(--yield-btn); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn { background: var(--btn-solid); }
}
.btn--sm { min-height: 36px; padding: 0 16px; font-size: .875rem; }
.btn--lg { min-height: 56px; padding: 0 28px; font-size: 1rem; }
.btn--block { width: 100%; }
.btn.is-busy { color: transparent; pointer-events: none; }
.btn.is-busy::after {
  content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--btn-fg); border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- forms */
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field > .label { color: var(--ink-2); }
.input {
  width: 100%; min-height: 52px; padding: 0 16px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  transition: border-color var(--dur-2), box-shadow var(--dur-2);
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 8%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.hint { font-size: var(--t-small); color: var(--muted); }
.error-text { font-size: var(--t-small); color: var(--danger); }

/* the big amount entry used in the deposit step */
.amount-input {
  display: flex; align-items: baseline; gap: 12px;
  border-bottom: 2px solid var(--line-strong);
  padding-bottom: 10px;
  transition: border-color var(--dur-2);
}
.amount-input:focus-within { border-color: var(--ink); }
.amount-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font: 500 clamp(2.5rem, 1.6rem + 3.5vw, 4.25rem)/1 var(--f-mono);
  font-variant-numeric: tabular-nums; letter-spacing: -.025em; color: var(--ink);
}
.amount-input .unit { font: 500 1rem/1 var(--f-mono); letter-spacing: .06em; color: var(--muted); }

/* ---------------------------------------------------------------- surfaces */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel--raised { box-shadow: var(--shadow-2); border-color: transparent; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3) var(--s-5); align-items: baseline; }
.kv dt { color: var(--muted); font-size: var(--t-small); }
.kv dd { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- pills & states */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 24px; padding: 0 10px; border-radius: var(--r-pill);
  font: 500 .6875rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase;
  background: var(--surface-2); color: var(--ink-2); white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill--live { background: var(--yield-wash); color: var(--yield); }
.pill--live::before { animation: pulse 2s var(--ease-in-out) infinite; }
.pill--warn { background: var(--warn-wash); color: var(--warn); }
.pill--danger { background: var(--danger-wash); color: var(--danger); }
.pill--demo { background: var(--demo-wash); color: var(--demo); }
.pill--quiet::before { display: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.skeleton {
  display: inline-block; min-width: 4ch; height: 1em; border-radius: 1px; vertical-align: -.12em;
  background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 40%, var(--surface)), var(--surface-2));
  background-size: 200% 100%; animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* risk disclosure: present, never shouting */
.risk {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: .8125rem; line-height: 1.45; color: var(--muted);
}
.risk svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }

/* avatar */
.avatar {
  --size: 40px;
  width: var(--size); height: var(--size); border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: var(--surface-2); color: var(--ink-2);
  font: 600 calc(var(--size) * .4)/1 var(--f-display);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* toast */
.toast-host { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(420px, calc(100% - 32px)); }
.toast {
  background: var(--ink); color: var(--surface); border-radius: var(--r-md);
  padding: 12px 16px; font-size: var(--t-small); box-shadow: var(--shadow-2);
  animation: toast-in var(--dur-3) var(--ease-out);
}
/* motion blur (user, 2026-09-14): rises out of a slight blur, sharp well before it settles */
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); filter: blur(2px); } 60% { filter: blur(0); } }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-2);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header { transition: border-color var(--dur-2), background-color var(--dur-3) var(--ease-out), -webkit-backdrop-filter var(--dur-3), backdrop-filter var(--dur-3); }

/* Homepage, scrolled to the very top: the bar is invisible over the white hero (user, 2026-09-13).
   Normal black ink; any scroll brings the frosted white bar back. */
.site-header.is-transparent:not(.menu-open) {
  --ink: #ffffff; --ink-2: rgba(255, 255, 255, .86); --muted: rgba(255, 255, 255, .72);
  --glass-bg: rgba(255, 255, 255, .14); --glass-bd: rgba(255, 255, 255, .3); --glass-hi: rgba(255, 255, 255, .3);
  --glass-solid: rgba(255, 255, 255, .16); --focus: #ffffff;
  color: var(--ink);
  background: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  border-bottom-color: transparent;
}
.site-header .bar { height: 68px; display: flex; align-items: center; gap: var(--s-5); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.25rem/1 var(--f-display); letter-spacing: -.03em; }
.wordmark__mark {
  width: 30px; height: 30px; flex: none; display: inline-block;
  background: currentColor;
  -webkit-mask: url("../assets/brand/mark-256.png") center / contain no-repeat;
  mask: url("../assets/brand/mark-256.png") center / contain no-repeat;
}
.nav { display: flex; gap: 2px; margin-left: auto; }
/* no block and no animation behind the links (user, 2026-09-18): hover and the current page only
   change the text colour, instantly */
.nav a {
  padding: 8px 12px; text-decoration: none;
  font-size: .9375rem; color: var(--ink-2);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.session { display: flex; align-items: center; gap: var(--s-2); }
/* header extras: the contract address (copies on click) and the X profile */
.hdr-extras { display: flex; align-items: center; gap: var(--s-2); }
.ca-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px;
  border: 1px solid var(--glass-bd); border-radius: var(--r-pill); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  font: 500 .8125rem/1 var(--f-body); color: var(--ink); white-space: nowrap;
  transition: background-color var(--dur-2), border-color var(--dur-2);
}
.ca-chip:not(:disabled):hover { border-color: color-mix(in srgb, var(--ink) 40%, transparent); }
.ca-chip:disabled { cursor: default; opacity: 1; }
.ca-chip__k { color: var(--ink-2); letter-spacing: .04em; font-size: .75rem; }
.ca-chip__v:empty { display: none; }
.ca-chip__v { font-family: var(--f-code); font-size: .75rem; letter-spacing: -.01em; }
.ca-chip svg { width: 14px; height: 14px; color: var(--muted); }
.x-link {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border: 1px solid var(--glass-bd); border-radius: var(--r-pill); background: var(--glass-bg);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: var(--ink);
}
.x-link svg { width: 15px; height: 15px; }
/* narrow phones: the mark alone says YieldGift (the link keeps its aria-label), so CA, X, Sign in and
   Menu all fit on one row */
@media (max-width: 420px) {
  .wordmark__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
.menu-toggle { display: none; }

.mode-banner {
  background: var(--demo-wash); color: var(--demo);
  font-size: .8125rem; line-height: 1.4;
}
.mode-banner .wrap { display: flex; gap: 10px; align-items: center; min-height: 36px; padding-block: 6px; }
.mode-banner b { font-weight: 600; }
.mode-banner .mb-short { display: none; }
.mode-banner a { color: inherit; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); margin-top: var(--s-9); padding-block: var(--s-7) var(--s-6); color: var(--muted); font-size: var(--t-small); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-6); }
.site-footer h4 { font: 500 var(--t-micro)/1.2 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: var(--s-3); }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  .nav { display: none; }
  .ca-chip { height: 32px; padding: 0 10px; }
  .x-link { width: 32px; height: 32px; }
  .site-header .bar { gap: var(--s-3); }
  .session { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
  .mode-banner .mb-long { display: none; }
  .mode-banner .mb-short { display: inline; }
  .site-header.menu-open .nav {
    display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--bg); padding: 8px var(--gutter) 16px; border-bottom: 1px solid var(--line); margin: 0;
  }
  .site-header.menu-open .nav a { padding: 14px 8px; font-size: 1.0625rem; }
  .site-footer .cols { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
