/* The Hardware Path
   A guidebook layout: white reading surfaces, deep navy ink, one confident blue.
   Lora for headings, Inter for reading and interface. Fonts are self-hosted. */

@font-face { font-family: "Lora"; src: url("../fonts/lora-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-italic.woff") format("woff"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --ink: #13233d;
  --text: #2d3b50;
  --muted: #5b6a7f;
  --line: #e2e8f0;
  --line-2: #cfd9e6;
  --paper: #ffffff;
  --tint: #f5f8fc;
  --tint-2: #eaf1fb;
  --blue: #1f5ac6;
  --blue-dk: #18479f;
  --blue-soft: #edf3fd;
  --blue-edge: #d3e1f7;
  --navy: #0f2240;
  --amber: #8a5300;
  --amber-bg: #fff8ea;
  --amber-edge: #f2ddb2;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1200px;
  --head-h: 68px;

  /* consumed by the inline diagrams */
  --draw: var(--ink);
  --hot: var(--blue);
  --bg: var(--paper);
  --font-sans: var(--sans);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head-h) + 24px); }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--blue-dk); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); margin: 0; text-wrap: balance; }
h1, h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.012em; line-height: 1.16; }
h3, h4 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 10px 14px; z-index: 100; font-weight: 600; border-radius: 8px; }
.skip:focus { left: 12px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 1rem/1 var(--sans); letter-spacing: -0.005em;
  padding: 15px 22px; border-radius: 10px; text-decoration: none;
  background: var(--blue); color: #fff; border: 1.5px solid var(--blue);
}
.btn:hover { background: var(--blue-dk); border-color: var(--blue-dk); color: #fff; }
.btn--secondary { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn--secondary:hover { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn--small { padding: 10px 15px; font-size: 0.92rem; border-radius: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-row { display: flex; align-items: center; gap: 24px; min-height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand span { font: 600 1.22rem/1 var(--serif); letter-spacing: -0.01em; }
.brand-mark { width: 30px; height: 30px; color: var(--blue); fill: var(--blue); flex: none; }
.brand:hover { color: var(--ink); }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { font: 500 0.94rem/1 var(--sans); color: var(--text); text-decoration: none; padding: 10px 12px; border-radius: 8px; }
.site-nav a:hover { color: var(--ink); background: var(--tint); }
.site-nav a[aria-current="page"] { color: var(--blue-dk); background: var(--blue-soft); }
.site-nav .nav-cta { margin-left: 10px; color: #fff; background: var(--blue); padding: 11px 16px; }
.site-nav .nav-cta:hover { color: #fff; background: var(--blue-dk); }
.nav-toggle { display: none; font: 600 0.92rem/1 var(--sans); color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-2); padding: 10px 14px; border-radius: 8px; cursor: pointer; }
@media (max-width: 1000px) {
  .nav-toggle { display: inline-block; }
  .head-row { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; padding: 4px 0 16px; gap: 2px; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 10px; font-size: 1rem; }
  .site-nav .nav-cta { margin: 8px 0 0; text-align: center; padding: 14px; }
}

/* ---------- home: hero ---------- */
.hero { background: var(--tint); border-bottom: 1px solid var(--line); padding: 80px 0 88px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 72px; align-items: center; }
.hero h1 { font-size: clamp(2.35rem, 4.3vw, 3.45rem); line-height: 1.12; letter-spacing: -0.018em; margin: 0 0 22px; max-width: 15em; }
.hero .lede { font-size: 1.2rem; line-height: 1.62; color: var(--text); max-width: 33em; margin: 0 0 32px; }
.hero .btn-row { margin-bottom: 40px; }
.credit { display: flex; align-items: center; gap: 14px; padding-top: 28px; border-top: 1px solid var(--line-2); max-width: 33em; }
.credit p { margin: 0; font-size: 0.95rem; line-height: 1.5; color: var(--muted); }
.credit strong { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}

/* the path card: six phases joined by a line */
.path-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 34, 64, 0.04), 0 18px 40px -18px rgba(15, 34, 64, 0.22);
  padding: 30px 30px 18px;
}
.path-card h2 { font-size: 1.4rem; margin: 0 0 4px; }
.path-card > p { color: var(--muted); font-size: 0.95rem; margin: 0 0 18px; }
.path-list { list-style: none; margin: 0; padding: 0; }
.path-list li { position: relative; }
.path-list li:not(:last-child)::after {
  content: ""; position: absolute; left: 19.25px; top: 50px; bottom: -10px; width: 1.5px; background: var(--blue-edge);
}
.path-list a {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 16px; align-items: start;
  padding: 10px 12px; margin: 0 -12px; border-radius: 12px; text-decoration: none; color: inherit;
}
.path-list a:hover { background: var(--tint); }
.path-list .pn-i {
  grid-row: span 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 1.5px solid var(--blue); color: var(--blue); font: 600 0.98rem/1 var(--sans);
  position: relative; z-index: 1;
}
.path-list .pn-t { font: 600 1.02rem/1.35 var(--sans); color: var(--ink); padding-top: 2px; }
.path-list .pn-d { font-size: 0.93rem; line-height: 1.5; color: var(--muted); }
.path-list a:hover .pn-t { color: var(--blue-dk); }
.path-card .card-foot { border-top: 1px solid var(--line); margin: 10px -30px 0; padding: 16px 30px 0; font-size: 0.95rem; }
.path-card .card-foot a { font-weight: 600; text-decoration: none; }
.path-card .card-foot a:hover { text-decoration: underline; }

/* ---------- home: sections ---------- */
.section { padding: 96px 0; }
.section--tint { background: var(--tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin: 0 0 44px; }
.section-head h2 { font-size: clamp(1.85rem, 3vw, 2.45rem); margin: 0 0 14px; }
.section-head p { font-size: 1.15rem; color: var(--muted); margin: 0; }
@media (max-width: 760px) { .section { padding: 64px 0; } .section-head { margin-bottom: 32px; } }

.start-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 1080px) { .start-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .start-grid { grid-template-columns: 1fr; } }
.start-card {
  height: 100%; display: flex; flex-direction: column; padding: 26px 24px 24px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit;
}
.start-card:hover { border-color: var(--blue-edge); box-shadow: 0 10px 28px -16px rgba(15, 34, 64, 0.28); }
.sc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-soft); display: grid; place-items: center; margin-bottom: 20px; }
.sc-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--blue); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sc-when { font: 500 0.88rem/1.3 var(--sans); color: var(--muted); margin: 0 0 6px; }
.start-card h3 { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 10px; }
.sc-desc { font-size: 0.97rem; line-height: 1.6; color: var(--muted); margin: 0 0 20px; }
.sc-go { margin: auto 0 0; font: 600 0.95rem/1 var(--sans); color: var(--blue-dk); }
.start-card:hover h3 { color: var(--blue-dk); }

.explain { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px 64px; align-items: start; }
.explain h2 { font-size: clamp(1.85rem, 3vw, 2.45rem); margin: 0; }
.explain-text p { font-size: 1.08rem; }
.explain-text p:last-child { margin-bottom: 0; }
.explain-text .more { font-weight: 600; text-decoration: none; }
.explain-text .more:hover { text-decoration: underline; }
.explain .fig { grid-column: 1 / -1; margin: 36px 0 0; padding: 36px 40px 24px; }
@media (max-width: 960px) { .explain { grid-template-columns: 1fr; } .explain .fig { margin-top: 16px; padding: 16px; } }

.truths { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 56px; list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) { .truths { grid-template-columns: 1fr; gap: 28px; } }
.truths li { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 16px; }
.truths .tick { width: 30px; height: 30px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; margin-top: 1px; }
.truths .tick svg { width: 15px; height: 15px; fill: none; stroke: var(--blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.truths h3 { font-size: 1.08rem; margin: 2px 0 6px; }
.truths p { margin: 0; color: var(--muted); font-size: 0.99rem; line-height: 1.62; }

.section-foot { margin: 36px 0 0; }
.section-foot a { font-weight: 600; text-decoration: none; }
.section-foot a:hover { text-decoration: underline; }

.author-feature { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 44px; align-items: start; max-width: 940px; }
.author-feature .avatar { width: 128px; height: 128px; font-size: 2.1rem; }
.author-feature p:not(.role) { max-width: 40em; }
.author-feature h2 { font-size: clamp(1.85rem, 3vw, 2.45rem); margin: 0 0 8px; }
.author-feature .role { font: 500 1.02rem/1.5 var(--sans); color: var(--blue-dk); margin: 0 0 18px; }
.author-feature p { font-size: 1.08rem; }
.author-feature .btn-row { margin-top: 26px; }
@media (max-width: 700px) {
  .author-feature { grid-template-columns: 1fr; gap: 24px; }
  .author-feature .avatar { width: 96px; height: 96px; font-size: 1.6rem; }
}

/* ---------- avatar ---------- */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover;
  display: inline-grid; place-items: center; background: var(--navy); color: #fff;
  font: 600 0.9rem/1 var(--sans); letter-spacing: 0.03em;
}
.avatar--lg { width: 72px; height: 72px; font-size: 1.25rem; }

/* ---------- inner pages: header band ---------- */
.page-head { background: var(--tint); border-bottom: 1px solid var(--line); padding: 34px 0 44px; }
.crumbs ol { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--blue-dk); text-decoration: underline; }
.page-head h1 { font-size: clamp(2.1rem, 3.8vw, 3.05rem); line-height: 1.12; letter-spacing: -0.016em; max-width: 22em; }
.page-head .deck { font-size: 1.22rem; line-height: 1.55; color: var(--muted); max-width: 40em; margin: 16px 0 0; }
.byline { display: flex; align-items: center; gap: 13px; margin-top: 28px; }
.byline p { margin: 0; line-height: 1.4; }
.by-name { font-weight: 600; color: var(--ink); font-size: 0.97rem; }
.by-name a { color: inherit; text-decoration: none; }
.by-name a:hover { text-decoration: underline; }
.by-meta { display: flex; flex-wrap: wrap; font-size: 0.9rem; color: var(--muted); }
.by-meta span + span { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line-2); }

