/* ==========================================================================
   Global Founder Atlas: cinematic-family skin.
   Pattern inherited from grain-by-grain and infinity-engine: deep-ink base,
   self-hosted variable fonts, layered radial gradients + faint grid, glowing
   orb brand mark, glass cards, mono labels, reveal-on-scroll, gold seams.
   Palette is the atlas's own: compass gold, horizon teal, passport violet.
   ========================================================================== */

@font-face {
  font-family: "Archivo Var";
  src: url("fonts/archivo-var.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono Var";
  src: url("fonts/jetbrains-mono-var.woff2") format("woff2-variations");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --void: #05070c;
  --deep: #0a1420;
  --ink: #0e1826;
  --gold: #ffcf6e;
  --gold-soft: #ffe6b0;
  --teal: #2be3c2;
  --teal-deep: #0c4a45;
  --violet: #8a63ff;
  --amethyst: #c9a6ff;
  --ochre: #ff8a3d;
  --coral: #ff7e8a;
  --text: #f7f4ec;
  --muted: #bfc5d2;
  --line: rgba(255, 207, 110, 0.22);
  --line-teal: rgba(43, 227, 194, 0.34);
  --glass: rgba(18, 24, 40, 0.6);
  --ok: #4cc38a;
  --max: 1240px;
  --radius: 18px;
  --radius-sm: 10px;
  --fd: "Archivo Var", ui-sans-serif, system-ui, sans-serif;
  --fm: "JetBrains Mono Var", Consolas, monospace;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .2s;
  --dur-med: .5s;
  --dur-slow: .9s;
  color-scheme: dark;
}
* { box-sizing: border-box; min-width: 0; }
html { scroll-behavior: smooth; width: 100%; max-width: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--fd);
  font-weight: 440;
  line-height: 1.62;
  background:
    radial-gradient(ellipse 60rem 34rem at 12% -6%, rgba(43, 227, 194, .13), transparent),
    radial-gradient(ellipse 64rem 38rem at 92% 2%, rgba(138, 99, 255, .14), transparent),
    radial-gradient(ellipse 84rem 52rem at 50% 116%, rgba(255, 178, 90, .16), transparent),
    linear-gradient(180deg, #0c1322 0%, #080d18 42%, var(--void) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 207, 110, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 207, 110, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(0deg, rgba(0,0,0,.8), rgba(0,0,0,.04) 72%);
}
::selection { background: var(--gold); color: #201200; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 100; background: var(--gold); color: #201200; padding: .7rem 1rem; border-radius: 4px; font-weight: 900; text-decoration: none; }
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: .8rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(5, 7, 12, .6), rgba(5, 7, 12, 0));
  transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), padding var(--dur-fast) var(--ease-out);
}
.site-header.is-condensed {
  padding-top: .55rem;
  padding-bottom: .55rem;
  border-bottom-color: var(--line);
  background: rgba(8, 11, 18, .84);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
}
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  flex: none;
  border: 1px solid rgba(255, 207, 110, .55);
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, var(--gold-soft) 0%, var(--ochre) 46%, #143a52 84%);
  box-shadow: 0 0 28px rgba(43, 227, 194, .4), inset 0 0 14px rgba(255, 255, 255, .25);
}
.brand-mark::after {
  content: "";
  width: 1rem; height: 1rem;
  background: conic-gradient(from 45deg, #143a52, #0a1420 25%, #143a52 50%, #0a1420 75%, #143a52);
  clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  opacity: .9;
}
.brand-text { display: grid; font-family: var(--fm); font-size: .68rem; line-height: 1.3; color: var(--muted); font-weight: 500; letter-spacing: .05em; text-transform: uppercase; }
.brand-text strong { color: #fff; font-family: var(--fd); font-size: .96rem; font-weight: 850; letter-spacing: .01em; text-transform: none; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .12rem; color: var(--muted); font-size: .85rem; font-weight: 620; min-width: 0; }
.site-nav a { position: relative; padding: .5rem .68rem; border-radius: 999px; text-decoration: none; cursor: pointer; white-space: nowrap; letter-spacing: .01em; transition: color var(--dur-fast), background var(--dur-fast); }
.site-nav a:hover { color: #fff; background: rgba(43, 227, 194, .14); }
.site-nav a[aria-current="page"] { color: #fff; background: rgba(255, 207, 110, .2); box-shadow: inset 0 0 0 1px var(--line); }
.nav-toggle { display: none; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); border-radius: 999px; font-family: var(--fm); font-size: .8rem; font-weight: 700; padding: .5rem .8rem; cursor: pointer; }
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; padding: .5rem .68rem; border-radius: 999px; color: var(--muted); white-space: nowrap; font: 620 .85rem var(--fd); display: inline-flex; align-items: center; gap: .3rem; transition: color var(--dur-fast), background var(--dur-fast); }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary::after { content: "\25BE"; font-size: .7em; opacity: .7; }
.nav-menu[open] > summary, .nav-menu > summary:hover, .nav-menu > summary[data-active] { color: #fff; background: rgba(43, 227, 194, .14); }
.nav-menu > summary[data-active] { box-shadow: inset 0 0 0 1px var(--line); }
.nav-drop { position: absolute; top: calc(100% + .4rem); right: 0; z-index: 60; display: grid; gap: .1rem; min-width: 12rem; padding: .4rem; border: 1px solid var(--line); border-radius: 12px; background: rgba(10, 12, 22, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 18px 40px rgba(0,0,0,.5); }
.nav-drop a { padding: .55rem .7rem; border-radius: 8px; }
.nav-drop a:hover { background: rgba(43, 227, 194, .12); }

/* ---------- Buttons ---------- */
.button { display: inline-flex; justify-content: center; align-items: center; gap: .55rem; min-height: 2.85rem; padding: .8rem 1.45rem; border-radius: 999px; text-decoration: none; border: 1px solid transparent; font-family: var(--fd); font-weight: 760; cursor: pointer; letter-spacing: .01em; font-size: 1rem; transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast); }
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button.primary { background: linear-gradient(135deg, var(--gold), var(--ochre) 58%, var(--violet)); color: #1a0e05; box-shadow: 0 8px 32px rgba(255, 207, 110, .28); }
.button.primary:hover { box-shadow: 0 14px 44px rgba(255, 207, 110, .4); }
.button.secondary { border-color: var(--line); background: rgba(255,255,255,.06); color: #fff; backdrop-filter: blur(8px); }
.button.secondary:hover { border-color: rgba(43, 227, 194, .6); background: rgba(43, 227, 194, .1); }
.button.copied { background: var(--teal); color: #04211d; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: calc(100vh - 5rem); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, .85fr); align-items: center; gap: 2.4rem; width: min(100%, var(--max)); margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 3rem) clamp(2rem, 5vw, 4rem); }
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.eyebrow { margin: 0 0 .85rem; color: var(--gold); font-family: var(--fm); font-size: .78rem; font-weight: 640; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, h4 { letter-spacing: -.005em; }
h1, h2 { margin: 0; font-family: var(--fd); font-weight: 860; line-height: .98; text-wrap: balance; text-shadow: 0 0 44px rgba(43, 227, 194, .22); }
h1 { max-width: 16ch; font-size: clamp(2.5rem, 6.4vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 3.4rem); }
h3 { margin: 0 0 .5rem; font-size: 1.2rem; line-height: 1.25; font-weight: 760; font-family: var(--fd); }
h4 { margin: 0; font-size: 1.02rem; font-weight: 740; font-family: var(--fd); }
p { margin: 0; }
.hero-lede { max-width: 46rem; margin: 1.2rem 0 0; color: #efe9dd; font-size: clamp(1.05rem, 1.7vw, 1.28rem); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.7rem; }
.lede { color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); margin-top: 1rem; max-width: 64ch; }
.hero-copy { position: relative; z-index: 1; }
.hero-panel { position: relative; z-index: 1; display: grid; gap: .7rem; padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(160deg, rgba(138, 99, 255, .13), rgba(10, 12, 22, .72)); box-shadow: 0 20px 60px rgba(0,0,0,.32); }
.workflow-step { display: grid; grid-template-columns: auto 1fr; gap: .85rem; align-items: center; color: var(--muted); }
.workflow-step strong { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border-radius: 50%; background: rgba(43, 227, 194, .14); border: 1px solid rgba(43, 227, 194, .5); color: var(--teal); font-family: var(--fm); font-weight: 700; }
.workflow-step span { font-size: .95rem; }

/* ---------- Sections / shells ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) clamp(1rem, 4vw, 3rem); }
.section > * { width: min(100%, var(--max)); margin-left: auto; margin-right: auto; }
.section.compact { padding-top: clamp(1.4rem, 3vw, 2.4rem); padding-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.page-shell { width: min(100%, var(--max)); margin: 0 auto; padding: clamp(2.6rem, 6vw, 4rem) clamp(1rem, 4vw, 3rem); }
.section-heading { max-width: 900px; margin-bottom: 1.6rem; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 1.02rem; margin-top: .8rem; }
.intro-band { background: linear-gradient(120deg, rgba(43, 227, 194, .16), rgba(255, 207, 110, .12)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem clamp(1rem, 4vw, 3rem); }
.intro-band div { width: min(100%, var(--max)); margin: 0 auto; color: #e7ecf4; }
.intro-band strong { color: #fff; font-family: var(--fd); }
.split { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(260px, .7fr); gap: 1.4rem; align-items: start; }

/* ---------- Cards / grids ---------- */
.link-card-grid, .data-grid { display: grid; gap: 1rem; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.data-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.link-card, .data-card, .note-panel, .stat-card, .source-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255, 178, 90, .07), rgba(10, 12, 22, .68));
  padding: 1.4rem;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
}
.link-card { color: inherit; display: block; text-decoration: none; transition: border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.link-card:hover, .link-card:focus { border-color: rgba(43, 227, 194, .6); transform: translateY(-3px); }
.link-card h3 { margin-bottom: .55rem; color: #fff; }
.link-card p, .note-panel p, .source-item p { color: var(--muted); }
.note-panel h3 { color: var(--gold-soft); margin-bottom: .5rem; }
.note-panel.warn { border-color: rgba(255, 126, 138, .45); background: linear-gradient(155deg, rgba(255, 126, 138, .1), rgba(10, 12, 22, .7)); }
.note-panel.warn h3 { color: var(--coral); }

.tag, .pill { color: var(--teal); font-family: var(--fm); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; }
.meta { color: var(--gold-soft); font-size: .88rem; margin-top: .8rem; font-family: var(--fm); }

/* ---------- Opportunity cards ---------- */
.opp-card { display: grid; gap: .55rem; }
.opp-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.opp-badges { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .1rem; align-items: center; }
.badge {
  border-radius: 999px;
  font-family: var(--fm);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .1em;
  padding: .26rem .58rem;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid currentColor;
}
.badge.cat { color: var(--amethyst); background: rgba(138, 99, 255, .12); }
.badge.status-open { color: var(--teal); background: rgba(43, 227, 194, .1); }
.badge.status-recurring { color: var(--gold); background: rgba(255, 207, 110, .1); }
.badge.status-soon { color: var(--ochre); background: rgba(255, 138, 61, .12); }
.badge.status-closed { color: var(--muted); background: rgba(191, 197, 210, .08); }
.badge.au-yes { color: var(--ok); background: rgba(76, 195, 138, .1); }
.badge.au-check { color: var(--coral); background: rgba(255, 126, 138, .1); }

.opp-place { color: var(--muted); font-size: .9rem; font-family: var(--fm); letter-spacing: .02em; }
.opp-summary { color: var(--muted); }

.score { display: grid; gap: .1rem; justify-items: center; min-width: 4.6rem; text-align: center; flex: none; }
.score-num { font-family: var(--fm); font-size: 1.85rem; font-weight: 760; line-height: 1; color: var(--gold); }
.score-label { color: var(--muted); font-size: .58rem; text-transform: uppercase; letter-spacing: .12em; font-family: var(--fm); }
.score-bar { height: 5px; width: 100%; background: rgba(255, 255, 255, .1); border-radius: 999px; overflow: hidden; margin-top: .2rem; }
.score-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--teal)); }

.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.chip {
  border: 1px solid rgba(43, 227, 194, .3);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--fm);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: .22rem .55rem;
  text-transform: uppercase;
}
.chip.gold { border-color: rgba(255, 207, 110, .5); color: var(--gold-soft); }

details.opp-details { margin-top: .5rem; }
details.opp-details > summary {
  cursor: pointer;
  color: var(--teal);
  font-family: var(--fm);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  list-style: none;
  padding: .3rem 0;
  user-select: none;
}
details.opp-details > summary::-webkit-details-marker { display: none; }
details.opp-details > summary::before { content: "+ "; color: var(--gold); }
details.opp-details[open] > summary::before { content: "\2212 "; color: var(--gold); }
.detail-grid { display: grid; grid-template-columns: minmax(9.5rem, auto) 1fr; gap: .5rem 1rem; margin-top: .7rem; padding-top: .8rem; border-top: 1px solid var(--line); }
.detail-grid dt { color: var(--gold-soft); font-family: var(--fm); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.detail-grid dd { margin: 0; color: var(--text); font-size: .93rem; }
.detail-grid dd.muted { color: var(--muted); }

.card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.card-actions a { border: 1px solid var(--line-teal); border-radius: 999px; color: #fff; font-family: var(--fm); font-size: .74rem; font-weight: 700; letter-spacing: .04em; padding: .5rem .8rem; text-decoration: none; text-transform: uppercase; transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast); }
.card-actions a:hover, .card-actions a:focus { background: rgba(43, 227, 194, .12); border-color: var(--teal); color: var(--teal); }

.pitch-box { margin-top: .8rem; padding: .9rem 1rem; background: rgba(138, 99, 255, .1); border: 1px solid rgba(138, 99, 255, .32); border-radius: var(--radius-sm); }
.pitch-box p { margin: .25rem 0; font-size: .92rem; color: #e7ecf4; }
.pitch-box strong { color: var(--gold-soft); font-family: var(--fm); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; }
.rank-num { font-family: var(--fm); font-weight: 760; color: var(--violet); font-size: 1rem; padding-right: .2rem; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: grid; gap: 1rem; margin: 1.6rem 0 1.4rem; }
.filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.filter-bar button { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); cursor: pointer; font: 600 .82rem var(--fm); letter-spacing: .04em; padding: .5rem .85rem; white-space: nowrap; transition: color var(--dur-fast), background var(--dur-fast), border-color var(--dur-fast); }
.filter-bar button:hover { color: #fff; border-color: rgba(255, 207, 110, .5); }
.filter-bar button.is-active { background: linear-gradient(135deg, var(--gold), var(--ochre)); border-color: transparent; color: #1a0e05; }
.search-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: .75rem; }
.search-label { color: var(--teal); font-family: var(--fm); font-size: .7rem; font-weight: 640; text-transform: uppercase; letter-spacing: .1em; display: block; margin-bottom: .3rem; }
.search-input { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); font: 440 1rem var(--fd); padding: .75rem .9rem; width: 100%; }
.search-input:focus { border-color: rgba(43, 227, 194, .55); outline: none; }
select.search-input { appearance: none; }
.search-input::placeholder { color: rgba(246, 245, 255, .5); }
.result-count { color: var(--muted); font-family: var(--fm); font-size: .82rem; letter-spacing: .04em; }

.stack { display: grid; gap: .85rem; margin-top: 1.2rem; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 1.6rem; }
.stat-card { text-align: left; background: linear-gradient(160deg, rgba(43, 227, 194, .1), rgba(10, 12, 22, .7)); }
.stat-card .big { font-family: var(--fm); font-weight: 760; font-size: 2.1rem; color: var(--teal); line-height: 1; letter-spacing: -.01em; }
.stat-card .small { color: var(--muted); font-size: .84rem; margin-top: .4rem; }

/* ---------- Timeline / strategy ---------- */
.timeline { display: grid; gap: .9rem; list-style: none; margin: 1.6rem 0 0; padding: 0; }
.timeline li { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: linear-gradient(155deg, rgba(255, 178, 90, .06), rgba(10, 12, 22, .66)); padding: 1.1rem 1.25rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.timeline li h4 { color: var(--gold-soft); margin-bottom: .35rem; }
.timeline li p { color: var(--muted); }
.checklist { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .4rem; }
.checklist li { padding-left: 1.5rem; position: relative; color: var(--muted); }
.checklist li::before { content: "\25C7"; position: absolute; left: 0; color: var(--teal); }
.checklist li a { color: var(--gold-soft); }
.checklist li .chip { border-color: rgba(255, 207, 110, .5); color: var(--gold-soft); }

/* ---------- Prompt / code ---------- */
.prompt-box { background: rgba(0, 0, 0, .34); border: 1px solid var(--line); border-radius: var(--radius); color: #e7ecf4; font: .88rem/1.65 var(--fm); margin: 1rem 0 0; max-height: 30rem; overflow: auto; padding: 1.2rem 1.3rem; white-space: pre-wrap; }
.copy-btn { margin-top: 1rem; }
.field-list { display: grid; gap: .3rem; margin-top: 1rem; }
.field-list div { display: grid; grid-template-columns: minmax(11rem, auto) 1fr; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid rgba(255, 207, 110, .12); }
.field-list dt { color: var(--teal); font-family: var(--fm); font-weight: 640; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.field-list dd { margin: 0; color: var(--muted); font-size: .92rem; }

.weight-bar { display: grid; gap: .7rem; margin-top: 1.2rem; }
.weight-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1rem; }
.weight-track { grid-column: 1 / -1; height: 7px; background: rgba(255, 255, 255, .08); border-radius: 999px; overflow: hidden; }
.weight-track > span { display: block; height: 100%; background: linear-gradient(90deg, var(--violet), var(--teal)); }
.weight-row .label { font-family: var(--fd); font-weight: 700; }
.weight-row .pct { font-family: var(--fm); font-weight: 760; color: var(--gold); }

/* ---------- People / networks ---------- */
.person-card { display: grid; gap: .5rem; }
.person-card .role { color: var(--teal); font-family: var(--fm); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.person-card h3 { color: #fff; }
.person-card .place { color: var(--muted); font-family: var(--fm); font-size: .82rem; }
.person-card p { color: var(--muted); }
.person-card .why { color: #e7ecf4; font-size: .92rem; }

/* ---------- Territory map ---------- */
.threat-grid { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.2rem; }
.threat { border: 1px solid rgba(255, 126, 138, .4); background: rgba(255, 126, 138, .08); color: #ffb3ba; border-radius: 999px; font-family: var(--fm); font-size: .74rem; font-weight: 600; letter-spacing: .03em; padding: .32rem .72rem; }
.gem { color: var(--gold-soft); border-left: 3px solid var(--gold); padding-left: 1rem; margin-top: 1.1rem; }
.territory-legend { display: flex; flex-wrap: wrap; gap: .8rem 1.6rem; list-style: none; margin: 1.4rem 0 0; padding: 0; }
.territory-legend li { display: flex; align-items: center; gap: .5rem; color: var(--muted); font-size: .88rem; }
.territory-legend strong { color: var(--text); font-family: var(--fd); }
.stage-dot { width: .8rem; height: .8rem; border-radius: 50%; flex: none; }
.stage-dot.live { background: var(--teal); box-shadow: 0 0 10px rgba(43, 227, 194, .6); }
.stage-dot.building { background: var(--gold); box-shadow: 0 0 10px rgba(255, 207, 110, .6); }
.stage-dot.surveyed { background: var(--violet); }
.project-card { display: grid; gap: .55rem; align-content: start; }
.badge.stage-live { color: var(--teal); background: rgba(43, 227, 194, .1); }
.badge.stage-building { color: var(--gold); background: rgba(255, 207, 110, .1); }
.badge.stage-surveyed { color: var(--amethyst); background: rgba(138, 99, 255, .12); }
.match-links { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .4rem; }
.match-label { color: var(--gold-soft); font-family: var(--fm); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; width: 100%; }
.match-links a { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .3rem .62rem; font-family: var(--fm); font-size: .72rem; color: var(--muted); text-decoration: none; transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast); }
.match-links a:hover { border-color: var(--teal); color: #fff; background: rgba(43, 227, 194, .1); }
.match-links a b { color: var(--gold); font-weight: 760; }
.opp-card.is-highlight, .data-card.is-highlight { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 20px 50px rgba(255, 207, 110, .15); }

/* ---------- Kintsugi seams ---------- */
.kintsugi-seam { position: relative; width: min(100%, var(--max)); height: 2.4rem; margin: clamp(1rem, 3vw, 2rem) auto; }
.kintsugi-seam svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 6px rgba(255, 207, 110, .45)); }
.kintsugi-seam .seam-path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease-out); }
.kintsugi-seam .seam-branch { stroke-width: 1.4; opacity: .68; transition-duration: .9s; transition-delay: 1.1s; }
.kintsugi-seam.is-drawn .seam-path { stroke-dashoffset: 0; }
.kintsugi-seam .seam-light { fill: none; stroke: #fff7e6; stroke-width: 2.6; stroke-linecap: round; stroke-dasharray: .05 .95; stroke-dashoffset: 1; opacity: 0; transition: opacity .8s ease 1.8s; }
.kintsugi-seam.is-drawn .seam-light { opacity: .75; animation: seam-flow 8s linear infinite; animation-delay: 2s; }
@keyframes seam-flow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: -1; } }
html:not(.js) .kintsugi-seam .seam-path { stroke-dashoffset: 0; transition: none; }
html:not(.js) .kintsugi-seam .seam-light { display: none; }
@media (prefers-reduced-motion: reduce) {
  .kintsugi-seam .seam-path { stroke-dashoffset: 0; transition: none; }
  .kintsugi-seam .seam-light { display: none; }
}

/* ---------- Reveal-on-scroll ---------- */
.reveal { opacity: 0; transform: translateY(22px); filter: blur(4px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out), filter var(--dur-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.is-visible { opacity: 1; transform: none; filter: none; transition: none; } }
html:not(.js) .reveal { opacity: 1; transform: none; filter: none; }

/* ---------- To-top ---------- */
.to-top { position: fixed; right: clamp(1rem, 3vw, 2rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 60; display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid rgba(255, 207, 110, .5); border-radius: 50%; background: rgba(14, 24, 38, .82); color: var(--gold); font: 760 1.1rem var(--fm); cursor: pointer; opacity: 0; transform: translateY(12px); pointer-events: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 8px 28px rgba(0,0,0,.4); transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast); }
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: rgba(255, 207, 110, .16); border-color: var(--gold); }

.load-error { border: 1px solid rgba(255, 207, 110, .5); border-radius: var(--radius-sm); color: var(--gold-soft); padding: 1rem; margin-top: 1.5rem; background: rgba(255, 207, 110, .05); }

/* ---------- Footer ---------- */
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.2rem; padding: 2.4rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); background: rgba(6, 8, 13, .78); margin-top: 2rem; }
.site-footer > div { display: grid; gap: .35rem; max-width: 44rem; }
.site-footer p { margin: 0; font-size: .86rem; color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.footer-links a { display: inline-grid; place-items: center; min-height: 2.35rem; padding: .45rem .72rem; border: 1px solid rgba(255, 207, 110, .35); border-radius: 999px; background: rgba(255, 207, 110, .08); color: var(--gold-soft); font: 700 .82rem var(--fm); letter-spacing: .03em; text-decoration: none; }
.footer-links a:hover { border-color: rgba(255, 207, 110, .7); background: rgba(255, 207, 110, .16); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .search-row { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .site-nav { order: 4; flex-basis: 100%; display: none; flex-direction: column; align-items: stretch; padding-top: .6rem; }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .7rem .8rem; }
  .nav-menu { width: 100%; }
  .nav-menu > summary { width: 100%; }
  .nav-drop { position: static; min-width: 0; border: 0; padding: 0 0 .2rem .8rem; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .split { grid-template-columns: 1fr; }
  .link-card-grid, .data-grid, .data-grid.two { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; gap: .2rem 0; }
  .detail-grid dt { margin-top: .55rem; }
  .field-list div { grid-template-columns: 1fr; gap: .2rem; }
}
@media (max-width: 600px) {
  h1 { max-width: 100%; font-size: clamp(2.1rem, 9vw, 2.9rem); }
  .opp-top { flex-direction: column; }
  .score { flex-direction: row; gap: .5rem; align-items: center; justify-items: start; }
  .stat-strip { grid-template-columns: 1fr; }
  .hero-actions .button { width: 100%; }
}
