/* ==========================================================================
   SpeakoFlow blog — the single stylesheet for /blog

   This file replaces the ~140-line <style> block that used to be pasted into
   every post plus the old blog-components.css. Every blog page loads exactly
   this one file, so a layout fix here fixes every article at once.

   Structure
     1  Tokens
     2  Reset and base
     3  Header, nav, reading progress
     4  Shell and article grid (prose measure + wider break-out)
     5  Sticky rail: on this page
     6  Article masthead
     7  Prose: flow, headings, lists, links
     8  Blocks: takeaways, disclosure, key point, pull quote, callout, steps
     9  Data: tables, stats, cost bars, pros and cons, decision, figures
     10 Close: FAQ, author, CTA, related posts
     11 Blog index
     12 Footer, utilities, reduced motion, print

   Cascade rule: the prose flow selector is wrapped in :where() so it carries
   zero specificity. Component classes therefore always win on their own
   margins instead of fighting a lobotomised-owl rule.
   ========================================================================== */

/* 1 ------------------------------------------------------------ Tokens --- */
:root {
  /* Surface and ink */
  --bg: #f3f7f5;
  --bg-2: #e8f0ec;
  --surface: #ffffff;
  --ink: #16191a;
  --ink-2: #474e4c;
  --muted: #5c625e;            /* 5.4:1 on --bg; the old #696f6b was borderline */
  --line: rgba(18, 32, 28, 0.09);
  --line-2: rgba(18, 32, 28, 0.14);

  /* Brand */
  --teal: #14b8a6;
  --teal-ink: #0a7a70;
  --teal-deep: #075e57;
  --teal-wash: #d7efe9;
  --teal-wash-2: #eaf6f2;
  --iris: #6366f1;
  --iris-ink: #4338ca;
  --iris-wash: #eceefb;
  --clay: #8c5427;             /* the "cons" side; reads as ink, not as alarm */

  /* Depth */
  --shadow-sm: 0 1px 2px rgba(12, 44, 40, 0.05), 0 2px 8px rgba(12, 44, 40, 0.06);
  --shadow-md: 0 8px 24px rgba(12, 44, 40, 0.09), 0 2px 8px rgba(12, 44, 40, 0.06);
  --shadow-lg: 0 30px 70px -24px rgba(12, 44, 40, 0.20), 0 12px 28px -18px rgba(12, 44, 40, 0.14);
  --ring: 0 0 0 3px rgba(10, 125, 116, 0.45);

  /* Type */
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;

  /* Layout */
  --shell: 1180px;             /* header, footer, and the article grid agree */
  --gutter: clamp(1.25rem, 5vw, 2rem);
  --rail: 12rem;
  --rail-gap: clamp(2rem, 4vw, 3rem);
  --measure: 44rem;            /* ~68ch of prose */
  --wide: min(100%, 53rem);    /* tables, charts, figures break out of measure */
  --header-h: 4.25rem;

  /* Spacing scale — 1.5-ish steps, used for vertical rhythm */
  --s-1: 0.375rem;
  --s-2: 0.625rem;
  --s-3: 1rem;
  --s-4: 1.4rem;
  --s-5: 2.25rem;
  --s-6: 3.25rem;
  --s-7: 4.5rem;

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* z-scale, named rather than arbitrary */
  --z-sticky: 30;
  --z-header: 40;
}

/* 2 --------------------------------------------------- Reset and base --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink-2);
  font-size: 1.0625rem;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (min-width: 40rem) {
  body { font-size: 1.125rem; }
}

img, svg, video { display: block; max-width: 100%; }

a { color: var(--teal-ink); text-decoration: none; }
a:hover { color: var(--teal-deep); }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
::selection { background: rgba(22, 182, 164, 0.26); color: var(--ink); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: 0.5rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transform: translateY(-160%);
  transition: transform 0.18s var(--ease);
}
.skip-link:focus-visible { transform: translateY(0); }

/* 3 --------------------------------- Header, nav, reading progress ------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 0.8rem var(--gutter);
}
.nav-logo { width: 160px; height: auto; }

.nav-links {
  display: none;
  align-items: center;
  gap: 1.4rem;
  margin-left: 0.5rem;
  margin-right: auto;
  padding-left: 1.4rem;
  border-left: 1px solid var(--line-2);
  font-size: 0.95rem;
  font-weight: 600;
}
.nav-links a { color: var(--ink-2); }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--teal-deep); }
@media (min-width: 48rem) {
  .nav-links { display: flex; }
}

.nav-actions { display: flex; align-items: center; gap: 0.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  padding: 0.62rem 1.05rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn-primary { background: var(--teal); color: #06302c; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-deep); color: #eafff9; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--teal-ink); color: var(--teal-ink); }
.btn-lg { padding: 0.82rem 1.4rem; font-size: 1rem; }

/* Reading progress. Scroll-driven where supported; invisible everywhere else,
   so it never needs JavaScript and never blocks content. */
