/* Financial Nirvana (imrawal.com) - site styles. Navy for trust, emerald for action, generous white space. */
:root {
  --navy-950: #071528;
  --navy-900: #0b1f3a;
  --navy-800: #112a4d;
  --navy-700: #1a3a66;
  --navy-100: #e6edf7;
  --emerald-700: #036148;
  --emerald-600: #047857;
  --emerald-500: #059669;
  --emerald-100: #d1fae5;
  --emerald-50: #ecfdf5;
  --gold-600: #a16207;
  --gold-100: #fef3c7;
  --red-600: #b91c1c;
  --red-50: #fef2f2;
  --ink: #1b2533;
  --ink-2: #3d4a5c;
  --muted: #64748b;
  --line: #e3e8ef;
  --line-2: #d3dbe6;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-tint: #f0f5fa;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-1: 0 1px 2px rgba(11, 31, 58, .06), 0 1px 3px rgba(11, 31, 58, .08);
  --shadow-2: 0 4px 16px rgba(11, 31, 58, .08);
  --shadow-3: 0 12px 32px rgba(11, 31, 58, .12);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --wrap: 1180px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 16px/1.6 var(--sans); color: var(--ink); background: var(--bg); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--emerald-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--emerald-700); }
h1, h2, h3, h4 { color: var(--navy-900); line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .875rem; }
.muted { color: var(--muted); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy-900); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 12px; }
:focus-visible { outline: 3px solid rgba(5, 150, 105, .45); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-900); }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-weight: 800; font-size: 1.06rem; letter-spacing: -.01em; }
.brand-sub { font-size: .72rem; color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: .95rem; padding: 8px 12px; border-radius: 8px; }
.nav a:hover { background: var(--bg-soft); color: var(--navy-900); }
.nav a.active { color: var(--emerald-700); background: var(--emerald-50); }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line-2); background: #fff; border-radius: 8px; width: 42px; height: 40px; cursor: pointer; color: var(--navy-900); }
.progress { position: absolute; left: 0; bottom: -1px; height: 3px; width: 0; background: var(--emerald-500); transition: width .1s linear; }

/* ---------- buttons, badges ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 .95rem var(--sans); padding: 11px 20px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--emerald-600); color: #fff; box-shadow: 0 2px 8px rgba(4, 120, 87, .25); }
.btn-primary:hover { background: var(--emerald-700); color: #fff; }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover { background: var(--navy-800); color: #fff; }
.btn-outline { background: #fff; color: var(--navy-900); border-color: var(--line-2); }
.btn-outline:hover { border-color: var(--navy-700); color: var(--navy-900); }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--emerald-700); background: var(--emerald-50); border: 1px solid var(--emerald-100); padding: 4px 10px; border-radius: 999px; text-decoration: none; }
.badge.navy { color: var(--navy-700); background: var(--navy-100); border-color: #d2ddee; }
.badge.gold { color: var(--gold-600); background: var(--gold-100); border-color: #fde68a; }

/* ---------- home ---------- */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(5, 150, 105, .10), transparent 60%), linear-gradient(180deg, #f3f7fc 0%, #fff 100%); border-bottom: 1px solid var(--line); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--emerald-600); }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 36em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; color: var(--ink-2); font-size: .9rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.trust-row svg { color: var(--emerald-600); flex: none; }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-3); padding: 24px; }
.section { padding: 64px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 46em; }
.eyebrow { font: 700 .78rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--emerald-600); margin-bottom: 8px; display: block; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s, border-color .2s; }
a.card { color: inherit; text-decoration: none; }
a.card:hover { box-shadow: var(--shadow-2); transform: translateY(-2px); border-color: var(--line-2); }
.card-img { aspect-ratio: 1200 / 630; background: var(--bg-tint); display: block; width: 100%; object-fit: cover; border-bottom: 1px solid var(--line); }
.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card h3 { font-size: 1.12rem; margin: 2px 0 2px; }
.card p { color: var(--ink-2); font-size: .95rem; margin: 0; }
.card-meta { margin-top: auto; padding-top: 8px; color: var(--muted); font-size: .82rem; display: flex; gap: 12px; flex-wrap: wrap; }
.feature { padding: 22px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--emerald-50); color: var(--emerald-600); display: grid; place-items: center; margin-bottom: 12px; }
.feature h3 { font-size: 1.08rem; }
.feature p { margin: 0; }
.tool-card { padding: 20px; gap: 6px; }
.tool-card .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--navy-100); color: var(--navy-700); display: grid; place-items: center; margin-bottom: 6px; }
.author-strip { display: grid; grid-template-columns: 120px 1fr; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: var(--shadow-1); }
.author-strip img { width: 120px; height: 120px; border-radius: 50%; }
.cred-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }

