/* gabescloud.com — one committed dark theme, drawn from the olive/moss/lichen of a survey map. */

@font-face {
  font-family: "Archivo";
  src: url(fonts/archivo-standard.woff2) format("woff2-variations"), url(fonts/archivo-standard.woff2) format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(fonts/jetbrains-mono-nl-regular.woff2) format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url(fonts/jetbrains-mono-nl-medium.woff2) format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0c0e0a;
  --band: #0f1209;
  --raised: #13160e;
  --sink: #090b07;
  --rule: #1f2417;
  --rule-2: #2c3321;
  --rule-3: #3b4430;
  --bone: #eef1e6;
  --text: #c6cdb7;
  --text-2: #a9b298;
  --text-3: #8e977b;
  --lichen: #bccb76;
  --lichen-hi: #d8e49c;
  --moss: #8ba043;
  --olive: #6f8039;
  --deep: #4d5b2a;
  --sage: #9dbba6;
  --clay: #d3a06f;
  --stone: #7d866c;

  --f-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-body: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1200px;
  --radius: 3px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; }
[id] { scroll-margin-top: calc(var(--header-h) + 24px); }

a { color: var(--lichen); text-decoration: underline; text-decoration-color: rgba(188, 203, 118, 0.38); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { color: var(--lichen-hi); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--lichen); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(188, 203, 118, 0.28); color: var(--bone); }

.arw { font-family: var(--f-mono); font-weight: 400; letter-spacing: 0; }
.nowrap { white-space: nowrap; }
code { font-family: var(--f-mono); font-size: 0.86em; color: var(--bone); background: var(--raised); border: 1px solid var(--rule-2); padding: 0.06em 0.36em; border-radius: var(--radius); overflow-wrap: anywhere; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--lichen); color: var(--ground); padding: 10px 16px; font-family: var(--f-mono); font-size: 0.875rem; text-decoration: none; }
.skip:focus { left: 16px; top: 12px; }

.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- labels, tags ---------- */
.eyebrow { font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0; }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.04em; line-height: 1.4;
  color: var(--text-2); white-space: nowrap;
  padding: 3px 9px 3px 8px; border: 1px solid var(--rule-3); border-radius: 999px;
}
.tag::before { content: ""; flex: none; width: 7px; height: 7px; }
.tag-measured::before { border-radius: 50%; background: var(--lichen); }
.tag-documented::before { border-radius: 1px; background: var(--moss); }
.tag-calculated::before { width: 6px; height: 6px; background: var(--sage); transform: rotate(45deg); }
.tag-estimated::before { content: "~"; width: auto; height: auto; color: var(--clay); font-size: 0.9rem; line-height: 0.8; }
.tag-reported::before { border-radius: 50%; border: 1.5px solid var(--text-2); }
.tag-not-measured { border-style: dashed; color: var(--text-3); }
.tag-not-measured::before { border-radius: 50%; border: 1.5px dashed var(--stone); width: 7px; height: 7px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 44px; padding: 0.8em 1.35em;
  font-family: var(--f-mono); font-size: 0.875rem; font-weight: 500; line-height: 1.2;
  border-radius: var(--radius); border: 1px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-primary { background: var(--lichen); color: var(--ground); }
.btn-primary:hover { background: var(--lichen-hi); color: var(--ground); }
.btn-ghost { background: transparent; color: var(--bone); border-color: var(--rule-3); }
.btn-ghost:hover { color: var(--bone); border-color: var(--text-3); }
.btn .arw { transition: transform 0.2s; }
.btn:hover .arw { transform: translateX(3px); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: rgba(12, 14, 10, 0.88);
  -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--bone); text-decoration: none; min-height: 44px; }
.brand:hover { color: var(--bone); }
.brand-mark { width: 24px; height: 24px; color: var(--lichen); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-display); font-weight: 650; font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-domain { font-family: var(--f-mono); font-size: 0.68rem; color: var(--text-3); margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text-2); text-decoration: none; padding-block: 10px; }
.nav-links a:not(.btn):hover { color: var(--bone); }
.nav-links .btn { min-height: 38px; padding: 0.55em 1.05em; font-size: 0.8125rem; }
.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0 14px; border: 1px solid var(--rule-3); border-radius: var(--radius);
  font-family: var(--f-mono); font-size: 0.8125rem; color: var(--bone);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary .bars { width: 14px; height: 10px; display: inline-flex; flex-direction: column; justify-content: space-between; }
