:root {
  --bg: #090d12;
  --bg-soft: #0d131a;
  --panel: #111922;
  --panel-2: #151f29;
  --line: #24313d;
  --line-bright: #354552;
  --text: #edf4f8;
  --muted: #9baab5;
  --faint: #6f7e89;
  --accent: #69e8c2;
  --accent-2: #9ac9ff;
  --danger: #ff897f;
  --warn: #f6cf75;
  --ok: #7af0b8;
  --max: 1180px;
  --radius: 18px;
  --shadow: 0 30px 80px rgba(0,0,0,.26);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(circle at 80% -10%, rgba(105,232,194,.08), transparent 34rem),
    radial-gradient(circle at 10% 0%, rgba(154,201,255,.06), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  min-height: 100vh;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }
img, svg { max-width: 100%; }
.skip-link {
  position: fixed; left: 1rem; top: .5rem; z-index: 1000; transform: translateY(-180%);
  background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  position: sticky; top: 0; z-index: 50; height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--max))/2));
  background: rgba(9,13,18,.84); border-bottom: 1px solid rgba(53,69,82,.65); backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: .72rem; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 3px; }
.brand-mark span { display: block; border: 1px solid var(--accent); border-radius: 2px 2px 0 0; }
.brand-mark span:nth-child(1){ height: 42%; }
.brand-mark span:nth-child(2){ height: 74%; }
.brand-mark span:nth-child(3){ height: 100%; background: rgba(105,232,194,.13); }
.brand-type { font-size: .88rem; letter-spacing: .23em; font-weight: 800; }
.primary-nav { display: flex; align-items: center; gap: 1.2rem; }
.primary-nav a { color: var(--muted); font-size: .88rem; text-decoration: none; transition: color .18s ease; }
.primary-nav a:hover, .primary-nav a[aria-current="page"] { color: var(--text); }
.primary-nav .nav-cta { color: var(--bg); background: var(--accent); padding: .55rem .85rem; border-radius: 999px; font-weight: 700; }
.nav-toggle { display: none; border: 1px solid var(--line); background: transparent; color: var(--text); padding: .5rem .7rem; border-radius: 10px; }
main { min-height: 70vh; }
.container { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.hero { padding: 7rem 0 5.5rem; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.22fr .78fr; gap: 4rem; align-items: end; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .18em; font-size: .76rem; font-weight: 800; margin-bottom: 1.2rem; }
h1, h2, h3 { line-height: 1.08; margin-top: 0; }
h1 { font-size: clamp(3.3rem, 8.2vw, 7.2rem); letter-spacing: -.065em; max-width: 980px; margin-bottom: 1.5rem; }
h2 { font-size: clamp(2.1rem, 4.6vw, 4.1rem); letter-spacing: -.045em; margin-bottom: 1rem; }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
.hero-copy { max-width: 780px; color: #c7d2d9; font-size: clamp(1.05rem, 2.3vw, 1.4rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .72rem 1rem; border-radius: 12px; border: 1px solid var(--line-bright); text-decoration: none; font-weight: 750; cursor: pointer; background: var(--panel); color: var(--text); }
.button.primary { background: var(--accent); color: #05100c; border-color: var(--accent); }
.button.secondary { background: transparent; }
.button.danger { background: transparent; color: var(--danger); border-color: rgba(255,137,127,.5); }
.button.small { min-height: 36px; padding: .5rem .72rem; border-radius: 9px; font-size: .86rem; }
.button:disabled { opacity: .45; cursor: not-allowed; }
.status-panel { border: 1px solid var(--line); background: linear-gradient(180deg, rgba(17,25,34,.94), rgba(13,19,26,.94)); border-radius: 22px; padding: 1.3rem; box-shadow: var(--shadow); }
.status-panel .label { color: var(--muted); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.status-panel .value { font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.status-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--accent); margin-right: .4rem; }
.section { padding: 5rem 0; border-top: 1px solid rgba(36,49,61,.75); }
.section-tight { padding: 3.2rem 0; }
.section-intro { display: grid; grid-template-columns: .75fr 1.25fr; gap: 3rem; align-items: start; margin-bottom: 2.5rem; }
.section-intro p { color: var(--muted); font-size: 1.08rem; max-width: 760px; margin-top: .25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.card { border: 1px solid var(--line); background: rgba(17,25,34,.72); border-radius: var(--radius); padding: 1.35rem; }
.card p { color: var(--muted); }
.card .kicker { color: var(--accent); font-size: .74rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 800; }
.card strong.big { font-size: 2.4rem; letter-spacing: -.04em; display: block; }
.architecture { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.architecture .card { min-height: 240px; position: relative; overflow: hidden; }
.architecture .num { position: absolute; right: 1rem; top: .8rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--faint); font-size: .8rem; }
.architecture .brand-line { font-size: .8rem; letter-spacing: .12em; color: var(--accent-2); font-weight: 800; }
.callout { border-left: 3px solid var(--accent); padding: .3rem 0 .3rem 1.2rem; max-width: 880px; font-size: 1.18rem; color: #d8e3e9; }
.flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.flow-step { padding: 1.2rem; min-height: 160px; background: rgba(13,19,26,.75); border-right: 1px solid var(--line); }
.flow-step:last-child { border-right: 0; }
.flow-step .index { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); font-size: .74rem; }
.flow-step p { color: var(--muted); font-size: .9rem; }
.page-head { padding: 5.4rem 0 3rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(3rem, 7vw, 6rem); margin-bottom: 1rem; }
.page-head p { color: #c4d0d7; font-size: 1.18rem; max-width: 820px; }
.badges { display: flex; flex-wrap: wrap; gap: .5rem; }
.badge { border: 1px solid var(--line-bright); border-radius: 999px; padding: .28rem .58rem; color: var(--muted); font-size: .75rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.badge.ok { color: var(--ok); border-color: rgba(122,240,184,.35); }
.badge.warn { color: var(--warn); border-color: rgba(246,207,117,.35); }
.badge.danger { color: var(--danger); border-color: rgba(255,137,127,.35); }
.mono, code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
code { color: var(--accent-2); }
pre { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; background: #070a0e; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; color: #bfccd5; font-size: .82rem; line-height: 1.55; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 700px; }
th, td { text-align: left; padding: .8rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; background: #0d1319; }
td { font-size: .9rem; }
tr:last-child td { border-bottom: 0; }
.form-shell { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; align-items: start; }
.form-card { border: 1px solid var(--line); background: rgba(17,25,34,.78); padding: 1.5rem; border-radius: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: grid; gap: .4rem; }
.field.full { grid-column: 1 / -1; }
label { color: #d4dde3; font-size: .88rem; font-weight: 700; }
.help { color: var(--faint); font-size: .78rem; }
input, textarea, select {
  width: 100%; background: #0a0f14; color: var(--text); border: 1px solid var(--line-bright); border-radius: 10px;
  min-height: 44px; padding: .7rem .8rem; outline: none;
}
textarea { min-height: 130px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(105,232,194,.08); }
.check-row { display: flex; align-items: flex-start; gap: .65rem; margin-top: .35rem; }
.check-row input { width: 18px; min-height: 18px; margin-top: .22rem; }
.check-row label { font-weight: 500; color: var(--muted); }
.result-box { margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; padding: 1rem; background: #0a0f14; }
.result-box.success { border-color: rgba(122,240,184,.4); }
.result-box.error { border-color: rgba(255,137,127,.4); }
.registry-tools { display: flex; gap: .7rem; margin-bottom: 1rem; }
.registry-tools input { max-width: 520px; }
.registry-list { display: grid; gap: .7rem; }
.registry-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; background: rgba(13,19,26,.72); }
.registry-item h3 { margin-bottom: .35rem; }
.registry-meta { display: flex; flex-wrap: wrap; gap: .55rem 1rem; color: var(--muted); font-size: .82rem; }
.empty { border: 1px dashed var(--line-bright); border-radius: 14px; color: var(--muted); padding: 2rem; text-align: center; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.kv { border-bottom: 1px solid var(--line); padding: .7rem 0; display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 1rem; }
.kv .key { color: var(--faint); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.kv .val { overflow-wrap: anywhere; }
.terminal { background: #05080b; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.terminal-head { display: flex; align-items: center; gap: .35rem; height: 38px; padding: 0 .8rem; border-bottom: 1px solid var(--line); }
.terminal-head span { width: 8px; height: 8px; border-radius: 50%; background: var(--line-bright); }
.terminal pre { margin: 0; border: 0; border-radius: 0; max-height: 520px; overflow: auto; }
.operator-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.operator-sidebar { position: sticky; top: 96px; }
.operator-section { margin-bottom: 2rem; }
.operator-record { border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: .7rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.timeline { border-left: 1px solid var(--line-bright); margin-left: .5rem; padding-left: 1.4rem; }
.timeline-item { position: relative; padding: 0 0 1.4rem; }
.timeline-item::before { content:""; position: absolute; left: -1.72rem; top: .2rem; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.timeline-item time { color: var(--faint); font-size: .75rem; }
.timeline-item p { margin: .2rem 0 0; color: var(--muted); }
.site-footer { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 3rem 0 4rem; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.5fr .8fr .8fr; gap: 2rem; color: var(--muted); }
.footer-brand { color: var(--text); }
.footer-links { display: grid; align-content: start; gap: .5rem; }
.footer-links a { text-decoration: none; }
.footer-meta { font-size: .82rem; }
.toast-region { position: fixed; right: 1rem; bottom: 1rem; z-index: 100; width: min(390px, calc(100% - 2rem)); display: grid; gap: .5rem; }
.toast { border: 1px solid var(--line-bright); background: #111922; box-shadow: var(--shadow); border-radius: 12px; padding: .8rem 1rem; color: var(--text); }
.toast.error { border-color: rgba(255,137,127,.5); }
.smallprint { color: var(--faint); font-size: .78rem; }
.lead { color: #c7d2d9; font-size: 1.16rem; max-width: 850px; }
.divider { height: 1px; background: var(--line); margin: 1.2rem 0; }
.stack { display: grid; gap: 1rem; }
.flex { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.text-muted { color: var(--muted); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.hidden { display: none !important; }
.loading { opacity: .55; pointer-events: none; }

@media (max-width: 900px) {
  .hero-grid, .section-intro, .form-shell, .operator-layout { grid-template-columns: 1fr; }
  .grid-3, .architecture { grid-template-columns: 1fr 1fr; }
  .flow { grid-template-columns: 1fr; }
  .flow-step { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .flow-step:last-child { border-bottom: 0; }
  .operator-sidebar { position: static; }
  .site-footer { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .site-header { padding-inline: 20px; }
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; padding: 1rem 20px 1.3rem; background: #090d12; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; }
  .primary-nav.open { display: flex; }
  .primary-nav a { padding: .4rem 0; }
  .primary-nav .nav-cta { text-align: center; }
  .hero { padding-top: 4.4rem; }
  .hero-grid { gap: 2rem; }
  h1 { font-size: clamp(3.2rem, 17vw, 5.6rem); }
  .grid-3, .grid-2, .architecture, .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .registry-item { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: .2rem; }
  .site-footer { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
/* v1.2.0 form/projection utilities */
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.form-grid > .full { grid-column: 1 / -1; }
label.check { display: flex; align-items: flex-start; gap: .65rem; font-weight: 500; color: var(--muted); }
label.check input { width: 18px; min-height: 18px; margin-top: .15rem; flex: 0 0 auto; }
.search-bar { display: flex; gap: .7rem; margin-bottom: 1rem; align-items: end; }
.search-bar input { max-width: 560px; }
.registry-record { border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.15rem; background: rgba(13,19,26,.72); }
.registry-record h3 { margin-bottom: .35rem; }
.result-box.danger { border-color: rgba(255,137,127,.4); }
.kv > span { color: var(--faint); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.kv > strong { overflow-wrap: anywhere; font-weight: 600; }
@media (max-width: 720px) { .search-bar { flex-direction: column; align-items: stretch; } }


/* Runtime civic-system status */
.civic-status{display:flex;align-items:center;gap:.5rem;margin-bottom:.45rem;font-weight:700}
.status-light{display:inline-block;width:.65rem;height:.65rem;border-radius:50%;background:currentColor;box-shadow:0 0 0 .2rem rgba(255,255,255,.06)}
.civic-status.functional{color:#7ee2a8}
.civic-status.unavailable{color:#f1b36b}
