/* NRP Investing — shared stylesheet
 *
 * Two themes, one set of tokens. Every colour below is a variable that gets
 * redefined under [data-theme="dark"], so components never hard-code a colour
 * and nothing has to be written twice. /js/theme.js sets the attribute in
 * <head> before first paint, which is what keeps the page from flashing white.
 */

:root {
  color-scheme: light;

  /* surfaces, from furthest back to closest */
  --bg:            #f6f7f9;
  --bg-deep:       #eceef2;
  --surface:       #ffffff;
  --surface-2:     #f2f4f7;
  --surface-3:     #e8ebf0;
  --border:        #e3e6ec;
  --border-strong: #cdd3dd;

  /* type */
  --text:  #0c1017;
  --ink:   #0c1017;
  --muted: #5b6577;
  --faint: #667082;   /* 4.9:1 on white — .faint is small text, so it has to clear AA */

  /* brand + state */
  --gold:        #a97a12;   /* fills: gradients, rules, dots */
  --gold-ink:    #8a6410;   /* the same idea at 5:1, for gold *text* on light */
  --gold-bright: #c9941f;
  --gold-soft:   #fdf6e4;
  --accent:      #1e2530;
  --accent-soft: #eef0f4;
  --pos:         #067a52;
  --pos-soft:    #e8f6f0;
  --neg:         #c02e26;
  --neg-soft:    #fdeeed;
  --warn:        #8a6220;
  --warn-soft:   #fdf6e6;
  --info:        #2450a8;
  --info-soft:   #eaf0fb;

  /* the glow behind the hero */
  --glow-a: rgba(201, 148, 31, .20);
  --glow-b: rgba(50, 92, 190, .16);
  --grid-line: rgba(12, 16, 23, .045);

  --btn-fg: #ffffff;
  --header-bg: rgba(255, 255, 255, .78);
  --scrim: rgba(12, 16, 23, .45);

  --shadow-sm: 0 1px 2px rgba(12, 16, 23, .05);
  --shadow:    0 1px 2px rgba(12, 16, 23, .04), 0 6px 20px -6px rgba(12, 16, 23, .10);
  --shadow-lg: 0 2px 4px rgba(12, 16, 23, .05), 0 24px 48px -12px rgba(12, 16, 23, .18);
  --ring: 0 0 0 3px rgba(30, 37, 48, .14);
}

:root[data-theme="dark"] {
  color-scheme: dark;

  --bg:            #080a0e;
  --bg-deep:       #04050a;
  --surface:       #101319;
  --surface-2:     #171b23;
  --surface-3:     #1f242e;
  --border:        #232833;
  --border-strong: #333a48;

  --text:  #e8ebf1;
  --ink:   #f4f6fa;
  --muted: #98a2b3;
  --faint: #7b8496;   /* 5:1 on the dark surface */

  --gold:        #e0ab3c;
  --gold-ink:    #e0ab3c;   /* already high-contrast on dark; no separate value needed */
  --gold-bright: #f0c04f;
  --gold-soft:   rgba(224, 171, 60, .12);
  --accent:      #f4f6fa;
  --accent-soft: rgba(244, 246, 250, .10);
  --pos:         #34c48b;
  --pos-soft:    rgba(52, 196, 139, .13);
  --neg:         #f4675c;
  --neg-soft:    rgba(244, 103, 92, .13);
  --warn:        #e0ab3c;
  --warn-soft:   rgba(224, 171, 60, .11);
  --info:        #7ba2f5;
  --info-soft:   rgba(123, 162, 245, .12);

  --glow-a: rgba(224, 171, 60, .16);
  --glow-b: rgba(74, 118, 226, .18);
  --grid-line: rgba(255, 255, 255, .035);

  --btn-fg: #0c1017;
  --header-bg: rgba(16, 19, 25, .72);
  --scrim: rgba(0, 0, 0, .65);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow:    0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .6);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 28px 56px -12px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(244, 246, 250, .16);
}