.nav-menu summary .bars i { display: block; height: 1.5px; background: currentColor; }
.nav-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--raised); border: 1px solid var(--rule-2); border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.nav-panel a { padding: 12px 14px; font-family: var(--f-mono); font-size: 0.875rem; color: var(--text-2); text-decoration: none; border-radius: 2px; }
.nav-panel a:hover { background: var(--band); color: var(--bone); }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
}

/* ---------- topographic backgrounds ---------- */
.topo { position: relative; overflow: hidden; isolation: isolate; }
.topo::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  background: url(topo.svg) center / cover no-repeat;
}
.topo-hero::before { inset: -12% -18% -12% 28%; opacity: 0.95; -webkit-mask-image: linear-gradient(to left, #000 35%, transparent 92%); mask-image: linear-gradient(to left, #000 35%, transparent 92%); }
.topo-cs::before { inset: -30% -25% -20% 40%; opacity: 0.8; -webkit-mask-image: linear-gradient(to left, #000 30%, transparent 90%); mask-image: linear-gradient(to left, #000 30%, transparent 90%); }
.topo-low::before { inset: -10% -10% -30% -25%; opacity: 0.7; -webkit-mask-image: radial-gradient(ellipse 55% 60% at 22% 78%, #000 25%, transparent 72%); mask-image: radial-gradient(ellipse 55% 60% at 22% 78%, #000 25%, transparent 72%); }
@media (max-width: 760px) {
  .topo-hero::before { inset: -10% -60% 30% 0; opacity: 0.6; }
  .topo-cs::before { inset: -20% -70% 40% 0; opacity: 0.55; }
}

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--rule); }
.hero-inner { padding-block: clamp(64px, 10vw, 132px) clamp(56px, 8vw, 104px); }
.kicker { display: flex; align-items: center; gap: 12px; font-family: var(--f-mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin: 0; }
.kicker .pip { width: 7px; height: 7px; border-radius: 50%; background: var(--lichen); box-shadow: 0 0 0 4px rgba(188, 203, 118, 0.12); flex: none; }
.hero h1 {
  font-family: var(--f-display); font-weight: 680; font-stretch: 87.5%;
  font-size: clamp(2.45rem, 1.2rem + 4.7vw, 5.1rem); line-height: 1.02; letter-spacing: -0.022em;
  color: var(--bone); margin: 28px 0 30px; max-width: 15em; text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--lichen); }
.lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); line-height: 1.6; color: var(--text-2); max-width: 40rem; margin: 0; text-wrap: pretty; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.open-to { display: flex; align-items: center; gap: 10px; margin: 26px 0 0; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text-3); }
.open-to .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--moss); flex: none; }

