/* Fonts are served from this site (SIL Open Font License, see assets/fonts/),
   so no visitor request goes to a third party. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("assets/fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/dmmono-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("assets/fonts/dmmono-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/dmmono-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "DM Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("assets/fonts/dmmono-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #0a0b0b;
  --panel: #101212;
  --panel-2: #151818;
  --line: #303535;
  --line-soft: #202424;
  --text: #f5f2e9;
  --muted: #b7bcba;
  --faint: #8e9693;
  --accent: #ff7340;
  --accent-soft: rgba(242, 107, 58, .12);
  --green: #80d39b;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Layout tokens. Every page reads these; no page sets its own widths.
     tools/check-layout.mjs measures the result on every page at 27 widths. */
  --rail: 1152px;     /* content width of the header, main and footer */
  --gutter: 32px;     /* smallest margin between the rail and the screen edge */
  --side: 320px;      /* the right-hand column: one width, one place, every page */
  --side-gap: 56px;   /* space between the main column and the right-hand column */
  --inset: 20px;      /* inner padding of every panel, equal left and right */
  --band: 48px;       /* space under the header and between sections */
  --header: 66px;
  --radius: 8px;
}
@media (max-width: 760px) {
  :root { --gutter: 20px; --inset: 16px; --band: 32px; }
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }

/* One rail. Header, main and footer put their content in the same centred
   column: --rail wide, never closer than --gutter to the screen edge. Padding
   (not a max-width) keeps full-width borders and backgrounds, and 100% (not vw)
   keeps both margins equal when a scrollbar takes space. */
.rail { padding-inline: max(var(--gutter), (100% - var(--rail)) / 2); }

.site-header {
  min-height: var(--header); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px;
  position: sticky; top: 0; z-index: 20; background: rgba(10, 11, 11, .96); backdrop-filter: blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; width: fit-content; font-weight: 700; letter-spacing: -.03em; font-size: 18px; }
.brand-dot { color: var(--accent); }
.brand-mark { width: 31px; height: 20px; overflow: visible; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: square; stroke-linejoin: miter; }
.brand-mark circle { fill: var(--accent); stroke: none; }
.header-status { display: flex; align-items: center; gap: 8px; color: var(--faint); font: 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.header-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(128,211,155,.08); }
.header-action { justify-self: end; border: 1px solid var(--line); border-radius: 6px; padding: 9px 13px; font-size: 12px; font-weight: 600; }
.header-action:hover { border-color: var(--accent); color: var(--accent); }
.compact-label { display: none; }

/* Every page starts its first line at the same height under the header. */
main { padding-block: var(--band) calc(var(--band) * 1.5); }

