/* =========================================================
   EDIConnections — shared stylesheet
   Drop-in for landing + 3 portal logins.
   Body class controls theme:  theme-admin | theme-clients | theme-partners
   ========================================================= */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-variable.woff2') format('woff2');
}

:root {
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;

  /* neutral system */
  --ink: oklch(0.16 0.01 260);
  --ink-2: oklch(0.32 0.01 260);
  --ink-3: oklch(0.52 0.008 260);
  --line: oklch(0.92 0.005 260);
  --line-2: oklch(0.86 0.008 260);
  --paper: oklch(0.99 0.003 260);
  --paper-2: oklch(0.97 0.004 260);

  /* form-control defaults (overridden by themes) */
  --accent: oklch(0.45 0.18 245);
  --accent-on: oklch(0.99 0.003 260);
  --accent-soft: oklch(0.45 0.18 245 / 0.16);

  --d-input-h: 44px;
  --d-radius: 10px;
  --d-gap: 1rem;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* =========================================================
   Landing page (index.php)
   ========================================================= */
.landing { background: var(--paper); color: var(--ink); }

.land-nav {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: oklch(0.99 0.003 260 / 0.85);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.wordmark {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark img { height: 22px; width: auto; }
/* Homepage nav logo — matches the Admin login logo (height:50px) */
.land-nav .wordmark img { height: 50px; }
.wordmark .mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--ink);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}
.wordmark .mark::after {
  content: "";
  position: absolute;
  top: 4px; right: 4px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: oklch(0.62 0.16 245);
}

.land-nav-links {
  display: flex; gap: 28px;
  font-size: 14px;
  color: var(--ink-2);
}
.land-nav-links a:hover { color: var(--ink); }
.land-nav-actions { display: flex; gap: 8px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all .15s ease;
  text-decoration: none;
}
.btn-ghost   { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: oklch(0.95 0.005 260); }
.btn-outline { background: var(--paper); color: var(--ink); border-color: var(--line-2); }
.btn-outline:hover { background: oklch(0.97 0.004 260); }
.btn-dark    { background: var(--ink); color: var(--paper); }
.btn-dark:hover { background: oklch(0.10 0.01 260); }

.hero {
  padding: 96px 48px 64px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 24px;
}
.eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.66 0.14 145);
  box-shadow: 0 0 0 4px oklch(0.66 0.14 145 / 0.18);
}
h1.display {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0 0 20px;
  text-wrap: balance;
}
h1.display em {
  font-style: normal;
  background: linear-gradient(100deg,
    oklch(0.55 0.18 240) 0%,
    oklch(0.62 0.16 165) 50%,
    oklch(0.66 0.16 55) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 52ch;
  margin: 0 0 32px;
}
.hero-actions { display: flex; gap: 10px; align-items: center; }
.hero-actions .btn { height: 42px; padding: 0 18px; font-size: 14px; }

/* Hero visual: doc flow */
.flow-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  box-shadow:
    0 1px 0 oklch(0.99 0 0) inset,
    0 30px 60px -30px oklch(0.2 0.02 260 / 0.18),
    0 8px 24px -12px oklch(0.2 0.02 260 / 0.10);
  overflow: hidden;
}
.flow-card::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(800px 200px at 80% 0%, oklch(0.6 0.16 240 / 0.06), transparent 60%),
    radial-gradient(600px 200px at 20% 100%, oklch(0.66 0.14 60 / 0.06), transparent 60%);
  pointer-events: none;
}
.flow-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
  position: relative;
}
.flow-head .ttl {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.flow-head .live {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: oklch(0.5 0.12 145);
}
.flow-head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.66 0.18 145);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.flow-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  position: relative;
}
.flow-node {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 84px;
}
.flow-node .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.flow-node .name { font-size: 13.5px; font-weight: 500; letter-spacing: -0.005em; }
.flow-node.partner { border-color: oklch(0.86 0.05 60);  background: oklch(0.985 0.012 70); }
.flow-node.partner .name { color: oklch(0.38 0.14 50); }
.flow-node.platform { border-color: oklch(0.86 0.02 260); background: oklch(0.20 0.02 260); color: oklch(0.96 0.005 260); }
.flow-node.platform .lbl { color: oklch(0.7 0.04 260); }
.flow-node.platform .name { color: oklch(0.96 0.005 260); }
.flow-node.client { border-color: oklch(0.86 0.05 160); background: oklch(0.985 0.012 160); }
.flow-node.client .name { color: oklch(0.38 0.14 160); }
.flow-arrow {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  color: var(--ink-3);
  padding: 0 6px;
}
.flow-stream {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  display: flex; flex-direction: column; gap: 6px;
  background: oklch(0.985 0.003 260);
}
.flow-stream .row { display: flex; gap: 12px; color: var(--ink-2); }
.flow-stream .row .t { color: var(--ink-3); width: 64px; flex-shrink: 0; }
.flow-stream .row .code { color: oklch(0.4 0.16 240); width: 56px; flex-shrink: 0; }
.flow-stream .row .msg { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-stream .row .ok { color: oklch(0.5 0.16 150); }

/* Portals */
.portals-section { padding: 64px 48px 32px; max-width: 1280px; margin: 0 auto; }
.section-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0;
  line-height: 1.1;
}
.section-head .sub {
  font-size: 14px;
  color: var(--ink-3);
  max-width: 38ch;
  text-align: right;
}
.portals {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.portal-card {
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex; flex-direction: column;
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
  text-decoration: none;
  background: var(--paper);
}
.portal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px -24px oklch(0.2 0.02 260 / 0.22);
}
.portal-preview { aspect-ratio: 16 / 11; position: relative; overflow: hidden; }
.portal-meta {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line);
}
.portal-meta .role {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  display: flex; justify-content: space-between; align-items: center;
}
.portal-meta .role .url { color: var(--ink-2); }
.portal-meta .title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.018em;
  display: flex; justify-content: space-between; align-items: center;
}
.portal-meta .title .arr {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-3);
  transition: transform .25s ease, color .25s ease;
}
.portal-card:hover .title .arr { transform: translateX(4px); }
.portal-meta .desc { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }

