/* =========================================================================
   ayuno-intermitente.com — data-observatory frontend
   Reference brand: Clearbit. Light theme, near-achromatic canvas, one blue
   current. Flat surfaces, hairline borders, no resting shadows, tracking that
   OPENS with size. Built from scratch per DESIGN.md.
   ========================================================================= */

/* ── Fonts (self-hosted; only 400/500/700 files exist) ─────────────────── */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter-700.woff2') format('woff2');
}

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  --ink: #091135;          /* Midnight Ink — all primary text & headings   */
  --electric: #0f77ff;     /* Electric Blue — edges, checks, focus         */
  --cobalt: #127ee3;       /* Cobalt Surface — the one filled action fill  */
  --cobalt-hover: #0e6ac1;
  --slate: #36394a;        /* secondary/muted text                         */
  --frost: #e1e9f0;        /* hairline borders                             */
  --mist: #b1bbcd;         /* soft neutral / deeper dividers               */
  --paper: #ffffff;        /* canvas                                       */
  --lavender: #f5f3ff;     /* section wash                                 */
  --lavender-line: #e7e3fb;

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* type scale — tracking opens with size (px → em feel) */
  --t-caption: 0.875rem;   /* 14 */
  --t-body: 1rem;          /* 16 */
  --t-sub: 1.125rem;       /* 18 */
  --t-h4: 1.25rem;         /* 20 */
  --t-h3: 1.5rem;          /* 24 */
  --t-h2: 2rem;            /* 32 */
  --t-h1: 3.5rem;          /* 56 */
  --t-display: 4rem;       /* 64 */

  --s-8: 8px;   --s-12: 12px; --s-16: 16px; --s-20: 20px; --s-24: 24px;
  --s-32: 32px; --s-40: 40px; --s-48: 48px; --s-64: 64px; --s-80: 80px;
  --s-96: 96px; --s-128: 128px;

  --r-tag: 9999px;
  --r-card: 12px;
  --r-input: 8px;

  --maxw: 1200px;
  --maxw-narrow: 760px;

  --focus: 0 0 0 3px rgba(15, 119, 255, 0.28);
  --focus-ring: 0 0 0 1px var(--electric), 0 1px 2px rgba(12,43,100,.28), 0 6px 16px rgba(12,43,100,.22);
}

/* ── Reset / base ──────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-body);
  line-height: 1.5;
  letter-spacing: 0.008em;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--cobalt); }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; color: var(--ink); line-height: 1.22; }
p { margin: 0; }
ul, ol { margin: 0; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-radius: 4px;
}

/* ── Skip link ─────────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--cobalt);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r-input);
  font-size: var(--t-caption);
  font-weight: 500;
}
.skip-link:focus {
  left: 16px;
  color: #fff;
}

/* ── Layout primitives ─────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: var(--maxw-narrow); }

.band { padding: var(--s-80) 0; }
.band--wash { background: var(--lavender); }
.band--tight { padding: var(--s-48) 0; }

/* full-bleed soft transition helper: no hard borders between white/wash */

