/* ==========================================================================
   Open Study website
   Tokens mirror the app's design system (open-study/DESIGN.md §2–3, §9).
   ========================================================================== */

:root {
  color-scheme: light;

  /* Neutrals */
  --canvas: #F6F4F0;
  --surface: #FDFCFA;
  --raised: #FFFFFF;
  --muted: #F2EFE8;
  --hover: #F4F2ED;
  --border: #E9E5DD;
  --border-strong: #D9D3C8;

  /* Text */
  --text: #1E1C19;
  --text-2: #6A655C;
  --text-3: #9A948A;

  /* Ink & accent */
  --ink: #1E1C19;
  --on-ink: #FFFFFF;
  --accent: #4A5BD0;
  --accent-soft: #ECEEFB;
  --badge-bg: #FCE6BF;
  --badge-text: #7A4F12;

  /* Type */
  --font-sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  --font-serif: "New York", "Newsreader", "Iowan Old Style", Georgia, serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --page: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

::selection { background: color-mix(in srgb, var(--accent) 20%, transparent); }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 100;
  padding: 8px 14px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink);
  font-size: 14px; text-decoration: none;
  transition: top .15s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Icons ----------------------------------------------------------------- */
.i {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}

kbd {
  font-family: var(--font-mono);
  font-size: .82em;
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--muted);
  border: 1px solid var(--border);
}

/* Buttons --------------------------------------------------------------- */
.btn {
  --h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h);
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 15px; font-weight: 500; letter-spacing: -0.005em;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease),
              color .15s var(--ease), transform .1s var(--ease), box-shadow .15s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn .i { font-size: 16px; }
.btn-sm { --h: 34px; padding: 0 13px; font-size: 14px; border-radius: 9px; }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 16px; border-radius: 12px; }

.btn-primary { background: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: #34312C; }
.btn-secondary { background: var(--raised); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--hover); border-color: var(--border-strong); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }

/* Navigation ------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.nav.is-scrolled {
  background: var(--surface);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-weight: 600; font-size: 17px; letter-spacing: -0.015em;
  white-space: nowrap;
}
.brand img { border-radius: 7px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 12px; border-radius: 9px;
  font-size: 14.5px; color: var(--text-2); text-decoration: none;
  transition: background-color .15s var(--ease), color .15s var(--ease);
}
.nav-link:hover { background: var(--hover); color: var(--text); }
.nav-link .i { font-size: 16px; }
.nav-links .btn { margin-left: 8px; }

/* Hero ------------------------------------------------------------------ */
.hero {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(56px, 10vw, 112px) var(--gutter) clamp(40px, 6vw, 64px);
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--raised);
  font-size: 13.5px; color: var(--text-2);
  text-decoration: none;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.hero-pill:hover { border-color: var(--border-strong); color: var(--text); }
