/* Edith Ngalame · portfolio. Tokens first; components only read tokens. */
:root {
  --ground: #eef1ee;
  --paper: #f8faf8;
  --ink: #13171a;
  --ink-2: #3a4247;
  --muted: #5d676d;
  --line: #d3d9d6;
  --accent: #1f4fd1;
  --accent-ink: #ffffff;
  --accent-soft: #dfe6fb;
  --mark: #f6c64a;
  --mark-soft: rgba(246, 198, 74, 0.45);
  --block: #c0392b;
  --block-soft: #f8e1dd;
  --allow: #1e7a4c;
  --allow-soft: #dcefe4;
  --flag: #a8690f;
  --flag-soft: #f6ead3;
  --bar-base: #a7b0b4;
  --shadow: 0 1px 2px rgba(19, 23, 26, 0.06), 0 8px 24px rgba(19, 23, 26, 0.06);
  --display: "Bricolage Grotesque", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --measure: 66ch;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --ground: #0f1316;
    --paper: #161c20;
    --ink: #e6eae7;
    --ink-2: #c3cbc7;
    --muted: #98a2a7;
    --line: #2a3338;
    --accent: #86a2ff;
    --accent-ink: #0f1316;
    --accent-soft: #1d2744;
    --mark: #e2b23e;
    --mark-soft: rgba(226, 178, 62, 0.32);
    --block: #ff7a6b;
    --block-soft: #3a1f1c;
    --allow: #5fcf97;
    --allow-soft: #173226;
    --flag: #eab45a;
    --flag-soft: #3a2e17;
    --bar-base: #4b565c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ground: #0f1316;
  --paper: #161c20;
  --ink: #e6eae7;
  --ink-2: #c3cbc7;
  --muted: #98a2a7;
  --line: #2a3338;
  --accent: #86a2ff;
  --accent-ink: #0f1316;
  --accent-soft: #1d2744;
  --mark: #e2b23e;
  --mark-soft: rgba(226, 178, 62, 0.32);
  --block: #ff7a6b;
  --block-soft: #3a1f1c;
  --allow: #5fcf97;
  --allow-soft: #173226;
  --flag: #eab45a;
  --flag-soft: #3a2e17;
  --bar-base: #4b565c;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; height: auto; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { font: 700 1.05rem/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 26px; height: 26px; border-radius: 6px; background: var(--ink); display: grid; place-items: center; }
.brand-mark span { width: 12px; height: 6px; background: var(--mark); border-radius: 1px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; font: 500 0.9rem/1 var(--body); }
.nav a { color: var(--ink-2); text-decoration: none; padding-block: 6px; }
.nav a:hover { color: var(--accent); }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); line-height: 1.02; letter-spacing: -0.028em; font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 650; }
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 650; }
p { margin: 0; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink-2); }
.eyebrow { font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 28px; }