.progress {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  transform: scaleX(0);
  transform-origin: 0 50%;
}
@supports (animation-timeline: scroll()) {
  .progress > span {
    animation: sf-progress linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes sf-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* 4 ------------------------------------- Shell and article grid --------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.article { padding-block: clamp(2rem, 5vw, 3.25rem) clamp(3rem, 8vw, 6rem); }

/* Source order is masthead → contents → body, which is the right reading order
   on a phone. On desktop the contents list is lifted into the left margin with
   explicit grid placement, so no markup is duplicated per breakpoint. */
.article-layout { display: block; }

@media (min-width: 68rem) {
  .article-layout {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    column-gap: var(--rail-gap);
    align-items: start;
  }
  .article-head { grid-column: 2; grid-row: 1; }
  .article-layout > .toc { grid-column: 1; grid-row: 2; }
  .article-body { grid-column: 2; grid-row: 2; min-width: 0; }
}

.article-main { min-width: 0; }

/* A long URL, package name, or product string must never push the column
   sideways. Inherited, so it covers headings, cells, and captions too. */
.article-head,
.article-body,
.toc { overflow-wrap: break-word; }

/* One centring rule for the whole article: prose sits at --measure, and the
   listed blocks break out to --wide so the page is not one flat column. */
.article-masthead,
.article-body > * {
  max-width: var(--measure);
  margin-inline: auto;
}
.article-body > .table-wrap,
.article-body > .figure,
.article-body > .costchart,
.article-body > .proscons,
.article-body > .statgrid,
.article-body > .decision,
.article-body > .related,
.article-body > .cta,
.article-body > .wide {
  max-width: var(--wide);
}

/* 5 ------------------------------------------------ Sticky rail --------- */
.article-layout > .toc { margin-bottom: var(--s-5); }

.toc {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1rem 1.15rem;
  font-size: 0.9rem;
}
.toc-title {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc li + li { margin-top: 0.1rem; }
.toc a {
  display: block;
  padding: 0.28rem 0;
  color: var(--muted);
  line-height: 1.45;
  text-decoration: none;
}
.toc a::before {
  content: counter(toc) ".";
  display: inline-block;
  width: 1.35em;
  font-family: var(--font-mono);
  font-size: 0.82em;
  color: var(--line-2);
}
.toc a:hover { color: var(--teal-deep); }
.toc a[aria-current="true"] { color: var(--teal-deep); font-weight: 700; }
.toc a[aria-current="true"]::before { color: var(--teal); }

/* On the desktop rail the box dissolves: it is marginalia, not a card. */
@media (min-width: 68rem) {
  .article-layout > .toc {
    position: sticky;
    top: calc(var(--header-h) + 1.75rem);
    margin-bottom: 0;
    max-height: calc(100vh - var(--header-h) - 4rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    padding: 0.15rem 0 0.15rem 1.1rem;
    font-size: 0.855rem;
  }
  .toc-title {
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 0.7rem;
  }
}
@media (max-width: 67.99rem) {
  .toc ol { columns: 2; column-gap: 1.5rem; }
  .toc li { break-inside: avoid; }
}
@media (max-width: 30rem) {
  .toc ol { columns: 1; }
}

/* 6 ------------------------------------------- Article masthead --------- */
.breadcrumbs {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: var(--s-4);
}
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--teal-ink); }
.breadcrumbs [aria-current] { color: var(--ink-2); }

.tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--teal-deep);
  background: var(--teal-wash-2);
  border: 1px solid var(--teal-wash);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
}

