@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&display=swap');

/* ---------------------------------------------------------------- tokens */
:root {
  color-scheme: dark;

  --bg: #0c0e0e;
  --bg-deep: #070909;
  --surface: #141817;
  --surface-2: #191e1d;

  --line: rgba(233, 226, 208, .10);
  --line-soft: rgba(233, 226, 208, .06);
  --line-strong: rgba(233, 226, 208, .17);

  --text: #f0ede4;
  --muted: #9aa39b;
  --faint: #737d76;

  --gold: #d9bd83;
  --gold-bright: #f0d7a4;
  --gold-dim: rgba(217, 189, 131, .34);
  --gold-wash: rgba(217, 189, 131, .09);

  --good: #7fd4a8;
  --danger: #f0a89a;

  --font: 'DM Sans', system-ui, -apple-system, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-card: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 60px -30px rgba(0, 0, 0, .9);
  --shadow-lift: 0 18px 44px -22px rgba(0, 0, 0, .85);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --gutter: clamp(20px, 4vw, 56px);
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 400; }

:where(button, a, input, [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

.skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 60;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--gold); color: #121513; font-size: 13px; font-weight: 600;
  transform: translateY(-160%); transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* ------------------------------------------------------------- ambience */
.ambience {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% -10%, #141918 0%, var(--bg) 46%, var(--bg-deep) 100%);
  contain: strict;
}
.ambience > span { position: absolute; display: block; }
.amb-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(233, 226, 208, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233, 226, 208, .035) 1px, transparent 1px);
  background-size: 76px 76px;
  -webkit-mask-image: radial-gradient(90% 70% at 50% 20%, #000 0%, transparent 78%);
  mask-image: radial-gradient(90% 70% at 50% 20%, #000 0%, transparent 78%);
}
.amb-glow { border-radius: 50%; filter: blur(90px); will-change: transform; }
.amb-glow-gold {
  width: min(58vw, 720px); aspect-ratio: 1.25; top: -18vh; left: -8vw;
  background: radial-gradient(circle, rgba(196, 160, 96, .20), transparent 68%);
  animation: drift-a 28s ease-in-out infinite alternate;
}
.amb-glow-cool {
  width: min(52vw, 640px); aspect-ratio: 1.1; bottom: -22vh; right: -10vw;
  background: radial-gradient(circle, rgba(74, 126, 120, .18), transparent 68%);
  animation: drift-b 34s ease-in-out infinite alternate;
}
@keyframes drift-a { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(5vw,4vh,0) scale(1.12); } }
@keyframes drift-b { from { transform: translate3d(0,0,0) scale(1.06); } to { transform: translate3d(-5vw,-4vh,0) scale(1); } }
.amb-vignette { inset: 0; background: radial-gradient(130% 100% at 50% 40%, transparent 42%, rgba(0,0,0,.55) 100%); }
.amb-grain {
  inset: -50%; opacity: .035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: linear-gradient(to bottom, rgba(12,14,14,.92), rgba(12,14,14,.74));
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.header-inner {
  max-width: var(--shell); margin: auto; padding: 0 var(--gutter);
  height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
  display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--r-md); border: 1px solid var(--gold-dim);
  background: linear-gradient(160deg, var(--gold-wash), transparent 70%);
  color: var(--gold); transition: border-color .25s var(--ease);
}
.brand-mark svg { width: 19px; height: 21px; }
.brand:hover .brand-mark { border-color: var(--gold); }
.brand-text { font-size: 15px; font-weight: 600; letter-spacing: 2.2px; line-height: 1.25; white-space: nowrap; }
.brand-sub { display: block; color: var(--faint); font-size: 8.5px; font-weight: 400; letter-spacing: 2.1px; }
.header-actions { display: flex; align-items: center; gap: 14px; }

