/* =========================================================================
   Piscina Sal — Aqua Voice
   Whisper-weight (200) display type on a near-white paper canvas, a single
   sky-blue drop of colour, hairline borders and millimetre shadows. A calm
   precision-instrument site for saltwater-pool chemistry.
   Standalone stylesheet — replaces engine.css + theme.css entirely.
   ========================================================================= */

/* ---- Fonts (self-hosted, the documented PP Neue Montreal substitute) ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: url('/fonts/inter-200.woff2') format('woff2');
}
@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');
}

/* ---- Tokens ---- */
:root {
  --sky-signal: #67beff;   /* filled CTA + live dot ONLY */
  --electric-iris: #4288ff;/* links, ghost borders, focus, notice accent */
  --paper: #fafbfc;
  --mist: #f3f7fa;
  --fog: #f2f6fa;
  --linen: #e5e8ec;
  --ash: #efefef;
  --inkstone: #292c3d;
  --slate: #3e4150;
  --pewter: #686a76;
  --graphite: #7d7e7e;
  --silver: #c2c3c8;
  --obsidian: #171719;

  --font-display: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --maxw: 1200px;
  --read: 720px;
  --measure: 680px;

  --radius-card: 16px;
  --radius-card-lg: 20px;
  --radius-input: 8px;
  --radius-chip: 9999px;

  --shadow-card: rgba(0,0,0,0.02) 0px 0px 0px 1px, rgba(0,0,0,0.02) 0px 1px 1px 0.5px, rgba(0,0,0,0.02) 0px 3px 3px 1.5px, rgba(0,0,0,0.02) 0px 6px 6px -3px, rgba(0,0,0,0.02) 0px 12px 12px -6px, rgba(0,0,0,0.02) 0px 24px 24px -12px;
  --shadow-lift: rgba(0,0,0,0.06) 0px 0px 0px 1px, rgba(0,0,0,0.06) 0px 1px 1px 0.5px, rgba(0,0,0,0.06) 0px 3px 3px 1.5px, rgba(0,0,0,0.06) 0px 6px 6px -3px, rgba(0,0,0,0.06) 0px 12px 12px -6px, rgba(0,0,0,0.06) 0px 24px 24px -12px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--slate);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
h1, h2, h3, h4, h5 { font-weight: 200; color: var(--inkstone); line-height: 1.1; letter-spacing: 0; }
strong, b { font-weight: 500; color: var(--inkstone); }
::selection { background: rgba(103,190,255,0.24); color: var(--inkstone); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--inkstone);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-input);
  font-size: 0.875rem;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---- Focus ---- */
:focus-visible {
  outline: 2px solid var(--electric-iris);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.container-narrow { max-width: 760px; }
.section { padding-block: clamp(56px, 9vw, 104px); }
.band { background: var(--mist); border-block: 1px solid var(--linen); }

/* Eyebrow / kicker with live dot */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pewter);
  font-weight: 500;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--sky-signal);
  flex: none;
  box-shadow: 0 0 0 4px rgba(103,190,255,0.14);
}
@media (prefers-reduced-motion: no-preference) {
  .dot--live { animation: pulse 2.6s ease-in-out infinite; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(103,190,255,0.16); }
  50% { box-shadow: 0 0 0 6px rgba(103,190,255,0.04); }
}

/* Section heading block */
.section-head { max-width: var(--measure); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-title {
  font-size: clamp(1.75rem, 3.6vw, 2.5rem);
  line-height: 1.08;
  margin-top: 18px;
}
.section-lead {
  margin-top: 18px;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--slate);
}

/* Pills / chips */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-chip);
  border: 1px solid var(--linen);
  background: #fff;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pewter);
  white-space: nowrap;
}

