:root {
  color-scheme: dark;
  --bg: #080c12;
  --surface: rgba(18, 25, 36, 0.9);
  --surface-2: rgba(25, 35, 49, 0.78);
  --text: #edf3fb;
  --muted: #aab7c9;
  --accent: #79bfff;
  --accent-strong: #43a6ff;
  --border: rgba(255, 255, 255, 0.11);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 20px;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 15% 0%, rgba(50, 130, 205, 0.18), transparent 34rem), linear-gradient(145deg, var(--bg), #111a27);
  line-height: 1.65;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: #b3dcff; }
:focus-visible { outline: 3px solid #ffd166; outline-offset: 4px; border-radius: 5px; }
.page-shell { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.article-shell { width: min(940px, calc(100% - 40px)); }
.compact-shell { width: min(760px, calc(100% - 40px)); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; }
.site-header nav { display: flex; align-items: center; gap: 18px; }
.brand-link { color: var(--text); font-weight: 700; text-decoration: none; letter-spacing: .01em; }
.site-header nav a { color: var(--muted); font-weight: 600; text-decoration: none; }
.profile-card, .article-card, .not-found, .page-intro {
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
}
.profile-card { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; overflow: hidden; }
.portrait { width: 100%; height: 100%; min-height: 480px; object-fit: cover; object-position: 50% 24%; }
.profile-copy { align-self: center; padding: clamp(30px, 6vw, 72px); }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.18; text-wrap: balance; }
h1 { margin: 0 0 20px; font-size: clamp(2rem, 6vw, 4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.28rem, 3vw, 1.65rem); }
.lead { color: #dce8f6; font-size: clamp(1.08rem, 2.3vw, 1.28rem); line-height: 1.55; }
.action-list, .contact-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.contact-list { margin-top: 24px; font-style: normal; font-size: .95rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: rgba(255,255,255,.035); font-weight: 700; text-decoration: none; }
.button.primary { border-color: rgba(67, 166, 255, .5); background: rgba(67, 166, 255, .14); }
.site-footer { display: flex; justify-content: space-between; gap: 24px; padding: 28px 4px 40px; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.site-footer address { font-style: normal; }
.page-intro { margin-bottom: 18px; padding: clamp(26px, 5vw, 48px); }
.page-intro h1 { font-size: clamp(2rem, 5.2vw, 3.3rem); }
.page-intro .lead { max-width: 620px; margin-bottom: 0; }
.insight-list { display: grid; gap: 16px; }
.insight-card { display: grid; grid-template-columns: minmax(220px, 34%) 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.card-media { align-self: center; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; background: #121923; }
.card-media img { width: 100%; height: 100%; object-fit: contain; }
.card-media.graph-media img { object-fit: contain; }
.card-copy { padding: clamp(22px, 4vw, 36px); }
.card-copy h2 { margin: 0 0 10px; }
.card-copy h2 a { color: var(--text); text-decoration: none; }
.card-copy p { margin: 0 0 14px; }
.card-meta { color: var(--muted); font-size: .88rem; }
.reading-progress { position: fixed; z-index: 10; top: 0; left: 0; width: 0; height: 3px; background: var(--accent-strong); }
.article-card { overflow: hidden; }
.article-header { padding: clamp(18px, 4vw, 38px); }
.back-link { display: inline-block; margin-bottom: 22px; }
.article-hero { display: flex; align-items: center; justify-content: center; max-height: 590px; margin-bottom: 28px; overflow: hidden; border: 1px solid var(--border); border-radius: 15px; background: #101722; }
.article-hero img { width: auto; max-width: 100%; height: auto; max-height: 590px; object-fit: contain; object-position: center; }
.article-header h1 { font-size: clamp(2rem, 6vw, 3.5rem); }
.article-tools, .article-meta, .sharebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.article-tools { justify-content: space-between; margin-top: 24px; }
.article-meta { margin: 0; color: var(--muted); font-size: .9rem; }
.article-meta span, .article-meta time { padding: 5px 9px; border: 1px solid var(--border); border-radius: 999px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; padding: 0; border: 1px solid var(--border); border-radius: 11px; color: var(--text); background: rgba(255,255,255,.04); cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; fill: currentColor; }
.article-content { padding: 10px clamp(22px, 6vw, 64px) 44px; color: #dde6f1; font-size: 1.02rem; }
.article-content > * { max-width: 74ch; margin-left: auto; margin-right: auto; }
.article-content p { margin-top: 0; margin-bottom: 1.05em; }
.article-content h2 { margin-top: 2.15em; color: var(--text); }
.article-content h3 { margin-top: 1.8em; color: var(--text); }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content li { margin: .45em 0; }
.article-content table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.article-content th, .article-content td { padding: 10px; border: 1px solid var(--border); text-align: left; }
.table-scroll { max-width: 100%; margin-top: 1.6em; margin-bottom: 1.6em; overflow-x: auto; border-radius: 12px; }
.table-scroll table { min-width: 720px; }
.article-figure { margin-top: 2em; margin-bottom: 2em; }
.article-figure img { width: 100%; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.article-figure figcaption { margin-top: 10px; color: var(--muted); font-size: .9rem; }
.related-links { margin-top: 2.5em; padding: 20px 22px; border: 1px solid var(--border); border-radius: 14px; background: rgba(67,166,255,.06); }
.related-links h2 { margin-top: 0; }
.calculator-shell { width: min(1040px, calc(100% - 40px)); }
.calculator-intro, .calculator-panel, .calculator-results, .calculator-notes, .calculator-disclaimer, .tool-promo { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.calculator-intro { margin-bottom: 18px; padding: clamp(26px, 5vw, 52px); }
.calculator-intro h1 { font-size: clamp(2.15rem, 6vw, 4rem); }
.privacy-note { margin: 24px 0 0; padding: 14px 16px; border: 1px solid rgba(70,215,199,.3); border-radius: 12px; color: #c9fff8; background: rgba(70,215,199,.08); }
.calculator-form { display: grid; gap: 18px; }
.calculator-panel { padding: clamp(22px, 4vw, 38px); }
.calculator-panel h2 { margin-top: 0; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.field { display: grid; align-content: start; gap: 7px; min-width: 0; color: var(--text); font-weight: 650; }
.field small, .assumption-note { color: var(--muted); font-size: .84rem; font-weight: 400; }
.field input, .field select { width: 100%; min-width: 0; height: 48px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); background: #0b111a; font: inherit; }
.field select { color-scheme: dark; }
.example-note { margin-top: -6px; margin-bottom: 22px; color: var(--muted); }
.field-error, .field-warning { min-height: 0; font-size: .82rem; font-weight: 550; line-height: 1.4; }
.field-error:not(:empty) { color: #ffb6b6; }
.field-warning:not(:empty) { color: #ffd98a; }
.field input[aria-invalid="true"] { border-color: rgba(255,102,102,.8); }
.inline-reset { justify-self: start; padding: 2px 0; border: 0; color: var(--accent); background: transparent; font: inherit; font-size: .85rem; font-weight: 650; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.input-unit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.input-unit > span { color: var(--muted); font-weight: 700; }
.advanced-settings summary { color: var(--text); font-size: 1.28rem; font-weight: 750; cursor: pointer; }
.advanced-settings[open] summary { margin-bottom: 10px; }
.quick-choices { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-choices button { padding: 7px 9px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: rgba(255,255,255,.035); cursor: pointer; }
.check-field { display: flex; align-items: center; gap: 10px; align-self: end; min-height: 48px; }
.check-field input { width: 20px; height: 20px; accent-color: var(--accent-strong); }
.calculator-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.calculator-actions .button { font: inherit; cursor: pointer; }
.calculator-errors { padding: 14px 18px; border: 1px solid rgba(255,102,102,.45); border-radius: 12px; color: #ffd5d5; background: rgba(170,30,30,.16); }
.calculator-errors ul { margin: 0; padding-left: 1.3em; }
.calculator-results { margin-top: 22px; padding: clamp(22px, 4vw, 40px); scroll-margin-top: 18px; }
.calculator-results header h2 { margin-bottom: 8px; }
.results-table th { color: var(--text); }
.result-breakdown { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; }
.calculator-chart { display: grid; gap: 18px; max-width: 100%; margin: 34px 0; padding: 22px; border: 1px solid var(--border); border-radius: 14px; background: #0b111a; }
.chart-row { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(180px, 2fr) auto; align-items: center; gap: 14px; }
.chart-label { color: #dce8f6; font-size: .9rem; }
.chart-track { height: 18px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.06); }
.chart-bar { min-width: 2px; height: 100%; border-radius: inherit; transition: width .35s ease; }
.chart-row strong { min-width: 100px; text-align: right; }
.result-summary, .sodra-result, .scenario-reminder, .payout-info { padding: 17px 19px; border-radius: 12px; }
.result-summary { border-left: 3px solid var(--accent); background: rgba(67,166,255,.08); }
.sodra-result { margin: 18px 0; border: 1px solid var(--border); background: rgba(255,255,255,.025); }
.sodra-result h3 { margin-top: 0; }
.sodra-result p:last-child { margin-bottom: 0; color: var(--muted); }
.scenario-reminder { background: rgba(245,165,36,.08); }
.payout-info { margin-top: 18px; border: 1px solid var(--border); background: rgba(67,166,255,.055); }
.payout-info h3 { margin-top: 0; }
.payout-info h4 { margin: 1.35em 0 .35em; color: var(--text); font-size: 1.02rem; }
.payout-info p:last-child { margin-bottom: 0; }
.payout-rules-note { color: var(--muted); font-size: .9rem; }
.model-link { margin-top: 18px; }
.model-link h2 { font-size: 1.3rem; }
.calculator-notes, .calculator-disclaimer { margin-top: 18px; padding: clamp(22px, 4vw, 34px); }
.calculator-notes h2 { margin-top: 0; }
.calculator-disclaimer { color: var(--muted); box-shadow: none; }
.calculator-disclaimer p:last-child { margin-bottom: 0; }
.tool-promo { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px; margin-bottom: 16px; padding: 24px clamp(22px, 4vw, 34px); box-shadow: none; }
.tool-promo h2, .tool-promo p { margin: 0 0 7px; }
.tool-promo p:last-child { margin-bottom: 0; }
.tool-promo > p .button { min-height: 41px; padding: 8px 14px; font-size: .94rem; }
.article-content .quote { padding: 18px; border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; background: rgba(67,166,255,.08); }
.divider { height: 1px; margin: 30px auto; background: var(--border); }
.article-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px clamp(22px, 6vw, 64px); border-top: 1px solid var(--border); color: var(--muted); }
.article-footer p { margin: 0; font-size: .9rem; }
.not-found { padding: clamp(30px, 8vw, 80px); text-align: center; }
.not-found .action-list { justify-content: center; }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 10px 15px; border: 1px solid var(--border); border-radius: 12px; color: #fff; background: #101722; box-shadow: var(--shadow); }
@media (max-width: 720px) {
  .page-shell, .article-shell, .compact-shell { width: min(100% - 24px, 1120px); }
  .site-header { align-items: flex-start; padding: 18px 0; }
  .site-header nav { align-items: flex-end; flex-direction: column; gap: 7px; font-size: .9rem; }
  .profile-card, .insight-card { grid-template-columns: 1fr; }
  .portrait { width: 100%; height: 400px; min-height: 0; object-position: 50% 24%; }
  .card-media { height: auto; min-height: 0; }
  .article-header { padding: 14px; }
  .article-hero { max-height: 420px; }
  .article-hero img { max-height: 420px; }
  .article-content { padding: 8px 18px 32px; font-size: 1rem; }
  .article-footer, .site-footer { align-items: flex-start; flex-direction: column; }
  .article-tools { align-items: flex-start; flex-direction: column; }
  .contact-list { flex-direction: column; }
  .calculator-shell { width: min(100% - 24px, 1040px); }
  .field-grid { grid-template-columns: 1fr; }
  .calculator-actions .button { flex: 1 1 100%; }
  .chart-row { grid-template-columns: 1fr; gap: 7px; }
  .chart-row strong { text-align: left; }
  .tool-promo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
