/* Decode the Numbers — Kinetic Type: white + electric blue, Anton headings, Inter body */
:root {
	--blue: #2f5bff;
	--blue-dark: #2448d6;
	--ink: #0a0a0a;
	--grey: #5b5b5b;
	--line: #e6e8ef;
	--soft: #eef1fa;
	--yellow: #ffe14d;
	--green: #1f8f5f;
	--red: #d93b40;
	--max: 860px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 18px;
	line-height: 1.65;
	color: var(--ink);
	background: #fff;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
img { max-width: 100%; height: auto; display: block; }

/* header / footer */
.top {
	border-bottom: 1px solid var(--line);
	background: #fff;
	position: sticky;
	top: 0;
	z-index: 10;
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; letter-spacing: 0.02em; text-transform: uppercase; font-size: 15px; }
.brand i { width: 18px; height: 18px; background: var(--blue); display: inline-block; }
.top nav { display: flex; gap: 18px; font-size: 15px; font-weight: 600; }
.top nav a { color: var(--ink); text-decoration: none; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--blue); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1100px; }
footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 28px 0 40px; color: var(--grey); font-size: 14px; }
footer a { color: var(--grey); }

/* headings */
h1, h2, .display {
	font-family: 'Anton', Impact, 'Arial Narrow Bold', sans-serif;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.005em;
	line-height: 1.05;
}
h1 { font-size: clamp(36px, 6vw, 60px); margin: 28px 0 10px; }
h1 .hl { color: var(--blue); }
h2 { font-size: clamp(26px, 3.6vw, 36px); margin: 52px 0 12px; }
h3 { font-size: 20px; margin: 28px 0 6px; }
.lede { font-size: 20px; color: #2a2a2a; margin: 0 0 18px; }
.crumbs { font-size: 14px; color: var(--grey); margin-top: 20px; }
.crumbs a { color: var(--grey); }
.meta { font-size: 14px; color: var(--grey); margin: 6px 0 22px; }

/* video facade */
.video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--ink);
	border-radius: 6px;
	overflow: hidden;
	margin: 8px 0 10px;
	box-shadow: 0 18px 40px rgba(10, 10, 10, 0.18);
}
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video button {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	background: transparent;
	cursor: pointer;
	padding: 0;
}
.video button::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 50%;
	width: 92px;
	height: 92px;
	margin: -46px 0 0 -46px;
	border-radius: 50%;
	background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") 55% 50% / 46px no-repeat;
	box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
	transition: transform 0.15s ease;
}
.video button:hover::after, .video button:focus-visible::after { transform: scale(1.08); }
.video-cap { font-size: 14px; color: var(--grey); margin: 0 0 26px; }

/* answer box */
.answer {
	border-left: 6px solid var(--blue);
	background: var(--soft);
	padding: 18px 22px;
	margin: 6px 0 22px;
	font-size: 19px;
}
.answer p { margin: 0; }
.answer strong { color: var(--blue-dark); }

/* formula */
.formula {
	font-family: 'Anton', Impact, sans-serif;
	text-transform: uppercase;
	font-size: clamp(20px, 3vw, 28px);
	letter-spacing: 0.01em;
	background: var(--ink);
	color: #fff;
	padding: 16px 22px;
	border-radius: 4px;
	margin: 14px 0;
	line-height: 1.25;
}
.formula span { color: var(--yellow); }

/* tables */
.tbl { margin: 14px 0 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: break-word; hyphens: manual; vertical-align: top; }
td.num, th.num { text-align: right; overflow-wrap: normal; }
td.num { white-space: nowrap; }
th.num { white-space: normal; }
thead th { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--grey); border-bottom: 2px solid var(--ink); vertical-align: bottom; }
@media (max-width: 600px) { table { font-size: 14px; } th, td { padding: 8px 6px; } thead th { font-size: 11px; letter-spacing: 0.02em; } }
tr.key td { font-weight: 800; background: var(--soft); }
tr.total td { font-weight: 800; border-top: 2px solid var(--ink); }
td.neg { color: var(--red); }
td.pos { color: var(--green); }
.note { font-size: 14px; color: var(--grey); }

/* callouts and lists */
.callout { border: 2px solid var(--ink); padding: 16px 20px; margin: 20px 0; }
.callout.yellow { border: 0; background: var(--yellow); }
.quote { font-family: Georgia, 'Times New Roman', serif; font-size: 22px; line-height: 1.45; border-left: 6px solid var(--yellow); padding: 6px 0 6px 20px; margin: 18px 0; }
.quote cite { display: block; font-family: 'Inter', sans-serif; font-style: normal; font-size: 14px; color: var(--grey); margin-top: 6px; }
ul.ticks { padding-left: 0; list-style: none; }
ul.ticks li { padding-left: 30px; position: relative; margin: 6px 0; }
ul.ticks li::before { content: ''; position: absolute; left: 4px; top: 0.55em; width: 12px; height: 12px; background: var(--blue); }
.toc { background: var(--soft); padding: 14px 20px; margin: 10px 0 8px; font-size: 16px; }
.toc strong { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey); margin-bottom: 4px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { font-weight: 800; cursor: pointer; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: -2px; font-size: 24px; color: var(--blue); }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 8px 0 0; }

