/* Runite — embedded risk intelligence for financial institutions.
   Direction: dark, monochromatic, grid-heavy, typography-led. One teal
   accent, mono labels, hairline structure. Show the system, don't sell it. */

:root {
  --bg: #0b1014;
  --panel: #0e141a;
  --panel2: #121922;
  --line: #1c2630;
  --line2: #2a3844;
  --text: #dde6ea;
  --muted: #90a1ab;
  --dim: #758791;
  --runite: #66c2b8;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--runite); color: #0b1014; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--runite);
  outline-offset: 3px;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 60;
  background: var(--text);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 10px 16px;
  text-decoration: none;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
}

.wordmark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.9375rem;
  letter-spacing: 0.32em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.wordmark .mark {
  width: 9px;
  height: 9px;
  background: var(--runite);
  flex: none;
}

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 28px;
}
.site-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"]:not(.nav-cta) {
  color: var(--text);
  border-bottom-color: var(--runite);
}
.site-nav .nav-cta {
  color: var(--text);
  border: 1px solid var(--line2);
  padding: 8px 14px;
}
.site-nav .nav-cta:hover {
  border-color: var(--runite);
  color: var(--runite);
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 104px 0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 72px;
  opacity: 0.3;
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  gap: 72px;
  align-items: center;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--runite);
  display: block;
  margin-bottom: 28px;
}

.hero h1 {
  font-weight: 300;
  font-size: clamp(2.3rem, 4.8vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.018em;
  color: #fff;
  max-width: 22ch;
  text-wrap: balance;
}

.hero .lede {
  margin-top: 30px;
  max-width: 62ch;
  font-size: 1.0938rem;
  color: var(--muted);
}

.cta-row {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.btn {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--text);
  color: var(--bg);
  padding: 15px 26px;
  border: 1px solid var(--text);
  transition: background 0.18s ease, color 0.18s ease;
}
.btn:hover { background: transparent; color: var(--text); }

.text-link {
  font-family: var(--mono);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--runite);
  padding-bottom: 3px;
}
.text-link:hover { color: var(--runite); }

.email,
.contact-line a[href^="mailto"] {
  text-transform: none;
}

/* ---------- signal feed panel ---------- */

.feed {
  border: 1px solid var(--line2);
  background: var(--panel);
  overflow: hidden;
}
.feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.feed-head .feed-mode {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--runite);
}
.feed-dot {
  width: 7px;
  height: 7px;
  background: var(--runite);
  animation: feed-pulse 2.2s linear infinite;
}
@keyframes feed-pulse {
  0%, 50% { opacity: 1; }
  50.1%, 100% { opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-dot { animation: none; }
}

.feed-body {
  padding: 8px 0 12px;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.55;
}
.feed-row {
  display: grid;
  grid-template-columns: 58px 48px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 7px 16px;
  color: var(--muted);
  white-space: nowrap;
}
.feed-row .t { color: var(--dim); }
.feed-row .sig { color: var(--runite); }
.feed-row .route { color: var(--dim); }
.feed-row .d { overflow: hidden; text-overflow: ellipsis; }

.js .feed-row {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.js .feed-row.on {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .feed-row { opacity: 1; transform: none; transition: none; }
}

.redact-cell {
  display: inline-block;
  height: 0.8em;
  background: var(--line2);
  vertical-align: baseline;
  border-radius: 1px;
}

.feed-cursor {
  padding: 2px 16px 0;
  color: var(--runite);
}
.feed-cursor::after {
  content: "▍";
  animation: cursor-blink 1.1s steps(1) infinite;
}
@keyframes cursor-blink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .feed-cursor::after { animation: none; }
}

/* ---------- sections ---------- */

.sec { border-bottom: 1px solid var(--line); padding: 88px 0; }
.sec-panel { background: var(--panel); }

.sec-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
}

.rail {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
}
.rail .num {
  display: block;
  font-size: 1.375rem;
  letter-spacing: 0.06em;
  color: var(--dim);
  margin-bottom: 10px;
}

.sec h2 {
  font-weight: 300;
  font-size: clamp(1.6rem, 3.1vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: #fff;
  max-width: 30ch;
  text-wrap: balance;
  margin-bottom: 28px;
}

.sec p {
  max-width: 68ch;
  color: var(--muted);
  margin-bottom: 20px;
}
.sec p:last-child { margin-bottom: 0; }

.sec h3 {
  font-weight: 400;
  font-size: 1.25rem;
  color: var(--text);
  margin: 40px 0 12px;
}
.sec h3 .h3-code {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--runite);
  margin-right: 14px;
  vertical-align: 2px;
}

/* ---------- registry table ---------- */