/* phase stepper */
.stepper ol { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); max-width: 980px; }
.stepper li { position: relative; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: 38px; right: 6px; height: 1.5px; background: var(--line-2); }
.stepper li:has(~ .is-current)::after { background: var(--blue); }
.stepper a { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; text-decoration: none; color: var(--muted); font-size: 0.88rem; font-weight: 500; line-height: 1.3; padding-right: 10px; }
.stepper .st-n {
  width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1;
  background: var(--paper); border: 1.5px solid var(--line-2); color: var(--muted); font: 600 0.85rem/1 var(--sans);
}
.stepper li:has(~ .is-current) .st-n { border-color: var(--blue); color: var(--blue); }
.stepper .is-current .st-n { background: var(--blue); border-color: var(--blue); color: #fff; }
.stepper .is-current a { color: var(--ink); font-weight: 600; }
.stepper a:hover { color: var(--blue-dk); }
.stepper a:hover .st-n { border-color: var(--blue); }
@media (max-width: 700px) {
  .stepper .st-name { display: none; }
  .stepper .is-current .st-name { display: block; position: absolute; top: 40px; left: 0; white-space: nowrap; }
  .stepper ol { padding-bottom: 26px; }
}

/* ---------- inner pages: two-column body ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 72px; padding-top: 52px; padding-bottom: 96px; }
.page-grid--single { grid-template-columns: minmax(0, 1fr); }
.main-col { min-width: 0; max-width: 760px; }
.side-sticky { position: sticky; top: calc(var(--head-h) + 32px); display: flex; flex-direction: column; gap: 22px; }
@media (max-width: 1080px) {
  .page-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 36px; padding-bottom: 72px; }
  .main-col { max-width: 760px; }
  .side-col { max-width: 760px; }
  .side-sticky { position: static; }
  .toc { display: none; }
}

.toc-title { font: 600 0.9rem/1.3 var(--sans); color: var(--ink); margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1.5px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 15px; margin-left: -1.5px; border-left: 1.5px solid transparent; color: var(--muted); font-size: 0.9rem; line-height: 1.42; text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--blue-dk); border-left-color: var(--blue); font-weight: 500; }

.toc-mobile { display: none; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 32px; background: var(--paper); }
.toc-mobile summary { cursor: pointer; padding: 14px 18px; font-weight: 600; color: var(--ink); list-style-position: inside; }
.toc-mobile ol { margin: 0; padding: 0 18px 16px 38px; }
.toc-mobile li { margin: 4px 0; }
.toc-mobile a { text-decoration: none; }
@media (max-width: 1080px) { .toc-mobile { display: block; } }

.help-card { background: var(--tint); border: 1px solid var(--line); border-radius: 14px; padding: 20px 20px 18px; }
.help-card .hc-title { font: 600 1rem/1.3 var(--sans); color: var(--ink); margin: 0 0 6px; }
.help-card p { font-size: 0.92rem; line-height: 1.55; color: var(--muted); margin: 0 0 14px; }
.help-card p:last-child { margin: 0; }
.help-card a:not(.btn) { word-break: break-all; }

/* ---------- prose ---------- */
.prose { color: var(--text); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.55rem, 2.4vw, 1.85rem); margin: 2.1em 0 0.65em; }
.prose h3 { font-size: 1.2rem; margin: 1.8em 0 0.5em; }
.prose h2 + h3 { margin-top: 0.8em; }
.prose p, .prose ul, .prose ol, .prose dl { margin: 0 0 1.15em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-bottom: 0.45em; padding-left: 0.2em; }
.prose li::marker { color: var(--blue); }
.prose ol > li::marker { font-weight: 600; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose a { text-decoration-color: rgba(31, 90, 198, 0.38); }
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--blue); font-family: var(--serif); font-size: 1.15rem; color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.6em 0; }
.prose code { font-size: 0.9em; background: var(--tint); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.prose mark { background: #fff3b0; padding: 0 4px; border-radius: 3px; }
.prose table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 1.6em 0 1.9em; font-size: 0.95rem; line-height: 1.55; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.prose tr:last-child td { border-bottom: 0; }
.prose th { background: var(--tint); color: var(--ink); font-weight: 600; font-size: 0.9rem; }
.prose td:first-child { color: var(--ink); font-weight: 500; }
@media (max-width: 700px) { .prose table { display: block; overflow-x: auto; white-space: normal; } .prose th, .prose td { min-width: 150px; } }
.prose em { font-style: italic; }

/* key points */
.keypoints { border: 1px solid var(--blue-edge); background: var(--blue-soft); border-radius: 14px; padding: 22px 26px 8px; margin: 0 0 40px; }
.keypoints h2 { font: 600 1rem/1.3 var(--sans); letter-spacing: 0; color: var(--ink); margin: 0 0 12px; }
.keypoints ul { margin: 0 0 12px; padding-left: 1.2em; }
.keypoints li { margin-bottom: 0.5em; }
.keypoints li::marker { color: var(--blue); }

/* callouts */
.prose .callout { border: 1px solid var(--blue-edge); background: var(--blue-soft); border-radius: 14px; padding: 20px 24px; margin: 1.9em 0; }
.prose .callout > :last-child { margin-bottom: 0; }
.prose .callout .label { display: block; font: 600 0.95rem/1.3 var(--sans); color: var(--blue-dk); margin: 0 0 6px; }
.prose .callout.mistake { background: var(--amber-bg); border-color: var(--amber-edge); }
.prose .callout.mistake .label { color: var(--amber); }
.prose .callout.try { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 6px 14px 14px 6px; }

/* figures */
.fig { margin: 2.2em 0; padding: 26px 26px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.fig svg { display: block; width: 100%; height: auto; }
.fig figcaption { font-size: 0.92rem; line-height: 1.58; color: var(--muted); margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.fig figcaption b { color: var(--ink); font-weight: 600; }
@media (max-width: 700px) {
  .fig { padding: 16px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .fig svg { min-width: 620px; }
  .fig figcaption { position: sticky; left: 0; max-width: calc(100vw - 74px); }
}
.photo { margin: 2.2em 0; }
.photo img { display: block; width: 100%; height: auto; border-radius: 14px; background: var(--tint); }
.photo figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 10px; }

/* the six phases as a path (process hub) */
.prose ol.steps { list-style: none; padding: 0; margin: 1.6em 0 2.2em; counter-reset: step; }
.prose ol.steps > li { position: relative; padding: 0 0 26px 62px; margin: 0; counter-increment: step; }
.prose ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; background: var(--paper); border: 1.5px solid var(--blue); color: var(--blue);
  font: 600 1rem/1 var(--sans); z-index: 1;
}
.prose ol.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 20.25px; top: 42px; bottom: 0; width: 1.5px; background: var(--blue-edge); }
.prose ol.steps h3 { margin: 7px 0 6px; font-size: 1.15rem; }
.prose ol.steps h3 a { text-decoration: none; color: var(--ink); }
.prose ol.steps h3 a:hover { color: var(--blue-dk); text-decoration: underline; }
.prose ol.steps p { margin: 0; color: var(--muted); }

/* glossary */
.prose dt { font: 600 1.12rem/1.4 var(--sans); color: var(--ink); margin: 0; padding-top: 22px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--head-h) + 24px); }
.prose dt:first-of-type { border-top: 0; padding-top: 4px; }
.prose dd { margin: 6px 0 22px; color: var(--text); }

