/* ============ TOKENS ============ */
:root{
  --bg: #F3F0E9;
  --bg-alt: #ECE7DC;
  --surface: #FBFAF6;
  --text: #1B1C1E;
  --text-muted: #5F5E5A;
  --navy: #1F3550;
  --navy-strong: #142235;
  --line: #B9C6CF;
  --line-strong: #8FA3B0;
  --brass: #A87C4B;
  --brass-strong: #8C6438;
  --border: #D8D2C2;
  --risk-green: #3F7A56;
  --risk-amber: #B0812C;
  --risk-red: #A6483C;
  --chip-fg: #FBFAF6;
  --shadow: 0 1px 2px rgba(31,53,80,.06), 0 8px 24px rgba(31,53,80,.06);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg: #12181F; --bg-alt: #0D1218; --surface: #182029;
    --text: #EDEAE2; --text-muted: #A7ACAE;
    --navy: #8FB0D6; --navy-strong: #0A0E13;
    --line: #2E3D48; --line-strong: #3E5262;
    --brass: #D3A968; --brass-strong: #E4BE84;
    --border: #2A3138;
    --risk-green: #6FAE86; --risk-amber: #D6A445; --risk-red: #D07A6D;
    --chip-fg: #0D1218;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}
:root[data-theme="dark"]{
  --bg: #12181F; --bg-alt: #0D1218; --surface: #182029;
  --text: #EDEAE2; --text-muted: #A7ACAE;
  --navy: #8FB0D6; --navy-strong: #0A0E13;
  --line: #2E3D48; --line-strong: #3E5262;
  --brass: #D3A968; --brass-strong: #E4BE84;
  --border: #2A3138;
  --risk-green: #6FAE86; --risk-amber: #D6A445; --risk-red: #D07A6D;
  --chip-fg: #0D1218;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

*{box-sizing:border-box;}
html,body{ margin:0; padding:0; }
body{
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.mono{ font-family: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace; }
h1,h2,h3,h4{ text-wrap: balance; margin: 0; font-weight: 600; }
p{ margin:0; }
a{ color: inherit; }
img{ max-width:100%; }
[hidden]{ display:none!important; }

.wrap{ max-width: 1120px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 48px); }
section{ padding-block: clamp(56px, 9vw, 104px); }

/* ============ HEADER ============ */
header.site{
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner{
  max-width: 1120px; margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 48px);
  display:flex; align-items:center; justify-content:space-between; gap: 16px;
}
.wordmark{ display:flex; flex-direction:column; line-height:1; text-decoration:none; }
.wordmark .t1{ font-weight:500; letter-spacing: .06em; font-size: 15px; color: var(--navy); }
.wordmark .t2{ font-weight:400; letter-spacing: .18em; font-size: 10.5px; color: var(--text-muted); margin-top:2px; }
nav.primary{ display:flex; align-items:center; gap: 22px; flex-wrap:wrap; }
nav.primary a{ font-size: 13.5px; font-weight:500; text-decoration:none; color: var(--text-muted); white-space: nowrap; }
nav.primary a:hover, nav.primary a[aria-current="page"]{ color: var(--text); }
.btn{
  display:inline-flex; align-items:center; gap:8px;
  padding: 9px 18px; border-radius: 3px;
  background: var(--navy-strong); color: #F3F0E9;
  font-size: 13.5px; font-weight: 600; text-decoration:none; letter-spacing: .01em;
  border: 1px solid var(--navy-strong);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover{ box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible{ outline: 2px solid var(--brass); outline-offset: 2px; }
.btn.ghost{ background: transparent; color: var(--navy-strong); border: 1px solid var(--line-strong); }
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]) .btn{ background: var(--brass); color:#0D1218; border-color: var(--brass); }
  :root:not([data-theme="light"]) .btn.ghost{ color: var(--text); border-color: var(--line-strong); }
}
:root[data-theme="dark"] .btn{ background: var(--brass); color:#0D1218; border-color: var(--brass); }
:root[data-theme="dark"] .btn.ghost{ color: var(--text); border-color: var(--line-strong); }

/* ============ HOME HERO ============ */
.hero{
  background:
    repeating-linear-gradient(0deg, rgba(143,163,176,.14) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(143,163,176,.14) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, #142235 0%, #0F1B2C 100%);
  color: #F3F0E9; position: relative; overflow: clip; border-bottom: 1px solid #0A121D;
}
.hero .wrap{ padding-block: clamp(64px, 11vw, 120px) clamp(48px, 8vw, 88px); position:relative; }
.eyebrow{
  display:inline-flex; align-items:center; gap:10px;
  font-family:"IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing:.14em; text-transform:uppercase;
  color: #C7A876; margin-bottom: 22px;
}
.eyebrow::before{ content:""; width:7px; height:7px; border-radius:50%; background: #C7A876; display:inline-block; }
.hero h1{ font-size: clamp(34px, 5.4vw, 60px); font-weight: 600; letter-spacing: -0.01em; max-width: 15ch; color: #FBFAF6; }
.hero .sub{ margin-top: 22px; max-width: 54ch; font-size: clamp(15px, 1.7vw, 18px); color: #C7CDD5; }
.hero-ctas{ margin-top:34px; display:flex; gap:14px; flex-wrap:wrap; }
.hero .btn{ background:#C7A876; color:#142235; border-color:#C7A876; }
.hero .btn.ghost{ background:transparent; color:#EDEAE2; border-color:#3E5262; }

.paths{ margin-top: 60px; display:grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: #263B52; border: 1px solid #263B52; border-radius: 4px; overflow: hidden; }
.path{ background: #182839; padding: 22px 22px 24px; text-decoration:none; color: inherit; display:flex; flex-direction: column; gap: 10px; transition: background .15s ease; }
.path:hover{ background:#1E3049; }
.path .balloon{ width: 26px; height:26px; border-radius:50%; border: 1.5px solid #C7A876; color:#C7A876; display:flex; align-items:center; justify-content:center; font-family:"IBM Plex Mono", monospace; font-size:12px; }
.path h3{ font-size:16px; color:#FBFAF6; }
.path p{ font-size: 13.5px; color:#A9B3BE; line-height:1.5; }
.path .go{ margin-top:auto; font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:#C7A876; }
@media (max-width: 760px){ .paths{ grid-template-columns: 1fr; } }

/* ============ PAGE HERO (subpages) ============ */
.page-hero{
  background:
    repeating-linear-gradient(0deg, rgba(143,163,176,.14) 0 1px, transparent 1px 88px),
    repeating-linear-gradient(90deg, rgba(143,163,176,.14) 0 1px, transparent 1px 88px),
    linear-gradient(180deg, #142235 0%, #0F1B2C 100%);
  color: #F3F0E9; border-bottom: 1px solid #0A121D;
}
.page-hero .wrap{ padding-block: clamp(40px,7vw,64px); }
.crumb{ font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:#8FA3B0; margin-bottom:16px; }
.crumb a{ text-decoration:none; color:#8FA3B0; }
.crumb a:hover{ color:#C7A876; }
.page-hero h1{ font-size: clamp(28px,4.2vw,44px); color:#FBFAF6; max-width:22ch; }
.page-hero .sub{ margin-top:16px; max-width:58ch; font-size:16px; color:#C7CDD5; }

/* ============ PROOF STRIP ============ */
.proof{ background: var(--surface); border-bottom: 1px solid var(--border); }
.proof .wrap{ padding-block: 40px; }
.proof-label{ font-family:"IBM Plex Mono", monospace; font-size: 11px; letter-spacing:.12em; text-transform:uppercase; color: var(--text-muted); margin-bottom: 16px; }
.logos{ display:flex; flex-wrap:wrap; gap: 10px 28px; align-items:center; }
.logos span{ font-size: 15px; font-weight:600; color: var(--text); letter-spacing: -.01em; }
.logos .dot{ color: var(--border); font-weight:400; }
.proof-tags{ margin-top: 20px; display:flex; gap:10px; flex-wrap:wrap; }
.tag{ font-family:"IBM Plex Mono", monospace; font-size: 11px; letter-spacing:.05em; border: 1px solid var(--border); color: var(--text-muted); padding: 5px 10px; border-radius: 3px; background: var(--bg); }

/* ============ NOTE / STAMP BLOCK ============ */
.note-band{ background: var(--bg-alt); border-bottom:1px solid var(--border); }
.note-band .wrap{ padding-block: clamp(44px,7vw,64px); }
.note{ border: 1.5px solid var(--navy); border-radius: 3px; padding: 28px clamp(22px,4vw,40px); position: relative; background: var(--surface); box-shadow: var(--shadow); }
.note::before{ content: "NOTE"; position:absolute; top:-11px; left:22px; background: var(--bg-alt); padding: 0 8px; font-family:"IBM Plex Mono", monospace; font-size: 11px; letter-spacing:.14em; color: var(--navy); }
.note p{ font-size: clamp(16px,2vw,20px); font-weight:500; line-height:1.45; max-width: 46ch; color: var(--text); }
.note p.small{ margin-top:14px; font-size:14px; font-weight:400; color:var(--text-muted); max-width:56ch; }

/* compact inline note used on service pages */
.note-inline{ margin-top:44px; border-left:3px solid var(--navy); padding: 14px 20px; background: var(--surface); border-radius: 0 4px 4px 0; }
.note-inline p{ font-size:14.5px; color:var(--text); }
.note-inline p + p{ margin-top:8px; }
.note-inline .k{ font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:var(--navy); display:block; margin-bottom:6px; }

/* ============ SECTION HEADERS ============ */
.sec-head{ max-width: 62ch; margin-bottom: 44px; }
.sec-kicker{ font-family:"IBM Plex Mono", monospace; font-size: 11.5px; letter-spacing:.12em; text-transform:uppercase; color: var(--brass-strong); display:flex; align-items:center; gap:8px; margin-bottom: 14px; }
.sec-kicker .num{ color: var(--text-muted); }
.sec-head h2{ font-size: clamp(24px,3.4vw,34px); color: var(--navy); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .sec-head h2{ color: var(--text);} }
:root[data-theme="dark"] .sec-head h2{ color: var(--text); }
.sec-head .dek{ margin-top: 14px; font-size: 16px; color: var(--text-muted); }

.bg-alt{ background: var(--bg-alt); border-top:1px solid var(--border); border-bottom:1px solid var(--border); }

.service-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 10px; }
.service{ border: 1px solid var(--border); border-radius: 4px; padding: 22px 24px; background: var(--surface); }
.service h4{ font-size:15.5px; color: var(--text); margin-bottom:8px; }
.service p{ font-size: 14px; color: var(--text-muted); line-height:1.55; }
.service .k{ font-family:"IBM Plex Mono",monospace; font-size:11px; color: var(--brass-strong); letter-spacing:.08em; margin-bottom:8px; display:block; }
@media (max-width: 760px){ .service-grid{ grid-template-columns:1fr; } }

/* ============ DILIGENCE EXHIBIT ============ */
.exhibit{ margin-top: 40px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.exhibit-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; flex-wrap: wrap; padding: 18px 22px; border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.exhibit-head h4{ font-size:14.5px; }
.exhibit-head .mono{ font-size:11px; color:var(--text-muted); letter-spacing:.06em; }
.exhibit-row{ display:grid; grid-template-columns: 1fr 2.2fr 96px; gap: 16px; align-items:center; padding: 15px 22px; border-bottom: 1px solid var(--border); }
.exhibit-row:last-child{ border-bottom:none; }
.exhibit-row .cat{ font-size:13.5px; font-weight:600; }
.exhibit-row .finding{ font-size:13.5px; color: var(--text-muted); }
.chip{ justify-self: end; font-family:"IBM Plex Mono", monospace; font-size:11px; letter-spacing:.06em; font-weight:600; padding: 5px 10px; border-radius:3px; color: var(--chip-fg); text-transform: uppercase; }
.chip.green{ background: var(--risk-green); }
.chip.amber{ background: var(--risk-amber); }
.chip.red{ background: var(--risk-red); }
.exhibit-foot{ padding: 14px 22px; font-size: 12px; color: var(--text-muted); background: var(--bg-alt); border-top: 1px solid var(--border); }
@media (max-width: 640px){ .exhibit-row{ grid-template-columns: 1fr; gap:6px; } .chip{ justify-self:start; } }

.process-meta{ margin-top: 18px; display:flex; gap: 22px; flex-wrap:wrap; }
.process-meta .item{ font-size: 13px; color: var(--text-muted); }
.process-meta .item b{ color: var(--text); font-weight:600; }

/* ============ LIFECYCLE ============ */
.lifecycle{ margin-top: 40px; display:flex; align-items:stretch; gap: 0; overflow-x: auto; padding-bottom: 6px; }
.lifecycle .stage{ flex: 0 0 auto; min-width: 148px; padding: 16px 16px 14px; border: 1px solid var(--border); background: var(--surface); display:flex; flex-direction:column; gap:8px; position:relative; text-decoration:none; color:inherit; }
.lifecycle .stage + .stage{ border-left: none; }
.lifecycle .stage .n{ font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--brass-strong); letter-spacing:.06em; }
.lifecycle .stage .lbl{ font-size: 13px; font-weight:600; line-height:1.3; }
.lifecycle .stage::after{ content:"→"; position:absolute; right:-13px; top:50%; transform:translateY(-50%); color: var(--text-muted); font-size:14px; z-index:2; }
.lifecycle .stage:last-child::after{ content:""; }
.lifecycle a.stage:hover{ background: var(--bg-alt); }

/* ============ CALLOUTS ============ */
.callouts{ margin-top: 22px; display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:18px; }
.callout{ border-left: 3px solid var(--brass); padding: 4px 0 4px 18px; }
.callout h5{ font-family:"IBM Plex Mono",monospace; font-size:12px; letter-spacing:.05em; color:var(--brass-strong); margin-bottom:6px; }
.callout p{ font-size:13.5px; color:var(--text-muted); line-height:1.55; }
@media (max-width:760px){ .callouts{ grid-template-columns:1fr; } }

/* ============ CROSS-LINK STRIP ============ */
.crosslinks{ background: var(--bg-alt); border-top:1px solid var(--border); }
.crosslinks .wrap{ padding-block: clamp(44px,7vw,64px); }
.crosslinks .cl-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-top:22px; }
.cl-card{ display:block; text-decoration:none; color:inherit; border:1px solid var(--border); background:var(--surface); border-radius:4px; padding:18px 20px; transition:border-color .15s ease, transform .15s ease; }
.cl-card:hover{ border-color: var(--line-strong); transform: translateY(-2px); }
.cl-card .k{ font-family:"IBM Plex Mono",monospace; font-size:10.5px; letter-spacing:.08em; color:var(--brass-strong); display:block; margin-bottom:6px; }
.cl-card h5{ font-size:14.5px; margin-bottom:6px; }
.cl-card p{ font-size:12.5px; color:var(--text-muted); line-height:1.5; }

/* ============ ABOUT ============ */
.about-grid{ display:grid; grid-template-columns: 1.1fr 1.4fr; gap: 56px; align-items:start; }
.headshot{ width: 172px; height:172px; border-radius:50%; object-fit: cover; object-position: 50% 32%; border: 3px solid var(--navy); box-shadow: var(--shadow); margin-bottom: 22px; display:block; }
.credlist{ display:flex; flex-direction:column; gap:9px; margin-top:18px; }
.credlist .row{ display:flex; gap:10px; font-size:13.5px; }
.credlist .role{ color: var(--text); font-weight:600; min-width: 132px; }
.credlist .co{ color: var(--text-muted); }
.about-quote{ margin-top: 26px; padding-left: 18px; border-left: 3px solid var(--line-strong); font-size: 15px; color: var(--text-muted); max-width: 42ch; }
.about-body p{ font-size: 15.5px; color: var(--text); line-height: 1.7; }
.about-body p + p{ margin-top: 16px; }
.about-body .fine{ margin-top:20px; font-size:13px; color:var(--text-muted); }
@media (max-width: 800px){ .about-grid{ grid-template-columns:1fr; gap:32px; } }

/* ============ CONTACT ============ */
section.contact-section{ background: var(--navy-strong); color:#F3F0E9; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) section.contact-section{ background:#0A0E13; } }
:root[data-theme="dark"] section.contact-section{ background:#0A0E13; }
.contact-grid{ display:grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.contact-section h1, .contact-section h2{ font-size: clamp(26px,3.6vw,36px); color:#FBFAF6; max-width: 18ch; }
.contact-section .dek{ margin-top:16px; font-size:15.5px; color:#B9C1CA; max-width:44ch; }
.contact-actions{ margin-top:28px; display:flex; gap:14px; flex-wrap:wrap; }
.contact-card{ border: 1px solid #2C3E52; border-radius:4px; padding:22px 24px; background: #17263B; }
.contact-card .cline{ display:flex; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid #24384D; font-size:13.5px; }
.contact-card .cline:last-child{ border-bottom:none; }
.contact-card .cline .k{ color:#8A97A6; font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.06em; align-self:center; }
.contact-card .cline a{ color:#EDEAE2; text-decoration:none; font-weight:500; }
.contact-card .cline a:hover{ color:#C7A876; }
@media (max-width:800px){ .contact-grid{ grid-template-columns:1fr; gap:30px; } }

footer.legal{ background: var(--navy-strong); border-top: 1px solid #24384D; }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) footer.legal{ background:#0A0E13; } }
:root[data-theme="dark"] footer.legal{ background:#0A0E13; }
footer.legal .wrap{ padding-block: 20px; display:flex; flex-direction:column; gap:14px; }
footer.legal .tagline{ font-size:14px; font-weight:600; letter-spacing:.01em; color:#C7CDD5; }
footer.legal .meta-row{ display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; font-size: 12px; color:#7C8A99; }
footer.legal .meta-row span.mono{ letter-spacing:.04em; }
footer.legal .meta-row a{ color:#A9B3BE; transition: color .15s ease; text-decoration:none; }
footer.legal .meta-row a:hover{ color:#C7A876; }

@media (prefers-reduced-motion: no-preference){
  .fade-up{ animation: fadeUp .6s ease both; }
  @keyframes fadeUp{ from{ opacity:0; transform: translateY(10px); } to{ opacity:1; transform:none; } }
}

/* ============ INSIGHTS ============ */
.insight-list{ display:flex; flex-direction:column; border-top:1px solid var(--border); }
.insight-item{ display:grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 28px 0; border-bottom:1px solid var(--border); text-decoration:none; color:inherit; }
.insight-item:hover h3{ color: var(--brass-strong); }
.insight-item .meta{ font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:var(--text-muted); display:flex; flex-direction:column; gap:6px; padding-top:4px; }
.insight-item .meta .topic{ color: var(--brass-strong); }
.insight-item h3{ font-size: clamp(18px,2.2vw,22px); color: var(--text); transition: color .15s ease; }
.insight-item p{ margin-top:8px; font-size:14.5px; color:var(--text-muted); line-height:1.6; max-width:64ch; }
.insight-item .go{ display:inline-block; margin-top:12px; font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:var(--brass-strong); }
@media (max-width: 680px){ .insight-item{ grid-template-columns:1fr; gap:10px; } .insight-item .meta{ flex-direction:row; gap:14px; } }

.article-hero .meta{ margin-top:18px; font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:#8FA3B0; display:flex; gap:16px; flex-wrap:wrap; }
.article{ max-width: 700px; margin: 0 auto; }
.article p, .article li{ font-size: 16.5px; line-height: 1.75; color: var(--text); }
.article p + p{ margin-top: 18px; }
.article .lede{ font-size: 19px; line-height:1.6; color: var(--text); font-weight:500; }
.article h2{ margin-top: 44px; margin-bottom: 14px; font-size: clamp(20px,2.4vw,24px); color: var(--navy); }
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .article h2{ color: var(--text);} }
:root[data-theme="dark"] .article h2{ color: var(--text); }
.article ul, .article ol{ margin: 16px 0 0; padding-left: 22px; }
.article li + li{ margin-top: 10px; }
.article strong{ font-weight:600; }
.article blockquote{ margin: 30px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--brass); font-size: 18px; line-height:1.55; color: var(--text); font-weight:500; }
.article .ask{ margin-top: 26px; border: 1px solid var(--border); border-radius:4px; background: var(--surface); padding: 20px 24px; }
.article .ask .k{ font-family:"IBM Plex Mono",monospace; font-size:11px; letter-spacing:.08em; color:var(--brass-strong); display:block; margin-bottom:6px; }
.article .ask ul{ margin-top:6px; }
.article .ask li{ font-size:15px; line-height:1.6; }
.article-cta{ margin-top: 52px; border-top: 1px solid var(--border); padding-top: 28px; display:flex; gap: 22px; align-items:center; }
.article-cta img{ width:64px; height:64px; border-radius:50%; object-fit:cover; object-position:50% 32%; border:2px solid var(--navy); flex:0 0 auto; }
.article-cta p{ font-size:14.5px; line-height:1.6; color:var(--text-muted); }
.article-cta p a{ color: var(--text); font-weight:600; }
.article-cta strong{ color: var(--text); }

/* ============ SMALL-SCREEN HEADER ============ */
@media (max-width: 640px){
  .header-inner{ flex-wrap: wrap; row-gap: 10px; padding-block: 12px; }
  .header-inner .wordmark{ order: 1; }
  .header-inner .btn.ghost{ order: 2; padding: 7px 14px; }
  nav.primary{ order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 2px; scrollbar-width: none; }
  nav.primary::-webkit-scrollbar{ display:none; }
}
