/* farid.console — paper console, light + dark */
:root {
  --bg: #E8ECF1;
  --panel: #F7F9FB;
  --panel-2: #FFFFFF;
  --ink: #0E1726;
  --dim: #5B6B7F;
  --line: #C9D2DC;
  --alert: #BF331C;
  --ok: #12714E;
  --ok-bright: #3FBF8F;
  --link: #1F5FBF;
  --shadow: rgba(14,23,38,.35);
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --cond: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --r: 4px;
  --gutter: 24px;
  --max: 1200px;
}
:root[data-theme="dark"] {
  --bg: #0F1622;
  --panel: #151E2C;
  --panel-2: #1B2536;
  --ink: #E6EBF2;
  --dim: #8A98AB;
  --line: #29364A;
  --alert: #FF6A4D;
  --ok: #3FBF8F;
  --ok-bright: #3FBF8F;
  --link: #8AB4F8;
  --shadow: rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
  padding-bottom: 44px;
  color: var(--ink);
  font: 400 14px/1.6 var(--mono);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--alert); outline-offset: 2px; border-radius: var(--r); }
code, kbd, pre { font-family: var(--mono); }
kbd { font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: var(--r); padding: 0 6px; background: var(--panel); color: var(--ink); }
p { margin: 0 0 .75em; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
button { font: inherit; color: inherit; }

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

/* audience modes: only one of each pair is shown */
:root[data-mode="hire"] .m-build { display: none !important; }
:root[data-mode="build"] .m-hire { display: none !important; }

.eyebrow .hint { font-family: var(--mono); text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 11px; margin-left: 8px; vertical-align: 1px; }
.eyebrow {
  font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 15px; color: var(--dim); margin: 0 0 8px;
}

/* ---- header ---- */
.bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px var(--gutter);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 15px; }
.wordmark span { color: var(--dim); font-weight: 400; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--dim); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 20%, transparent); }

.mode { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--dim); }
.mode-label { margin-right: 2px; }
.mode-btn {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; cursor: pointer;
  color: var(--dim); font-size: 12px;
}
.mode-btn:hover { border-color: var(--ink); color: var(--ink); }
.mode-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.nav { margin-left: auto; display: flex; gap: 16px; align-items: center; font-size: 13px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.nav a small { color: var(--dim); font-size: 11px; }
.kbtn, .ibtn { background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; }
.kbtn kbd { cursor: pointer; }
.kbtn:hover kbd { border-color: var(--ink); }
.ibtn { width: 26px; height: 26px; justify-content: center; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
.ibtn:hover { border-color: var(--ink); }

/* ---- layout ---- */
main { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.hero > *, .product > *, .term, .term-body, .planner > *, .topo > * { min-width: 0; max-width: 100%; }
.section { padding: 72px 0 24px; border-top: 1px solid var(--line); margin-top: 48px; }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head h2 { font-size: 22px; line-height: 1.3; }
.lede { color: var(--dim); margin-top: 10px; }
.lede code { color: var(--ink); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 7fr 5fr; gap: var(--gutter); padding: 40px 0 0; align-items: start; }
.term {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  min-height: 440px; display: flex; flex-direction: column;
  box-shadow: 0 1px 0 color-mix(in srgb, var(--panel-2) 60%, transparent) inset, 0 8px 24px -18px var(--shadow);
}
.term-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--dim); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); }
.dots i:first-child { background: var(--alert); border-color: var(--alert); }
.term-hint { margin-left: auto; font-style: italic; }
.term-body { flex: 1; padding: 16px 16px 4px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; line-height: 1.7; max-height: 60vh; overflow-y: auto; }
.term-body .ln { display: block; }
.term-body .ok::before { content: "✓ "; color: var(--ok); }
.term-body .warn::before { content: "⚠ "; color: var(--alert); }
.term-body .run::before { content: "▶ "; color: var(--ink); }
.term-body .sys { color: var(--dim); }
.term-body .echo { color: var(--dim); }
.term-body .echo::before { content: "farid@prod ~ $ "; color: var(--ink); }
.term-body .err { color: var(--alert); }
.term-body .out a { color: var(--link); }
.term-body .key { color: var(--ink); font-weight: 600; }
.term-body .cursor { display: inline-block; width: 8px; height: 1.1em; background: var(--alert); vertical-align: -0.2em; animation: blink 1s steps(1) infinite; }
.term-body table { border-collapse: collapse; font-size: 12.5px; }
.term-body td { padding: 0 14px 0 0; vertical-align: top; }