/* phase previous / next */
.phase-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 56px 0 0; }
.pn { display: flex; flex-direction: column; gap: 6px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.pn:hover { border-color: var(--blue-edge); background: var(--tint); }
.pn--next { text-align: right; align-items: flex-end; }
.pn-dir { font-size: 0.88rem; color: var(--muted); }
.pn-title { font: 600 1.05rem/1.35 var(--sans); color: var(--blue-dk); }
@media (max-width: 560px) { .phase-nav { grid-template-columns: 1fr; } .pn--next { text-align: left; align-items: flex-start; } }

/* author card at the end of a page */
.author-card { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; margin: 56px 0 0; padding: 26px 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--tint); }
.phase-nav + .author-card { margin-top: 24px; }
.ac-name { font: 600 1.15rem/1.3 var(--serif); margin: 2px 0 2px; }
.ac-name a { color: var(--ink); text-decoration: none; }
.ac-name a:hover { text-decoration: underline; }
.ac-role { font-size: 0.93rem; color: var(--blue-dk); font-weight: 500; margin: 0 0 10px; }
.ac-bio { font-size: 0.97rem; color: var(--muted); line-height: 1.6; margin: 0 0 14px; }
.ac-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; font-size: 0.95rem; font-weight: 600; }
.ac-links a { text-decoration: none; }
.ac-links a:hover { text-decoration: underline; }
@media (max-width: 560px) { .author-card { grid-template-columns: 1fr; padding: 22px; } }

