/* Datenblatt — personal application site of Furkan Serafettin Dag.
   Own identity (paper, ink, petrol). Deliberately NOT Luminovo's colours or type.
   Revised after the independent design/a11y review of 27 Sep 2026. */

:root {
  --paper: #fafaf7;
  --paper-2: #f2f2ec;
  --ink: #14171c;
  --muted: #545b66;
  --rule: #8a919c;
  --rule-strong: #14171c;
  --hair: #d5d8dd;
  --accent: #0b6b66;
  --accent-ink: #fafaf7;
  --accent-tint: #e3f1ef;
  --ok-fg: #13653f;
  --ok-bg: #e6f4ec;
  --warn-fg: #7a4e00;
  --warn-bg: #fff1d6;
  --neutral-fg: #3c434d;
  --neutral-bg: #eceef1;
  --todo-bg: #ffe66d;
  --todo-fg: #3d3000;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  --radius: 3px;
  --t: 180ms;
  --bar: 48px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1013;
    --paper-2: #161a1f;
    --ink: #e6e8eb;
    --muted: #a2a9b4;
    --rule: #6b7380;
    --rule-strong: #8b939e;
    --hair: #2a3038;
    --accent: #5fc4bc;
    --accent-ink: #0e1013;
    --accent-tint: #13302e;
    --ok-fg: #7fd6a5;
    --ok-bg: #12301f;
    --warn-fg: #f3c46b;
    --warn-bg: #33270d;
    --neutral-fg: #c3c9d2;
    --neutral-bg: #242a32;
    --todo-bg: #ffe66d;
    --todo-fg: #2b2200;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (min-width: 1160px) { html { scroll-padding-top: 64px; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: 'kern', 'liga';
  text-rendering: optimizeLegibility;
}
@media (min-width: 960px) { body { font-size: 1.0625rem; } }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; }
strong { font-weight: 600; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.no-js .js-only { display: none !important; }

.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: var(--ink); color: var(--paper); padding: 8px 12px; }
.skip:focus { top: 8px; }

.draft-banner {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em;
  background: var(--todo-bg); color: var(--todo-fg); padding: 6px var(--gutter); text-align: center;
}
mark.todo {
  background: var(--todo-bg); color: var(--todo-fg); font-family: var(--mono); font-size: 0.78em;
  padding: 0 0.3em; border-radius: 2px; outline: 1px dashed var(--todo-fg); outline-offset: -1px;
}