/* admin preview */
.preview-admin {
  background: oklch(0.18 0.02 260);
  color: oklch(0.96 0.005 260);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.preview-admin .px-row { display: flex; justify-content: space-between; gap: 8px; }
.preview-admin .px-row .l { color: oklch(0.7 0.05 230); }
.preview-admin .px-row .v { color: oklch(0.86 0.04 230); }
.preview-admin .px-bars { display: flex; align-items: end; gap: 3px; height: 36px; margin-top: 8px; }
.preview-admin .px-bars span { flex: 1; background: oklch(0.74 0.14 220); border-radius: 1px; opacity: .7; }
.preview-admin .px-status { display: flex; gap: 6px; margin-top: 8px; }
.preview-admin .px-status .pill { background: oklch(0.28 0.05 230); padding: 2px 6px; border-radius: 3px; color: oklch(0.86 0.08 220); }

/* clients preview */
.preview-clients {
  background: oklch(0.985 0.012 160);
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.preview-clients .pc-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: oklch(0.4 0.04 160);
}
.preview-clients .pc-num {
  font-size: 28px; font-weight: 600;
  color: oklch(0.32 0.14 160);
  letter-spacing: -0.02em;
}
.preview-clients .pc-bar { height: 28px; background: oklch(0.94 0.04 160); border-radius: 4px; display: flex; overflow: hidden; }
.preview-clients .pc-bar > span:nth-child(1) { background: oklch(0.55 0.14 160); flex: 64; }
.preview-clients .pc-bar > span:nth-child(2) { background: oklch(0.72 0.10 160); flex: 24; }
.preview-clients .pc-bar > span:nth-child(3) { background: oklch(0.84 0.06 60); flex: 12; }
.preview-clients .pc-rows { display: flex; flex-direction: column; gap: 4px; font-family: var(--font-mono); font-size: 9.5px; }
.preview-clients .pc-rows .r { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dashed oklch(0.86 0.03 160); }
.preview-clients .pc-rows .r .id { color: oklch(0.4 0.04 160); }
.preview-clients .pc-rows .r .ok { color: oklch(0.45 0.14 160); }

/* partners preview */
.preview-partners {
  background: oklch(0.97 0.025 75);
  padding: 14px;
  display: flex; flex-direction: column; gap: 6px;
}
.preview-partners .pp-head { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; color: oklch(0.4 0.06 60); }
.preview-partners .pp-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; margin-top: 4px; }
.preview-partners .pp-grid span { aspect-ratio: 1; background: oklch(0.88 0.06 75); border-radius: 2px; }
.preview-partners .pp-grid span.hot  { background: oklch(0.65 0.17 50); }
.preview-partners .pp-grid span.warm { background: oklch(0.78 0.12 65); }
.preview-partners .pp-queue { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; font-family: var(--font-mono); font-size: 9.5px; color: oklch(0.35 0.05 60); }
.preview-partners .pp-queue .q { display: flex; justify-content: space-between; }

/* Metrics strip */
.metrics { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 32px auto 0; max-width: 1280px; }
.metrics-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.metric { padding: 28px 24px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.metric:last-child { border-right: 0; }
.metric .k { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); }
.metric .v { font-size: 30px; font-weight: 600; letter-spacing: -0.025em; font-feature-settings: "tnum"; }
.metric .d { font-size: 12.5px; color: var(--ink-3); }

