/* Theme (chosen 23 Nov 2026): dark top band, white page, red accent, no side menu. Loaded after styles.css. */
:root { --bg: #ffffff; --ink: #15171c; --muted: #5a5f69; --rule: #e4e6ea; --accent: #a31f34; --band: #0f1115;
  --font-body: "Inter", "Helvetica Neue", Arial, sans-serif; }
html { overflow-x: hidden; }
body { font-size: 16.5px; line-height: 1.65; }
.sidebar, .mobile-nav { display: none !important; }
main, .subpage main { margin: 0 auto; max-width: 808px; padding: 0 24px 24px; }
main > * { max-width: none; }
.site-footer, .subpage .site-footer { margin: 0 auto; max-width: 808px; padding-left: 24px; padding-right: 24px; }

/* Links: dark text, red underline */
a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
a:hover { color: var(--accent); }

/* Top band */
.masthead { background: var(--band); color: #fff; margin: 0 calc(50% - 50vw); padding: 64px calc(50vw - 50%) 0; }
.masthead h1 { color: #fff; }
.masthead a { color: #fff; text-decoration-color: rgba(255,255,255,0.55); text-decoration-thickness: 1px; }
.masthead a:hover { color: #fff; text-decoration-color: #fff; }
.masthead .lede { color: #f1f2f4; }
.masthead .byline { color: #c9ccd3; }
.portrait { box-shadow: 0 0 0 3px var(--accent); }
.logo-row { background: #fff; margin: 36px calc(50% - 50vw) 0; padding: 22px calc(50vw - 50%); border-bottom: 1px solid var(--rule); }

/* Detail pages: same band, back link inside it */
.subpage .masthead { padding-top: 40px; padding-bottom: 40px; }
.subpage .masthead .back-link { color: #c9ccd3; text-decoration: none; }
.subpage .masthead .back-link:hover { color: #fff; text-decoration: underline; }
.subpage .masthead .notice { border-color: rgba(255,255,255,0.35); color: #e6e8ec; margin-bottom: 0; }
.subpage h2 { margin-top: 48px; }

/* Sections */
h2 { padding-left: 14px; border-left: 6px solid var(--accent); }
.dateline { text-transform: uppercase; letter-spacing: 0.05em; font-size: 13px; }
.facts li::marker { color: var(--accent); }
.list-label { color: var(--accent); }
.quote blockquote { border-left-color: var(--accent); }
.card { border-color: var(--rule); border-radius: 12px; box-shadow: 0 2px 10px rgba(15,17,21,0.06); }
:focus-visible { outline-color: var(--accent); }

@media (max-width: 640px) {
  main, .subpage main { padding: 0 16px 16px; }
  .masthead { padding-top: 40px; }
  .site-footer, .subpage .site-footer { padding-left: 16px; padding-right: 16px; }
}
@media print {
  .masthead { background: none; color: #000; margin: 0; padding: 0; }
  .masthead h1, .masthead a, .masthead .lede, .masthead .byline { color: #000; }
  .logo-row { margin: 16px 0 0; padding: 12px 0; }
}

/* ---- Polish (23 Nov 2026): wider hero, key numbers, Now callout, dark footer ---- */
@media (min-width: 760px) {
  body:not(.subpage) .masthead { display: grid; grid-template-columns: 176px 1fr; column-gap: 40px; align-items: start; padding-top: 72px; }
  body:not(.subpage) .masthead .portrait { grid-row: 1 / span 4; width: 176px; height: 176px; }
  body:not(.subpage) .masthead h1 { grid-column: 2; margin-top: 0; font-size: 72px; }
  body:not(.subpage) .masthead .byline, body:not(.subpage) .masthead .lede { grid-column: 2; }
  body:not(.subpage) .masthead .logo-row { grid-column: 1 / -1; }
}
.masthead { background: linear-gradient(135deg, #0f1115 0%, #171a21 60%, #231218 100%); }
.logo-row { gap: 44px; }


#now { background: #f5f6f8; border-left: 6px solid var(--accent); border-radius: 0 12px 12px 0; padding: 24px 28px 10px; margin-top: 44px; }
#now h2 { border-left: 0; padding-left: 0; }

.card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,17,21,0.10); }
.photo-strip img, .photos img { box-shadow: 0 2px 12px rgba(15,17,21,0.12); }
.edu-row img, .head-row img { filter: none; }

.site-footer, .subpage .site-footer { max-width: none; margin: 64px 0 0; padding: 28px max(24px, calc(50vw - 380px)) 36px; background: var(--band); color: #c9ccd3; }
.site-footer p { max-width: none; }

@media (max-width: 640px) {
  .logo-row { gap: 24px; }
  .site-footer, .subpage .site-footer { padding: 24px 16px 28px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } .card:hover { transform: none; } }
@media print { .site-footer { background: none; color: #000; padding: 16px 0; } }

/* Large screens (25 Nov 2026): text, headings and column grow together, so the page is not a small strip on a wide monitor. */
section { padding-top: 44px; }
.subpage .masthead .lede { margin-top: 18px; max-width: 34em; }
@media (min-width: 1400px) {
  body { font-size: clamp(16.5px, 11.1px + 0.385vw, 24px); }
  main, .subpage main { max-width: calc(46em + 48px); }
  .site-footer, .subpage .site-footer { padding-left: max(24px, calc(50vw - 25.27em)); padding-right: max(24px, calc(50vw - 25.27em)); }
  h1, .subpage h1 { font-size: 3.9em; }
  body:not(.subpage) .masthead { grid-template-columns: 10.7em 1fr; column-gap: 2.4em; }
  body:not(.subpage) .masthead .portrait { width: 10.7em; height: 10.7em; }
  body:not(.subpage) .masthead h1 { font-size: 4.36em; }
  h2 { font-size: 2.42em; }
  .subpage h2 { font-size: 2.06em; }
  h3 { font-size: 1.7em; }
  .lede { font-size: 1.27em; }
  .byline { font-size: 1.03em; }
  .dateline { font-size: 0.79em; }
  .list-label, .card p, .site-footer { font-size: 0.91em; }
  .more-link, .reference { font-size: 0.97em; }
  .back-link { font-size: 1.2em; }
  .logo-row img { height: 1.82em; }
  .head-row--h3 img { height: 1.94em; }
  .head-row img { max-height: 2.4em; }
  .edu-row img { height: 2.67em; }
  .card-title { font-size: 1.45em; }
  .card-role { font-size: 0.91em; }
  .card-logo { max-height: 2.4em; max-width: 7.3em; }
  .photo-strip img { height: 13.3em; }
  .photos figcaption { font-size: 0.85em; }
}

/* Journey page (25 Nov 2026): picture timeline, one stop per row */
.timeline { margin-top: 8px; }
.stop { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); column-gap: 2em; align-items: start; padding: 2em 0; border-top: 1px solid var(--rule); }
.stop:first-child { border-top: 0; }
.stop--text { grid-template-columns: 1fr; }
.stop img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; box-shadow: 0 2px 12px rgba(15,17,21,0.12); }
.stop .when { margin: 0; color: var(--accent); font-weight: 700; font-size: 0.82em; letter-spacing: 0.06em; text-transform: uppercase; }
.subpage .stop h2 { margin-top: 4px; border-left: 0; padding-left: 0; font-size: 1.85em; }
.stop p { margin: 0.6em 0 0; }
.stop .more-link { margin-top: 0.9em; }
@media (max-width: 700px) {
  .stop { grid-template-columns: 1fr; padding: 24px 0; }
  .stop img { margin-bottom: 14px; }
}

/* Chapters on a picture page (25 Nov 2026): a heading above a group of stops */
.subpage .timeline h2.chapter { margin: 2.4em 0 0; padding: 0 0 0.5em; border-left: 0; border-bottom: 2px solid var(--accent); font-size: 1.15em; letter-spacing: 0.08em; text-transform: uppercase; }
.subpage .timeline h2.chapter:first-child { margin-top: 1.6em; }
.timeline h2.chapter + .stop { border-top: 0; }
.subpage .stop h3 { margin: 4px 0 0; font-size: 1.85em; line-height: 1.12; }

/* Writing section (25 Nov 2026): article cards with cover pictures, Substack button */
.writing-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 20px; }
.writing-intro p { margin: 0; }
.substack-btn { display: inline-flex; align-items: center; gap: 10px; padding: 0.55em 1.05em; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; font-size: 0.95em; text-decoration: none; box-shadow: 0 1px 3px rgba(15,17,21,0.06); }
.substack-btn:hover { border-color: #ff6719; color: var(--ink); }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1em; margin: 0.7em 0 1.9em; }
.article-card { display: block; overflow: hidden; border: 1px solid var(--rule); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.article-card:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(15,17,21,0.13); color: var(--ink); }
.article-card img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.article-card span { display: block; padding: 0.75em 0.9em 0.95em; font-weight: 600; font-size: 0.93em; line-height: 1.32; }
@media (max-width: 700px) {
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .article-card span { font-size: 0.88em; padding: 0.6em 0.7em 0.8em; }
}
@media (prefers-reduced-motion: reduce) { .article-card { transition: none; } .article-card:hover { transform: none; } }

/* How I build (25 Nov 2026): builder snapshot */
.stat-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 1.2em 0 0.6em; border-radius: 14px; overflow: hidden; background: #2a2e37; color: #fff; text-decoration: none; box-shadow: 0 6px 22px rgba(15,17,21,0.16); }
.stat { padding: 1.15em 1em 1.1em; background: linear-gradient(135deg, #0f1115 0%, #171a21 70%, #231218 100%); }
.stat b { display: block; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 2.9em; line-height: 1; letter-spacing: 0.01em; color: #fff; }
.stat span { display: block; margin-top: 0.45em; font-size: 0.8em; line-height: 1.3; color: #c9ccd3; }
.stat--lead { grid-column: span 2; }
.stat--lead b { font-size: 4.3em; color: #fff; }
.stat--lead span { font-size: 0.92em; }
.snapshot .stat-band .stat--lead { grid-row: span 1; }
.stat-band--link:hover .stat b { color: #fff; }
.stat-band--link { grid-template-columns: 2fr 1fr 1fr 1fr; }
.stat-band--link .stat--lead { grid-column: auto; }
.source-note { margin: 0.7em 0 0; font-size: 0.86em; color: var(--muted); }
.eyebrow { margin: 0; font-size: 0.74em; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); }
.profile-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1em; margin: 1.5em 0 0; }
.profile-card { padding: 1.05em 1.1em 1.1em; border: 1px solid var(--rule); border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(15,17,21,0.05); }
.profile-card p { margin: 0.45em 0 0; font-size: 0.9em; line-height: 1.5; color: var(--muted); }
.profile-card p.eyebrow { margin: 0; color: var(--accent); font-size: 0.72em; }
.profile-card p.profile-big { margin: 0.15em 0 0.2em; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 2.5em; line-height: 1.05; color: var(--ink); }
.profile-big code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.72em; font-weight: 700; padding: 0.05em 0.3em; border-radius: 8px; background: #0f1115; color: #fff; }
.meter { height: 9px; margin: 0.5em 0 0.2em; border-radius: 999px; background: var(--rule); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.build { margin: 1.4em 0 0; padding: 1.3em 1.4em 1.35em; border: 1px solid var(--rule); border-radius: 14px; background: #fff; box-shadow: 0 2px 12px rgba(15,17,21,0.06); }
.build-head { display: flex; align-items: center; gap: 1em; margin-bottom: 0.7em; }
.mark { flex: none; width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 3px 10px rgba(15,17,21,0.18); }
.subpage .build h3, .build h3 { margin: 0.1em 0 0; font-size: 2em; line-height: 1.08; }
.build > p { margin: 0.5em 0 0; }
.build .facts { margin-top: 0.9em; }
.flow { display: flex; flex-wrap: wrap; gap: 0.5em 1.7em; margin: 1.1em 0 0; padding: 0; list-style: none; counter-reset: none; }
.flow li { position: relative; margin: 0; padding: 0.5em 0.85em; border-radius: 9px; background: #0f1115; color: #fff; font-size: 0.84em; font-weight: 600; line-height: 1.3; }
.flow li + li::before { content: "→"; position: absolute; left: -1.35em; top: 50%; transform: translateY(-50%); color: var(--accent); font-weight: 700; font-size: 1.15em; }
.flow li:last-child { background: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45em; margin: 1em 0 0 !important; }
.chips span { padding: 0.28em 0.75em; border: 1px solid var(--rule); border-radius: 999px; background: #f6f7f9; font-size: 0.8em; font-weight: 600; color: var(--ink); }
.split { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 0.9em; margin: 1.1em 0 0; }
.split > div:not(.split-link) { padding: 0.9em 1em; border-radius: 11px; background: #f6f7f9; border: 1px solid var(--rule); }
.split ul { margin: 0.4em 0 0; padding-left: 1.1em; font-size: 0.9em; line-height: 1.55; }
.split li::marker { color: var(--accent); }
.split-link { text-align: center; font-size: 1.9em; line-height: 1; color: var(--accent); font-weight: 700; }
.split-link small { display: block; margin-top: 0.4em; font-size: 0.36em; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); max-width: 7em; }
.also { margin-top: 1.4em; font-size: 0.95em; color: var(--muted); }
.os-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; margin: 1.1em 0 0; }
.os-grid div { padding: 0.9em 1em; border-radius: 12px; border: 1px solid var(--rule); border-top: 3px solid var(--accent); background: #fff; }
.os-grid b { display: block; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 2.7em; line-height: 1; }
.os-grid span { display: block; margin-top: 0.3em; font-size: 0.84em; color: var(--muted); }
.shortcuts-label { margin-top: 1.7em !important; }
.shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55em 1.2em; margin: 0.7em 0 0; }
.shortcuts div { display: flex; align-items: baseline; gap: 0.75em; }
.shortcuts dt { flex: none; min-width: 5.2em; }
.shortcuts dd { margin: 0; font-size: 0.92em; color: var(--ink); }
.shortcuts code { display: inline-block; padding: 0.15em 0.55em; border-radius: 7px; background: #0f1115; color: #fff; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; font-weight: 600; }
.quotes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1em; margin: 1.1em 0 0; }
.pull { margin: 0; padding: 1em 1.15em; border: 0; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; background: #f6f7f9; }
.pull p { margin: 0; font-size: 1.02em; line-height: 1.45; font-weight: 600; color: var(--ink); font-style: normal; }
.pull--lead { grid-column: 1 / -1; padding: 1.5em 1.6em; border-left: 0; border-radius: 14px; background: linear-gradient(135deg, #0f1115 0%, #171a21 60%, #231218 100%); }
.pull--lead p { font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 700; font-size: 2.15em; line-height: 1.12; color: #fff; }
.built-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.9em; margin: 1.1em 0 1em; }
.built-row > div { display: flex; align-items: center; gap: 0.7em; }
.built-row .mark { width: 46px; height: 46px; border-radius: 11px; }
.built-row span { font-weight: 700; font-size: 0.9em; line-height: 1.25; }
.built-row small { display: block; font-weight: 400; font-size: 0.86em; color: var(--muted); }
@media (max-width: 760px) {
  .stat-band, .stat-band--link { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-band--link .stat--lead, .stat--lead { grid-column: 1 / -1; }
  .stat b { font-size: 2.5em; } .stat--lead b { font-size: 3.6em; }
  .profile-row, .quotes { grid-template-columns: 1fr; }
  .os-grid, .built-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shortcuts { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; } .split-link { padding: 0.1em 0; }
  .build { padding: 1.1em 1em 1.15em; }
  .subpage .build h3, .build h3 { font-size: 1.7em; }
  .pull--lead p { font-size: 1.75em; }
}

/* How I build: timeline, diagrams, photos (preview 3) */
.hero-photo { margin: 1.2em 0 1.3em; }
.hero-photo img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 30%; border-radius: 14px; box-shadow: 0 6px 22px rgba(15,17,21,0.18); }
.hero-photo figcaption, .side-photo figcaption { margin-top: 0.55em; font-size: 0.84em; color: var(--muted); }
.journey { list-style: none; margin: 1.4em 0 0; padding: 0; position: relative; }
.journey::before { content: ""; position: absolute; left: 7.6em; top: 0.5em; bottom: 0.9em; width: 2px; background: var(--rule); }
.journey li { position: relative; display: grid; grid-template-columns: 6.4em 1fr; gap: 2.4em; margin: 0; padding: 0 0 1.05em; }
.journey li::before { content: ""; position: absolute; left: 7.6em; top: 0.42em; width: 12px; height: 12px; margin-left: -5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px #fff; }
.journey time { text-align: right; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 1.3em; line-height: 1.25; letter-spacing: 0.02em; color: var(--ink); }
.journey div { font-size: 0.97em; line-height: 1.55; }
.fan { display: grid; grid-template-columns: auto 34px auto 34px auto 34px auto; align-items: center; justify-content: start; gap: 0; margin: 1.2em 0 0; }
.fan-node { padding: 0.75em 1em; border-radius: 11px; background: #0f1115; color: #fff; font-weight: 700; font-size: 0.9em; line-height: 1.25; text-align: center; }
.fan-node small, .fan-models small { display: block; margin-top: 0.25em; font-weight: 400; font-size: 0.82em; color: #c9ccd3; }
.fan-out { background: var(--accent); }
.fan-models { display: grid; gap: 6px; padding: 10px; border-radius: 13px; border: 1px dashed #b9bdc6; background: #f6f7f9; }
.fan-models span { padding: 0.32em 1.3em; border-radius: 8px; background: #fff; border: 1px solid var(--rule); font-weight: 700; font-size: 0.86em; text-align: center; }
.fan-models small { color: var(--muted); text-align: center; margin-top: 0; }
.fan-arrow { height: 2px; background: var(--accent); position: relative; margin: 0 5px; }
.fan-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 8px solid var(--accent); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.layers { margin: 1.2em 0 0; display: grid; gap: 22px; }
.layer { position: relative; padding: 0.75em 1em 0.85em; border-radius: 12px; border: 1px solid var(--rule); background: #f6f7f9; }
.layer + .layer::before { content: ""; position: absolute; left: 50%; top: -17px; margin-left: -6px; border-top: 9px solid var(--accent); border-left: 6px solid transparent; border-right: 6px solid transparent; }
.layer > div { display: flex; flex-wrap: wrap; gap: 0.45em; margin-top: 0.5em; }
.layer span { padding: 0.3em 0.8em; border-radius: 8px; background: #fff; border: 1px solid var(--rule); font-size: 0.84em; font-weight: 600; }
.layer--core { background: #0f1115; border-color: #0f1115; }
.layer--core .eyebrow { color: #fff; }
.layer--core span { background: #23262e; border-color: #353944; color: #fff; }
.layer--brain span { border-color: var(--accent); }
.machines { display: grid; grid-template-columns: 1fr 120px 1fr; gap: 0; align-items: stretch; margin: 1.2em 0 0; clear: both; }
.machine { padding: 0.9em 1em 1em; border-radius: 12px; border: 1px solid var(--rule); background: #f6f7f9; }
.machine b { display: block; margin-top: 0.1em; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 1.9em; line-height: 1.1; letter-spacing: 0.03em; }
.machine ul { margin: 0.45em 0 0; padding-left: 1.1em; font-size: 0.88em; line-height: 1.55; }
.machine li::marker { color: var(--accent); }
.machine-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5em; padding: 0 8px; }
.machine-link i { display: block; width: 100%; height: 2px; background: var(--accent); position: relative; }
.machine-link i::before, .machine-link i::after { content: ""; position: absolute; top: -4px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.machine-link i::before { left: -1px; border-right: 8px solid var(--accent); }
.machine-link i::after { right: -1px; border-left: 8px solid var(--accent); }
.machine-link small { font-size: 0.72em; line-height: 1.35; text-align: center; color: var(--muted); font-weight: 600; }
.machine-down { grid-column: 1 / -1; height: 26px; position: relative; }
.machine-down::before { content: ""; position: absolute; left: 50%; top: 3px; bottom: 3px; width: 2px; margin-left: -1px; background: var(--accent); }
.machine--cloud { grid-column: 1 / -1; background: #0f1115; border-color: #0f1115; color: #fff; }
.machine--cloud .eyebrow { color: #e8a5b0; }
.machine--cloud ul { display: flex; flex-wrap: wrap; gap: 0.2em 2.2em; color: #e6e8ec; }
.eyebrow.sub { margin-top: 1.7em; color: var(--ink); }
.nightbar { display: flex; gap: 2px; margin-top: 0.7em; border-radius: 9px; overflow: hidden; }
.nb { padding: 0.6em 0.5em; font-size: 0.78em; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; }
.nb-a { background: var(--accent); color: #fff; }
.nb-b { background: #dfe2e7; color: var(--ink); }
.nightbar-axis { display: flex; position: relative; margin-top: 0.35em; font-size: 0.74em; font-weight: 600; color: var(--muted); }
.nightbar-axis .end { position: absolute; right: 0; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9em; margin: 0.8em 0 1.2em; padding: 0; }
.stages li { display: flex; gap: 0.7em; margin: 0; padding: 0.85em 0.9em; border-radius: 11px; border: 1px solid var(--rule); background: #fff; font-size: 0.88em; line-height: 1.5; }
.stages li > b { flex: none; width: 1.75em; height: 1.75em; border-radius: 50%; background: #0f1115; color: #fff; text-align: center; line-height: 1.75em; font-size: 0.9em; }
.stages li:last-child > b { background: var(--accent); }
.side-photo { float: right; width: 140px; margin: 0.2em 0 0.8em 1.4em; }
.side-photo img { display: block; width: 100%; height: auto; border-radius: 11px; box-shadow: 0 3px 12px rgba(15,17,21,0.16); }
.build::after { content: ""; display: block; clear: both; }
.wrote { margin-top: 1em !important; font-size: 0.92em; }
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1em; margin: 1.1em 0 0; }
.tools > div { padding: 0.85em 0.95em; border-radius: 12px; background: #0f1115; }
.tools .eyebrow { color: #e8a5b0; }
.tools p:not(.eyebrow) { margin: 0.4em 0 0; font-size: 0.9em; line-height: 1.5; font-weight: 600; color: #fff; }
@media (max-width: 760px) {
  .journey::before, .journey li::before { left: 5px; }
  .journey li { grid-template-columns: 1fr; gap: 0.1em; padding-left: 1.7em; }
  .journey time { text-align: left; }
  .fan { grid-template-columns: 1fr; justify-content: stretch; }
  .fan-arrow { width: 2px; height: 20px; margin: 4px auto; }
  .fan-arrow::after { right: -4px; top: auto; bottom: -1px; border-top: 8px solid var(--accent); border-left: 5px solid transparent; border-right: 5px solid transparent; border-bottom: 0; }
  .fan-models { grid-template-columns: 1fr 1fr; } .fan-models small { grid-column: 1 / -1; }
  .machines { grid-template-columns: 1fr; }
  .machine-link { flex-direction: row; padding: 10px 0; } .machine-link i { width: 2px; height: 26px; flex: none; }
  .machine-link i::before, .machine-link i::after { display: none; }
  .stages { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr 1fr; }
  .side-photo { width: 110px; }
}

/* How I build (preview 4): comparison bar, trio */
.compare { display: grid; gap: 0.55em; margin: 1.1em 0 1.2em; }
.compare > div { display: grid; grid-template-columns: 7.2em 1fr 6.4em; align-items: center; gap: 0.8em; font-size: 0.86em; }
.compare span { color: var(--muted); font-weight: 600; }
.compare i { display: block; height: 14px; min-width: 6px; border-radius: 0 4px 4px 0; background: #c3c7cf; }
.compare i.hot { background: var(--accent); }
.compare b { font-weight: 700; }
.compare > div:nth-child(2) { grid-template-columns: 7.2em 1fr; }
.compare em { display: flex; align-items: center; gap: 0.8em; font-style: normal; }
.compare em i { flex: none; }
.cloud-runs { margin-top: 0.4em; }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9em; margin: 1.1em 0 0.2em; }
.trio > div { padding: 0.85em 0.95em 0.95em; border-radius: 12px; border: 1px solid var(--rule); border-top: 3px solid var(--accent); background: #fff; }
.trio p:not(.eyebrow) { margin: 0.4em 0 0; font-size: 0.89em; line-height: 1.5; }
@media (max-width: 760px) { .trio { grid-template-columns: 1fr; } .compare > div { grid-template-columns: 6.4em 1fr 5.8em; } }

/* How I build (preview 5): automations, coding ladder, quotes with visuals */
.build--major { border-top: 4px solid var(--accent); }
.mini-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin: 1.2em 0 0; border-radius: 12px; overflow: hidden; background: #2a2e37; }
.mini-stats > div { padding: 0.9em 0.9em 0.95em; background: #0f1115; }
.mini-stats b { display: block; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 2.3em; line-height: 1; color: #fff; }
.mini-stats span { display: block; margin-top: 0.4em; font-size: 0.78em; line-height: 1.3; color: #c9ccd3; }
.pipeline { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin: 1.3em 0 0; padding: 0; }
.pipeline li { position: relative; margin: 0; padding: 0.7em 0.5em 0.75em; border-radius: 10px; border: 1px solid var(--rule); background: #f6f7f9; text-align: center; }
.pipeline li > b { display: block; width: 1.7em; height: 1.7em; margin: 0 auto 0.4em; border-radius: 50%; background: #0f1115; color: #fff; font-size: 0.8em; line-height: 1.7em; }
.pipeline span { display: block; font-size: 0.8em; font-weight: 700; line-height: 1.2; }
.pipeline small { display: block; margin-top: 0.3em; font-size: 0.68em; line-height: 1.3; color: var(--muted); }
.pipeline li.last { background: var(--accent); border-color: var(--accent); color: #fff; }
.pipeline li.last > b { background: #fff; color: var(--accent); } .pipeline li.last small { color: #f3d3d8; }
.article-grid--small { margin: 0.6em 0 0.4em; }
.substack-inline { font-weight: 600; }
.auto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1em; margin-top: 1.2em; }
.auto-grid .build { margin: 0; }
.auto-grid .build:last-child { grid-column: 1 / -1; }
.subpage .auto-grid .build h3, .auto-grid .build h3 { font-size: 1.55em; }
.auto-grid .mark { width: 52px; height: 52px; border-radius: 12px; }
.auto-grid .build > p { font-size: 0.93em; }
.compare--tight > div { grid-template-columns: 6.6em 1fr 4.2em; }
.gauges, .bakeoff { display: grid; gap: 0.5em; margin: 1em 0 0; }
.gauges > div, .bakeoff > div { display: grid; grid-template-columns: 1fr; gap: 0.15em; font-size: 0.82em; }
.gauges span, .bakeoff span { color: var(--muted); font-weight: 600; }
.gauges i, .bakeoff i { display: block; height: 12px; min-width: 5px; border-radius: 0 4px 4px 0; background: #c3c7cf; }
.gauges i.hot, .bakeoff i.hot { background: var(--accent); }
.gauges b, .bakeoff b { font-weight: 700; }
.bakeoff { margin: 1.1em 0 1.3em; padding: 1em 1.1em 1.1em; border: 1px solid var(--rule); border-radius: 12px; background: #fff; }
.bakeoff > div { grid-template-columns: 6em 1fr; align-items: center; column-gap: 0.8em; }
.bakeoff > div b { grid-column: 2; }
.ladder { list-style: none; margin: 1.2em 0 0; padding: 0; display: grid; gap: 6px; }
.ladder li { display: flex; gap: 0.9em; align-items: flex-start; margin: 0; padding: 0.8em 1em; border-radius: 11px; border: 1px solid var(--rule); background: #fff; font-size: 0.93em; line-height: 1.5; }
.ladder li > b { flex: none; width: 2em; height: 2em; border-radius: 8px; background: #0f1115; color: #fff; text-align: center; line-height: 2em; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-size: 1.2em; }
.ladder li:nth-child(1) { margin-right: 24%; } .ladder li:nth-child(2) { margin-right: 18%; } .ladder li:nth-child(3) { margin-right: 12%; } .ladder li:nth-child(4) { margin-right: 6%; }
.ladder li:last-child { background: #0f1115; border-color: #0f1115; color: #fff; } .ladder li:last-child > b { background: var(--accent); }
.aside { margin-top: 1em; padding: 0.8em 1em; border-left: 4px solid var(--accent); background: #f6f7f9; border-radius: 0 10px 10px 0; font-size: 0.93em; }
.sun-quote { position: relative; margin: 1.3em 0 0; border-radius: 16px; overflow: hidden; background: #0f1115; box-shadow: 0 8px 26px rgba(15,17,21,0.22); }
.sun-quote img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8.2; object-fit: cover; }
.sun-quote blockquote { position: absolute; left: 0; right: 0; top: 0; margin: 0; padding: 1.5em 1.7em 3em; border: 0; background: linear-gradient(180deg, rgba(15,17,21,0.82) 0%, rgba(15,17,21,0.55) 62%, rgba(15,17,21,0) 100%); }
.sun-quote blockquote p { margin: 0; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 700; font-size: 2.3em; line-height: 1.1; color: #fff; font-style: normal; text-shadow: 0 2px 14px rgba(0,0,0,0.5); }
.sun-quote figcaption { padding: 0.85em 1.3em 1em; font-size: 0.86em; line-height: 1.5; color: #c9ccd3; }
.q-card { display: grid; grid-template-columns: 170px 1fr; gap: 1.4em; align-items: center; margin: 1.2em 0 0; padding: 1.2em 1.3em; border: 1px solid var(--rule); border-radius: 14px; background: #fff; box-shadow: 0 2px 12px rgba(15,17,21,0.06); }
.q-card blockquote { margin: 0; padding: 0; border: 0; background: none; }
.q-card blockquote p { margin: 0; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 700; font-size: 1.95em; line-height: 1.12; color: var(--ink); font-style: normal; }
.q-art svg { display: block; width: 100%; height: auto; border-radius: 14px; }
.q-context { margin: 0.7em 0 0; font-size: 0.9em; line-height: 1.55; color: var(--muted); }
.q-context strong { color: var(--ink); }
.q-card--wide { grid-template-columns: 1fr; }
.q-wire { padding: 1em 1em 0.7em; border-radius: 12px; background: #f6f7f9; border: 1px solid var(--rule); }
.q-wire svg { display: block; width: 100%; height: auto; }
.q-cap { margin: 0.6em 0 0; font-size: 0.78em; color: var(--muted); }
.night-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7em; margin: 0.9em 0 0; }
.night-stats > div { padding: 0.7em 0.8em; border-radius: 10px; background: #0f1115; }
.night-stats b { display: block; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 1.9em; line-height: 1; color: #f4e3b1; }
.night-stats span { display: block; margin-top: 0.35em; font-size: 0.74em; line-height: 1.3; color: #c9ccd3; }
.pull footer { margin-top: 0.6em; font-size: 0.82em; line-height: 1.45; font-weight: 400; color: var(--muted); }
@media (max-width: 760px) {
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline li.last { grid-column: 1 / -1; }
  .auto-grid { grid-template-columns: 1fr; }
  .ladder li { margin-right: 0 !important; }
  .sun-quote img { aspect-ratio: 4 / 5; }
  .sun-quote blockquote p { font-size: 1.7em; }
  .q-card { grid-template-columns: 1fr; } .q-art { max-width: 150px; }
  .q-card blockquote p { font-size: 1.6em; }
  .night-stats { grid-template-columns: 1fr; }
}

.q-card .eyebrow { margin: 0 0 0.35em; }
.auto-grid .build { display: flex; flex-direction: column; }

/* How I build (preview 6): numbered chapters */
.snapshot main { counter-reset: chapter; }
.chapter { counter-increment: chapter; counter-reset: item; margin: 44px 0 0; border: 1px solid #d9dce2; border-radius: 18px; overflow: hidden; background: #f3f4f7; box-shadow: 0 3px 16px rgba(15,17,21,0.06); }
.chapter:nth-of-type(even) { background: #fff; }
.chapter-head { display: flex; align-items: center; gap: 16px; padding: 16px 24px; background: linear-gradient(135deg, #0f1115 0%, #171a21 60%, #231218 100%); }
.chapter-no { flex: none; min-width: 1.75em; padding: 0.08em 0.3em 0.02em; border-radius: 10px; background: var(--accent); color: #fff; text-align: center; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 800; font-size: 2.2em; line-height: 1.1; }
.subpage .chapter-head h2, .chapter-head h2 { margin: 0; padding: 0; border: 0; color: #fff; }
.chapter-head h2::before, .chapter-head h2::after { display: none; content: none; }
.chapter-body { padding: 22px 24px 28px; }
.chapter-body > :first-child { margin-top: 0; }
.chapter-body > :last-child { margin-bottom: 0; }
.chapter--numbered .build { counter-increment: item; }
.chapter--numbered .build-head h3::before { content: counter(chapter) "." counter(item) "\00a0\00a0"; color: var(--accent); }
.chapter .aside, .chapter .pull { background: #fff; border-top: 1px solid var(--rule); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.chapter:nth-of-type(even) .aside { background: #f3f4f7; }
@media (max-width: 760px) {
  .chapter { margin: 32px -6px 0; border-radius: 14px; }
  .chapter-head { padding: 13px 14px; gap: 12px; }
  .chapter-no { font-size: 1.8em; }
  .chapter-body { padding: 16px 12px 20px; }
}

.snapshot section.chapter { padding-top: 0; scroll-margin-top: 16px; }

/* How I build: legal AI chapter (terminal illustration, wall, lessons) */
.termshot { margin: 1.3em 0 0; }
.term { border-radius: 12px; overflow: hidden; background: #0f1115; box-shadow: 0 10px 28px rgba(15,17,21,0.28); font-size: 0.8em; line-height: 1.4; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #1c2029; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #5a5f69; } .term-bar i:first-child { background: #a31f34; }
.term-bar span { margin-left: 10px; color: #c9ccd3; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.92em; }
.term-panes { display: grid; grid-template-columns: 1.05fr 1.9fr 1.5fr; gap: 1px; background: #2a2e37; }
.term-panes > div { padding: 12px; background: #0f1115; color: #e4e6ea; min-width: 0; }
.term p { margin: 0; }
.term-h { margin: 0 0 9px !important; color: #e8a5b0; font-size: 0.82em; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.term-key p:not(.term-h) { display: flex; flex-direction: column; padding: 5px 0; border-top: 1px solid #2a2e37; }
.term-key b, .term-props b { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-weight: 700; color: #fff; }
.term-key em { font-style: normal; color: #9aa0ab; font-size: 0.9em; }
.term-page { background: #171a21 !important; }
.sheet { padding: 14px 14px 16px; border-radius: 5px; background: #fff; color: #15171c; font-family: Georgia, "Times New Roman", serif; font-size: 1.05em; line-height: 1.75; }
.sheet p + p { margin-top: 0.7em; }
.sheet mark { padding: 0.05em 0.25em; border-radius: 3px; background: rgba(163,31,52,0.14); box-shadow: inset 0 0 0 1.5px #a31f34; color: inherit; }
.sheet .faint { color: #8a8f99; }
.term-props > div { padding: 8px 9px; margin-bottom: 7px; border-radius: 7px; background: #1c2029; }
.term-props s { color: #9aa0ab; }
.term-props small { display: block; color: #9aa0ab; font-size: 0.88em; }
.term-props span { display: inline-block; margin: 6px 4px 0 0; padding: 0.1em 0.6em; border-radius: 5px; border: 1px solid #3a3f4a; color: #c9ccd3; font-size: 0.88em; font-weight: 600; }
.term-props span.ok { background: #fff; border-color: #fff; color: #15171c; }
.term-status { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 8px 12px; background: #1c2029; color: #c9ccd3; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.86em; }
.term-status .good::before { content: "\2713\00a0"; color: #7fd1a0; }
.termshot figcaption { margin-top: 0.7em; font-size: 0.82em; line-height: 1.5; color: var(--muted); }
.split-rule { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; margin: 1.3em 0 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #f6f7f9; }
.split-rule > div:not(.wall) { padding: 0.9em 1.1em 1em; font-size: 0.92em; line-height: 1.5; }
.split-rule p { margin: 0; } .split-rule .eyebrow { margin-bottom: 0.3em; }
.wall { display: flex; align-items: center; width: 30px; background: repeating-linear-gradient(0deg, #a31f34 0 10px, #7d1828 10px 12px); }
.wall span { display: block; width: 100%; transform: rotate(-90deg); color: #fff; font-size: 0.68em; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; white-space: nowrap; }
.lessons { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.8em; margin: 0.7em 0 1.4em; padding: 0; }
.lessons li { display: flex; gap: 0.8em; align-items: flex-start; margin: 0; padding: 0.9em 1em; border-radius: 12px; border: 1px solid var(--rule); background: #fff; font-size: 0.9em; line-height: 1.55; }
.lessons li > b { flex: none; width: 1.9em; height: 1.9em; border-radius: 50%; background: var(--accent); color: #fff; text-align: center; line-height: 1.9em; font-size: 0.9em; }
.lessons strong { display: block; margin-bottom: 0.15em; }
.lessons--inline { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 1.1em 0 0.4em; }
.lessons--inline li { background: #f6f7f9; }
@media (max-width: 760px) {
  .term-panes { grid-template-columns: 1fr; }
  .term-key { display: none; }
  .split-rule { grid-template-columns: 1fr; }
  .wall { width: auto; height: 26px; justify-content: center; background: repeating-linear-gradient(90deg, #a31f34 0 10px, #7d1828 10px 12px); } .wall span { transform: none; }
  .lessons, .lessons--inline { grid-template-columns: 1fr; }
}

/* legal chapter, part 2: roles, guards table, red team */
.roles { display: grid; grid-template-columns: 0.9fr 1.35fr auto 1.25fr; gap: 0; margin: 0.6em 0 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #f6f7f9; }
.role { padding: 0.9em 1em 1em; font-size: 0.88em; line-height: 1.5; border-right: 1px solid var(--rule); }
.role p { margin: 0; } .role .eyebrow { margin-bottom: 0.3em; }
.role--me { background: #fff; }
.role--local { background: #0f1115; color: #e4e6ea; border-right: 0; } .role--local .eyebrow { color: #e8a5b0; } .role--local strong { color: #fff; }
.pipeline li.hot { border-color: var(--accent); background: #fbf1f3; } .pipeline li.hot > b { background: var(--accent); }
.loop-note { margin: 0.6em 0 0; font-size: 0.86em; font-weight: 600; color: var(--accent); } .loop-note span { font-size: 1.25em; }
.guards { margin: 0.6em 0 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; }
.guards > div { display: grid; grid-template-columns: 1fr 26px 1.25fr; align-items: stretch; border-top: 1px solid var(--rule); font-size: 0.89em; line-height: 1.5; }
.guards > div > p { margin: 0; padding: 0.75em 1em; }
.guards > div:not(.guards-head) > p:first-child { grid-column: 1; background: #fbf1f3; }
.guards > div:not(.guards-head) > p:last-child { grid-column: 3; background: #fff; }
.guards > div:not(.guards-head)::before { content: "\2192"; grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; background: #0f1115; color: #fff; font-weight: 700; }
.guards strong { display: block; }
.guards-head { border-top: 0 !important; background: #0f1115; color: #fff; font-size: 0.74em !important; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.guards-head span { padding: 0.7em 1.35em; } .guards-head span:last-child { grid-column: 3; }
.redteam { margin: 0.6em 0 0; padding: 1em; border-radius: 12px; background: #f6f7f9; border: 1px solid var(--rule); }
.rt-personas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7em; margin-bottom: 0.9em; }
.rt-personas > div { padding: 0.8em 0.9em; border-radius: 10px; background: #0f1115; border-top: 4px solid var(--accent); }
.rt-personas b { display: block; color: #fff; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-size: 1.45em; line-height: 1.1; }
.rt-personas span { display: block; margin-top: 0.35em; color: #c9ccd3; font-size: 0.84em; line-height: 1.4; font-style: italic; }
.redteam .flow { margin: 0; }
blockquote.order { margin: 1em 0 0; padding: 0.9em 1.1em; border: 0; border-left: 5px solid var(--accent); border-radius: 0 10px 10px 0; background: #fff; }
blockquote.order p { margin: 0; font-family: "Sofia Sans Extra Condensed", "Inter", sans-serif; font-weight: 700; font-size: 1.7em; line-height: 1.12; font-style: normal; color: var(--ink); }
blockquote.order footer { margin-top: 0.35em; font-size: 0.82em; color: var(--muted); }
@media (max-width: 760px) {
  .roles { grid-template-columns: 1fr; } .role { border-right: 0; border-bottom: 1px solid var(--rule); }
  .roles .wall { width: auto; height: 26px; justify-content: center; background: repeating-linear-gradient(90deg, #a31f34 0 10px, #7d1828 10px 12px); } .roles .wall span { transform: none; }
  .guards > div { grid-template-columns: 1fr; }
  .guards > div:not(.guards-head) > p:first-child, .guards > div:not(.guards-head) > p:last-child { grid-column: 1; }
  .guards > div:not(.guards-head)::before { content: "\2193  the check"; grid-column: 1; grid-row: 2; padding: 0.2em 1em; justify-content: flex-start; font-size: 0.74em; letter-spacing: 0.08em; text-transform: uppercase; }
  .guards-head span:last-child { display: none; }
  .rt-personas { grid-template-columns: 1fr; }
  blockquote.order p { font-size: 1.4em; }
}

.lessons--short { margin: 0.6em 0 1.4em; } .chapter .lessons--short li { background: #fff; }