.hero-pill .i { font-size: 13px; color: var(--text-3); }
.hero-pill-badge {
  padding: 2px 8px; border-radius: 999px;
  background: var(--badge-bg); color: var(--badge-text);
  font-size: 11.5px; font-weight: 600;
}
.hero-title {
  margin-top: 28px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(42px, 7.4vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero-line { display: block; }
.hero-title em { font-style: italic; }
.hero-sub {
  margin-top: 24px;
  max-width: 600px;
  font-size: clamp(17px, 2vw, 19px);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}
.hero-actions {
  margin-top: 36px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
}
.hero-meta {
  margin-top: 20px;
  font-size: 13.5px;
  color: var(--text-3);
}

/* Showcase -------------------------------------------------------------- */
.showcase {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.desk {
  background: var(--canvas);
  border-radius: clamp(20px, 3vw, 32px);
  padding: clamp(12px, 4vw, 56px);
  border: 1px solid #EFEBE3;
}
.showcase-caption {
  max-width: 720px;
  margin: 20px auto 0;
  display: flex; align-items: flex-start; justify-content: center; gap: 16px;
  font-size: 14px; color: var(--text-2); text-align: left;
}
.showcase-caption p { flex: 1; padding-top: 6px; }
.showcase-caption strong { color: var(--text); font-weight: 600; }
.demo-noscript { padding: 48px; text-align: center; color: var(--text-2); }

/* Sections -------------------------------------------------------------- */
.eyebrow {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3);
}
.section-head {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
}
.section-title {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(32px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.section-sub {
  margin-top: 16px;
  font-size: 17px; color: var(--text-2);
  text-wrap: pretty;
}

/* Features -------------------------------------------------------------- */
.features {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(96px, 14vw, 160px) var(--gutter) 0;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(32px, 6vw, 88px);
  margin-top: clamp(72px, 10vw, 128px);
}
.feature-flip .feature-copy { order: 2; }
.feature-copy { max-width: 460px; }
.feature-copy h3 {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.feature-copy p:not(.eyebrow) {
  margin-top: 16px;
  font-size: 16.5px;
  color: var(--text-2);
  text-wrap: pretty;
}
.feature-copy .feature-why {
  margin-top: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--border-strong);
  color: var(--text);
}
.feature-demo {
  background: var(--canvas);
  border-radius: 24px;
  padding: clamp(20px, 4vw, 44px);
  min-height: 360px;
  display: flex; align-items: center; justify-content: center;
}

.more {
  margin-top: clamp(96px, 12vw, 144px);
  padding-top: 48px;
  border-top: 1px solid var(--border);
}
.more-title {
  font-size: 13px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3);
}
.more-list {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 48px;
}
.more-list dt { font-weight: 600; font-size: 16px; }
.more-list dd { margin-top: 6px; color: var(--text-2); font-size: 15px; }

/* Principles ------------------------------------------------------------ */
.principles {
  margin-top: clamp(96px, 14vw, 160px);
  padding: 0 var(--gutter);
}
.principles-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: clamp(56px, 8vw, 96px) clamp(24px, 6vw, 72px);
  border-radius: clamp(20px, 3vw, 32px);
  background: var(--canvas);
  text-align: center;
}
.facts {
  margin: 44px auto 0;
  max-width: 920px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px;
  font-size: 16px; color: var(--text-2);
}
.facts strong {
  display: block; margin-bottom: 4px;
  font-family: var(--font-serif); font-weight: 400;
  font-size: 24px; color: var(--text); letter-spacing: -0.01em;
}
.fineprint {
  max-width: 580px;
  margin: 40px auto 0;
  font-size: 13.5px; color: var(--text-3);
  text-wrap: pretty;
}
.fineprint a { color: var(--text-2); text-underline-offset: 3px; }
.fineprint a:hover { color: var(--text); }

/* CTA ------------------------------------------------------------------- */
.cta {
  padding: clamp(96px, 14vw, 168px) var(--gutter) clamp(96px, 12vw, 144px);
}
.cta-inner {
  max-width: 640px; margin: 0 auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.cta-icon {
  width: 96px; height: 96px;
  margin-bottom: 12px;
  filter: drop-shadow(0 10px 24px rgba(74, 91, 208, .18));
}
.cta .fineprint { margin-top: 28px; }

/* Footer ---------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--canvas);
}
.footer-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap;
}
.footer-brand { max-width: 300px; }
.footer-brand .brand { font-size: 16px; }
.footer-brand p { margin-top: 14px; font-size: 14px; color: var(--text-2); }
.footer-links { display: flex; gap: clamp(32px, 6vw, 80px); flex-wrap: wrap; }
.footer-links h3 {
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-3);
  margin-bottom: 12px;
}
.footer-links a {
  display: block; padding: 4px 0;
  font-size: 14.5px; color: var(--text-2); text-decoration: none;
  transition: color .15s var(--ease);
}
.footer-links a:hover { color: var(--text); }

/* Reveal on scroll ------------------------------------------------------ */
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.hero .reveal:nth-child(2) { transition-delay: .06s; }
.hero .reveal:nth-child(3) { transition-delay: .12s; }
.hero .reveal:nth-child(4) { transition-delay: .18s; }
.hero .reveal:nth-child(5) { transition-delay: .24s; }

/* Feature vignettes ----------------------------------------------------- */
.fx {
  width: 100%; max-width: 440px;
  font-size: 14px;
}
.fx-panel {
  background: var(--raised);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 1px rgba(0,0,0,.03), 0 8px 24px rgba(30,28,25,.06);
}
.fx-label {
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-3);
}
.fx-hint { margin-top: 14px; font-size: 13px; color: var(--text-3); text-align: center; }

/* Blocks vignette */
.fx-page { padding: 22px 22px 16px; }
.fx-page-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-serif); font-size: 24px; letter-spacing: -0.01em;
}
.fx-page-title .i { font-size: 22px; color: #8A7BC2; }
.fx-page-blocks { margin-top: 12px; display: grid; gap: 6px; min-height: 40px; }
.fx-page-block {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--border);
  font-size: 13.5px;
}
.fx-page-block.is-new, .fx-annots li.is-new { animation: fx-in .25s var(--ease); }
.fx-page-block .i { font-size: 15px; color: var(--text-2); }
.fx-page-block span { color: var(--text-3); margin-left: auto; font-size: 12px; }
.fx-page-empty { font-size: 13.5px; color: var(--text-3); padding: 6px 0; }
.fx-slash {
  margin-top: 10px;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; color: var(--text-3);
}
.fx-menu { margin-top: 12px; padding: 6px; }
.fx-menu-search {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.fx-menu-search .i { color: var(--text-3); font-size: 15px; }
.fx-menu-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 14px; color: var(--text);
}
.fx-menu-search input::placeholder { color: var(--text-3); }
.fx-menu-list { max-height: 196px; overflow: auto; }
.fx-menu-item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 8px; border: 0; border-radius: 8px;
  background: transparent; text-align: left; cursor: pointer;
}
.fx-menu-item:hover, .fx-menu-item.is-active { background: var(--hover); }
.fx-menu-icon {
  width: 28px; height: 28px; border-radius: 7px; flex: none;
  display: grid; place-items: center;
  background: var(--muted); color: var(--text-2);
}
.fx-menu-icon .i { font-size: 15px; }
.fx-menu-item b { display: block; font-weight: 500; font-size: 13.5px; }
.fx-menu-item small { display: block; font-size: 12px; color: var(--text-3); line-height: 1.3; }
.fx-menu-none { padding: 14px 8px; color: var(--text-3); font-size: 13px; }