/* Features grid */
.features { padding: 64px 48px 96px; max-width: 1280px; margin: 0 auto; }
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.feat { background: var(--paper); padding: 28px; display: flex; flex-direction: column; gap: 8px; }
.feat .num { font-family: var(--font-mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.08em; }
.feat h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.feat p  { font-size: 14px; color: var(--ink-3); line-height: 1.55; margin: 0; }

footer.land-foot {
  padding: 36px 48px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px;
  color: var(--ink-3);
}
footer.land-foot .l { display: flex; gap: 20px; align-items: center; }
footer.land-foot .r { display: flex; gap: 20px; }

/* =========================================================
   Platform page (platform.php)
   Reuses the landing tokens; partner = amber, platform = ink,
   client = emerald — same palette as the hero flow-card.
   ========================================================= */
.land-nav-links a.is-active { color: var(--ink); font-weight: 500; }

.plat-section { padding: 72px 48px; max-width: 1280px; margin: 0 auto; }
.plat-section + .plat-section { padding-top: 24px; }
.plat-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 10px;
}

/* Hero visual: portal form -> X12 translation */
.xlate-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
  position: relative;
}
.xlate-pane {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  min-width: 0;
}
.xlate-pane .lbl {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.xlate-pane.form { border-color: oklch(0.86 0.05 60); background: oklch(0.985 0.012 70); }
.xlate-pane.form .lbl { color: oklch(0.45 0.10 55); }
.xlate-field { display: flex; flex-direction: column; gap: 3px; }
.xlate-field .k { font-size: 10.5px; color: oklch(0.45 0.06 60); }
.xlate-field .v {
  font-size: 12px;
  background: var(--paper);
  border: 1px solid oklch(0.88 0.04 65);
  border-radius: 5px;
  padding: 4px 7px;
  color: var(--ink);
}
.xlate-lines { font-family: var(--font-mono); font-size: 10.5px; display: flex; flex-direction: column; gap: 3px; color: oklch(0.38 0.08 55); }
.xlate-lines .r { display: flex; justify-content: space-between; border-bottom: 1px dashed oklch(0.88 0.04 65); padding: 2px 0; }
.xlate-btn {
  margin-top: auto;
  align-self: start;
  font-size: 11px; font-weight: 600;
  background: oklch(0.55 0.16 50);
  color: oklch(0.99 0.01 70);
  border-radius: 5px;
  padding: 4px 10px;
}
.xlate-pane.x12 { background: oklch(0.20 0.02 260); border-color: oklch(0.30 0.02 260); }
.xlate-pane.x12 .lbl { color: oklch(0.7 0.04 260); }
.xlate-pane.x12 pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  color: oklch(0.86 0.04 230);
  white-space: pre-wrap;
  word-break: break-all;
}
.xlate-pane.x12 pre b { color: oklch(0.80 0.13 160); font-weight: 600; }

/* Three roles */
.role-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.role-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  display: flex; flex-direction: column; gap: 10px;
  background: var(--paper);
  border-top-width: 4px;
}
.role-card.admin   { border-top-color: oklch(0.20 0.02 260); }
.role-card.client  { border-top-color: oklch(0.55 0.14 160); }
.role-card.partner { border-top-color: oklch(0.65 0.17 50); }
.role-card .who {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.role-card h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.018em; margin: 0; }
.role-card p  { font-size: 14px; color: var(--ink-3); line-height: 1.55; margin: 0; }
.role-card ul { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

/* Pipeline steps */
.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
.pipe-step { background: var(--paper); padding: 24px 20px; display: flex; flex-direction: column; gap: 8px; }
.pipe-step .num { font-family: var(--font-mono); font-size: 11px; color: oklch(0.45 0.18 245); letter-spacing: 0.08em; }
.pipe-step h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.pipe-step p  { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; margin: 0; }

/* Non-EDI bridge */
.bridge {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}
.bridge h2, .plat-cta h2 {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 0 0 16px;
}
.bridge .lede { font-size: 16.5px; margin-bottom: 24px; }
.needs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.needs-col { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.needs-col .k {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.needs-col.yes { background: oklch(0.985 0.012 160); border-color: oklch(0.86 0.05 160); }
.needs-col.yes .k { color: oklch(0.42 0.12 160); }
.needs-col.no  { background: var(--paper-2); }
.needs-col.no .k { color: var(--ink-3); }
.needs-col ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; line-height: 1.8; color: var(--ink-2); }
.needs-col.yes li::before { content: "✓  "; color: oklch(0.5 0.14 150); }
.needs-col.no  li::before { content: "—  "; color: var(--ink-3); }
.needs-col.no li { text-decoration: line-through; text-decoration-color: var(--line-2); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 16px;
  padding-bottom: 22px;
  position: relative;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: 17px; top: 36px; bottom: 0;
  width: 2px;
  background: var(--line);
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::before { display: none; }
.timeline .dot {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}
.timeline .dot.partner  { background: oklch(0.985 0.012 70);  border-color: oklch(0.86 0.05 60);  color: oklch(0.45 0.14 50); }
.timeline .dot.platform { background: oklch(0.20 0.02 260);   border-color: oklch(0.20 0.02 260); color: oklch(0.96 0.005 260); }
.timeline .dot.client   { background: oklch(0.985 0.012 160); border-color: oklch(0.86 0.05 160); color: oklch(0.38 0.14 160); }
.timeline .who {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
}
.timeline h4 { margin: 2px 0 4px; font-size: 15.5px; font-weight: 600; letter-spacing: -0.012em; }
.timeline p  { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }

/* Document table */
.doc-table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.doc-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  background: var(--paper-2);
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}
.doc-table td { padding: 14px 18px; border-bottom: 1px solid var(--line); color: var(--ink-2); vertical-align: top; line-height: 1.5; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table .code {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: oklch(0.4 0.16 240);
  white-space: nowrap;
}
.doc-table .code small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11px; }
.doc-table td strong { color: var(--ink); font-weight: 600; }

/* Closing call to action */
.plat-cta {
  margin: 0 auto 96px;
  max-width: 1184px;
  border-radius: 20px;
  padding: 48px;
  background: oklch(0.20 0.02 260);
  color: oklch(0.96 0.005 260);
  display: flex; justify-content: space-between; align-items: center; gap: 32px;
  position: relative;
  overflow: hidden;
}
.plat-cta::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 220px at 90% 0%, oklch(0.6 0.16 240 / 0.22), transparent 60%),
    radial-gradient(500px 200px at 0% 100%, oklch(0.66 0.14 60 / 0.16), transparent 60%);
  pointer-events: none;
}
.plat-cta > * { position: relative; }
.plat-cta h2 { margin-bottom: 8px; }
.plat-cta p { margin: 0; color: oklch(0.78 0.02 260); font-size: 15px; max-width: 56ch; line-height: 1.55; }
.plat-cta .actions { display: flex; gap: 10px; flex-shrink: 0; }
.plat-cta .btn { height: 42px; padding: 0 18px; font-size: 14px; }
.plat-cta .btn-light { background: oklch(0.99 0.003 260); color: var(--ink); }
.plat-cta .btn-light:hover { background: oklch(0.93 0.005 260); }
.plat-cta .btn-line { background: transparent; border-color: oklch(0.45 0.02 260); color: oklch(0.96 0.005 260); }
.plat-cta .btn-line:hover { background: oklch(0.26 0.02 260); }

