/* ============================================================================
   Regreports — "Within Limits" design system
   Clean, operational, status-forward. Hand-written (no build step).
   Display: Archivo · Body: IBM Plex Sans · Data: IBM Plex Mono
   ============================================================================ */

:root {
  --bg:        #f4f6fb;
  --surface:   #ffffff;
  --surface-2: #eef1f8;
  --ink:       #141925;
  --ink-2:     #39415230;   /* reserved */
  --text:      #2b3345;
  --muted:     #5a6475;
  --line:      #e4e8f0;
  --accent:    #3b5bdb;
  --accent-dk: #2f49ad;
  --accent-soft:#eaedff;
  --green:     #1f8f63;
  --green-soft:#e4f3ec;
  --amber:     #a9710a;
  --amber-soft:#f6efdd;
  --red:       #c6475c;
  --red-soft:  #f7e6e9;

  --radius:    14px;
  --radius-sm: 9px;
  --maxw:      1120px;
  --display: "Archivo", system-ui, -apple-system, sans-serif;
  --body:    "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
.section { padding-block: clamp(52px, 8vw, 92px); }
.section-tight { padding-block: clamp(40px, 6vw, 68px); }

h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-weight: 800; font-size: clamp(2.1rem, 5vw, 3.3rem); line-height: 1.03; }
h2 { font-weight: 800; font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.08; }
h3 { font-weight: 700; font-size: 1.08rem; letter-spacing: -0.01em; }

.kicker {
  font-family: var(--mono); font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent);
  margin: 0 0 14px;
}
.lede { color: var(--muted); font-size: 1.08rem; margin: 18px 0 0; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; max-width: 60ch; }

/* ── Buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--body); font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm); padding: 12px 20px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: background .16s, border-color .16s, color .16s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dk); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.textlink { color: var(--accent); font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.textlink:hover { color: var(--accent-dk); }

/* ── Header / nav ─────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--display); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; }
.brand svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.nav-links { display: flex; align-items: center; gap: 26px; font-size: 0.9rem; font-weight: 500; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.nav-signin { font-size: 0.9rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.nav-signin:hover { color: var(--accent); }
@media (max-width: 760px) { .nav-links { display: none; } }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(180deg, var(--accent-soft) 0%, var(--bg) 70%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(28px, 5vw, 56px); align-items: center; padding-block: clamp(44px, 7vw, 84px); }
.hero-grid.single { grid-template-columns: 1fr; max-width: 760px; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* ── Status panel (signature element) ─────────────────────────────────── */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 7px; box-shadow: 0 24px 50px -34px rgba(20,25,37,.55); }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 15px; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.04em; color: var(--muted); }
.iu-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 13px 15px; border-top: 1px solid var(--line); }
.iu-name { font-weight: 600; font-size: 0.94rem; color: var(--ink); }
.iu-sub { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); }
.chip { font-size: 0.72rem; font-weight: 600; padding: 4px 11px; border-radius: 999px; white-space: nowrap; justify-self: end; }
.chip-ok  { color: var(--green); background: var(--green-soft); }
.chip-snc { color: var(--red);   background: var(--red-soft); }
.chip-rev { color: var(--amber); background: var(--amber-soft); }
.panel-cap, .mock-cap { margin: 12px 2px 0; font-size: 0.78rem; color: var(--muted); font-style: italic; }

/* mac-style mock frame (flagship section) */
.mock { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 24px 50px -34px rgba(20,25,37,.55); }
.mock-bar { display: flex; gap: 7px; padding: 13px 15px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #cfd5e2; }
.mock-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.mock-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.9rem; }
.mock-line .lbl { font-weight: 600; color: var(--ink); }
.mock-line .val { font-family: var(--mono); font-size: 0.85rem; color: var(--text); }
.mock-note { background: var(--accent-soft); color: var(--accent-dk); border-radius: var(--radius-sm); padding: 11px 14px; font-size: 0.82rem; }

/* ── Feature list (hero bullets) ──────────────────────────────────────── */
.ticks { list-style: none; margin: 24px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ticks li { display: flex; gap: 11px; color: var(--text); font-size: 0.97rem; }
.ticks svg { width: 20px; height: 20px; color: var(--accent); flex: none; margin-top: 1px; }

/* ── Cards grid ───────────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
@media (max-width: 860px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card p { color: var(--muted); font-size: 0.92rem; margin: 10px 0 0; }
.card-accent { border-top: 3px solid var(--accent); }
.flag { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.flag-live { color: var(--accent); }
.flag-dim  { color: var(--muted); }

/* two-column prose grid (pims capabilities) */
.prose-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 44px; margin-top: 40px; }
@media (max-width: 760px) { .prose-grid { grid-template-columns: 1fr; } }
.prose-grid h3 { margin-bottom: 8px; }
.prose-grid p { color: var(--muted); font-size: 0.93rem; margin: 0; }