/* --------------------------------------------------------------- shared */
main { max-width: var(--shell); margin: auto; padding: 0 var(--gutter); }
.eyebrow { margin: 0 0 10px; font-size: 10.5px; font-weight: 600; letter-spacing: 2px; color: var(--gold); }
.serif { font-family: var(--serif); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: var(--r-md); font-size: 15px; font-weight: 600;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
}
.btn-primary {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: #171a16; box-shadow: 0 12px 30px -14px rgba(217,189,131,.75);
}
.btn-primary::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.5) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform .7s var(--ease);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 38px -16px rgba(217,189,131,.85); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:disabled { filter: grayscale(.4); transform: none; }
.btn-ghost { border: 1px solid var(--line-strong); background: rgba(233,226,208,.03); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold-dim); background: var(--gold-wash); }
.btn-block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: var(--r-pill);
  font-size: 11.5px; letter-spacing: 1px; color: var(--muted);
}
.pill-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px rgba(127,212,168,.16); }

.card {
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-card);
}

/* ----------------------------------------------------------------- hero */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px,4vw,64px); align-items: center; padding: clamp(36px,6vw,76px) 0 clamp(28px,4vw,52px); }
.hero h1 { font-family: var(--serif); font-size: clamp(40px,5.6vw,68px); line-height: 1.03; letter-spacing: -.6px; }
.hero h1 em {
  font-style: italic;
  background: linear-gradient(96deg, var(--gold-bright), var(--gold) 55%, #b9975f);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { max-width: 46ch; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.hero-art { position: relative; }
.hero-frame {
  position: relative; overflow: hidden; isolation: isolate;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: linear-gradient(180deg, #101515, #0b0f0f);
  padding: clamp(18px,3vw,34px);
  box-shadow: var(--shadow-card);
}
.hero-frame::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(233,226,208,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,226,208,.028) 1px, transparent 1px);
  background-size: 26px 26px;
}
.hero-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border-radius: 6px; transition: opacity .3s var(--ease); }
.hero-caption { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 9px; letter-spacing: 1.4px; color: var(--faint); }

/* --------------------------------------------------------------- strips */
section { padding: clamp(36px,5vw,64px) 0; border-top: 1px solid var(--line-soft); }
.section-head { max-width: 62ch; margin-bottom: clamp(24px,3vw,40px); }
.section-head h2 { font-family: var(--serif); font-size: clamp(28px,3.6vw,42px); line-height: 1.12; }
.section-head p { margin: 14px 0 0; color: var(--muted); line-height: 1.8; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.step { padding: 24px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(233,226,208,.022); }
.step-no { font-family: var(--serif); font-size: 30px; color: var(--gold); line-height: 1; }
.step h3 { margin: 14px 0 8px; font-size: 16px; font-weight: 600; font-family: var(--font); }
.step p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.gallery figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.gallery img { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.gallery figcaption { padding: 12px 14px; font-size: 11px; letter-spacing: 1.2px; color: var(--faint); border-top: 1px solid var(--line-soft); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.fact { padding: 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: rgba(233,226,208,.022); }
.fact dt { font-size: 10.5px; letter-spacing: 1.8px; color: var(--faint); }
.fact dd { margin: 10px 0 0; font-family: var(--serif); font-size: 30px; color: var(--gold-bright); line-height: 1; }
.fact dd small { display: block; margin-top: 8px; font-family: var(--font); font-size: 13px; color: var(--muted); letter-spacing: 0; }

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px; padding: clamp(26px,3.5vw,40px); }
.cta-band h2 { font-family: var(--serif); font-size: clamp(24px,3vw,34px); }
.cta-band p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 28px 0 40px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--faint);
}
footer .serif { font-size: 18px; font-style: italic; color: #aab1a5; }
footer nav { display: flex; gap: 16px; }
footer a:hover { color: var(--gold); }

/* ---------------------------------------------------------------- apply */
.apply-head { padding: clamp(30px,4vw,54px) 0 clamp(20px,3vw,32px); }
.apply-head h1 { font-family: var(--serif); font-size: clamp(32px,4.4vw,52px); line-height: 1.08; }
.apply-head p { max-width: 56ch; margin: 16px 0 0; color: var(--muted); line-height: 1.8; }

.apply-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: clamp(22px,3vw,44px); align-items: start; padding-bottom: 40px; }

