/* Layout: a document column with a registry-style module list and a sticky estimate ledger;
   the opening shows the project timeline drawn to scale. Palette: spruce ink on sage paper, MezEx green. */
:root {
  --bg: #f2f5f3;
  --surface: #ffffff;
  --sunken: #e9efec;
  --ink: #12261e;
  --ink-2: #4a5d55;
  --ink-3: #6f8279;
  --rule: #d3dcd7;
  --rule-soft: #e3e9e6;
  --accent: #0b7a52;
  --accent-strong: #075c3d;
  --accent-soft: #e0f1e8;
  --on-accent: #ffffff;
  --warn: #8a5300;
  --warn-soft: #fcefd6;
  --crit: #b3261e;
  --crit-soft: #fbe5e2;
  --st-tz: #3f5c9e;
  --st-dev: #0b7a52;
  --st-test: #b7791f;
  --st-impl: #12261e;
  --st-wait: #8fa29a;
  --st-cb: #c8d6cf;
  --hol: rgba(18, 38, 30, 0.07);
  --focus: #3f5c9e;
  --shadow: 0 1px 2px rgba(18, 38, 30, 0.06), 0 10px 28px rgba(18, 38, 30, 0.07);
  --font-display: "Literata", "PT Serif", "Georgia", serif;
  --font-body: "Golos Text", "Segoe UI", system-ui, -apple-system, "Roboto", "Arial", sans-serif;
  --radius: 10px;
  --radius-s: 6px;
  --wrap: 1140px;
  --read: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1813; --surface: #13221b; --sunken: #0a140f; --ink: #e3ede8; --ink-2: #a8bbb2; --ink-3: #82978e;
    --rule: #2a3c34; --rule-soft: #1d2e26; --accent: #45c996; --accent-strong: #7fe0b8; --accent-soft: #163a2c;
    --on-accent: #06281b; --warn: #e7b15a; --warn-soft: #3a2c12; --crit: #f28b7d; --crit-soft: #3b1a16;
    --st-tz: #8aa5e8; --st-dev: #45c996; --st-test: #e2a64b; --st-impl: #e3ede8; --st-wait: #5e726a; --st-cb: #2c4a3d;
    --hol: rgba(227, 237, 232, 0.06); --focus: #8aa5e8; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1813; --surface: #13221b; --sunken: #0a140f; --ink: #e3ede8; --ink-2: #a8bbb2; --ink-3: #82978e;
  --rule: #2a3c34; --rule-soft: #1d2e26; --accent: #45c996; --accent-strong: #7fe0b8; --accent-soft: #163a2c;
  --on-accent: #06281b; --warn: #e7b15a; --warn-soft: #3a2c12; --crit: #f28b7d; --crit-soft: #3b1a16;
  --st-tz: #8aa5e8; --st-dev: #45c996; --st-test: #e2a64b; --st-impl: #e3ede8; --st-wait: #5e726a; --st-cb: #2c4a3d;
  --hol: rgba(227, 237, 232, 0.06); --focus: #8aa5e8; --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.55;
  -webkit-text-size-adjust: 100%; text-rendering: optimizeLegibility;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--ink); text-wrap: balance; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(31px, 4.4vw, 48px); line-height: 1.08; }
h2 { font-size: clamp(25px, 2.8vw, 32px); line-height: 1.18; }
h3 { font-size: 20px; line-height: 1.3; }
h4 { font-size: 17px; line-height: 1.35; }
p { margin: 0; }
a { color: var(--accent-strong); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.num, .tab { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.nowrap { white-space: nowrap; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* Top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--rule); }
.topbar-in { display: flex; align-items: center; gap: 20px; min-height: 60px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.brand-mark { font-family: var(--font-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; }
.brand-mark b { color: var(--accent); font-weight: 700; }
.brand-for { font-size: 13px; color: var(--ink-2); }
.nav { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; min-width: 0; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: 14px; padding: 6px 10px; border-radius: var(--radius-s); white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--sunken); }
.nav a.is-here { color: var(--ink); background: var(--sunken); }
.userbox { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); flex: 0 0 auto; }
.userbox a, .userbox button { font-size: 13px; }
@media (max-width: 1360px) { .userbox .user-email { display: none; } }
@media (max-width: 860px) { .brand-for { display: none; } }
.nav { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); padding-right: 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--font-body); padding: 13px 18px; border-radius: var(--radius-s);
  border: 1px solid var(--accent); background: var(--accent); color: var(--on-accent); cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: var(--sunken); color: var(--ink); border-color: var(--ink-3); }