/* Flashcard vignette */
.fx-card-wrap { perspective: 1200px; }
.fx-card {
  position: relative;
  height: 210px;
  transform-style: preserve-3d;
  transition: transform .5s cubic-bezier(.3,.9,.3,1);
  cursor: pointer;
}
.fx-card.is-flipped { transform: rotateY(180deg); }
.fx-card-face {
  position: absolute; inset: 0;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 28px; text-align: center;
  font-size: 17px; line-height: 1.45;
}
.fx-card-face .fx-label { position: absolute; top: 16px; left: 18px; }
.fx-card-back { transform: rotateY(180deg); }
.fx-card-back small { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.fx-card-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px; font-size: 13px; color: var(--text-2);
}
.fx-ratings {
  margin-top: 14px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  min-height: 52px;
}
.fx-rate {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  height: 52px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--raised);
  font-size: 13.5px; font-weight: 500; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.fx-rate:hover { background: var(--hover); border-color: var(--border-strong); }
.fx-rate small { font-size: 11.5px; font-weight: 400; color: var(--text-3); font-variant-numeric: tabular-nums; }
.fx-rate[data-r="again"] { color: #C0443B; }
.fx-rate[data-r="hard"] { color: #B7791F; }
.fx-rate[data-r="good"] { color: #3E8A5A; }
.fx-rate[data-r="easy"] { color: #4A5BD0; }
.fx-show {
  grid-column: 1 / -1;
  height: 44px; border-radius: 10px; border: 0;
  background: var(--ink); color: var(--on-ink);
  font-size: 14px; font-weight: 500; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.fx-show kbd { background: rgba(255,255,255,.14); border-color: transparent; color: inherit; }
.fx-toast {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; color: var(--text-2);
  animation: fx-in .25s var(--ease);
}

/* Focus vignette */
.fx-focus { padding: 26px 24px 22px; text-align: center; }
.fx-ring { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.fx-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.fx-ring circle { fill: none; }
.fx-ring .track { stroke: var(--border); stroke-width: 2; }
.fx-ring .prog { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; }
.fx-ring-text {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.fx-ring-text b {
  font-family: var(--font-serif); font-weight: 400; font-size: 38px;
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.fx-focus-controls { margin-top: 18px; display: flex; justify-content: center; gap: 8px; }
.fx-goal { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); text-align: left; }
.fx-goal-row { display: flex; justify-content: space-between; align-items: baseline; }
.fx-goal-row b { font-family: var(--font-serif); font-weight: 400; font-size: 26px; font-variant-numeric: tabular-nums; }
.fx-goal-row span { font-size: 13px; color: var(--text-2); }
.fx-bar { margin-top: 10px; height: 6px; border-radius: 6px; background: var(--muted); overflow: hidden; }
.fx-bar i { display: block; height: 100%; background: var(--ink); border-radius: inherit; transition: width .4s var(--ease); }
.fx-week { margin-top: 16px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; align-items: end; height: 64px; }
.fx-week div { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.fx-week i { display: block; width: 100%; max-width: 22px; border-radius: 4px; background: color-mix(in srgb, var(--ink) 85%, transparent); transition: height .4s var(--ease); }
.fx-week div:not(.is-today) i { background: var(--border-strong); }
.fx-week small { font-size: 11px; color: var(--text-3); }

/* PDF vignette */
.fx-pdf { overflow: hidden; }
.fx-pdf-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}
.fx-pdf-bar .sp { flex: 1; }
.fx-tool {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--raised);
  font-size: 12.5px; cursor: pointer;
}
.fx-tool .i { font-size: 14px; }
.fx-tool:hover { background: var(--hover); }
.fx-tool.is-on { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.fx-pdf-page { padding: 22px 26px 24px; font-family: var(--font-serif); font-size: 15.5px; line-height: 1.7; color: #2b2925; }
.fx-pdf-page h4 { margin: 0 0 8px; font-size: 18px; font-weight: 500; }
.fx-sent {
  border-radius: 3px; cursor: text;
  transition: background-color .2s var(--ease);
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.fx-pdf.is-highlighting .fx-sent { cursor: pointer; }
.fx-pdf.is-highlighting .fx-sent:hover { background: rgba(255, 214, 10, .22); }
.fx-sent.is-marked { background: rgba(255, 214, 10, .45); }
.fx-sent.is-marked:hover { background: rgba(255, 214, 10, .55) !important; }
.fx-sent:focus-visible { outline-offset: 0; }
.fx-annots { border-top: 1px solid var(--border); padding: 12px 16px 14px; background: var(--surface); }
.fx-annots ul { margin-top: 8px; display: grid; gap: 6px; }
.fx-annots li {
  font-size: 12.5px; color: var(--text-2);
  padding-left: 10px; border-left: 3px solid rgba(255, 196, 0, .75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fx-annots p { margin-top: 6px; font-size: 12.5px; color: var(--text-3); }

@keyframes fx-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 960px) {
  .feature { grid-template-columns: 1fr; gap: 32px; }
  .feature-flip .feature-copy { order: 0; }
  .feature-copy { max-width: 620px; }
  .more-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .nav-inner { height: 58px; }
  .nav-github span { display: none; }
  .nav-link { padding: 0 10px; }
  .hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }
  .hero-line { display: inline; }
  .showcase-caption { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
  .more-list { grid-template-columns: 1fr; gap: 24px; }
  .facts { grid-template-columns: 1fr; gap: 24px; }
  .feature-demo { border-radius: 18px; min-height: 0; padding: 16px; }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 400px) {
  .nav-links { gap: 0; }
  .nav-link { padding: 0 8px; }
  .nav-links .btn { margin-left: 4px; padding: 0 11px; }
}
@media (max-width: 340px) {
  .brand span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .fx-card { transition: none; }
}
