/* neurova-ai.com: shared stylesheet.
 *
 * Monochrome editorial system. There is deliberately no chromatic accent
 * anywhere in this file: emphasis is carried by weight, size, rule and space.
 * Links are identified by an underline rather than a colour, which is both the
 * house style and the accessible choice (WCAG 1.4.1: colour must never be the
 * only means of conveying information).
 *
 * The consent banner and footer-legal rules live in analytics.js because they
 * must apply on every page including any not yet migrated to a layout. Their
 * palette is kept in sync with the tokens below by hand.
 */

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

:root {
  /* Surfaces */
  --paper:    #faf9f6;   /* page background, warm off-white */
  --paper-2:  #f3f1ea;   /* recessed bands: hero, blockquote, cards on paper */
  --card:     #ffffff;   /* lifted surfaces: cards, inputs */

  /* Ink */
  --ink:      #14120f;   /* headings, emphasis, buttons          ~17:1 on paper */
  --ink-2:    #3d3833;   /* body copy at reading size            ~9.7:1 */
  --muted:    #625c56;   /* secondary copy, labels, meta         ~5.9:1 */

  /* Structure */
  --rule:        #e2ded6;  /* decorative hairlines and dividers only */
  --rule-strong: #c9c3b8;  /* soft emphasis: link underlines at rest */
  /* Borders that identify an interactive control must clear 3:1 against the
   * page under WCAG 1.4.11. At #e2ded6 the form fields were 1.16:1, all but
   * invisible on cream, which reads as a broken form as much as an a11y bug. */
  --border-ui:   #948c80;  /* 3.15:1 on paper */

  /* One reading measure for every long-form surface. The hero, the body, the
   * CTA band and the prev/next bar all derive from these two values, so their
   * left edges line up exactly and cannot drift apart in later edits. */
  --measure: 592px;
  --gutter:  1.5rem;

  /* The ambient background wash, ode's device, in neutral. Held as an RGB
   * triplet so the gradient can fade it through several alpha stops; a single
   * hard stop to `transparent` bands into visible rings once blurred. */
  --wash-rgb: 198, 188, 175;
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink-2);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--ink); color: var(--paper); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--rule-strong); border: 3px solid var(--paper); border-radius: 10px; }

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

/* ------------------------------------------------------------- ambient wash
 * A large, heavily blurred organic blob sitting behind hero content. Hosts
 * must clip it (overflow: hidden) or it will widen the page.
 */
.wash-host { position: relative; overflow: hidden; isolation: isolate; }
.wash-host > * { position: relative; z-index: 1; }
.wash-host::before,
.wash-host::after {
  content: ''; position: absolute; z-index: 0; pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(var(--wash-rgb), 0.95) 0%,
    rgba(var(--wash-rgb), 0.72) 32%,
    rgba(var(--wash-rgb), 0.38) 56%,
    rgba(var(--wash-rgb), 0.14) 76%,
    rgba(var(--wash-rgb), 0) 100%);
  filter: blur(70px);
}
.wash-host::before {
  width: 52rem; height: 42rem; top: -8rem; left: 38%;
  border-radius: 62% 38% 54% 46% / 48% 62% 38% 52%;
  opacity: 0.85;
}
.wash-host::after {
  width: 36rem; height: 32rem; bottom: -12rem; left: -10rem;
  border-radius: 44% 56% 62% 38% / 58% 42% 58% 42%;
  opacity: 0.55;
}
@media (max-width: 700px) {
  .wash-host::before { width: 26rem; height: 24rem; left: 30%; filter: blur(60px); }
  .wash-host::after { width: 20rem; height: 18rem; filter: blur(60px); }
}

/* --------------------------------------------------------------------- nav */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 0 5%; height: 72px;
  display: grid; grid-template-columns: 220px 1fr 220px; align-items: center;
  background: rgba(250, 249, 246, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.nav-right { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; }
.nav-logo-link { display: block; overflow: hidden; width: 210px; height: 30px; flex-shrink: 0; }
.nav-logo-img { display: block; width: 262px; height: auto; margin-top: -117px; margin-left: -26px; filter: brightness(0); }
.nav-links { display: flex; gap: 2.1rem; list-style: none; justify-content: center; }
.nav-links a { color: var(--muted); font-size: 0.875rem; font-weight: 500; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--ink); }

