/* ==========================================================================
   Maxim Labs — Legal OS for Digital Jurisdictions
   Brutalist grid · night-native · DESIGN.md v3
   ========================================================================== */

:root {
  /* Base palette — canvas lifted from pitch-black obsidian to a charcoal/graphite
     that reads as designed, not void. Brand hues unchanged. */
  --obsidian:        #15191F;     /* was #0B0E14 — primary canvas, +6% L */
  --concrete:        #353B47;     /* was #2A2F36 — hairlines, more visible */
  --parchment:       #ECEDEF;     /* was #E6E6E6 — slightly cooler, brighter */
  --juris-blue:      #1A4A7A;     /* was #103B66 — opens up against lifted canvas */
  --juris-blue-hi:   #225A92;
  --verdict-orange:  #FF5A29;     /* was #FF5523 — micro-warm shift */
  --ledger-green:    #2A8062;     /* was #1E6B4F — more readable on charcoal */

  /* Semantic */
  --bg:              #15191F;
  --bg-tint:         #181D24;     /* alternating section ground for rhythm */
  --surface:         #1E242D;     /* inset panels, code blocks */
  --surface-raised:  #262E39;     /* cards, popovers */
  --border:          #353B47;
  --border-strong:   #4A5260;
  --fg:              #ECEDEF;
  --fg-muted:        #A5ACB5;     /* lifted from #8C9097 for body legibility */
  --fg-subtle:       #707783;
  --accent:          #FF5A29;
  --success:         #2A8062;

  /* Typography */
  --font-display: "Archivo Black", "Druk Wide Bold", "Helvetica Neue", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, sans-serif;
  --font-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-none: 0;
  --r-xs:   2px;
  --r-sm:   3px;
  --r-md:   4px;
  --r-pill: 999px;

  /* Motion */
  --d-fast: 80ms;
  --d-base: 160ms;
  --d-slow: 240ms;
  --ease:   cubic-bezier(0.2, 0, 0, 1);
}

/* ==========================================================================
   Reset
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }

::selection { background: var(--verdict-orange); color: var(--obsidian); }

:focus-visible {
  outline: 2px solid var(--verdict-orange);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

/* ==========================================================================
   Type primitives
   ========================================================================== */

.display { font-family: var(--font-display); text-transform: uppercase; letter-spacing: -0.015em; line-height: 0.92; }
.mono    { font-family: var(--font-mono); font-feature-settings: "tnum", "zero"; }
.caps    { text-transform: uppercase; letter-spacing: 0.08em; }

.period  { color: var(--verdict-orange); }
.period-block {
  display: inline-block;
  width: 0.55em; height: 0.18em;
  background: var(--verdict-orange);
  margin-left: 0.05em;
  vertical-align: baseline;
}

/* Square period (used after "MAXIM LABS." style wordmarks) */
.sq-dot {
  display: inline-block;
  width: 0.18em; height: 0.18em;
  background: var(--verdict-orange);
  margin-left: 0.04em;
  vertical-align: baseline;
}

a {
  color: var(--fg);
  text-decoration: none;
  transition: color var(--d-fast) var(--ease);
}
a:hover { color: var(--parchment); }

.link-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--parchment);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--d-base) var(--ease), border-color var(--d-base) var(--ease);
}
.link-arrow .arrow {
  color: var(--verdict-orange);
  transition: transform var(--d-base) var(--ease);
  display: inline-block;
}
.link-arrow:hover { color: var(--parchment); border-bottom-color: var(--verdict-orange); }
.link-arrow:hover .arrow { transform: translateX(2px); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) { .container { padding: 0 20px; } }

.rule       { height: 1px; background: var(--border); border: 0; margin: 0; }
.rule-thick { height: 2px; background: var(--parchment); border: 0; margin: 0; }

/* 12-column grid */
.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 24px;
}

/* ==========================================================================
   Vertical brand verbs (left margin rule)
   ========================================================================== */

.verbs {
  position: fixed;
  top: 0; bottom: 0;
  left: 0;
  width: 32px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 5;
}
.verbs-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
}
.verbs-text .period { color: var(--verdict-orange); }
@media (max-width: 1180px) { .verbs { display: none; } }