.article-title {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0.85rem 0 0.75rem;
}
.article-dek {
  font-size: clamp(1.12rem, 2.2vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 40ch;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.75rem;
  margin-top: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}
.article-meta > * { white-space: nowrap; }
/* Separator belongs to the item, so a wrap can never leave an orphan dot. */
.article-meta > * + *::before {
  content: "·";
  margin-right: 0.75rem;
  color: var(--line-2);
}
.article-meta a { color: var(--ink-2); font-weight: 600; }
.article-meta a:hover { color: var(--teal-deep); }
/* On a narrow screen the row wraps, and a wrapped separator would lead the new
   line. Stack instead and drop the separators entirely. */
@media (max-width: 34rem) {
  .article-meta { flex-direction: column; align-items: flex-start; gap: 0.15rem; }
  .article-meta > * + *::before { content: none; margin: 0; }
}

/* Optional hero image. A real product shot, not a coloured panel. */
.article-hero {
  max-width: var(--wide);
  margin: var(--s-5) auto 0;
}
.article-hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--bg-2);
}
/* For a source whose own proportions must survive (a tall window, a 5:4 shot). */
.article-hero.is-natural img {
  aspect-ratio: auto;
  object-fit: fill;
  max-width: 44rem;
  margin-inline: auto;
  border-radius: var(--radius-md);
}
.article-hero figcaption {
  margin-top: 0.7rem;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--muted);
}

/* 7 -------------------------------------------------------- Prose ------- */
.article-body { margin-top: var(--s-5); }

/* Zero-specificity flow so every component below can set its own spacing. */
:where(.article-body) > * + * { margin-top: var(--s-4); }
:where(.article-body) > p + p { margin-top: 1.15rem; }

.article-body > h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.55rem, 3vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.028em;
  text-wrap: balance;
  margin-top: var(--s-7);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}
.article-body > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

.article-body h3 {
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--ink);
  font-size: clamp(1.15rem, 2vw, 1.32rem);
  line-height: 1.3;
  letter-spacing: -0.015em;
  margin-top: var(--s-5);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.article-body p { color: var(--ink-2); text-wrap: pretty; }
.article-body strong { color: var(--ink); font-weight: 700; }
.article-body em { font-style: italic; }

.article-body ul,
.article-body ol { padding-left: 1.35rem; color: var(--ink-2); }
.article-body li + li { margin-top: 0.45rem; }
.article-body li::marker { color: var(--teal); }

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(10, 125, 116, 0.35);
  transition: text-decoration-color 0.15s var(--ease);
}
.article-body a:hover { text-decoration-color: var(--teal-ink); }

.lead {
  font-size: clamp(1.15rem, 2vw, 1.3rem);
  line-height: 1.58;
  color: var(--ink);
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-2);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  color: var(--ink);
}
kbd {
  font-family: var(--font-mono);
  font-size: 0.82em;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.15rem 0.45rem;
  color: var(--ink);
  white-space: nowrap;
}

hr {
  height: 1px;
  border: 0;
  background: var(--line);
  margin-block: var(--s-6);
}

/* 8 -------------------------------------------------------- Blocks ------ */
/* Key takeaways — the first thing a reader and a model both see. */
.takeaways {
  background: var(--teal-wash-2);
  border: 1px solid var(--teal-wash);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  margin-top: var(--s-5);
}
.takeaways h2 {
  margin: 0 0 0.6rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.005em;
  color: var(--teal-deep);
  border: 0;
  padding: 0;
}
.takeaways ul { margin: 0; padding-left: 1.15rem; font-size: 0.98rem; }
.takeaways li { color: var(--ink-2); }
.takeaways li::marker { color: var(--teal); }

/* Affiliation disclosure. Deliberately quiet, deliberately present. */
.disclosure {
  margin-top: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
}
.disclosure p { margin: 0; font-size: 0.875rem; line-height: 1.6; color: var(--muted); }
.disclosure strong { color: var(--ink-2); }

/* Per-section key point. Full border and a tint, no side stripe. */
.keypoint {
  margin-block: var(--s-5);
  border: 1px solid var(--teal-wash);
  border-radius: var(--radius-md);
  background: var(--teal-wash-2);
  padding: 1.05rem 1.25rem;
}
.keypoint-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--teal-deep);
  margin-bottom: 0.3rem;
}
.keypoint-label::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--teal);
}
.keypoint p { margin: 0; font-size: 0.98rem; color: var(--ink-2); }

/* Pull quote. The quote mark carries it; no rules, no stripe. */
.pullquote {
  position: relative;
  margin-block: var(--s-6);
  padding-top: 1.9rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.8vw, 1.75rem);
  line-height: 1.36;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.pullquote::before {
  content: "\201C";
  position: absolute;
  top: -0.35rem;
  left: -0.06em;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--teal);
  opacity: 0.4;
}