/* Buttons. One shape, two weights, no gradients anywhere. */
.nav-cta, .btn-hero, .form-submit, .btn-back {
  display: inline-block; font-family: inherit; text-align: center; cursor: pointer;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  border-radius: 100px; font-weight: 500; white-space: nowrap;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.nav-cta:hover, .btn-hero:hover, .form-submit:hover, .btn-back:hover {
  background: #2c2822; border-color: #2c2822; color: var(--paper);
}
.nav-cta { padding: 0.6rem 1.4rem; font-size: 0.85rem; }
.btn-hero { padding: 0.88rem 2.1rem; font-size: 0.95rem; }
.btn-back { padding: 0.6rem 1.3rem; font-size: 0.83rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.form-submit { padding: 0.88rem 2.1rem; font-size: 0.95rem; }
.form-submit:disabled { opacity: 0.45; cursor: default; }

.nav-hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 900px) {
  /* The CTA stays visible on mobile. Hiding it used to leave phone visitors,
   * the majority of inbound search traffic, with no call to action at all. */
  nav { grid-template-columns: 1fr auto auto; gap: 0.6rem; }
  .nav-links {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    flex-direction: column; gap: 0; padding: 1rem 5%;
  }
  .nav-links.open { display: flex; }
  .nav-links li a { display: block; padding: 0.8rem 0; border-bottom: 1px solid var(--rule); }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-hamburger { display: flex; }
  .nav-cta { padding: 0.5rem 1rem; font-size: 0.8rem; }
}
@media (max-width: 420px) {
  .nav-logo-link { width: 150px; }
  .nav-cta { padding: 0.45rem 0.85rem; font-size: 0.76rem; }
}

/* ------------------------------------------------------- article / page top */
/* Full-bleed so the ambient wash reaches the viewport edges; the inner column
 * is a centred grid track sized to match .page-body exactly, so the hero text
 * and the body text share one left edge. */
.article-hero {
  display: grid; grid-template-columns: minmax(0, var(--measure)); justify-content: center;
  padding: 9rem var(--gutter) 4rem;
  border-bottom: 1px dashed var(--rule);
}
.section-label {
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 1.4rem;
}
.article-hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700;
  letter-spacing: -0.032em; line-height: 1.08; color: var(--ink);
  max-width: 20ch; margin-bottom: 1.2rem;
}
.article-hero .subtitle { color: var(--muted); font-size: 1.06rem; max-width: 52ch; line-height: 1.65; }
.article-meta {
  display: flex; gap: 0.6rem; align-items: center; margin-top: 1.6rem;
  font-family: 'Space Mono', monospace; font-size: 0.7rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* ---------------------------------------------------------- reading columns */
.article-body, .page-body { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 4rem auto 5rem; padding: 0 var(--gutter); }
.article-body p, .page-body p { color: var(--ink-2); font-size: 1.03rem; line-height: 1.78; margin-bottom: 1.5rem; }
.article-body h2, .page-body h2 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.55rem; font-weight: 700;
  letter-spacing: -0.025em; line-height: 1.2; margin: 3.2rem 0 1rem; color: var(--ink);
}
.article-body h3, .page-body h3 {
  font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 600;
  margin: 2.2rem 0 0.75rem; color: var(--ink);
}
.article-body strong, .page-body strong { color: var(--ink); font-weight: 600; }
.article-body ul, .article-body ol, .page-body ul, .page-body ol {
  color: var(--ink-2); font-size: 1.03rem; line-height: 1.78; margin: 0 0 1.5rem 1.2rem;
}
.article-body li, .page-body li { margin-bottom: 0.55rem; }

/* Links: underline, never colour. */
.article-body a, .page-body a, .author-box a, .form-note a, .contact-list a, .solution-item .more, .panel .more {
  color: var(--ink); text-decoration: underline;
  text-decoration-color: var(--rule-strong); text-underline-offset: 3px;
  transition: text-decoration-color 0.18s;
}
.article-body a:hover, .page-body a:hover, .author-box a:hover, .form-note a:hover,
.contact-list a:hover, .solution-item .more:hover, .panel .more:hover { text-decoration-color: var(--ink); }

.callout {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-left: 2px solid var(--ink); border-radius: 4px;
  padding: 1.4rem 1.6rem; margin: 2.2rem 0;
}
.callout p { margin-bottom: 0; font-size: 0.96rem; }

.author-box { border-top: 1px dashed var(--rule); margin-top: 3.5rem; padding-top: 1.6rem; }
.author-box p { color: var(--muted); font-size: 0.92rem; margin-bottom: 0; }
.author-box strong { color: var(--ink); }