/* Geo coordinate right margin */
.geo {
  position: fixed;
  top: 0; bottom: 0;
  right: 0;
  width: 32px;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 5;
}
.geo-text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--fg-subtle);
  writing-mode: vertical-rl;
  white-space: nowrap;
}
@media (max-width: 1180px) { .geo { display: none; } }

/* ==========================================================================
   Top navigation
   ========================================================================== */

.nav {
  position: sticky; top: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px;
}
.wordmark {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  color: var(--parchment);
  display: inline-flex; align-items: baseline;
  white-space: nowrap;
  text-decoration: none;
}
.wordmark::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--verdict-orange);
  margin-left: 5px;
  align-self: flex-end;
  margin-bottom: 3px;
}
.wordmark .sr { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wordmark-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
@media (max-width: 720px) { .wordmark-tag { display: none; } }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--fg-muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.nav-links a:hover { color: var(--parchment); }
.nav-links a.active { color: var(--parchment); border-bottom-color: var(--parchment); }
@media (max-width: 880px) {
  .nav-links { display: none; }
}

.nav-status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--fg-muted);
}
.nav-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ledger-green);
  box-shadow: 0 0 0 0 rgba(30,107,79,0.8);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0   rgba(30,107,79,0.5); }
  70%  { box-shadow: 0 0 0 6px rgba(30,107,79,0); }
  100% { box-shadow: 0 0 0 0   rgba(30,107,79,0); }
}

/* ==========================================================================
   Section header (numbered anchor)
   ========================================================================== */

.section { padding: 96px 0 0; position: relative; }
.section + .section { padding-top: 0; }
@media (max-width: 720px) { .section { padding: 64px 0 0; } }

/* alternating ground tone for rhythm — subtle, ~3% delta */
#pipeline, #rubric { background: var(--bg-tint); }
#pipeline .section-head, #rubric .section-head { background: var(--bg-tint); }

.section-head {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 16px 0;
  border-top: 2px solid var(--juris-blue);
  border-bottom: 1px solid var(--border);
  position: relative;
}
.section-head::after {
  content: "";
  position: absolute; left: 0; top: -2px;
  height: 2px; width: 96px;
  background: var(--verdict-orange);
}
.section-index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--verdict-orange);
  font-weight: 500;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 28px);
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
}
.section-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  text-align: right;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .section-head { grid-template-columns: 60px 1fr; }
  .section-meta { display: none; }
}

.section-body { padding: 64px 0 96px; }
@media (max-width: 720px) { .section-body { padding: 48px 0 64px; } }

.lede {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.6vw, 22px);
  line-height: 1.45;
  color: var(--fg);
  max-width: 56ch;
  margin: 0 0 32px;
  font-weight: 400;
}
.lede em {
  font-style: normal;
  color: var(--parchment);
  border-bottom: 1px solid var(--verdict-orange);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--concrete) 1px, transparent 1px),
    linear-gradient(to bottom, var(--concrete) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: -1px -1px;
  opacity: 0.22;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 70%, transparent 100%);
}

.hero-meta {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.hero-meta .key { color: var(--verdict-orange); }
.hero-meta .val { color: var(--fg-muted); }
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 60px 1fr; }
  .hero-meta > :last-child { display: none; }
}

.hero-body {
  padding: 96px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: end;
}
@media (max-width: 1024px) {
  .hero-body { grid-template-columns: 1fr; padding: 64px 0 48px; gap: 64px; }
}

.hero-display {
  font-family: var(--font-display);
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 32px;
  color: var(--parchment);
}
.hero-display .period {
  color: var(--verdict-orange);
}

.hero-tagline {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.5;
  color: var(--fg);
  max-width: 52ch;
  margin: 0 0 40px;
}
.hero-tagline strong {
  color: var(--parchment);
  font-weight: 500;
  border-bottom: 1px solid var(--verdict-orange);
}

.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }

.hero-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  display: flex; flex-wrap: wrap; gap: 32px;
}
.hero-foot span { color: var(--fg-muted); }