/* Keycap chip — mono value indicators (pH, g/l, formula tokens) */
.keycap {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--linen);
  border-radius: 6px;
  background: #fff;
  box-shadow: inset 0 -1px 0 var(--linen);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--slate);
  line-height: 1.2;
}
.keycap-op {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--silver);
  padding-inline: 2px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-input);
  font-weight: 500;
  font-size: 0.9375rem;
  line-height: 1;
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--sky-signal); color: #fff; }
.btn-primary:hover { background: #52b2ff; }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--slate); }
.btn-ghost:hover { background: var(--ash); }
.btn-outline {
  background: #fff;
  color: var(--slate);
  border: 1px solid var(--linen);
}
.btn-outline:hover { border-color: var(--silver); background: var(--paper); }
.btn-lg { padding: 13px 22px; font-size: 1rem; }

/* Inline text link */
.link {
  color: var(--electric-iris);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(66,136,255,0.4);
  transition: text-decoration-color 0.18s ease, opacity 0.18s ease;
}
.link:hover { text-decoration-color: var(--electric-iris); }

/* Arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  font-size: 0.9375rem;
  color: var(--inkstone);
}
.arrow-link svg { width: 14px; height: 14px; transition: transform 0.2s ease; }
.arrow-link:hover svg { transform: translateX(3px); }

/* =========================================================================
   Announcement bar
   ========================================================================= */
.announce {
  background: var(--obsidian);
  color: #eef1f4;
}
.announce-inner {
  max-width: var(--maxw);
  margin-inline: auto;
  min-height: 40px;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: #c7ccd4;
}
.announce-inner .dot { box-shadow: 0 0 0 3px rgba(103,190,255,0.22); }
.announce a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.announce a:hover { text-decoration-color: #fff; }
.announce .sep { color: #4b4e57; }

/* =========================================================================
   Header / navigation
   ========================================================================= */
.site-header { background: var(--paper); position: relative; z-index: 50; }
.nav {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}
.brand-mark {
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-word {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--inkstone);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 12px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--slate);
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav-link:hover { color: var(--inkstone); background: var(--ash); }
.nav-link.active { color: var(--inkstone); }
.nav-cta-wrap { display: flex; align-items: center; gap: 12px; }
.nav-cta { padding: 9px 15px; font-size: 0.875rem; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--linen);
  border-radius: 8px;
  background: #fff;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--inkstone);
  transition: transform 0.24s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23,23,25,0.28);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s ease;
  z-index: 90;
}
.nav-overlay.open { opacity: 1; visibility: visible; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: min(84vw, 320px);
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 88px 20px 28px;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
    z-index: 100;
    box-shadow: var(--shadow-lift);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-link { padding: 12px 14px; font-size: 1rem; border-radius: 8px; }
  .nav-cta-wrap { display: contents; }
  .nav-cta {
    margin-top: 14px;
    justify-content: center;
    padding: 13px;
    font-size: 1rem;
  }
}

/* =========================================================================
   Hero
   ========================================================================= */
.hero {
  position: relative;
  padding-block: clamp(56px, 9vw, 108px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-radial-gradient(circle at 82% 26%, transparent 0 26px, rgba(148,163,184,0.05) 26px 27px, transparent 27px 54px);
  -webkit-mask-image: radial-gradient(120% 100% at 85% 20%, #000 0%, transparent 62%);
          mask-image: radial-gradient(120% 100% at 85% 20%, #000 0%, transparent 62%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.hero-block { max-width: 720px; }
.hero h1 {
  font-size: clamp(2.25rem, 5.4vw, 3.6rem);
  line-height: 1.04;
  margin-top: 22px;
  color: var(--inkstone);
}
.hero-sub {
  margin-top: 24px;
  max-width: 620px;
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  line-height: 1.58;
  color: var(--slate);
}
.hero-actions {
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Formula strip — the signature "key hint" micro-component */
.formula {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  background: #fff;
  box-shadow: var(--shadow-card);
  max-width: 640px;
}
.formula-label {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 4px;
}
.formula .keycap--accent {
  border-color: rgba(66,136,255,0.4);
  color: var(--electric-iris);
  box-shadow: inset 0 -1px 0 rgba(66,136,255,0.25);
}

/* Hero stat rail */
.hero-stats {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px 48px;
  padding-top: 28px;
  border-top: 1px solid var(--linen);
}
.hero-stat { min-width: 120px; }
.hero-stat-num {
  font-size: 1.75rem;
  font-weight: 200;
  color: var(--inkstone);
  line-height: 1;
  font-feature-settings: "tnum" 1;
}
.hero-stat-label {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--pewter);
  line-height: 1.4;
}

/* =========================================================================
   Cards / article grid
   ========================================================================= */
.grid-articles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 44px;
}

.card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: #d9dde3; }
.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--fog);
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.card-title {
  font-size: 1.25rem;
  font-weight: 200;
  line-height: 1.22;
  color: var(--inkstone);
}
.card-title a { color: inherit; }
.card:hover .card-title a { color: var(--inkstone); }
.card-excerpt {
  margin-top: 12px;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--pewter);
}
.card-meta {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--linen);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--graphite);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.card-foot { margin-top: auto; }
.card-cta { margin-top: 18px; }

/* Featured (spans full width, horizontal on desktop) */
.card-featured {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
  margin-top: 44px;
}
.card-featured .card-media { aspect-ratio: auto; height: 100%; min-height: 300px; }
.card-featured .card-body { padding: clamp(28px, 4vw, 48px); justify-content: center; }
.card-featured .card-title { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.card-featured .card-excerpt { font-size: 1rem; }
@media (max-width: 780px) {
  .card-featured { grid-template-columns: 1fr; }
  .card-featured .card-media { aspect-ratio: 16 / 9; min-height: 0; }
}

/* =========================================================================
   Niche intro / feature rows
   ========================================================================= */
.pillars {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--linen);
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.pillar { background: var(--paper); padding: 28px 26px; }
.pillar-ico {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--linen);
  border-radius: 8px;
  color: var(--electric-iris);
  background: #fff;
}
.pillar-ico svg { width: 18px; height: 18px; }
.pillar h3 { margin-top: 18px; font-size: 1.125rem; font-weight: 400; color: var(--inkstone); }
.pillar p { margin-top: 10px; font-size: 0.9375rem; line-height: 1.55; color: var(--pewter); }
@media (max-width: 760px) {
  .pillars { grid-template-columns: 1fr; }
}

/* Prose intro block (niche paragraphs) */
.intro-prose { max-width: var(--measure); }
.intro-prose p { margin-top: 20px; font-size: 1.0625rem; line-height: 1.65; color: var(--slate); }
.intro-prose p:first-child { margin-top: 0; }
.intro-prose strong { color: var(--inkstone); }

/* =========================================================================
   Value / trust strip
   ========================================================================= */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}
