:root {
  --bg: #071014;
  --bg-alt: #08111f;
  --surface: #0f1b2a;
  --surface-strong: #132235;
  --surface-soft: rgba(255, 255, 255, 0.045);
  --text: #eef6f8;
  --muted: #9fb2bd;
  --teal: #2de2c5;
  --blue: #4f8cff;
  --gold: #c7a66b;
  --border: rgba(255, 255, 255, 0.1);
  --rule: rgba(199, 166, 107, 0.32);
  --line-soft: rgba(255, 255, 255, 0.11);
  --panel: rgba(15, 27, 42, 0.68);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --radius: 10px;
  --max: 1180px;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(199, 166, 107, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, rgba(45, 226, 197, 0.08), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(79, 140, 255, 0.09), transparent 34rem),
    linear-gradient(180deg, #08111f 0%, #071014 38rem, #05090d 100%);
  background-size: 96px 96px, 100% 42px, auto, auto, auto;
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  max-width: 100%;
}

.media-fill {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
}

:focus-visible {
  outline: 3px solid rgba(45, 226, 197, 0.8);
  outline-offset: 4px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 16, 20, 0.9);
  backdrop-filter: blur(18px);
}

.nav-wrap,
.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 760;
  letter-spacing: -0.03em;
  font-size: 1.14rem;
}

.brand img {
  width: 38px;
  height: 38px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  color: var(--muted);
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.045);
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 10px 12px;
}

.button,
button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(45, 226, 197, 0.35);
  border-radius: 8px;
  padding: 12px 18px;
  background: linear-gradient(135deg, rgba(45, 226, 197, 0.95), rgba(79, 140, 255, 0.90));
  color: #041114;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(45, 226, 197, 0.10);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  border-color: var(--border);
  box-shadow: none;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(45, 226, 197, 0.62);
  box-shadow: 0 14px 30px rgba(45, 226, 197, 0.16);
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(45, 226, 197, 0.08);
  color: var(--text);
}

.section {
  padding: 78px 0;
}

.section.tight {
  padding: 48px 0;
}

.hero {
  padding: 76px 0 66px;
}

.hero-grid,
.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1.12fr);
  gap: 46px;
  align-items: center;
}

.ledger-hero {
  padding: 86px 0 62px;
}

.ledger-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr);
  gap: 54px;
  align-items: center;
}

.ledger-brief {
  position: relative;
  padding-left: 22px;
  border-left: 1px solid rgba(199, 166, 107, 0.42);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  color: var(--teal);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: currentColor;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.2rem, 3.7vw, 3.65rem);
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 3.15rem);
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
}

p {
  margin: 0;
  color: var(--muted);
}

.lead {
  max-width: 760px;
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.7vw, 1.28rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(19, 34, 53, 0.78), rgba(15, 27, 42, 0.58));
  box-shadow: var(--shadow);
}

.visual-panel {
  min-height: 540px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.ledger-visual {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(19, 34, 53, 0.92), rgba(5, 11, 15, 0.96));
  box-shadow: var(--shadow);
  isolation: isolate;
}

.ledger-visual .media-fill {
  position: absolute;
  inset: 0;
  opacity: 0.76;
  filter: saturate(0.88) contrast(1.05);
}

.ledger-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(199, 166, 107, 0.18) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 16, 20, 0.08), rgba(7, 16, 20, 0.72));
  background-size: 110px 100%, 100% 54px, auto;
  pointer-events: none;
}

.ledger-visual::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 22px;
  z-index: 2;
  height: 1px;
  padding: 0;
  border: 1px solid rgba(199, 166, 107, 0.38);
  background: rgba(5, 11, 15, 0.78);
  border-width: 1px 0 0;
  pointer-events: none;
}

.visual-panel,
.visual-card {
  outline: 1px solid rgba(45, 226, 197, 0.08);
  outline-offset: -8px;
}

.visual-panel.has-image::before,
.visual-card.has-image::before {
  display: none;
}

.visual-panel.has-image .media-fill,
.visual-card.has-image .media-fill {
  position: absolute;
  inset: 0;
}

.visual-panel.has-image::after,
.visual-card.has-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(45, 226, 197, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(79, 140, 255, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(7, 16, 20, 0.02), rgba(7, 16, 20, 0.38));
  background-size: 42px 42px, 42px 42px, auto;
  border: 0;
  border-radius: 0;
  opacity: 1;
  pointer-events: none;
  transform: none;
}