/* ---------- article lists ---------- */
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.prose .post-grid { margin: 1.6em 0 2em; padding: 0; }
.prose .post-grid li { margin: 0; padding: 0; }
.post-card { position: relative; display: flex; flex-direction: column; padding: 24px 24px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; }
.post-card:hover { border-color: var(--blue-edge); box-shadow: 0 10px 28px -16px rgba(15, 34, 64, 0.28); }
.post-kind { font: 500 0.85rem/1 var(--sans); color: var(--blue-dk); margin: 0 0 12px; }
.post-card h2, .post-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.28rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 10px; }
.post-card h2 a, .post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h2 a::after, .post-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 14px; }
.post-card:hover h2 a, .post-card:hover h3 a { color: var(--blue-dk); }
.post-desc { font-size: 0.96rem; line-height: 1.6; color: var(--muted); margin: 0 0 18px; }
.post-meta { margin: auto 0 0; display: flex; flex-wrap: wrap; font-size: 0.86rem; color: var(--muted); }
.post-meta > * + * { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line-2); }

/* ---------- contact form ---------- */
form.contact { display: grid; gap: 18px; margin-top: 24px; padding: 28px; border: 1px solid var(--line); border-radius: 16px; background: var(--tint); }
form.contact label { display: grid; gap: 7px; font: 500 0.95rem/1.3 var(--sans); color: var(--ink); }
form.contact input, form.contact select, form.contact textarea {
  font: 400 1rem/1.5 var(--sans); color: var(--ink); padding: 12px 14px;
  border: 1px solid var(--line-2); border-radius: 10px; background: var(--paper); width: 100%;
}
form.contact input:focus, form.contact select:focus, form.contact textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(31, 90, 198, 0.16); }
form.contact .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
form.contact .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; color: var(--text); }
form.contact .check input { width: auto; margin-top: 5px; }
form.contact button { justify-self: start; font: 600 1rem/1 var(--sans); padding: 15px 22px; border-radius: 10px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; }
form.contact button:hover { background: var(--blue-dk); border-color: var(--blue-dk); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; font-size: 0.95rem; color: var(--muted); margin: 0; }

