/* Corporate site: one stylesheet, no build step. Precision system: dark or light by system preference or the toggle. */
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("/fonts/ibm-plex-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
/* Display face: Space Grotesk, OFL. */
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }


/* Colour system: graphite, white, silver and ONE gold accent, in dark and light. Pages are
   told apart by their emblem and diagram, never by colour. */
:root {
  --bg: #F6F5F1; --bg-2: #EDECE7; --panel: #FFFFFF; --line: #D6D3CB; --line-2: #BDB9AF;
  --ink: #15171A; --ink-2: #4A4F57; --muted: #6A6F77;
  --accent: #7A5A00; --accent-ink: #FFFFFF; --accent-soft: rgba(122, 90, 0, .10);
  --ok: #2E6B47; --warn: #8A5A00; --bad: #A04030; --code-bg: #111316; --code-ink: #E4E3DE;
  --emblem-ink: #2B2F35; --emblem-hi: #7A5A00;
  --dg-bg: transparent; --dg-fill: #FFFFFF; --dg-fill-2: #EDECE7; --dg-ink: #15171A; --dg-muted: #6A6F77; --dg-line: #C9C5BC;
  --dg-gold: #7A5A00; --dg-blue: #2F5E96; --dg-green: #2E6B47; --dg-red: #A04030;
  --shadow: 0 1px 2px rgba(21, 23, 26, .05), 0 8px 24px rgba(21, 23, 26, .05);
  --radius: 6px; --wrap: 1120px; --gutter: clamp(16px, 4vw, 32px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --display: "Space Grotesk", "Plex Sans", system-ui, sans-serif;
  color-scheme: light;
}
/* Dark values. Written twice because CSS cannot share a block between a media query and a selector: once for the
   system preference, once for the toggle and for the always-dark scopes (home hero, emblem, card thumbnails). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B0C0E; --bg-2: #111316; --panel: #16191D; --line: #2A2F36; --line-2: #3A4048;
    --ink: #F2F1EC; --ink-2: #B8BDC5; --muted: #858B94;
    --accent: #E8C24A; --accent-ink: #111111; --accent-soft: rgba(232, 194, 74, .12);
    --ok: #8FC2A0; --warn: #E8C24A; --bad: #D98F7F; --code-bg: #08090A; --code-ink: #E4E3DE;
    --emblem-ink: #E9EAEC; --emblem-hi: #E8C24A;
    --dg-bg: transparent; --dg-fill: #16191D; --dg-fill-2: #111316; --dg-ink: #F2F1EC; --dg-muted: #858B94; --dg-line: #3A4048;
    --dg-gold: #E8C24A; --dg-blue: #7FA7D9; --dg-green: #8FC2A0; --dg-red: #D98F7F;
    --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"], .scope-dark {
  --bg: #0B0C0E; --bg-2: #111316; --panel: #16191D; --line: #2A2F36; --line-2: #3A4048;
  --ink: #F2F1EC; --ink-2: #B8BDC5; --muted: #858B94;
  --accent: #E8C24A; --accent-ink: #111111; --accent-soft: rgba(232, 194, 74, .12);
  --ok: #8FC2A0; --warn: #E8C24A; --bad: #D98F7F; --code-bg: #08090A; --code-ink: #E4E3DE;
  --emblem-ink: #E9EAEC; --emblem-hi: #E8C24A;
  --dg-bg: transparent; --dg-fill: #16191D; --dg-fill-2: #111316; --dg-ink: #F2F1EC; --dg-muted: #858B94; --dg-line: #3A4048;
  --dg-gold: #E8C24A; --dg-blue: #7FA7D9; --dg-green: #8FC2A0; --dg-red: #D98F7F;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
.scope-dark { color: var(--ink); }

}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); }
img, svg, canvas, video { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: 0; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 4.8vw, 52px); font-weight: 600; }
h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; margin-top: 1.6em; }
h3 { font-size: 19px; font-weight: 600; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
:not(pre) > code { background: var(--bg-2); border: 1px solid var(--line); padding: .05em .35em; border-radius: 5px; }
pre { background: var(--code-bg); color: var(--code-ink); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; line-height: 1.5; border: 1px solid var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
table { border-collapse: collapse; width: 100%; font-size: 15px; margin: 0 0 1.4em; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--ink-2); background: var(--bg-2); }
.table-wrap { overflow-x: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.prose { max-width: 760px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.eyebrow { font: 500 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }

/* Header */
.site-head { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: baseline; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand .mark { width: 24px; height: 24px; align-self: center; color: var(--accent); }
.brand small { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: .06em; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 10px; border-radius: 7px; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
.nav a.cta { background: var(--accent); color: var(--accent-ink); font-weight: 500; }
.head-tools { display: flex; gap: 6px; }
.icon-btn { appearance: none; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--line-2); color: var(--ink); }
.icon-btn[aria-pressed="true"] { color: var(--accent); border-color: var(--accent); }
.menu-btn { display: none; }
html:not(.js) .head-tools { display: none; }
@media (max-width: 900px) {
  .js .menu-btn { display: grid; }
  .js .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--panel); border-bottom: 1px solid var(--line); padding: 8px var(--gutter) 14px; flex-direction: column; }
  .js .nav.open { display: flex; }
  .head-tools { margin-left: auto; }
  /* Without JavaScript the links wrap onto a second row instead of hiding behind a button that can't open. */
  html:not(.js) .site-head .wrap { flex-wrap: wrap; row-gap: 0; }
  html:not(.js) .nav { order: 3; flex-basis: 100%; margin-left: -10px; padding-bottom: 8px; }
}

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 9px; font-weight: 500; text-decoration: none; border: 1px solid var(--line-2); color: var(--ink); background: var(--panel); }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.status { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1 var(--mono); color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); padding: 7px 11px; border-radius: 99px; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); }

