/* Structure and layout only. All colors, fonts and shapes come from static/css/themes/<name>.css. */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--text-base); line-height: var(--leading); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-heading); font-weight: var(--heading-weight); line-height: var(--heading-leading); letter-spacing: var(--heading-tracking); margin: 0 0 .5em; }
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); margin-top: 2em; }
h3 { font-size: var(--h3); margin-top: 1.5em; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 8px; z-index: 10; }
.muted { color: var(--muted); }
.eyebrow { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: var(--eyebrow-tracking); font-size: .78rem; font-weight: 600; color: var(--accent); margin-bottom: .6em; }

/* header */
.site-header { position: sticky; top: 0; z-index: 5; background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--header-line); overflow: hidden; }
.site-header .tile { position: absolute; border-radius: 16px; background: var(--tile); transform: rotate(-18deg); pointer-events: none; }
.site-header .dots { position: absolute; width: 90px; height: 60px; background-image: radial-gradient(var(--dots) 1.4px, transparent 1.6px); background-size: 10px 10px; pointer-events: none; }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--header-text); }
.brand-mark { width: 44px; height: 44px; border-radius: 50%; display: block; }
.brand-text { font-family: var(--font-display); font-size: 1.6rem; line-height: 1; letter-spacing: .01em; }
.brand-tagline { font-family: var(--font-ui); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--header-text-2); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.brand-tagline img { height: 14px; width: auto; }
.nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-family: var(--font-ui); }
.nav a { text-decoration: none; color: var(--header-text); font-weight: 500; font-size: .95rem; }
.nav a:hover { color: var(--accent); }
.nav-cta { background: var(--accent); color: var(--button-text) !important; padding: 9px 16px; border-radius: var(--radius-pill); font-weight: 600 !important; }
.nav-cta:hover { background: var(--accent-2); color: var(--button-text) !important; }
.stripe { height: var(--stripe-h); background: var(--stripe); }

/* hero */
.hero { padding-block: clamp(48px, 8vw, 96px); background: radial-gradient(1200px 400px at 20% -10%, var(--hero-glow) 0%, transparent 60%), var(--bg); border-bottom: 1px solid var(--line); }
.hero h1 { max-width: 16ch; }
.lede { font-size: 1.2rem; color: var(--ink-2); max-width: 62ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 1.5em; }
.button { display: inline-block; font-family: var(--font-ui); background: var(--accent); color: var(--button-text); text-decoration: none; padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 600; }
.button:hover { background: var(--accent-2); color: var(--button-text); }
.button.secondary { background: transparent; color: var(--ink); border: 1.5px solid var(--ink-2); }
.button.secondary:hover { border-color: var(--accent); color: var(--accent); }