@media (max-width: 980px) {
  .plat-section { padding: 48px 28px; }
  .role-grid, .bridge, .needs { grid-template-columns: 1fr; }
  .bridge { gap: 32px; }
  .pipeline { grid-template-columns: 1fr; }
  .plat-cta { flex-direction: column; align-items: start; margin: 0 16px 64px; padding: 32px 24px; }
}
@media (max-width: 700px) {
  /* Document table stacks into one card per row */
  .doc-table { min-width: 0; }
  .doc-table thead { display: none; }
  .doc-table tr { display: block; padding: 16px 18px; border-bottom: 1px solid var(--line); }
  .doc-table tr:last-child { border-bottom: 0; }
  .doc-table td { display: block; padding: 4px 0; border-bottom: 0; }
  .doc-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-3);
    margin: 8px 0 2px;
  }
}
@media (max-width: 560px) {
  /* Shared landing nav (index.php + platform.php) on phones */
  .land-nav { padding: 0 16px; }
  .land-nav .wordmark img { height: 34px; }
  .land-nav-actions .btn { white-space: nowrap; padding: 0 10px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-actions .btn { white-space: nowrap; }
  .xlate-grid { grid-template-columns: 1fr; }
  .xlate-grid .flow-arrow { transform: rotate(90deg); padding: 6px 0; }
  .plat-cta .actions { flex-direction: column; width: 100%; }
  footer.land-foot { flex-direction: column; gap: 16px; align-items: start; padding: 28px; }
}

/* =========================================================
   Connectors page (connectors.php)
   Reuses the Platform page sections; adds the ERP card grid,
   the ERP pane in the hero flow-card and document status pills.
   ========================================================= */
.xlate-pane.erp { border-color: oklch(0.86 0.05 160); background: oklch(0.985 0.012 160); }
.xlate-pane.erp .lbl { color: oklch(0.42 0.12 160); }
.xlate-pane.erp .xlate-field .k { color: oklch(0.42 0.06 160); }
.xlate-pane.erp .xlate-field .v { border-color: oklch(0.88 0.04 160); }
.xlate-pane.erp .xlate-lines { color: oklch(0.36 0.08 160); }
.xlate-pane.erp .xlate-lines .r { border-bottom-color: oklch(0.88 0.04 160); }
.erp-badge {
  margin-top: auto;
  align-self: start;
  font-size: 11px; font-weight: 600;
  background: oklch(0.50 0.13 160);
  color: oklch(0.99 0.01 160);
  border-radius: 5px;
  padding: 4px 10px;
}

.erp-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.erp-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 20px;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 10px;
}
.erp-card .erp-mark {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.04em;
  background: oklch(0.20 0.02 260);
  color: oklch(0.96 0.005 260);
}
.erp-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.erp-card p  { font-size: 13.5px; color: var(--ink-3); line-height: 1.55; margin: 0; }
.erp-card.yours { border-style: dashed; border-color: var(--line-2); background: var(--paper-2); }
.erp-card.yours .erp-mark { background: var(--accent-soft); color: var(--accent); font-size: 20px; }
.erp-card.yours a { color: var(--accent); text-decoration: none; font-weight: 500; white-space: nowrap; }
.erp-card.yours a:hover { text-decoration: underline; }