.value-item { display: flex; flex-direction: column; gap: 10px; }
.value-item .num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--silver);
  letter-spacing: 0.1em;
}
.value-item h3 { font-size: 1.1875rem; font-weight: 400; color: var(--inkstone); }
.value-item p { font-size: 0.9375rem; line-height: 1.55; color: var(--pewter); }
@media (max-width: 760px) {
  .values { grid-template-columns: 1fr; gap: 28px; }
}

/* =========================================================================
   Newsletter
   ========================================================================= */
.newsletter {
  border: 1px solid var(--linen);
  border-radius: var(--radius-card-lg);
  background:
    radial-gradient(120% 140% at 88% 0%, rgba(103,190,255,0.06), transparent 55%),
    #fff;
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin-inline: auto;
}
.newsletter h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.12; }
.newsletter p { margin-top: 14px; max-width: 48ch; color: var(--slate); font-size: 1rem; }
.newsletter-form {
  margin-top: 26px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
}
.newsletter-form input[type="email"] {
  flex: 1 1 220px;
  padding: 12px 14px;
  border: 1px solid var(--linen);
  border-radius: var(--radius-input);
  background: var(--paper);
  color: var(--inkstone);
  font-size: 0.9375rem;
}
.newsletter-form input::placeholder { color: var(--silver); }
.newsletter-form input:focus-visible { outline: 2px solid var(--electric-iris); outline-offset: 1px; border-color: transparent; }
.newsletter-note {
  margin-top: 14px;
  font-size: 0.75rem;
  color: var(--graphite);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* =========================================================================
   Footer
   ========================================================================= */
.footer {
  background: var(--mist);
  border-top: 1px solid var(--linen);
  padding-block: 64px 40px;
  margin-top: clamp(64px, 10vw, 120px);
}
.footer-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-desc { font-size: 0.9375rem; line-height: 1.6; color: var(--pewter); max-width: 40ch; }
.footer-col h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.9375rem; color: var(--pewter); transition: color 0.15s ease; }
.footer-links a:hover { color: var(--inkstone); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 44px auto 0;
  padding: 24px 24px 0;
  border-top: 1px solid var(--linen);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--graphite);
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}