.visual-panel::before,
.visual-panel::after,
.visual-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 22%, rgba(45, 226, 197, 0.18) 22.2% 22.55%, transparent 22.8% 100%),
    linear-gradient(0deg, transparent 0 32%, rgba(79, 140, 255, 0.18) 32.2% 32.55%, transparent 32.8% 100%),
    radial-gradient(circle at 68% 32%, rgba(45, 226, 197, 0.34), transparent 11rem),
    radial-gradient(circle at 34% 68%, rgba(79, 140, 255, 0.28), transparent 10rem);
  opacity: 0.82;
}

.visual-panel::after {
  inset: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 44px);
  transform: perspective(700px) rotateX(56deg) rotateZ(-9deg);
}

.metric-stack {
  position: absolute;
  right: 26px;
  bottom: 26px;
  left: 26px;
  z-index: 2;
  display: grid;
  gap: 12px;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(5, 11, 15, 0.80);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.78rem;
}

.metric strong {
  color: var(--text);
  font-family: inherit;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--border);
}

.trust-strip span {
  padding: 18px;
  background: rgba(15, 27, 42, 0.74);
  color: var(--muted);
  text-align: center;
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 34px;
  margin-bottom: 34px;
}

.section-head p {
  max-width: 520px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 14px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(180deg, rgba(15, 27, 42, 0.74), rgba(15, 27, 42, 0.58));
}

.card:hover {
  border-color: rgba(45, 226, 197, 0.28);
  background: rgba(19, 34, 53, 0.78);
}

.card h3,
.card h2 {
  margin-bottom: 13px;
}

.card-link {
  display: inline-flex;
  margin-top: 18px;
  color: var(--teal);
  font-weight: 720;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.chip {
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255,255,255,0.045);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
}

.numbered {
  counter-reset: item;
}

.numbered .card {
  position: relative;
  padding-top: 58px;
}

.numbered .card::before {
  counter-increment: item;
  content: "0" counter(item);
  position: absolute;
  top: 22px;
  left: 24px;
  color: var(--gold);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(199, 166, 107, 0.45);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.ledger-list {
  display: grid;
}

.ledger-row {
  display: grid;
  grid-template-columns: 88px minmax(210px, 0.42fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding: 24px 0;
  border-top: 1px solid var(--line-soft);
}

.ledger-row:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.home-ledger-list .ledger-row {
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
}

a.ledger-row:hover {
  border-top-color: rgba(45, 226, 197, 0.28);
  background: linear-gradient(90deg, rgba(45, 226, 197, 0.035), transparent 62%);
}

.ledger-index,
.ledger-status {
  color: var(--gold);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ledger-status {
  color: var(--teal);
}

.ledger-row h2,
.ledger-row h3 {
  margin-bottom: 10px;
}

.settlement-panel {
  position: relative;
  padding: 34px;
  border: 1px solid rgba(199, 166, 107, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(199, 166, 107, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(135deg, rgba(19, 34, 53, 0.86), rgba(7, 16, 20, 0.88));
  background-size: 96px 100%, 100% 44px, auto;
}

.routing-lane {
  counter-reset: route;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(15, 27, 42, 0.54);
}

.routing-lane .card,
.routing-step {
  counter-increment: route;
  border: 0;
  border-right: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}

.routing-lane .card:last-child,
.routing-step:last-child {
  border-right: 0;
}

.routing-lane .card::before,
.routing-step::before {
  content: "0" counter(route);
  display: block;
  margin-bottom: 22px;
  color: var(--gold);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.76rem;
  letter-spacing: 0.12em;
}

.service-block,
.case-block,
.legal-block {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.42fr) minmax(0, 1fr);
  gap: 30px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(15, 27, 42, 0.74), rgba(15, 27, 42, 0.54));
}

.service-block + .service-block,
.legal-block + .legal-block {
  margin-top: 18px;
}

.list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.list li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
}

.list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--teal);
  box-shadow: 0 0 18px rgba(45, 226, 197, 0.75);
}

.snapshot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 34px;
}

.snapshot div {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
}

.snapshot span,
.kicker {
  display: block;
  color: var(--gold);
  font-family: SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}

.snapshot strong {
  display: block;
  margin-top: 7px;
  line-height: 1.25;
}