.erp-status {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 3px 10px;
  border: 1px solid;
  white-space: nowrap;
}
.erp-status.ready  { background: oklch(0.985 0.012 160); border-color: oklch(0.86 0.05 160); color: oklch(0.40 0.12 160); }
.erp-status.scoped { background: var(--paper-2); border-color: var(--line-2); color: var(--ink-3); }

@media (max-width: 1180px) {
  .erp-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 980px) {
  .erp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .erp-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Customers page (customer.php)
   Reuses .hero / .flow-card / .plat-section. Client (supplier)
   stories use the emerald client accent, vendor stories amber.
   ========================================================= */

/* Hero visual: the two sides at a glance */
.side-list { position: relative; display: flex; flex-direction: column; gap: 12px; }
.side-item {
  display: flex; flex-direction: column; gap: 8px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 12px;
  padding: 16px 18px;
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: background 0.15s ease;
}
.side-item:hover { background: var(--paper-2); }
.side-item.client { border-left-color: oklch(0.55 0.14 160); }
.side-item.vendor { border-left-color: oklch(0.65 0.17 50); }
.side-item .who {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.side-item.client .who { color: oklch(0.42 0.12 160); }
.side-item.vendor .who { color: oklch(0.48 0.13 50); }
.side-item .from-to { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.side-item .from-to .arr { color: var(--ink-3); font-weight: 400; }
.side-item p { margin: 0; font-size: 13.5px; color: var(--ink-3); line-height: 1.55; }
.side-item .docs { font-family: var(--font-mono); font-size: 12px; color: oklch(0.4 0.16 240); }

/* Story rows: header column + three aligned columns */
.story-list { display: flex; flex-direction: column; gap: 16px; }
.story-row {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) 2.6fr;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 16px;
  background: var(--paper);
  overflow: hidden;
}
.story-row.client { border-left-color: oklch(0.55 0.14 160); }
.story-row.vendor { border-left-color: oklch(0.65 0.17 50); }
.story-head {
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper-2);
  border-right: 1px solid var(--line);
}
.story-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.story-row.client .story-tag { color: oklch(0.42 0.12 160); }
.story-row.vendor .story-tag { color: oklch(0.48 0.13 50); }
.story-head h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; margin: 0; }
.story-docs {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: oklch(0.4 0.16 240);
  line-height: 1.5;
}
.story-docs .k {
  display: block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.story-cols { display: grid; grid-template-columns: repeat(3, 1fr); }
.story-block { padding: 28px 24px; }
.story-block + .story-block { border-left: 1px solid var(--line); }
.story-block .k {
  font-family: var(--font-mono);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.story-block p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.6; }
.story-block a { color: var(--accent); text-decoration: none; font-weight: 500; }
.story-block a:hover { text-decoration: underline; }

@media (max-width: 1100px) {
  .story-row { grid-template-columns: 1fr; }
  .story-head { border-right: 0; border-bottom: 1px solid var(--line); }
  .story-docs { margin-top: 4px; }
}
@media (max-width: 760px) {
  .story-cols { grid-template-columns: 1fr; }
  .story-block + .story-block { border-left: 0; border-top: 1px solid var(--line); }
  .story-head, .story-block { padding: 20px 18px; }
}

/* =========================================================
   Info pages (status.php, security.php, privacy.php, terms.php)
   Single-column reading layout; .wide for card grids, .legal
   for long-form policies with an on-page contents list.
   ========================================================= */
.info-page { max-width: 820px; margin: 0 auto; padding: 80px 48px 96px; }
.info-page.wide { max-width: 1184px; }
.info-head { margin-bottom: 36px; }
.info-head h1 {
  font-size: clamp(34px, 4.2vw, 48px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 16px;
  text-wrap: balance;
}
.info-lede { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; margin: 0; }
.info-meta { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin: -6px 0 16px; }

.info-section { padding-top: 32px; scroll-margin-top: 80px; }
.info-section h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin: 0 0 12px; }
.info-section h3 { font-size: 15.5px; font-weight: 600; margin: 18px 0 6px; }
.info-section p, .info-section li { font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.info-section p { margin: 0 0 12px; }
.info-section ul { margin: 0 0 12px; padding-left: 22px; }
.info-section li { margin-bottom: 6px; }
.info-section a:not(.btn) { color: var(--accent); text-decoration: none; font-weight: 500; }
.info-section a:not(.btn):hover { text-decoration: underline; }
.info-section strong { color: var(--ink); font-weight: 600; }
.info-section .btn { height: 40px; padding: 0 16px; font-size: 14px; margin-top: 4px; }

/* Legal pages: contents list + numbered sections divided by rules */
.info-toc {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper-2);
  margin-bottom: 8px;
}
.info-toc a {
  font-size: 13px;
  color: var(--ink-2);
  text-decoration: none;
  border: 1px solid var(--line-2);
  background: var(--paper);
  border-radius: 999px;
  padding: 4px 12px;
}
.info-toc a:hover { color: var(--ink); border-color: var(--ink-3); }
.info-page.legal .info-section { border-top: 1px solid var(--line); margin-top: 32px; }
.info-page.legal .info-section:first-of-type { border-top: 0; margin-top: 8px; }

/* Security cards */
.sec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.sec-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
  background: var(--paper);
  display: flex; flex-direction: column; gap: 8px;
}
.sec-card .num { font-family: var(--font-mono); font-size: 11px; color: oklch(0.45 0.18 245); letter-spacing: 0.08em; }
.sec-card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.sec-card p  { font-size: 14px; color: var(--ink-3); line-height: 1.55; margin: 0; }
.info-page.wide .info-section { max-width: 760px; }