/* ── Eyebrow / pill / section head ─────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  font-size: var(--t-caption);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--electric);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--lavender);
  color: var(--ink);
  border: 1px solid var(--lavender-line);
  font-size: var(--t-caption);
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--r-tag);
  letter-spacing: 0.01em;
}
.pill--plain { background: var(--paper); border-color: var(--frost); }

.section-head { max-width: 680px; margin-bottom: var(--s-48); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 {
  font-size: var(--t-h2);
  letter-spacing: 0.016em;
  margin: 0;
}
.section-head p {
  margin-top: 16px;
  font-size: var(--t-sub);
  color: var(--slate);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: var(--t-body);
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 12px 20px;
  border-radius: var(--r-input);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--cobalt); color: #fff; }
.btn--primary:hover { background: var(--cobalt-hover); color: #fff; }
.btn--ghost {
  background: transparent;
  border-color: var(--frost);
  color: var(--ink);
}
.btn--ghost:hover { border-color: var(--mist); color: var(--ink); background: #fff; }
.btn:focus-visible { box-shadow: var(--focus-ring); }
.btn-arrow { transition: transform .18s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ── Header / nav ──────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--frost); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
}
.brand-name { font-size: var(--t-sub); font-weight: 600; letter-spacing: 0.005em; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-size: var(--t-caption);
  font-weight: 500;
  color: var(--slate);
  padding: 8px 14px;
  border-radius: var(--r-input);
  letter-spacing: 0.01em;
  transition: color .16s ease, background .16s ease;
}
.nav-link:hover { color: var(--ink); background: var(--lavender); }
.nav-link.active { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--frost);
  border-radius: var(--r-input);
  background: #fff;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px; right: 11px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .22s ease, opacity .18s ease, top .22s ease;
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 20px; }
.nav-toggle span:nth-child(3) { top: 26px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 20px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 20px; transform: rotate(-45deg); }

.nav-scrim {
  position: fixed;
  inset: 0;
  background: rgba(9,17,53,0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity .24s ease, visibility .24s ease;
  z-index: 90;
}
.nav-scrim.open { opacity: 1; visibility: visible; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  padding: var(--s-96) 0 var(--s-80);
  text-align: center;
}
.hero .pill { margin-bottom: 24px; }
.hero h1 {
  font-size: var(--t-h1);
  letter-spacing: 0.018em;
  max-width: 20ch;
  margin: 0 auto;
}
.hero-sub {
  margin: 24px auto 0;
  max-width: 68ch;
  font-size: var(--t-sub);
  line-height: 1.55;
  color: var(--slate);
}
.hero-actions {
  margin-top: var(--s-32);
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.sourcerow {
  margin-top: var(--s-64);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
}
.sourcerow-label {
  width: 100%;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
  margin-bottom: 4px;
}
.source-chip {
  font-size: var(--t-caption);
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.01em;
  opacity: .75;
}

/* ── Cards & data records (the product-as-hero language) ───────────────── */
.card {
  background: var(--paper);
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  padding: var(--s-24);
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* protocol / data record card */
.record {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color .18s ease, transform .18s ease;
}
.record:hover { border-color: var(--electric); transform: translateY(-3px); }
.record-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.record-title { font-size: var(--t-h4); font-weight: 600; letter-spacing: 0.006em; }
.record-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  background: var(--lavender);
  border-radius: var(--r-tag);
  padding: 4px 10px;
}
.record-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.record-rows li {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: var(--t-caption);
}
.record-rows .rk { color: var(--slate); }
.record-rows .rv { color: var(--ink); font-weight: 500; text-align: right; }
.check {
  width: 16px; height: 16px;
  flex: none;
  color: var(--electric);
}

/* score chip — plain text badge */
.score {
  display: grid;
  place-items: center;
  text-align: center;
  flex: none;
}
.score b { color: var(--electric); font-size: var(--t-sub); font-weight: 700; line-height: 1; }
.score small { display: block; font-size: 9px; color: var(--slate); letter-spacing: .04em; }

/* ── Feature / two-column suspended card ───────────────────────────────── */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-64);
  align-items: center;
}
.feature-body .eyebrow { margin-bottom: 14px; }
.feature-body h2 { font-size: var(--t-h2); letter-spacing: 0.016em; }
.feature-body p { margin-top: 20px; font-size: var(--t-body); color: var(--slate); }
.feature-body .stack-p p { margin-top: 16px; }
.feature-aside .record { transform: translateY(-6px); }