/* ---------------------------------------------------------------- CTA bands */
.cta-band { max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto 4.5rem; padding: 0 var(--gutter); }
.cta-inner {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 6px; padding: 2.6rem 2rem; text-align: center;
}
.cta-inner h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.35rem; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 0.7rem; }
.cta-inner p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.5rem; max-width: 46ch; margin-left: auto; margin-right: auto; }
.cta-actions { display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.btn-secondary { font-size: 0.88rem; color: var(--muted); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
.btn-secondary:hover { color: var(--ink); text-decoration-color: var(--ink); }

.article-nav-bar {
  max-width: calc(var(--measure) + var(--gutter) * 2); margin: 0 auto 4.5rem; padding: 2rem var(--gutter) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  border-top: 1px dashed var(--rule);
}
.btn-nav {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.83rem; font-weight: 500; padding: 0.6rem 1.2rem;
  border-radius: 100px; border: 1px solid var(--border-ui); color: var(--muted);
  background: transparent; transition: color 0.18s, border-color 0.18s;
}
.btn-nav:hover { color: var(--ink); border-color: var(--rule-strong); }

/* ------------------------------------------------------------------ footer */
footer { border-top: 1px dashed var(--rule); padding: 5rem 5% 2rem; background: var(--paper-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; max-width: 1180px; margin-left: auto; margin-right: auto; }
.footer-brand p { color: var(--muted); font-size: 0.86rem; line-height: 1.7; max-width: 30ch; margin-top: 0.9rem; }
.footer-logo-link { display: block; overflow: hidden; width: 252px; height: 36px; }
.footer-logo-img { display: block; width: 314px; height: auto; margin-top: -140px; margin-left: -31px; filter: brightness(0); }
.footer-col h4 { font-family: 'Space Mono', monospace; font-size: 0.68rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.2rem; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.footer-col ul li a { font-size: 0.86rem; color: var(--ink-2); transition: color 0.18s; }
.footer-col ul li a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.2rem; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 100px;
  background: transparent; border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); transition: color 0.18s, border-color 0.18s;
}
.footer-social a:hover { color: var(--ink); border-color: var(--rule-strong); }
.footer-bottom {
  border-top: 1px solid var(--rule); padding-top: 1.6rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  max-width: 1180px; margin: 0 auto;
}
.footer-bottom p { font-size: 0.78rem; color: var(--muted); }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .article-nav-bar { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------------------- blog index */
.blog-hero { padding: 9rem 5% 3.5rem; border-bottom: 1px dashed var(--rule); max-width: 1180px; margin: 0 auto; }
.blog-hero .section-label { display: flex; align-items: center; gap: 0.6rem; }
.blog-hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  font-weight: 700; letter-spacing: -0.032em; line-height: 1.08; color: var(--ink); margin-bottom: 1rem;
}
.blog-hero p { color: var(--muted); font-size: 1.06rem; max-width: 52ch; }

.blog-controls { padding: 2.5rem 5% 0; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; gap: 1.1rem; }
.blog-search-input {
  width: 100%; background: var(--card); border: 1px solid var(--border-ui); border-radius: 100px;
  padding: 0.85rem 1.3rem; color: var(--ink); font-family: inherit; font-size: 1rem;
  outline: none; transition: border-color 0.18s;
}
.blog-search-input:focus { border-color: var(--ink); }
.blog-search-input::placeholder { color: var(--muted); }
.blog-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill {
  background: transparent; border: 1px solid var(--border-ui); color: var(--muted);
  padding: 0.4rem 1rem; border-radius: 100px; font-size: 0.75rem;
  font-family: 'Space Mono', monospace; letter-spacing: 0.04em; cursor: pointer;
  transition: border-color 0.18s, color 0.18s, background 0.18s;
}
.pill:hover { border-color: var(--rule-strong); color: var(--ink); }
.pill.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.blog-section { padding: 3rem 5% 7rem; }
.blog-grid {
  max-width: 1180px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 6px; overflow: hidden;
}
.blog-card { background: var(--paper); padding: 2.1rem 1.9rem; display: flex; flex-direction: column; transition: background 0.25s; }
.blog-card:hover { background: var(--card); }
.blog-meta {
  display: flex; gap: 0.5rem; align-items: center; margin-bottom: 0.9rem;
  font-family: 'Space Mono', monospace; font-size: 0.67rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}
.blog-card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.7rem; letter-spacing: -0.02em; line-height: 1.3; }
.blog-card h3 a { color: var(--ink); }
.blog-card h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.blog-card > p { color: var(--muted); font-size: 0.87rem; line-height: 1.65; flex: 1; margin-bottom: 1.3rem; }
.read-more { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--ink); font-weight: 500; transition: gap 0.18s; align-self: flex-start; }
.read-more:hover { gap: 0.7rem; }