.prompt { display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px; }
.ps1 { white-space: nowrap; font-weight: 600; }
.ps1 .tilde { color: var(--dim); font-weight: 400; }
.cmd-wrap { position: relative; flex: 1; }
.cmd-wrap input { width: 100%; border: 0; background: transparent; padding: 0; margin: 0; font: inherit; font-size: 13.5px; color: var(--ink); caret-color: var(--alert); outline: none; position: relative; z-index: 1; }
.cmd-wrap input::placeholder { color: transparent; }
.cmd-wrap input:focus-visible { outline: none; }
.prompt:focus-within .ps1 { color: var(--alert); }
.ghost { position: absolute; left: 0; top: 0; color: var(--dim); opacity: .6; pointer-events: none; white-space: pre; font-size: 13.5px; line-height: inherit; }
.prompt.caret-blink .cmd-wrap::after { content: ""; position: absolute; z-index: 2; left: 0; top: 0.15em; width: 8px; height: 1.1em; background: var(--alert); animation: blink 1s steps(1) infinite; pointer-events: none; }
.prompt.caret-blink:focus-within .cmd-wrap::after { display: none; }
@keyframes blink { 50% { opacity: 0; } }
.term-quick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; padding: 0 16px 12px; font-size: 11.5px; color: var(--dim); }
.term-quick button { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; cursor: pointer; color: var(--ink); }
.term-quick button:hover { border-color: var(--ink); }

.ident { padding-top: 6px; }
.ident h1 { font-size: 28px; line-height: 1.15; margin-bottom: 6px; }
.ident .role { color: var(--dim); margin-bottom: 18px; }
.ident dl { margin: 0; border-top: 1px solid var(--line); }
.ident dl > div { display: grid; grid-template-columns: 84px 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.ident dt { color: var(--dim); }
.ident dd { margin: 0; overflow-wrap: anywhere; }
.ident-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 14px; border: 1px solid var(--ink); border-radius: var(--r);
  background: var(--panel); color: var(--ink); text-decoration: none; font: inherit; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: transform .08s ease, background .15s ease;
}
.btn:hover { background: var(--panel-2); transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: color-mix(in srgb, var(--ink) 85%, var(--bg)); color: var(--bg); }
.btn.ghost-btn { border-color: var(--line); }
.btn.is-copied { border-color: var(--ok); color: var(--ok); }
.linkish { background: none; border: 0; padding: 0; color: var(--link); text-decoration: underline; cursor: pointer; font-size: inherit; }

/* ---- stats ---- */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 28px; }
.stat {
  display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 14px 12px;
  color: var(--ink); text-decoration: none; position: relative;
}
.stat::after { content: "→"; position: absolute; right: 12px; top: 10px; color: var(--dim); }
.stat:hover { border-color: var(--ink); }
.stat b { display: block; font-family: var(--cond); font-weight: 700; font-size: 34px; line-height: 1; letter-spacing: -0.01em; }
.stat span { display: block; font-size: 12.5px; margin-top: 6px; }
.stat small { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }

/* ---- filters + search ---- */
.feed-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 12.5px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--dim); cursor: pointer; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); padding: 4px 10px; }
.search .ps1 { color: var(--alert); font-size: 12px; }
.search input { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); outline: none; width: 180px; }
.search input::placeholder { color: var(--dim); }