/* =========================================================================
   Breadcrumb (also used by shared legal views)
   ========================================================================= */
.breadcrumb { margin-bottom: 28px; }
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--graphite);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.breadcrumb-list li { display: inline-flex; align-items: center; gap: 8px; }
.breadcrumb-list li:not(:last-child)::after {
  content: "/";
  color: var(--silver);
}
.breadcrumb-list a { color: var(--pewter); }
.breadcrumb-list a:hover { color: var(--electric-iris); }
.breadcrumb-list [aria-current="page"] { color: var(--inkstone); }

/* =========================================================================
   Article page
   ========================================================================= */
.article-head { padding-top: clamp(36px, 6vw, 64px); }
.article-head-inner { max-width: 820px; margin-inline: auto; padding-inline: 24px; }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 22px; }
.article-title {
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.06;
  color: var(--inkstone);
}
.article-standfirst {
  margin-top: 22px;
  font-size: clamp(1.125rem, 1.8vw, 1.3125rem);
  line-height: 1.5;
  font-weight: 200;
  color: var(--slate);
}
.byline {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--linen);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--pewter);
}
.byline .sep { color: var(--silver); }
.byline .author { color: var(--inkstone); font-weight: 500; }

.article-cover {
  max-width: 1040px;
  margin: 36px auto 0;
  padding-inline: 24px;
}
.article-cover-frame {
  border-radius: var(--radius-card-lg);
  background: var(--fog);
  border: 1px solid var(--linen);
  padding: 10px;
  box-shadow: var(--shadow-card);
}
.article-cover-frame img {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Body grid: sticky TOC rail + reading column */
.article-shell {
  max-width: 1040px;
  margin: clamp(40px, 6vw, 72px) auto 0;
  padding-inline: 24px;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 32px;
  border-left: 1px solid var(--linen);
  padding-left: 20px;
}
.toc-title {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: 14px;
  font-weight: 500;
}
.toc-list { display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: block;
  padding: 5px 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--pewter);
  transition: color 0.15s ease;
}
.toc-list a:hover { color: var(--electric-iris); }
.toc-list a.active { color: var(--inkstone); }

.toc-mobile { display: none; }

@media (max-width: 940px) {
  .article-shell { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .toc-mobile {
    display: block;
    margin-bottom: 36px;
    border: 1px solid var(--linen);
    border-radius: var(--radius-card);
    background: #fff;
    overflow: hidden;
  }
  .toc-mobile summary {
    list-style: none;
    cursor: pointer;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--slate);
    font-weight: 500;
  }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: "+"; color: var(--silver); font-size: 1rem; }
  .toc-mobile[open] summary::after { content: "−"; }
  .toc-mobile .toc-list { padding: 0 18px 16px; }
  .toc-mobile .toc-list a { font-size: 0.875rem; }
}

/* =========================================================================
   Prose (article body + legal .prose)
   ========================================================================= */