/* steps row (pims data flow) */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step .s { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); font-weight: 500; }
.step h3 { margin: 8px 0 6px; }
.step p { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ── Alternating surface bands ────────────────────────────────────────── */
.band { background: var(--surface); border-block: 1px solid var(--line); }

/* ── Split section (flagship, who-it's-for) ───────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split p { color: var(--muted); margin-top: 16px; }

/* ── CTA band ─────────────────────────────────────────────────────────── */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(32px, 5vw, 56px); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c7cde0; max-width: 46ch; margin: 14px auto 0; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-light { background: #fff; color: var(--ink); }
.cta-band .btn-light:hover { background: var(--accent-soft); color: var(--accent-dk); }
.cta-band .sub { margin-top: 16px; font-size: 0.88rem; color: #aeb6cf; }
.cta-band .sub a { color: #fff; }

/* ── Demo video ───────────────────────────────────────────────────────── */
.video-frame { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; box-shadow: 0 24px 50px -34px rgba(20,25,37,.5); margin-top: 36px; }
.video-frame video { border-radius: var(--radius-sm); width: 100%; }

/* ── Product screenshots ──────────────────────────────────────────────── */
.shot { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: 0 26px 54px -34px rgba(20,25,37,.5); }
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption { padding: 12px 16px; font-size: 0.85rem; color: var(--muted); border-top: 1px solid var(--line); background: var(--surface-2); }
.shots-stack { display: flex; flex-direction: column; gap: 32px; margin: 44px auto 0; max-width: 940px; }

/* OCR import review — a faithful recreation of the in-app screen, fictional data */
.appbar { display: flex; align-items: baseline; gap: 12px; background: #141925; color: #fff; padding: 13px 18px; font-family: var(--display); font-weight: 700; font-size: 0.92rem; }
.appbar span { font-family: var(--body); font-weight: 500; font-size: 0.82rem; color: #aeb6cf; }
.ocr { padding: 20px; background: var(--surface); }
.ocr-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.ocr-head strong { font-family: var(--mono); font-size: 0.88rem; color: var(--ink); }
.ocr-meta { font-size: 0.8rem; color: var(--muted); }
.ocr-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.ocr-sample { font-size: 0.85rem; color: var(--text); margin-bottom: 6px; }
.ocr-tablewrap { overflow-x: auto; }
.ocr-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; min-width: 460px; }
.ocr-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.ocr-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); color: var(--text); }
.ocr-table td.num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.ocr-table tr.nd td { color: var(--muted); }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.b-ok { color: var(--green); background: var(--green-soft); }
.b-amber { color: var(--amber); background: var(--amber-soft); }
.b-red { color: var(--red); background: var(--red-soft); }
.b-nd { color: var(--muted); background: var(--surface-2); }
.ocr-note { font-size: 0.8rem; color: var(--muted); margin: 16px 0 14px; }
.ocr-btn { background: var(--accent); color: #fff; border: none; border-radius: var(--radius-sm); padding: 10px 18px; font-family: var(--body); font-weight: 600; font-size: 0.9rem; }

/* ERG decision matrix — editable enforcement responses (fictional recreation) */
.erg-sub { font-size: 0.84rem; color: var(--muted); margin: 0 0 16px; max-width: 72ch; }
.ocr-table td.lvl { font-weight: 700; white-space: nowrap; }
.lvl-warn  { color: var(--amber); }
.lvl-call  { color: #2b6cb0; }
.lvl-ao    { color: var(--red); }
.lvl-civil { color: #8a2f6b; }
.lvl-term  { color: var(--ink); }
.erg-editlink { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 4px 12px; font-size: 0.78rem; font-weight: 600; color: var(--muted); cursor: pointer; font-family: var(--body); }
.erg-editrow td { background: var(--accent-soft); }
.erg-editor { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 6px 0; }
.erg-note { font-size: 0.78rem; color: var(--accent-dk); font-weight: 700; width: 100%; }
.erg-field { display: flex; flex-direction: column; gap: 5px; }
.erg-field label { font-size: 0.7rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.erg-field select, .erg-field input { font-family: var(--body); font-size: 0.88rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--ink); }
.erg-save { background: var(--accent); color: #fff; border: none; border-radius: 7px; padding: 8px 16px; font-weight: 600; font-size: 0.85rem; cursor: pointer; font-family: var(--body); }
.erg-cancel { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 8px 16px; font-weight: 600; font-size: 0.85rem; cursor: pointer; font-family: var(--body); }

/* Communications log — CA ↔ IU correspondence (fictional recreation) */
.comm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.comm-h { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink); display: block; }
.comm-hsub { font-size: 0.82rem; color: var(--muted); display: block; margin-top: 3px; max-width: 46ch; }
.comm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.comm-sel { font-family: var(--body); font-size: 0.82rem; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text); }
.comm-add { background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 8px 14px; font-family: var(--body); font-weight: 600; font-size: 0.85rem; cursor: pointer; white-space: nowrap; }
.comm-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.comm-card:last-child { margin-bottom: 0; }
.comm-card.alert { border-color: #f0b74e; background: #fffaf0; }
.comm-title { font-family: var(--display); font-weight: 700; font-size: 0.95rem; color: var(--ink); display: block; margin-bottom: 4px; }
.comm-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.comm-row:first-of-type { border-top: none; }
.comm-main { min-width: 0; font-size: 0.88rem; }
.comm-co { font-weight: 700; color: var(--ink); }
.comm-meta { color: var(--muted); }
.comm-dir { font-weight: 600; color: var(--text); }
.comm-fu { color: #c05621; font-weight: 600; }
.comm-viol { display: inline-block; margin-top: 6px; font-size: 0.74rem; background: var(--amber-soft); color: var(--amber); border: 1px solid #f0c674; border-radius: 5px; padding: 2px 8px; }
.comm-subj { font-size: 0.88rem; margin-top: 5px; color: var(--ink); font-weight: 600; }
.comm-sum { font-size: 0.82rem; color: var(--muted); margin-top: 3px; }
.comm-people { font-size: 0.76rem; color: var(--muted); margin-top: 6px; font-family: var(--mono); }
.comm-actions { display: flex; gap: 6px; flex-shrink: 0; }
.comm-btn { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 4px 11px; font-size: 0.76rem; font-weight: 600; cursor: pointer; font-family: var(--body); white-space: nowrap; }

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--line); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 36px; font-size: 0.88rem; color: var(--muted); }
.footer-row .brand { font-size: 1rem; }
.footer-row a { text-decoration: none; }
.footer-row a:hover { color: var(--accent); }

/* ── Utility ──────────────────────────────────────────────────────────── */
.tabnum { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