.audit-sidebar {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.audit-panel {
  border: 1px solid rgba(199, 166, 107, 0.28);
  border-radius: var(--radius);
  background: var(--panel);
}

.audit-line {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}

.audit-line:first-child {
  border-top: 0;
}

.visual-card {
  min-height: 360px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(19,34,53,0.8), rgba(7,16,20,0.95));
}

.card-visual {
  display: block;
  width: calc(100% + 44px);
  max-width: none;
  height: 170px;
  margin: -22px -22px 20px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  opacity: 0.92;
}

.case-card-visual {
  display: block;
  width: calc(100% + 44px);
  max-width: none;
  height: 230px;
  margin: -22px -22px 20px;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
}

.case-study-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.case-ledger {
  display: grid;
  gap: 16px;
}

.case-ledger .card {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.case-ledger .case-card-visual {
  width: 100%;
  height: 100%;
  min-height: 250px;
  margin: 0;
  border: 0;
}

.case-ledger-body {
  padding: 24px;
}

.case-detail-hero {
  padding: 64px 0 42px;
}

.case-detail-hero .visual-card {
  min-height: 560px;
}

.case-detail-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.case-dossier {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.case-detail-body {
  display: grid;
  gap: 18px;
}

.case-detail-body .card p + p,
.legal-content p + p {
  margin-top: 12px;
}

.legal-content {
  width: min(860px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-rulebook {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-content .hero {
  padding: 58px 0 34px;
}

.legal-content h1 {
  max-width: 760px;
}

.legal-section {
  padding: 26px 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  margin-bottom: 14px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.legal-section ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.cta-panel {
  padding: 36px;
  border: 1px solid rgba(45, 226, 197, 0.22);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.024) 1px, transparent 1px),
    radial-gradient(circle at 80% 10%, rgba(45,226,197,0.13), transparent 22rem),
    linear-gradient(135deg, rgba(19, 34, 53, 0.92), rgba(15, 27, 42, 0.72));
  background-size: 36px 36px, 36px 36px, auto, auto;
}

.form-grid {
  display: grid;
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 700;
}

.field input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 15px;
  background: rgba(5, 11, 15, 0.68);
  color: var(--text);
  font: inherit;
}

.field input[type="file"] {
  padding: 12px;
}

.form-success {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(45, 226, 197, 0.35);
  border-radius: 8px;
  color: var(--teal);
  background: rgba(45, 226, 197, 0.08);
}

.form-success.is-visible {
  display: block;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 56px 0 34px;
  background: rgba(5, 11, 15, 0.55);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 0.7fr);
  gap: 30px;
}

.footer-grid h2,
.footer-grid h3 {
  font-size: 0.92rem;
  letter-spacing: 0;
  margin-bottom: 12px;
}

.footer-grid a {
  display: block;
  color: var(--muted);
  margin: 8px 0;
}

.footer-grid a:hover {
  color: var(--teal);
}

.copyright {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  color: rgba(159, 178, 189, 0.8);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    position: fixed;
    inset: 78px 20px auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(7, 16, 20, 0.96);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .hero-grid,
  .split-grid,
  .ledger-hero-grid,
  .case-detail-layout,
  .case-dossier,
  .case-ledger .card,
  .service-block,
  .case-block,
  .legal-block,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .ledger-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .routing-lane {
    grid-template-columns: 1fr;
  }

  .routing-lane .card,
  .routing-step {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .routing-lane .card:last-child,
  .routing-step:last-child {
    border-bottom: 0;
  }

  .audit-sidebar {
    position: static;
  }

  .grid-2,
  .grid-3,
  .grid-4,
  .case-study-grid,
  .snapshot,
  .trust-strip {
    grid-template-columns: 1fr;
  }

  .section-head {
    display: block;
  }

  .section-head p {
    margin-top: 16px;
  }
}

@media (max-width: 560px) {
  .nav-wrap,
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .hero {
    padding-top: 56px;
  }

  .ledger-hero {
    padding: 58px 0 42px;
  }

  .section {
    padding: 58px 0;
  }

  .card,
  .service-block,
  .case-block,
  .legal-block,
  .cta-panel {
    padding: 22px;
  }

  .visual-panel {
    min-height: 310px;
  }

  .ledger-visual {
    min-height: 320px;
  }

  .visual-card,
  .case-detail-hero .visual-card {
    min-height: 300px;
  }

  .settlement-panel {
    padding: 24px;
  }
}