.discovery-head { margin-bottom: var(--band); }
.discovery-copy { max-width: 960px; }
.kicker, .panel-label { margin: 0 0 14px; font: 500 11px/1 var(--mono); color: var(--accent); letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; max-width: 960px; font-size: clamp(42px, 6.8vw, 88px); line-height: .94; letter-spacing: -.065em; font-weight: 600; text-wrap: balance; }
.discovery-copy > p:last-child { margin: 25px 0 0; max-width: 760px; color: var(--muted); font-size: 18px; line-height: 1.65; }
.terminal-search { margin-top: var(--band); border: 1px solid #515959; border-radius: var(--radius); overflow: hidden; background: #0d0f0f; box-shadow: 0 28px 90px rgba(0,0,0,.32); }
.terminal-bar { min-height: 36px; padding: 0 var(--inset); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--faint); font: 10px var(--mono); letter-spacing: .04em; }
.terminal-lights { display: flex; gap: 6px; }
.terminal-lights i { width: 6px; height: 6px; border-radius: 50%; background: #353a3a; }
.terminal-lights i:first-child { background: var(--accent); }
.search-box { min-height: 82px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 0 var(--inset); border-bottom: 1px solid var(--line); background: var(--panel); }
.search-box:focus-within { background: #131616; box-shadow: inset 3px 0 var(--accent); }
.search-box .prompt { color: var(--accent); font: 500 22px var(--mono); }
.search-box input { min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font: 500 clamp(17px, 2vw, 22px) var(--mono); caret-color: var(--accent); }
.search-box input::placeholder { color: #949b9f; }
.cursor { width: 8px; height: 21px; background: var(--accent); opacity: .75; animation: cursor-blink 1.1s steps(2, start) infinite; }
.search-box:focus-within .cursor { display: none; }
kbd { padding: 4px 7px; border: 1px solid var(--line); border-bottom-color: #3b4246; border-radius: 4px; color: var(--faint); background: #0d1011; font: 11px var(--mono); }
.quick-goals { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 13px var(--inset); border-bottom: 1px solid var(--line-soft); }
.quick-goals > span { margin-right: 2px; color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
.quick-goals button { border: 1px solid var(--line); background: transparent; border-radius: 4px; padding: 7px 9px; color: var(--muted); font: 10px var(--mono); cursor: pointer; }
.quick-goals button:hover { color: var(--text); border-color: var(--accent); }
.terminal-result { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 var(--inset); color: var(--faint); font: 10px var(--mono); }
.terminal-result > span { display: flex; align-items: center; gap: 8px; }
.terminal-result i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.terminal-result strong { color: var(--text); font-weight: 500; }
@keyframes cursor-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* The catalog spans the rail. Its note is the right-hand column: it starts
   --side from the rail's right edge, the same line as the recipe side card. */
.catalog-shell { display: grid; grid-template-columns: minmax(0, 1fr) calc(var(--side) - 1px); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.catalog-note { padding: var(--inset); background: #0d1011; border-left: 1px solid var(--line); }

.results { min-width: 0; background: var(--bg); }
.results-bar { min-height: 69px; padding: 0 var(--inset); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.results-bar > div { display: flex; align-items: baseline; gap: 11px; }
.results-bar strong { font-size: 13px; }
.results-bar span { color: var(--faint); font-size: 11px; }

.workflow-row { position: relative; display: grid; grid-template-columns: 66px minmax(0, 1fr) 150px 24px; gap: 20px; padding: 32px var(--inset); transition: background .16s; }
.workflow-row:hover { background: var(--panel); }
.workflow-signal { color: var(--faint); font: 9px var(--mono); display: flex; flex-direction: column; gap: 12px; align-items: flex-start; padding-top: 5px; letter-spacing: .04em; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(128,211,155,.08); }
.row-topline { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.status, .availability { border: 1px solid var(--line); border-radius: 4px; color: var(--muted); font: 10px/1 var(--mono); padding: 5px 7px; }
.status { color: var(--green); border-color: rgba(128,211,155,.24); background: rgba(128,211,155,.05); }
.availability { color: var(--accent); border-color: rgba(242,107,58,.25); background: var(--accent-soft); }
.workflow-main h2 { margin: 0; font-size: 24px; line-height: 1.22; letter-spacing: -.035em; }
.workflow-main > p { margin: 11px 0 19px; max-width: 670px; color: var(--muted); line-height: 1.6; font-size: 13px; }
.recipe-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted); font: 10px var(--mono); }
.recipe-flow span { padding: 8px 9px; border: 1px solid var(--line-soft); background: #0c0e0e; }
.recipe-flow b { margin-right: 6px; color: var(--accent); font-weight: 500; }
.recipe-flow i { color: var(--faint); font-style: normal; }
.workflow-facts { margin: 0; display: flex; flex-direction: column; gap: 13px; }
.workflow-facts div { display: grid; gap: 3px; }
.workflow-facts dt { color: var(--faint); font: 10px var(--mono); text-transform: uppercase; letter-spacing: .07em; }
.workflow-facts dd { margin: 0; color: #d5d8da; font-size: 12px; }
.row-arrow { color: var(--faint); font-size: 18px; transition: color .15s, transform .15s; }
.workflow-row:hover .row-arrow { color: var(--accent); transform: translate(2px, -2px); }
.empty-state { padding: 70px var(--inset); text-align: center; color: var(--muted); }
.empty-state p { margin: 0 0 12px; }
.empty-state a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.catalog-note h2 { margin: 0 0 24px; font-size: 22px; line-height: 1.2; letter-spacing: -.03em; }
.recipe-legend { margin: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.recipe-legend div { padding: 15px 0; border-bottom: 1px solid var(--line-soft); }
.recipe-legend dt { color: var(--text); font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.recipe-legend dd { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.catalog-rule { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.catalog-rule strong { font-size: 12px; }
.catalog-rule p { margin: 6px 0 0; color: var(--faint); font-size: 12px; line-height: 1.55; }

footer { min-height: 70px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); color: var(--faint); font: 10px var(--mono); }
footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
footer a:hover { color: var(--accent); }
.content-section > p a, .side-card p a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* Workflow detail. The hero and the body share one grid: the main column, then
   --side-gap, then the right-hand column, --side wide on the rail's right edge. */
.breadcrumbs { display: flex; gap: 9px; align-items: center; color: var(--faint); font: 11px/1 var(--mono); }
.breadcrumbs a:hover { color: var(--accent); }
.workflow-hero { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--side-gap); align-items: start; padding-block: var(--band); border-bottom: 1px solid var(--line); }
.workflow-hero h1 { max-width: 830px; font-size: clamp(38px, 5.3vw, 66px); }
.workflow-hero .lead { max-width: 730px; margin: 21px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.workflow-layout { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--side-gap); padding-top: var(--band); }

/* Panels made of cells share one pattern: a 1px hairline between cells, one
   radius, and --inset padding inside every cell. */
.hero-receipt, .side-card, .output-grid, .ingredient-grid, .sample-trace { display: grid; gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hero-receipt, .side-card, .sample-trace { background: var(--line-soft); }
.output-grid, .ingredient-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--line); }

.hero-receipt { margin: 0; }
.hero-receipt > div { padding: 16px var(--inset); background: var(--panel); }
.hero-receipt dt { margin-bottom: 5px; color: var(--faint); font: 9px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.hero-receipt dd { margin: 0; font-size: 13px; }

.content-section { padding-bottom: var(--band); margin-bottom: var(--band); border-bottom: 1px solid var(--line); }
.section-number { color: var(--accent); font: 10px var(--mono); }
.content-section h2 { margin: 8px 0 17px; font-size: 27px; letter-spacing: -.035em; }
.content-section > p { color: var(--muted); line-height: 1.7; max-width: 760px; }
.step-list { margin-top: 20px; border-top: 1px solid var(--line); }
.step { display: grid; grid-template-columns: 34px 150px minmax(0, 1fr); gap: 16px; padding: 17px 0; border-bottom: 1px solid var(--line-soft); }
.step > span { color: var(--faint); font: 10px var(--mono); }
.step strong { font-size: 13px; }
.step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.output-grid > div { padding: var(--inset); background: var(--bg); }
.output-grid strong { display: block; font-size: 25px; letter-spacing: -.04em; }
.output-grid span { color: var(--muted); font-size: 11px; }
.ingredient-grid > div { min-width: 0; padding: var(--inset); background: var(--panel); }
.ingredient-grid span { color: var(--accent); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .09em; }
.ingredient-grid h3 { margin: 10px 0 8px; font-size: 14px; }
.ingredient-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.sample-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.sample-grid.single { grid-template-columns: minmax(0, 700px); }
.sample-card { margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.sample-card img { width: 100%; aspect-ratio: 4/5; object-fit: cover; display: block; }
.sample-card > div { padding: 14px var(--inset); color: var(--muted); font-size: 12px; line-height: 1.5; border-top: 1px solid var(--line); }
.sample-trace { margin-top: 20px; }
.sample-trace > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 16px var(--inset); background: var(--bg); }
.sample-trace span { color: var(--faint); font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.sample-trace p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.58; }
.evidence-table { width: 100%; border-collapse: collapse; margin-top: 18px; }
.evidence-table th, .evidence-table td { padding: 13px 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.evidence-table th { width: 190px; color: var(--faint); font: 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.evidence-table td { color: var(--muted); font-size: 13px; line-height: 1.55; }
.side-card { position: sticky; top: calc(var(--header) + 24px); }
.side-card > div { padding: 18px var(--inset); background: var(--panel); }
.side-card h3 { margin: 0 0 10px; font-size: 12px; }
.side-card p, .side-card li { color: var(--muted); font-size: 12px; line-height: 1.55; }
.side-card ul { margin: 0; padding-left: 17px; }
.side-card .apply { display: block; text-align: center; padding: 13px; border-radius: 6px; background: var(--accent); color: #160d09; font-weight: 700; font-size: 12px; }
.side-card .apply:hover { background: #ff8052; }
.side-card .smallprint { margin: 10px 0 0; color: var(--faint); font-size: 11px; line-height: 1.45; text-align: center; }
.notice { border: 1px solid rgba(242,107,58,.25); background: var(--accent-soft); border-radius: var(--radius); padding: 16px var(--inset); color: #d6b4a7; font-size: 12px; line-height: 1.55; }

/* Every page switches between two columns and one at the same width. */
@media (max-width: 1040px) {
  .catalog-shell { grid-template-columns: minmax(0, 1fr); }
  .catalog-note { border-left: 0; border-top: 1px solid var(--line); }
  .workflow-hero, .workflow-layout { grid-template-columns: minmax(0, 1fr); gap: var(--band); }
  .hero-receipt { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workflow-layout > aside { grid-row: 1; }
  .workflow-layout > div { grid-row: 2; }
  .side-card { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { grid-template-columns: minmax(0, 1fr) auto; }
  .header-status { display: none; }
  .full-label { display: none; }
  .compact-label { display: inline; }
  .search-box { min-height: 70px; }
  .cursor { display: none; }
  .quick-goals { align-items: flex-start; }
  .quick-goals > span { width: 100%; }
  .terminal-result { align-items: flex-start; flex-direction: column; gap: 7px; padding-block: 12px; }
  .workflow-row { grid-template-columns: 44px minmax(0, 1fr) 20px; gap: 12px; padding-block: 24px; }
  .workflow-facts { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-top: 14px; border-top: 1px solid var(--line-soft); }
  .recipe-flow i { display: none; }
  .recipe-flow span { width: 100%; }
  .row-arrow { grid-column: 3; grid-row: 1; }
  footer { flex-direction: column; align-items: flex-start; justify-content: center; padding-block: 20px; }
  .step { grid-template-columns: 28px minmax(0, 1fr); }
  .step p { grid-column: 2; }
  .ingredient-grid { grid-template-columns: minmax(0, 1fr); }
  .sample-grid { grid-template-columns: minmax(0, 1fr); }
  .sample-trace > div { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .evidence-table, .evidence-table tbody, .evidence-table tr, .evidence-table th, .evidence-table td { display: block; width: 100%; }
  .evidence-table tr { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
  .evidence-table th, .evidence-table td { border: 0; padding: 0; }
  .evidence-table td { margin-top: 6px; }
  .quick-goals button, .header-action { min-height: 44px; }
}
@media (max-width: 500px) {
  h1, .workflow-hero h1 { font-size: 40px; }
  .brand { font-size: 16px; }
  .brand-mark { width: 27px; }
  .search-box { min-height: 64px; }
  .search-box input { font-size: 16px; }
  .search-box kbd { display: none; }
  .terminal-bar, .quick-goals > span, .quick-goals button, .terminal-result, .workflow-signal, .workflow-facts dt { font-size: 11px; }
  .quick-goals button { width: 100%; text-align: left; }
  .workflow-facts { grid-template-columns: minmax(0, 1fr); }
  .hero-receipt, .output-grid, .side-card { grid-template-columns: minmax(0, 1fr); }
}