/* ---------- Document bar (sticky) ---------- */
.docbar { position: sticky; top: 0; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--rule); }
.docbar__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 24px; min-height: var(--bar);
}
.docbar__id { display: flex; gap: 8px; align-items: baseline; min-height: var(--bar); align-items: center; text-decoration: none; color: var(--ink); white-space: nowrap; min-width: 0; }
.docbar__name { font-weight: 600; font-size: 0.875rem; overflow: hidden; text-overflow: ellipsis; }
.docbar__doc { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.docbar__sep { color: var(--rule); }
.docbar__lang { margin-left: auto; display: flex; gap: 2px; font-family: var(--mono); font-size: 0.75rem; }
.docbar__lang a { color: var(--muted); text-decoration: none; padding: 6px 8px; border-radius: var(--radius); min-width: 36px; min-height: 32px; display: inline-grid; place-items: center; }
.docbar__lang a[aria-current='page'] { color: var(--paper); background: var(--ink); }
.docbar__toc {
  order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
  border-top: 1px solid var(--hair); overflow-x: auto; scrollbar-width: none;
}
.docbar__toc::-webkit-scrollbar { display: none; }
.docbar__toc ol { list-style: none; display: flex; gap: 18px; padding: 8px 0; }
.docbar__toc a { font-size: 0.8125rem; color: var(--muted); text-decoration: none; white-space: nowrap; display: inline-flex; gap: 6px; align-items: baseline; }
.docbar__toc a:hover, .docbar__toc a[aria-current='location'] { color: var(--ink); }
.docbar__toc a[aria-current='location'] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.docbar__n { font-family: var(--mono); font-size: 0.6875rem; color: var(--accent); }
@media (max-width: 1599px) { .docbar__doc, .docbar__id .docbar__sep { display: none; } }
@media (min-width: 1160px) { .docbar__id { flex: none; } .docbar__name { overflow: visible; } }
@media (min-width: 1160px) {
  .docbar__inner { flex-wrap: nowrap; }
  .docbar__toc { order: 2; flex: 0 1 auto; margin: 0 0 0 auto; padding: 0; border: 0; overflow: visible; }
  .docbar__toc ol { padding: 0; }
  .docbar__lang { order: 3; margin-left: 0; }
}

/* ---------- Sheet ---------- */
.sheet { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Hero / title block ---------- */
.hero {
  display: grid; gap: 40px; padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  border-bottom: 2px solid var(--rule-strong);
}
@media (min-width: 960px) { .hero { grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: end; } }
.hero__over { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.hero__name {
  font-size: clamp(2.4rem, 7.2vw, 5rem); font-weight: 600; letter-spacing: -0.03em; line-height: 0.98;
  margin-top: 18px; max-width: 12ch;
}
.hero__role { font-size: clamp(1.15rem, 2.2vw, 1.5rem); margin-top: 18px; font-weight: 500; }
.hero__loc { color: var(--muted); margin-top: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px;
  font-family: var(--mono); font-size: 0.8125rem; background: var(--accent-tint); color: var(--accent);
  padding: 7px 12px; border-radius: var(--radius); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-in-out 3; }
.chip__label { text-transform: uppercase; letter-spacing: 0.08em; font-weight: 500; }
@keyframes pulse { 50% { opacity: 0.25; } }
@media (max-width: 479px) { .chip { gap: 8px; font-size: 0.75rem; } }
.hero__lead { margin-top: 28px; max-width: 60ch; display: grid; gap: 12px; }
.hero__lead p:first-child { font-size: clamp(1.15rem, 2vw, 1.375rem); line-height: 1.45; }
.hero__lead p + p { color: var(--muted); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: var(--radius);
  font-weight: 500; font-size: 0.9375rem; text-decoration: none; transition: background var(--t), color var(--t);
}
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--ink); color: var(--paper); }
.btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

/* Waybill (Frachtbrief) */
.waybill { border: 1.5px solid var(--rule-strong); background: var(--paper); }
.waybill__title {
  display: flex; justify-content: space-between; gap: 12px; font-family: var(--mono); font-size: 0.75rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 10px 14px; border-bottom: 1.5px dashed var(--rule);
}
.waybill__no { color: var(--accent); letter-spacing: 0.04em; }
.waybill__row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--hair); font-size: 0.9375rem; }
.waybill__row:last-child { border-bottom: 0; }
.waybill__row dt { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); padding-top: 2px; }
.waybill__row dd { margin: 0; }
.waybill__row--r3 dd { font-family: var(--mono); font-weight: 500; color: var(--accent); }
@media (max-width: 959px) { .waybill__row--r0, .waybill__row--r3 { display: none; } }

/* ---------- Sections ---------- */
.sec { display: grid; gap: 20px; padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--rule); }
@media (min-width: 960px) {
  .sec { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .sec__head { position: sticky; top: 72px; align-self: start; }
}
@media (min-width: 960px) and (max-width: 1159px) { .sec__head { top: 104px; } }
.sec__meta { display: flex; gap: 10px; align-items: baseline; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sec__num { color: var(--accent); font-weight: 500; }
.sec__title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.015em; margin-top: 8px; hyphens: manual; overflow-wrap: break-word; }
@media (min-width: 960px) { .sec__title { font-size: clamp(1.5rem, 2.2vw, 1.75rem); } }
.sec__intro { max-width: 64ch; color: var(--muted); margin-bottom: 28px; }
.label {
  font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); border: 1px solid var(--hair); padding: 1px 6px; border-radius: 2px; margin-right: 4px;
}