/* Hero telemetry panel (right column) */
.telemetry {
  border: 1px solid var(--border);
  background: var(--surface);
}
.telemetry-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.telemetry-head .tag { color: var(--fg-muted); }
.telemetry-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ledger-green);
}
.telemetry-head .live::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ledger-green);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.tile {
  padding: 24px 20px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 8px;
}
.tile:nth-child(2n) { border-right: 0; }
.tile:nth-last-child(-n+2) { border-bottom: 0; }
.tile .v {
  font-family: var(--font-mono);
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--parchment);
  line-height: 1;
}
.tile .v small {
  font-size: 0.5em;
  color: var(--fg-muted);
  margin-left: 4px;
}
.tile .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.tile.pass .v { color: var(--ledger-green); }
.tile.blue { background: var(--juris-blue); }
.tile.blue .v { color: var(--parchment); }
.tile.blue .l { color: rgba(230,230,230,0.7); }
.tile.accent .v { color: var(--verdict-orange); }

/* mini-bar inside tile */
.tile-bar {
  height: 4px; background: var(--concrete); position: relative; margin-top: 8px;
}
.tile-bar::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--ledger-green);
  width: var(--bar, 70%);
}
.tile-bar-warn::after { background: var(--verdict-orange); }

.telemetry-foot {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  display: flex; justify-content: space-between;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0 18px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background var(--d-base) var(--ease),
              border-color var(--d-base) var(--ease),
              transform var(--d-fast) var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn .arrow {
  display: inline-block;
  transition: transform var(--d-base) var(--ease);
}
.btn:hover .arrow { transform: translateX(2px); }
.btn:active { transform: translateY(-1px); }

.btn-primary {
  background: var(--juris-blue);
  color: var(--parchment);
  border-color: var(--juris-blue);
}
.btn-primary:hover { background: var(--juris-blue-hi); border-color: var(--juris-blue-hi); }

.btn-secondary {
  background: transparent;
  color: var(--parchment);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface); }

.btn-accent {
  background: var(--verdict-orange);
  color: var(--obsidian);
  border-color: var(--verdict-orange);
  font-weight: 500;
}
.btn-accent:hover { filter: brightness(1.08); }

.btn-lg { height: 52px; padding: 0 28px; font-size: 13px; }

/* ==========================================================================
   Trace cards (problem section)
   ========================================================================== */

.traces {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.traces > * + * { border-left: 1px solid var(--border); }
@media (max-width: 880px) {
  .traces { grid-template-columns: 1fr; }
  .traces > * + * { border-left: 0; border-top: 1px solid var(--border); }
}

.trace {
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  background: var(--surface);
}
.trace-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.trace-id { color: var(--fg-muted); }
.trace-status {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--verdict-orange);
}
.trace-status::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--verdict-orange);
  border-radius: 50%;
}
.trace-status.warn { color: var(--verdict-orange); }
.trace-status.warn::before { background: var(--verdict-orange); }
.trace-status.fail { color: var(--verdict-orange); }
.trace-status.fail::before { background: var(--verdict-orange); }

.trace h3 {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
  line-height: 1.05;
}
.trace p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.trace .kv {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.trace .kv .k { color: var(--fg-subtle); }
.trace .kv .v { color: var(--parchment); }

/* ==========================================================================
   Pipeline (4 stages)
   ========================================================================== */

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
  background: var(--surface);
}
.pipeline > * + * { border-left: 1px solid var(--border); }
@media (max-width: 880px) {
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline > :nth-child(odd) { border-left: 0; }
  .pipeline > :nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 540px) {
  .pipeline { grid-template-columns: 1fr; }
  .pipeline > * { border-left: 0 !important; }
  .pipeline > * + * { border-top: 1px solid var(--border); }
}