/* ---------- certifications strip ---------- */
.certs { border-bottom: 1px solid var(--rule); background: var(--band); }
.certs-inner { padding-block: 26px 24px; }
.certs-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.certs-head a { font-family: var(--f-mono); font-size: 0.75rem; color: var(--text-3); }
.certs-head a:hover { color: var(--lichen); }
.badge-row { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 8px 20px; align-items: center; padding-block: 10px; border-top: 1px solid var(--rule); }
.badge-row-label { margin: 0; font-family: var(--f-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lichen); }
.is-expired .badge-row-label { color: var(--text-3); }
.badges { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: flex; flex-direction: column; align-items: center; gap: 9px; width: 9.75rem; padding: 12px 8px; border: 1px solid transparent; border-radius: var(--radius); color: inherit; text-align: center; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
.badge:hover, .badge:focus-visible { border-color: var(--rule-2); background: var(--raised); }
.badge img, .badge-ph { width: 88px; height: 88px; flex: none; display: block; }
.badge-ph { display: grid; place-items: center; border: 1px dashed var(--rule-3); border-radius: 50%; color: var(--olive); }
.badge-ph svg { width: 34px; height: 34px; }
.badge-text { display: flex; flex-direction: column; gap: 4px; }
.badge-name { font-family: var(--f-display); font-weight: 650; font-size: 0.9rem; line-height: 1.25; color: var(--bone); }
.badge-kind { font-family: var(--f-mono); font-size: 0.66rem; letter-spacing: 0.03em; color: var(--text-3); }
.is-expired .badge img { filter: grayscale(0.85); opacity: 0.6; transition: filter 0.2s, opacity 0.2s; }
.is-expired .badge:hover img, .is-expired .badge:focus-visible img { filter: none; opacity: 1; }
.is-expired .badge-name { color: var(--text-2); }
@media (max-width: 700px) {
  .badge-row { grid-template-columns: minmax(0, 1fr); padding-block: 14px 8px; }
  .badges li { flex: 0 0 calc(50% - 3px); }
  .badge { width: 100%; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(72px, 9vw, 124px); border-bottom: 1px solid var(--rule); }
.section-tight { padding-block: clamp(48px, 6vw, 80px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px 64px; align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-family: var(--f-display); font-weight: 650; font-stretch: 90%; font-size: clamp(2rem, 1.35rem + 2.3vw, 3.2rem); line-height: 1.04; letter-spacing: -0.024em; color: var(--bone); margin: 0; text-wrap: balance; }
.section-head p { margin: 0; color: var(--text-2); max-width: 38rem; text-wrap: pretty; }
@media (max-width: 860px) { .section-head { grid-template-columns: minmax(0, 1fr); align-items: start; } }

/* ---------- figures (stat tiles) ---------- */
.figs { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.figs.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.figs.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 980px) { .figs.cols-4, .figs.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .figs.cols-4, .figs.cols-3 { grid-template-columns: minmax(0, 1fr); } }
.fig { background: var(--band); padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
a.fig { transition: background-color 0.15s; }
a.fig:hover { background: var(--raised); color: inherit; }
.fig-value { font-family: var(--f-body); font-weight: 600; font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.7rem); line-height: 1; letter-spacing: -0.028em; color: var(--bone); }
.fig-value.is-word { font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.7rem); letter-spacing: -0.015em; color: var(--text-2); }
.fig-label { font-size: 0.9375rem; line-height: 1.5; color: var(--text-2); text-wrap: pretty; }
.fig-foot { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.fig-link { font-family: var(--f-mono); font-size: 0.75rem; color: var(--lichen); }
.figs-note { margin: 16px 0 0; font-family: var(--f-mono); font-size: 0.75rem; color: var(--text-3); }
.figs-note a { color: var(--text-2); }
.glance .fig-value { font-size: clamp(1.6rem, 1.25rem + 1.1vw, 2.2rem); }
.glance .fig-label { font-size: 0.9rem; }

/* ---------- capabilities ---------- */
.caps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 64px) clamp(40px, 6vw, 88px); }
@media (max-width: 860px) { .caps { grid-template-columns: minmax(0, 1fr); } }
.cap { display: flex; flex-direction: column; gap: 12px; padding-top: 22px; border-top: 1px solid var(--rule-2); }
.cap h3 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.7rem); letter-spacing: -0.022em; line-height: 1.15; color: var(--bone); margin: 0; }
.cap p { margin: 0; color: var(--text-2); max-width: 34rem; text-wrap: pretty; }
.cap ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.cap li a { display: inline-flex; gap: 10px; align-items: baseline; font-family: var(--f-mono); font-size: 0.8125rem; line-height: 1.5; color: var(--text-2); text-decoration: none; }
.cap li a .arw { color: var(--lichen); }
.cap li a:hover { color: var(--bone); }