.prose { color: var(--slate); font-size: 1.0625rem; line-height: 1.72; max-width: var(--read); }
.article-shell .prose { max-width: none; }
.prose > * + * { margin-top: 1.25em; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); line-height: 1.1; margin-top: 0; }
.prose h2 {
  font-size: clamp(1.5rem, 2.8vw, 1.875rem);
  font-weight: 200;
  line-height: 1.18;
  color: var(--inkstone);
  margin-top: 2.2em;
  padding-top: 0.6em;
  scroll-margin-top: 24px;
}
.prose h3 {
  font-size: 1.3125rem;
  font-weight: 400;
  color: var(--inkstone);
  margin-top: 1.9em;
  scroll-margin-top: 24px;
}
.prose h4 {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--inkstone);
  margin-top: 1.6em;
  scroll-margin-top: 24px;
}
.prose p { margin-top: 1.25em; }
.prose a:not(.btn) {
  color: var(--electric-iris);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(66,136,255,0.35);
  text-decoration-thickness: 1px;
}
.prose a:not(.btn):hover { text-decoration-color: var(--electric-iris); }
.prose strong { color: var(--inkstone); font-weight: 500; }
.prose ul, .prose ol { margin-top: 1.25em; padding-left: 1.4em; }
.prose ul { list-style: none; }
.prose ul li { position: relative; padding-left: 1.4em; margin-top: 0.6em; }
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  border: 1px solid var(--electric-iris);
}
.prose ol { list-style: decimal; }
.prose ol li { margin-top: 0.6em; padding-left: 0.3em; }
.prose ol li::marker { color: var(--pewter); font-family: var(--font-mono); font-size: 0.85em; }
.prose img {
  border-radius: 14px;
  border: 1px solid var(--linen);
  width: 100%;
}
.prose figure { margin-top: 2em; }
.prose figure svg {
  width: 100%;
  border: 1px solid var(--linen);
  border-radius: 14px;
  background: var(--paper);
  padding: 18px;
  color: var(--inkstone);
}
.prose figcaption {
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--graphite);
  text-align: center;
}
.prose iframe {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--linen);
  margin-top: 2em;
}
.prose hr { border: none; border-top: 1px solid var(--linen); margin-block: 2.4em; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--fog);
  border: 1px solid var(--linen);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--slate);
}

/* Blockquote → notice box (disclaimers, summaries, MITO/REALIDAD, analysis) */
.prose blockquote {
  margin-top: 1.8em;
  padding: 20px 24px;
  border: 1px solid var(--linen);
  border-left: 3px solid var(--electric-iris);
  border-radius: 10px;
  background: var(--mist);
  color: var(--slate);
}
.prose blockquote > * + * { margin-top: 0.7em; }
.prose blockquote p { margin-top: 0.7em; }
.prose blockquote p:first-child { margin-top: 0; }
.prose blockquote strong { color: var(--inkstone); }
.prose blockquote a { text-decoration-color: rgba(66,136,255,0.5); }

/* Tables — horizontal scroll on mobile */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.6em;
  font-size: 0.9375rem;
}
.prose .table-wrap {
  margin-top: 1.6em;
  overflow-x: auto;
  border: 1px solid var(--linen);
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}
.prose .table-wrap table { margin-top: 0; }
.prose th, .prose td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--linen);
  vertical-align: top;
}
.prose thead th {
  background: var(--fog);
  font-weight: 500;
  color: var(--inkstone);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:nth-child(even) td { background: rgba(243,247,250,0.5); }

/* Related articles */
.related { margin-top: clamp(56px, 8vw, 88px); }
.related-inner { max-width: 1040px; margin-inline: auto; padding-inline: 24px; }
.related h2 { font-size: 1.75rem; font-weight: 200; }

/* Article footer nav */
.article-back {
  max-width: 1040px;
  margin: 40px auto 0;
  padding-inline: 24px;
}

/* =========================================================================
   About / Contact / generic prose pages
   ========================================================================= */
.page-head { max-width: 760px; }
.page-head .article-title, .page-title-lg {
  font-size: clamp(2rem, 4.4vw, 2.875rem);
  line-height: 1.06;
  margin-top: 18px;
  color: var(--inkstone);
}
.page-lead { margin-top: 22px; font-size: 1.125rem; line-height: 1.6; color: var(--slate); max-width: 60ch; }

.about-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 56px;
  align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 36px; } }