:root {
  --sans: 'Segoe UI Variable Text', 'Segoe UI', -apple-system, BlinkMacSystemFont,
          Inter, system-ui, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Segoe UI Variable Display', 'Segoe UI', -apple-system, BlinkMacSystemFont,
             Inter, system-ui, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 640;
  line-height: 1.15;
  letter-spacing: -.022em;
  margin: 0 0 .5em;
  color: var(--ink);
  text-wrap: balance;
}
h1 { font-size: clamp(2.1rem, 5.2vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.028em; }
h3 { font-size: 1.15rem; letter-spacing: -.018em; }
h4 { font-size: .95rem; font-weight: 660; letter-spacing: -.01em; }
p  { margin: 0 0 1em; }

a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-strong);
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
a:hover { color: var(--gold-ink); border-color: var(--gold-ink); }
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: 760px; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: .84rem; }
.center { text-align: center; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 66px;
}

.brand {
  font-family: var(--display);
  font-size: 1.06rem;
  font-weight: 680;
  letter-spacing: -.03em;
  color: var(--ink);
  border: none;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand:hover { color: var(--ink); }
.brand span { color: var(--gold-ink); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: linear-gradient(140deg, var(--gold-bright), var(--gold));
  display: grid; place-items: center; flex: none;
  box-shadow: 0 2px 8px -2px rgba(201, 148, 31, .55);
}
.brand-mark svg { width: 15px; height: 15px; display: block; }

.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  align-items: center;
}
.nav a {
  position: relative;
  color: var(--muted);
  border: none;
  font-size: .875rem;
  font-weight: 520;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--surface-2); }
.nav a.active { color: var(--ink); }
.nav a.active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--gold);
}
.nav .btn { border: 1px solid var(--accent); }
.nav .btn:hover { background: var(--accent); }
.nav .divider { width: 1px; height: 20px; background: var(--border); margin: 0 8px; flex: none; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; flex: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.icon-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--border); }
.icon-btn svg { width: 17px; height: 17px; display: block; }
.icon-btn .icon-moon { display: none; }
:root[data-theme="dark"] .icon-btn .icon-moon { display: block; }
:root[data-theme="dark"] .icon-btn .icon-sun { display: none; }

/* The nav sits before these buttons in the DOM and carries margin-left:auto,
   so on desktop it pushes itself and both buttons to the right edge. */
.nav-toggle { display: none; }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: .875rem; font-weight: 580; letter-spacing: -.008em;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--btn-fg);
  cursor: pointer;
  white-space: nowrap;
  transition: transform .12s var(--ease), box-shadow .16s var(--ease),
              background .16s var(--ease), border-color .16s var(--ease), opacity .16s;
}
.btn:hover { color: var(--btn-fg); transform: translateY(-1px); box-shadow: var(--shadow); opacity: .92; }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-gold {
  background: linear-gradient(140deg, var(--gold-bright), var(--gold));
  border-color: transparent;
  color: #1a1204;
}
.btn-gold:hover { color: #1a1204; box-shadow: 0 6px 20px -6px rgba(201, 148, 31, .6); }

.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--faint); }

.btn-danger { background: transparent; color: var(--neg); border-color: var(--border-strong); }
.btn-danger:hover { background: var(--neg-soft); color: var(--neg); border-color: var(--neg); }

.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), transform .18s var(--ease);
}
.card + .card { margin-top: 20px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 16px; flex-wrap: wrap;
}
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Interactive feature cards on the marketing page. */
.band .grid-3 > .card { position: relative; overflow: hidden; }
.band .grid-3 > .card::before {
  content: '';
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0; transition: opacity .25s var(--ease);
}
.band .grid-3 > .card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.band .grid-3 > .card:hover::before { opacity: 1; }