/* Why: one row per argument, same rhythm as errata and history */
.why { list-style: none; }
.why__item { padding: 18px 0; border-top: 1px solid var(--hair); display: grid; gap: 8px; }
.why__item:first-child { border-top: 1px solid var(--rule-strong); }
.why__item h3 { font-size: 1.0625rem; font-weight: 600; display: flex; gap: 10px; align-items: baseline; }
.why__idx { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.why__item p { max-width: 62ch; }
@media (min-width: 900px) { .why__item { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); column-gap: 32px; } }

/* ---------- Block diagram ---------- */
.flow { margin: 0; padding: 16px 0 0; border-top: 1px solid var(--rule); }
.flow__hint { font-size: 0.8125rem; color: var(--muted); }
.flow__chain { list-style: none; display: grid; gap: 22px; margin-top: 14px; }
@media (min-width: 640px) { .flow__chain { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .flow__chain { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.flow__block {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 12px;
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 0;
  transition: background var(--t), box-shadow var(--t);
}
.flow__block--human { border-style: dashed; }
.flow__block::after {
  content: '↓'; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%);
  font-family: var(--mono); font-size: 0.875rem; color: var(--rule); line-height: 1;
}
@media (min-width: 640px) { .flow__block::after { content: '→'; left: auto; right: -17px; bottom: auto; top: 50%; transform: translateY(-50%); } }
.flow__block:last-child::after { display: none; }
@media (min-width: 640px) and (max-width: 1039px) { .flow__block:nth-child(2n)::after { display: none; } }
@media (min-width: 1040px) { .flow__block:nth-child(4n)::after { display: none; } }
.flow__pin { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); }
.flow__label { font-weight: 600; font-size: 0.9375rem; line-height: 1.3; }
.flow__sub { font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }
.flow__meta { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.flow__ref { position: relative; z-index: 2; font-family: var(--mono); font-size: 0.75rem; }
.flow__desc { font-size: 0.8125rem; line-height: 1.45; margin-top: 6px; }
.js .flow__desc { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.flow__hit { position: absolute; inset: 0; z-index: 1; background: transparent; border: 0; padding: 0; margin: 0; cursor: pointer; }
.flow__hit:focus-visible { outline-offset: 0; }
.flow__block:hover { background: var(--paper-2); }
.flow__block.is-selected { background: var(--accent-tint); box-shadow: 0 0 0 2px var(--accent); }
.flow__readout { margin-top: 18px; font-size: 0.9375rem; padding-top: 10px; border-top: 1px solid var(--accent); max-width: 70ch; }
.flow__readout:empty { display: none; }
.flow.is-live .flow__block { animation: signal 900ms ease calc(var(--i) * 150ms) 1 both; }
@keyframes signal { 35% { background: var(--accent-tint); } }
@media (max-width: 639px) {
  .flow__chain { gap: 14px; }
  .flow__block { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 8px; padding: 9px 10px; }
  .flow__block::after { bottom: -15px; }
  .flow__sub { display: none; }
  .flow__meta { margin: 0 0 0 auto; }
  .js .flow__block.is-selected .flow__desc { position: static; width: auto; height: auto; clip: auto; white-space: normal; flex-basis: 100%; }
  .flow__readout { display: none; }
}

/* Status chips */
.status { display: inline-block; font-family: var(--mono); font-size: 0.75rem; line-height: 1.4; padding: 2px 8px; border-radius: 2px; white-space: nowrap; font-weight: 500; }
.status--ok { color: var(--ok-fg); background: var(--ok-bg); }
.status--warn { color: var(--warn-fg); background: var(--warn-bg); }
.status--neutral { color: var(--neutral-fg); background: var(--neutral-bg); }
.status--human { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }

/* ---------- Bill of materials ---------- */
.bom { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.bom thead th {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-align: left; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--rule-strong);
}
.bom__grouphead th {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); text-align: left; padding: 18px 0 6px; border-bottom: 1px solid var(--rule);
}
.bom__row td, .bom__row th { text-align: left; vertical-align: top; padding: 14px 12px 14px 0; border-top: 1px solid var(--hair); font-weight: 400; }
.bom__group > .bom__row:nth-child(2) td, .bom__group > .bom__row:nth-child(2) th { border-top: 0; }
.bom__pos { font-family: var(--mono); font-size: 0.8125rem; color: var(--accent); width: 56px; }
.bom__n { display: block; font-weight: 600; }
.bom__fn { display: block; color: var(--muted); font-size: 0.875rem; margin-top: 2px; max-width: 52ch; }
.bom__status { width: 136px; }
.bom__ev { font-size: 0.8125rem; color: var(--muted); width: 30%; }
.bom__case td { border-top: 0; padding: 0 0 12px; }
@media (min-width: 720px) { .bom__case > td { padding-left: 56px; } }
.bom__row.is-linked td, .bom__row.is-linked th, .bom__case.is-linked td, .bom__row:target td, .bom__row:target th { background: var(--accent-tint); }
.bom__row.is-linked .bom__pos { font-weight: 600; }
.case summary {
  cursor: pointer; font-family: var(--mono); font-size: 0.75rem; color: var(--accent); letter-spacing: 0.02em;
  padding: 6px 0; list-style: none; display: inline-flex; gap: 8px; align-items: center; min-height: 32px;
}
.case summary::-webkit-details-marker { display: none; }
.case summary::before { content: '+'; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 2px; flex: none; }
.case[open] summary::before { content: '−'; }
.case__grid { display: grid; gap: 1px; background: var(--hair); border: 1px solid var(--hair); margin: 8px 0 6px; }
@media (min-width: 720px) { .case__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.case__cell { background: var(--paper); padding: 12px 14px; }
.case__cell dt { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.case__cell dd { margin: 6px 0 0; font-size: 0.875rem; line-height: 1.5; }
.case__cell--mine, .case__cell--value { background: var(--paper-2); }
.bom__note { margin-top: 14px; font-size: 0.8125rem; color: var(--muted); }

@media (max-width: 719px) {
  .bom, .bom tbody, .bom tr, .bom td, .bom tbody th { display: block; width: auto; }
  .bom thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .bom .bom__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 10px; align-items: baseline; border-top: 1px solid var(--rule-strong); padding: 12px 0 6px; }
  .bom__row td, .bom__row th { border: 0 !important; padding: 2px 0; }
  .bom__pos { grid-column: 1; grid-row: 1; font-size: 0.75rem; }
  .bom__name { grid-column: 2; grid-row: 1; }
  .bom__status { grid-column: 3; grid-row: 1; width: auto; }
  .bom__ev { grid-column: 2 / 4; width: auto; }
  .bom__case td { padding-bottom: 10px; }
  .bom__grouphead th { padding-top: 14px; }
}

/* Process */
.process { padding-top: 16px; border-top: 1px solid var(--rule-strong); }
.process > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; }
.process > summary::-webkit-details-marker { display: none; }
.process > summary::before { content: '+'; display: inline-grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--accent); color: var(--accent); font-family: var(--mono); border-radius: 2px; flex: none; }
.process[open] > summary::before { content: '−'; }
.process__title, .tools__title { font-size: 1.125rem; font-weight: 600; }
.tools__title { margin-bottom: -12px; }
.process__steps { list-style: none; counter-reset: step; display: grid; margin-top: 14px; }
@media (min-width: 900px) { .process__steps { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } }
.process__steps li { counter-increment: step; font-size: 0.875rem; line-height: 1.4; padding: 8px 0; border-top: 1px solid var(--hair); }
@media (min-width: 900px) { .process__steps li { border-top: 2px solid var(--rule-strong); padding-top: 8px; } }
.process__steps li::before { content: counter(step, lower-alpha) ')'; display: block; font-family: var(--mono); font-size: 0.6875rem; color: var(--accent); margin-bottom: 4px; }
.process__stats { margin-top: 18px; padding: 8px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); font-size: 0.875rem; }
.process__stats strong { font-family: var(--mono); font-weight: 500; }
.process__sep { color: var(--rule); }
.process__statsnote { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); }
.process__note { margin-top: 16px; max-width: 68ch; }