.btn-small { padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent-strong); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Hero */
.hero { padding-block: 44px 36px; display: grid; gap: 22px; }
.hero-to { color: var(--ink-2); font-size: 15px; }
.hero h1 { max-width: 15em; }
.hero .lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); max-width: 44rem; }
.track { margin: 6px 0 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px 8px; overflow-x: auto; }
.track svg { display: block; width: 100%; min-width: 640px; height: auto; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.facts > div { padding: 14px 16px 14px 0; display: grid; gap: 2px; }
.facts > div + div { padding-left: 16px; border-left: 1px solid var(--rule-soft); }
.facts dt { font-size: 13px; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.facts dd small { display: block; font-size: 13px; font-weight: 400; color: var(--ink-2); }
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts > div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
}
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } .facts > div { padding-left: 0 !important; border-left: 0 !important; } .facts > div + div { border-top: 1px solid var(--rule-soft); } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Sections */
.block { padding-block: 56px; border-top: 1px solid var(--rule); }
.block-head { display: grid; gap: 10px; margin-bottom: 26px; max-width: var(--read); align-content: start; }
.block-head p { color: var(--ink-2); }
.prose { max-width: var(--read); display: grid; gap: 14px; align-content: start; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.note { font-size: 14px; color: var(--ink-2); max-width: var(--read); margin-top: 14px; }

/* Architecture */
.figure { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 12px; overflow-x: auto; }
.arch { display: block; width: 100%; min-width: 640px; height: auto; }
.arch text { font-family: var(--font-body); text-anchor: middle; }
.arch .a-name { font-size: 13px; font-weight: 600; fill: var(--ink); }
.arch .a-title { font-size: 14px; font-weight: 600; fill: var(--ink); font-family: var(--font-body); }
.arch .a-small { font-size: 12px; }
.arch .a-line { font-size: 11.5px; fill: var(--ink-2); }
.arch .a-tiny { font-size: 11px; }
.arch .a-comp { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.25; }
.arch .a-core { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.arch .a-chip { fill: var(--surface); stroke: var(--rule); stroke-width: 1; }
.arch .a-ext { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.25; }
.arch .a-user { fill: var(--sunken); stroke: var(--ink-3); stroke-width: 1.25; }
.arch .a-opt { fill: var(--surface); stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 4 3; }
.arch .a-conn line { stroke: var(--ink-3); stroke-width: 1.25; fill: none; }
.arch .a-head { fill: var(--ink-3); }
.arch .a-legend text { text-anchor: start; font-size: 11.5px; fill: var(--ink-2); }
.arch .a-optline { stroke: var(--ink-3); stroke-width: 1.25; stroke-dasharray: 4 3; }

/* Constructor */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
@media (max-width: 980px) { .builder { grid-template-columns: 1fr; } }
.registry { display: grid; gap: 30px; min-width: 0; }
.group-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.group-head p { grid-column: 1 / -1; color: var(--ink-2); font-size: 14px; max-width: 44rem; }
.group-sum { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; display: flex; gap: 14px; }
.mods { list-style: none; margin: 0; padding: 0; }
.mod { border-bottom: 1px solid var(--rule); }
.mod-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; padding: 14px 0; align-items: start; }
.mod-check { position: relative; width: 22px; height: 22px; margin-top: 2px; cursor: pointer; }
.mod-check input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.mod-check .box { position: absolute; inset: 0; border: 1.5px solid var(--ink-3); border-radius: 5px; background: var(--surface); display: grid; place-items: center; }
.mod-check input:focus-visible + .box { outline: 2px solid var(--focus); outline-offset: 2px; }
.mod-check input:checked + .box { background: var(--accent); border-color: var(--accent); }
.mod-check input:checked + .box::after { content: ""; width: 10px; height: 6px; border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent); transform: translateY(-1px) rotate(-45deg); }
.mod.is-locked .mod-check { cursor: default; }
.mod.is-locked .mod-check input { cursor: default; }
.mod.is-locked .mod-check .box { background: var(--sunken); border-color: var(--rule); }
.mod.is-locked .mod-check .box::after { content: ""; width: 9px; height: 7px; border: 1.5px solid var(--ink-3); border-radius: 1.5px; transform: translateY(2px); box-shadow: 0 -5px 0 -2.5px var(--sunken), 0 -5px 0 -1px var(--ink-3); }
.mod-main { min-width: 0; display: grid; gap: 3px; }
.mod-main h4 { font-family: var(--font-body); font-weight: 600; font-size: 16.5px; }
.mod-main .purpose { color: var(--ink-2); font-size: 15px; }
.mod-tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--ink-2); background: var(--sunken); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: 2px; font-family: var(--font-body); }
.mod-num { text-align: right; font-variant-numeric: tabular-nums; display: grid; gap: 2px; min-width: 112px; }
.mod-num .p { font-weight: 600; font-size: 16px; white-space: nowrap; }
.mod-num .h { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.mod.is-off .mod-main h4, .mod.is-off .mod-num .p { color: var(--ink-3); }
.mod.is-off .mod-num .p { text-decoration: line-through; text-decoration-color: var(--rule); }
.mod-more { grid-column: 2; justify-self: start; margin-top: 2px; font-size: 14px; }
.mod-details { grid-column: 2 / -1; padding: 4px 0 16px; display: grid; gap: 14px; }
.mod-details h5 { font: 600 13px/1.3 var(--font-body); color: var(--ink-2); margin: 0 0 4px; }
.mod-details ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 15px; }
.mod-details .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 640px) { .mod-details .cols { grid-template-columns: 1fr; } .mod-row { grid-template-columns: 30px minmax(0, 1fr); } .mod-num { grid-column: 2; text-align: left; display: flex; gap: 12px; align-items: baseline; } .mod-details { grid-column: 1 / -1; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 13px; padding: 3px 8px; border-radius: 4px; background: var(--sunken); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mod-note { font-size: 14px; color: var(--ink-2); border-left: 2px solid var(--rule); padding-left: 10px; }
.flash { animation: flash 1.2s ease-out 1; }
@keyframes flash { from { background: var(--accent-soft); } to { background: transparent; } }

/* Ledger */
.ledger { position: sticky; top: 76px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; }
@media (max-width: 980px) { .ledger { position: static; } }
.ledger h3 { font-size: 22px; }
.ledger-sub { font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.lines { margin: 0; display: grid; gap: 7px; }
.lines > div { display: flex; align-items: baseline; gap: 8px; }
.lines dt { color: var(--ink-2); font-size: 14.5px; flex: 0 1 auto; }
.lines dt::after { content: ""; }
.lines .lead-dots { flex: 1 1 auto; border-bottom: 1px dotted var(--ink-3); transform: translateY(-4px); min-width: 12px; }
.lines dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 15px; }
.lines .sum { padding-top: 8px; border-top: 1px solid var(--rule); }
.lines .sum dt, .lines .sum dd { color: var(--ink); font-weight: 600; }
.lines .total { padding: 10px 0 2px; border-top: 2px solid var(--ink); }
.lines .total dt { color: var(--ink); font-weight: 600; font-size: 15px; }
.lines .total dd { font-family: var(--font-display); font-weight: 700; font-size: 27px; letter-spacing: -0.01em; }
.lines.minor dt, .lines.minor dd { font-size: 13.5px; }
.rolebar { display: grid; gap: 6px; }
.rolebar .bar { display: flex; height: 10px; border-radius: 3px; overflow: hidden; background: var(--sunken); }
.rolebar .bar span { display: block; height: 100%; }
.rolebar .keys { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rolebar .keys i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.r-design { background: var(--st-tz); } .r-frontend { background: var(--st-test); } .r-onec { background: var(--st-dev); } .r-admin { background: var(--ink-3); }
.ledger-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ledger-hint { font-size: 13px; color: var(--ink-2); }
.dockbar { display: none; }
@media (max-width: 980px) {
  .dockbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; align-items: center; gap: 12px;
    background: var(--surface); border-top: 1px solid var(--rule); box-shadow: var(--shadow);
    padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  }
  .dockbar[hidden] { display: none !important; }
  .dockbar .d-sum { flex: 1 1 auto; min-width: 0; display: grid; }
  .dockbar .d-sum small { font-size: 12px; color: var(--ink-2); }
  .dockbar .d-sum b { font-family: var(--font-display); font-size: 20px; font-variant-numeric: tabular-nums; }
  body.has-dock { padding-bottom: 76px; }
}

/* Process steps: a real sequence */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; counter-reset: step; border-top: 2px solid var(--ink); }
.steps li { counter-increment: step; padding: 14px 14px 4px 0; display: grid; gap: 6px; align-content: start; }
.steps li + li { padding-left: 14px; border-left: 1px solid var(--rule-soft); }
.steps li::before { content: counter(step); font-family: var(--font-display); font-weight: 700; font-size: 26px; color: var(--accent); line-height: 1; }
.steps h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; }
.steps p { font-size: 14px; color: var(--ink-2); }
.steps .who { font-size: 12.5px; color: var(--ink-3); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .steps li:nth-child(4) { padding-left: 0; border-left: 0; } .steps li:nth-child(n+4) { border-top: 1px solid var(--rule-soft); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .steps li { padding-left: 0 !important; border-left: 0 !important; } .steps li + li { border-top: 1px solid var(--rule-soft); } }

/* Gantt */
.gantt-box { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; }
.gantt { display: block; width: 100%; min-width: 760px; height: auto; font-family: var(--font-body); }
.gantt .g-label { font-size: 12.5px; fill: var(--ink); }
.gantt .g-label.is-off { fill: var(--ink-3); }
.gantt .g-month { font-size: 12px; fill: var(--ink-2); }
.gantt .g-grid { stroke: var(--rule-soft); stroke-width: 1; }
.gantt .g-axis { stroke: var(--rule); stroke-width: 1; }
.gantt .g-hol { fill: var(--hol); }
.gantt .g-band { fill: var(--bg); opacity: 0.6; }
.gantt .s-tz { fill: var(--st-tz); } .gantt .s-dev { fill: var(--st-dev); } .gantt .s-test { fill: var(--st-test); }
.gantt .s-impl { fill: var(--st-impl); } .gantt .s-wait { fill: none; stroke: var(--st-wait); stroke-width: 1.2; stroke-dasharray: 3 2; }
.gantt .s-cb { fill: var(--st-cb); }
.gantt .is-off rect { opacity: 0.28; }
.gantt .g-ms { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5; }
.gantt .g-mstext { font-size: 12px; fill: var(--ink); font-weight: 600; }
.gantt .g-golive { stroke: var(--accent); stroke-width: 1.25; stroke-dasharray: 4 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.legend i { display: inline-block; width: 14px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: 0; }
.legend .l-wait { border: 1.2px dashed var(--st-wait); background: transparent; }
.legend .l-hol { background: var(--hol); border: 1px solid var(--rule); }

/* Timeline strip in the hero */
.track .t-base { stroke: var(--rule); stroke-width: 6; stroke-linecap: round; }
.track .t-done { stroke: var(--accent); stroke-width: 6; stroke-linecap: round; }
.track .t-hol { fill: var(--hol); }
.track .t-tick { stroke: var(--rule); stroke-width: 1; }
.track .t-month { font-size: 12px; fill: var(--ink-3); font-family: var(--font-body); }
.track .t-dot { fill: var(--surface); stroke: var(--ink); stroke-width: 2; }
.track .t-dot.is-key { fill: var(--accent); stroke: var(--accent); }
.track .t-date { font-size: 15px; font-weight: 600; fill: var(--ink); font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.track .t-what { font-size: 13px; fill: var(--ink-2); font-family: var(--font-body); }
.track .t-span { font-size: 12px; fill: var(--ink-3); font-family: var(--font-body); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th, table.t td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
table.t thead th { font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--sunken); border-bottom: 1px solid var(--rule); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.r, table.t th.r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.hl td { background: var(--accent-soft); }
table.t tr.dim td { color: var(--ink-3); }
table.t .tname { font-weight: 600; }
table.t tfoot td { font-weight: 600; border-top: 1px solid var(--rule); background: var(--sunken); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--accent-soft); color: var(--accent-strong); white-space: nowrap; }
.badge.neutral { background: var(--sunken); color: var(--ink-2); }

/* Lists of works / prerequisites */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.checklist li::before { content: ""; width: 8px; height: 8px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
.worklist { list-style: none; padding: 0; margin: 0; counter-reset: w; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.worklist li { counter-increment: w; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.worklist li::before { content: "Ю" counter(w); font-weight: 600; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.worklist .when { font-size: 14px; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .worklist li { grid-template-columns: 44px minmax(0, 1fr); } .worklist .when { grid-column: 2; } }
.worklist.plain li { grid-template-columns: minmax(0, 1fr) auto; }
.worklist.plain li::before { content: none; }
@media (max-width: 640px) { .worklist.plain li { grid-template-columns: minmax(0, 1fr); } .worklist.plain .when { grid-column: 1; } }
.h-gift { margin: 0 0 12px; }
.pricebox { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; padding: 16px 0 0; }
.pricebox .big { font-family: var(--font-display); font-weight: 700; font-size: 30px; font-variant-numeric: tabular-nums; }

/* Footer */
.foot { border-top: 1px solid var(--rule); padding-block: 32px 48px; font-size: 14px; color: var(--ink-2); }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.foot strong { color: var(--ink); }
.sources { font-size: 14px; columns: 2 22rem; column-gap: 32px; padding-left: 18px; margin: 0; }
.sources li { break-inside: avoid; margin-bottom: 6px; }

/* Theme toggle and misc */
.icon-btn { background: none; border: 1px solid var(--rule); border-radius: var(--radius-s); color: var(--ink-2); width: 34px; height: 34px; display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--ink); background: var(--sunken); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: var(--radius-s); font-size: 14px; z-index: 50; box-shadow: var(--shadow); }

.legend .l-tz { background: var(--st-tz); } .legend .l-dev { background: var(--st-dev); } .legend .l-test { background: var(--st-test); }
.legend .l-impl { background: var(--st-impl); } .legend .l-cb { background: var(--st-cb); }
.mt { margin-top: 32px; }
.h-sla { margin: 36px 0 12px; }

/* Phone notice (gate.js) */
html.m-gated, html.m-gated body { overflow: hidden; }
.m-gate { position: fixed; inset: 0; z-index: 70; overflow-y: auto; background: var(--bg); display: grid; place-items: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.m-gate:focus { outline: none; }
.m-gate-card { width: min(440px, 100%); display: grid; gap: 16px; }
.m-gate-card h1 { font-size: 28px; line-height: 1.15; }
.m-gate-card p { color: var(--ink-2); }
.m-gate .brand-for { display: inline; }
.m-gate-link { display: grid; gap: 10px; }
.m-gate-link input { font: 15px/1.3 var(--font-body); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-s); padding: 11px 12px; width: 100%; min-width: 0; }
.m-gate-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.m-gate-card .m-gate-done { font-size: 14px; color: var(--accent-strong); }
.m-gate-anyway { justify-self: start; font-size: 14px; color: var(--ink-2); }
