/* yogeshtiwari.com — layout: sticky index on the left, plain reading column on the right.
   Cool neutral ground, one teal-blue signal colour, system fonts only (no third-party requests). */

:root {
  --bg: #f2f4f6;
  --bg-alt: #e8ecf0;
  --ink: #12171c;
  --ink-soft: #4a5560;
  --rule: #cfd6dd;
  --accent: #0a6a85;
  --ok: #1f6b3b;
  --wip: #8a5a00;
  --plan: #56606b;
  --node: #ffffff;
  --c-edge: #7a4fd0;
  --c-compute: #0a6a85;
  --c-data: #b4570a;
  --c-msg: #2e7d32;
  --c-id: #b0306a;
  --c-ops: #566170;
  --c-ci: #3256c2;
  --c-ext: #7d7d7d;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1317;
    --bg-alt: #161d23;
    --ink: #e6ebef;
    --ink-soft: #9aa6b1;
    --rule: #2a343d;
    --accent: #5bc0dc;
    --ok: #7fc995;
    --wip: #e3b75e;
    --plan: #9aa6b1;
    --node: #121920;
    --c-edge: #b79cf2;
    --c-compute: #5bc0dc;
    --c-data: #f0a15c;
    --c-msg: #7fc995;
    --c-id: #e98ab4;
    --c-ops: #9aa6b1;
    --c-ci: #8aa6f5;
    --c-ext: #a0a0a0;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0e1317;
  --bg-alt: #161d23;
  --ink: #e6ebef;
  --ink-soft: #9aa6b1;
  --rule: #2a343d;
  --accent: #5bc0dc;
  --ok: #7fc995;
  --wip: #e3b75e;
  --plan: #9aa6b1;
  --node: #121920;
  --c-edge: #b79cf2;
  --c-compute: #5bc0dc;
  --c-data: #f0a15c;
  --c-msg: #7fc995;
  --c-id: #e98ab4;
  --c-ops: #9aa6b1;
  --c-ci: #8aa6f5;
  --c-ext: #a0a0a0;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code { font: 0.88em var(--mono); background: var(--bg-alt); padding: 1px 5px; border-radius: 2px; overflow-wrap: anywhere; }
b { font-weight: 650; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: var(--bg); padding: 6px 10px; z-index: 10; }

/* ---------- home layout ---------- */
.wrap {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 56px;
}

nav.index {
  position: sticky;
  top: 0;
  align-self: start;
  padding: 48px 0;
  font-family: var(--mono);
  font-size: 13px;
}
nav.index .who { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
nav.index .role { color: var(--ink-soft); margin-bottom: 28px; line-height: 1.5; }
nav.index ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
nav.index li { counter-increment: s; }
nav.index li a {
  display: block;
  padding: 5px 0;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
}
nav.index li a::before { content: counter(s, decimal-leading-zero) "  "; color: var(--accent); }
nav.index li a:hover { color: var(--ink); }

main { padding: 48px 0 80px; min-width: 0; }

header.top h1 {
  font: 700 clamp(2.1rem, 5vw, 3rem)/1.1 var(--sans);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-wrap: balance;
}
header.top .lede { font-size: 1.15rem; line-height: 1.55; color: var(--ink-soft); max-width: 38em; margin: 0 0 20px; }
.facts {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.facts b { color: var(--ink); font-weight: 600; }

section { padding-top: 56px; }
h2 {
  font: 600 13px/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
h3 { font: 650 1.1rem/1.35 var(--sans); margin: 26px 0 8px; text-wrap: balance; }
section > h3:first-of-type { margin-top: 0; }
p { margin: 0 0 14px; max-width: 42em; }
ul { max-width: 42em; padding-left: 1.15em; margin: 0 0 14px; }
li { margin-bottom: 5px; }
.small { font-size: 14px; color: var(--ink-soft); }

/* ---------- badges, tags ---------- */
.badge {
  display: inline-block;
  font: 600 11px/1 var(--mono);
  padding: 4px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge.poc, .badge.mvp { color: var(--wip); }
.badge.live { color: var(--ok); }
.badge.ongoing { color: var(--accent); }
.badge.personal { color: var(--plan); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tags li { margin: 0; font: 12px/1 var(--mono); color: var(--ink-soft); border: 1px solid var(--rule); padding: 4px 7px; border-radius: 2px; }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 16px; margin: 0 0 18px; }
a.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
a.card:hover { border-color: var(--accent); }
a.card h3 { margin: 0; font-size: 1.15rem; color: var(--ink); }
.card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.card-meta { font: 12px/1.4 var(--mono); color: var(--ink-soft); }
.card .tagline { font-size: 15px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.card ul.hl { font-size: 14.5px; line-height: 1.5; margin: 0; padding-left: 1.1em; }
.card .more { margin-top: auto; padding-top: 4px; font: 600 13px var(--mono); color: var(--accent); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 0; border-top: 1px solid var(--rule); border-left: 1px solid var(--rule); margin: 0 0 18px; }
.stat { padding: 12px 14px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.stat b { display: block; font: 700 1.45rem/1.2 var(--sans); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat span { display: block; font: 12px/1.4 var(--mono); color: var(--ink-soft); }

/* ---------- stack list, tables ---------- */
dl.stack { margin: 0; border-top: 1px solid var(--rule); }
dl.stack > div { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); }
dl.stack dt { font: 600 13px/1.6 var(--mono); color: var(--ink-soft); }
dl.stack dd { margin: 0; min-width: 0; }

.tbl { overflow-x: auto; margin: 0 0 18px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule); }
th { font: 600 12px/1 var(--mono); color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }
.st { font: 600 12.5px var(--mono); white-space: nowrap; }
.st.ok { color: var(--ok); }
.st.wip { color: var(--wip); }
.st.plan { color: var(--plan); }

/* ---------- diagrams ---------- */
figure.diagram { margin: 4px 0 22px; padding: 0; overflow-x: auto; border: 1px solid var(--rule); background: var(--bg); }
figure.diagram svg { display: block; width: 100%; min-width: 640px; height: auto; }
figure.diagram figcaption { font: 12px/1.5 var(--mono); color: var(--ink-soft); padding: 8px 12px; border-top: 1px solid var(--rule); }
.node { fill: var(--node); stroke: var(--ink-soft); stroke-width: 1.2; }
.node.key { stroke: var(--accent); stroke-width: 2; }
.group { fill: none; stroke: var(--rule); stroke-width: 1.2; stroke-dasharray: 5 4; }
.gl { font: 12px var(--mono); fill: var(--ink-soft); }
.nt { font: 600 13px var(--sans); fill: var(--ink); text-anchor: middle; }
.ns { font: 11.5px var(--sans); fill: var(--ink-soft); text-anchor: middle; }
.edge { stroke: var(--ink-soft); stroke-width: 1.5; fill: none; }
.arrowhead { fill: var(--ink-soft); }
.el { font: 11px var(--mono); fill: var(--ink-soft); paint-order: stroke; stroke: var(--bg); stroke-width: 4px; stroke-linejoin: round; }

/* layered service diagrams */
figure.diagram.wide svg { min-width: 940px; }
.band { fill: var(--bg-alt); opacity: 0.6; }
.bl { font: 600 10.5px var(--mono); fill: var(--ink-soft); letter-spacing: 0.08em; }
.svc { fill: color-mix(in srgb, var(--cc) 11%, var(--node)); stroke: var(--cc); stroke-width: 1.4; }
.svc.planned { stroke-dasharray: 5 3; fill: var(--node); }
.sn { font: 600 12px var(--sans); fill: var(--ink); text-anchor: middle; }
.ss { font: 10.5px var(--sans); fill: var(--ink-soft); text-anchor: middle; }
.c-edge { --cc: var(--c-edge); }
.c-compute { --cc: var(--c-compute); }
.c-data { --cc: var(--c-data); }
.c-msg { --cc: var(--c-msg); }
.c-id { --cc: var(--c-id); }
.c-ops { --cc: var(--c-ops); }
.c-ci { --cc: var(--c-ci); }
.c-ext { --cc: var(--c-ext); }
.flow { stroke-dasharray: 6 5; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -11; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }
.lg { font: 11px var(--sans); fill: var(--ink-soft); }
.page.wide { max-width: 72rem; }
.roles td:first-child { white-space: nowrap; font-weight: 650; padding-right: 22px; }
.arch-meta { font: 12.5px/1.5 var(--mono); color: var(--ink-soft); margin: 0 0 14px; }

.entry { margin-bottom: 28px; }
.entry h3 { margin: 0 0 4px; }
.entry p.small { margin-bottom: 8px; }
.nf { font: 700 2.2rem/1.2 var(--sans); margin: 8px 0 14px; }

/* ---------- notes ---------- */
.note { border: 1px solid var(--rule); background: var(--bg-alt); padding: 14px 16px; max-width: 42em; font-size: 15px; margin: 0 0 18px; }
.note p:last-child { margin-bottom: 0; }

.contact { background: var(--bg-alt); border: 1px solid var(--rule); padding: 20px 22px; max-width: 42em; }
.contact p:last-child { margin-bottom: 0; }

footer { font: 12.5px/1.6 var(--mono); color: var(--ink-soft); border-top: 1px solid var(--rule); margin-top: 64px; padding-top: 18px; }

/* ---------- case-study pages ---------- */
.page { max-width: 46rem; margin: 0 auto; padding: 0 18px; }
.page main.detail { padding: 28px 0 72px; }
.back { display: inline-block; font: 13px var(--mono); margin-bottom: 28px; }
.dh { display: flex; flex-direction: column; gap: 10px; margin-bottom: 8px; }
.dh .row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.dh .meta { font: 12.5px/1.5 var(--mono); color: var(--ink-soft); }
.dh h1 { font: 700 clamp(1.9rem, 4.6vw, 2.5rem)/1.12 var(--sans); letter-spacing: -0.02em; margin: 6px 0 0; text-wrap: balance; }
.dh .lede { font-size: 1.12rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.dh .tags { margin-top: 4px; }
.page section { padding-top: 40px; }

/* ---------- small screens ---------- */
@media (max-width: 800px) {
  .wrap { display: block; padding: 0 18px; }
  nav.index { position: static; padding: 24px 0 0; }
  nav.index ol { display: flex; flex-wrap: wrap; gap: 4px 16px; }
  nav.index li a { border: 0; padding: 2px 0; }
  main { padding-top: 28px; }
  dl.stack > div { grid-template-columns: 1fr; gap: 2px; }
  body { font-size: 16.5px; }
}

@media print {
  nav.index, .skip, .back { display: none; }
  .wrap { display: block; }
  body { background: #fff; color: #000; }
  a.card { break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- diagram view tabs ---------- */
.views { margin: 4px 0 22px; }
.views .vr { position: absolute; opacity: 0; width: 1px; height: 1px; }
.views label { display: inline-block; font: 600 12px/1 var(--mono); padding: 8px 12px; border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; margin: 0 -1px 8px 0; background: var(--bg); }
.views .vr:checked + label { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.views input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }

.k-edge{--c:var(--c-edge)}.k-compute{--c:var(--c-compute)}.k-data{--c:var(--c-data)}.k-msg{--c:var(--c-msg)}
.k-id{--c:var(--c-id)}.k-ops{--c:var(--c-ops)}.k-ci{--c:var(--c-ci)}.k-ext{--c:var(--c-ext)}

/* ---------- simplified home + collapsible detail sections ---------- */
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.btn { font: 600 13px/1 var(--mono); padding: 11px 16px; background: var(--accent); color: var(--bg); text-decoration: none; border: 1px solid var(--accent); }
.btn.alt { background: transparent; color: var(--accent); }
.btn:hover { filter: brightness(1.1); }
header.top .stats { margin: 4px 0 0; }
.cards.three { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.card.mini { gap: 8px; }
.card.mini h3 { font-size: 1.02rem; margin: 0; }
.card.mini .tagline { font-size: 14px; margin: 0; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { padding: 8px 0; border-bottom: 1px dotted var(--rule); font-size: 15px; }
details.fold { border-top: 1px solid var(--rule); margin-top: 6px; }
details.fold > summary { cursor: pointer; list-style: none; padding: 14px 0; font: 600 13px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); display: flex; justify-content: space-between; gap: 12px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "+"; font-size: 16px; }
details.fold[open] > summary::after { content: "–"; }
section > details.fold:only-child { margin-top: 0; border-top: 0; border-bottom: 1px solid var(--rule); padding-bottom: 6px; }
section:has(> details.fold:only-child) { padding-top: 0; }
details.fold > summary:hover { color: var(--ink); }

/* ---------- motion (progressive enhancement; off under prefers-reduced-motion) ---------- */
@media (prefers-reduced-motion: no-preference) {
  :root { interpolate-size: allow-keywords; }

  /* hero: staggered entrance on load */
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  header.top > *, header.dh > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
  header.top > :nth-child(2), header.dh > :nth-child(2) { animation-delay: .08s; }
  header.top > :nth-child(3), header.dh > :nth-child(3) { animation-delay: .16s; }
  header.top > :nth-child(4), header.dh > :nth-child(4) { animation-delay: .24s; }
  nav.index { animation: rise .6s ease both; animation-delay: .1s; }

  /* hover feedback */
  .card, .tile-link, .btn { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, filter .2s; }
  .card:hover, .tile-link:hover { transform: translateY(-3px); box-shadow: 0 8px 20px -12px color-mix(in srgb, var(--accent) 60%, transparent); }
  .btn:hover { transform: translateY(-1px); }
  nav.index li a { transition: color .2s, padding-left .2s; }
  nav.index li a:hover { padding-left: 6px; }

  /* smooth open and close for folded sections */
  details.fold::details-content { block-size: 0; overflow: hidden; transition: block-size .35s ease, content-visibility .35s allow-discrete; }
  details.fold[open]::details-content { block-size: auto; }
  details.fold > summary::after { transition: transform .25s; }

}

/* scroll-driven effects: only where supported, so content is never hidden without them */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    @keyframes reveal { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
    main > section:not(:first-child), .cards > *, .tiles > *, .entry, .stats, .tbl, figure.diagram {
      animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 38%;
    }
    @keyframes progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform-origin: 0 50%;
      transform: scaleX(0); animation: progress linear both; animation-timeline: scroll(root); z-index: 20; }
  }
}
@supports selector(:target-current) {
  nav.index ol { scroll-target-group: auto; }
  nav.index li a:target-current { color: var(--ink); border-bottom-color: var(--accent); }
}

/* ---------- more motion ---------- */
.pkt { fill: var(--accent); filter: drop-shadow(0 0 3px var(--accent)); }
.svc { transition: filter .2s; } .svc:hover { filter: brightness(1.25); }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 7px transparent; } }
.badge.ongoing::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; margin-right: 7px; vertical-align: 1px; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: no-preference) {
  .badge.ongoing::before { animation: pulse 2s ease-out infinite; }
  .pane { animation: fadein .4s ease both; }
  @view-transition { navigation: auto; }
  @supports (animation-timeline: view()) {
    h2 { position: relative; border-bottom-color: var(--rule); }
    h2::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--accent); transform-origin: 0 50%;
      animation: draw linear both; animation-timeline: view(); animation-range: entry 20% entry 80%; }
    .cards > :nth-child(2), .tiles > :nth-child(2n) { animation-range: entry 8% entry 46%; }
    .cards > :nth-child(3), .tiles > :nth-child(3n) { animation-range: entry 14% entry 52%; }
  }
}
@media (prefers-reduced-motion: reduce) { .pkt { display: none; } }

/* ---------- work filters, status line, terminal labels ---------- */
.cmd { font: 13px/1.4 var(--mono); color: var(--ink-soft); margin: 0 0 12px; }
.cmd span { color: var(--accent); margin-right: 8px; }
.cmd i { font-style: normal; color: var(--ink-soft); opacity: .7; }
.status { font: 13px/1.5 var(--mono); color: var(--ink-soft); margin: 14px 0 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
@media (prefers-reduced-motion: no-preference) { .status .dot { animation: pulse 2.4s ease-out infinite; color: var(--accent); } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.filters .fr { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters label { font: 600 12px/1 var(--mono); padding: 8px 12px; border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; background: var(--bg); transition: background .2s, color .2s, border-color .2s; }
.filters label:hover { border-color: var(--accent); color: var(--ink); }
.filters .fr:checked + label { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.filters .fr:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
#work:has(#f-aws:checked) .card:not([data-cat~="aws"]),
#work:has(#f-cicd:checked) .card:not([data-cat~="cicd"]),
#work:has(#f-sre:checked) .card:not([data-cat~="sre"]),
#work:has(#f-product:checked) .card:not([data-cat~="product"]) { display: none; }
@media (prefers-reduced-motion: no-preference) { #work .card { animation: fadein .35s ease both; } }

/* =====================================================================
   v5 "control room": warm charcoal, amber signal, serif display, left rail,
   case files. Colour carries status: green healthy, amber in progress.
   ===================================================================== */
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("fonts/fraunces-i.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Sans"; src: url("fonts/plex600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono400.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url("fonts/plexmono600.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
:root, :root[data-theme="light"], :root[data-theme="dark"] {
  --bg: #12110f; --bg-alt: #1a1815; --ink: #efe9dd; --ink-soft: #a39b8c; --rule: #2d2a24; --accent: #ffb224; --node: #1a1815;
  --ok: #62cf80; --wip: #ffb224; --plan: #8f877a; --bad: #ff6b57;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --c-edge: #b79cf2; --c-compute: #4cc9e0; --c-data: #f0a35e; --c-msg: #6fd08c; --c-id: #f07fb0; --c-ops: #a9b3bd; --c-ci: #7f9cf5; --c-ext: #8d9a90;
  color-scheme: dark;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); }
section[id] { scroll-margin-top: 24px; }
a { color: var(--accent); }
::selection { background: var(--accent); color: #17130a; }
h1, h2, h3 { font-family: var(--serif); }
header.dh h1 { font-weight: 600; letter-spacing: -.02em; }

/* shell: left rail + content */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); }
.rail { position: sticky; top: 0; height: 100vh; align-self: start; padding: 34px 22px 26px 30px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 26px; }
.rlogo { text-decoration: none; display: grid; gap: 4px; }
.rlogo b { font: 600 17px/1 var(--mono); color: var(--ink); }
.rlogo span { font: 12px/1.3 var(--mono); color: var(--ink-soft); }
.rail nav { display: grid; gap: 2px; position: relative; padding-left: 14px; }
.rail nav::before { content: ""; position: absolute; left: 3px; top: 8px; bottom: 8px; width: 1px; background: var(--rule); }
.rail nav a { position: relative; font: 500 13px/1 var(--mono); color: var(--ink-soft); text-decoration: none; padding: 10px 0; transition: color .2s; }
.rail nav a .mk { position: absolute; left: -15px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--bg); border: 1px solid var(--plan); transition: background .2s, border-color .2s, transform .2s; }
.rail nav a:hover { color: var(--ink); }
.rail nav a[aria-current="true"] { color: var(--ink); }
.rail nav a[aria-current="true"] .mk { background: var(--accent); border-color: var(--accent); transform: scale(1.35); }
.rprog { height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.rprog i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.rfoot { margin: auto 0 0; font: 12px/1.6 var(--mono); color: var(--ink-soft); }
.rfoot .dot, .status .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 8px; vertical-align: 1px; }
@media (max-width: 1000px) {
  .shell { grid-template-columns: minmax(0,1fr); }
  .rail { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: 16px; padding: 10px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-right: 0; border-bottom: 1px solid var(--rule); }
  .rlogo span, .rprog, .rfoot { display: none; }
  .rail nav { min-width: 0; display: flex; gap: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
  .rail nav::before, .rail nav a .mk { display: none; }
  .rail nav a { padding: 8px 10px; white-space: nowrap; }
  .rail nav a[aria-current="true"] { color: var(--accent); }
}

/* top bar for detail pages */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.topbar .path { font: 600 15px/1 var(--mono); color: var(--ink); text-decoration: none; }
.topbar nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.topbar nav a { font: 500 13px/1 var(--mono); color: var(--ink-soft); text-decoration: none; padding: 8px 10px; }
.topbar nav a:hover { color: var(--ink); }
.topbar .touch { font: 600 12px/1 var(--mono); color: #17130a; background: var(--accent); text-decoration: none; padding: 10px 14px; border-radius: 3px; white-space: nowrap; }
@media (max-width: 700px) { .topbar nav { display: none; } .topbar .touch { margin-left: auto; } }
.page { padding-top: 12px; }

/* content */
main.home { padding: 0; min-width: 0; }
.wrapx { max-width: 940px; margin: 0 auto; padding: 0 28px 40px; }
.wrapx section { padding-top: 104px; }
.kicker { font: 600 12px/1 var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent); margin: 0 0 16px; }
.wrapx h2 { font: 500 clamp(1.9rem, 4vw, 2.9rem)/1.1 var(--serif); letter-spacing: -.02em; text-transform: none; color: var(--ink); border: 0; padding: 0; margin: 0 0 30px; max-width: 18em; text-wrap: balance; }
.wrapx h2::after { display: none; }
.wrapx h2.big { font-size: clamp(2.2rem, 5.4vw, 3.8rem); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: center; padding: 84px 40px 56px; min-height: min(88vh, 760px); max-width: 1180px; margin: 0 auto; }
.whoami { font: 14px/1 var(--mono); color: var(--ink-soft); margin: 0 0 20px; max-width: none; }
.whoami span { color: var(--accent); margin-right: 8px; }
.hero h1 { font: 600 clamp(2.5rem, 5.4vw, 4.4rem)/1.03 var(--serif); letter-spacing: -.03em; margin: 0 0 24px; }
.hero h1 em { display: block; font-style: italic; font-weight: 400; color: var(--accent); margin-top: 8px; font-size: .62em; line-height: 1.15; letter-spacing: -.015em; }
.hero .lede { font-size: 1.1rem; line-height: 1.65; color: var(--ink-soft); max-width: 32em; margin: 0 0 28px; }
.btn { display: inline-flex; white-space: nowrap; align-items: center; font: 600 13px/1 var(--mono); padding: 14px 20px; border-radius: 3px; background: var(--accent); color: #17130a; border: 1px solid var(--accent); text-decoration: none; cursor: pointer; }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.alt:hover { border-color: var(--accent); color: var(--accent); }
.btn.text { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.text::after { content: " →"; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; padding: 56px 20px 40px; min-height: 0; } }

/* status board */
.board { margin: 0; border: 1px solid var(--rule); border-radius: 6px; background: linear-gradient(180deg, #171512, #12110f); overflow-x: auto; }
.board figcaption { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--rule); font: 600 12px/1 var(--mono); color: var(--ink); }
.board figcaption i { font-style: normal; font-weight: 400; color: var(--ink-soft); margin-left: auto; }
.board figcaption .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.board-svg { display: block; width: 100%; min-width: 500px; height: auto; padding: 8px; }
.bl { stroke: var(--rule); stroke-width: 1.4; stroke-dasharray: 3 5; }
.bn rect { fill: #1b1915; stroke: #3a362e; stroke-width: 1; }
.bn.wip rect { stroke: var(--wip); stroke-dasharray: 4 3; }
.bn.ext rect { fill: transparent; }
.bt { font: 600 14px var(--sans); fill: var(--ink); } .bs { font: 11.5px var(--mono); fill: var(--ink-soft); }
.bn .hd { fill: var(--ok); } .bn.wip .hd { fill: var(--wip); } .bn.ext .hd { fill: var(--plan); }
.board .pkt { fill: var(--accent); filter: drop-shadow(0 0 3px var(--accent)); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 0; padding: 0 14px 12px; font: 11px/1 var(--mono); color: var(--ink-soft); max-width: none; }
.legend span { display: flex; align-items: center; gap: 6px; }
.s { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--plan); }
.s.ok { background: var(--ok); } .s.wip { background: var(--wip); } .s.plan { background: transparent; border: 1px solid var(--plan); } .s.ext { background: transparent; border: 1px solid var(--plan); }

/* status strip */
.strip { list-style: none; margin: 0; max-width: none; padding: 14px 28px; border-block: 1px solid var(--rule); background: var(--bg-alt); display: flex; flex-wrap: wrap; gap: 8px 30px; justify-content: center; font: 13px/1.3 var(--mono); color: var(--ink-soft); }
.strip li { margin: 0; display: flex; align-items: center; gap: 9px; }

/* stats */
.wrapx .stats { margin-top: 56px; border-radius: 4px; overflow: hidden; border-color: var(--rule); background: var(--bg-alt); }
.wrapx .stat b { font: 500 2rem/1.1 var(--serif); color: var(--accent); }

/* roles list */
.roles-list { list-style: none; padding: 0; margin: 0; max-width: none; border-top: 1px solid var(--rule); }
.roles-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.roles-list a { display: grid; grid-template-columns: 44px 210px 1fr 24px; gap: 18px; align-items: baseline; padding: 20px 4px; text-decoration: none; color: var(--ink); transition: background .2s, padding-left .2s; }
.roles-list a:hover { background: var(--bg-alt); padding-left: 12px; }
.rn { font: 500 12px var(--mono); color: var(--accent); }
.roles-list b { font: 500 1.35rem/1.2 var(--serif); }
.rd { color: var(--ink-soft); font-size: 15px; line-height: 1.5; }
.ra { color: var(--accent); text-align: right; }
@media (max-width: 760px) { .roles-list a { grid-template-columns: 34px 1fr 20px; } .rd { grid-column: 2 / 3; } .ra { grid-row: 1; grid-column: 3; } }

/* case files */
.cmd { font: 13px/1.4 var(--mono); color: var(--ink-soft); margin: 0 0 12px; }
.cmd span { color: var(--accent); margin-right: 8px; } .cmd i { font-style: normal; opacity: .7; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filters .fr { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filters label { font: 500 12px/1 var(--mono); padding: 9px 13px; border: 1px solid var(--rule); border-radius: 3px; color: var(--ink-soft); cursor: pointer; background: var(--bg); transition: background .2s, color .2s, border-color .2s; }
.filters label:hover { border-color: var(--accent); color: var(--ink); }
.filters .fr:checked + label { background: var(--accent); border-color: var(--accent); color: #17130a; }
.filters .fr:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.caselist { display: grid; gap: 18px; }
.case { display: block; padding: 26px 28px 22px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-alt); color: var(--ink); text-decoration: none; transition: border-color .25s, transform .25s; position: relative; }
.case:hover { border-color: var(--accent); }
.case-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font: 12px/1 var(--mono); color: var(--ink-soft); }
.cid { color: var(--ink); font-weight: 600; }
.chip { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; padding: 5px 8px; border-radius: 2px; border: 1px solid currentColor; }
.chip.ongoing { color: var(--ok); } .chip.live { color: var(--ok); } .chip.poc, .chip.mvp { color: var(--wip); }
.cdate { margin-left: auto; }
.tbar { height: 3px; background: var(--rule); margin: 14px 0 18px; border-radius: 2px; overflow: hidden; }
.tbar i { display: block; height: 100%; background: var(--ok); border-radius: 2px; }
.tbar i.w30 { width: 30%; } .tbar i.w40 { width: 40%; } .tbar i.w55 { width: 55%; } .tbar i.w60 { width: 60%; } .tbar i.w100 { width: 100%; }
.case:has(.chip.poc) .tbar i, .case:has(.chip.mvp) .tbar i { background: var(--wip); }
.case h3 { font: 500 clamp(1.45rem, 2.8vw, 2rem)/1.15 var(--serif); letter-spacing: -.015em; margin: 0 0 20px; color: var(--ink); max-width: 24em; }
.case-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; }
.lab { font: 600 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent); margin: 0 0 8px; max-width: none; }
.case-cols p { color: var(--ink-soft); font-size: 15px; line-height: 1.6; margin: 0 0 16px; }
.case .tags { margin: 4px 0 0; }
.case .tags li { border-radius: 2px; }
.res { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 0; }
.res li { display: grid; grid-template-columns: 86px 1fr; gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px dashed var(--rule); margin: 0; }
.res li:first-child { border-top: 0; padding-top: 0; }
.res b { font: 500 1.5rem/1 var(--serif); color: var(--ink); }
.res span { font: 13px/1.35 var(--mono); color: var(--ink-soft); }
.go { display: inline-block; margin-top: 14px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }
.go::after { content: " →"; }
@media (max-width: 800px) { .case-cols { grid-template-columns: 1fr; gap: 6px; } .cdate { margin-left: 0; } .case { padding: 20px; } }
#cases:has(#f-aws:checked) .case:not([data-cat~="aws"]),
#cases:has(#f-cicd:checked) .case:not([data-cat~="cicd"]),
#cases:has(#f-sre:checked) .case:not([data-cat~="sre"]),
#cases:has(#f-product:checked) .case:not([data-cat~="product"]) { display: none; }

/* architectures band */
.archband { padding: 30px 32px; border: 1px solid var(--rule); border-radius: 6px; background: var(--bg-alt); }
.archband p { max-width: 38em; font-size: 1.02rem; color: var(--ink-soft); }
ul.plain { list-style: none; padding: 0; max-width: none; }
ul.plain li { padding: 10px 0; border-bottom: 1px dotted var(--rule); font-size: 15px; }
.archband .btn { margin-top: 18px; }

/* toolbox */
.toolbox { margin: 0; border-top: 1px solid var(--rule); }
.toolbox > div { display: grid; grid-template-columns: 210px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.toolbox dt { font: 600 12px/1.8 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--accent); }
.toolbox dd { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toolbox dd span { font: 13px/1 var(--mono); padding: 7px 10px; border: 1px solid var(--rule); border-radius: 2px; color: var(--ink); background: var(--bg-alt); transition: border-color .2s, color .2s; }
.toolbox dd span:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) { .toolbox > div { grid-template-columns: 1fr; gap: 8px; } }

/* timeline */
.tl2 { list-style: none; margin: 0; padding: 0 0 0 26px; max-width: none; position: relative; }
.tl2::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--rule); }
.tl2 li { position: relative; margin: 0; padding: 0 0 36px; }
.tl2 li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 1px solid var(--plan); }
.tl2 li.now::before { background: var(--ok); border-color: var(--ok); }
.tl2 .d { font: 500 12px/1 var(--mono); color: var(--accent); margin: 0 0 8px; max-width: none; }
.tl2 h3 { font: 500 1.5rem/1.2 var(--serif); margin: 0 0 4px; }
.tl2 .co { font: 13px var(--mono); color: var(--ink-soft); margin: 0 0 10px; }
.sub { font: 500 1.3rem/1.2 var(--serif); margin: 36px 0 14px; }

/* contact */
.cta-block { padding-bottom: 30px; }
.term { border: 1px solid var(--rule); border-radius: 6px; background: #0e0d0b; padding: 22px 24px; max-width: 46em; }
.term p { margin: 0 0 8px; max-width: none; font: 14px/1.6 var(--mono); }
.term p span { color: var(--accent); margin-right: 8px; }
.term .out { color: var(--ink-soft); }
.mail { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px !important; }
.wrapx footer { margin-top: 80px; border-color: var(--rule); }

/* reuse older helpers with the new tokens */
.stat span { color: var(--ink-soft); }
.tbl { border-radius: 4px; }
.badge.ongoing { color: var(--ok); }

/* motion (all off under prefers-reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
  @keyframes blink { 50% { opacity: .25; } }
  .bn:not(.ext) .hd { animation: blink 2.6s ease-in-out infinite; }
  .bn.wip .hd { animation-duration: 1.2s; }
  .case { transition: border-color .25s, transform .25s; } .case:hover { transform: translateY(-3px); }
  .hero-copy > * { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; } .hero-copy > :nth-child(2) { animation-delay: .08s; } .hero-copy > :nth-child(3) { animation-delay: .16s; } .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .board { animation: rise .8s cubic-bezier(.2,.7,.2,1) .2s both; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .tbar i { transform-origin: 0 50%; animation: grow 1.1s cubic-bezier(.2,.7,.2,1) both; }
  .btn { transition: transform .2s, filter .2s, border-color .2s, color .2s; } .btn:hover { transform: translateY(-2px); }
  @supports (animation-timeline: view()) {
    .rprog i { animation: grow linear both; animation-timeline: scroll(root); }
  }
}
@media (prefers-reduced-motion: reduce) { .board .pkt { display: none; } }

.page h1, .detail h1 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.01em; }
.page h2 { font-family: var(--mono); }

/* compact case rows */
.caselist { display: grid; gap: 12px; }
.case.row { display: block; padding: 22px 26px; }
.case.row h3 { font-size: clamp(20px, 2.2vw, 26px); margin: 12px 0 8px; }
.case.row p { margin: 0 0 6px; color: var(--ink-soft); max-width: 70ch; }
.case.row .kp { font: 12.5px/1.6 var(--mono); color: var(--accent); }
.case.row .go { display: inline-block; margin-top: 10px; }

/* reference architecture view */
.ra-svg { width: 100%; height: auto; display: block; background: var(--bg-alt); border: 1px solid var(--rule); border-radius: 4px; }
.ra-group { fill: none; stroke: var(--rule); stroke-width: 1; }
.ra-group.cloud { stroke: var(--ink-soft); stroke-dasharray: 2 0; fill: color-mix(in srgb, var(--bg) 40%, transparent); }
.ra-gl { font: 600 12px var(--mono); fill: var(--ink-soft); letter-spacing: .04em; }
.ra-box rect:first-child { fill: var(--bg); stroke: var(--rule); }
.ra-box .bar { fill: var(--c, var(--accent)); stroke: none; }
.ra-box.key rect:first-child { stroke: var(--c); }
.ra-box.ghost rect:first-child { stroke: var(--plan); stroke-dasharray: 4 3; fill: none; }
.ra-n { font: 600 12.5px var(--sans); fill: var(--ink); }
.ra-s { font: 11.5px var(--sans); fill: var(--ink-soft); }
.ra-ln { fill: none; stroke: var(--ink-soft); stroke-width: 1.4; }
.ra-ln.dash { stroke-dasharray: 4 3; }
.ra-arrow { fill: var(--ink-soft); }
.ra-el { font: 11.5px var(--mono); fill: var(--ink-soft); }
.ra-step circle { fill: var(--accent); }
.ra-step text { font: 700 11px var(--mono); fill: #17130a; text-anchor: middle; }
.ra-flow { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px 28px; }
.ra-flow li { text-align: left; display: flex; gap: 12px; }
.ra-flow li > b { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #17130a; font: 700 12px/24px var(--mono); text-align: center; }
.ra-flow h4 { margin: 0 0 3px; font: 600 14px var(--sans); }
.ra-flow p { margin: 0; font-size: 14px; color: var(--ink-soft); }

.ra-svg .pkt { fill: var(--accent); }
@media (prefers-reduced-motion: reduce) { .ra-svg .pkt { display: none; } }

.ra-scroll { overflow-x: auto; }
.ra-scroll .ra-svg { min-width: 1120px; }
.ra-leg { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; padding: 0; font: 12px/1.2 var(--mono); color: var(--ink-soft); }
.ra-leg li { display: flex; align-items: center; gap: 7px; }
.ra-leg i { width: 4px; height: 14px; background: var(--c, var(--accent)); display: inline-block; }
.ra-leg i.dsh { width: 16px; height: 12px; background: none; border: 1px dashed var(--plan); }
.ra-leg .ln { display: inline-block; width: 22px; border-top: 1.4px solid var(--ink-soft); }
.ra-leg .ln.d { border-top-style: dashed; }
@media (max-width: 700px) { .board { display: none; } .btn.text { padding-left: 4px; } }

/* views: Reference or flat layers */
.views .vr.rref:checked ~ .pflat, .views .vr.rflat:checked ~ .pref { display: none; }
.views .iso-cap { font: 12px/1.5 var(--mono); color: var(--ink-soft); margin: 8px 0 0; }
.ra-hint { font: 12px/1.5 var(--mono); color: var(--ink-soft); margin: 8px 0 0; }
.ra-box[data-d] { cursor: help; outline: none; }
.ra-box[data-d]:hover rect:first-child, .ra-box[data-d]:focus-visible rect:first-child { stroke: var(--accent); }
@media (prefers-reduced-motion: no-preference) {
  @keyframes arm { to { stroke-dashoffset: 0; } }
  .ra-box.arming rect:first-child { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: 100; animation: arm 3s linear forwards; }
}
.ra-box.on rect:first-child { stroke: var(--accent); stroke-width: 2; }

/* detail panel, bottom right */
.ra-panel { position: fixed; right: 16px; bottom: 16px; z-index: 60; width: 360px; max-width: calc(100vw - 32px); max-height: min(62vh, 560px); overflow: auto;
  background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; padding: 16px 18px 14px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.55); }
.ra-panel[hidden] { display: none; }
.ra-panel h4 { margin: 0 28px 2px 0; font: 600 17px/1.25 var(--serif); }
.ra-panel .pk { font: 600 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.ra-panel .ps { margin: 0 0 10px; font-size: 13.5px; color: var(--ink-soft); }
.ra-panel ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.ra-panel li { font-size: 13.5px; line-height: 1.5; padding-left: 14px; position: relative; }
.ra-panel li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 1.5px; background: var(--accent); }
.ra-panel li.std { color: var(--ink); }
.ra-panel li.std b { color: var(--accent); font: 600 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; margin-right: 4px; }
.ra-panel .px { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border: 1px solid var(--rule); background: var(--bg); color: var(--ink); font: 16px/1 var(--mono); cursor: pointer; }
.ra-panel .px:hover { border-color: var(--accent); color: var(--accent); }
.ra-panel .pe { margin: 10px 0 0; font: 11px var(--mono); color: var(--ink-soft); }

/* search */
.sbox { position: relative; }
.sbox input { font: 13px var(--mono); width: 100%; padding: 8px 34px 8px 12px; background: var(--bg-alt); color: var(--ink); border: 1px solid var(--rule); border-radius: 4px; }
.sbox input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.sbox kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 11px var(--mono); border: 1px solid var(--rule); padding: 1px 6px; color: var(--ink-soft); border-radius: 3px; pointer-events: none; }
.sres { position: absolute; left: 0; right: 0; top: calc(100% + 6px); min-width: min(520px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--bg); border: 1px solid var(--accent); border-radius: 6px; box-shadow: 0 14px 40px -12px rgba(0,0,0,.55); z-index: 70; padding: 6px; }
.sres[hidden] { display: none; }
.sres a { display: block; padding: 9px 10px; text-decoration: none; color: var(--ink); border-radius: 4px; }
.sres a[aria-selected="true"], .sres a:hover { background: var(--bg-alt); }
.sres a b { display: block; font: 600 14px var(--sans); }
.sres a span { display: block; font-size: 12.5px; color: var(--ink-soft); }
.sres a em { font: normal 600 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-right: 8px; }
.sres mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; }
.sres .none { padding: 12px; font-size: 13.5px; color: var(--ink-soft); }
.hsearch { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(6px); border-bottom: 1px solid var(--rule); padding: 10px 16px; display: flex; justify-content: flex-end; }
.hsearch .sbox { width: min(460px, 100%); }
.topbar .sbox { flex: 0 1 280px; min-width: 150px; }
ul.stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
ul.stack li { padding: 9px 0 9px 16px; border-bottom: 1px solid var(--rule); position: relative; }
ul.stack li::before { content: ""; position: absolute; left: 0; top: 1.3em; width: 7px; height: 2px; background: var(--accent); }
ul.stack b { font: 600 12.5px var(--mono); color: var(--accent); margin-right: 8px; letter-spacing: .02em; }
@media (max-width: 700px) { .topbar { padding: 10px 16px; gap: 10px; } .topbar .sbox { flex: 1 1 120px; } .topbar .touch { margin-left: 0; padding: 10px 11px; } .topbar .path b { font-size: 14px; } }
@media (max-width: 700px) { .sbox kbd { display: none; } .sbox input { padding-right: 10px; } }
