/* Layout and type follow the owner's mockups. No outside fonts, no inline styles. */

@font-face { font-family: "Zilla Slab"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/zilla-slab-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Zilla Slab"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/zilla-slab-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --teal: #004050;
  --ink: #281808;
  --ember: #c83800;
  --burnt: #d86000;
  --gold: #e08000;
  --sun: #f2a93b;
  --cream: #f6ecd8;
  --white: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--teal);
  color: var(--cream);
  font: 400 18px/1.55 "IBM Plex Sans", system-ui, sans-serif;
}

h1, h2, h3 { font-family: "Zilla Slab", Georgia, serif; font-weight: 700; line-height: 1.1; margin: 0; }
p { margin: 0 0 16px; }
img, video, svg { max-width: 100%; }
a { color: inherit; }
a:focus-visible, summary:focus-visible, .chart-box:focus-visible, .table-box:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* Header */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 48px;
}
.brand { display: flex; align-items: center; gap: 12px; font: 700 22px/1.2 "Zilla Slab", Georgia, serif; text-decoration: none; }
.brand img { width: 44px; height: 44px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.site-nav a { padding: 10px 0; font-weight: 500; font-size: 16px; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--sun); }

/* Small labels */
.eyebrow { margin: 0 0 12px; font: 500 14px/1.4 "IBM Plex Mono", monospace; color: var(--sun); }
.band-gold .eyebrow, .band-burnt .eyebrow { color: inherit; }

/* Buttons */
.button { display: inline-block; padding: 14px 24px; font-weight: 600; text-decoration: none; }
.button-sun { background: var(--sun); color: var(--ink); }
.button-ink { background: var(--ink); color: var(--cream); }
.button:hover { text-decoration: underline; }
.link-plain { font-weight: 600; }

/* Hero */
.hero { padding: 0 16px; text-align: center; }
.hero img { display: block; width: 420px; max-width: 86%; height: auto; margin: 0 auto; }
.hero h1 { margin-top: 24px; font-size: clamp(52px, 7.5vw, 96px); }
.tagline { margin: 8px 0 0; font: 500 clamp(24px, 3vw, 34px)/1.2 "Zilla Slab", Georgia, serif; color: var(--sun); }
.hero-intro { max-width: 34em; margin: 18px auto 72px; }

/* Bands and the trunk */
.band-teal { background: var(--teal); color: var(--cream); }
.band-gold { background: var(--gold); color: var(--ink); }
.band-burnt { background: var(--burnt); color: var(--ink); }
.band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  column-gap: 72px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}
.cell { padding: 104px 0; }
.band h2 { margin-bottom: 20px; font-size: 56px; }
.text-right .cell-text { grid-column: 3; grid-row: 1; }
.text-right .cell-aside { grid-column: 1; grid-row: 1; }
.text-left .cell-text { grid-column: 1; grid-row: 1; }
.text-left .cell-aside { grid-column: 3; grid-row: 1; }
.trunk { grid-column: 2; grid-row: 1; position: relative; background: var(--ink); }
.twig { position: absolute; top: 112px; width: 72px; max-width: none; height: 36px; overflow: visible; }
.twig-right { left: 100%; }
.twig-left { right: 100%; transform: scaleX(-1); }
.twig-stem { fill: none; stroke: var(--ink); stroke-width: 6; }
.leaf-sun { fill: var(--sun); }
.leaf-teal { fill: var(--teal); }

/* Branch contents */
.stats { margin: 0; }
.stat { margin-bottom: 28px; }
.stat-num { margin: 0; font: 500 48px/1.1 "IBM Plex Mono", monospace; color: var(--sun); }
.stat-label { margin: 4px 0 0; }
.figure { margin: 0; text-align: center; }
.figure img { display: block; width: 320px; max-width: 100%; height: auto; margin: 0 auto 12px; }
.figure figcaption { font: 400 14px/1.4 "IBM Plex Mono", monospace; }
.project { margin-bottom: 24px; }
.project h3 { margin-bottom: 4px; font: 500 20px/1.3 "IBM Plex Mono", monospace; }
.project p { margin: 0; }

/* Why, on the curved ground */
.ground { background: var(--burnt); }
.why {
  padding: 112px 16px 48px;
  background: var(--teal);
  color: var(--cream);
  border-radius: 50% 50% 0 0 / 72px 72px 0 0;
  text-align: center;
}
.why-inner { max-width: 720px; margin: 0 auto; }
.why h2 { margin-bottom: 20px; font-size: 44px; }
.why-contact { display: inline-block; margin: 8px 0 40px; font: 500 26px/1.3 "Zilla Slab", Georgia, serif; color: var(--sun); overflow-wrap: anywhere; }
.home-footer { font-size: 15px; }
.home-footer p { margin: 0 0 6px; }