/* ---------- work index ---------- */
.work-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-2); }
.work-item > a {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr) 15.5rem 1.25rem; gap: 14px 40px; align-items: start;
  padding: 32px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none;
  transition: background-color 0.15s;
}
.work-item > a:hover { background: linear-gradient(90deg, rgba(188, 203, 118, 0.035), transparent 75%); color: inherit; }
.wi-kicker { font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.7; color: var(--text-3); padding-top: 6px; }
.wi-title { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.8rem); line-height: 1.14; letter-spacing: -0.022em; color: var(--bone); margin: 0 0 10px; text-wrap: balance; transition: color 0.15s; }
.work-item > a:hover .wi-title { color: var(--lichen-hi); }
.wi-summary { margin: 0; color: var(--text-2); font-size: 1rem; line-height: 1.6; max-width: 42rem; text-wrap: pretty; }
.wi-figs { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.wi-fig { display: flex; flex-direction: column; gap: 3px; }
.wi-fig .v { font-weight: 600; font-size: 1.2rem; letter-spacing: -0.012em; color: var(--bone); line-height: 1.2; }
.wi-fig .l { font-size: 0.8125rem; line-height: 1.45; color: var(--text-3); }
.wi-go { color: var(--lichen); padding-top: 4px; font-family: var(--f-mono); transition: transform 0.2s; }
.work-item > a:hover .wi-go { transform: translateX(4px); }
@media (max-width: 1020px) {
  .work-item > a { grid-template-columns: minmax(0, 1fr) 1.25rem; gap: 12px 24px; }
  .wi-kicker { grid-column: 1 / -1; padding-top: 0; }
  .wi-figs { grid-column: 1; flex-direction: row; flex-wrap: wrap; gap: 14px 36px; }
  .wi-go { grid-row: 2; grid-column: 2; }
}
.also { margin-top: clamp(40px, 5vw, 56px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 16px 48px; }
@media (max-width: 860px) { .also { grid-template-columns: minmax(0, 1fr); } }
.also ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); }
.also li::marker { color: var(--olive); }

/* ---------- method ---------- */
.method-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px clamp(40px, 6vw, 88px); align-items: start; }
@media (max-width: 900px) { .method-grid { grid-template-columns: minmax(0, 1fr); } }
.legend { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-2); }
.legend li { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 8px 24px; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.legend p { margin: 0; color: var(--text-2); font-size: 0.97rem; }
@media (max-width: 480px) { .legend li { grid-template-columns: minmax(0, 1fr); } }
.principles { display: flex; flex-direction: column; gap: 30px; }
.principle h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.28rem; letter-spacing: -0.015em; color: var(--bone); margin: 0 0 8px; line-height: 1.2; }
.principle p { margin: 0; color: var(--text-2); text-wrap: pretty; }

/* ---------- about ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 48px clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 900px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }
.about-intro p { margin: 0 0 1.1em; color: var(--text); font-size: 1.08rem; max-width: 34rem; text-wrap: pretty; }
.looking { margin-top: 28px; padding: 22px 24px; background: var(--band); border: 1px solid var(--rule-2); border-radius: var(--radius); }
.looking h3 { margin: 0 0 8px; font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lichen); }
.looking p { margin: 0; color: var(--text); }
.meta-line { margin-top: 20px; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text-3); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr); gap: 8px 32px; padding: 26px 0 28px; border-top: 1px solid var(--rule-2); }
.tl-item:last-child { border-bottom: 1px solid var(--rule-2); }
@media (max-width: 520px) { .tl-item { grid-template-columns: minmax(0, 1fr); } }
.tl-years { font-family: var(--f-mono); font-size: 0.8125rem; color: var(--lichen); padding-top: 5px; white-space: nowrap; }
.tl-role { font-family: var(--f-display); font-weight: 600; font-size: 1.3rem; letter-spacing: -0.015em; line-height: 1.2; color: var(--bone); margin: 0; }
.tl-org { font-family: var(--f-mono); font-size: 0.78rem; color: var(--text-3); margin: 6px 0 12px; }
.tl-points { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 7px; color: var(--text-2); font-size: 0.97rem; }
.tl-points li::marker { color: var(--olive); }

/* ---------- contact ---------- */
.contact { border-bottom: 1px solid var(--rule); }
.contact-inner { padding-block: clamp(80px, 10vw, 136px); }
.contact h2 { font-family: var(--f-display); font-weight: 680; font-stretch: 87.5%; font-size: clamp(2.3rem, 1.3rem + 4vw, 4.6rem); line-height: 1; letter-spacing: -0.028em; color: var(--bone); margin: 0 0 20px; max-width: 16ch; text-wrap: balance; }
.contact p { margin: 0; color: var(--text-2); max-width: 36rem; font-size: 1.08rem; }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 34px; }
.email { font-family: var(--f-mono); font-size: clamp(1.05rem, 0.85rem + 1.1vw, 1.6rem); color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--rule-3); padding-bottom: 4px; overflow-wrap: anywhere; }
.email:hover { color: var(--lichen-hi); border-color: var(--lichen); }
.copy-btn { min-height: 40px; padding: 0.5em 1em; font-size: 0.8125rem; }
.copy-btn[data-state="copied"] { color: var(--lichen); border-color: var(--olive); }
.contact-links { display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 28px; font-family: var(--f-mono); font-size: 0.875rem; }
.contact-links a { color: var(--text-2); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 44px; }
.contact-links a:hover { color: var(--bone); }
.contact-links .arw { color: var(--lichen); }