/* Status */
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: currentColor; }
.status-banner {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid;
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.status-banner .status-dot { width: 12px; height: 12px; box-shadow: 0 0 0 5px color-mix(in oklch, currentColor 20%, transparent); }
.status-banner .status-title { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.status-banner .status-time { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.status-banner.ok       { color: oklch(0.55 0.15 150); background: oklch(0.985 0.012 150); border-color: oklch(0.86 0.05 150); }
.status-banner.degraded { color: oklch(0.65 0.15 70);  background: oklch(0.985 0.015 80);  border-color: oklch(0.86 0.06 75); }
.status-banner.down     { color: oklch(0.55 0.19 27);  background: oklch(0.985 0.012 27);  border-color: oklch(0.86 0.05 27); }

.status-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.status-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 22px;
  background: var(--paper);
}
.status-list li + li { border-top: 1px solid var(--line); }
.status-list .name { font-size: 15px; font-weight: 600; color: var(--ink); }
.status-list .desc { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}
.status-pill .status-dot { width: 8px; height: 8px; }
.status-pill.ok       { color: oklch(0.45 0.13 150); }
.status-pill.degraded { color: oklch(0.52 0.13 65); }
.status-pill.down     { color: oklch(0.50 0.19 27); }
.status-pill.unknown  { color: var(--ink-3); }

@media (max-width: 980px) {
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .info-page { padding: 48px 16px 64px; }
  .sec-grid { grid-template-columns: 1fr; }
  .status-list li { padding: 14px 16px; }
}

/* =========================================================
   Shared login layout
   ========================================================= */
.login {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  overflow: hidden;
}
.login-aside {
  position: relative;
  overflow: hidden;
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-aside .a-top {
  display: flex; justify-content: space-between; align-items: center;
  position: relative;
  z-index: 2;
}
.login-aside .a-back {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  display: inline-flex; align-items: center; gap: 6px;
}
.login-aside .a-content { position: relative; z-index: 2; }
.login-aside .a-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
  display: inline-flex; align-items: center; gap: 8px;
}
.login-aside h2 {
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 14px;
  text-wrap: balance;
}
.login-aside .a-lede {
  font-size: 15.5px;
  line-height: 1.55;
  max-width: 42ch;
  margin: 0;
}
.login-aside .a-foot {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  position: relative;
  z-index: 2;
  display: flex; justify-content: space-between; align-items: end;
}

.login-form-side {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  overflow-y: auto;
}
.login-form {
  width: 100%;
  max-width: 380px;
  display: flex; flex-direction: column;
  gap: var(--d-gap);
}
.login-form .fhead { margin-bottom: 8px; }
.login-form .fhead .role-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 12px;
}
.login-form .fhead h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 4px;
}
.login-form .fhead p {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0;
}

.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-group label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-2);
  display: flex; justify-content: space-between;
}
.field-group label a { font-weight: 400; color: var(--ink-3); }
.field-group label a:hover { color: var(--ink); text-decoration: underline; }

.input {
  height: var(--d-input-h);
  border-radius: var(--d-radius);
  border: 1px solid var(--line-2);
  background: var(--paper);
  padding: 0 12px;
  font-size: 14px;
  color: var(--ink);
  width: 100%;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: oklch(0.7 0.005 260); }
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 4px 6px;
}
.pw-toggle:hover { color: var(--ink); }

.row-check {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.row-check label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink-2);
}
.row-check input[type="checkbox"] { accent-color: var(--accent); }

.btn-primary {
  height: var(--d-input-h);
  border-radius: var(--d-radius);
  border: 0;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  background: var(--accent);
  color: var(--accent-on);
  transition: transform .08s, filter .15s;
  width: 100%;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }

.helper-row { margin-top: 8px; font-size: 13px; color: var(--ink-3); text-align: center; }
.helper-row a { color: var(--accent); font-weight: 500; }
.helper-row a:hover { text-decoration: underline; }

.legal-row {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Alerts */
.alert {
  border-radius: var(--d-radius);
  padding: 10px 14px;
  font-size: 13.5px;
  border: 1px solid transparent;
  display: flex; align-items: center; gap: 10px;
}
.alert::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  flex-shrink: 0;
}
.alert-error {
  background: oklch(0.96 0.02 25);
  color: oklch(0.4 0.16 25);
  border-color: oklch(0.88 0.06 25);
}
.alert-error::before { background: oklch(0.6 0.18 25); }
.alert-success {
  background: oklch(0.96 0.04 150);
  color: oklch(0.36 0.14 150);
  border-color: oklch(0.84 0.08 150);
}
.alert-success::before { background: oklch(0.55 0.16 150); }
.alert-warning {
  background: oklch(0.97 0.06 80);
  color: oklch(0.4 0.14 75);
  border-color: oklch(0.86 0.10 80);
}
.alert-warning::before { background: oklch(0.7 0.16 75); }

/* =========================================================
   Theme: ADMIN — midnight + electric cyan
   ========================================================= */
.theme-admin {
  --accent: oklch(0.74 0.16 230);
  --accent-on: oklch(0.14 0.02 260);
  --accent-soft: oklch(0.74 0.16 230 / 0.20);
}
.theme-admin .login-aside {
  background: oklch(0.16 0.02 260);
  color: oklch(0.94 0.01 260);
}
.theme-admin .login-aside::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 80% 0%, oklch(0.5 0.18 230 / 0.22), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, oklch(0.4 0.18 280 / 0.18), transparent 60%);
  pointer-events: none;
}
.theme-admin .login-aside::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(oklch(0.94 0.01 260 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.94 0.01 260 / 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
  pointer-events: none;
}
.theme-admin .a-eyebrow { color: oklch(0.78 0.14 230); }
.theme-admin .a-eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.78 0.14 230);
  box-shadow: 0 0 0 4px oklch(0.78 0.14 230 / 0.2);
}
.theme-admin .a-lede { color: oklch(0.82 0.01 260); }
.theme-admin .a-back { color: oklch(0.7 0.04 230); }
.theme-admin .a-foot { color: oklch(0.6 0.03 260); }
.theme-admin .wordmark { color: oklch(0.94 0.01 260); }
.theme-admin .wordmark .mark { background: oklch(0.94 0.01 260); color: oklch(0.18 0.02 260); }
.theme-admin .wordmark .mark::after { background: oklch(0.78 0.16 230); }

/* admin console card */
.console-card {
  position: relative; z-index: 2;
  margin-top: 36px;
  border: 1px solid oklch(0.94 0.01 260 / 0.1);
  border-radius: 12px;
  background: oklch(0.20 0.02 260 / 0.7);
  backdrop-filter: blur(8px);
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  max-width: 460px;
}
.console-card .ch {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10.5px;
  color: oklch(0.65 0.04 230);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.console-card .ch::after { content: "● rec"; color: oklch(0.7 0.15 25); letter-spacing: 0.1em; }
.console-card .ln { display: flex; gap: 10px; padding: 3px 0; color: oklch(0.86 0.01 260); }
.console-card .ln .t   { color: oklch(0.6 0.03 260);  width: 50px; flex-shrink: 0; }
.console-card .ln .tag { color: oklch(0.78 0.14 230); width: 56px; flex-shrink: 0; }
.console-card .ln .tag.warn { color: oklch(0.78 0.15 80); }
.console-card .ln .tag.ok   { color: oklch(0.78 0.14 145); }
.console-card .ln .msg { flex: 1; color: oklch(0.86 0.01 260); }

/* =========================================================
   Theme: CLIENTS — paper + deep emerald
   ========================================================= */
.theme-clients {
  --accent: oklch(0.5 0.14 160);
  --accent-on: oklch(0.99 0.005 160);
  --accent-soft: oklch(0.5 0.14 160 / 0.16);
}
.theme-clients .login-aside {
  background: oklch(0.97 0.018 160);
  color: oklch(0.22 0.04 160);
}
.theme-clients .login-aside::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(1000px 500px at 100% 100%, oklch(0.5 0.14 160 / 0.10), transparent 60%),
    radial-gradient(700px 400px at 0% 0%, oklch(0.7 0.10 145 / 0.10), transparent 60%);
  pointer-events: none;
}
.theme-clients .a-eyebrow { color: oklch(0.42 0.14 160); }
.theme-clients .a-eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.5 0.14 160);
  box-shadow: 0 0 0 4px oklch(0.5 0.14 160 / 0.18);
}
.theme-clients .a-lede { color: oklch(0.32 0.03 160); }
.theme-clients .a-back { color: oklch(0.42 0.06 160); }
.theme-clients .a-foot { color: oklch(0.42 0.04 160); }
.theme-clients .wordmark .mark { background: oklch(0.32 0.10 160); }
.theme-clients .wordmark .mark::after { background: oklch(0.78 0.16 70); }