/* Lab */
.lab-main { max-width: 1200px; margin: 0 auto; padding: 40px 48px 96px; }
.lab-main h1 { max-width: 16em; margin-bottom: 20px; font-size: clamp(40px, 5.4vw, 68px); }
.lab-intro { max-width: 46em; }
.lab-section { margin-top: 88px; }
.lab-section h2 { margin-bottom: 12px; font-size: 34px; }
.lab-pair { margin-top: 88px; }
.lab-pair > section + section { margin-top: 56px; }
.lab-pair h2 { margin-bottom: 12px; font-size: 34px; }
.lab-pair > section:not(.lab-wide) { max-width: 46em; }
.lab-wide .table-box tr > th:first-child { position: sticky; left: 0; background: var(--teal); }

.chart-box, .table-box { overflow-x: auto; scrollbar-color: var(--sun) var(--ink); }
.chart { display: block; width: 100%; min-width: 860px; max-width: none; height: auto; }
.seg-ok { fill: var(--sun); }
.seg-no { fill: var(--ember); }
.seg-text { font: 500 14px "IBM Plex Mono", monospace; }
.seg-text-ok { fill: var(--ink); }
.seg-text-no { fill: var(--white); }
.app-label { font: 400 13px "IBM Plex Sans", sans-serif; fill: var(--cream); }
.chart-box table { min-width: 860px; margin-top: 8px; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 16px 0 0; padding: 0; list-style: none; font-size: 16px; }
.swatch { display: inline-block; width: 14px; height: 14px; margin-right: 8px; }
.swatch-ok { background: var(--sun); }
.swatch-no { background: var(--ember); }

table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 12px 16px 12px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--cream); }
th { font-weight: 600; }
td { font-family: "IBM Plex Mono", monospace; overflow-wrap: break-word; }
.table-box table { min-width: 560px; }
.foot-note { margin-top: 12px; font-size: 15px; }

/* Folds: one per run, so more runs don't mean a longer page. Native <details>, no scripts. */
.panel { border-top: 1px solid var(--cream); }
.panel:last-of-type { border-bottom: 1px solid var(--cream); }
.panel > summary {
  position: sticky;
  left: 0;
  display: grid;
  grid-template-columns: 1.2em minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}
.panel > summary::-webkit-details-marker { display: none; }
.panel > summary::before { content: "+"; width: 1em; font: 500 18px/1 "IBM Plex Mono", monospace; color: var(--sun); }
.panel[open] > summary::before { content: "-"; }
.panel > summary:hover .panel-title { text-decoration: underline; }
.panel-title { font: 600 18px/1.3 "IBM Plex Sans", sans-serif; }
.panel-meta { grid-column: 2; font: 400 15px/1.4 "IBM Plex Mono", monospace; color: var(--sun); }
.panel[open] { padding-bottom: 20px; }
.panel > .tiles { margin-top: 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 28px; margin-top: 24px; }
.tile h3 { margin: 14px 0 4px; font-size: 24px; }
.tile p { margin: 0 0 12px; }
.tile video { display: block; width: 100%; aspect-ratio: 16 / 10; background: var(--ink); }
.no-clip {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  padding: 16px;
  background: var(--ink);
  color: var(--cream);
  text-align: center;
}

.log { margin: 0; padding: 0; list-style: none; }
.log li { margin-bottom: 16px; }
.log-when { display: block; font-weight: 600; }
.notice { max-width: 46em; padding: 16px; background: var(--ink); color: var(--cream); }
.notice a { color: var(--sun); }

.lab-footer { padding: 28px 16px; background: var(--ink); color: var(--cream); font-size: 15px; text-align: center; }
.lab-footer p { margin: 0 0 6px; }
.lab-footer a { color: var(--sun); }

@media (max-width: 819.98px) {
  .site-header { padding: 16px; }
  .band { display: block; padding: 0 16px; }
  .cell { padding: 40px 0; }
  .band h2 { font-size: 42px; }
  .trunk { display: none; }
  .stat-num { font-size: 36px; overflow-wrap: anywhere; }
  .lab-main { padding: 24px 16px 64px; }
  .lab-section, .lab-pair { margin-top: 56px; }
  .why { padding: 80px 16px 40px; border-radius: 50% 50% 0 0 / 40px 40px 0 0; }
}
.spec-line { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; }
.unlock-notes { max-width: 46em; margin-top: 16px; padding-left: 1.2em; }
.unlock-notes li + li { margin-top: 8px; }