/* ── Article cards (listing) ───────────────────────────────────────────── */
.post {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--paper);
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  transition: border-color .18s ease, transform .18s ease;
}
.post:hover { border-color: var(--electric); transform: translateY(-3px); }
.post-media {
  aspect-ratio: 16 / 9;
  background: var(--lavender);
  border-bottom: 1px solid var(--frost);
  overflow: hidden;
}
.post-media img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: var(--s-24); display: flex; flex-direction: column; gap: 12px; flex: 1; }
.post-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--slate);
  border: 1px solid var(--frost);
  border-radius: var(--r-tag);
  padding: 3px 10px;
}
.post-title { font-size: var(--t-h4); font-weight: 600; letter-spacing: 0.004em; }
.post-title a { color: var(--ink); }
.post-excerpt { font-size: var(--t-caption); color: var(--slate); line-height: 1.55; }
.post-meta {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--frost);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--t-caption);
  color: var(--slate);
}
.post-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--mist); }
.post-more { color: var(--cobalt); font-weight: 500; }

/* featured (wide) variant */
.post--wide {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  overflow: hidden;
}
.post--wide .post-media { aspect-ratio: auto; border-bottom: 0; border-right: 1px solid var(--frost); height: 100%; min-height: 300px; }
.post--wide .post-body { padding: var(--s-40); gap: 16px; }
.post--wide .post-title { font-size: var(--t-h3); }
.post--wide .post-excerpt { font-size: var(--t-body); }

/* ── Page header (interior pages) ──────────────────────────────────────── */
.pagehead { padding: var(--s-64) 0 var(--s-32); }
.pagehead .eyebrow { margin-bottom: 14px; }
.pagehead h1 {
  font-size: var(--t-h2);
  letter-spacing: 0.016em;
  max-width: 20ch;
}
.pagehead .lede { margin-top: 18px; max-width: 62ch; font-size: var(--t-sub); color: var(--slate); }

/* ── Breadcrumb (shared legal views use these classes) ─────────────────── */
.breadcrumb { margin-bottom: var(--s-24); }
.breadcrumb-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0; padding: 0;
  font-size: var(--t-caption);
  color: var(--slate);
}
.breadcrumb-list li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-list li + li::before { content: "/"; color: var(--mist); }
.breadcrumb-list a { color: var(--slate); }
.breadcrumb-list a:hover { color: var(--cobalt); }
.breadcrumb-list [aria-current="page"] { color: var(--ink); }

/* ── Section wrapper used by shared legal fallbacks ────────────────────── */
.section { padding: var(--s-64) 0 var(--s-80); }
.legal-updated { color: var(--slate); font-size: var(--t-caption); margin-top: 8px !important; }

/* ── Prose (legal + article body) ──────────────────────────────────────── */
.prose { color: var(--ink); font-size: var(--t-body); line-height: 1.7; }
.prose > * + * { margin-top: 20px; }
.prose h1 { font-size: var(--t-h2); letter-spacing: 0.016em; margin-top: 0; }
.prose h2 {
  font-size: var(--t-h3);
  font-weight: 600;
  letter-spacing: 0.012em;
  margin-top: 48px;
  padding-top: 8px;
  scroll-margin-top: 96px;
}
.prose h3 {
  font-size: var(--t-h4);
  font-weight: 600;
  margin-top: 32px;
  scroll-margin-top: 96px;
}
.prose h4 { font-size: var(--t-sub); font-weight: 600; margin-top: 24px; scroll-margin-top: 96px; }
.prose p { color: var(--ink); }
.prose a {
  color: var(--cobalt);
  text-decoration: underline;
  text-decoration-color: rgba(18,126,227,.35);
  text-underline-offset: 2px;
}
.prose a:hover { text-decoration-color: var(--cobalt); }
.prose ul, .prose ol { padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.prose li { padding-left: 4px; }
.prose ul li::marker { color: var(--electric); }
.prose ol li::marker { color: var(--slate); font-weight: 600; }
.prose strong { font-weight: 700; color: var(--ink); }
.prose img {
  border-radius: var(--r-card);
  border: 1px solid var(--frost);
  width: 100%;
}
.prose figure { margin: 32px 0; }
.prose figure svg { color: var(--ink); display: block; margin: 0 auto; }
.prose figcaption { margin-top: 10px; font-size: var(--t-caption); color: var(--slate); text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--frost); margin: 40px 0; }
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--lavender);
  border: 1px solid var(--lavender-line);
  border-radius: 6px;
  padding: 1px 6px;
}