/* cards */
.section-title { margin-top: 2.2em; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; margin-top: 1em; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.card-image img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.card-body { padding: 18px 20px 22px; }
.card h3 { margin: .2em 0 .4em; font-size: var(--h3); }
.card h3 { font-size: 1.7rem; } .card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card-dek { color: var(--ink-2); font-size: 1rem; margin-bottom: .6em; }
.card-meta { font-family: var(--font-ui); color: var(--muted); font-size: .8rem; margin: 0; }
.more { margin-top: 1.5em; }
.upcoming { padding-bottom: 48px; }
.upcoming-list { columns: 2; column-gap: 40px; padding-left: 1.2em; }
@media (max-width: 640px) { .upcoming-list { columns: 1; } }

/* CTA */
.cta { margin: 2.5em 0; background: var(--cta-bg); color: var(--cta-text); border-radius: var(--radius); padding: 28px 30px; }
.cta h3 { margin: .2em 0 .4em; color: var(--cta-text); font-size: 2rem; }
.cta p, .cta-fine { font-family: var(--font-ui); font-size: .95rem; }
.cta p { color: var(--cta-text-2); }
.cta-kicker { text-transform: uppercase; letter-spacing: var(--eyebrow-tracking); font-size: .75rem; font-weight: 600; color: var(--cta-kicker); margin-bottom: .4em; }
.cta .button { background: var(--cta-button-bg); color: var(--cta-button-text); margin-top: .4em; }
.cta .button:hover { background: var(--cta-button-hover); }
.cta-fine { font-size: .82rem; margin: 1em 0 0; color: var(--cta-fine); }
.cta.inline { margin: 2.5em 0; }
.cta.side { margin: 0 0 2em; padding: 22px; }
.cta.side h3 { font-size: 1.7rem; }

/* article */
.article-head { padding-top: clamp(32px, 5vw, 64px); max-width: 820px; }
.article-head h1 { max-width: 20ch; }
.dek { font-size: 1.3rem; color: var(--ink-2); font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.article-meta { font-family: var(--font-ui); color: var(--muted); font-size: .85rem; }
.hero-still { margin: 1.5em auto 0; }
.hero-still img, .inline-still img { border-radius: var(--radius); width: 100%; background: var(--media-bg); border: var(--ring) solid var(--silver); box-sizing: border-box; }
figcaption { font-family: var(--font-ui); font-size: .82rem; color: var(--muted); margin-top: .5em; }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 300px; gap: 56px; padding-block: 2em 4em; align-items: start; }
@media (max-width: 960px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .sidebar { max-width: 720px; } }
.article-body p { max-width: 68ch; }
.article-body h2 { margin-top: 1.8em; }
.takeaways { background: var(--surface); box-shadow: var(--shadow); border-left: var(--rule) solid var(--brand-2); padding: 20px 24px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin-bottom: 1.5em; }
.takeaways h2 { margin: 0 0 .5em; font-size: var(--h3); }
.takeaways ul { margin: 0; padding-left: 1.2em; }
.takeaways li { margin-bottom: .4em; }
a.ts { font-family: var(--font-ui); font-variant-numeric: tabular-nums; font-size: .72em; font-weight: 600; color: var(--button-text); background: var(--accent); padding: 1px 7px; border-radius: var(--radius-pill); text-decoration: none; margin-left: 4px; white-space: nowrap; }
a.ts::before { content: "\25B6\00a0"; font-size: .7em; }
a.ts:hover { background: var(--accent-2); color: var(--button-text); }
.pullquote { margin: 2.2em 0; padding: 22px 0 0 0; border-top: var(--quote-rule); }
.pullquote p { font-family: var(--font-heading); font-size: 2rem; line-height: 1.1; color: var(--quote); font-weight: var(--heading-weight); margin-bottom: .5em; }
.pullquote footer { font-size: .9rem; color: var(--muted); }
.pullquote footer a { font-weight: 600; text-decoration: none; }
.inline-still { margin: 2.2em 0; }
.metrics { margin-top: 2.5em; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1em 0 1.5em; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-ui); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table { font-family: var(--font-ui); }
td.num { font-weight: 600; white-space: nowrap; }
.metrics-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.metrics-head h2 { margin-bottom: .3em; }
.linkish { background: none; border: 0; padding: 0; font: inherit; font-family: var(--font-ui); font-size: .9rem; color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--accent); }
.modal { border: 0; border-radius: var(--radius); padding: 0; max-width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.25); }
.modal::backdrop { background: rgba(20, 15, 12, .55); }
.modal-inner { position: relative; padding: 28px 30px 24px; font-family: var(--font-ui); font-size: .95rem; line-height: 1.55; }
.modal-inner h3 { margin: 0 0 .6em; font-size: var(--h3); }
.modal-inner h4 { font-family: var(--font-ui); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.4em 0 .5em; }
.modal-inner ul { padding-left: 1.2em; margin: 0 0 1em; }
.modal-inner li { margin-bottom: .5em; }
.modal-close { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 6px; }
.modal-close:hover { color: var(--ink); }
.not-covered { margin: .6em 0 1.4em; font-family: var(--font-ui); font-size: .9rem; color: var(--muted); }
.not-covered summary { cursor: pointer; }
.not-covered ul { columns: 2; column-gap: 32px; padding-left: 1.2em; margin: .6em 0 0; }
.not-covered li { font-size: .85rem; margin-bottom: .2em; break-inside: avoid; }
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); font-family: var(--font-ui); margin: 1.5em 0; }
.ask.side { padding: 18px; margin: 0 0 1.5em; }
.ask-label { font-family: var(--font-heading); font-size: var(--h3); display: block; margin-bottom: .5em; color: var(--ink); }
.ask-row { display: flex; gap: 10px; }
.ask-input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 1rem; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); color: var(--ink); }
.ask-input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.ask-button { flex: 0 0 auto; padding: 11px 18px; }
.ask-fine { font-size: .78rem; color: var(--muted); margin: .6em 0 0; }
.ask-answer { margin-top: 1em; padding-top: 1em; border-top: 1px dashed var(--line); font-family: var(--font-body); }
.ask-text p { margin: 0 0 .8em; } .ask-text ul { padding-left: 1.2em; margin: 0 0 .8em; }
.ask-text a.cite { font-family: var(--font-ui); font-size: .8em; color: var(--accent-2); text-decoration: none; }
.ask-src-head { font-family: var(--font-ui); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .8em 0 .3em; }
.ask-related { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 .4em; font-family: var(--font-ui); font-size: .9rem; }
.ask-rel { text-decoration: none; background: var(--accent-soft); color: var(--accent-2); border-radius: var(--radius-pill); padding: 5px 12px; font-weight: 600; }
.ask-rel:hover { background: var(--accent); color: var(--button-text); }
.ask-sources { font-family: var(--font-ui); font-size: .9rem; padding-left: 1.2em; margin: 0; }
.ask-sources li { margin-bottom: .3em; }
.ask.side .ask-row { flex-direction: column; } .ask.side .ask-label { font-size: 1.2rem; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 1em; font-family: var(--font-ui); font-size: .85rem; }
.jump a { text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 5px 12px; color: var(--ink-2); }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.metric-list { padding-top: 2.5em; }
.metric-list-head p { margin: 0 0 .8em; font-family: var(--font-ui); font-size: .9rem; }
.ranked { list-style: none; padding: 0; margin: 0; font-family: var(--font-ui); }
.ranked li { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.ranked .who a { color: var(--ink); text-decoration: none; font-weight: 600; }
.ranked .who a:hover { color: var(--accent); }
.ranked .who .muted { display: block; font-size: .72rem; }
.ranked .bar { position: relative; height: 10px; background: var(--bg-alt); border-radius: var(--radius-pill); overflow: hidden; }
.ranked .bar .fill { position: absolute; top: 0; bottom: 0; background: var(--accent-soft); border-radius: var(--radius-pill); }
.ranked .bar .fill.solid { background: var(--accent); }
.ranked .bar .fill.est { background: var(--line); }
.ranked .bar .fill.solid.est { background: var(--muted); }
.ranked .val { white-space: nowrap; font-weight: 600; }
.ranked .val a.ts { font-size: .95rem; margin: 0; }
.ranked.compact li { grid-template-columns: minmax(0, 1fr) auto; padding: 6px 0; }
.teaser-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.teaser { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.teaser h3 { margin: 0 0 .4em; font-size: var(--h3); } .teaser h3 a { color: var(--ink); text-decoration: none; }
.small { font-size: .8rem; margin: .6em 0 0; }
.full-table { margin-top: 2em; font-family: var(--font-ui); }
.full-table summary { cursor: pointer; font-weight: 600; }
@media (max-width: 600px) { .ranked li { grid-template-columns: minmax(0, 1fr) auto; } .ranked .bar { display: none; } }
table.compare { font-size: .9rem; }
table.compare th { vertical-align: top; }
table.compare tbody th { text-align: left; font-family: var(--font-ui); font-weight: 600; font-size: .9rem; text-transform: none; letter-spacing: 0; color: var(--ink); white-space: nowrap; }
table.compare tbody th a { text-decoration: none; color: var(--ink); }
table.compare tbody th a:hover { color: var(--accent); }
table.compare tbody th .muted { display: block; font-size: .75rem; font-weight: 400; }
table.compare td { white-space: nowrap; }
table.compare td a { text-decoration: none; font-weight: 600; color: var(--accent-2); border-bottom: 1px dotted var(--accent); }
table.compare td a:hover { color: var(--accent); }
table.compare td.empty { color: var(--line); text-align: center; }
table.compare td.basis-calculated { color: var(--ink-2); }
.metrics-table .group-row th { padding-top: 18px; font-family: var(--font-display); font-size: 1rem; letter-spacing: .06em; color: var(--muted); border-bottom: 2px solid var(--line); }
.metrics-table td.note { color: var(--muted); font-size: .85rem; }
.metrics-table tr.basis-unclear td { color: var(--muted); }
.basis { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--bg-alt); color: var(--ink-2); }
.basis-calculated { background: var(--accent-soft); color: var(--accent-2); }
.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: .6em; }
.source-box { margin-top: 3em; padding-top: 1.5em; border-top: 1px solid var(--line); }
.video-embed { position: relative; aspect-ratio: 16/9; width: 100%; max-width: 720px; border-radius: var(--radius); overflow: hidden; background: var(--media-bg); }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sidebar { position: sticky; top: 84px; }
.sidebar-title { font-size: 1rem; margin-top: 1em; }
.sidebar-list { list-style: none; padding: 0; margin: 0; }
.sidebar-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; line-height: 1.35; }
.sidebar-list a { color: var(--ink); text-decoration: none; font-weight: 600; }
.sidebar-list a:hover { color: var(--accent); }
.tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--bg-alt); border-radius: var(--radius-pill); padding: 3px 10px; font-size: .8rem; color: var(--ink-2); text-decoration: none; }
.tag:hover { color: var(--accent); }
.crumbs { font-family: var(--font-ui); font-size: .8rem; color: var(--muted); margin-bottom: 1em; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.topic-card .card-body { padding-top: 24px; }

/* transcript + pages */
.page-head { padding-top: clamp(32px, 5vw, 64px); max-width: 820px; }
.transcript { max-width: 760px; padding-bottom: 2em; }
.transcript p { margin-bottom: .8em; }
.transcript a.ts { margin: 0 6px 0 0; }
.prose { max-width: 720px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); margin-top: 48px; font-size: .92rem; color: var(--ink-2); font-family: var(--font-ui); }
.footer-logo { height: 30px; width: auto; display: inline-block; vertical-align: middle; margin-left: 6px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 24px 48px; padding-block: 36px; }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-copy { grid-column: 1 / -1; color: var(--muted); }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }
