/* AIstocks.forum — one stylesheet, no external requests. */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
  font-weight: 100 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #eeebe4;
  --ink: #101619;
  --ink-2: #2b3338;
  --muted: #5d666c;
  --line: #e1ddd3;
  --line-strong: #cbc5b8;
  --accent: #0e6b55;
  --accent-ink: #ffffff;
  --accent-soft: #dbece5;
  --gold: #b88a2c;
  --up: #0b7a50;
  --down: #b42318;
  --warn-bg: #fff4d6;
  --warn-line: #e3b341;
  --hero-bg: #0d1b1e;
  --hero-bg-2: #12282c;
  --hero-ink: #f2f5f4;
  --hero-muted: #9fb3b0;
  --hero-line: rgba(255, 255, 255, .12);
  --hero-accent: #7fd6bd;
  --logo-bg: #101619;
  --logo-ink: #f5f3ee;
  --radius: 16px;
  --shadow: 0 1px 0 rgba(16, 22, 25, .04), 0 10px 30px -14px rgba(16, 22, 25, .16);
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0f11;
    --surface: #11181b;
    --surface-2: #172024;
    --ink: #e8eceb;
    --ink-2: #c9d1cf;
    --muted: #93a19e;
    --line: #223034;
    --line-strong: #2f4045;
    --accent: #6fd0b3;
    --accent-ink: #052a21;
    --accent-soft: #123a31;
    --gold: #d9b25e;
    --up: #4fd39a;
    --down: #ff7a6b;
    --warn-bg: #3a2e0c;
    --warn-line: #b58a1c;
    --hero-bg: #0e1d20;
    --hero-bg-2: #13292d;
    --logo-bg: #e8eceb;
    --logo-ink: #0a0f11;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 14px 34px -18px rgba(0, 0, 0, .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; overflow-x: clip;
  background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  font-feature-settings: "cv08", "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 28px; }
.bleed { width: 100vw; margin-left: calc(50% - 50vw); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 30; }
.skip:focus { left: 12px; }
.small { font-size: 14px; line-height: 1.55; }
.muted { color: var(--muted); }

/* ---------- preview banner and unfinished values */
.preview-banner {
  position: sticky; top: 0; z-index: 25;
  background: var(--warn-bg); border-bottom: 1px solid var(--warn-line);
  color: var(--ink); font-size: 14px; text-align: center; padding: 8px 16px;
}
mark.todo { background: var(--warn-bg); color: var(--ink); outline: 1px dashed var(--warn-line); border-radius: 4px; padding: 0 .3em; font-size: .9em; }

/* ---------- masthead */
.masthead {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--hero-bg) 94%, transparent);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--hero-line);
}
.preview-banner + .masthead { top: 37px; }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hero-ink); text-decoration: none; }
.logo-mark { width: 30px; height: 30px; color: var(--logo-bg); flex: none; }
.logo-mark .logo-line { stroke: var(--logo-ink); }
.logo-mark .logo-dot { fill: var(--logo-ink); }
.masthead .logo-mark { color: var(--hero-accent); }
.masthead .logo-mark .logo-line { stroke: var(--hero-bg); }
.masthead .logo-mark .logo-dot { fill: var(--hero-bg); }
.wordmark { font-weight: 700; font-size: 19px; letter-spacing: -.02em; }
.wordmark .tld { color: var(--muted); font-weight: 500; }
.masthead .wordmark .tld { color: var(--hero-muted); }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--hero-muted); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 13px; border-radius: 999px; }
.nav a:hover { color: var(--hero-ink); background: rgba(255, 255, 255, .07); }
.nav a[aria-current="page"] { color: var(--hero-ink); background: rgba(255, 255, 255, .12); }

/* ---------- shared type */
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.12; margin: 0; color: var(--ink); }
h1 { font-size: clamp(36px, 5.4vw, 64px); font-variation-settings: "opsz" 60; }
.eyebrow {
  margin: 0 0 16px; font: 600 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center; gap: 10px;
}
.lede { font-size: 19px; line-height: 1.6; color: var(--ink-2); max-width: 60ch; margin: 20px 0 0; }
.empty { color: var(--muted); font-style: italic; padding: 24px 0; }
.section-title { font-size: clamp(26px, 3vw, 34px); margin: 0 0 22px; }

