/* ============================================================
   Bytescope Tech — design system
   Direction: "instrumentation". A measurement-instrument
   language — graticule grids, hairline rules, mono readouts,
   a single resolving signal trace as the signature element.
   ============================================================ */

/* --- 1. Tokens ------------------------------------------- */
:root {
  /* colour */
  --abyss:      #06181d;   /* dark panels: hero, cta, footer */
  --abyss-2:    #0b262d;   /* raised surface on dark */
  --ink:        #0f262c;   /* body text */
  --ink-2:      #46626a;   /* secondary text */
  --ink-3:      #6d868d;   /* tertiary / captions */
  --rule:       #c8d4d5;   /* hairlines on light */
  --rule-dark:  #1d3d45;   /* hairlines on dark */
  --paper:      #e8ecec;   /* page ground */
  --surface:    #ffffff;   /* cards */
  --teal:       #0c6b62;   /* primary action */
  --teal-deep:  #084f49;
  --teal-wash:  #e2efed;
  --trace:      #34d6b4;   /* live signal — dark surfaces only */
  --amber:      #c97f16;   /* measurement marks on light */
  --amber-lit:  #e8a83f;   /* measurement marks on dark */

  /* type */
  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* metrics */
  --shell: 1240px;
  --gut: clamp(1.25rem, 4vw, 2.5rem);
  --band: clamp(4rem, 9vw, 7.5rem);
  --grat: 34px;               /* graticule division */
  --radius: 3px;              /* instruments aren't rounded */
}