/* ---------- footer ---------- */
.site-footer { background: var(--sink); padding-block: 36px 40px; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px; font-family: var(--f-mono); font-size: 0.75rem; line-height: 1.7; color: var(--text-3); }
.footer-note { max-width: 46rem; margin: 0; }
.footer-inner nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-inner nav a { color: var(--text-3); text-decoration: none; }
.footer-inner nav a:hover { color: var(--bone); }

/* ---------- case study ---------- */
.cs-hero { border-bottom: 1px solid var(--rule); }
.cs-hero-inner { padding-block: clamp(48px, 7vw, 96px) clamp(44px, 6vw, 72px); }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 0.8125rem; color: var(--text-3); margin: 0 0 30px; }
.crumb a { color: var(--lichen); text-decoration: none; display: inline-flex; gap: 8px; align-items: center; min-height: 32px; }
.crumb a:hover { color: var(--lichen-hi); }
.cs-hero h1 { font-family: var(--f-display); font-weight: 680; font-stretch: 87.5%; font-size: clamp(2.05rem, 1.2rem + 3vw, 3.6rem); line-height: 1.05; letter-spacing: -0.02em; color: var(--bone); margin: 16px 0 24px; max-width: 20em; text-wrap: balance; }
.dek { margin: 0; font-size: clamp(1.08rem, 1rem + 0.4vw, 1.26rem); line-height: 1.62; color: var(--text-2); max-width: 46rem; text-wrap: pretty; }
.cs-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; }
.cs-meta > div { padding: 20px 24px 22px 0; }
.cs-meta > div + div { padding-left: 24px; border-left: 1px solid var(--rule); }
.cs-meta dt { font-family: var(--f-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); margin: 0 0 7px; }
.cs-meta dd { margin: 0; font-size: 0.95rem; line-height: 1.45; color: var(--bone); }
.meta-band { background: var(--band); border-bottom: 1px solid var(--rule); }
@media (max-width: 900px) {
  .cs-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-meta > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .cs-meta > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 520px) {
  .cs-meta { grid-template-columns: minmax(0, 1fr); }
  .cs-meta > div, .cs-meta > div + div { padding: 16px 0; border-left: 0; }
  .cs-meta > div + div { border-top: 1px solid var(--rule); }
}
.glance-wrap { padding-block: clamp(40px, 5vw, 64px) 0; }
.glance-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 18px; }
.glance-head a { font-family: var(--f-mono); font-size: 0.75rem; color: var(--text-3); }

.cs-body { display: grid; grid-template-columns: 12.5rem minmax(0, 46rem); gap: clamp(40px, 5vw, 72px); padding-block: clamp(48px, 6vw, 80px) clamp(72px, 8vw, 112px); }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 28px); align-self: start; display: flex; flex-direction: column; gap: 2px; }
.toc .eyebrow { margin-bottom: 10px; }
.toc a { font-family: var(--f-mono); font-size: 0.78rem; line-height: 1.4; color: var(--text-3); text-decoration: none; padding: 6px 0 6px 12px; border-left: 1px solid var(--rule-2); }
.toc a:hover { color: var(--bone); border-left-color: var(--lichen); }
@media (max-width: 980px) { .cs-body { grid-template-columns: minmax(0, 1fr); } .toc { display: none; } }