/* ---------- Figure captions ---------- */
.figcap { margin-top: 14px; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.02em; color: var(--muted); }

/* ---------- Supply chain overview ---------- */
.chainmap { margin: 0; position: relative; }
.chainmap__nodes { list-style: none; display: grid; gap: 0; position: relative; }
.chainmap__node a { display: grid; gap: 2px; text-decoration: none; color: var(--ink); padding: 10px 12px 12px 36px; position: relative; border-radius: 0; }
.chainmap__node a:hover { background: var(--paper-2); }
.chainmap__node a::before {
  content: ''; position: absolute; left: 8px; top: 14px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--rule-strong); z-index: 1;
}
.chainmap__n { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.chainmap__name { font-weight: 600; font-size: 1rem; line-height: 1.25; }
.chainmap__short { font-size: 0.8125rem; color: var(--muted); line-height: 1.35; }
/* Mobile: vertical chain drawn per station (connector from each dot to the next), no moving package */
.chainmap__track { display: none; }
.chainmap__node { position: relative; }
.chainmap__node:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 28px; bottom: -14px; width: 2px; background: var(--rule-strong); }
.chainmap__pkg { position: absolute; width: 12px; height: 12px; border-radius: 2px; background: var(--accent); }
@media (min-width: 760px) {
  .chainmap__nodes { grid-template-columns: repeat(6, minmax(0, 1fr)); padding-top: 34px; }
  .chainmap__node a { padding: 12px 10px 10px 0; }
  .chainmap__node a::before { left: 0; top: -27px; }
  .chainmap__node:not(:last-child)::after { display: none; }
  .chainmap__track { display: block; position: absolute; left: 7px; right: calc(100% / 6 - 7px); top: 13px; height: 2px; background: var(--rule-strong); }
  .chainmap__pkg { top: -6px; left: calc(100% - 7px); width: 14px; height: 14px; z-index: 2; }
  .chainmap.is-live .chainmap__pkg { animation: ship-h 2.4s cubic-bezier(.5, 0, .2, 1) 1 both; }
  @keyframes ship-h { from { left: -7px; } to { left: calc(100% - 7px); } }
}
.chainmap__node:target a, .chainmap__node a:focus-visible { background: var(--accent-tint); }