.stage {
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
  border-top: 2px solid transparent;
  transition: border-top-color var(--d-base) var(--ease), background var(--d-base) var(--ease);
}
.stage:nth-child(1) { border-top-color: var(--juris-blue); }
.stage:nth-child(2) { border-top-color: var(--verdict-orange); }
.stage:nth-child(3) { border-top-color: var(--parchment); }
.stage:nth-child(4) { border-top-color: var(--ledger-green); }
.stage:hover { background: var(--surface-raised); }
.stage-index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--verdict-orange);
}
.stage-svg {
  width: 56px; height: 56px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--parchment);
  background: var(--bg);
}
.stage h4 {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
}
.stage p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
.stage-meta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.stage-meta b { color: var(--ledger-green); font-weight: 400; }

/* Pipeline arrow connectors (desktop only) */
@media (min-width: 881px) {
  .pipeline .stage:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -10px; top: 60px;
    color: var(--verdict-orange);
    font-family: var(--font-mono);
    font-size: 18px;
    background: var(--surface);
    padding: 2px 4px;
    z-index: 2;
  }
}

/* Building blocks grid */
.blocks {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.blocks > * + * { }
.blocks > :nth-child(2n) { border-left: 1px solid var(--border); }
.blocks > :nth-child(n+3) { border-top: 1px solid var(--border); }
@media (max-width: 720px) {
  .blocks { grid-template-columns: 1fr; }
  .blocks > * { border-left: 0 !important; }
  .blocks > * + * { border-top: 1px solid var(--border); }
}

.block {
  padding: 32px 28px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 12px;
}
.block-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verdict-orange);
}
.block h4 {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
}
.block p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}
.block ul {
  list-style: none; padding: 0; margin: 12px 0 0;
  border-top: 1px solid var(--border);
}
.block li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.block li:last-child { border-bottom: 0; }
.block li .k { color: var(--fg-muted); text-transform: uppercase; letter-spacing: 0.1em; font-size: 10px; }
.block li .v { color: var(--parchment); }
.block li .v.pass { color: var(--ledger-green); }

/* ==========================================================================
   Atlas / Why now
   ========================================================================== */

