:root {
  --black: #030303;
  --panel: #090909;
  --panel-2: #0f0f0f;
  --panel-3: #151412;
  --ivory: #f4f0e8;
  --ivory-soft: #d9d3c8;
  --muted: #9c9a94;
  --faint: rgba(244, 240, 232, 0.15);
  --faint-2: rgba(244, 240, 232, 0.08);
  --line-strong: rgba(244, 240, 232, 0.27);
  --mercury: #c9c9c6;
  --blue: #0f7dff;
  --blue-soft: #73b4ff;
  --maroon: #631f24;
  --maroon-soft: rgba(99, 31, 36, 0.55);
  --warn: #b08a3c;
  --ok: #8fa17d;
  --bad: #8e3a3a;
  --shadow: 0 30px 110px rgba(0,0,0,0.52);
  --radius: 8px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ivory);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 18% 0%, rgba(15,125,255,.11), transparent 34%),
    radial-gradient(circle at 86% 8%, rgba(99,31,36,.22), transparent 32%),
    linear-gradient(90deg, rgba(244,240,232,.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(244,240,232,.025) 1px, transparent 1px),
    linear-gradient(180deg, #000 0%, var(--black) 52%, #050505 100%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  letter-spacing: 0;
}
a { color: inherit; text-decoration: none; }
p { margin-top: 0; }
.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 100;
  transform: translateY(-150%);
  background: var(--ivory);
  color: #090909;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 13px;
}
.skip-link:focus { transform: translateY(0); }
.site { min-height: 100vh; padding: 22px; }
.frame {
  max-width: 1240px;
  min-height: calc(100vh - 44px);
  margin: 0 auto;
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  background: rgba(5,5,5,.91);
  box-shadow: var(--shadow);
  overflow: clip;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--faint);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
  background: rgba(3,3,3,.9);
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 222px; }
.brand img { width: 42px; height: 42px; object-fit: cover; border: 1px solid var(--faint); border-radius: var(--radius); }
.brand strong { display: block; font-size: 17px; letter-spacing: .08em; }
.brand span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.nav a {
  border: 1px solid transparent;
  color: var(--muted);
  padding: 8px 9px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-radius: var(--radius);
}
.nav a:hover, .nav a.active { color: var(--ivory); border-color: var(--line-strong); background: rgba(255,255,255,.045); }
.main { padding: 30px 28px 52px; }
.hero-compact { text-align: center; padding: 36px 20px 30px; border-bottom: 1px solid var(--faint); }
.banner { width: min(980px, 100%); height: auto; object-fit: contain; display: block; margin: 0 auto; }
.kicker { color: var(--muted); text-transform: uppercase; font-size: 11px; letter-spacing: .16em; margin: 18px 0 0; }
.page-title { margin: 14px 0 10px; text-transform: uppercase; letter-spacing: .02em; font-size: clamp(34px, 5vw, 74px); line-height: .95; }
.page-subtitle { max-width: 860px; margin: 18px auto 0; color: var(--ivory-soft); line-height: 1.75; font-size: 15px; }
.blue { color: var(--blue); }
.maroon { color: #9b3339; }
.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px;
  align-items: end;
  padding: 42px 34px 34px;
  border-bottom: 1px solid var(--faint);
  background:
    linear-gradient(135deg, rgba(255,255,255,.045), transparent 35%),
    linear-gradient(180deg, rgba(15,125,255,.055), transparent 62%);
}
.hero-copy { max-width: 810px; }
.hero-copy .banner { margin: 0; width: min(760px, 100%); filter: drop-shadow(0 18px 38px rgba(0,0,0,.42)); }
.hero-copy .page-title { margin-top: 24px; }
.hero-copy .page-subtitle { margin-left: 0; max-width: 730px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-status {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.022));
  padding: 18px;
  min-height: 244px;
}
.status-topline { display: flex; align-items: center; gap: 10px; color: var(--ivory); font-size: 14px; text-transform: uppercase; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 20px rgba(176,138,60,.5); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 20px rgba(143,161,125,.55); }
.status-dot.warn { background: var(--warn); box-shadow: 0 0 20px rgba(176,138,60,.55); }
.status-dot.bad { background: var(--bad); box-shadow: 0 0 20px rgba(142,58,58,.55); }
.status-list { margin: 28px 0 0; display: grid; gap: 16px; }
.status-list div { border-top: 1px solid var(--faint); padding-top: 12px; }
.status-list dt { margin: 0 0 6px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.status-list dd { margin: 0; color: var(--ivory-soft); font-size: 15px; line-height: 1.35; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.card {
  border: 1px solid var(--faint);
  background: linear-gradient(180deg, rgba(255,255,255,.047), rgba(255,255,255,.015));
  border-radius: var(--radius);
  padding: 22px;
  min-height: 144px;
  position: relative;
  overflow: hidden;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}
.card::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(135deg, rgba(255,255,255,.052), transparent 32%); opacity: .56; }
.card > * { position: relative; z-index: 1; }
.card:hover { border-color: var(--line-strong); background: linear-gradient(180deg, rgba(255,255,255,.064), rgba(255,255,255,.02)); transform: translateY(-1px); }
.status-card { min-height: 166px; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: 1 / -1; }
.label { display: block; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; font-size: 11px; margin-bottom: 11px; }
.stat-value { display: block; font-size: clamp(18px, 2.4vw, 30px); text-transform: uppercase; letter-spacing: .015em; color: var(--ivory); }
.stat-value.warn { color: var(--warn); }
.stat-value.ok { color: var(--ok); }
.stat-value.bad { color: var(--bad); }
.stat-note { color: var(--muted); margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
h1,h2,h3 { margin: 0; }
.card h2, .card h3 { text-transform: uppercase; letter-spacing: .07em; font-size: 15px; margin-bottom: 16px; }
.card p { color: var(--ivory-soft); line-height: 1.7; font-size: 14px; }
.section-head { display:flex; justify-content:space-between; align-items:end; gap:20px; margin: 6px 0 18px; }
.section-head h2 { font-size: 15px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 0; }
.section-head p { margin:0; color:var(--muted); font-size: 12px; line-height: 1.6; max-width: 590px; }
.surface-map { display:grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.surface-map a, .law-grid div, .boundary-grid div, .mini-card {
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  padding: 16px;
  background: rgba(255,255,255,.018);
}
.surface-map a { min-height: 112px; }
.surface-map a:hover { border-color: rgba(15,125,255,.58); background: rgba(15,125,255,.055); }
.surface-map span { display:block; color: var(--blue-soft); text-transform: uppercase; font-size: 12px; margin-bottom: 10px; letter-spacing: .08em; }
.surface-map strong { display:block; color: var(--ivory-soft); font-weight: 500; line-height: 1.45; font-size: 14px; }
.boundary-grid, .law-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.boundary-grid strong, .law-grid strong, .mini-card strong { display:block; color: var(--blue-soft); text-transform: uppercase; font-size: 12px; margin-bottom: 10px; letter-spacing: .08em; }
.boundary-grid p, .law-grid p, .mini-card p { margin:0; color: var(--ivory-soft); line-height:1.65; font-size: 13px; }
.module-flow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: stretch; }
.module-flow.four { grid-template-columns: repeat(4, 1fr); }
.module-flow.six { grid-template-columns: repeat(6, 1fr); }
.flow-card { border: 1px solid var(--faint); border-radius: var(--radius); padding: 18px; background: rgba(255,255,255,.02); min-height: 132px; }
.flow-card strong { display:block; letter-spacing:.07em; text-transform:uppercase; margin-bottom:10px; color: var(--ivory); }
.flow-card p { margin:0; color: var(--ivory-soft); line-height:1.65; font-size: 13px; }
.list-clean { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-clean li { border-top: 1px solid var(--faint); padding-top: 12px; color: var(--ivory-soft); line-height: 1.65; font-size: 14px; }
.list-clean strong { color: var(--ivory); }
.about-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); gap: 16px; }
.about-wide { grid-column: 1 / -1; }
.about-lead { min-height: 260px; }
.about-lead p:first-of-type { color: var(--ivory); font-size: clamp(20px, 2.55vw, 34px); line-height: 1.15; max-width: 780px; }
.callout {
  border-left: 2px solid var(--blue);
  padding-left: 14px;
  color: var(--ivory);
}
.audit-log, pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.72;
  color: #bcb6aa;
  background: #050505;
  border: 1px solid var(--faint);
  border-radius: var(--radius);
  padding: 14px;
  overflow-x: auto;
  white-space: pre-wrap;
}
.status-ledger { display: grid; gap: 10px; }
.ledger-row { display:grid; grid-template-columns: 150px 1fr 128px; gap: 14px; border-top:1px solid var(--faint); padding-top: 10px; color: var(--ivory-soft); font-size: 13px; }
.ledger-row span:first-child, .ledger-row span:last-child { color: var(--muted); text-transform: uppercase; letter-spacing:.06em; font-size: 10px; }
.doctrine-page { max-width: 1020px; margin: 0 auto; }
.doctrine-section { border: 1px solid var(--faint); border-radius: var(--radius); background: rgba(255,255,255,.018); margin-bottom: 12px; overflow: hidden; }
.doctrine-section summary { cursor: pointer; list-style: none; padding: 18px 20px; display: flex; align-items: center; gap: 14px; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.doctrine-section summary::-webkit-details-marker { display: none; }
.section-num { color: var(--blue); font-family: "SFMono-Regular", Consolas, monospace; letter-spacing: 0; }
.doctrine-body { border-top:1px solid var(--faint); padding: 20px; }
.doctrine-body p { margin: 0 0 15px; color: var(--ivory-soft); line-height:1.75; font-size: 14px; }
.doctrine-body .signal-line { color: var(--ivory); border-left: 2px solid var(--blue); padding-left: 12px; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.micro-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 7px; }
.micro-list li { color: var(--ivory-soft); font-size: 13px; line-height: 1.5; border-left: 1px solid var(--faint); padding-left: 12px; }
.domain-card { display:flex; flex-direction:column; gap:14px; min-height:230px; }
.domain-card img { width:64px; height:64px; object-fit:cover; border:1px solid var(--faint); border-radius: var(--radius); }
.domain-card h3 { text-transform:uppercase; letter-spacing:.08em; font-size:14px; margin-bottom: 0; }
.domain-card p { margin:0; color:var(--ivory-soft); line-height:1.7; font-size:14px; }
.button-row, .pill-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:auto; }
.pill { border: 1px solid var(--faint); border-radius: 999px; color: var(--muted); padding: 7px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; }
.btn { border:1px solid var(--faint); border-radius: var(--radius); padding:10px 12px; color:var(--ivory); font-size:11px; text-transform:uppercase; letter-spacing:.06em; background:rgba(255,255,255,.022); display:inline-flex; align-items:center; justify-content:center; min-height: 38px; }
.btn.primary { border-color: rgba(15,125,255,.7); background: rgba(15,125,255,.12); color: white; }
.btn:hover { border-color: rgba(15,125,255,.6); color:white; }
.footer { border-top:1px solid var(--faint); padding: 20px 28px; display:flex; justify-content:space-between; gap:18px; color:var(--muted); font-size:10px; letter-spacing:.07em; text-transform:uppercase; }
@media (max-width: 1040px) {
  .module-flow.six { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .site { padding: 10px; }
  .frame { min-height: calc(100vh - 20px); }
  .header { position: static; align-items: flex-start; flex-direction: column; }
  .nav { justify-content: flex-start; }
  .main { padding: 22px 16px 40px; }
  .hero-home { grid-template-columns: 1fr; padding: 30px 18px 24px; }
  .hero-status { min-height: auto; }
  .surface-map, .boundary-grid, .law-grid { grid-template-columns: 1fr 1fr; }
  .span-3,.span-4,.span-5,.span-6,.span-7,.span-8 { grid-column: 1 / -1; }
  .module-flow, .module-flow.four, .about-story { grid-template-columns: 1fr; }
  .ledger-row { grid-template-columns: 1fr; gap: 6px; }
  .footer { flex-direction: column; }
}
@media (max-width: 560px) {
  .nav { gap: 6px; }
  .nav a { padding: 7px 8px; font-size: 10px; }
  .brand { min-width: 0; }
  .hero-home { padding: 24px 14px 20px; }
  .hero-actions { flex-direction: column; }
  .surface-map, .boundary-grid, .law-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 36px; line-height: 1; }
  .module-flow.six { grid-template-columns: 1fr; }
}