.status {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  font: 600 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
}
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { background: var(--accent); color: var(--accent-ink); }
.status-upcoming { border: 1px solid var(--line-strong); color: var(--ink-2); }

/* ---------- hero */
.hero {
  color: var(--hero-ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(127, 214, 189, .16), transparent 60%),
    radial-gradient(900px 400px at -10% 120%, rgba(184, 138, 44, .12), transparent 60%),
    linear-gradient(180deg, var(--hero-bg), var(--hero-bg-2));
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(var(--hero-line) 1px, transparent 1px), linear-gradient(90deg, var(--hero-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%); mask-image: linear-gradient(180deg, rgba(0,0,0,.55), transparent 85%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 48px; padding: 72px 28px 64px; align-items: end; }
.hero h1 { color: var(--hero-ink); max-width: 15ch; }
.hero .lede { color: #cfdcda; }
.hero .eyebrow { color: var(--hero-muted); }
.hero .status-live { background: var(--hero-accent); color: #062a22; }
.hero .status-upcoming { border-color: rgba(255, 255, 255, .28); color: var(--hero-ink); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 40px 0 0; border-top: 1px solid var(--hero-line); }
.stat { padding: 16px 16px 0 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--hero-line); }
.stat dt { font: 600 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--hero-muted); }
.stat dd { margin: 8px 0 0; font: 600 20px/1.2 var(--serif); color: var(--hero-ink); font-feature-settings: "tnum"; }
.latest {
  background: rgba(255, 255, 255, .06); border: 1px solid var(--hero-line); border-radius: var(--radius);
  padding: 24px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; flex-direction: column;
}
.latest .eyebrow { color: var(--hero-muted); margin-bottom: 10px; }
.latest-date { font: 600 28px/1.15 var(--serif); margin: 0 0 14px; }
.latest .small { color: #cfdcda; margin: 0 0 18px; }
.latest .more { color: var(--hero-accent); }
.latest .ticker { background: rgba(255, 255, 255, .92); color: var(--hero-bg); }
.latest .ticker.ghost { background: transparent; color: var(--hero-ink); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.latest .muted { color: var(--hero-muted); }
.summary { margin: 0 0 18px; display: grid; gap: 10px; }
.summary div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; }
.summary dt { font: 600 11px/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.latest .summary dt { color: var(--hero-muted); }
.summary dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- blocks and tables */
.block { margin: 48px 0 0; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; margin-bottom: 16px; }
.block-head h2 { font-size: clamp(26px, 3vw, 34px); }
.block-head p { margin: 0; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 22px; color: var(--muted); font-size: 14px; }
.meta strong { color: var(--ink-2); font-weight: 600; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-feature-settings: "tnum", "cv08", "cv11"; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
thead th { font: 600 11.5px/1.2 var(--sans); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
td.num, th.num { text-align: right; white-space: nowrap; }
td.idx { color: var(--muted); width: 1%; }
.ticker {
  display: inline-block; font: 700 12.5px/1 var(--mono); letter-spacing: .04em;
  padding: 6px 8px; border-radius: 7px; background: var(--ink); color: var(--bg);
}
.ticker.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.company { font-weight: 600; }
.company .exch { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
.flag { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--gold); border: 1px solid currentColor; border-radius: 999px; padding: 2px 8px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line-strong); color: var(--ink-2); }
.chip-new, .chip-added, .chip-increased { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.chip-reduced { background: var(--surface-2); }
.links { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; }
.links a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 500; }
.links a:hover { text-decoration: underline; }
.links svg { width: 13px; height: 13px; }
.sold { margin: 14px 4px 0; color: var(--muted); }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--muted); }
table.plain td, table.plain th { font-size: 15px; }
table.changes td .ticker { margin: 2px 2px 2px 0; }

/* ---------- disclosure line */
.disclosure-line {
  margin: 32px 0 0; padding: 16px 20px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0; color: var(--ink-2); font-size: 14px;
}

/* ---------- principles */
.principles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 56px 0 0; }
.principle { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.principle svg { width: 26px; height: 26px; color: var(--accent); }
.principle h3 { font-size: 20px; margin: 14px 0 6px; }
.principle p { margin: 0; color: var(--ink-2); font-size: 15px; }

/* ---------- how it works */
.steps { margin: 72px 0 0; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--line); }
.step-no { margin: 16px 0 4px; font: 600 12px/1 var(--mono); color: var(--gold); letter-spacing: .08em; }
.step h3 { font-size: 24px; margin: 0 0 8px; }
.step p:last-child { margin: 0; color: var(--ink-2); font-size: 15px; }
.step-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.step-icon svg { width: 22px; height: 22px; }

/* ---------- cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 56px 0 72px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 24px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); }
.card .eyebrow { margin-bottom: 12px; }
.card-title { font-size: 23px; margin: 0 0 8px; }
.card .small { color: var(--ink-2); margin: 0 0 18px; }
.bignum { font: 600 44px/1 var(--serif); margin: 0 0 10px; font-feature-settings: "tnum"; }
.more { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: none; }
.more svg { width: 16px; height: 16px; transition: transform .15s ease; }
.more:hover svg { transform: translateX(3px); }

/* ---------- inner pages */
.page-head { padding: 56px 0 24px; }
.page-head h1 { font-size: clamp(34px, 4.4vw, 52px); }
.page-head .summary { margin-top: 8px; max-width: 640px; }
.prose { max-width: 70ch; padding-bottom: 64px; }
.prose h2 { font-size: 27px; margin: 44px 0 10px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin: 6px 0; }
.prose blockquote { margin: 20px 0; padding: 4px 18px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.note { padding-bottom: 0; }
main > h2 { font-size: 26px; margin: 40px 0 14px; }
main > .table-wrap { margin-bottom: 8px; }
.pager { display: flex; justify-content: space-between; gap: 16px; margin: 32px 0 64px; font-weight: 600; }
.pager a { text-decoration: none; }

.note-date { color: var(--muted); font-size: 14px; font-feature-settings: "tnum"; }
.plain-list { list-style: none; padding: 0; margin: 0 0 64px; }
.plain-list li { padding: 12px 0; border-top: 1px solid var(--line); }

/* ---------- footer */
.footer { background: var(--hero-bg); color: var(--hero-muted); margin-top: 40px; padding: 48px 0 28px; }
.footer a { color: #cfdcda; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.footer-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--hero-ink); margin: 0 0 12px; }
.footer .logo-mark { color: var(--hero-accent); }
.footer .logo-mark .logo-line { stroke: var(--hero-bg); }
.footer .logo-mark .logo-dot { fill: var(--hero-bg); }
.footer .wordmark .tld { color: var(--hero-muted); }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 9px 30px; align-content: start; }
.footer-links a { text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--hero-accent); }
.publisher p { margin: 0; }
.publisher strong { color: var(--hero-ink); }
.footer-base { border-top: 1px solid var(--hero-line); margin-top: 32px; padding-top: 18px; }

/* ---------- small screens */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; padding: 52px 28px 44px; align-items: start; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 22px 0 6px; border-left: 0; border-top: 1px solid var(--line); }
  .step:first-child { border-top: 0; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero-grid { padding: 40px 16px 36px; }
  .masthead { position: static; }
  .masthead-inner { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 0 10px; }
  .nav { flex-wrap: nowrap; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .nav a { white-space: nowrap; padding: 7px 11px; }
  .lede { font-size: 17px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { margin-top: 14px; }
  .principles { grid-template-columns: 1fr; }
  table.holdings thead { display: none; }
  table.holdings, table.holdings tbody, table.holdings tr, table.holdings td { display: block; width: 100%; }
  table.holdings tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; }
  table.holdings tr:last-child { border-bottom: 0; }
  table.holdings td { padding: 0; border: 0; }
  table.holdings td.idx, table.holdings td.num { display: none; }
  table.holdings td:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

@media print {
  body { background: #fff; color: #000; }
  .masthead .nav, .footer-links, .skip, .preview-banner { display: none; }
  .hero, .footer { background: #fff; color: #000; }
  .table-wrap, .card { box-shadow: none; }
  a { color: #000; }
}