.atlas {
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.atlas-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.atlas-head .left { color: var(--fg-muted); }
.atlas-head .right { color: var(--ledger-green); display: inline-flex; align-items: center; gap: 6px; }
.atlas-head .right::before { content: ""; width: 6px; height: 6px; background: var(--ledger-green); border-radius: 50%; }

.atlas-svg-wrap { padding: 24px; }
.atlas-svg-wrap svg { width: 100%; height: auto; }

.atlas-foot {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}
.atlas-foot > * + * { border-left: 1px solid var(--border); }
@media (max-width: 720px) {
  .atlas-foot { grid-template-columns: 1fr 1fr; }
  .atlas-foot > :nth-child(odd) { border-left: 0; }
  .atlas-foot > :nth-child(n+3) { border-top: 1px solid var(--border); }
}
.atlas-cell {
  padding: 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
}
.atlas-cell .name {
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
  color: var(--parchment);
}
.atlas-cell .meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* Moments / why-now grid */
.moments {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.moments > * + * { border-left: 1px solid var(--border); }
@media (max-width: 880px) {
  .moments { grid-template-columns: 1fr; }
  .moments > * + * { border-left: 0; border-top: 1px solid var(--border); }
}
.moment {
  padding: 32px 28px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  border-top: 2px solid transparent;
}
.moment:nth-child(1) { border-top-color: var(--ledger-green); }
.moment:nth-child(2) { border-top-color: var(--verdict-orange); }
.moment:nth-child(3) { border-top-color: var(--juris-blue); background: var(--juris-blue); }
.moment:nth-child(3) .when { color: var(--verdict-orange); border-bottom-color: rgba(230,230,230,0.18); }
.moment:nth-child(3) h4 { color: var(--parchment); }
.moment:nth-child(3) p { color: rgba(230,230,230,0.78); }
.moment .when {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verdict-orange);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.moment h4 {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
  line-height: 1.05;
}
.moment p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* ==========================================================================
   Rubric / 8 cards (segmented)
   ========================================================================== */

.segment {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  margin-bottom: 32px;
  overflow: hidden;
}
.segment button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 10px 16px;
  color: var(--fg-muted);
  border-right: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.segment button:last-child { border-right: 0; }
.segment button.active {
  background: var(--parchment);
  color: var(--obsidian);
}
.segment button:hover:not(.active) { color: var(--parchment); }

.rubric {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.rubric > * { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rubric > :nth-child(4n) { border-right: 0; }
.rubric > :nth-last-child(-n+4) { border-bottom: 0; }
@media (max-width: 1024px) {
  .rubric { grid-template-columns: repeat(2, 1fr); }
  .rubric > * { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .rubric > :nth-child(2n) { border-right: 0; }
  .rubric > :nth-last-child(-n+2) { border-bottom: 0; }
}
@media (max-width: 540px) {
  .rubric { grid-template-columns: 1fr; }
  .rubric > * { border-right: 0; border-bottom: 1px solid var(--border); }
  .rubric > :last-child { border-bottom: 0; }
}

.card {
  padding: 28px 24px;
  background: var(--surface);
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
  transition: background var(--d-base) var(--ease);
  min-height: 280px;
}
.card:hover { background: var(--surface-raised); }
.card[data-class="sp"] { background: var(--bg); }
.card[data-class="sp"]:hover { background: var(--surface); }

.card-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.card-num { color: var(--verdict-orange); }
.card-class { color: var(--fg-subtle); }

.card-name {
  font-family: var(--font-display);
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  margin: 0;
  color: var(--parchment);
  line-height: 1.05;
}
.card-motto {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}
.card-def {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
.card-eg {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 2px solid var(--juris-blue);
  margin-top: auto;
}
.card-score {
  display: flex; gap: 0;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card-score span {
  flex: 1;
  color: var(--fg-subtle);
  display: inline-flex; align-items: center; gap: 4px;
}
.card-score span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--fg-subtle);
}
.card-score .full {
  color: var(--ledger-green);
}
.card-score .full::before { background: var(--ledger-green); }

/* ==========================================================================
   Proof — corpus stats + findings
   ========================================================================== */

.corpus {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border);
  background: var(--surface);
}
.corpus > * { border-right: 1px solid var(--border); }
.corpus > :last-child { border-right: 0; }
@media (max-width: 1024px) {
  .corpus { grid-template-columns: repeat(3, 1fr); }
  .corpus > :nth-child(3n) { border-right: 0; }
  .corpus > :nth-child(n+4) { border-top: 1px solid var(--border); }
  .corpus > :nth-child(3) { border-right: 0; }
  .corpus > :nth-child(4), .corpus > :nth-child(5) { border-right: 1px solid var(--border); }
}
@media (max-width: 600px) {
  .corpus { grid-template-columns: 1fr 1fr; }
  .corpus > * { border-right: 1px solid var(--border) !important; }
  .corpus > :nth-child(2n) { border-right: 0 !important; }
  .corpus > :nth-child(n+3) { border-top: 1px solid var(--border); }
}

.metric {
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.metric .v {
  font-family: var(--font-mono);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--parchment);
  line-height: 1;
}
.metric .v small { font-size: 0.5em; color: var(--fg-muted); margin-left: 4px; }
.metric .l {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.metric.green .v { color: var(--ledger-green); }

/* Scoreboard — tribunal scores against the rubric */
.scoreboard {
  margin-top: 48px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.scoreboard-head {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: baseline;
  gap: 24px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scoreboard-head .lab { color: var(--verdict-orange); }
.scoreboard-head .ttl { color: var(--parchment); }
.scoreboard-head .meta { color: var(--fg-subtle); text-align: right; }

.scoreboard-row {
  display: grid;
  grid-template-columns: 120px 1fr 100px 80px;
  align-items: center;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}
.scoreboard-row:last-child { border-bottom: 0; }
.scoreboard-row .name {
  font-family: var(--font-display);
  font-size: 18px;
  text-transform: uppercase;
  color: var(--parchment);
  letter-spacing: -0.005em;
}
.scoreboard-row .bar {
  position: relative;
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}
.scoreboard-row .bar::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0;
  width: var(--score, 80%);
  background: var(--ledger-green);
}
.scoreboard-row .bar::after {
  content: "";
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--verdict-orange);
}
.scoreboard-row .num {
  font-size: 14px;
  color: var(--parchment);
  text-align: right;
  font-feature-settings: "tnum";
}
.scoreboard-row .num strong { color: var(--ledger-green); font-weight: 500; }
.scoreboard-row .n {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  text-align: right;
}
@media (max-width: 720px) {
  .scoreboard-row { grid-template-columns: 100px 1fr 80px; }
  .scoreboard-row .n { display: none; }
  .scoreboard-head { grid-template-columns: 100px 1fr; }
  .scoreboard-head .meta { display: none; }
}

/* Findings list */
.findings {
  margin-top: 48px;
  list-style: none; padding: 0;
  border: 1px solid var(--border);
  background: var(--surface);
}
.findings li {
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 24px;
  align-items: start;
}
.findings li:last-child { border-bottom: 0; }
.findings li .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--verdict-orange);
}
.findings li .text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--fg);
}
.findings li .text b { color: var(--parchment); font-weight: 500; }
.findings li .text code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  color: var(--parchment);
  background: var(--bg);
  padding: 1px 6px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
}
@media (max-width: 720px) {
  .findings li { grid-template-columns: 1fr; gap: 8px; }
}