/* ------------------------------------------------------------------- stats */

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .18s var(--ease);
}
.stat:hover { border-color: var(--border-strong); }
.stat-label {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
  color: var(--faint); font-weight: 640; margin-bottom: 8px;
}
.stat-value {
  font-family: var(--display);
  font-size: 1.85rem; line-height: 1.05; font-weight: 620;
  letter-spacing: -.035em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.stat-sub { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

/* ------------------------------------------------------------------ tables */

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
table { width: 100%; border-collapse: collapse; font-size: .885rem; }
th, td {
  padding: 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
th {
  /* --muted, not --faint: 11px uppercase is small text and needs the full 4.5:1. */
  font-size: .7rem; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); font-weight: 640; white-space: nowrap;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
th:first-child { border-top-left-radius: var(--radius-sm); }
th:last-child { border-top-right-radius: var(--radius-sm); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s var(--ease); }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--muted); }

.rank-badge {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  font-weight: 660; font-size: .85rem;
  font-variant-numeric: tabular-nums;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
}
.rank-1 {
  background: linear-gradient(140deg, var(--gold-bright), var(--gold));
  color: #1a1204; border-color: transparent;
  box-shadow: 0 3px 12px -3px rgba(201, 148, 31, .6);
}
.rank-2 { background: linear-gradient(140deg, #cfd4dd, #aab2c0); color: #2a3040; border-color: transparent; }
.rank-3 { background: linear-gradient(140deg, #d8b48c, #b98f65); color: #38260f; border-color: transparent; }

/* ------------------------------------------------------------------- forms */

label { display: block; font-size: .82rem; font-weight: 560; color: var(--text); margin-bottom: 6px; }
.field { margin-bottom: 18px; }
.field-hint { font-size: .78rem; color: var(--muted); margin-top: 6px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=datetime-local], input[type=url], input[type=tel],
select, textarea {
  width: 100%; font: inherit; font-size: .9rem;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.55; font-family: var(--sans); }
textarea.tall { min-height: 210px; }
select {
  appearance: none;
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentcolor 50%),
                    linear-gradient(135deg, currentcolor 50%, transparent 50%);
  background-position: right 15px top 50%, right 10px top 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input[type=file] {
  font-size: .86rem; padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  width: 100%;
}
input[type=checkbox] { width: auto; margin-right: 7px; accent-color: var(--gold); }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
fieldset { border: none; padding: 0; margin: 0; }
.review-check { display: flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------ alerts/badges */

.alert {
  padding: 13px 16px; border-radius: var(--radius);
  font-size: .885rem; border: 1px solid; margin-bottom: 16px;
}
.alert-error { background: var(--neg-soft);  border-color: var(--neg);  color: var(--neg); }
.alert-ok    { background: var(--pos-soft);  border-color: var(--pos);  color: var(--pos); }
.alert-info  { background: var(--info-soft); border-color: var(--info); color: var(--info); }
.alert-warn  { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.alert p:last-child { margin-bottom: 0; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .715rem; font-weight: 620; letter-spacing: .01em;
  background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-buy     { background: var(--pos-soft);  color: var(--pos);   border-color: transparent; }
.badge-sell    { background: var(--neg-soft);  color: var(--neg);   border-color: transparent; }
.badge-gold    { background: var(--gold-soft); color: var(--gold-ink);  border-color: transparent; }
.badge-officer { background: var(--info-soft); color: var(--info);  border-color: transparent; }
.badge-pending { background: var(--warn-soft); color: var(--warn);  border-color: transparent; }

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

.hero {
  position: relative;
  /* Tuned so the facts strip still lands above the fold on a ~800px viewport. */
  padding: 84px 0 72px;
  overflow: hidden;
  background: var(--bg);
  isolation: isolate;
}
/* Two soft colour fields plus a fine grid — the depth comes from layering,
   not from a heavy dark slab. */
.hero::before {
  content: '';
  position: absolute; inset: -30% -10% auto -10%; height: 150%;
  z-index: -2;
  background:
    radial-gradient(46% 46% at 18% 12%, var(--glow-a), transparent 70%),
    radial-gradient(44% 44% at 82% 28%, var(--glow-b), transparent 70%);
  animation: drift 22s var(--ease) infinite alternate;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(70% 60% at 50% 35%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(70% 60% at 50% 35%, #000 30%, transparent 100%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

.hero .wrap { position: relative; max-width: 900px; }
.hero h1 { margin-bottom: .28em; }
/* Short, fixed label. The editable tagline goes below the headline instead,
   because officer-written copy is a full sentence and would burst the pill. */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .76rem; font-weight: 620;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--gold-ink);
  background: var(--gold-soft);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  padding: 6px 15px 6px 12px; border-radius: 999px;
  margin: 0 0 26px;
}
.pulse {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--gold);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 60%, transparent);
  animation: pulse 2.4s var(--ease) infinite;
}
@keyframes pulse {
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero .tagline:empty { display: none; }
.hero .tagline {
  font-size: 1.28rem; line-height: 1.45; font-weight: 500;
  letter-spacing: -.015em;
  color: var(--text);
  max-width: 44ch;
  margin: 0 0 .7em;
}
.hero .blurb {
  font-size: 1.13rem; line-height: 1.62;
  color: var(--muted); max-width: 60ch;
}
.hero .btn-row { margin-top: 32px; }

/* Numbers strip under the hero copy. */
.hero-facts {
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-top: 46px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.hero-fact { background: var(--surface); padding: 20px 22px; }
.hero-fact strong {
  display: block; font-family: var(--display); font-size: 1.5rem;
  font-weight: 620; letter-spacing: -.03em; color: var(--ink); line-height: 1.1;
}
.hero-fact span { font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------------- bands */

section.band { padding: 84px 0; position: relative; }
section.band-alt { background: var(--bg-deep); border-block: 1px solid var(--border); }
.section-label {
  display: block;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .13em;
  color: var(--gold-ink); font-weight: 680; margin-bottom: 12px;
}
.band h2 { max-width: 22ch; }
.band .narrow h2, .hero h2 { max-width: none; }

.prose { font-size: 1rem; color: var(--muted); }
.prose p { margin-bottom: 1.1em; }
.prose strong { color: var(--text); font-weight: 620; }
.prose ul { padding-left: 1.15em; }
.prose li { margin-bottom: .45em; }
.prose h3 { margin-top: 1.7em; color: var(--ink); }
.prose table { margin: 1.3em 0; }
.prose code {
  font-family: var(--mono); font-size: .86em;
  background: var(--surface-2); color: var(--text);
  padding: 2px 6px; border-radius: 5px;
  border: 1px solid var(--border);
}

.speaker-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 22px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.speaker-card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.speaker-card h3 { margin-bottom: 3px; font-size: 1.05rem; }
.speaker-role { font-size: .84rem; color: var(--gold-ink); font-weight: 600; margin-bottom: 10px; }
.speaker-topic { color: var(--muted); margin-bottom: 8px; font-size: .92rem; }

.prize-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 16px 0; border-bottom: 1px solid var(--border);
}
.prize-row:last-child { border-bottom: none; }
.prize-row h4 { margin: 0 0 3px; }

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

.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: 56px 0 40px;
  font-size: .9rem;
  margin-top: 88px;
}
.footer a { color: var(--muted); border: none; }
.footer a:hover { color: var(--gold-ink); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.footer h4 {
  color: var(--ink); font-size: .74rem; text-transform: uppercase;
  letter-spacing: .11em; margin-bottom: 12px; font-weight: 660;
}
.footer-bottom {
  margin-top: 40px; padding-top: 22px; font-size: .82rem;
  border-top: 1px solid var(--border); color: var(--faint);
}

/* --------------------------------------------------------------- app pages */

.page-head { padding: 44px 0 6px; }
.page-head h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin-bottom: .25em; }
.page-body { padding-bottom: 88px; }

.tabs {
  display: flex; gap: 4px; margin-bottom: 26px;
  overflow-x: auto; scrollbar-width: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  padding: 8px 16px; font-size: .865rem; font-weight: 560;
  color: var(--muted); background: none; border: none;
  border-radius: 8px; cursor: pointer; white-space: nowrap;
  font-family: inherit;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); background: var(--surface); box-shadow: var(--shadow-sm); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fade-up .3s var(--ease); }

.score-bar {
  display: flex; height: 10px; border-radius: 999px;
  overflow: hidden; background: var(--surface-3); margin-top: 8px;
}
.score-seg { height: 100%; transition: width .5s var(--ease); }
.seg-return         { background: var(--gold); }
.seg-sharpe         { background: #4a76e2; }
.seg-drawdown       { background: #8b5cf6; }
.seg-diversification{ background: #14b8a6; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); margin-top: 10px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; }

.spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid color-mix(in srgb, currentcolor 25%, transparent);
  border-top-color: currentcolor;
  border-radius: 50%; animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading { padding: 52px; text-align: center; color: var(--muted); font-size: .9rem; }

dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0; max-width: 580px; width: calc(100% - 32px);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
dialog[open] { animation: pop .22s var(--ease); }
.dialog-body { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.dialog-head h3 { margin: 0; }
.close-x {
  background: none; border: none; font-size: 1.4rem; line-height: 1;
  color: var(--faint); cursor: pointer; padding: 0 4px; border-radius: 6px;
}
.close-x:hover { color: var(--text); }

.drop-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px 24px; text-align: center;
  background: var(--surface-2);
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.drop-zone.dragging { border-color: var(--gold); background: var(--gold-soft); transform: scale(1.01); }
.drop-zone h4 { margin-bottom: 8px; font-size: 1.02rem; }

.flag-list { list-style: none; padding: 0; margin: 10px 0 0; }
.flag-list li {
  font-size: .84rem; color: var(--warn);
  padding: 9px 13px; background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  border-radius: var(--radius-sm); margin-bottom: 7px;
}

.video-embed {
  position: relative; padding-bottom: 56.25%; height: 0;
  border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2);
}
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ------------------------------------------------------------------ motion */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

/* Applied by /js/api.js on scroll. Elements stay visible if JS never runs. */
.reveal { opacity: 0; transform: translateY(16px); }
.reveal.shown { opacity: 1; transform: none; transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

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

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .site-header .wrap { flex-wrap: wrap; gap: 10px; }
  .nav {
    display: none;
    order: 3; width: 100%; margin-left: 0;
    flex-direction: column; align-items: stretch;
    gap: 2px; padding: 8px 0 14px;
    border-top: 1px solid var(--border);
  }
  .nav.open { display: flex; animation: fade-up .22s var(--ease); }
  .nav a { padding: 11px 12px; font-size: .95rem; }
  .nav a.active::after { left: 12px; right: auto; width: 18px; bottom: 6px; }
  .nav .divider { width: 100%; height: 1px; margin: 8px 0; }
  .nav .btn { margin-left: 0 !important; justify-content: center; }
  /* The nav drops to its own row, so the toggle takes over pushing right. */
  .theme-toggle { margin-left: auto; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 18px; }
  .card { padding: 20px; border-radius: var(--radius); }
  .hero { padding: 72px 0 64px; }
  /* auto-fit gives 2 columns at this width, which strands the third fact. */
  .hero-facts { margin-top: 40px; grid-template-columns: 1fr; }
  section.band { padding: 56px 0; }
  .page-head { padding-top: 32px; }
  .band h2 { max-width: none; }
  th, td { padding: 10px 11px; }
  .footer { margin-top: 56px; padding: 40px 0 32px; }
}