@media (min-width: 960px) {
  #chain .sec__head { position: static; }
  #chain .chainmap { margin-left: -288px; }
  .chainmap__name { hyphens: auto; -webkit-hyphens: auto; }
}

/* ---------- Stations ---------- */
.station__pos { margin-top: 12px; }
.station__lede { margin-top: 14px; color: var(--muted); font-size: 0.9375rem; line-height: 1.5; max-width: 60ch; }
@media (min-width: 960px) { .station__lede { font-size: 0.875rem; } }
.station { padding-block: clamp(32px, 4.5vw, 56px); }
.rail { display: inline-flex; gap: 4px; }
.rail__seg { width: 18px; height: 4px; background: var(--hair); }
.rail__seg.is-past { background: var(--rule); }
.rail__seg.is-now { background: var(--accent); }
.station .sec__body { display: grid; gap: 26px; align-content: start; }
.station__label { font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.station__context { font-size: 1.0625rem; line-height: 1.55; max-width: 64ch; }
.bring { list-style: none; border-top: 1px solid var(--rule-strong); }
.bring__item { padding: 12px 0; border-bottom: 1px solid var(--hair); display: grid; gap: 4px; }
.bring__item > p:first-child { max-width: 68ch; }
.bring__ev { font-size: 0.8125rem; color: var(--muted); }
.station__next { font-family: var(--mono); font-size: 0.8125rem; }
.station__next a { text-decoration: none; }
.station__next a:hover { text-decoration: underline; }

/* Proposal (how I would do it at Luminovo) */
.proposal { border: 1px dashed var(--rule); background: var(--paper-2); padding: 16px 18px; display: grid; gap: 10px; }
.proposal__head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; }
.proposal__label { font-family: var(--mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); }
.proposal__badge { font-family: var(--mono); font-size: 0.6875rem; color: var(--warn-fg); border: 1px dashed var(--warn-fg); padding: 1px 7px; border-radius: 2px; }
.proposal__title { font-size: 1rem; font-weight: 600; }
.proposal p { max-width: 68ch; }
.proposal__note { font-size: 0.8125rem; color: var(--muted); }
.spiced { display: grid; gap: 6px; }
.spiced div { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px; font-size: 0.9375rem; align-items: baseline; }
.spiced dt { display: flex; gap: 8px; align-items: baseline; font-size: 0.75rem; color: var(--muted); }
.spiced__l {
  font-family: var(--mono); font-weight: 600; color: var(--accent-ink); background: var(--accent); width: 20px; height: 20px;
  display: inline-grid; place-items: center; border-radius: 2px; font-size: 0.75rem; flex: none;
}
.spiced dd { margin: 0; }
.script { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--paper); font-size: 0.9375rem; line-height: 1.55; display: grid; gap: 8px; }
.script__follow { color: var(--muted); font-size: 0.875rem; }
.handoff { list-style: none; display: grid; gap: 4px; font-family: var(--mono); font-size: 0.8125rem; }
@media (min-width: 720px) { .handoff { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; } }
.handoff li { display: flex; gap: 8px; }
.handoff li::before { content: '☐'; color: var(--accent); }
.tools { display: grid; gap: 28px; }