.about-body p { margin-top: 20px; font-size: 1.0625rem; line-height: 1.7; color: var(--slate); }
.about-body p:first-child { margin-top: 0; }
.about-body strong { color: var(--inkstone); }

.info-card {
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 26px;
  box-shadow: var(--shadow-card);
}
.info-card h3 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  margin-bottom: 16px;
}
.info-card ul { display: flex; flex-direction: column; gap: 12px; }
.info-card li { display: flex; gap: 12px; font-size: 0.9375rem; line-height: 1.5; color: var(--slate); }
.info-card li svg { width: 16px; height: 16px; color: var(--electric-iris); flex: none; margin-top: 3px; }
.info-card + .info-card { margin-top: 20px; }

.notice-box {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px solid var(--linen);
  border-left: 3px solid var(--electric-iris);
  border-radius: 10px;
  background: var(--mist);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--slate);
}

/* Contact */
.contact-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 30px;
  box-shadow: var(--shadow-card);
}
.contact-card .pill { margin-bottom: 16px; }
.contact-card h3 { font-size: 1.25rem; font-weight: 400; color: var(--inkstone); }
.contact-card p { margin-top: 12px; font-size: 0.9375rem; line-height: 1.6; color: var(--pewter); }
.contact-email {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  color: var(--electric-iris);
  word-break: break-all;
}

/* =========================================================================
   Sitemap
   ========================================================================= */
.sitemap-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.sitemap-col h2 {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--graphite);
  font-weight: 500;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--linen);
}
.sitemap-col ul { display: flex; flex-direction: column; }
.sitemap-col li { border-bottom: 1px solid var(--linen); }
.sitemap-col a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 2px;
  font-size: 0.9375rem;
  color: var(--slate);
  transition: color 0.15s ease, padding 0.15s ease;
}
.sitemap-col a:hover { color: var(--electric-iris); padding-left: 8px; }
.sitemap-col a .idx { font-family: var(--font-mono); font-size: 0.75rem; color: var(--silver); }

/* =========================================================================
   Legal prose (.legal-updated) + narrow container
   ========================================================================= */
.legal-updated {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--graphite);
  margin-top: 8px !important;
  margin-bottom: 1.5em;
}
.prose.legal-body h1 { margin-bottom: 0; }

/* =========================================================================
   404
   ========================================================================= */
.notfound {
  min-height: 52vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: 80px;
}
.notfound-code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--electric-iris);
}
.notfound h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); margin-top: 20px; }
.notfound p { margin-top: 18px; color: var(--pewter); max-width: 46ch; margin-inline: auto; }
.notfound-actions { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* =========================================================================
   Cookie banner
   ========================================================================= */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 150;
  max-width: 560px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--linen);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lift);
  padding: 20px 22px;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.3s ease;
}
.cookie-banner.is-visible { transform: translateY(0); opacity: 1; }
.cookie-text { font-size: 0.875rem; line-height: 1.55; color: var(--slate); }
.cookie-text a { color: var(--electric-iris); text-decoration: underline; text-underline-offset: 2px; }
.cookie-actions { margin-top: 16px; display: flex; gap: 10px; }
.cookie-actions .btn { flex: 1; }

/* =========================================================================
   Motion — page-load reveal
   ========================================================================= */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.6s cubic-bezier(0.2,0.7,0.2,1) both; }
  .reveal-1 { animation-delay: 0.04s; }
  .reveal-2 { animation-delay: 0.12s; }
  .reveal-3 { animation-delay: 0.2s; }
  .reveal-4 { animation-delay: 0.28s; }
  @keyframes rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
  }
}

/* =========================================================================
   Utilities
   ========================================================================= */
.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;
}
.stack-lg > * + * { margin-top: clamp(56px, 9vw, 104px); }