.studio-card { position: sticky; top: 100px; padding: 16px 18px; }
.studio-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; }
.studio-top .eyebrow { margin: 0; font-size: 9.5px; color: var(--faint); letter-spacing: 1.9px; }
.studio-mat {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-md);
  border: 1px solid var(--line-soft); padding: 20px 26px 30px;
  background: radial-gradient(90% 70% at 50% 34%, rgba(217,189,131,.05), transparent 70%), linear-gradient(180deg, #101515, #0b0f0f);
}
.studio-mat::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(233,226,208,.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(233,226,208,.028) 1px, transparent 1px);
  background-size: 24px 24px;
}
.studio-mat img { display: block; width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; border-radius: 4px; transition: opacity .16s var(--ease); }
.studio-mat img.swapping { opacity: .35; }
.mat-label { position: absolute; left: 0; right: 0; bottom: 10px; text-align: center; font-size: 8px; letter-spacing: 4px; color: var(--faint); }
.studio-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; font-size: 13px; }
#composition-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #ccd0c8; }
.tool-row { display: flex; gap: 7px; flex-shrink: 0; }
.icon-button {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: var(--r-sm); border: 1px solid var(--line); color: var(--muted);
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.icon-button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { color: var(--gold); border-color: var(--gold-dim); background: var(--gold-wash); }
.icon-button:active { transform: scale(.94); }
.icon-button.spin svg { animation: spin .5s var(--ease); }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(180deg); } }

/* trait editor */
.trait-tabs {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px;
  margin-top: 14px; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-md); background: rgba(0,0,0,.28);
}
.trait-tabs button { position: relative; z-index: 1; padding: 9px 4px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); transition: color .22s var(--ease); }
.trait-tabs button:hover { color: var(--text); }
.trait-tabs button[aria-selected="true"] { color: #f2e6c9; }
.tab-indicator {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 4px;
  width: calc((100% - 8px - 6px) / 4); border-radius: 7px;
  background: linear-gradient(180deg, rgba(217,189,131,.18), rgba(217,189,131,.07));
  border: 1px solid var(--gold-dim);
  transition: transform .32s var(--ease), width .32s var(--ease);
  transform: translateX(var(--tab-x, 0px));
}
.trait-panel { max-height: 330px; overflow-y: auto; overscroll-behavior: contain; margin-top: 6px; padding-right: 10px; scrollbar-width: thin; scrollbar-color: rgba(233,226,208,.16) transparent; }
.trait-panel::-webkit-scrollbar { width: 6px; }
.trait-panel::-webkit-scrollbar-thumb { background: rgba(233,226,208,.14); border-radius: 3px; }
.trait-group { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.trait-group:last-child { border-bottom: 0; }
.group-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.group-label h3 { font-size: 13px; font-weight: 600; }
.group-label > span { font-size: 12px; color: var(--gold); opacity: .85; text-align: right; }
.swatches { display: flex; flex-wrap: wrap; gap: 11px; }
.swatch {
  position: relative; width: 32px; height: 32px; border-radius: 50%; background: var(--swatch);
  box-shadow: 0 0 0 1px var(--line-strong); transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.swatch:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 1px rgba(233,226,208,.35); }
.swatch.selected { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold); }
.swatch.selected::after {
  content: ''; position: absolute; left: 50%; top: 47%; width: 10px; height: 5px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: translate(-50%,-50%) rotate(-45deg);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.9));
}
.option-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.trait-option {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 42px; padding: 9px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(233,226,208,.028); color: #bcc3bb; font-size: 12px; font-weight: 500; line-height: 1.3;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.trait-option:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.trait-option.selected {
  color: #f4e8cb; border-color: var(--gold);
  background: linear-gradient(180deg, rgba(217,189,131,.17), rgba(217,189,131,.06));
}