/* ---------- page / article header ---------- */
.page-head { background: linear-gradient(180deg, #f3f7fc, #fff); border-bottom: 1px solid var(--line); padding: 40px 0 34px; }
.page-head p.lead { font-size: 1.12rem; color: var(--ink-2); max-width: 46em; margin: 0; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--emerald-600); }
.crumbs span[aria-hidden] { color: var(--line-2); }
.article-head { padding: 36px 0 0; }
.article-head .wrap { max-width: 1180px; }
.article-head h1 { max-width: 22em; margin: 12px 0 14px; }
.article-head .dek { font-size: 1.2rem; color: var(--ink-2); max-width: 40em; margin-bottom: 18px; }
.byline { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font-size: .92rem; flex-wrap: wrap; }
.byline img { width: 44px; height: 44px; border-radius: 50%; }
.byline strong { color: var(--navy-900); }
.byline .dot { color: var(--line-2); }
.article-hero { margin: 26px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-tint); }
.article-hero img { display: block; width: 100%; aspect-ratio: 1200 / 630; max-height: 400px; object-fit: cover; }
.article-layout { display: grid; grid-template-columns: minmax(0, 720px) 280px; justify-content: space-between; gap: 56px; padding: 36px 0 64px; }
.toc { position: sticky; top: 90px; align-self: start; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: #fff; max-height: calc(100vh - 110px); overflow: auto; }
.toc h2 { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 0 6px 10px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .9rem; line-height: 1.35; }
.toc a:hover { color: var(--navy-900); border-color: var(--line-2); }
.toc a.on { color: var(--emerald-700); border-color: var(--emerald-500); font-weight: 600; }
.toc .tools { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .88rem; }

/* ---------- prose ---------- */
.prose { font-family: var(--serif); font-size: 1.14rem; line-height: 1.78; color: #1d2836; }
.prose > * + * { margin-top: 0; }
.prose p { margin: 0 0 1.15em; }
.prose h2 { font-family: var(--sans); font-size: 1.62rem; margin: 2.1em 0 .6em; scroll-margin-top: 90px; }
.prose h3 { font-family: var(--sans); font-size: 1.22rem; margin: 1.7em 0 .5em; scroll-margin-top: 90px; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; }
.prose li::marker { color: var(--emerald-600); }
.prose strong { color: var(--navy-900); }
.prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--emerald-500); color: var(--ink-2); font-style: italic; }
.prose code { font-size: .88em; background: var(--bg-soft); padding: 2px 6px; border-radius: 5px; font-family: ui-monospace, Consolas, monospace; }
.prose .formula { font-family: ui-monospace, Consolas, monospace; font-size: .95rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 0 0 1.2em; overflow-x: auto; line-height: 1.6; color: var(--navy-900); }
.prose a { color: var(--emerald-700); }
.takeaways { font-family: var(--sans); background: var(--emerald-50); border: 1px solid var(--emerald-100); border-radius: 14px; padding: 20px 24px; margin: 0 0 2em; }
.takeaways h2 { font-size: 1rem !important; margin: 0 0 10px !important; letter-spacing: .02em; color: var(--emerald-700); }
.takeaways ul { margin: 0; padding-left: 1.2em; font-size: 1rem; line-height: 1.6; }
.takeaways li { margin: .45em 0; }
.callout { font-family: var(--sans); font-size: .98rem; line-height: 1.6; border-radius: 12px; padding: 16px 18px 16px 18px; margin: 1.6em 0; border: 1px solid var(--line); background: var(--bg-soft); }
.callout p:last-child { margin-bottom: 0; }
.callout .callout-title { display: block; font-weight: 700; color: var(--navy-900); margin-bottom: 4px; }
.callout.tip { background: var(--emerald-50); border-color: var(--emerald-100); }
.callout.warn { background: #fffbeb; border-color: #fde68a; }
.callout.risk { background: var(--red-50); border-color: #fecaca; }
.table-wrap { overflow-x: auto; margin: 1.4em 0 1.6em; border: 1px solid var(--line); border-radius: 12px; font-family: var(--sans); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: .93rem; line-height: 1.45; }
.table-wrap caption { caption-side: bottom; text-align: left; padding: 10px 14px; font-size: .84rem; color: var(--muted); border-top: 1px solid var(--line); }
.table-wrap th { background: var(--bg-tint); color: var(--navy-900); font-weight: 600; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td.num, .table-wrap th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-wrap tr.total td { font-weight: 700; background: var(--bg-soft); }
.figure { margin: 1.8em 0; font-family: var(--sans); }
.figure .chart-box { border: 1px solid var(--line); border-radius: 14px; padding: 16px 12px 8px; background: #fff; }
.figure figcaption { font-size: .86rem; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.figure figcaption strong { color: var(--ink-2); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-2); padding: 0 8px 6px; }
.chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.faq { font-family: var(--sans); margin: 1em 0 1.6em; }
.faq details { border: 1px solid var(--line); border-radius: 12px; padding: 0 18px; margin-bottom: 10px; background: #fff; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--navy-900); padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--emerald-600); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 0 16px; color: var(--ink-2); font-size: 1rem; line-height: 1.65; }
.faq details > div p:last-child { margin-bottom: 0; }
.sources { font-family: var(--sans); font-size: .93rem; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 2em 0 0; }
.sources h2 { font-size: 1rem !important; margin: 0 0 8px !important; }
.sources ol { margin: 0; padding-left: 1.2em; }
.sources li { margin: .3em 0; }
.author-box { font-family: var(--sans); display: grid; grid-template-columns: 72px 1fr; gap: 18px; border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 2.2em 0 0; background: #fff; }
.author-box img { width: 72px; height: 72px; border-radius: 50%; }
.author-box h2 { font-size: 1.05rem !important; margin: 0 0 4px !important; }
.author-box p { font-size: .95rem; color: var(--ink-2); margin: 0 0 8px; line-height: 1.6; }
.edu-note { font-family: var(--sans); font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: 2.2em; padding-top: 14px; line-height: 1.6; }
.related { border-top: 1px solid var(--line); padding: 48px 0 64px; background: var(--bg-soft); }
.updated-note { font-family: var(--sans); font-size: .9rem; background: var(--navy-100); color: var(--navy-800); border-radius: 10px; padding: 10px 14px; margin: 0 0 1.6em; }

/* ---------- library / filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.filters button { font: 600 .88rem var(--sans); border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.filters button.on { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }
.search { width: 100%; max-width: 420px; font: 1rem var(--sans); padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 10px; margin-bottom: 18px; }

/* ---------- tools ---------- */
.tool { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 28px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); padding: 22px; }
.panel h2 { font-size: 1.1rem; margin-bottom: 14px; }
.field { margin-bottom: 18px; }
.field label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-weight: 600; font-size: .92rem; color: var(--navy-900); margin-bottom: 8px; }
.field .val { font-variant-numeric: tabular-nums; color: var(--emerald-700); font-weight: 700; }
.field input[type=number], .field select, .field input[type=text] { width: 100%; font: 1rem var(--sans); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; color: var(--ink); }
.field input[type=number]:focus, .field select:focus { border-color: var(--emerald-500); outline: none; box-shadow: 0 0 0 3px rgba(5, 150, 105, .15); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.field .pair { display: grid; grid-template-columns: 1fr 120px; gap: 10px; align-items: center; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--emerald-500) var(--fill, 50%), var(--line) var(--fill, 50%)); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--emerald-600); cursor: pointer; box-shadow: var(--shadow-1); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--emerald-600); cursor: pointer; }
.tabs { display: inline-flex; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { font: 600 .9rem var(--sans); border: 0; background: transparent; color: var(--ink-2); padding: 8px 14px; border-radius: 9px; cursor: pointer; }
.tabs button.on { background: #fff; color: var(--navy-900); box-shadow: var(--shadow-1); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat .k { font-size: .8rem; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 1.4rem; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; margin-top: 2px; letter-spacing: -.01em; }
.stat.hero { background: var(--navy-900); border-color: var(--navy-900); }
.stat.hero .k { color: #b8c6dc; }
.stat.hero .v { color: #fff; }
.stat .v.pos { color: var(--emerald-600); }
.stat .v.neg { color: var(--red-600); }
.chart { width: 100%; min-height: 260px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-tip { position: absolute; pointer-events: none; background: var(--navy-900); color: #fff; font: 500 .8rem/1.45 var(--sans); padding: 8px 10px; border-radius: 8px; box-shadow: var(--shadow-2); white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); z-index: 5; }
.chart-wrap { position: relative; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: right; font-variant-numeric: tabular-nums; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { background: var(--bg-tint); color: var(--navy-900); font-weight: 600; position: sticky; top: 0; }
.scroll-y { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.content-after { max-width: 780px; margin: 56px auto 0; }

/* ---------- games ---------- */
.game { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2); padding: 24px; }
.game-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.game-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.pill { font: 600 .8rem var(--sans); padding: 5px 10px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-2); }
.pill.good { background: var(--emerald-50); color: var(--emerald-700); border-color: var(--emerald-100); }
.pill.bad { background: var(--red-50); color: var(--red-600); border-color: #fecaca; }
.game-log { font: .88rem/1.55 ui-monospace, Consolas, monospace; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; max-height: 220px; overflow: auto; color: var(--ink-2); }
.result-banner { border-radius: 14px; padding: 18px 20px; margin-top: 16px; font-size: 1rem; }
.result-banner.good { background: var(--emerald-50); border: 1px solid var(--emerald-100); }
.result-banner.bad { background: var(--red-50); border: 1px solid #fecaca; }
.result-banner.neutral { background: var(--navy-100); border: 1px solid #d2ddee; }
.result-banner h3 { margin: 0 0 6px; font-size: 1.1rem; }
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.choice-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.coin { width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; font: 800 1.6rem var(--sans); color: #fff; margin: 6px auto 14px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.15), var(--shadow-2); transition: transform .5s; }
.coin.win { background: radial-gradient(circle at 35% 30%, #34d399, var(--emerald-700)); }
.coin.loss { background: radial-gradient(circle at 35% 30%, #f87171, var(--red-600)); }
.coin.idle { background: radial-gradient(circle at 35% 30%, #94a3b8, #475569); }
.coin.spin { transform: rotateY(720deg); }
.news { border-left: 4px solid var(--gold-600); background: #fffbeb; padding: 10px 14px; border-radius: 0 10px 10px 0; font-size: .95rem; margin: 10px 0; min-height: 46px; }

/* ---------- calculators & games: shared extras ---------- */
.small { font-size: .85rem; }
.pos { color: var(--emerald-600); } .neg { color: var(--red-600); }
.stat .v .small { font-size: .78rem; font-weight: 600; }
.panel .table-wrap { margin: 0; }
.app-section { padding-top: 32px; }
.results > * + * { margin-top: 18px; }
.results .panel h2 { font-size: 1.05rem; margin-bottom: 10px; }
.note-line { font-size: .9rem; color: var(--ink-2); background: var(--bg-tint); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.note-line strong { color: var(--navy-900); }
.field select { appearance: auto; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field.compact { margin-bottom: 12px; }
.field.compact label { font-size: .86rem; margin-bottom: 5px; }
.panel .sub { font: 700 .76rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.compare th.win, .compare td.win { background: var(--emerald-50); color: var(--emerald-700); font-weight: 700; }
.compare tr.total td { font-weight: 800; color: var(--navy-900); border-top: 2px solid var(--line-2); }
.hidden { display: none !important; }
.game .board { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.game .big-num { font: 800 2rem var(--sans); color: var(--navy-900); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.game .big-num.pos { color: var(--emerald-600); } .game .big-num.neg { color: var(--red-600); }
.game .opt { border: 2px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; text-align: left; font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.game .opt:hover { border-color: var(--emerald-500); box-shadow: var(--shadow-1); }
.game .opt.picked { border-color: var(--emerald-600); background: var(--emerald-50); }
.game .opt h3 { margin: 0 0 4px; font-size: 1rem; }
.game .opt p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.game .opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.game .meter { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; }
.game .meter > i { display: block; height: 100%; background: var(--emerald-600); transition: width .3s; }
.game-hub .card h3 { margin-top: 4px; }
.kbd { font: 600 .75rem ui-monospace, Consolas, monospace; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: #fff; }

/* ---------- IPO Centre ---------- */
.ipo-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.ipo-stats { margin-bottom: 26px; }
.ipo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
.ipo-grid .prose { font-size: 1.04rem; }
.ipo-grid .prose h2:first-child { margin-top: 0; }
.ipo-side { position: sticky; top: 86px; display: grid; gap: 16px; }
.ipo-side .panel { padding: 18px; }
.ipo-side h2 { font-size: 1rem; margin: 0 0 10px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: .9rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--navy-900); text-align: right; font-variant-numeric: tabular-nums; }
.ipo-mini { list-style: none; margin: 0 0 10px; padding: 0; font-size: .9rem; }
.ipo-mini li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ipo-section { margin-bottom: 34px; }
.ipo-section h2 { font-size: 1.3rem; margin-bottom: 12px; }
.ipo-section .table-wrap { margin: 0 0 8px; }
.ipo-section td a { font-weight: 600; }

/* ---------- forms & legal ---------- */
.legal { max-width: 780px; }
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0 8px; }
.photo { margin: 0; font-family: var(--sans); }
.photo.wide { grid-column: 1 / -1; }
.photo.wide img { aspect-ratio: 16 / 9; }
.photo img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); aspect-ratio: 3 / 2; object-fit: cover; object-position: center 30%; }
.photo figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.legal h2 { font-size: 1.35rem; margin-top: 1.8em; }
.legal p, .legal li { color: var(--ink-2); line-height: 1.75; }
.contact-card { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea { width: 100%; font: 1rem/1.5 var(--sans); padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; min-height: 140px; resize: vertical; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy-950); color: #b8c4d6; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #dbe4f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h2 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 9px; font-size: .93rem; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand-sub { color: #8fa1ba; }
.footer-about { font-size: .93rem; line-height: 1.7; max-width: 30em; }
.footer-legal { border-top: 1px solid #1d3253; margin-top: 40px; padding-top: 22px; font-size: .82rem; line-height: 1.7; color: #8fa1ba; display: grid; gap: 8px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 90px 0; }
.notfound .code { font: 800 5rem var(--sans); color: var(--navy-100); line-height: 1; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
  .tool { grid-template-columns: minmax(0, 1fr); }
  .game-grid { grid-template-columns: minmax(0, 1fr); }
  .ipo-grid { grid-template-columns: minmax(0, 1fr); }
  .ipo-side { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-top: 44px; padding-bottom: 44px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; box-shadow: var(--shadow-2); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav-toggle { display: grid; place-items: center; }
  .contact-card { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 44px 0; }
  .author-strip { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .author-strip img { width: 88px; height: 88px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 1.06rem; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .field-grid { grid-template-columns: minmax(0, 1fr); }
  .photo-grid { grid-template-columns: minmax(0, 1fr); }
  .panel, .game { padding: 18px; }
  .stat .v { font-size: 1.2rem; }
  .section-head { flex-direction: column; align-items: start; }
  .author-box { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } .coin.spin { transform: none; } }
@media print { .site-header, .site-footer, .toc, .related, .nav-toggle { display: none !important; } .article-layout { display: block; } }