.stats-card {
  position: relative; z-index: 2;
  margin-top: 36px;
  border: 1px solid oklch(0.86 0.02 160);
  border-radius: 14px;
  background: oklch(0.99 0.005 160);
  padding: 22px;
  max-width: 460px;
  display: flex; flex-direction: column; gap: 18px;
  box-shadow: 0 20px 40px -28px oklch(0.3 0.1 160 / 0.18);
}
.stats-card .sc-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.42 0.06 160);
}
.stats-card .sc-big { display: flex; align-items: end; gap: 12px; }
.stats-card .sc-big .n { font-size: 48px; font-weight: 600; letter-spacing: -0.03em; color: oklch(0.30 0.14 160); line-height: 1; font-feature-settings: "tnum"; }
.stats-card .sc-big .delta { font-family: var(--font-mono); font-size: 12px; color: oklch(0.5 0.14 160); padding-bottom: 8px; }
.stats-card .sc-spark { display: flex; align-items: end; gap: 4px; height: 50px; }
.stats-card .sc-spark span { flex: 1; background: oklch(0.84 0.10 160); border-radius: 2px; }
.stats-card .sc-spark span.hi { background: oklch(0.5 0.14 160); }
.stats-card .sc-list { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11.5px; }
.stats-card .sc-list .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed oklch(0.88 0.02 160); }
.stats-card .sc-list .row:last-child { border-bottom: 0; }
.stats-card .sc-list .row .ok    { color: oklch(0.5 0.14 160); }
.stats-card .sc-list .row .pen   { color: oklch(0.6 0.14 75); }
.stats-card .sc-list .row .label { color: oklch(0.34 0.02 160); }

/* =========================================================
   Theme: PARTNERS — cream + burnt amber
   ========================================================= */
.theme-partners {
  --accent: oklch(0.6 0.17 50);
  --accent-on: oklch(0.99 0.01 75);
  --accent-soft: oklch(0.6 0.17 50 / 0.16);
}
.theme-partners .login-aside {
  background: oklch(0.96 0.03 75);
  color: oklch(0.22 0.06 50);
}
.theme-partners .login-aside::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 500px at 100% 0%, oklch(0.6 0.17 50 / 0.16), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, oklch(0.65 0.15 30 / 0.10), transparent 60%);
  pointer-events: none;
}
.theme-partners .login-aside::after {
  content: "";
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    45deg, transparent 0, transparent 18px,
    oklch(0.5 0.14 50 / 0.04) 18px, oklch(0.5 0.14 50 / 0.04) 19px
  );
  pointer-events: none;
}
.theme-partners .a-eyebrow { color: oklch(0.5 0.16 50); }
.theme-partners .a-eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: oklch(0.6 0.17 50);
  box-shadow: 0 0 0 4px oklch(0.6 0.17 50 / 0.18);
}
.theme-partners .a-lede { color: oklch(0.34 0.06 50); }
.theme-partners .a-back { color: oklch(0.46 0.10 50); }
.theme-partners .a-foot { color: oklch(0.46 0.08 50); }
.theme-partners .wordmark .mark { background: oklch(0.30 0.10 50); }
.theme-partners .wordmark .mark::after { background: oklch(0.78 0.16 50); }

.exchange-card {
  position: relative; z-index: 2;
  margin-top: 36px;
  border: 1px solid oklch(0.86 0.04 60);
  border-radius: 14px;
  background: oklch(0.99 0.015 75);
  padding: 22px;
  max-width: 480px;
  box-shadow: 0 20px 40px -28px oklch(0.4 0.16 40 / 0.20);
}
.exchange-card .xc-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: oklch(0.5 0.1 50);
  margin-bottom: 14px;
}
.exchange-card .xc-rows { display: flex; flex-direction: column; font-family: var(--font-mono); font-size: 12px; }
.exchange-card .xc-row {
  display: grid;
  grid-template-columns: 50px 1fr auto auto;
  gap: 14px;
  padding: 10px 0;
  border-top: 1px dashed oklch(0.86 0.04 60);
  align-items: center;
}
.exchange-card .xc-row:first-child { border-top: 0; }
.exchange-card .xc-row .t    { color: oklch(0.5 0.06 50); }
.exchange-card .xc-row .name { color: oklch(0.22 0.06 50); }
.exchange-card .xc-row .code { color: oklch(0.5 0.16 50); font-weight: 500; }
.exchange-card .xc-row .st {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  background: oklch(0.94 0.04 145);
  color: oklch(0.42 0.14 145);
}
.exchange-card .xc-row .st.queue { background: oklch(0.94 0.08 80); color: oklch(0.48 0.14 75); }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; padding: 56px 28px 32px; gap: 40px; }
  .portals { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login-aside { display: none; }
  .metrics-inner { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-right: 0; }
  .section-head { flex-direction: column; align-items: start; gap: 8px; }
  .section-head .sub { text-align: left; }
  .land-nav-links { display: none; }
}