/* blockquote → notice box (disclaimers, En resumen, Nuestro análisis) */
.prose blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: var(--lavender);
  border: 1px solid var(--lavender-line);
  border-left: 3px solid var(--electric);
  border-radius: var(--r-card);
  color: var(--ink);
}
.prose blockquote p { color: var(--ink); }
.prose blockquote > * + * { margin-top: 10px; }
.prose blockquote strong { color: var(--ink); }

/* tables — comparison; scroll horizontally on small screens */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-caption);
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  overflow: hidden;
}
.prose thead th {
  background: var(--lavender);
  color: var(--ink);
  font-weight: 600;
  text-align: left;
}
.prose th, .prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--frost);
  vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody tr:nth-child(even) { background: #fbfcfe; }

/* youtube embed wrapper (content ships inline styles too) */
.prose .youtube-embed { border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--frost); }
.prose .youtube-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ── Article page anatomy ──────────────────────────────────────────────── */
.article-head { padding: var(--s-48) 0 var(--s-32); }
.article-head .breadcrumb { margin-bottom: var(--s-24); }
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.article-title {
  font-size: var(--t-h2);
  letter-spacing: 0.014em;
  max-width: 22ch;
  line-height: 1.16;
}
.article-standfirst {
  margin-top: 20px;
  max-width: 64ch;
  font-size: var(--t-sub);
  line-height: 1.55;
  color: var(--slate);
}
.byline {
  margin-top: var(--s-24);
  padding-top: var(--s-24);
  border-top: 1px solid var(--frost);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: var(--t-caption);
  color: var(--slate);
}
.byline .who { color: var(--ink); font-weight: 500; }
.byline .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--mist); }
.article-cover {
  margin-top: var(--s-32);
  border-radius: var(--r-card);
  overflow: hidden;
  border: 1px solid var(--frost);
}
.article-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

.article-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: var(--s-64);
  align-items: start;
  padding-bottom: var(--s-80);
}
.toc {
  position: sticky;
  top: 92px;
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  padding: 20px;
  background: var(--paper);
}
.toc-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--electric);
  margin-bottom: 14px;
}
.toc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: block;
  font-size: var(--t-caption);
  color: var(--slate);
  padding: 7px 10px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  line-height: 1.35;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.toc-list a:hover { color: var(--ink); background: var(--lavender); }
.toc-list a.active { color: var(--ink); background: var(--lavender); border-left-color: var(--electric); }

/* related */
.related { border-top: 1px solid var(--frost); padding: var(--s-64) 0 var(--s-80); }

/* ── Simple prose article aside notice (YMYL small print) ──────────────── */
.mininote {
  margin-top: var(--s-24);
  font-size: var(--t-caption);
  color: var(--slate);
}

/* ── Contact / about panels ────────────────────────────────────────────── */
.panel {
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  padding: var(--s-32);
  background: var(--paper);
}
.panel--wash { background: var(--lavender); border-color: var(--lavender-line); }
.kv { display: flex; flex-direction: column; gap: 4px; margin-bottom: 20px; }
.kv .k { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--slate); }
.kv .v { font-size: var(--t-body); color: var(--ink); font-weight: 500; }
.kv .v a { color: var(--cobalt); }

/* sitemap columns */
.sitemap-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-32); }
.sitemap-col h2 { font-size: var(--t-h4); font-weight: 600; margin-bottom: 16px; }
.sitemap-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sitemap-list a {
  display: block;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: var(--t-caption);
  color: var(--slate);
  border: 1px solid transparent;
}
.sitemap-list a:hover { color: var(--ink); background: var(--lavender); }