/* Aside callout. */
.callout {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-block: var(--s-5);
  background: var(--iris-wash);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 1.05rem 1.25rem;
}
.callout .mark {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--iris);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.callout p { margin: 0; font-size: 0.96rem; color: var(--ink-2); }

/* Numbered steps. Single source of truth for the counter — the old build
   incremented it here and again in the inline block, so steps read 2, 4, 6. */
.steps {
  margin-block: var(--s-5);
  padding-left: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  min-height: 2rem;
}
.steps > li + li { margin-top: 1.1rem; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-wash);
  border: 1px solid var(--teal-wash);
  color: var(--teal-deep);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}
.steps strong { color: var(--ink); }

/* 9 ---------------------------------------------------------- Data ------ */
.table-wrap {
  margin-block: var(--s-5);
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  min-width: 34rem;
}
caption {
  text-align: left;
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.85rem 1.1rem 0.35rem;
}
th, td {
  text-align: left;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
thead th {
  background: var(--bg-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
tbody th { font-weight: 700; color: var(--ink); }
tbody tr:last-child td,
tbody tr:last-child th { border-bottom: none; }
/* Our column is tinted as well as bold, so the signal is not colour alone. */
td.cell-yes { color: var(--teal-deep); font-weight: 700; background: var(--teal-wash-2); }

.statgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin-block: var(--s-5);
}
.statgrid .stat {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.05rem 1.15rem;
}
.statgrid .stat-num {
  display: block;
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--teal-deep);
}
.statgrid .stat-label {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.83rem;
  line-height: 1.45;
  color: var(--muted);
}

.costchart {
  margin-block: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.3rem 1.4rem;
}
.costchart h3 {
  margin: 0 0 0.2rem;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
}
.costchart .costchart-sub { margin: 0 0 1.1rem; font-size: 0.85rem; color: var(--muted); }
.costrow {
  display: grid;
  grid-template-columns: minmax(6rem, 8.5rem) 1fr auto;
  align-items: center;
  gap: 0.85rem;
}
.costrow + .costrow { margin-top: 0.7rem; }
.costrow .costrow-name { font-size: 0.88rem; font-weight: 700; color: var(--ink); line-height: 1.35; }
.costrow .costrow-track {
  background: var(--bg-2);
  border-radius: 999px;
  height: 0.95rem;
  overflow: hidden;
}
.costrow .costrow-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #a97136, #d0a05e);
}
.costrow.is-us .costrow-fill {
  background: linear-gradient(90deg, var(--teal-deep), var(--teal));
  min-width: 4px;
}
.costrow .costrow-val {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  white-space: nowrap;
}
.costchart .costchart-note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}
@media (max-width: 34rem) {
  .costrow { grid-template-columns: 1fr auto; }
  .costrow .costrow-track { grid-column: 1 / -1; order: 3; }
}

.proscons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin-block: var(--s-5);
}
.proscons > div {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  background: var(--surface);
}
.proscons h3,
.proscons h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.proscons .pros h3,
.proscons .pros h4 { color: var(--teal-deep); }
.proscons .cons h3,
.proscons .cons h4 { color: var(--clay); }
.proscons ul { margin: 0; padding-left: 1.1rem; font-size: 0.93rem; }
.proscons li + li { margin-top: 0.4rem; }
.proscons .pros li::marker { color: var(--teal); }
.proscons .cons li::marker { color: var(--clay); }

.decision {
  margin-block: var(--s-5);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
}
.decision-head {
  background: var(--bg-2);
  padding: 0.8rem 1.2rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}
.decision dl { margin: 0; }
.decision-row {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 0.35rem 1.3rem;
  padding: 0.9rem 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.94rem;
}
.decision-row dt { font-weight: 700; color: var(--ink); }
.decision-row dd { margin: 0; color: var(--ink-2); }
@media (max-width: 40rem) {
  .decision-row { grid-template-columns: 1fr; }
}

.figure { margin-block: var(--s-6); }
.figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background: var(--surface);
}
.figure figcaption {
  margin-top: 0.8rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
}
.figure figcaption strong { color: var(--ink-2); font-weight: 700; }
.figure-narrow img { max-width: 24rem; margin-inline: auto; }