/* ---------- Tracking history ---------- */
.track__id { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-bottom: 14px; }
.track { list-style: none; position: relative; border-top: 1px solid var(--rule-strong); }
.track::before { content: ''; position: absolute; left: 9px; top: 18px; bottom: 18px; width: 2px; background: var(--hair); }
.track__ev { position: relative; padding: 14px 0 14px 34px; border-bottom: 1px solid var(--hair); display: grid; gap: 2px; }
.track__mark { position: absolute; left: 3px; top: 18px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--rule-strong); background: var(--paper); z-index: 1; }
.track__ev--done .track__mark { background: var(--rule-strong); }
.track__ev--planned .track__mark { border-style: dashed; border-color: var(--rule); }
.track__ev--ongoing .track__mark { border-color: var(--accent); background: linear-gradient(to top, var(--accent) 50%, var(--paper) 50%); }
.track__ev--target .track__mark { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.track__when { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); }
.track__state { color: var(--muted); }
.track__ev--target .track__when, .track__ev--target .track__title { color: var(--accent); }
.track__title { font-size: 1rem; font-weight: 600; }
.track__text { max-width: 68ch; font-size: 0.9375rem; }
.track__ev--planned .track__title, .track__ev--planned .track__text { color: var(--muted); }
@media (min-width: 720px) {
  .track__ev { grid-template-columns: 170px minmax(0, 1fr); column-gap: 20px; }
  .track__when { grid-row: 1 / span 2; padding-top: 1px; }
}