/* Fact strip: the console accent */
.facts { border-bottom: 1px solid var(--line); background: var(--panel); }
.facts ul { list-style: none; margin: 0 auto; padding: 0 var(--gutter); max-width: var(--wrap); display: grid; grid-template-columns: repeat(6, 1fr); }
.facts li { padding: 16px 14px 16px 0; border-right: 1px solid var(--line); margin-right: 14px; }
.facts li:last-child { border-right: 0; }
.facts b { display: block; font: 500 20px/1.2 var(--mono); color: var(--ink); }
.facts span { font: 400 12px/1.3 var(--mono); color: var(--muted); text-transform: lowercase; }
@media (max-width: 900px) { .facts ul { grid-template-columns: repeat(3, 1fr); } .facts li:nth-child(3n) { border-right: 0; } }
@media (max-width: 520px) { .facts ul { grid-template-columns: repeat(2, 1fr); } .facts li { border-right: 0; } }

/* Sections, cards */
.section { padding: clamp(40px, 6vw, 72px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: border-color .24s var(--ease-out), transform .24s var(--ease-out), box-shadow .24s var(--ease-out); }
a.card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 10px 30px color-mix(in srgb, var(--accent) 18%, transparent); }
.card .viz { aspect-ratio: 16 / 8; background: var(--bg-2); border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.card .viz svg, .card .viz img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 18px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.tag { font: 500 11.5px/1 var(--mono); padding: 5px 7px; border-radius: 5px; background: var(--bg-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.recon { background: var(--panel); color: var(--accent); border-color: transparent; }
.tag.live { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.split { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.split > div { padding: 12px 18px; font-size: 13.5px; color: var(--ink-2); }
.split > div + div { border-left: 1px solid var(--line); }
.split b { display: block; font: 500 11px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Case page */
.case-head { border-bottom: 1px solid var(--line); background: linear-gradient(var(--bg), var(--bg-2)); }
.case-head .wrap { padding-top: 48px; padding-bottom: 34px; }
.case-head .outcome { font-size: 20px; color: var(--ink-2); max-width: 62ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 18px; font: 400 13.5px/1.4 var(--mono); color: var(--muted); }
.meta-row b { color: var(--ink-2); font-weight: 500; }
.recon-label { display: flex; gap: 10px; align-items: flex-start; background: var(--panel); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); color: var(--ink); padding: 12px 14px; border-radius: 9px; font-size: 14.5px; margin: 22px 0 0; max-width: 760px; }
.recon-label svg { flex: none; color: var(--accent); margin-top: 2px; }
.case-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 48px; padding-top: 36px; padding-bottom: 60px; }
.case-body aside { position: sticky; top: 84px; align-self: start; font-size: 14px; }
.case-body aside nav a { display: block; color: var(--ink-2); text-decoration: none; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); }
.case-body aside nav a:hover { border-color: var(--accent); color: var(--ink); }
@media (max-width: 960px) { .case-body { grid-template-columns: minmax(0, 1fr); } .case-body aside { position: static; order: -1; } }
.proves { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin: 10px 0 24px; }
.proves div { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 14px; font-size: 15px; }
.proves b { display: block; font: 500 12px/1.4 var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

/* Figures with provenance */
figure.prov { margin: 26px 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
figure.prov .frame { background: var(--bg-2); padding: 14px; display: grid; place-items: center; }
figure.prov .frame img, figure.prov .frame svg { border-radius: 6px; }
figure.prov figcaption { padding: 12px 14px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }
.prov-strip { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 9px 14px; border-top: 1px dashed var(--line); font: 400 12px/1.4 var(--mono); color: var(--muted); background: var(--bg-2); }
.prov-strip b { color: var(--ink-2); font-weight: 500; }
.prov-strip a { color: var(--muted); }

/* Interactive widgets */
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin: 24px 0; box-shadow: var(--shadow); }
.widget h3 { margin-top: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
.seg button { appearance: none; border: 0; background: transparent; color: var(--ink-2); font: 500 13.5px/1 var(--sans); padding: 9px 12px; cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.chip-btn { appearance: none; border: 1px solid var(--line); background: var(--bg-2); color: var(--ink); border-radius: 8px; padding: 9px 12px; font: 500 14px/1.2 var(--sans); cursor: pointer; text-align: left; }
.chip-btn:hover { border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.tier-1 { --tier: var(--ok); } .tier-2 { --tier: var(--warn); } .tier-3 { --tier: #d0544c; }
.tier-pill { display: inline-block; font: 600 11.5px/1 var(--mono); padding: 5px 8px; border-radius: 5px; color: #fff; background: var(--tier); }

/* Timeline */
.timeline { position: relative; margin: 24px 0; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--line); }
.timeline .ev { position: relative; padding: 0 0 22px; }
.timeline .ev::before { content: ""; position: absolute; left: -24px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--accent); }
.timeline .ev.major::before { background: var(--accent); }
.timeline time { font: 500 13px/1.4 var(--mono); color: var(--accent); }
.timeline h3 { margin: 2px 0 4px; font-size: 17px; }
.timeline p { margin: 0; color: var(--ink-2); font-size: 15px; }
.timeline .cat { font: 400 11.5px/1 var(--mono); color: var(--muted); margin-left: 8px; }

/* Footer */
.site-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 34px 0 40px; font-size: 14px; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-foot a { color: var(--ink-2); }
.site-foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* Contact form */
.form { display: grid; gap: 14px; max-width: 620px; }
.form label { display: grid; gap: 6px; font-weight: 500; font-size: 15px; }
.form input, .form textarea, .form select { font: 400 16px/1.4 var(--sans); padding: 11px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.form textarea { min-height: 150px; resize: vertical; }
.hp { position: absolute; left: -5000px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media print {
  .site-head, .site-foot, .hero-field, .actions, .head-tools, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
}
.grid.steps { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) { .grid.steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid.steps { grid-template-columns: 1fr; } }
.case-body aside nav ul { list-style: none; margin: 0; padding: 0; }
.cv-job { margin-bottom: 18px; }
.cv-job h3 { margin-bottom: 8px; }
.cv-skills { display: grid; grid-template-columns: 200px 1fr; gap: 6px 18px; }
.cv-skills dt { font-weight: 600; }
.cv-skills dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .cv-skills { grid-template-columns: 1fr; } .cv-skills dd { margin-bottom: 8px; } }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; } :root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .only-dark { display: block; } :root:not([data-theme="light"]) .only-light { display: none; } }
.eras { list-style: none; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: era; }
.eras li { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: 9px; padding: 12px 14px; }
.eras span { font-size: 12px; color: var(--accent); display: block; }
.eras b { display: block; margin: 2px 0 4px; }
.eras p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
.incidents details { margin: 10px 0; padding: 0; }
.incidents summary { cursor: pointer; padding: 14px 18px; list-style: none; }
.incidents summary::before { content: "+"; font-family: var(--mono); color: var(--accent); margin-right: 10px; }
.incidents details[open] summary::before { content: "−"; }
.incidents dl { margin: 0; padding: 0 18px 16px; display: grid; grid-template-columns: 110px 1fr; gap: 6px 14px; font-size: 15px; }
.incidents dt { font: 500 12px/1.9 var(--mono); text-transform: uppercase; color: var(--muted); }
.incidents dd { margin: 0; }
@media (max-width: 560px) { .incidents dl { grid-template-columns: 1fr; } }
.pbar { display: grid; grid-template-columns: 210px 1fr 30px; align-items: center; gap: 10px; margin: 6px 0; font-size: 14.5px; }
.pbar i { height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 55%, transparent)); width: var(--w); }
@media (max-width: 560px) { .pbar { grid-template-columns: 1fr 30px; } .pbar i { grid-column: 1 / -1; grid-row: 2; } }
@media (min-width: 1000px) {
  .timeline { columns: 2; column-gap: 48px; padding-left: 0; }
  .timeline::before { display: none; }
  .timeline .ev { break-inside: avoid; padding-left: 26px; border-left: 2px solid var(--line); margin-left: 6px; }
  .timeline .ev::before { left: -7px; }
}
figure.prov .frame { display: block; }
figure.prov .frame img { width: 100%; height: auto; margin: 0 auto; }
figure.prov.white .frame img { width: auto; max-width: 100%; }
.dtree-path { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 4px; font-size: 14px; }
.dtree-path li { padding: 6px 10px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 6px 6px 0; }
.dtree-q { font-weight: 600; font-size: 17px; margin: 6px 0 10px; }
.dtree-answers { display: flex; flex-wrap: wrap; gap: 8px; }
.dtree-result { border: 1px solid var(--accent); background: var(--accent-soft); border-radius: 9px; padding: 14px 16px; }
.dtree-result h4 { margin: 0 0 6px; font-size: 18px; }
.ledger td, .ledger th { white-space: nowrap; } .ledger td:nth-child(2) { white-space: normal; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.how-form ol { padding-left: 18px; font-size: 15px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
figure.prov .diagram-frame { overflow-x: auto; overscroll-behavior-inline: contain; }
figure.prov .diagram-frame img,
figure.prov.white .diagram-frame img { width: 100%; max-width: 100%; height: auto; }
@media (max-width: 720px) {
  figure.prov .diagram-frame img,
  figure.prov.white .diagram-frame img { width: 720px; max-width: none; }
}
/* Phone header: keep the name, drop the trade name, never overflow. */
.brand { min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) {
  .brand small { display: none; }
  .site-head .wrap { gap: 10px; }
  .head-tools { gap: 4px; }
  .icon-btn { width: 44px; height: 44px; flex: none; }
}
/* Markdown tables scroll inside their own box on narrow screens. */
.prose table { display: block; overflow-x: auto; max-width: 100%; }
@media (min-width: 700px) { .prose table { display: table; } }
.wrap.section { padding-left: var(--gutter); padding-right: var(--gutter); padding-top: clamp(32px, 5vw, 56px); }
/* Deck generator */
.dg-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.dg-form label { display: grid; gap: 5px; font-size: 14px; font-weight: 500; }
.dg-form input, .dg-form select { font: 400 15px/1.3 var(--sans); padding: 8px 10px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel); color: var(--ink); }
.dg-slides { --dg0: #14324a; --dg1: #0b7f76; --dg2: #a8650c; --dg3: #7c8da0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 14px; }
.dg-slide { aspect-ratio: 16 / 9; background: #fff; color: #1b2733; border: 1px solid var(--line); border-radius: 6px; padding: 12px 12px 18px; overflow: hidden; font-family: Calibri, Carlito, var(--sans); position: relative; }
.dg-slide::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6%; background: #14324a; }
.dg-slide h4 { margin: 0 0 6px; font-size: 13px; color: #14324a; }
.dg-slide table { font-size: 8px; width: 100%; margin: 0; } .dg-slide th { background: #14324a; color: #fff; padding: 2px; } .dg-slide td { padding: 2px; border-bottom: 1px solid #e4e8ee; text-align: right; } .dg-slide td:first-child { text-align: left; }
.dg-cover { background: #14324a; color: #fff; display: grid; align-content: center; padding-left: 24px; border-left: 6px solid #0b7f76; }
.dg-cover b { font-size: 20px; } .dg-cover span { font-size: 11px; color: #c9d6e2; }
.dg-chart { display: flex; gap: 8%; align-items: flex-end; height: 74%; padding: 0 6%; }
.dg-col { flex: 1; display: grid; grid-template-rows: 1fr auto; gap: 3px; height: 100%; } .dg-stack { display: flex; flex-direction: column-reverse; height: 100%; } .dg-stack i { display: block; } .dg-col span { font-size: 9px; text-align: center; }
.dg-data { margin-top: 14px; } .dg-data table { font-size: 13px; }
.ss-grid { display: grid; gap: 8px; }
.ss-grid label { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr 56px; gap: 10px; align-items: center; font-size: 14.5px; }
.ss-grid output { font: 500 13px/1 var(--mono); }
.ss-out { margin: 12px 0 0; } .ss-out b { font-size: 22px; color: var(--accent); }
@media (max-width: 560px) { .ss-grid label { grid-template-columns: 1fr 56px; } .ss-grid label span { grid-column: 1 / -1; } }
.dtree-static { padding-left: 1.3em; }
.dtree-static > li { margin: 0 0 12px; }
.dtree-static ul { margin: 4px 0 0; padding-left: 1.1em; }
.dtree-static ul li { margin: 3px 0; }


/* ---- Precision layer (2026-10-28) ---------------------------------------------------------------------------- */
h1, h2 { font-family: var(--display); font-weight: 500; letter-spacing: -.015em; }

/* Header: one gold datum tick instead of a colour bar. */
.site-head::before { content: ""; position: absolute; left: 0; top: 0; width: 72px; height: 2px; background: var(--accent); }
.nav a.cta { background: transparent; color: var(--ink); border: 1px solid var(--accent); }
.nav a.cta:hover { background: var(--accent); color: var(--accent-ink); }

/* Page heads. The emblem sits behind them (see .emblem); the text column stays above it. */
main { position: relative; }
.hero, .case-head { position: relative; }
.hero > .wrap, .case-head > .wrap { position: relative; z-index: 2; }
.hero { background: var(--bg); border-bottom: 1px solid var(--line); }
.hero > .wrap { padding-top: clamp(56px, 10vw, 128px); padding-bottom: clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 15ch; font-size: clamp(38px, 5.6vw, 68px); line-height: 1.04; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--ink-2); max-width: 54ch; }
.hero .eyebrow { color: var(--ink-2); }
.hero .eyebrow::before { content: ""; display: inline-block; width: 28px; height: 1px; background: var(--accent); vertical-align: middle; margin-right: 10px; }
.case-head { background: transparent; border-bottom: 1px solid var(--line); }
.case-head .wrap { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 36px; }
.case-head h1 { max-width: 20ch; }
.case-head .outcome { max-width: 58ch; }
.case-head .eyebrow, .case-head .eyebrow a { color: var(--ink-2); text-decoration: none; }
.case-head .eyebrow a:hover { color: var(--accent); }

/* Emblem: one particle field per page, a background element. Masked toward the text side and the
   bottom, never interactive itself; emblem.js listens on the page head. The still image is the fallback. */
.emblem { position: absolute; z-index: 1; top: 0; right: 0; width: min(42vw, 600px); height: var(--emblem-h, 560px);
  pointer-events: none; opacity: var(--emblem-o, .9); transition: opacity .6s var(--ease-out);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 34%), linear-gradient(180deg, #000 62%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(90deg, transparent 0, #000 34%), linear-gradient(180deg, #000 62%, transparent 100%);
  mask-composite: intersect; }
.emblem canvas, .emblem img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 70% 50%; }
.emblem img { opacity: .8; }
.emblem.live img { display: none; }
.emblem .still-l { display: block; } .emblem .still-d { display: none; }
:root[data-theme="dark"] .emblem .still-l, .scope-dark .emblem .still-l { display: none; }
:root[data-theme="dark"] .emblem .still-d, .emblem.scope-dark .still-d { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .emblem .still-l { display: none; } :root:not([data-theme="light"]) .emblem .still-d { display: block; } }
.home .emblem { width: min(46vw, 660px); }
.case-head .meta-row, .case-head .recon-label { max-width: 62ch; }
.emblem:not(.scope-dark) { --emblem-o: .5; }
@media (max-width: 760px) {
  .emblem, .home .emblem, .emblem:not(.scope-dark) { width: 100%; --emblem-o: .34; height: var(--emblem-h, 420px);
    -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 100%); mask-image: linear-gradient(180deg, #000 40%, transparent 100%); }
  .emblem canvas, .emblem img { object-position: 50% 30%; }
}

/* Buttons: gold is the one action colour; secondary buttons are outlines. */
.btn { border-radius: var(--radius); border-color: var(--line-2); background: transparent; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.text-link { border-color: transparent; padding-left: 4px; padding-right: 4px; color: var(--ink-2); }
.btn.text-link:hover { color: var(--ink); }
.status { background: transparent; }

/* Fact strip */
.facts { background: var(--bg-2); }
.facts b { font-family: var(--display); font-weight: 500; }

/* Sections: one surface, separated by hairlines, never by colour bands. */
.section { background: transparent; }
.section-head .eyebrow { color: var(--ink-2); }
.section-head > a { color: var(--ink-2); text-decoration: none; font: 500 14px/1 var(--mono); }
.section-head > a:hover { color: var(--accent); }

/* Cards: graphite surface, 1 px border, gold top rule on hover, thumbnail = the case's emblem. */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: none; transition: border-color .2s var(--ease-out), box-shadow .2s var(--ease-out); }
a.card:hover { border-color: var(--line-2); box-shadow: inset 0 2px 0 var(--accent); transform: none; }
a.card:hover h3 { color: var(--accent); }
.card .viz { aspect-ratio: 16 / 7; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.card .viz { position: relative; }
.card .viz img.emblem-thumb { position: absolute; inset: 8px 0; width: 100%; height: calc(100% - 16px); object-fit: contain; }
.card h3 { font-family: var(--display); transition: color .2s var(--ease-out); }
.tag.recon { background: transparent; color: var(--ink-2); border-color: var(--line-2); }
.tag.live { background: transparent; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.split b { color: var(--muted); }
.home-work .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-work .card .body { padding: 20px; }
@media (max-width: 699px) { .home-work .grid { grid-template-columns: 1fr; } }

/* Reconstruction label: neutral panel, gold rule. */
.recon-label { background: var(--panel); border: 1px solid var(--line); border-left: 2px solid var(--accent); border-radius: var(--radius); }
.recon-label svg { color: var(--accent); }

/* Lab cards and the process rail. */
.home-lab .card .body, .lab.section .card .body { min-height: 200px; position: relative; padding-bottom: 48px; }
.home-lab .grid, .lab.section .grid { counter-reset: labcard; }
.home-lab .card, .lab.section .card { counter-increment: labcard; }
.home-lab .card .body::after, .lab.section .card .body::after { content: "0" counter(labcard); position: absolute; right: 18px; bottom: 14px; font: 500 22px/1 var(--mono); color: var(--line-2); }
.card .viz:empty { display: none; }
.process-rail { position: relative; }
.process-rail::before { content: ""; position: absolute; left: 0; right: 0; top: 30px; height: 1px; background: var(--line-2); }
.process-rail .card { position: relative; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.process-rail .card .body { padding: 44px 18px 18px 0; }
.process-rail .card .body::before { content: ""; position: absolute; top: 25px; left: 0; width: 9px; height: 9px; border: 1px solid var(--accent); background: var(--bg); transform: rotate(45deg); }
.process-rail .card:first-child .body::before { background: var(--accent); }
@media (max-width: 640px) { .process-rail::before { display: none; } }

/* Closing call to action: same surface, gold button. */
.home-cta { background: var(--bg-2); }
.home-cta h2 { font-size: clamp(25px, 3vw, 36px); }

/* The person: photo, name, short copy, three facts. */
.person-editorial { display: grid; grid-template-columns: 220px minmax(0, 1fr) 240px; gap: clamp(24px, 4vw, 56px); align-items: center; }
.person-photo { margin: 0; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); position: relative; }
.person-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05); }
.person-photo::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40%; height: 2px; background: var(--accent); }
.person-photo .monogram { position: absolute; inset: 0; display: grid; place-items: center; font: 500 44px/1 var(--display); letter-spacing: .08em; color: var(--ink-2); }
.person-copy h2 { font-size: clamp(28px, 4vw, 42px); margin: 0 0 12px; }
.person-copy .person-lede { font-size: clamp(18px, 2vw, 20px); color: var(--ink-2); max-width: 58ch; }
.person-facts { margin: 0; display: grid; border-top: 1px solid var(--line); }
.person-facts div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.person-facts dt { font: 500 11px/1 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.person-facts dd { margin: 0; color: var(--ink); font-size: 14.5px; }
@media (max-width: 940px) { .person-editorial { grid-template-columns: 180px minmax(0, 1fr); } .person-facts { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); gap: 18px; } }
@media (max-width: 640px) { .person-editorial { grid-template-columns: 1fr; } .person-photo { max-width: 220px; } .person-facts { grid-template-columns: 1fr; gap: 0; } }

/* About identity card */
.about-intro { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: clamp(28px, 6vw, 76px); align-items: start; }
.about-intro .outcome { font-size: clamp(19px, 2.2vw, 23px); color: var(--ink-2); max-width: 60ch; }
.about-identity { padding: 20px; border: 1px solid var(--line); border-top: 2px solid var(--accent); border-radius: var(--radius); background: var(--panel); }
.about-identity .person-photo { max-width: 160px; margin-bottom: 16px; }
.about-identity h2 { font-size: 22px; margin: 0 0 14px; }
.about-identity dl { margin: 0 0 16px; display: grid; gap: 10px; }
.about-identity dl div { display: grid; grid-template-columns: 58px 1fr; gap: 8px; }
.about-identity dt { font: 500 10.5px/1.5 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.about-identity dd { margin: 0; font-size: 14px; color: var(--ink-2); }
@media (max-width: 940px) { .about-intro { grid-template-columns: 1fr; align-items: start; } .about-identity { max-width: 520px; } }
.detail-body article > blockquote { margin: 22px 0; padding: 14px 18px; border-left: 2px solid var(--accent); background: var(--panel); color: var(--ink-2); }

/* Diagrams: the SVG is inlined, coloured by --dg-* tokens, and grows downward instead of shrinking. */
figure.prov .frame, figure.prov.white .frame { background: var(--bg-2); }
figure.prov .diagram-frame { display: block; padding: 18px; overflow-x: auto; }
/* Never upscale past 1:1 (720 units = 720 px, 14 px labels); shrink tall diagrams toward one screen height, but not
   below 660 px wide (labels stay >= 12.8 px). */
figure.prov .diagram-frame > div { width: clamp(660px, calc(86vh / var(--dg-ar, 1.4)), 720px); max-width: 100%; margin: 0 auto; }
/* draw.io names "IBM Plex Sans"; the page loads it as Plex Sans. CSS beats SVG presentation attributes. */
figure.prov .diagram-frame svg text { font-family: var(--sans); }
figure.prov .diagram-frame svg { width: 100%; height: auto; display: block; }
@media (max-width: 720px) { figure.prov .diagram-frame > div { max-width: none; width: 660px; } }

/* Reveal: items are always visible; reveal.js adds .rise once as an item enters the screen. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.rise { animation: rise .48s var(--ease-out) var(--d, 0ms) backwards; }
@media print { .emblem { display: none; } }


/* Layout and accessibility fixes */
/* A still is only a fallback: it never paints over a running canvas, in any theme scope. */
.emblem.live img { display: none !important; }
@media (max-width: 760px) {
  .emblem, .home .emblem, .emblem:not(.scope-dark) { --emblem-o: .18;
    -webkit-mask-image: linear-gradient(90deg, transparent 15%, #000 100%), linear-gradient(180deg, #000 40%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(90deg, transparent 15%, #000 100%), linear-gradient(180deg, #000 40%, transparent 100%);
    mask-composite: intersect; }
}
.diagram-tools { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; padding: 6px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius) var(--radius) 0 0; font-size: 14px; }
.diagram-tools a { display: inline-flex; align-items: center; min-height: 44px; }
.diagram-tools .scroll-hint { color: var(--ink-2); }
@media (min-width: 721px) { .diagram-tools .scroll-hint { display: none; } }
.diagram-frame:focus-visible { outline-offset: -3px; }
.signal-values { display: none; }
@media (max-width: 560px) {
  .signal-chart .frame { display: none; }
  .signal-values { display: table; width: 100%; font-size: 15px; border-collapse: collapse; }
  .signal-values caption { padding: 12px 0; text-align: left; color: var(--ink-2); }
  .signal-values th, .signal-values td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
}
.form input, .form textarea, .form select { border-color: var(--muted); }
.facts span, .prov-strip, .prov-strip a { color: var(--ink-2); }
.ss-grid input[type="range"] { accent-color: var(--accent); }
.btn { font-family: var(--sans); font-size: inherit; line-height: inherit; }
@media (max-width: 900px) { .nav a { min-height: 44px; display: flex; align-items: center; } }
