/* Truvex Research — matte black, brushed gold, cream (palette from apps/truvex-research-app/src/theme.ts) */
:root {
  --bg: #05060A;
  --surface: #0D0E13;
  --raised: #15161D;
  --border: #262219;
  --border-strong: #4A3916;
  --gold: #C9A227;
  --gold-light: #E8CE7A;
  --gold-deep: #8A6C24;
  --cream: #FFFAE8;
  --text: #F3EEDF;
  --muted: #A39C8B;
  --faint: #6D675A;
  --on-gold: #140F04;
  --head: 'Montserrat', system-ui, sans-serif;
  --body: 'Source Serif 4', Georgia, serif;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 18px/1.65 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-light); text-decoration-color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
h1, h2, h3, h4 { font-family: var(--head); color: var(--cream); line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.4vw, 44px); font-weight: 700; }
h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.center { text-align: center; }
.eyebrow, .kicker { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 600; color: var(--gold); margin: 0 0 .7em; }
.kicker a { color: var(--gold); text-decoration: none; }
.sched { color: var(--cream); background: var(--gold-deep); padding: 1px 6px; border-radius: 3px; }
.lede { font-size: 21px; color: var(--muted); }

.preview-bar { background: var(--gold); color: var(--on-gold); font: 600 13px/1 var(--head); text-align: center; padding: 9px 16px; letter-spacing: .05em; }
.site-header { border-bottom: 1px solid var(--border); background: rgba(5,6,10,.92); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.brand img { width: 170px; }
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { font: 500 14px var(--head); color: var(--text); text-decoration: none; letter-spacing: .03em; }
.nav a:hover, .nav a[aria-current] { color: var(--gold-light); }

.masthead { padding: 72px 0 56px; background: radial-gradient(1200px 400px at 70% 0%, rgba(201,162,39,.16), transparent 70%), linear-gradient(180deg, #0B0B0F, var(--bg)); border-bottom: 1px solid var(--border); }
.masthead h1 { max-width: 820px; }
.masthead .lede { max-width: 680px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; font: 600 14px var(--head); letter-spacing: .06em; text-transform: uppercase; padding: 13px 22px; border-radius: 4px; background: linear-gradient(180deg, var(--gold-light), var(--gold) 55%, var(--gold-deep)); color: var(--on-gold); text-decoration: none; border: 1px solid var(--gold); }
.btn:hover { color: var(--on-gold); filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--gold-light); }
.more { font: 600 14px var(--head); text-transform: uppercase; letter-spacing: .08em; }

.lead { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; align-items: center; padding-top: 48px; padding-bottom: 32px; }
.lead img, .lead .hero-fallback { border-radius: 6px; border: 1px solid var(--border); }
.lead h2 a { color: var(--cream); text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 24px 0 48px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; }
.card:hover { border-color: var(--border-strong); }
.card-img img, .card-img .hero-fallback { aspect-ratio: 2 / 1; width: 100%; object-fit: cover; }
.card-body { padding: 18px 20px 22px; }
.card h3 a { color: var(--cream); text-decoration: none; }
.card h3 a:hover { color: var(--gold-light); }
.card p:last-child { color: var(--muted); font-size: 16px; margin: 0; }
.hero-fallback { aspect-ratio: 2 / 1; width: 100%; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(201,162,39,.22), transparent 60%), linear-gradient(135deg, #15161D, #05060A); }
.hero-fallback img { width: 72px; opacity: .9; }

.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 48px 0; }
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.topic { display: block; padding: 22px; border: 1px solid var(--border); border-radius: 6px; text-decoration: none; background: var(--bg); }
.topic:hover { border-color: var(--gold-deep); }
.topic p { color: var(--muted); font-size: 16px; margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 56px; padding-bottom: 64px; }

.page-head { padding-top: 56px; padding-bottom: 8px; }
.article-head { padding-top: 56px; }
.byline { font: 500 14px var(--head); color: var(--muted); }
.article-hero { margin: 28px auto 8px; max-width: 1000px; }
.article-hero img, .article-hero .hero-fallback { border-radius: 6px; border: 1px solid var(--border); }
.prose { padding-bottom: 56px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.5em; }
.prose blockquote { margin: 1.4em 0; padding: .2em 1.2em; border-left: 3px solid var(--gold); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; margin: 1.4em 0; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { font-family: var(--head); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); background: var(--surface); }
.prose code { background: var(--raised); padding: 1px 5px; border-radius: 3px; font-size: .9em; }
.sources { margin-top: 3em; border-top: 1px solid var(--border); padding-top: 1em; font-size: 16px; }
.sources li { margin-bottom: .5em; }
.related { margin-top: 2em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: 500 14px var(--head); padding: 6px 12px; border: 1px solid var(--border-strong); border-radius: 999px; text-decoration: none; }
.notice { margin-top: 2.5em; padding: 16px 18px; border: 1px solid var(--border); border-left: 3px solid var(--gold-deep); background: var(--surface); color: var(--muted); font-size: 15px; border-radius: 4px; }
.more-head { margin-top: 8px; }
.article-list { padding-left: 1.1em; }

.area { margin-top: 1.6em; font-size: 20px; color: var(--gold-light); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.lib-card { display: block; padding: 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); text-decoration: none; }
.lib-card:hover { border-color: var(--gold-deep); }
.lib-card h3 { margin-bottom: .3em; }
.lib-card p { color: var(--muted); font-size: 15px; margin: 0; }

.calc { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; padding: 22px; margin: 1.6em 0; font-family: var(--head); }
.calc h3 { margin-top: 0; }
.calc-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.calc label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.calc input, .calc select { width: 100%; font: 500 16px var(--head); padding: 10px; border-radius: 4px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--cream); }
.calc output { display: block; margin-top: 16px; padding: 14px; border-radius: 4px; background: var(--bg); border: 1px solid var(--border); color: var(--cream); font-size: 16px; line-height: 1.6; }
.calc output strong { color: var(--gold-light); }

.site-footer { border-top: 1px solid var(--border); background: #030305; padding: 48px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 28px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); }
.footer-grid a { display: block; color: var(--text); text-decoration: none; margin-bottom: 6px; }
.footer-grid a:hover { color: var(--gold-light); }
.footer-logo { width: 150px; margin-bottom: 10px; }
.ruo, .disclosure { color: var(--muted); max-width: 900px; }
.disclosure { color: var(--faint); }

@media (max-width: 900px) {
  .grid, .lib-grid { grid-template-columns: 1fr 1fr; }
  .topics { grid-template-columns: 1fr 1fr; }
  .lead, .split { grid-template-columns: 1fr; gap: 20px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .grid, .lib-grid, .topics, .calc-row, .footer-grid { grid-template-columns: 1fr; }
  .nav { gap: 14px; }
  .masthead { padding: 48px 0 40px; }
}