/* ── Newsletter ────────────────────────────────────────────────────────── */
.newsletter { padding: var(--s-80) 0; }
.newsletter-card {
  border: 1px solid var(--lavender-line);
  background: var(--lavender);
  border-radius: var(--r-card);
  padding: var(--s-48);
  text-align: center;
}
.newsletter-card .eyebrow { margin-bottom: 14px; }
.newsletter-card h2 { font-size: var(--t-h3); letter-spacing: 0.012em; }
.newsletter-card p { margin: 14px auto 0; max-width: 52ch; color: var(--slate); }
.newsletter-form {
  margin: var(--s-32) auto 0;
  max-width: 480px;
  display: flex;
  gap: 10px;
}
.field {
  flex: 1;
  font-size: var(--t-body);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--frost);
  border-radius: var(--r-input);
  padding: 12px 14px;
}
.field::placeholder { color: var(--mist); }
.field:focus-visible { box-shadow: var(--focus-ring); border-color: var(--electric); }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--frost);
  background: var(--paper);
  padding: var(--s-64) 0 var(--s-40);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--s-48);
}
.footer-brand-desc { margin-top: 16px; max-width: 42ch; font-size: var(--t-caption); color: var(--slate); line-height: 1.6; }
.footer-col h2 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--slate);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: var(--t-caption); color: var(--slate); }
.footer-links a:hover { color: var(--cobalt); }
.footer-bottom {
  margin-top: var(--s-48);
  padding-top: var(--s-24);
  border-top: 1px solid var(--frost);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  font-size: var(--t-caption);
  color: var(--slate);
}
.footer-bottom .disc { max-width: 70ch; }

/* ── Cookie banner ─────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 150;
  background: #fff;
  border: 1px solid var(--frost);
  border-radius: var(--r-card);
  box-shadow: 0 8px 30px rgba(12,43,100,.14);
  padding: 20px 22px;
  max-width: 640px;
  margin: 0 auto;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .3s ease, opacity .3s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-text { font-size: var(--t-caption); color: var(--slate); line-height: 1.55; }
.cookie-text a { color: var(--cobalt); text-decoration: underline; }
.cookie-actions { margin-top: 16px; display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; }

/* ── 404 ───────────────────────────────────────────────────────────────── */
.notfound { padding: var(--s-128) 0; text-align: center; }
.notfound .code {
  font-size: 5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  line-height: 1;
}
.notfound h1 { font-size: var(--t-h3); margin-top: 20px; }
.notfound p { margin: 16px auto 0; max-width: 46ch; color: var(--slate); }
.notfound .hero-actions { margin-top: 28px; }

/* ── Utilities ─────────────────────────────────────────────────────────── */
.stack-16 > * + * { margin-top: 16px; }
.mt-48 { margin-top: var(--s-48); }
.center { text-align: center; }
.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;
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
  :root { --t-h1: 2.75rem; --t-h2: 1.75rem; }
  .feature { grid-template-columns: 1fr; gap: var(--s-32); }
  .feature-aside .record { transform: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .article-layout { grid-template-columns: 1fr; gap: var(--s-32); }
  .toc { position: static; top: auto; }
  .post--wide { grid-template-columns: 1fr; }
  .post--wide .post-media { border-right: 0; border-bottom: 1px solid var(--frost); min-height: 220px; aspect-ratio: 16/9; }
  .sitemap-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .nav-links, .nav-actions .btn { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex;
    position: fixed;
    top: 0; right: 0;
    width: min(82vw, 320px);
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-left: 1px solid var(--frost);
    padding: 88px 20px 24px;
    z-index: 95;
    overflow-y: auto;
    animation: drawerIn .26s ease;
  }
  .nav-links.open .nav-link { padding: 14px 16px; font-size: var(--t-body); border-radius: var(--r-input); }
  .nav-links.open .nav-link:hover { background: var(--lavender); }
  @keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
  .hero { padding: var(--s-64) 0 var(--s-48); }
  .band { padding: var(--s-64) 0; }
}

@media (max-width: 560px) {
  .container { padding: 0 18px; }
  :root { --t-h1: 2.25rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .sitemap-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .newsletter-card { padding: var(--s-32) 22px; }
  .cookie-actions { flex-direction: column; }
  .hero h1 { max-width: none; }
}