/* ---------- buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 0.95rem/1 var(--body); text-decoration: none;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--ink); background: var(--paper);
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--ink-2); transform: translateY(-1px); text-decoration: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn .arrow { font-family: var(--mono); }

/* ---------- inspector (the signature piece) ---------- */
.inspector { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.insp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.insp-bar .eyebrow { color: var(--ink-2); }
.insp-tabs { display: flex; gap: 6px; padding: 14px 18px 0; overflow-x: auto; scrollbar-width: thin; }
.insp-tab {
  flex: 0 0 auto; font: 500 0.82rem/1 var(--mono); color: var(--ink-2); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px;
}
.insp-tab[aria-selected="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.insp-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 0; }
.insp-msg { padding: 22px 18px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.insp-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 0.75rem/1 var(--mono); padding: 6px 8px; border-radius: 6px; background: var(--ground); color: var(--ink-2); border: 1px solid var(--line); }
.insp-text { font: 400 1.15rem/1.6 var(--body); color: var(--ink); max-width: 46ch; min-height: 5.5em; }
.insp-text mark {
  color: inherit; padding: 0 2px; border-radius: 2px;
  background: linear-gradient(var(--mark-soft), var(--mark-soft)) no-repeat left center / 0% 100%;
  transition: background-size 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.15s;
}
.insp-text.lit mark { background-size: 100% 100%; }
.insp-note { font-size: 0.92rem; color: var(--muted); max-width: 46ch; }
.insp-verdicts { padding: 22px 18px 24px; display: flex; flex-direction: column; gap: 12px; }
.verdict { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--ground); }
.verdict .who { font: 500 0.78rem/1.3 var(--mono); color: var(--muted); letter-spacing: 0.02em; }
.verdict .score { font: 500 0.82rem/1 var(--mono); color: var(--ink-2); grid-row: span 2; align-self: center; }
.stamp {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  font: 700 0.95rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 6px; border: 2px solid currentColor;
}
.stamp.block { color: var(--block); background: var(--block-soft); }
.stamp.allow { color: var(--allow); background: var(--allow-soft); }
.stamp.flag { color: var(--flag); background: var(--flag-soft); }
.insp-verdicts.fresh .stamp { animation: stamp 0.35s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.insp-verdicts.fresh .verdict:nth-child(2) .stamp { animation-delay: 0.25s; }
@keyframes stamp { from { transform: scale(1.35) rotate(-4deg); opacity: 0.2; } to { transform: none; opacity: 1; } }
.outcome-line { font-size: 0.92rem; line-height: 1.45; padding-top: 4px; display: flex; gap: 8px; align-items: flex-start; }
.outcome-line b { font-weight: 600; }
.dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; }
.dot.good { background: var(--allow); }
.dot.bad { background: var(--block); }
.insp-foot { padding: 10px 18px; border-top: 1px solid var(--line); font: 400 0.8rem/1.4 var(--mono); color: var(--muted); }
@media (max-width: 760px) {
  .insp-body { grid-template-columns: 1fr; }
  .insp-msg { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- home ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) 32px; display: grid; gap: 22px; }
.hero h1 { max-width: 16ch; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, var(--mark-soft) 62%); padding-inline: 2px; }
.section { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.project { display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); text-decoration: none; }
a.project { transition: transform 0.15s ease, border-color 0.15s ease; }
a.project:hover { transform: translateY(-2px); border-color: var(--accent); text-decoration: none; }
.project .status { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
.project .status.live { color: var(--allow); }
.project .status.next { color: var(--muted); }
.project p { font-size: 0.97rem; color: var(--ink-2); }
.project .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.project.upcoming { background: transparent; border-style: dashed; }
.project .figure { font: 700 2.2rem/1 var(--display); letter-spacing: -0.02em; }
.project .figure small { font: 400 0.85rem/1.3 var(--body); color: var(--muted); display: block; margin-top: 6px; letter-spacing: 0; }
@media (max-width: 900px) { .projects { grid-template-columns: 1fr; } }
.about { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.skills { display: grid; gap: 18px; }
.skill-group h3 { font: 500 0.78rem/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.skill-group p { font-size: 0.98rem; }
@media (max-width: 800px) { .about { grid-template-columns: 1fr; } }
.site-foot { border-top: 1px solid var(--line); padding-block: 28px 40px; font-size: 0.9rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- case study ---------- */
.cs-head { padding-block: clamp(32px, 5vw, 64px) 28px; display: grid; gap: 18px; }
.crumb { font: 500 0.85rem/1 var(--mono); color: var(--muted); text-decoration: none; }
.crumb:hover { color: var(--accent); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 6px; }
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact .eyebrow { font-size: 0.7rem; }
.fact span:last-child { font-size: 0.95rem; }
.tldr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 20px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.stat .big { font: 700 clamp(2.2rem, 4vw, 3rem)/1 var(--display); letter-spacing: -0.03em; }
.stat .big .from { color: var(--muted); font-weight: 500; font-size: 0.55em; letter-spacing: 0; }
.stat p { font-size: 0.93rem; color: var(--ink-2); }
@media (max-width: 800px) { .tldr { grid-template-columns: 1fr; } }

.cs-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 48px; align-items: start; padding-block: 24px 64px; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: flex; flex-direction: column; gap: 2px; font: 500 0.9rem/1.2 var(--body); }
.toc a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--accent); }
@media (max-width: 900px) {
  .cs-layout { grid-template-columns: 1fr; gap: 12px; }
  .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem; }
  .toc a.on { border-color: var(--accent); }
}
.chapter { padding-block: 8px 56px; display: flex; flex-direction: column; gap: 18px; scroll-margin-top: 80px; }
.chapter + .chapter { border-top: 1px solid var(--line); padding-top: 48px; }
.chapter > .eyebrow { color: var(--accent); }
.chapter ul { margin: 0; padding-left: 1.2em; max-width: var(--measure); display: flex; flex-direction: column; gap: 8px; }
.pull { font: 600 clamp(1.25rem, 2.2vw, 1.55rem)/1.35 var(--display); letter-spacing: -0.01em; max-width: 34ch; }
.callout { border: 1px solid var(--line); border-left: 4px solid var(--mark); background: var(--paper); border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 18px; max-width: var(--measure); }
.callout p + p { margin-top: 8px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .two { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.card p { font-size: 0.97rem; color: var(--ink-2); }

/* timeline: a real sequence of releases */
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding-bottom: 22px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 88px; top: 26px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .ver { font: 600 0.82rem/1 var(--mono); color: var(--ink); padding-top: 6px; }
.timeline .step { padding-left: 18px; position: relative; display: flex; flex-direction: column; gap: 4px; }
.timeline .step::before { content: ""; position: absolute; left: -4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.timeline .step.fix::before { border-color: var(--mark); background: var(--mark); }
.timeline .step p { font-size: 0.97rem; color: var(--ink-2); }

/* decisions */
.decisions { display: grid; gap: 14px; }
.decision { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px 28px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.decision .alt { font-size: 0.9rem; color: var(--muted); margin-top: 6px; }
.decision p { font-size: 0.97rem; }
@media (max-width: 700px) { .decision { grid-template-columns: 1fr; } }

/* comparison chart */
.chart { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.metric-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.metric-picker button { font: 500 0.82rem/1 var(--body); cursor: pointer; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--ground); color: var(--ink-2); }
.metric-picker button[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chart-caption { font-size: 0.92rem; color: var(--ink-2); min-height: 2.8em; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 56px; align-items: center; gap: 12px; }
.bar-row .name { font-size: 0.9rem; color: var(--ink-2); }
.bar-row.me .name { color: var(--ink); font-weight: 600; }
.bar-track { height: 22px; border-radius: 4px; background: var(--ground); overflow: hidden; }
.bar-fill { height: 100%; width: 0; background: var(--bar-base); border-radius: 0 4px 4px 0; transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bar-row.me .bar-fill { background: var(--accent); }
.bar-row .val { font: 500 0.9rem/1 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .bar-row { grid-template-columns: 1fr 52px; } .bar-row .name { grid-column: 1 / -1; } }
.chart-foot { font-size: 0.8rem; color: var(--muted); }

.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.link-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); text-decoration: none; color: var(--ink); }
.link-card:hover { border-color: var(--accent); text-decoration: none; }
.link-card .mono { font-size: 0.78rem; color: var(--muted); }
.demo-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); }

/* grid children may shrink below their content width (prevents sideways scroll on phones) */
.cs-layout > * { min-width: 0; }
.insp-foot { max-width: none; }
@media (max-width: 900px) { .cs-layout { grid-template-columns: minmax(0, 1fr); } }

/* contact */
.contact { border-top: 1px solid var(--line); }
.email-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.email { font-size: clamp(1.05rem, 2.4vw, 1.4rem); color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--mark); overflow-wrap: anywhere; user-select: all; }
.email:hover { color: var(--accent); }
.btn.copy { cursor: pointer; font-size: 0.85rem; padding: 8px 14px; }

/* demo recording */
.demo-video { margin: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow); }
.demo-video video { display: block; width: 100%; height: auto; max-width: 100%; }
.demo-video figcaption { padding: 12px 16px; font-size: 0.88rem; color: var(--muted); border-top: 1px solid var(--line); }