/* cards (home + related) */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; margin: 18px 0; }
.card { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(10, 10, 10, 0.12); color: var(--ink); }
.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.card .body { padding: 14px 16px 18px; }
.card .t { font-family: 'Anton', Impact, sans-serif; text-transform: uppercase; font-size: 24px; line-height: 1.1; }
.card .d { font-size: 15px; color: var(--grey); margin-top: 6px; }
.card.soon { opacity: 0.6; pointer-events: none; }
.tag { display: inline-block; background: var(--yellow); font-size: 12px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 2px 8px; margin-bottom: 6px; }

/* home hero */
.hero { background: var(--blue); color: #fff; padding: 64px 0 56px; }
.hero h1 { color: #fff; font-size: clamp(44px, 8vw, 84px); margin: 0 0 12px; }
.hero h1 span { display: inline-block; background: var(--yellow); color: var(--ink); padding: 0.05em 0.12em 0.04em; line-height: 0.92; }
.hero p { font-size: 21px; max-width: 640px; margin: 0 0 24px; }
.btn { display: inline-block; background: var(--ink); color: #fff; text-decoration: none; font-weight: 800; padding: 13px 22px; border-radius: 4px; }
.btn:hover { background: #222; color: #fff; }
.btn.light { background: #fff; color: var(--ink); }
.btn.light:hover { background: var(--yellow); color: var(--ink); }
.topics { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 14px 0; }
.topics li { border: 2px solid var(--ink); padding: 6px 12px; font-weight: 800; font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; }
.topics li.live { background: var(--blue); border-color: var(--blue); color: #fff; }
.topics li.live a { color: #fff; text-decoration: none; }
.disclaimer { font-size: 14px; color: var(--grey); border-top: 1px solid var(--line); padding-top: 14px; margin-top: 36px; }
@media (max-width: 520px) {
	.brand { font-size: 13px; }
	.top nav { gap: 12px; font-size: 14px; }
	.video button::after { width: 72px; height: 72px; margin: -36px 0 0 -36px; background-size: 36px; }
	body { font-size: 17px; }
}
.chapters { padding-left: 20px; font-size: 16px; }
.chapters a { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: 6px; }
.author { border-left: 4px solid var(--blue); background: rgba(47,91,255,.06); padding: 14px 18px; margin: 36px 0 8px; font-size: 15px; }
.author p { margin: 0; }
table.sortable th { cursor: pointer; user-select: none; }
table.sortable th::after { content: " ↕"; color: var(--grey); font-weight: 400; }
table.sortable th[data-dir="asc"]::after { content: " ↑"; color: var(--blue); }
table.sortable th[data-dir="desc"]::after { content: " ↓"; color: var(--blue); }
.calc { border: 2px solid var(--blue); padding: 18px 20px; margin: 22px 0; background: #fff; }
.calc h3 { margin-top: 0; }
.calc label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 4px; }
.calc input { width: 100%; max-width: 280px; padding: 8px 10px; font: inherit; border: 1px solid var(--line); }
.calc .out { margin-top: 16px; font-size: 18px; }
.calc .out strong { color: var(--blue); }
.calc .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 18px; }
ul.hub { list-style: none; padding: 0; margin: 6px 0 18px; }
ul.hub li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.hub li a { font-weight: 600; }
ul.hub li .note { display: block; margin-top: 2px; }
.more { font-weight: 600; border-left: 4px solid var(--blue); padding: 6px 12px; margin: 18px 0; }
@media (max-width: 420px) {
  .top .wrap { gap: 8px; }
  .brand { font-size: 12px; gap: 6px; }
  .top nav { gap: 8px; font-size: 13px; }
  .top nav a:first-child { display: none; }
}
@media (max-width: 380px) { td.num { white-space: normal; } th, td { padding: 7px 4px; } }
figure.fig { margin: 22px 0 18px; }
figure.fig img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
@media (max-width: 640px) { figure.fig img { aspect-ratio: 1080 / 1350; } }
figure.fig figcaption { font-size: 14px; color: var(--grey); margin-top: 8px; }
ol.formulas { list-style: none; counter-reset: f; padding: 0; margin: 16px 0; }
ol.formulas li { counter-increment: f; margin: 0 0 14px; }
ol.formulas li .lbl { font-weight: 800; }
ol.formulas li .lbl::before { content: counter(f) ". "; color: var(--blue); }
ol.formulas li .fast { font-size: 14px; color: var(--grey); margin-left: 6px; }
ol.formulas .formula { margin: 6px 0 0; }
details.chap { margin: -6px 0 22px; font-size: 16px; }
details.chap summary { cursor: pointer; font-weight: 600; color: var(--grey); }
details.chap .chapters { margin: 10px 0 0; }
.calc .calc-t { margin: 0 0 12px; font-weight: 800; font-size: 20px; }