@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------- forms */
fieldset { border: 0; margin: 0 0 2.5rem; padding: 0; }
fieldset:last-of-type { margin-bottom: 0; }
legend {
  font-family: 'Space Mono', monospace; font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); padding: 0; margin-bottom: 1.4rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem; margin-bottom: 1.3rem; }
.form-row { display: flex; flex-direction: column; gap: 0.45rem; }
.form-row.full { grid-column: 1 / -1; }
.form-row label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.form-row .hint { font-size: 0.79rem; color: var(--muted); font-weight: 400; }
/* 1rem is a hard floor: iOS Safari force-zooms the viewport when a focused
 * control renders below 16px, which makes the quote form hostile on a phone. */
.form-row input, .form-row select, .form-row textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--border-ui); border-radius: 6px;
  padding: 0.75rem 0.9rem; width: 100%; transition: border-color 0.18s;
}
.form-row textarea { min-height: 100px; resize: vertical; line-height: 1.65; }
/* Validation state must be visible, not just announced. */
.form-row.is-error input, .form-row.is-error select, .form-row.is-error textarea { border-color: var(--ink); border-width: 2px; }
.form-row.is-error > label { font-weight: 700; }
.hero-cta { margin-top: 1.9rem; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--ink); }
.form-row input::placeholder, .form-row textarea::placeholder { color: #7a746b; }
.radio-set { display: flex; gap: 1.3rem; flex-wrap: wrap; padding-top: 0.2rem; }
.radio-set label { display: flex; align-items: center; gap: 0.45rem; font-weight: 400; font-size: 0.9rem; color: var(--ink-2); cursor: pointer; }
.radio-set input { width: auto; accent-color: var(--ink); }
.form-note { font-size: 0.83rem; color: var(--muted); margin-top: 1.1rem; }
.form-error { color: #a3261d; font-size: 0.86rem; margin-top: 0.75rem; }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-submit { width: 100%; }
  .newsletter-form button { width: 100%; }
}

.newsletter-form { display: flex; gap: 0.6rem; max-width: 460px; margin-top: 1.5rem; flex-wrap: wrap; }
.newsletter-form input[type="email"] {
  flex: 1 1 220px; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--border-ui); border-radius: 100px; padding: 0.75rem 1.1rem;
}
.newsletter-form input[type="email"]:focus { outline: none; border-color: var(--ink); }
.newsletter-form button {
  font: inherit; font-size: 0.9rem; font-weight: 500; color: var(--ink);
  background: transparent; border: 1px solid var(--border-ui); border-radius: 100px;
  padding: 0.75rem 1.6rem; cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.newsletter-form button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.newsletter-msg { font-size: 0.85rem; margin-top: 0.8rem; color: var(--muted); }

/* -------------------------------------------------- numbered solution lists */
.solution-list { margin: 2.5rem 0 1rem; }
.solution-item { display: grid; grid-template-columns: 3rem 1fr; gap: 1.3rem; padding: 1.9rem 0; border-top: 1px solid var(--rule); }
.solution-item:last-child { border-bottom: 1px solid var(--rule); }
.solution-num { font-family: 'Space Mono', monospace; font-size: 0.72rem; color: var(--muted); letter-spacing: 0.1em; padding-top: 0.4rem; }
.solution-item h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.18rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.5rem; }
.solution-item h3 a { color: var(--ink); }
.solution-item h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.solution-item p { color: var(--ink-2); font-size: 0.97rem; line-height: 1.75; margin-bottom: 0.7rem; }
.supporting { border-top: 1px dashed var(--rule); margin-top: 3.5rem; padding-top: 2rem; }
.supporting h2 { margin-top: 0; }
@media (max-width: 600px) { .solution-item { grid-template-columns: 1fr; gap: 0.4rem; } .solution-num { padding-top: 0; } }

/* =================================================== homepage: chapter grid */
/* Grid rather than flex: flex column stretches every child to full width, which
 * turns the inline CTA into a 1180px-wide slab. justify-items: start lets each
 * child size to its own content while the column stays centred and capped. */
.home-hero {
  min-height: min(88vh, 820px);
  display: grid; grid-template-columns: minmax(0, 1180px);
  justify-content: center; justify-items: start; align-content: center;
  padding: 10rem 5% 6rem; border-bottom: 1px dashed var(--rule);
}
.home-hero .eyebrow {
  font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2.2rem;
}
.home-hero h1 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(2.3rem, 7vw, 5rem); line-height: 1.02; letter-spacing: -0.038em;
  color: var(--ink); max-width: 16ch; margin-bottom: 1.9rem;
}
.home-hero .sub { font-size: clamp(1.02rem, 1.6vw, 1.18rem); color: var(--ink-2); max-width: 46ch; line-height: 1.6; margin-bottom: 2.8rem; }
.home-hero .hero-meta {
  font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin-top: 3.4rem;
}