/* ---- products ---- */
.products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; outline: none; transition: border-color .15s, box-shadow .15s; }
.product:hover { border-color: var(--ink); }
.product.is-open { border-color: var(--alert); box-shadow: 0 0 0 3px color-mix(in srgb, var(--alert) 25%, transparent); }
.product.is-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.1fr 1fr; grid-template-areas: "head head" "name stat" "blurb built" "role built" "stack built" "links links"; column-gap: 32px; }
.product.is-featured .pd-head { grid-area: head; }
.product.is-featured .pd-name { grid-area: name; font-size: 30px; }
.product.is-featured .pd-stat { grid-area: stat; justify-self: end; text-align: right; }
.product.is-featured .pd-stat b { font-size: 64px; }
.product.is-featured .pd-blurb { grid-area: blurb; font-size: 14px; }
.product.is-featured .pd-role { grid-area: role; }
.product.is-featured .pd-built { grid-area: built; margin: 0; }
.product.is-featured .pd-stack { grid-area: stack; align-self: end; }
.product.is-featured .pd-links { grid-area: links; }
.pd-head { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--dim); }
.pd-glyph { display: inline-flex; width: 22px; height: 22px; color: var(--alert); }
.pd-glyph svg { width: 100%; height: 100%; }
.pd-kind { font-family: var(--cond); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; font-size: 13.5px; color: var(--dim); }
.pd-period { margin-left: auto; white-space: nowrap; }
.pd-name { font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; }
.pd-stat { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pd-stat b { font-family: var(--cond); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: -0.01em; }
.pd-stat span { color: var(--dim); font-size: 12.5px; }
.pd-blurb { margin: 0; font-size: 13.5px; }
.pd-role { margin: 0; font-size: 12.5px; color: var(--dim); }
.pd-role .k { color: var(--alert); font-weight: 600; margin-right: 6px; }
.pd-built { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; }
.pd-built li { position: relative; padding-left: 16px; }
.pd-built li::before { content: "›"; position: absolute; left: 0; color: var(--alert); font-weight: 600; }
.pd-stack { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.pd-stack li { font-size: 11.5px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); background: var(--panel-2); }
.pd-links { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pd-links a { font-size: 12.5px; font-weight: 500; text-decoration: none; padding: 5px 10px; border: 1px solid var(--ink); border-radius: var(--r); color: var(--ink); background: var(--panel-2); }
.pd-links a:hover { background: var(--ink); color: var(--bg); }
.pd-foot { margin: 4px 0 0; font-size: 11.5px; color: var(--dim); display: flex; gap: 6px; align-items: baseline; }
.pd-foot code { color: var(--dim); }
.pd-foot .linkish { font-size: 11.5px; }
mark { background: color-mix(in srgb, var(--alert) 22%, transparent); color: inherit; border-radius: 2px; }
.empty { color: var(--dim); padding: 24px 14px; }

/* ---- runbooks: lead · pipeline · proof ---- */
.runbooks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.runbook { display: grid; grid-template-columns: 280px 1fr 210px; gap: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); align-items: stretch; transition: border-color .15s; }
.runbook:hover { border-color: var(--ink); }
.rb-lead { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.rb-id { display: block; font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: .08em; color: var(--alert); margin-bottom: 4px; }
.rb-lead h3 { font-size: 16px; line-height: 1.3; margin-bottom: 8px; }
.rb-trigger { margin: 0; font-size: 12.5px; color: var(--dim); font-style: italic; }
.rb-trigger::before { content: "trigger · "; font-style: normal; font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--dim); }
.rb-steps { margin: 0; padding: 22px 24px 18px; list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; font-size: 12.5px; position: relative; }
.rb-steps li { position: relative; padding-top: 32px; }
.rb-steps li::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--panel); border: 1.5px solid var(--alert); color: var(--alert); font-family: var(--cond); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.rb-steps li:last-child::before { background: var(--alert); color: #fff; }
.rb-steps li:not(:last-child)::after { content: ""; position: absolute; left: 26px; right: -20px; top: 11px; height: 1.5px; background: var(--line); }
.rb-verify { padding: 18px 20px; border-left: 1px solid var(--line); background: var(--panel-2); border-radius: 0 var(--r) var(--r) 0; display: flex; flex-direction: column; justify-content: center; }
.rb-verify::before { content: "verify"; font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--dim); margin-bottom: 6px; }
.rb-verify a { text-decoration: none; color: inherit; display: block; }
.rb-verify a:hover .rb-go { text-decoration: underline; }
.rb-num { display: block; font-family: var(--cond); font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -0.01em; color: var(--ok); }
.rb-vlabel { display: block; font-size: 12px; color: var(--dim); margin-top: 6px; }
.rb-go { display: inline-block; margin-top: 8px; font-size: 12px; color: var(--link); }