/* ---------- footer ---------- */
.site-foot { background: var(--navy); color: rgba(255, 255, 255, 0.72); padding: 64px 0 40px; font-size: 0.95rem; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 40px; }
.foot-brand { font: 600 1.3rem/1.2 var(--serif); color: #fff; margin: 0 0 12px; }
.foot-about p:not(.foot-brand) { max-width: 26em; line-height: 1.6; }
.site-foot a { color: rgba(255, 255, 255, 0.82); text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-col { display: flex; flex-direction: column; gap: 10px; }
.foot-head { font: 600 0.92rem/1.3 var(--sans); color: #fff; margin: 0 0 4px; }
.foot-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); font-size: 0.85rem; color: rgba(255, 255, 255, 0.58); }
.foot-legal p { margin: 0 0 8px; max-width: 70em; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- consent ---------- */
.consent { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 520px; margin: 0 auto; z-index: 50; background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; font-size: 0.93rem; box-shadow: 0 18px 48px -12px rgba(15, 34, 64, 0.35); }
.consent p { margin: 0 0 12px; }
.consent p:last-child { margin: 0; display: flex; gap: 10px; }
.consent button { font: 600 0.92rem/1 var(--sans); padding: 10px 15px; border-radius: 8px; border: 1.5px solid var(--blue); background: var(--blue); color: #fff; cursor: pointer; }
.consent button.plain { background: var(--paper); color: var(--ink); border-color: var(--line-2); }

/* ---------- motion and print ---------- */
@media (prefers-reduced-motion: no-preference) {
  .btn, .site-nav a, .start-card, .post-card, .pn, .path-list a, .toc a { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 160ms ease; }
}
@media print {
  .site-head, .site-foot, .consent, .side-col, .toc-mobile, .phase-nav, .stepper { display: none !important; }
  .page-head, .hero, .section--tint { background: #fff !important; border: 0; }
  .page-grid { display: block; padding: 0; }
}