.prose > section + section { margin-top: clamp(48px, 6vw, 68px); }
.prose h2 { font-family: var(--f-display); font-weight: 650; font-stretch: 90%; font-size: clamp(1.55rem, 1.25rem + 1vw, 2.05rem); line-height: 1.15; letter-spacing: -0.02em; color: var(--bone); margin: 0 0 18px; text-wrap: balance; }
.prose p { margin: 0 0 1.05em; max-width: 68ch; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.25em; display: flex; flex-direction: column; gap: 0.6em; max-width: 68ch; }
.prose li::marker { color: var(--olive); }
.prose strong { color: var(--bone); font-weight: 600; }
.prose ol.steps { list-style: none; padding: 0; counter-reset: step; gap: 0; border-top: 1px solid var(--rule); }
.prose ol.steps li { counter-increment: step; display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.prose ol.steps li::before { content: counter(step, decimal-leading-zero); font-family: var(--f-mono); font-size: 0.8rem; color: var(--lichen); padding-top: 3px; }

/* decision record */
.decision { border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--band); overflow: hidden; }
.decision-q { margin: 0; padding: 20px 24px; border-bottom: 1px solid var(--rule-2); font-family: var(--f-display); font-weight: 600; font-size: 1.22rem; line-height: 1.3; letter-spacing: -0.012em; color: var(--bone); text-wrap: balance; }
.decision-context { margin: 0; padding: 16px 24px 0; color: var(--text-2); font-size: 0.97rem; }
.options { list-style: none; margin: 0; padding: 12px 0 0; }
.opt { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: 6px 24px; padding: 14px 24px; border-top: 1px solid var(--rule); }
.opt:first-child { border-top: 0; }
.opt-name { color: var(--bone); font-weight: 600; font-size: 0.97rem; line-height: 1.45; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.opt-trade { color: var(--text-2); font-size: 0.95rem; line-height: 1.55; }
.opt.is-chosen { background: rgba(188, 203, 118, 0.055); }
.chosen { font-family: var(--f-mono); font-size: 0.64rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ground); background: var(--lichen); padding: 2px 7px; border-radius: 2px; }
@media (max-width: 640px) { .opt { grid-template-columns: minmax(0, 1fr); } }
.decision-notes { border-top: 1px solid var(--rule-2); padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.decision-notes h3 { margin: 0 0 4px; font-family: var(--f-mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lichen); }
.decision-notes p { margin: 0; color: var(--text); font-size: 0.99rem; max-width: 66ch; }

/* failure log */
.log { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-2); }
.log li { padding: 20px 0 22px; border-bottom: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.log h3 { margin: 0; font-family: var(--f-body); font-weight: 600; font-size: 1.06rem; line-height: 1.35; color: var(--bone); }
.log p { margin: 0; color: var(--text-2); font-size: 0.98rem; max-width: 68ch; }
.log .control { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: baseline; color: var(--text); }
.control-label { font-family: var(--f-mono); font-size: 0.62rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lichen); border: 1px solid rgba(188, 203, 118, 0.35); padding: 2px 7px; border-radius: 2px; white-space: nowrap; }

/* stack */
.stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.stack li { font-family: var(--f-mono); font-size: 0.75rem; line-height: 1.4; color: var(--text-2); border: 1px solid var(--rule-3); padding: 5px 10px; border-radius: 2px; }