/* ==========================================================================
   Connect (final)
   ========================================================================== */

.connect {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.connect-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--concrete) 1px, transparent 1px),
    linear-gradient(to bottom, var(--concrete) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.18;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.connect-inner {
  position: relative;
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
}
.connect h2 {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.92;
  margin: 24px 0 24px;
  color: var(--parchment);
}
.connect p {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-muted);
  margin: 0 0 40px;
  max-width: 60ch;
  margin-left: auto; margin-right: auto;
}
.connect .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--verdict-orange);
}
.connect-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Feature strip — bold juris-blue panel */
.feature-strip {
  margin-top: 32px;
  background: var(--juris-blue);
  border: 1px solid var(--juris-blue);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 24px 28px;
  align-items: center;
}
@media (max-width: 720px) {
  .feature-strip { grid-template-columns: 1fr; gap: 16px; }
}
.feature-strip .text {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.45;
  color: var(--parchment);
  margin: 0;
  max-width: 56ch;
}
.feature-strip .text strong {
  color: var(--parchment);
  border-bottom: 2px solid var(--verdict-orange);
}
.feature-strip .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--verdict-orange);
  white-space: nowrap;
}

/* Pullquote with orange accent */
.pullquote {
  margin: 32px 0 0;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--verdict-orange);
  font-family: var(--font-body);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.35;
  color: var(--parchment);
  font-weight: 400;
  position: relative;
}
.pullquote::before {
  content: "";
  position: absolute; left: 32px; top: -3px;
  width: 32px; height: 3px;
  background: var(--juris-blue);
}
.pullquote strong { color: var(--verdict-orange); font-weight: 500; }
.pullquote .attr {
  display: block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
}

/* ==========================================================================
   Footer
   ========================================================================== */

footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 48px 0 24px;
}
.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}
@media (max-width: 720px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.foot-brand {
  display: flex; flex-direction: column; gap: 12px;
}
.foot-brand .wordmark { font-size: 20px; }
.foot-brand p {
  font-size: 13px; color: var(--fg-muted); margin: 8px 0 0;
  max-width: 36ch;
}
.foot-col h6 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--verdict-orange);
  margin: 0 0 16px;
  font-weight: 400;
}
.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--fg-muted);
}
.foot-col a:hover { color: var(--parchment); }

.foot-bottom {
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-subtle);
  flex-wrap: wrap;
  gap: 16px;
}
.foot-bottom .pipe { color: var(--verdict-orange); margin: 0 6px; }

/* ==========================================================================
   Reveal animations (subtle, instrument-like)
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(8px); transition: opacity 480ms var(--ease), transform 480ms var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Utility
   ========================================================================== */

.muted    { color: var(--fg-muted); }
.subtle   { color: var(--fg-subtle); }
.pass     { color: var(--ledger-green); }
.warn     { color: var(--verdict-orange); }
.parchment { color: var(--parchment); }

.spacer-32 { height: 32px; }
.spacer-48 { height: 48px; }
.spacer-64 { height: 64px; }