.chapter { padding: 7.5rem 5%; border-top: 1px dashed var(--rule); }
.chapter:first-of-type { border-top: none; }
.chapter-inner { max-width: 1180px; margin: 0 auto; }
.chapter-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3.2rem; }
.chapter-num {
  font-family: 'Space Mono', monospace; font-size: 0.68rem; color: var(--muted);
  border: 1px solid var(--rule); border-radius: 100px; padding: 0.22rem 0.6rem; letter-spacing: 0.06em;
}
.chapter-label { font-family: 'Space Mono', monospace; font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* The two-column split is what makes long copy read short: a large headline
 * anchors the left, and the prose runs in a narrow measure on the right. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: 5rem; align-items: start; }
.chapter h2 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.6rem, 3.2vw, 2.4rem); line-height: 1.12; letter-spacing: -0.03em;
  color: var(--ink); max-width: 18ch;
}
.chapter-body p { color: var(--muted); font-size: 1.02rem; line-height: 1.75; margin-bottom: 1.15rem; max-width: 54ch; }
.chapter-body p:last-child { margin-bottom: 0; }
.chapter-body strong { color: var(--ink); font-weight: 600; }
.chapter-body > .btn-hero { margin-top: 1.4rem; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 1.8rem; } .chapter h2 { max-width: 22ch; } }

/* Numbered panels: what we build / why us. */
.panel-list { margin-top: 1rem; }
.panel { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.12fr); gap: 1.5rem 5rem; padding: 2.4rem 0; border-top: 1px solid var(--rule); align-items: start; }
.panel:last-child { border-bottom: 1px solid var(--rule); }
.panel-num { font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; padding-top: 0.35rem; }
.panel h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.022em; line-height: 1.25; color: var(--ink); }
.panel h3 a { color: var(--ink); }
.panel h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.panel p { color: var(--muted); font-size: 0.98rem; line-height: 1.72; margin-bottom: 0.7rem; max-width: 54ch; }
.panel strong { color: var(--ink); font-weight: 600; }
.panel .more { font-size: 0.86rem; }
@media (max-width: 860px) {
  .panel { grid-template-columns: 2.5rem minmax(0, 1fr); gap: 0.6rem 1rem; }
  .panel h3 { grid-column: 2; }
  .panel > div:last-child { grid-column: 2; }
}

/* Process steps. */
.steps { counter-reset: step; margin: 0; list-style: none; }
.steps li { position: relative; padding-left: 3.4rem; margin-bottom: 1.7rem; color: var(--muted); font-size: 1rem; line-height: 1.72; max-width: 54ch; }
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 0; top: 0.2rem;
  font-family: 'Space Mono', monospace; font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em;
}
.steps strong { color: var(--ink); font-weight: 600; }

.contact-list { list-style: none; margin: 0; display: grid; gap: 1.4rem; }
.contact-list li { color: var(--ink-2); font-size: 1rem; }
.contact-list .k { font-family: 'Space Mono', monospace; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 0.3rem; }

.faq-list dt { font-family: 'Space Grotesk', sans-serif; font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 0.5rem; }
.faq-list dd { color: var(--muted); font-size: 0.98rem; line-height: 1.72; margin: 0 0 2rem; max-width: 54ch; }
.faq-list dd:last-child { margin-bottom: 0; }

.closing { padding: 10rem 5%; text-align: center; border-top: 1px dashed var(--rule); }
.closing h2 {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 5.4vw, 3.2rem); letter-spacing: -0.035em; line-height: 1.08;
  color: var(--ink); margin: 0 auto 2.4rem; max-width: 18ch;
}

@media (max-width: 700px) {
  .home-hero { padding: 8rem 5% 4.5rem; }
  .chapter { padding: 4.5rem 5%; }
  .closing { padding: 6rem 5%; }
  .chapter-head { margin-bottom: 2.2rem; }
}

/* -------------------------------------------------------- tables in prose */
.page-body table, .article-body table { width: 100%; border-collapse: collapse; margin: 1.8rem 0; font-size: 0.93rem; }
.page-body td, .page-body th, .article-body td, .article-body th {
  border: 1px solid var(--rule); padding: 0.9rem 1rem; vertical-align: top;
  color: var(--ink-2); line-height: 1.7; text-align: left;
}
.page-body th, .article-body th, .page-body td strong { color: var(--ink); font-weight: 600; }

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