.registry-wrap {
  margin-top: 44px;
  border: 1px solid var(--line2);
  overflow-x: auto;
}
.registry {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}
.registry thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  text-align: left;
  padding: 12px 18px;
  background: var(--panel2);
  border-bottom: 1px solid var(--line2);
}
.registry td,
.registry tbody th {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--muted);
  vertical-align: top;
  text-align: left;
}
.registry tbody tr:last-child td,
.registry tbody tr:last-child th { border-bottom: none; }
.registry .code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--runite);
  white-space: nowrap;
}
.registry .name {
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.registry .dom {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  white-space: nowrap;
}
.registry-compact { min-width: 0; }
.registry-compact .name { white-space: normal; }

/* ---------- phases / steps ---------- */

.steps { margin-top: 40px; border-top: 1px solid var(--line2); }
.step {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.step .tag {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  padding-top: 4px;
}
.step h3 { margin: 0 0 6px; font-size: 1.125rem; }
.step p { font-size: 0.9375rem; margin: 0; }

/* ---------- segment blocks (who we serve) ---------- */

.segments {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line2);
}
.segment {
  padding: 32px 34px 36px;
  border-bottom: 1px solid var(--line2);
}
.segment:nth-child(odd) { border-right: 1px solid var(--line2); }
.segment:nth-last-child(-n+2) { border-bottom: none; }
.segment .seg-label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  display: block;
  margin-bottom: 14px;
}
.segment h3 { margin: 0 0 10px; font-size: 1.125rem; }
.segment p { font-size: 0.9375rem; margin: 0; max-width: none; }

/* ---------- governance lists ---------- */

.gov-list { margin-top: 30px; max-width: 68ch; }
.gov-list li {
  list-style: none;
  padding: 16px 0 16px 32px;
  border-bottom: 1px solid var(--line);
  position: relative;
  color: var(--muted);
  font-size: 0.9375rem;
}
.gov-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 25px;
  width: 8px;
  height: 8px;
  background: var(--runite);
}
.gov-list li strong { color: var(--text); font-weight: 500; }

/* ---------- schematic ---------- */

.schematic-wrap {
  margin-top: 44px;
  border: 1px solid var(--line2);
  background: var(--panel);
  overflow-x: auto;
}
.schematic-wrap svg {
  display: block;
  min-width: 860px;
  width: 100%;
  height: auto;
}
.schematic-caption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 12px 18px;
  border-top: 1px solid var(--line);
}

/* ---------- offerings ---------- */

.offer-list { margin-top: 44px; border-top: 1px solid var(--line2); }
.offer {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}
.offer .off-code {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--runite);
  padding-top: 5px;
}
.offer h3 { margin: 0 0 10px; font-size: 1.25rem; font-weight: 400; color: var(--text); }
.offer p { font-size: 0.9375rem; color: var(--muted); margin: 0 0 16px; max-width: 68ch; }
.offer p:last-child { margin-bottom: 0; }

.offer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}
.offer-meta b { color: var(--text); font-weight: 500; }

/* ---------- engagement timeline ---------- */

.timeline {
  display: flex;
  gap: 2px;
  margin-top: 40px;
}
.tl-seg { min-width: 0; }
.tl-seg .tl-bar { height: 6px; background: var(--line2); margin-bottom: 14px; }
.tl-seg .tl-phase {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
  display: block;
}
.tl-seg .tl-when {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: var(--dim);
}
.tl-a { flex: 1; }
.tl-b { flex: 3.7; }
.tl-b .tl-bar { background: #3a4c5b; }
.tl-c { flex: 5; }
.tl-c .tl-bar { background: var(--runite); }
.timeline + .offer-meta { margin-top: 28px; }

/* ---------- coverage matrix ---------- */

.matrix { min-width: 860px; }
.matrix th, .matrix td { text-align: center; }
.matrix th:nth-child(-n+2), .matrix td:nth-child(-n+2) { text-align: left; }
.matrix .dot, .matrix-legend .dot { color: var(--runite); font-size: 0.8125rem; }
.matrix .dot-open, .matrix-legend .dot-open { color: var(--dim); font-size: 0.8125rem; }
p.matrix-legend {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}

/* ---------- case file panel ---------- */

.casefile {
  border: 1px solid var(--line2);
  background: var(--panel);
  max-width: 640px;
  margin-top: 44px;
  overflow: hidden;
}
.cf-body { padding: 10px 0 14px; }
.cf-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  padding: 8px 16px;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.cf-row .k {
  color: var(--dim);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding-top: 1px;
}
.cf-row .v { color: var(--muted); }
.cf-row .v b { color: var(--text); font-weight: 500; }
.conf-blocks { display: inline-flex; gap: 3px; margin-left: 8px; vertical-align: middle; }
.conf-blocks span { width: 14px; height: 8px; background: var(--line2); }
.conf-blocks span.on { background: var(--runite); }

/* ---------- scenarios ---------- */

.scenarios {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--line2);
}
.scenario {
  padding: 30px 32px 34px;
  border-bottom: 1px solid var(--line2);
  transition: background 0.15s ease;
}
.scenario:nth-child(odd) { border-right: 1px solid var(--line2); }
.scenario:nth-last-child(-n+2) { border-bottom: none; }
.scenario:hover { background: rgba(255, 255, 255, 0.015); }
.scenario .sc-id {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--runite);
  display: block;
  margin-bottom: 12px;
}
.scenario h3 { margin: 0 0 6px; font-size: 1.125rem; font-weight: 400; color: var(--text); }
.scenario dl { margin: 0; }
.scenario dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  margin-top: 14px;
}
.scenario dd { font-size: 0.9063rem; color: var(--muted); margin: 3px 0 0; }