/* ---------- Errata ---------- */
.errata { list-style: none; }
.errata__item { display: grid; gap: 4px 20px; padding: 16px 0; border-top: 1px solid var(--hair); }
.errata__item:first-child { border-top: 1px solid var(--rule-strong); }
@media (min-width: 720px) { .errata__item { grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1fr); } }
.errata__id { font-family: var(--mono); font-size: 0.8125rem; color: var(--warn-fg); font-weight: 500; }
.errata__issue { font-weight: 500; }
.errata__plan { color: var(--muted); font-size: 0.9375rem; }
.errata__plan::before { content: '→ '; color: var(--accent); }

/* ---------- Ordering information ---------- */
.order { border-top: 2px solid var(--rule-strong); }
.order__row { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--hair); }
@media (min-width: 640px) { .order__row { grid-template-columns: 180px minmax(0, 1fr); gap: 20px; } }
.order__row dt { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.04em; color: var(--muted); padding-top: 3px; }
.order__row dd { margin: 0; }

/* ---------- Footer ---------- */
.foot {
  max-width: var(--maxw); margin: 0 auto; padding: 28px var(--gutter) 48px; display: grid; gap: 6px;
  font-family: var(--mono); font-size: 0.75rem; color: var(--muted);
}
.foot a { color: var(--muted); }
.foot--cv { max-width: 210mm; padding-top: 0; }
.cv-head__contact > span { white-space: nowrap; }
.cv-head__contact > span.cv-sep, .cv-head__contact .todo { white-space: normal; }

/* Notice & privacy page (uses the CV sheet) */
.notice__title { font-size: 1.6rem; }
.notice__sec h2 { font-size: 1rem; margin-top: 20px; }
.notice__sec p { margin-top: 6px; max-width: 72ch; }

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

/* =====================================================================
   CV page (screen + print). One column, text first. The sheet stays
   light in dark mode, like a PDF in a viewer.
   ===================================================================== */
.page-cv { background: var(--paper-2); }
.cv-toolbar {
  max-width: 210mm; margin: 0 auto; padding: 16px var(--gutter) 12px; display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 0.8125rem;
}
.cv-toolbar__right { display: flex; gap: 6px; align-items: center; }
.cv-toolbar a { text-decoration: none; padding: 4px 8px; border-radius: var(--radius); }
.cv-toolbar a[aria-current='page'] { color: var(--paper); background: var(--ink); }
.cv-print { font: inherit; background: var(--accent); color: var(--accent-ink); border: 0; padding: 8px 14px; border-radius: var(--radius); cursor: pointer; min-height: 36px; }
.cv-sheet {
  max-width: 210mm; margin: 0 auto 48px; background: var(--paper); color: var(--ink); border: 1px solid var(--hair);
  padding: clamp(20px, 5vw, 16mm) clamp(16px, 5vw, 18mm); font-size: 0.9375rem; line-height: 1.45;
}
@media (prefers-color-scheme: dark) {
  .cv-sheet {
    --paper: #ffffff; --paper-2: #f2f2ec; --ink: #14171c; --muted: #545b66; --rule: #8a919c; --rule-strong: #14171c; --hair: #d5d8dd;
    --accent: #0b6b66; --todo-fg: #3d3000; color-scheme: light; border-color: #2a3038;
  }
}
.cv-head { border-bottom: 2px solid var(--rule-strong); padding-bottom: 12px; }
.cv-head__doc { font-family: var(--mono); font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.04em; }
.cv-head__name { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.02em; margin-top: 6px; }
.cv-head__target { font-size: 1.05rem; font-weight: 500; margin-top: 2px; }
.cv-head__contact { margin-top: 8px; font-size: 0.875rem; }
.cv-head__proof { margin-top: 6px; font-size: 0.875rem; }
.cv-sep { color: var(--rule); }
.cv-sec { margin-top: 14px; }
.cv-sec h2 {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); border-bottom: 1px solid var(--rule); padding-bottom: 3px; margin-bottom: 8px;
}
.cv-profile { font-size: 0.9375rem; }
.cv-entry { margin-top: 9px; break-inside: avoid; }
.cv-entry__head { font-size: 0.9375rem; font-weight: 400; line-height: 1.35; }
.cv-entry__title { font-weight: 600; }
.cv-entry__when { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); white-space: nowrap; }
.cv-entry__when .todo { white-space: normal; }
.cv-entry__sep { color: var(--rule); }
.cv-entry__note { font-size: 0.8125rem; color: var(--muted); margin-top: 1px; }
.cv-entry__list { margin: 4px 0 0 1.1em; padding: 0; }
.cv-entry__list li { margin-top: 2px; padding-left: 2px; }
.cv-skills { list-style: none; display: grid; gap: 3px; }