/* ---- topology: wiring diagram ---- */
.topo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.topo-stage { position: relative; }
#systems-map { width: 100%; height: auto; display: block; font-family: var(--mono); }
.group-label { font-size: 10.5px; fill: var(--dim); letter-spacing: .1em; text-transform: uppercase; font-family: var(--cond); font-weight: 700; }
.edge { fill: none; stroke: var(--line); stroke-width: 1.25; opacity: .9; transition: stroke .15s, opacity .15s, stroke-width .15s; }
.edge.is-active { stroke: var(--alert); stroke-width: 2; opacity: 1; }
.edge.is-dim { opacity: .15; }
.node { cursor: pointer; }
.node rect { fill: var(--panel-2); stroke: var(--line); stroke-width: 1.25; transition: fill .15s, stroke .15s; }
.node.node-hub rect { fill: var(--ink); stroke: var(--ink); }
.node text { font-size: 12.5px; fill: var(--ink); pointer-events: none; }
.node-sub { font-size: 10.5px; fill: var(--dim); }
.node-count { font-size: 10.5px; fill: var(--dim); font-family: var(--cond); font-weight: 700; letter-spacing: .04em; }
.node.node-hub text { fill: var(--bg); }
.node.node-hub .node-sub, .node.node-hub .node-count { fill: color-mix(in srgb, var(--bg) 65%, var(--ink)); }
.node .port { fill: var(--line); }
.node:hover rect, .node.is-active rect { stroke: var(--alert); stroke-width: 2; }
.node.is-active rect { fill: var(--alert); stroke: var(--alert); }
.node.is-active text { fill: #fff; }
.node.is-active .port, .node.is-near .port { fill: var(--alert); }
.node.is-near rect { stroke: var(--alert); }
.node.node-ext.is-near rect { fill: color-mix(in srgb, var(--alert) 10%, var(--panel-2)); }
.node.is-dim { opacity: .28; }
.node:focus-visible { outline: none; }
.node:focus-visible rect { stroke: var(--alert); stroke-width: 2.5; }
.topo-caption {
  position: absolute; left: 30.5%; top: 6%; width: 39%; min-height: 0;
  background: color-mix(in srgb, var(--panel) 80%, transparent); backdrop-filter: blur(3px);
  border: 1px solid var(--line); border-left: 3px solid var(--alert); border-radius: var(--r); padding: 14px 16px; font-size: 13px;
  pointer-events: none;
}
.topo-caption a, .topo-caption button { pointer-events: auto; }
.topo-caption h3 { font-size: 16px; margin-bottom: 2px; }
.topo-caption .map-sub { color: var(--dim); font-size: 12px; margin: 0 0 8px; }
.topo-caption .map-hint { color: var(--dim); font-style: italic; margin: 0; }
.map-links { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.map-links a { text-decoration: none; }
.map-links a:hover { text-decoration: underline; }
.map-links .map-list { color: var(--dim); font-size: 12px; }
.topo-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.topo-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--dim); }
.topo-legend i { display: inline-block; width: 12px; height: 12px; margin-right: 8px; vertical-align: -1px; border: 1.5px solid var(--line); background: var(--panel-2); border-radius: 2px; }
.topo-legend .lg-hub { background: var(--ink); border-color: var(--ink); }
.topo-legend .lg-line { width: 18px; height: 0; border: 0; border-top: 1.5px solid var(--line); vertical-align: 3px; }