/* --- 2. Reset -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--teal-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button { font: inherit; }
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 0.5em;
  text-wrap: balance;
}
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.15rem; }
li { margin-bottom: 0.45em; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--abyss); color: #fff; padding: 0.7rem 1.1rem;
  font-family: var(--mono); font-size: 0.8rem; transition: top 0.15s;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --- 3. Layout ------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gut); }
.shell--narrow { max-width: 760px; }
.band { padding-block: var(--band); position: relative; }
.band--tight { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.band--dark { background: var(--abyss); color: #cfe0e2; }
.band--dark h1, .band--dark h2, .band--dark h3 { color: #fff; }
.band--surface { background: var(--surface); }
.band + .band--surface, .band--surface + .band { border-top: 1px solid var(--rule); }

/* graticule: the lab-plot grid the whole identity sits on */
.graticule::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(15,38,44,0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,38,44,0.055) 1px, transparent 1px);
  background-size: var(--grat) var(--grat);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 88%);
          mask-image: linear-gradient(to bottom, #000, transparent 88%);
}
.band--dark.graticule::before {
  background-image:
    linear-gradient(to right, rgba(52,214,180,0.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(52,214,180,0.09) 1px, transparent 1px);
}
.graticule > * { position: relative; z-index: 1; }

/* --- 4. Type helpers ------------------------------------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 1.1rem;
  display: flex; align-items: center; gap: 0.6rem;
}
.eyebrow::before {
  content: ""; width: 18px; height: 0; border-top: 2px solid var(--amber); flex: none;
}
.band--dark .eyebrow { color: #8fb0b4; }
.band--dark .eyebrow::before { border-color: var(--amber-lit); }

.display-1 { font-size: clamp(2.6rem, 6.2vw, 4.5rem); font-weight: 800; letter-spacing: -0.038em; }
.display-2 { font-size: clamp(1.95rem, 3.9vw, 3rem); font-weight: 700; }
.display-3 { font-size: clamp(1.35rem, 2.1vw, 1.65rem); font-weight: 700; letter-spacing: -0.02em; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.band--dark .lede { color: #a9c3c6; }
.measure { max-width: 68ch; }

.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head__row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.1rem; flex-wrap: wrap;
}
.band--dark .section-head__row { border-color: var(--rule-dark); }
.section-head__index { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; color: var(--ink-3); }
.band--dark .section-head__index { color: #6d959b; }

/* --- 5. Buttons ------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--mono); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.04em; text-decoration: none;
  padding: 0.85rem 1.4rem; border: 1px solid var(--ink); border-radius: var(--radius);
  background: var(--ink); color: #fff; cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.18s;
}
.btn:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: #fff; transform: translateY(-1px); }
.ico {
  display: inline-block; width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: square; stroke-linejoin: miter;
  vertical-align: -0.2em;
}
.ico--arrow { width: 1.05em; height: 1.05em; transition: transform 0.18s; }
.btn:hover .ico--arrow, .textlink:hover .ico--arrow, .workrow:hover .ico--arrow { transform: translateX(3px); }
.cell__ico { display: block; color: var(--teal); margin-bottom: 1.35rem; }
.cell__ico .ico { width: 34px; height: 34px; stroke-width: 1.5; }
.band--dark .cell__ico { color: var(--trace); }
.section-ico { display: block; color: var(--teal); margin-bottom: 1.1rem; }
.section-ico .ico { width: 38px; height: 38px; stroke-width: 1.4; }
.page-head__ico { display: block; color: var(--trace); margin-bottom: 1.5rem; }
.page-head__ico .ico { width: 40px; height: 40px; stroke-width: 1.4; }
.stage__ico { display: block; color: var(--trace); margin-bottom: 0.85rem; }
.stage__ico .ico { width: 30px; height: 30px; stroke-width: 1.5; }
.field__hint .ico { width: 1em; height: 1em; margin-right: 0.35rem; color: var(--ink-3); }

.contact-list { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.contact-list li { display: flex; gap: 0.65rem; align-items: flex-start; margin-bottom: 0.7rem;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.03em; line-height: 1.6; }
.contact-list .ico { margin-top: 0.15em; color: var(--trace); }
.contact-list--light .ico { color: var(--teal); }

.chip--jump { display: inline-flex; align-items: center; gap: 0.45rem; text-decoration: none;
  padding: 0.45rem 0.7rem; }
.chip--jump:hover { border-color: var(--teal); color: var(--teal-deep); }
.chip--jump .ico { width: 1.1em; height: 1.1em; }

.iconset { margin-bottom: 2.5rem; }
.iconset h3 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--rule);
  padding-top: 0.9rem; margin-bottom: 1.5rem; }
.iconset__grid { list-style: none; padding: 0; margin: 0; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(126px, 1fr)); gap: 1px;
  background: var(--rule); border: 1px solid var(--rule); }
.iconcell { display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  background: var(--surface); padding: 1.4rem 0.75rem; margin: 0; text-align: center; }
.iconcell .ico--sheet { width: 30px; height: 30px; stroke-width: 1.5; color: var(--ink); }
.iconcell span { font-size: 0.82rem; line-height: 1.3; }
.iconcell code { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-3); background: none; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover { background: transparent; color: var(--teal-deep); border-color: var(--teal-deep); }
.btn--lit { background: var(--trace); border-color: var(--trace); color: var(--abyss); }
.btn--lit:hover { background: #6ee7cd; border-color: #6ee7cd; color: var(--abyss); }
.btn--onDark { background: transparent; color: #dcecec; border-color: var(--rule-dark); }
.btn--onDark:hover { background: rgba(52,214,180,0.1); color: #fff; border-color: var(--trace); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

.textlink {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.05em;
  text-decoration: none; border-bottom: 1px solid var(--amber);
  padding-bottom: 2px; display: inline-flex; gap: 0.4rem; align-items: center;
}
.textlink:hover { border-color: var(--ink); }
.band--dark .textlink { color: var(--trace); border-color: rgba(52,214,180,0.5); }
.band--dark .textlink:hover { color: #fff; border-color: #fff; }

/* --- 6. Header ------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232,236,236,0.88);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand svg { height: 30px; width: auto; }
.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a {
  font-family: var(--mono); font-size: 0.79rem; letter-spacing: 0.03em;
  text-decoration: none; color: var(--ink); padding: 0.5rem 0.7rem; border-radius: var(--radius);
  position: relative;
}
.nav a:hover { color: var(--teal-deep); background: rgba(12,107,98,0.07); }
.nav a[aria-current="page"] { color: var(--teal-deep); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.15rem;
  border-top: 2px solid var(--amber);
}
.header-cta { margin-left: 0.6rem; padding: 0.6rem 1.05rem; }
.nav a.header-cta { color: #fff; }
.nav a.header-cta:hover { color: #fff; background: var(--teal-deep); }
.nav-toggle {
  display: none; align-items: center; gap: 0.5rem;
  background: transparent; border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 0.6rem 0.85rem; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink); min-height: 44px;
}
.nav-toggle .ico--close { display: none; }
.nav-toggle[aria-expanded="true"] .ico--close { display: inline-block; }
.nav-toggle[aria-expanded="true"] .ico--menu { display: none; }
.brand__mark { display: none; }

@media (max-width: 940px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 0.75rem var(--gut) 1.5rem; gap: 0; display: none;
    max-height: calc(100dvh - 72px); overflow-y: auto;
  }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: 0.85rem 0; border-bottom: 1px solid var(--rule); font-size: 0.95rem; }
  .nav a[aria-current="page"]::after { display: none; }
  .header-cta { margin: 1rem 0 0; justify-content: center; border-bottom: 0; }
}

/* --- 7. Hero + the signature trace ----------------------- */
.hero { background: var(--abyss); color: #bed6d8; position: relative; overflow: hidden; padding-bottom: clamp(0.5rem, 2vw, 1.5rem); }
.hero__inner { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(0rem, 2vw, 1rem); position: relative; z-index: 2; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lede { color: #a9c3c6; margin-top: 1.5rem; }
.hero__scope { position: relative; z-index: 1; margin-top: clamp(2rem, 5vw, 3rem); }
.hero__scope svg { width: 100%; height: auto; display: block; }

.trace-path {
  fill: none; stroke: var(--trace); stroke-width: 2.25;
  stroke-linejoin: round; stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(52,214,180,0.45));
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: sweep 3.4s cubic-bezier(0.4, 0, 0.2, 1) 0.35s forwards;
}
@keyframes sweep { to { stroke-dashoffset: 0; } }
.trace-noise { opacity: 0.45; }
.scope-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; fill: #7fa5aa;
}
.scope-label--lit { fill: var(--amber-lit); }
.scope-cursor { opacity: 0; animation: blink 1.1s steps(2) 3.6s infinite; }
@keyframes blink { 50% { opacity: 1; } }

@media (max-width: 880px) {
  .scope-label { display: none; }
}
@media (max-width: 700px) {
  .hero__scope svg { min-height: 120px; }
}

.readout {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-dark); margin-top: clamp(1.5rem, 4vw, 2.5rem);
}
.readout--3 { grid-template-columns: repeat(3, 1fr); }
.readout div { padding: 1.15rem 1.25rem 1.6rem; border-right: 1px solid var(--rule-dark); }
.readout div:last-child { border-right: 0; }
.readout dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: #6d959b; margin-bottom: 0.4rem; }
.readout dd { margin: 0; font-family: var(--display); font-weight: 600; font-size: 1rem; color: #eaf5f4; letter-spacing: -0.01em; }
@media (max-width: 780px) {
  .readout, .readout--3 { grid-template-columns: repeat(2, 1fr); }
  .readout div:nth-child(2) { border-right: 0; }
  .readout div:nth-child(-n+2) { border-bottom: 1px solid var(--rule-dark); }
}

/* --- 8. Page header (interior pages) --------------------- */
.page-head { background: var(--abyss); color: #b7d0d2; padding-block: clamp(3rem, 7vw, 5rem) clamp(2.5rem, 5vw, 3.75rem); position: relative; overflow: hidden; }
.page-head h1 { color: #fff; max-width: 20ch; }
.page-head .lede { color: #a9c3c6; }
.breadcrumb { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: #6d959b; margin-bottom: 1.75rem; }
.breadcrumb a { color: #8fb0b4; text-decoration: none; }
.breadcrumb a:hover { color: var(--trace); }
.breadcrumb span { color: #4d7379; margin-inline: 0.5rem; }

/* --- 9. Cards -------------------------------------------- */
.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.band--dark .grid { background: var(--rule-dark); border-color: var(--rule-dark); }
@media (max-width: 900px) { .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--3, .grid--2 { grid-template-columns: 1fr; } }

.cell {
  background: var(--surface); padding: clamp(1.5rem, 2.6vw, 2.1rem);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  transition: background 0.18s;
}
.band--dark .cell { background: var(--abyss-2); }
a.cell:hover { background: var(--teal-wash); }
.band--dark a.cell:hover { background: #10333b; }
.cell__tag { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 1.5rem; display: flex; justify-content: space-between; }
.band--dark .cell__tag { color: #6d959b; }
.cell h3 { font-size: 1.22rem; margin-bottom: 0.6rem; }
.cell p { color: var(--ink-2); font-size: 0.97rem; margin-bottom: 1.2rem; }
.band--dark .cell p { color: #9db9bd; }
.cell .textlink { margin-top: auto; align-self: flex-start; }

/* --- 10. Signal path (process) --------------------------- */
.stages { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; margin-top: 1rem; }
.stage { position: relative; padding-top: 2.6rem; }
.stage::before {
  content: ""; position: absolute; top: 0; left: 0; right: -1.5rem; border-top: 1px solid var(--rule-dark);
}
.stage:last-child::before { right: 0; }
.stage::after {
  content: ""; position: absolute; top: -4px; left: 0; width: 9px; height: 9px;
  background: var(--trace); border-radius: 50%;
}
.stage__n { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.14em; color: var(--amber-lit); display: block; margin-bottom: 0.5rem; }
.stage h3 { font-size: 1.08rem; color: #fff; margin-bottom: 0.45rem; }
.stage p { font-size: 0.92rem; color: #9db9bd; margin: 0; }
@media (max-width: 900px) { .stages { grid-template-columns: repeat(2, 1fr); } .stage::before { right: -1.5rem; } }
@media (max-width: 540px) { .stages { grid-template-columns: 1fr; } .stage::before { right: 0; } }

/* --- 11. Chips + lists ----------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.chip {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.3rem 0.6rem; color: var(--ink-2); background: var(--surface); margin: 0;
}
.band--dark .chip { border-color: var(--rule-dark); background: transparent; color: #9db9bd; }

.ticklist { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.ticklist li { position: relative; padding-left: 1.5rem; margin-bottom: 0.7rem; }
.ticklist li::before {
  content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 0;
  border-top: 2px solid var(--amber);
}
.band--dark .ticklist li::before { border-color: var(--trace); }

.split { display: grid; grid-template-columns: 1fr 1.35fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 104px; }
@media (max-width: 860px) { .sticky { position: static; } }

/* --- 12. Work / article cards ---------------------------- */
.worklist { border-top: 1px solid var(--rule); }
.workrow {
  display: grid; grid-template-columns: 108px 1fr auto; gap: clamp(1rem, 3vw, 2.5rem);
  align-items: baseline; padding: clamp(1.5rem, 3vw, 2.25rem) 0;
  border-bottom: 1px solid var(--rule); text-decoration: none; color: inherit;
  transition: background 0.18s, padding-left 0.18s;
}
.workrow:hover { background: rgba(255,255,255,0.6); padding-left: 0.75rem; color: inherit; }
.workrow__meta { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.workrow h3 { font-size: clamp(1.2rem, 2.2vw, 1.6rem); margin-bottom: 0.5rem; }
.workrow p { color: var(--ink-2); margin: 0; font-size: 0.98rem; max-width: 62ch; }
.workrow__go { font-family: var(--mono); font-size: 0.75rem; color: var(--teal-deep); white-space: nowrap; }
@media (max-width: 720px) {
  .workrow { grid-template-columns: 1fr; gap: 0.6rem; }
  .workrow__go { display: none; }
}

/* --- 13. Prose (articles + case studies) ----------------- */
.prose { font-size: 1.08rem; }
.prose > * { max-width: 70ch; }
.prose h2 { font-size: clamp(1.5rem, 2.6vw, 1.95rem); margin-top: 2.6rem; padding-top: 1.1rem; border-top: 1px solid var(--rule); }
.prose h3 { font-size: 1.18rem; margin-top: 1.9rem; }
.prose blockquote {
  margin: 2rem 0; padding: 1.4rem 1.6rem; background: var(--surface);
  border-left: 3px solid var(--amber); font-size: 1.1rem; color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose code { font-family: var(--mono); font-size: 0.88em; background: #dfe6e6; padding: 0.12em 0.35em; border-radius: 2px; }
.prose figure { margin: 2rem 0; max-width: 100%; }
.prose figcaption { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-3); letter-spacing: 0.06em; margin-top: 0.7rem; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 1.75rem 0;
  border-bottom: 1px solid var(--rule); -webkit-overflow-scrolling: touch; }
.table-wrap table { margin: 0; min-width: 520px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.75rem 0; font-size: 0.95rem; max-width: 100%; }
.prose th, .prose td { text-align: left; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border-bottom-color: var(--ink-3); }

.panel { background: var(--surface); border: 1px solid var(--rule); padding: clamp(1.4rem, 2.6vw, 2rem); margin: 2rem 0; }
.panel h3 { margin-top: 0; font-size: 1.05rem; }
.panel--dark { background: var(--abyss); border-color: var(--abyss); color: #b7d0d2; }
.panel--dark h3 { color: #fff; }
.panel:last-child { margin-bottom: 0; }

.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 2rem 0; }
.metrics div { background: var(--surface); padding: 1.4rem 1.5rem; }
.metrics dt { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 0.45rem; }
.metrics dd { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.55rem; letter-spacing: -0.02em; color: var(--teal-deep); }
@media (max-width: 680px) { .metrics { grid-template-columns: 1fr; } }

.note { font-size: 0.86rem; color: var(--ink-3); border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 2.5rem; max-width: 70ch; }

/* --- 14. Forms ------------------------------------------- */
.form { display: grid; gap: 1.25rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field label { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.field .req { color: var(--amber); }
.field input, .field select, .field textarea {
  font-family: var(--body); font-size: 1rem; color: var(--ink);
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
  padding: 0.8rem 0.9rem; width: 100%; transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(12,107,98,0.14);
}
.field input[type="file"] { padding: 0.6rem; font-family: var(--mono); font-size: 0.82rem; }
.field__hint { font-size: 0.8rem; color: var(--ink-3); }
.check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 0.2rem; flex: none; accent-color: var(--teal); }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.newsletter { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.newsletter input {
  flex: 1 1 190px; background: transparent; border: 1px solid var(--rule-dark);
  border-radius: var(--radius); padding: 0.7rem 0.85rem; color: #fff; font-family: var(--body); font-size: 0.92rem;
}
.newsletter input::placeholder { color: #6d959b; }
.newsletter input:focus { outline: none; border-color: var(--trace); }

/* --- 15. CTA + footer ------------------------------------ */
.cta-band { background: var(--abyss); color: #b7d0d2; padding-block: clamp(3.5rem, 7vw, 5.5rem); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; max-width: 18ch; }
.cta-band .lede { color: #a9c3c6; }

.site-footer { background: var(--abyss); color: #93b3b7; border-top: 1px solid var(--rule-dark); padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; font-size: 0.93rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 2.5rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: #6d959b; margin-bottom: 1.1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a { color: #b7d0d2; text-decoration: none; }
.site-footer a:hover { color: var(--trace); }
.site-footer svg { height: 30px; width: auto; margin-bottom: 1.1rem; }
.footer-base {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  border-top: 1px solid var(--rule-dark); margin-top: 3rem; padding-top: 1.5rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.05em; color: #6d959b;
}

/* --- 16. Motion ------------------------------------------ */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .trace-path { stroke-dashoffset: 0; }
  .reveal { opacity: 1; transform: none; }
}

/* --- 17. Utilities --------------------------------------- */
.stack-sm > * + * { margin-top: 0.75rem; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}


/* --- 18. Responsive pass --------------------------------- */

/* anchors must clear the sticky header */
:target, [id] { scroll-margin-top: 92px; }

/* long identifiers and URLs must never widen the page */
body { overflow-wrap: break-word; }
.prose a, .chip, .contact-list { overflow-wrap: anywhere; }

/* tablet: the stage rule should not overshoot the last item in a row */
@media (max-width: 900px) {
  .stage:nth-child(2n)::before { right: 0; }
}

/* small tablet / large phone */
@media (max-width: 620px) {
  :root { --grat: 26px; }
  .cell__ico .ico { width: 30px; height: 30px; }
  .page-head__ico .ico, .section-ico .ico { width: 34px; height: 34px; }
  .prose { font-size: 1.02rem; }
  .prose h2 { margin-top: 2.1rem; }
  .iconset__grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
}

/* phone */
@media (max-width: 480px) {
  :root { --gut: 1.15rem; }
  .brand__full { display: none; }
  .brand__mark { display: block; }
  .btn-row { flex-direction: column; align-items: stretch; gap: 0.7rem; }
  .btn-row .btn { justify-content: center; }
  .display-1 { font-size: clamp(2.05rem, 9vw, 2.6rem); }
  .lede { font-size: 1.02rem; }
  .readout, .readout--3 { grid-template-columns: 1fr; }
  .readout div { border-right: 0; border-bottom: 1px solid var(--rule-dark); }
  .readout div:last-child { border-bottom: 0; }
  .readout div:nth-child(-n+2) { border-bottom: 1px solid var(--rule-dark); }
  .workrow:hover { padding-left: 0; }
  .section-head__row { gap: 0.5rem; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .chip--jump { padding: 0.55rem 0.8rem; }
  .footer-base { font-size: 0.68rem; }
}

/* very small phones (320px) */
@media (max-width: 360px) {
  :root { --gut: 0.9rem; }
  .site-header__inner { height: 64px; gap: 0.75rem; }
  .nav { inset-block-start: 64px; }
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 0.6rem; }
  .cell { padding: 1.25rem; }
}

/* keep the sticky sidebar from fighting a short viewport */
@media (max-height: 620px) and (min-width: 861px) {
  .sticky { position: static; }
}

/* landscape phones: reclaim vertical space */
@media (max-height: 480px) and (orientation: landscape) {
  .hero__inner { padding-block: 2rem 0.5rem; }
  .band { padding-block: 2.75rem; }
}

/* pointer-coarse devices get larger hit areas */
@media (pointer: coarse) {
  .nav a { min-height: 44px; display: flex; align-items: center; }
  .textlink { padding-block: 0.35rem; }
  .site-footer li a { display: inline-block; padding-block: 0.2rem; }
}

/* --- 19. Print -------------------------------------------- */
@media print {
  .site-header, .site-footer, .cta-band, .nav-toggle, .skip-link,
  .newsletter, .btn-row, .hero__scope { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .band, .page-head, .hero { padding-block: 1rem; background: #fff !important; color: #000 !important; }
  .page-head h1, .hero h1, .band--dark h2, .band--dark h3 { color: #000 !important; }
  .split { display: block; }
  .prose > * { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
}