/* Supply-chain appendix page (upload PDF only) */
.appendix__title { font-size: 1.6rem; }
.appendix__list { list-style: none; margin-top: 10px; display: grid; gap: 8px; }
.appendix__st { break-inside: avoid; border-top: 1px solid var(--hair); padding-top: 7px; }
.appendix__name { font-size: 0.9375rem; font-weight: 600; }
.appendix__n { font-family: var(--mono); font-size: 0.8125rem; color: var(--accent); margin-right: 4px; }
.appendix__ctx { font-size: 0.8125rem; color: var(--muted); margin-top: 1px; }
.appendix__bring { margin: 3px 0 0 1.1em; padding: 0; font-size: 0.875rem; }
.appendix__bring li { margin-top: 1px; }
.appendix__ev { display: block; color: var(--muted); font-family: var(--mono); font-size: 0.6875rem; }
.appendix__more { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--rule-strong); font-size: 0.875rem; font-weight: 600; }

@page { size: A4; margin: 11mm 14mm; }
@media print {
  :root {
    --paper: #fff; --paper-2: #f4f4f0; --ink: #111; --muted: #444; --accent: #0b6b66; --accent-ink: #fff; --accent-tint: #e3f1ef;
    --hair: #ccc; --rule: #888; --rule-strong: #111;
    --ok-fg: #13653f; --ok-bg: #e6f4ec; --warn-fg: #7a4e00; --warn-bg: #fff1d6; --neutral-fg: #3c434d; --neutral-bg: #eceef1;
  }
  html { font-size: 9.3pt; }
  body { background: #fff; color: #111; }
  .draft-banner, .docbar, .skip, .cv-toolbar, .hero__cta, .flow__hint, .flow__readout, .flow__hit, .foot a, .chainmap__pkg, .station__next { display: none !important; }
  details::details-content { content-visibility: visible; display: block; }
  .cv-sheet { border: 0; margin: 0; padding: 0; max-width: none; font-size: 1rem; }
  .cv-head__name { font-size: 20pt; }
  .cv-sec { margin-top: 11px; }
  .cv-sec h2 { margin-bottom: 6px; }
  .cv-entry { margin-top: 7px; }
  .cv-entry__list li { margin-top: 1px; }
  a { color: inherit; text-decoration: none; }
  .cv-head a, .cv-entry a, .cv-profile a { color: var(--accent); }
  .page-cv { background: #fff; }
  .sec { break-inside: auto; }
  .bom thead { display: table-row-group; }
  .sec__head { break-inside: avoid; break-after: avoid; }
  .station__label, .proposal__head, .process__title, .tools__title, .bom__grouphead, .bom thead tr, .figcap { break-after: avoid; }
  .bring__item, .proposal, .flow__block, .case__cell, .bom__row, .track__ev, .errata__item, .why__item, .order, .waybill, .chainmap, .process__steps li, .spiced div { break-inside: avoid; }
  #chain .chainmap { margin-left: 0; }
  .waybill__row--r0, .waybill__row--r3 { display: grid !important; }
  .js .flow__desc { position: static !important; width: auto !important; height: auto !important; clip: auto !important; white-space: normal !important; }
  .chip__dot { animation: none; }
}