/* diagrams */
.figure { margin: 24px 0 26px; }
@media (min-width: 1180px) { .prose .figure { width: calc(100% + 11rem); max-width: 58rem; } }
.figure-frame { border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--band); padding: clamp(14px, 2.4vw, 26px); overflow-x: auto; }
.figure svg { display: block; width: 100%; height: auto; min-width: 560px; }
.figure figcaption { margin-top: 12px; font-size: 0.875rem; line-height: 1.55; color: var(--text-3); max-width: 68ch; }
.dg text { font-family: var(--f-mono); font-size: 11px; fill: var(--text-2); }
.dg .t-strong { font-size: 12px; font-weight: 500; fill: var(--bone); }
.dg .t-dim { fill: var(--text-3); }
.dg .t-accent { fill: var(--lichen); }
.dg .t-edge { font-size: 10px; fill: var(--text-3); }
.dg .box { fill: var(--raised); stroke: var(--rule-3); stroke-width: 1; }
.dg .box-accent { fill: var(--raised); stroke: var(--olive); stroke-width: 1.4; }
.dg .edge { fill: none; stroke: var(--text-3); stroke-width: 1.2; }
.dg .edge-accent { fill: none; stroke: var(--moss); stroke-width: 1.5; }
.dg .dash { stroke-dasharray: 4 4; }
.dg .track { fill: none; stroke: var(--rule-3); stroke-width: 1.5; }
.dg .bake { fill: rgba(139, 160, 67, 0.16); stroke: var(--olive); stroke-width: 1; }
.dg .node { fill: var(--ground); stroke: var(--lichen); stroke-width: 2; }
.dg .node-dim { fill: var(--ground); stroke: var(--text-3); stroke-width: 1.5; }
.dg .window { fill: rgba(188, 203, 118, 0.14); stroke: var(--lichen); stroke-width: 1.2; }

/* policy simulator readout */
.readout { margin: 18px 0 8px; border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--sink); font-family: var(--f-mono); font-size: 0.8125rem; overflow: hidden; }
.readout-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 16px; border-bottom: 1px solid var(--rule-2); color: var(--text-3); font-size: 0.75rem; }
.readout-head .cmd { color: var(--text-2); }
.readout-scroll { overflow-x: auto; }
.readout table { width: 100%; min-width: 28rem; border-collapse: collapse; }
.readout th { text-align: left; font-weight: 500; color: var(--text-3); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 10px 16px 8px; }
.readout td { padding: 11px 16px; border-top: 1px solid var(--rule); color: var(--text-2); vertical-align: top; }
.readout td.dec { white-space: nowrap; }
.dec-allow { color: var(--lichen) !important; }
.dec-deny { color: var(--text) !important; }

/* pager */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--band); }
.pager a { display: flex; flex-direction: column; gap: 8px; padding: clamp(28px, 4vw, 44px) var(--gutter); text-decoration: none; color: inherit; transition: background-color 0.15s; min-width: 0; }
.pager a + a { border-left: 1px solid var(--rule); align-items: flex-end; text-align: right; }
.pager a:hover { background: var(--raised); color: inherit; }
.pager .dir { font-family: var(--f-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); }
.pager .t { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.15rem, 1rem + 0.6vw, 1.45rem); line-height: 1.2; letter-spacing: -0.015em; color: var(--bone); text-wrap: balance; }
.pager a:hover .t { color: var(--lichen-hi); }
@media (max-width: 720px) { .pager { grid-template-columns: minmax(0, 1fr); } .pager a + a { border-left: 0; border-top: 1px solid var(--rule); align-items: flex-start; text-align: left; } }
.anon-note { margin: 40px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--f-mono); font-size: 0.75rem; line-height: 1.7; color: var(--text-3); max-width: 68ch; }

/* 404 */
.nf { padding-block: clamp(96px, 14vw, 180px); }
.nf h1 { font-family: var(--f-display); font-weight: 680; font-stretch: 87.5%; font-size: clamp(2.4rem, 1.4rem + 4vw, 4.4rem); line-height: 1; letter-spacing: -0.028em; color: var(--bone); margin: 16px 0 20px; }
.nf p { margin: 0 0 28px; color: var(--text-2); max-width: 36rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  :root {
    color-scheme: light;
    --ground: #fff; --band: #fff; --raised: #f5f6f1; --sink: #fff;
    --rule: #d9dccf; --rule-2: #c9cdbd; --rule-3: #b9bea9;
    --bone: #14170f; --text: #23271d; --text-2: #343a2b; --text-3: #555c48;
    --lichen: #45521b; --lichen-hi: #45521b; --moss: #56662a; --olive: #56662a;
  }
  .site-header, .nav-menu, .toc, .pager, .skip, .copy-btn, .cta-row { display: none !important; }
  .topo::before { display: none !important; }
  .fig, .figs, .decision, .figure-frame { break-inside: avoid; }
  a { text-decoration: none; }
}