/* ---------- hover states ---------- */

.registry tbody tr { transition: background 0.15s ease; }
.registry tbody tr:hover td,
.registry tbody tr:hover th { background: rgba(102, 194, 184, 0.04); }
.segment { transition: background 0.15s ease; }
.segment:hover { background: rgba(255, 255, 255, 0.015); }

/* ---------- closing CTA band ---------- */

.close-band {
  padding: 100px 0;
  border-bottom: 1px solid var(--line);
}
.close-band h2 {
  font-weight: 300;
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.014em;
  color: #fff;
  max-width: 24ch;
  text-wrap: balance;
  margin-bottom: 26px;
}
.close-band .sub {
  color: var(--muted);
  max-width: 62ch;
  margin-bottom: 38px;
}
.contact-line {
  margin-top: 26px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.contact-line a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--runite);
}
.contact-line a:hover { color: var(--runite); }

/* ---------- footer ---------- */

.site-foot {
  background: var(--bg);
  color: var(--dim);
  padding: 48px 0 56px;
  font-size: 0.875rem;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 40px 72px;
}
.site-foot .foot-brand { flex: 1 1 300px; }
.site-foot .foot-note {
  max-width: 44ch;
  line-height: 1.65;
  margin-top: 18px;
  color: var(--dim);
}
.foot-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.foot-col .foot-h {
  color: var(--dim);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  margin-bottom: 4px;
}
.site-foot a { color: var(--muted); text-decoration: none; }
.site-foot a:hover { color: var(--text); }
.site-foot .legal {
  flex-basis: 100%;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- page hero (interior pages) ---------- */

.page-hero {
  position: relative;
  padding: 96px 0 68px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px);
  background-size: 100% 72px;
  opacity: 0.22;
  pointer-events: none;
}
.page-hero .wrap { position: relative; }
.page-hero h1 {
  font-weight: 300;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.016em;
  color: #fff;
  max-width: 26ch;
  text-wrap: balance;
}
.page-hero .lede {
  margin-top: 26px;
  max-width: 64ch;
  font-size: 1.0938rem;
  color: var(--muted);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .feed { max-width: 640px; }
}

@media (max-width: 1020px) {
  .site-nav { gap: 6px 16px; }
  .site-nav a { font-size: 0.6875rem; }
  .site-nav .nav-cta { padding: 7px 12px; }
}

@media (max-width: 880px) {
  .site-head .wrap {
    flex-wrap: wrap;
    padding-top: 10px;
    padding-bottom: 10px;
    row-gap: 4px;
  }
  .site-nav { gap: 6px 14px; }
  .site-nav a { font-size: 0.6875rem; }
  .site-nav .nav-cta { padding: 7px 10px; }
  .sec-grid { grid-template-columns: 1fr; gap: 24px; }
  .rail .num { display: inline; margin-right: 12px; }
  .hero { padding: 68px 0; }
  .sec { padding: 60px 0; }
  .close-band { padding: 72px 0; }
  .page-hero { padding: 68px 0 52px; }
  .segments { grid-template-columns: 1fr; }
  .segment:nth-child(odd) { border-right: none; }
  .segment:nth-last-child(-n+2) { border-bottom: 1px solid var(--line2); }
  .segment:last-child { border-bottom: none; }
  .scenarios { grid-template-columns: 1fr; }
  .scenario:nth-child(odd) { border-right: none; }
  .scenario:nth-last-child(-n+2) { border-bottom: 1px solid var(--line2); }
  .scenario:last-child { border-bottom: none; }
  .step, .offer { grid-template-columns: 1fr; gap: 6px; }
  .timeline { flex-direction: column; gap: 18px; }
}

@media (max-width: 560px) {
  .feed-row {
    grid-template-columns: 58px 48px minmax(0, 1fr);
    row-gap: 2px;
    white-space: normal;
  }
  .feed-row .d {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
  .feed-row .route { grid-column: 3; }
}

@media (max-width: 420px) {
  .feed-body { font-size: 0.6875rem; }
  .feed-row { grid-template-columns: 52px 44px minmax(0, 1fr); padding: 7px 12px; gap: 10px; row-gap: 2px; }
  .cf-row { grid-template-columns: 92px 1fr; gap: 10px; padding: 8px 12px; }
}
