:root {
  --bg: #f4f1ea;
  --surface: #fbfaf6;
  --ink: #1b1a17;
  --muted: #6b675e;
  --line: #d9d3c5;
  --accent: #b5541c;
  --accent-soft: #f3e1d3;
  --cool: #2f6f8f;
  --ok: #3f7d4e;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, Segoe UI, sans-serif;
  --radius: 10px;
  --wrap: 1100px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141412;
    --surface: #1d1c19;
    --ink: #ece8de;
    --muted: #9c978b;
    --line: #34322c;
    --accent: #e0793a;
    --accent-soft: #3a2619;
    --cool: #6fb2d2;
    --ok: #7cbf8a;
  }
}
:root[data-theme="dark"] {
    --bg: #141412;
    --surface: #1d1c19;
    --ink: #ece8de;
    --muted: #9c978b;
    --line: #34322c;
    --accent: #e0793a;
    --accent-soft: #3a2619;
    --cool: #6fb2d2;
    --ok: #7cbf8a;
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }

/* header */
.site-head { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

/* hero */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--line); }
.eyebrow { font: 500 13px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 14px; }
h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 16px; letter-spacing: -.02em; }
h2 { font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -.01em; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lede { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }

section { padding: 48px 0; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.price { font: 500 15px var(--mono); color: var(--ink); margin-top: 10px !important; }
.split { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .split { grid-template-columns: 1.1fr .9fr; align-items: center; } }
.muted { color: var(--muted); }
.awards { padding-left: 18px; margin: 12px 0 0; color: var(--muted); }
.creds { font: 500 14px var(--mono); color: var(--muted); }

/* brewing tiles */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.chip { font: 500 13px var(--mono); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tile { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--accent); transform: translateY(-2px); }
.tile .q { color: var(--muted); font-size: 15px; margin: 0; }
.tile-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.batch-id { font: 500 12px var(--mono); color: var(--muted); }
.status { font: 500 12px var(--mono); padding: 3px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.status.Bottled { background: transparent; color: var(--ok); border: 1px solid var(--ok); }
.stats { display: flex; gap: 16px; font: 500 13px var(--mono); color: var(--ink); flex-wrap: wrap; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); }
.stats span b { color: var(--muted); font-weight: 400; margin-right: 4px; }
.spark { width: 100%; height: 40px; display: block; }
.sample-flag { font: 500 11px var(--mono); color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* batch page */
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 24px 0; }
.kv div { padding: 12px 14px; box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.kv dt { font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kv dd { margin: 4px 0 0; font: 500 18px var(--mono); }
.qa { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; margin: 0 0 16px; }
.qa .label { font: 500 12px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.qa p { margin: 4px 0 0; font-size: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
td.num { font-family: var(--mono); white-space: nowrap; }
.table-scroll { overflow-x: auto; }
ol.steps { padding-left: 20px; }
ol.steps li { margin-bottom: 6px; }
.chart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.chart h3 { font: 500 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .axis text { font: 11px var(--mono); fill: var(--muted); }
.chart .grid line { stroke: var(--line); }
.downloads { display: flex; gap: 10px; flex-wrap: wrap; }

.site-foot { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-foot a { color: var(--muted); }

/* ===== v2: sections, diagrams, motion ===== */
.site-head { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: color-mix(in srgb, var(--surface) 86%, transparent); }
.nav a.cta { color: var(--accent); }
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(600px 300px at 85% 20%, var(--accent-soft), transparent 70%); }
.hero .wrap { position: relative; }

.sections { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.sec-card { display: flex; flex-direction: column; gap: 12px; min-height: 220px; text-decoration: none; color: inherit; position: relative; overflow: hidden; }
.sec-card .num { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .1em; }
.sec-card h3 { font-size: 24px; letter-spacing: -.01em; }
.sec-card .go { margin-top: auto; font: 500 14px var(--mono); color: var(--accent); }
.sec-card svg.icon { position: absolute; right: 16px; top: 16px; width: 56px; height: 56px; opacity: .55; }
.sec-card:hover svg.icon { opacity: 1; }

.diagram { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 14px; color: var(--muted); margin-top: 12px; }
.diagram .lbl { font: 500 11px var(--mono); fill: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.diagram .lbl.hot { fill: var(--accent); }
.diagram .lbl.cold { fill: var(--cool); }
.diagram .lbl.ink { fill: var(--ink); }
.diagram .shell { fill: none; stroke: var(--ink); stroke-opacity: .55; stroke-width: 1.5; }
.diagram .part { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; }
.diagram .hot-fill { fill: var(--accent); }
.diagram .cold-fill { fill: var(--cool); }
.diagram .stack-fill { fill: var(--ink); fill-opacity: .18; }
.diagram .coil { fill: none; stroke: var(--accent); stroke-width: 2; }
.diagram .thin { stroke: var(--ink); stroke-opacity: .4; stroke-width: 1; fill: none; }
.diagram .leader { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; fill: none; }

.legend { display: grid; gap: 8px 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 12px 0 0; padding: 0; list-style: none; font-size: 15px; }
.legend li { display: flex; gap: 10px; }
.legend b { font: 500 13px var(--mono); color: var(--accent); min-width: 22px; }
.legend span { color: var(--muted); }

.cycle { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); counter-reset: step; }
.cycle .card { padding: 16px; }
.cycle .card::before { counter-increment: step; content: "0" counter(step); font: 500 12px var(--mono); color: var(--accent); display: block; margin-bottom: 6px; }

.specs { display: grid; gap: 1px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* motion */
@keyframes glow { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes wave { to { stroke-dashoffset: -120; } }
@keyframes spark { 0%,80%,100% { opacity: 0; } 85%,95% { opacity: 1; } }
@keyframes disp { 0% { transform: translateX(0); } 50% { transform: translateX(26px); } 100% { transform: translateX(0); } }
@keyframes pist { 0% { transform: translateX(-9px); } 25% { transform: translateX(0); } 50% { transform: translateX(9px); } 75% { transform: translateX(0); } 100% { transform: translateX(-9px); } }
@keyframes pist2 { 0% { transform: translateX(0); } 25% { transform: translateX(16px); } 50% { transform: translateX(0); } 75% { transform: translateX(-16px); } 100% { transform: translateX(0); } }
@keyframes hum { 0%,100% { stroke-opacity: .35; } 50% { stroke-opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.anim-glow { animation: glow 2s ease-in-out infinite; }
.anim-wave { stroke-dasharray: 8 6; animation: wave 2.4s linear infinite; }
.anim-spark { animation: spark 2.4s linear infinite; }
.anim-disp { animation: disp 2.4s ease-in-out infinite; }
.anim-pist { animation: pist2 2.4s ease-in-out infinite; }
.anim-hum { animation: hum 2.4s ease-in-out infinite; }
.rise { animation: rise .6s ease-out both; }
.rise:nth-child(2) { animation-delay: .08s; } .rise:nth-child(3) { animation-delay: .16s; } .rise:nth-child(4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .anim-glow, .anim-wave, .anim-spark, .anim-disp, .anim-pist, .anim-hum, .rise { animation: none; } }
@media (max-width: 720px) {
  .diagram { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .diagram svg { min-width: 640px; }
  .diagram figcaption::before { content: "Scroll the diagram sideways. "; color: var(--accent); }
}

/* ===== v3: brewing + misc diagrams ===== */
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-70px); opacity: 0; } }
@keyframes drip { 0% { transform: translateY(-18px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
@keyframes nozzle { 0% { transform: translateX(0); } 50% { transform: translateX(150px); } 100% { transform: translateX(0); } }
@keyframes layer { 0%,40% { opacity: 0; } 60%,100% { opacity: 1; } }
@keyframes blink { 0%,60%,100% { opacity: .25; } 30% { opacity: 1; } }
.anim-bubble { animation: bubble 3s ease-in infinite; }
.anim-bubble.b2 { animation-delay: .9s; } .anim-bubble.b3 { animation-delay: 1.7s; } .anim-bubble.b4 { animation-delay: 2.3s; }
.anim-drip { animation: drip 2.2s ease-in infinite; }
.anim-drip.d2 { animation-delay: .7s; } .anim-drip.d3 { animation-delay: 1.4s; }
.anim-nozzle { animation: nozzle 4s ease-in-out infinite; }
.anim-layer { animation: layer 4s ease-in-out infinite; }
.anim-blink { animation: blink 1.6s ease-in-out infinite; }
.diagram .honey { fill: var(--accent); fill-opacity: .85; stroke: var(--bg); stroke-width: 1.5; }
.diagram .liquid { fill: var(--accent); fill-opacity: .35; }
.diagram .glass { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-opacity: .7; }
@media (prefers-reduced-motion: reduce) { .anim-bubble, .anim-drip, .anim-nozzle, .anim-layer, .anim-blink { animation: none; } }

.tracks { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.track { border-top: 3px solid var(--accent); }
.track.cool { border-top-color: var(--cool); }
.track .num { font: 500 12px var(--mono); color: var(--muted); letter-spacing: .1em; }
.track ul { padding-left: 18px; margin: 10px 0 0; color: var(--muted); font-size: 15px; }
.track li { margin-bottom: 4px; }
.spectrum { margin-top: 8px; }
.note { font-size: 14px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; }

/* ===== v4: experiments ===== */
.status.Retired, .status.Concept { background: transparent; color: var(--muted); border: 1px solid var(--line); }
.status.Built { background: transparent; color: var(--ok); border: 1px solid var(--ok); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font: 500 12px var(--mono); color: var(--muted); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }

/* ===== v5: lab grid ===== */
.cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cell { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; background: var(--bg); text-decoration: none; color: inherit; min-height: 64px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cell:hover { background: var(--surface); }
.cell-meta { display: flex; gap: 8px; align-items: center; font: 500 11px var(--mono); color: var(--muted); letter-spacing: .04em; }
.cell-meta .num { color: var(--ink); }
.cell-status { margin-left: auto; }
.cell-title { font-weight: 600; font-size: 14px; line-height: 1.3; }

table.lab { font-size: 14px; }
table.lab th { padding: 6px 8px; }
table.lab td { padding: 7px 8px; line-height: 1.35; }
table.lab tr.lab-row { cursor: pointer; }
table.lab tr.lab-row:hover { background: var(--surface); }
table.lab .num { font: 500 12px var(--mono); color: var(--muted); width: 28px; }
table.lab .t { font-weight: 600; min-width: 200px; }
table.lab .t a { color: inherit; text-decoration: none; }
table.lab .r { color: var(--muted); max-width: 520px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
table.lab .k, table.lab .y { font: 500 12px var(--mono); color: var(--muted); white-space: nowrap; }
table.lab .s { font: 500 12px var(--mono); white-space: nowrap; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--muted); vertical-align: 1px; }
.dot.Built { background: var(--ok); } .dot.Testing { background: var(--accent); } .dot.Retired { background: var(--muted); opacity: .5; } .dot.Concept { background: var(--cool); }
@media (max-width: 760px) { table.lab .r, table.lab .k, table.lab th:nth-child(3), table.lab th:nth-child(4) { display: none; } table.lab .t { min-width: 0; } }

/* mobile diagrams: scale down, but keep labels legible */
@media (max-width: 720px) {
  .diagram { overflow: visible; padding: 12px; }
  .diagram svg { min-width: 0; }
  .diagram .lbl { font-size: 17px; }
  .diagram figcaption::before { content: none; }
}
@media (max-width: 720px) {
  .diagram { margin-left: -16px; margin-right: -16px; border-radius: 0; border-left: 0; border-right: 0; padding: 12px 4px; }
  .diagram .lbl { font-size: 15px; }
  .diagram .minor { display: none; }
}

/* ===== v6: social proof ===== */
.stats-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: baseline; margin: 26px 0 0; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-n { font: 600 34px/1 var(--mono); letter-spacing: -.02em; }
.stat-l { font: 500 12px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat-link { font: 500 12px var(--mono); color: var(--muted); align-self: center; }
.ticker { position: relative; overflow: hidden; margin: 28px -16px 0; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: flex; gap: 12px; width: max-content; animation: ticker calc(var(--tick-n, 12) * 7s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
.tick { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; color: inherit; font-size: 14px; white-space: nowrap; }
.tick-t { overflow: hidden; text-overflow: ellipsis; }
.tick-a { font: 500 12px var(--mono); color: var(--muted); }
.tick-k { font: 600 13px var(--mono); color: var(--accent); }
.tick.question .tick-k { color: var(--cool); }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; flex-wrap: wrap; width: auto; } .tick { white-space: normal; } }
@media (max-width: 720px) { .stat-n { font-size: 28px; } }

/* ===== v7: mobile nav ===== */
@media (max-width: 720px) {
  .site-head .wrap { flex-wrap: nowrap; gap: 10px; min-height: 56px; }
  .brand { font-size: 15px; white-space: nowrap; }
  .nav { flex-wrap: nowrap; overflow-x: auto; gap: 14px; font-size: 14px; padding-bottom: 2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
}
@media (max-width: 720px) {
  .brand { flex-shrink: 0; }
  .nav { flex: 1 1 auto; min-width: 0; justify-content: flex-start; }
}
@media (max-width: 420px) { .brand .brand-text { display: none; } }

/* ===== v8: detail navigation ===== */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; font: 500 12px var(--mono); color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--ink); } .crumbs .cur { color: var(--ink); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 16px; align-items: center; }
.pager a { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 2px; }
.pager a span { font: 500 12px var(--mono); color: var(--muted); } .pager a b { font-size: 15px; }
.pager .pager-r { text-align: right; align-items: flex-end; }
.pager .pager-c { font: 500 13px var(--mono); color: var(--accent); white-space: nowrap; }
.contact-line { margin-top: 20px; font-size: 14px; }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .pager-r { text-align: left; align-items: flex-start; } .pager .pager-c { order: 3; } }

/* ===== v9: theme toggle, start-here ===== */
.theme-btn { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 999px; width: 30px; height: 30px; display: inline-grid; place-items: center; cursor: pointer; flex-shrink: 0; padding: 0; }
.theme-btn:hover { color: var(--ink); border-color: var(--ink); }
.theme-btn svg { width: 15px; height: 15px; }
:root[data-theme="dark"] .ico-sun, :root:not([data-theme="light"]) .ico-sun { display: block; }
.ico-sun { display: none; } .ico-moon { display: block; }
:root[data-theme="dark"] .ico-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ico-moon { display: none; } :root:not([data-theme="light"]) .ico-sun { display: block; } }
.start { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.start a { background: var(--surface); padding: 16px 18px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
.start a:hover { background: var(--bg); }
.start .k { font: 500 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.start b { font-size: 15px; } .start span { font-size: 13px; color: var(--muted); }