.topo-mobile { display: none; }
.tm-item { border-top: 1px solid var(--line); }
.tm-item summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 4px; }
.tm-item summary::-webkit-details-marker { display: none; }
.tm-name { font-weight: 600; font-size: 14px; }
.tm-sub { color: var(--dim); font-size: 12px; grid-column: 1; }
.tm-count { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-family: var(--cond); font-weight: 700; font-size: 14px; letter-spacing: .04em; color: var(--alert); }
.tm-item[open] summary .tm-count::after { content: " ▾"; }
.tm-item:not([open]) summary .tm-count::after { content: " ▸"; }
.tm-role { margin: 0 4px 8px; font-size: 12.5px; color: var(--dim); }
.tm-chips { list-style: none; margin: 0 4px 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chips li { font-size: 12px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); color: var(--dim); }
.tm-chips li b { color: var(--ink); font-weight: 600; }
.tm-open { display: inline-block; margin: 0 4px 12px; font-size: 12.5px; text-decoration: none; }

/* ---- planner ---- */
.planner { display: grid; grid-template-columns: 6fr 6fr; gap: 24px; }
.pl-group { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); padding: 12px 14px 14px; margin: 0 0 12px; }
.pl-group legend { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 14px; color: var(--dim); padding: 0 6px; }
.pl-group legend small { font-family: var(--mono); text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 11.5px; }
.opt { display: inline-flex; align-items: center; gap: 8px; margin: 4px 14px 4px 0; cursor: pointer; font-size: 13px; }
.opt input { accent-color: var(--alert); margin: 0; }
.modules { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mod { position: relative; display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 8px 10px 8px 34px; cursor: pointer; background: var(--panel-2); font-size: 12.5px; }
.mod input { position: absolute; left: 10px; top: 11px; margin: 0; accent-color: var(--alert); }
.mod b { display: block; font-weight: 600; }
.mod span { color: var(--dim); font-size: 12px; }
.mod:hover { border-color: var(--ink); }
.mod:has(input:checked) { border-color: var(--ink); background: var(--panel); }
.mod:has(input:focus-visible) { outline: 2px solid var(--alert); outline-offset: 2px; }
.pl-output { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 12px; align-self: start; }
.pl-big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pl-big b { font-family: var(--cond); font-weight: 700; font-size: 56px; line-height: 1; letter-spacing: -0.01em; }
.pl-big span { color: var(--dim); }
.pl-big em { display: block; width: 100%; font-style: normal; color: var(--alert); font-size: 12.5px; }
.weeks { list-style: none; margin: 0; padding: 4px 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.week { border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); padding: 8px 10px; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.week.is-release { border-color: var(--ok); }
.week.is-phase2 { border-style: dashed; }
.week .w-head { font-family: var(--cond); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 12.5px; color: var(--dim); }
.week .w-tag { margin-top: auto; padding-top: 4px; color: var(--ok); font-weight: 600; font-size: 11.5px; }
.pl-note { color: var(--dim); font-size: 12.5px; margin: 0; }
.pl-brief-label { font-size: 12px; color: var(--dim); }
.pl-edit-hint { color: var(--dim); font-style: italic; }
#pl-brief:focus { border-color: var(--ink); outline: none; }
#pl-brief { width: 100%; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel-2); color: var(--ink); font: inherit; font-size: 12.5px; line-height: 1.55; padding: 10px 12px; resize: vertical; }
.pl-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- history: git log ---- */
.gitlog { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 0; overflow-x: auto; }
.gl-row { display: grid; grid-template-columns: 56px 1fr; gap: 0; padding: 0 16px; }
.gl-row:hover { background: var(--panel-2); }
.gl-graph { font-size: 14px; line-height: 1.5; white-space: pre; color: var(--dim); }
.gl-graph b { color: var(--alert); font-weight: 400; }
.gl-graph i { color: var(--ok); font-style: normal; }
.gl-commit { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 13px; padding: 2px 0 8px; min-width: 0; }
.gl-hash { color: var(--alert); font-weight: 600; }
.gl-ref { font-size: 11.5px; padding: 0 6px; border: 1px solid var(--line); border-radius: 999px; color: var(--dim); white-space: nowrap; }
.gl-ref.head { border-color: var(--ok); color: var(--ok); }
.gl-ref.branch { border-color: var(--alert); color: var(--alert); }
.gl-when { color: var(--dim); font-size: 12px; white-space: nowrap; }
.gl-msg { font-weight: 600; flex-basis: 100%; }
.gl-body { color: var(--dim); font-size: 12.5px; flex-basis: 100%; margin: 0; max-width: 760px; }
.gl-row.is-root .gl-commit { padding-bottom: 2px; }

/* ---- env ---- */
.envfile { margin: 0; max-width: 100%; padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; line-height: 1.8; overflow-x: auto; white-space: pre; }
.envfile .c { color: var(--dim); }
.envfile .k { color: var(--alert); font-weight: 600; }

/* ---- contact ---- */
.contact { padding-bottom: 64px; }
.ct-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.note { color: var(--dim); font-size: 12.5px; }
.note code { color: var(--ink); }

.overlap { margin-top: 22px; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13px; }
.ov-row { display: grid; grid-template-columns: 96px auto 1fr; gap: 12px; padding: 4px 0; align-items: baseline; }
.ov-k { color: var(--dim); }
.ov-v { font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-tz { color: var(--dim); font-size: 12px; }
.ov-bar { position: relative; height: 10px; margin: 10px 0 6px; background: repeating-linear-gradient(to right, var(--line) 0 1px, transparent 1px calc(100% / 24)); border-radius: 2px; }
.ov-bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--ov-start, 37.5%); width: var(--ov-width, 37.5%); background: var(--ok); opacity: .55; border-radius: 2px; }
.ov-bar::after { content: ""; position: absolute; top: -3px; bottom: -3px; left: var(--ov-now, 50%); width: 2px; background: var(--alert); }
.ov-note { margin: 0; color: var(--dim); font-size: 12px; }

/* ---- footer: drawing title block ---- */
.titleblock {
  max-width: var(--max); margin: 8px auto 0; padding: 0; width: calc(100% - 2 * var(--gutter));
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 2fr;
  border: 2px solid var(--ink); outline: 1px solid var(--ink); outline-offset: 3px;
  background: var(--panel); font-size: 12px;
}
.tb-cell { padding: 8px 12px; border-right: 1px solid var(--ink); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tb-cell:last-child { border-right: 0; }
.tb-cell span { font-family: var(--cond); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; color: var(--dim); }
.tb-cell b { font-weight: 500; overflow-wrap: anywhere; }
.tb-cell .linkish { font-size: 12px; }

/* ---- tmux status bar ---- */
.tmux {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 12px; padding: 5px 12px;
  background: #0E1726; color: #E8ECF1; font-size: 12px; line-height: 1.6;
}
.tm-session { color: var(--ok-bright); font-weight: 600; }
.tm-panes { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tm-panes a { color: #B4BFCD; text-decoration: none; padding: 0 8px; white-space: nowrap; border-radius: 2px; }
.tm-panes a:hover { color: #FFFFFF; }
.tm-panes a.is-active { background: var(--ok-bright); color: #0E1726; font-weight: 600; }
.tm-panes a.is-active::after { content: "*"; }
.tm-right { margin-left: auto; white-space: nowrap; color: #B4BFCD; }
.tm-right #tm-clock { font-variant-numeric: tabular-nums; color: #FFFFFF; }

/* ---- palette ---- */
.palette-wrap { position: fixed; inset: 0; z-index: 90; background: color-mix(in srgb, var(--ink) 35%, transparent); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; }
.palette { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 30px 60px -30px var(--shadow); overflow: hidden; }
.p-input { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.p-input .ps1 { color: var(--alert); }
.p-input input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.p-list { list-style: none; margin: 0; padding: 6px 0; max-height: 50vh; overflow-y: auto; }
.p-list li { padding: 8px 14px; display: flex; gap: 12px; align-items: baseline; cursor: pointer; }
.p-list li[aria-selected="true"] { background: var(--bg); }
.p-list li[aria-selected="true"]::before { content: "▶"; color: var(--alert); font-size: 10px; }
.p-list .p-cmd { font-weight: 600; min-width: 160px; }
.p-list .p-desc { color: var(--dim); font-size: 12.5px; }
.p-list .p-none { color: var(--dim); cursor: default; }
.p-foot { display: flex; gap: 18px; padding: 8px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: var(--r); font-size: 12.5px; z-index: 95; box-shadow: 0 10px 30px -10px var(--shadow); }

/* ---- responsive ---- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .runbook { grid-template-columns: 240px 1fr; }
  .rb-verify { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); flex-direction: row; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .rb-verify a { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
  .rb-num { font-size: 28px; }
  .topo-caption { position: static; width: auto; margin-top: 12px; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .products { grid-template-columns: 1fr; }
  .product.is-featured { display: flex; }
  .product.is-featured .pd-stat { justify-self: start; text-align: left; }
  .product.is-featured .pd-name { font-size: 24px; }
  .product.is-featured .pd-stat b { font-size: 48px; }
  .planner { grid-template-columns: 1fr; }
  .titleblock { grid-template-columns: 1fr 1fr 1fr; }
  .tb-wide { grid-column: 1 / -1; }
  .tb-cell:nth-child(3n) { border-right: 0; }
  .pl-output { position: static; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .bar { gap: 10px; }
  .status { display: none; }
  .mode { order: 3; width: 100%; }
  .nav { gap: 12px; font-size: 12px; margin-left: 0; width: 100%; flex-wrap: wrap; }
  .term { min-height: 360px; }
  .term-body { font-size: 12.5px; }
  .ident dl > div { grid-template-columns: 1fr; gap: 0; }
  .section { padding-top: 48px; }
  .pd-stat b { font-size: 36px; }
  .pd-period { margin-left: 0; width: 100%; }
  .term-hint { display: none; }
  .ident .role br { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .runbook { grid-template-columns: 1fr; }
  .rb-lead { border-right: 0; border-bottom: 1px solid var(--line); }
  .rb-steps { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .rb-steps li:not(:last-child)::after { display: none; }
  .rb-steps li { padding-top: 0; padding-left: 34px; }
  .modules { grid-template-columns: 1fr; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .pl-big b { font-size: 44px; }
  .topo-stage { display: none; }
  .topo-mobile { display: block; }
  .topo-foot { display: none; }
  .tm-right { display: none; }
  .ov-row { grid-template-columns: 80px 1fr; }
  .ov-tz { grid-column: 2; }
  .gl-row { grid-template-columns: 44px 1fr; padding: 0 10px; }
  .gl-row.on-main::before { left: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* banner line in the boot */
.term-body .banner { color: var(--ink); font-size: 11px; line-height: 1.15; letter-spacing: 0; margin: 0 0 10px; }
@media (max-width: 640px) { .term-body .banner { font-size: 8.5px; } }

/* continuous trunk line on main */
.gl-row { position: relative; }
.gl-row.on-main::before { content: ""; position: absolute; left: 21px; top: 0; bottom: 0; width: 1.5px; background: var(--line); }
.gl-row.is-root::before { bottom: auto; height: 14px; }
.gl-graph b { position: relative; background: var(--panel); padding: 0 1px; }
.gl-row:hover .gl-graph b { background: var(--panel-2); }