/* ---------- firewall demo ---------- */
.fw { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; }
.fw-send { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.fw-send .eyebrow { margin-right: 4px; }
.fw-send button, .fw-tamper {
  font: 500 0.85rem/1 var(--body); cursor: pointer; padding: 9px 13px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--ground); color: var(--ink);
}
.fw-send button:hover:not(:disabled), .fw-tamper:hover:not(:disabled) { border-color: var(--ink-2); }
.fw-send button:disabled, .fw-tamper:disabled { opacity: 0.5; cursor: default; }
.fw-send button[data-bad] { border-color: color-mix(in srgb, var(--block) 45%, var(--line)); }
.fw-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.fw-pipe { padding: 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.fw-packet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 30px; font-size: 0.9rem; }
.fw-ip { color: var(--ink); font-size: 0.85rem; }
.fw-payload { color: var(--muted); font-size: 0.8rem; flex-basis: 100%; overflow-wrap: anywhere; }
.fw-stages { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fw-stages li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--ground); transition: background-color 0.2s, border-color 0.2s, opacity 0.2s; }
.fw-sname { font-size: 0.92rem; font-weight: 500; }
.fw-sname small { display: block; font: 400 0.74rem/1.3 var(--mono); color: var(--muted); }
.fw-res { font: 500 0.78rem/1.3 var(--mono); color: var(--ink-2); text-align: right; max-width: 22ch; }
.fw-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bar-base); }
.fw-stages li.pass .fw-dot { background: var(--bar-base); }
.fw-stages li.active { border-color: var(--accent); }
.fw-stages li.active .fw-dot { border-color: var(--accent); }
.fw-stages li.hit { border-color: var(--block); background: var(--block-soft); }
.fw-stages li.hit .fw-dot { border-color: var(--block); background: var(--block); }
.fw-stages li.hit .fw-res { color: var(--block); }
.fw-stages li.allow { border-color: var(--allow); background: var(--allow-soft); }
.fw-stages li.allow .fw-dot { border-color: var(--allow); background: var(--allow); }
.fw-stages li.allow .fw-res { color: var(--allow); }
.fw-stages li.skip { opacity: 0.45; }
.fw-verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 36px; font-size: 0.92rem; color: var(--ink-2); }
.fw-verdict .stamp { animation: stamp 0.35s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.fw-ipt { margin: 0; font: 500 0.8rem/1.4 var(--mono); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: var(--ground); overflow-wrap: anywhere; }
.fw-ledger { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.fw-lhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fw-pending { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.fw-slot { height: 32px; border: 1px dashed var(--line); border-radius: 6px; font: 500 0.66rem/32px var(--mono); text-align: center; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 3px; }
.fw-slot.full { border-style: solid; border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.fw-chain { display: flex; gap: 18px; overflow-x: auto; padding: 4px 2px 10px; scroll-behavior: smooth; scrollbar-width: thin; }
.fw-block { flex: 0 0 128px; position: relative; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); display: flex; flex-direction: column; gap: 6px; }
.fw-block + .fw-block::before { content: ""; position: absolute; left: -19px; top: 50%; width: 18px; height: 2px; background: var(--allow); }
.fw-block.bad { border-color: var(--block); background: var(--block-soft); }
.fw-block.bad + .fw-block::before, .fw-block + .fw-block.bad::before { background: var(--block); }
.fw-block.fresh { animation: fwin 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes fwin { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.fw-bhead { display: flex; flex-direction: column; gap: 2px; font-size: 0.88rem; }
.fw-bstate { font: 500 0.7rem/1.2 var(--mono); color: var(--allow); }
.fw-block.bad .fw-bstate { color: var(--block); }
.fw-block dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; font-size: 0.72rem; }
.fw-block dd + dt { margin-top: 3px; }
.fw-block dt { color: var(--muted); }
.fw-block dd { margin: 0; color: var(--ink); }
.fw-btx { font-size: 0.78rem; color: var(--muted); }
.fw-block.edited .fw-btx { color: var(--block); font-weight: 500; }
.fw-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fw-tamper { border-color: var(--ink); }
.fw-msg { font-size: 0.9rem; line-height: 1.5; min-height: 4.5em; color: var(--ink-2); padding-left: 12px; border-left: 3px solid var(--line); max-width: none; }
.fw-msg.ok { border-left-color: var(--allow); }
.fw-msg.bad { border-left-color: var(--block); }
.fw-msg.warn { border-left-color: var(--mark); }
@media (max-width: 820px) {
  .fw-grid { grid-template-columns: minmax(0, 1fr); }
  .fw-pipe { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* test results table */
.tests { display: grid; gap: 8px; }
.test { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 4px 14px; align-items: start; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.test .n { font: 600 0.82rem/1.6 var(--mono); color: var(--muted); }
.test h3 { font-size: 1.02rem; }
.test p { font-size: 0.93rem; color: var(--ink-2); grid-column: 2 / -1; }
.pill { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; white-space: nowrap; }
.pill.ok { color: var(--allow); background: var(--allow-soft); }
.pill.part { color: var(--flag); background: var(--flag-soft); }
.project .status.done { color: var(--accent); }