/* quest list */
.quests { display: grid; gap: 14px; }
.quest {
  position: relative; padding: 20px 22px; border-radius: var(--r-md);
  border: 1px solid var(--line); background: rgba(233,226,208,.022);
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.quest.done { border-color: rgba(127,212,168,.34); background: rgba(127,212,168,.05); }
.quest-head { display: flex; align-items: center; gap: 13px; }
.quest-no {
  display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line-strong); font-size: 12px; font-weight: 600; color: var(--muted);
  transition: all .25s var(--ease);
}
.quest.done .quest-no { border-color: var(--good); background: rgba(127,212,168,.14); color: var(--good); }
.quest-title { flex: 1; min-width: 0; font-size: 15.5px; font-weight: 600; }
.quest-note { margin: 10px 0 0; padding-left: 41px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.quest-body { margin-top: 14px; padding-left: 41px; display: grid; gap: 10px; }
.quest-row { display: flex; flex-wrap: wrap; gap: 10px; }

label.field { display: block; font-size: 13px; color: var(--muted); }
.field input {
  display: block; width: 100%; margin-top: 8px; padding: 13px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: rgba(0,0,0,.32); color: var(--text); font-size: 14.5px;
  transition: border-color .2s var(--ease);
}
.field input:focus { border-color: var(--gold-dim); outline-offset: 1px; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-hint { margin: 7px 0 0; font-size: 12px; color: var(--faint); }
.field-hint.error { color: var(--danger); }

.submit-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.submit-note { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--faint); line-height: 1.6; }

/* pass */
.pass-wrap { display: grid; gap: 18px; }
.pass-card { padding: 18px; }
.pass-card img { display: block; width: 100%; height: auto; border-radius: var(--r-sm); border: 1px solid var(--line); }
.pass-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 12px; margin-top: 16px; }
.pass-stat { padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(233,226,208,.022); }
.pass-stat dt { font-size: 10px; letter-spacing: 1.6px; color: var(--faint); }
.pass-stat dd { margin: 8px 0 0; font-family: var(--serif); font-size: 24px; color: var(--gold-bright); line-height: 1; }
.ref-row { display: flex; gap: 10px; margin-top: 14px; }
.ref-row input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: rgba(0,0,0,.32); color: var(--text); font-size: 13.5px; }
.ref-pips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.ref-pip { width: 100%; max-width: 22px; height: 6px; border-radius: 3px; background: rgba(233,226,208,.10); }
.ref-pip.on { background: var(--gold); }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); z-index: 70;
  max-width: min(90vw, 440px); padding: 13px 20px; border-radius: var(--r-pill);
  border: 1px solid var(--gold-dim); background: rgba(22,26,24,.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #f0e6cf; font-size: 13.5px; text-align: center; box-shadow: var(--shadow-lift);
  opacity: 0; pointer-events: none; transform: translate(-50%,16px) scale(.97);
  transition: opacity .24s var(--ease), transform .24s var(--ease);
}
#toast.visible { opacity: 1; transform: translate(-50%,0) scale(1); }
#toast.err { border-color: rgba(240,168,154,.5); color: var(--danger); }

[hidden] { display: none !important; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { max-width: 460px; }
  .apply-layout { grid-template-columns: 1fr; }
  .studio-card { position: static; max-width: 520px; }
  .trait-panel { max-height: none; }
}

@media (max-width: 620px) {
  .header-inner { height: 66px; gap: 12px; }
  .brand-text { font-size: 13px; letter-spacing: 1.5px; }
  .brand-sub { font-size: 7.5px; }
  .header-actions { gap: 10px; }
  .header-actions .btn { padding: 10px 16px; font-size: 13.5px; white-space: nowrap; }
  /* brand + two CTAs do not fit; the X link still lives in the footer and in step 2 */
  .header-actions #x-link { display: none; }
  .quest { padding: 18px; }
  .quest-note, .quest-body { padding-left: 0; }
  .option-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-band { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
  .brand-sub { display: none; }
}

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