/* 10 --------------------------------------------------------- Close ----- */
.faq { margin-top: var(--s-4); border-top: 1px solid var(--line); }
.faq-item { padding-block: 1.15rem; border-bottom: 1px solid var(--line); }
.faq-item h3 { margin-top: 0; font-size: 1.1rem; }
.faq-item p { margin-top: 0.35rem; font-size: 0.98rem; }

.author-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-top: var(--s-6);
  padding: 1.25rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.author-monogram {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--teal-wash);
  color: var(--teal-deep);
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.author-card .author-name { font-weight: 800; color: var(--ink); font-size: 0.98rem; }
.author-card .author-bio {
  margin-top: 0.2rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
}

/* Related reading — the article should not dead-end. */
.related { margin-top: var(--s-6); }
.related h2 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.85rem;
  border: 0;
  padding: 0;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0.85rem;
}
.related-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 1.05rem 1.15rem;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}
.related-card:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.related-card .related-kind {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--teal-deep);
}
.related-card .related-title {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  text-decoration: none;
}

/* Buttons and whole-card links are not prose, so the prose underline is wrong. */
.article-body .btn,
.article-body .related-card { text-decoration: none; }

/* Closing CTA. The one saturated panel on the page: teal carries the brand
   at the moment of asking. */
.cta {
  margin-top: var(--s-7);
  background: var(--teal-deep);
  background-image: radial-gradient(120% 120% at 15% 0%, rgba(20, 184, 166, 0.45), transparent 60%);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-lg);
  color: #d9f2ee;
  text-align: center;
}
.cta h2 {
  font-family: var(--font-sans);
  font-weight: 800;
  color: #ffffff;
  font-size: clamp(1.45rem, 3.2vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0 0 0.55rem;
  border: 0;
  padding: 0;
}
.cta p { color: #cbe9e4; margin: 0 auto 1.4rem; max-width: 46ch; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; justify-content: center; }
.cta .btn-primary { background: #ffffff; color: #06302c; }
.cta .btn-primary:hover { background: #d7efe9; color: #06302c; }
.cta .btn-ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }
.cta .btn-ghost:hover { border-color: #ffffff; color: #ffffff; background: rgba(255, 255, 255, 0.1); }
.cta-note {
  margin: 1.1rem auto 0;
  max-width: none;
  font-size: 0.85rem;
  color: rgba(217, 242, 238, 0.8);
}

/* 11 ---------------------------------------------------- Blog index ----- */
.blog-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--s-5); }
.blog-title {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-wrap: balance;
  margin: 0.8rem 0 0.6rem;
}
.blog-sub {
  font-size: clamp(1.1rem, 2.2vw, 1.35rem);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

.post-list {
  padding-bottom: clamp(3rem, 8vw, 6rem);
  display: grid;
  gap: 1.1rem;
}
.post-card {
  display: grid;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.15rem, 2.5vw, 1.5rem);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              border-color 0.2s var(--ease);
}
.post-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal);
}
@media (min-width: 46rem) {
  .post-card { grid-template-columns: 15rem 1fr; align-items: center; }
}
.post-thumb {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.post-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.post-card h2 {
  font-weight: 800;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0.7rem 0 0.45rem;
  text-wrap: balance;
}
.post-card p { color: var(--ink-2); font-size: 0.98rem; }
.post-meta {
  margin-top: 0.85rem;
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.7rem;
}
.post-meta > * { white-space: nowrap; }
.post-meta > * + *::before {
  content: "·";
  margin-right: 0.7rem;
  color: var(--line-2);
}
.read-more {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--teal-ink);
}
.post-card:hover .read-more { color: var(--teal-deep); }
.read-more .arrow { transition: transform 0.2s var(--ease); }
.post-card:hover .read-more .arrow { transform: translateX(3px); }

/* 12 --------------------------- Footer, utilities, motion, print -------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  margin-top: var(--s-6);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem 1.35rem; font-size: 0.9rem; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--teal-ink); }
.footer-fine { font-size: 0.85rem; color: var(--muted); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@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;
    scroll-behavior: auto !important;
  }
  .post-card:hover,
  .related-card:hover,
  .btn-primary:hover { transform: none; }
}

@media print {
  .site-header, .toc, .cta, .site-footer, .progress { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .article-body > * , .article-masthead { max-width: none; }
  a { text-decoration: underline; }
}
