/* OKIpedia – slate & red: dark-slate header, red CTA accent, warm orange highlights, clean slate neutrals, tabular numbers. */
:root {
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #ef4444;
  --accent-hover: #dc2626;
  --accent-soft: #fef2f2;
  --on-accent: #ffffff;
  --gold: #fb923c;
  --gold-soft: #fff7ed;
  --available: #16a34a;
  --available-bg: #f0fdf4;
  --announced: #d97706;
  --announced-bg: #fffbeb;
  --suspended: #b91c1c;
  --suspended-bg: #fef2f2;
  --warn-bg: #fffbeb;
  --warn-border: #fde68a;
  --chart-1: #1e293b;
  --chart-2: #94a3b8;
  --chart-3: #ef4444;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06);
  --max: 1200px;
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: 0 0 .5em; }
h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.num, table, .stat-value, .calc-output { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 12px; border-radius: var(--radius); z-index: 100; }
.skip-link:focus { left: 8px; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.site-main { padding: 24px 0 48px; }
.site-main > .container, .page { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* Header */
.site-header { background: #1e293b; position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.logo-word { color: #fff; font-size: 1.2rem; letter-spacing: -0.02em; }
.logo-word span { color: var(--gold); font-weight: 500; }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a:not(.btn) { color: #cbd5e1; text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-weight: 500; }
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 6px 8px; color: #f1f5f9; cursor: pointer; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 64px; flex-direction: column; align-items: stretch;
    background: #1e293b; border-bottom: 1px solid rgba(255,255,255,.1); padding: 8px 16px 16px; }
  .main-nav.is-open { display: flex; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius);
  background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn--small { padding: 6px 12px; font-size: .9rem; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.form { display: grid; gap: 12px; max-width: 560px; }
.form-row { display: grid; gap: 4px; }
label { font-weight: 500; font-size: .95rem; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; width: 100%;
  transition: border-color .15s, box-shadow .15s, background-color .15s; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:hover:not(:disabled):not(:focus), select:hover:not(:disabled):not(:focus), textarea:hover:not(:disabled):not(:focus) { border-color: #94a3b8; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-soft); color: var(--muted); cursor: not-allowed; }
input:user-invalid, textarea:user-invalid { border-color: var(--suspended); box-shadow: 0 0 0 4px var(--suspended-bg); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }

/* Select: custom chevron */
select { -webkit-appearance: none; appearance: none; cursor: pointer; padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231e293b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px 8px; }
select:disabled { cursor: not-allowed; }

/* Number: no browser spinners (cleaner, values are typed) */
input[type="number"] { -moz-appearance: textfield; font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* Search: magnifier icon + styled clear button */
input[type="search"] { -webkit-appearance: none; appearance: none; padding-left: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' fill='none' stroke='%2364748b' stroke-width='2'/%3E%3Cpath d='M20 20l-4-4' stroke='%2364748b' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 13px center; background-size: 16px; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; width: 16px; height: 16px; cursor: pointer; border-radius: 50%;
  background: #cbd5e1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 5l6 6M11 5l-6 6' stroke='white' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/16px no-repeat; }

/* Range: thin track filled up to the thumb (--fill is set by site.js) */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; box-shadow: none; }
input[type="range"]:focus { box-shadow: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 50%), #e2e8f0 var(--fill, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 999px; background: #e2e8f0; }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -7px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(20,32,46,.25); transition: transform .15s, box-shadow .15s; }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: 0 2px 6px rgba(20,32,46,.25); }
input[type="range"]:hover::-webkit-slider-thumb, input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); box-shadow: 0 0 0 6px var(--accent-soft), 0 2px 6px rgba(20,32,46,.25); }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--gold); }

/* Collapsibles: chevron that rotates when open */
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-weight: 600; }
details > summary::-webkit-details-marker { display: none; }
details:not(.faq-item) > summary::before { content: ""; width: 8px; height: 8px; flex: 0 0 auto; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg); transition: transform .2s; margin-left: 2px; }
details:not(.faq-item)[open] > summary::before { transform: rotate(45deg); }
details[open] > summary ~ * { animation: rise .3s ease both; }

/* Checkboxes & radios - custom, consistent across browsers */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; width: 20px; height: 20px; min-width: 20px; margin: 0; padding: 0;
  display: inline-grid; place-content: center; vertical-align: middle; cursor: pointer;
  background: var(--surface); border: 1.5px solid #94a3b8; border-radius: 6px;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ""; width: 11px; height: 11px; background: #fff;
  clip-path: polygon(14% 44%, 0 59%, 40% 100%, 100% 22%, 86% 8%, 39% 69%);
  transform: scale(0); transition: transform .18s cubic-bezier(.2,.9,.3,1.4);
}
input[type="radio"]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .18s cubic-bezier(.2,.9,.3,1.4); }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--gold); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: not-allowed; background: var(--bg-soft); border-color: var(--border); }
input[type="checkbox"]:disabled:checked { background: #94a3b8; border-color: #94a3b8; }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { cursor: pointer; }
.hp { position: absolute; left: -10000px; }
.form-status { min-height: 1.5em; margin: 0; }
.form-status.is-error { color: var(--suspended); }
.form-status.is-ok { color: var(--available); }

/* Cards, badges, notices */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin: 16px 0; box-shadow: var(--shadow); }
.card h2:first-child, .card h3:first-child { margin-top: 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--border); font-size: .8rem; font-weight: 500; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.status--available { color: var(--available); background: var(--available-bg); }
.status--announced { color: var(--announced); background: var(--announced-bg); }
.status--suspended, .status--discontinued { color: var(--suspended); background: var(--suspended-bg); }
.notice { padding: 10px 14px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--border); font-size: .95rem; }
.notice--warn { background: var(--warn-bg); border-color: var(--warn-border); }
.lead { font-size: 1.1rem; color: var(--muted); }
.breadcrumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.breadcrumbs a { color: var(--muted); }

/* Home */
.hero { padding: 32px 0 24px; display: grid; gap: 32px; grid-template-columns: 1.4fr 1fr; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.countdown { background: var(--accent-soft); border-radius: var(--radius); border-bottom: 3px solid var(--gold); padding: 24px; text-align: center; }
.countdown-value { font-size: 3rem; font-weight: 700; color: var(--accent); line-height: 1.1; font-variant-numeric: tabular-nums; }
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; padding: 0; list-style: none; }
.points li { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; background: var(--surface); }
.points svg { color: var(--gold); }
.points strong { display: block; margin: 8px 0 4px; font-size: 1.05rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; }
.stat { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.stat dt { color: var(--muted); font-size: .9rem; }
.stat dd { margin: 4px 0 0; font-size: 1.5rem; font-weight: 700; }
/* AI showcase – dark island that draws the eye */
.ai-showcase { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; background: var(--text); color: #f1f5f9; border-radius: 16px; padding: 40px; margin: 40px 0; }
.ai-showcase h2 { color: #fff; }
.ai-showcase p { color: #94a3b8; }
.ai-showcase .chat-demo { box-shadow: 0 20px 60px rgba(0,0,0,.4); border-color: rgba(255,255,255,.1); }
.ai-features { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.ai-features li { display: flex; align-items: baseline; gap: 10px; font-size: .95rem; color: #cbd5e1; }
.ai-features li::before { content: "→"; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.change-list { list-style: none; padding: 0; margin: 0; }
.change-list li { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 4px 12px; }
.change-list time { color: var(--muted); font-size: .9rem; min-width: 90px; }
@media (max-width: 860px) {
  .hero, .ai-showcase { grid-template-columns: 1fr; }
  .ai-showcase { padding: 28px 20px; }
  .points { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Article (explainer, legal) */
.article-layout { display: grid; grid-template-columns: 1fr 260px; gap: 40px; align-items: start; }
.article-layout article { min-width: 0; max-width: 760px; }
.toc { position: sticky; top: 88px; border-left: 2px solid var(--border); padding-left: 16px; font-size: .95rem; }
.toc p { font-weight: 600; margin-bottom: .5em; }
.toc ol { margin: 0; padding-left: 18px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); }
details.toc-mobile { display: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; }
@media (max-width: 960px) {
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  details.toc-mobile { display: block; }
}
.limit-bar { margin: 16px 0 8px; }
.limit-track { position: relative; height: 40px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--border); overflow: hidden; }
.limit-sub { position: absolute; inset: 0 auto 0 0; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; padding: 0 10px; font-size: .85rem; font-weight: 600; white-space: nowrap; }
.limit-legend { display: flex; justify-content: space-between; font-size: .9rem; color: var(--muted); margin-top: 6px; }
dfn[data-term] { font-style: normal; border-bottom: 1px dotted var(--accent); cursor: help; position: relative; }
.term-tip { position: absolute; z-index: 30; max-width: 300px; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: var(--radius); font-size: .85rem; line-height: 1.4; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.sources a { word-break: break-word; }

/* FAQ & glossary */
.faq-search { max-width: 480px; margin-bottom: 16px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; background: var(--surface); }
.faq-item summary { padding: 14px 16px; cursor: pointer; font-weight: 600; display: flex; justify-content: space-between; gap: 12px; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--muted); font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .anchor { color: var(--muted); text-decoration: none; margin-left: auto; opacity: .6; }
.faq-answer { padding: 0 16px 8px; }
.glossary dt { font-weight: 700; margin-top: 20px; scroll-margin-top: 90px; }
.glossary dd { margin: 4px 0 0; }

/* Tables */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table thead th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--bg-soft); }
.data-table td.num { white-space: nowrap; }
.compare-table th[scope="row"] { width: 30%; }

/* Comparison page */
.compare-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.filters { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); position: sticky; top: 88px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-weight: 600; margin-bottom: 6px; }
.filters label { display: flex; gap: 10px; align-items: center; font-weight: 400; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; transition: background-color .15s, color .15s; }
.filters label:hover { background: var(--bg-soft); }
.filters label:has(input:checked) { color: var(--accent); font-weight: 600; }
.filters .range { display: flex; gap: 8px; }
.filters-close { display: none; }
.results-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.view-toggle { display: inline-flex; gap: 2px; padding: 3px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 10px; }
.view-toggle button { background: none; border: 0; padding: 6px 14px; border-radius: 7px; font: inherit; font-size: .92rem; color: var(--muted); cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s; }
.view-toggle button:hover { color: var(--text); }
.view-toggle button[aria-pressed="true"] { background: var(--surface); color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(20,32,46,.12); }
.provider-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.provider-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface); display: grid; gap: 8px; }
.provider-card h3 { margin: 0; font-size: 1.05rem; }
.provider-card .row { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .92rem; color: var(--muted); }
.asset-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.asset-icons span { font-size: .75rem; padding: 1px 6px; border-radius: 4px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.stale { color: var(--announced); font-size: .85rem; }
.empty-state { text-align: center; padding: 40px 16px; border: 1px dashed var(--border); border-radius: var(--radius); }
.skeleton { background: linear-gradient(90deg, var(--bg-soft), var(--border), var(--bg-soft)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); height: 72px; margin-bottom: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.filters-open { display: none; }
@media (max-width: 860px) {
  .compare-layout { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: auto 0 0 0; max-height: 80vh; overflow-y: auto; border-radius: 16px 16px 0 0; z-index: 40; transform: translateY(100%); transition: transform .2s; top: auto; }
  .filters.is-open { transform: none; box-shadow: 0 -8px 32px rgba(0,0,0,.25); }
  .filters-close, .filters-open { display: inline-flex; }
  .view-toggle { display: none; }
}

/* Profile */
.profile-header { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-header h1 { margin: 0; }
.profile-logo { width: 56px; height: 56px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; overflow: hidden; }
.profile-sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 24px; margin: 0; }
.fact dt { color: var(--muted); font-size: .88rem; }
.fact dd { margin: 2px 0 0; font-weight: 600; }
.src { text-decoration: none; font-weight: 400; color: var(--muted); margin-left: 2px; }
.src--none { color: var(--muted); opacity: .6; }
.asset-list { list-style: none; padding: 0; margin: 0; }
.asset-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.asset-list .is-no { color: var(--muted); }
.cards-grid { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mini-card a { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--surface); }
.mini-card a:hover { border-color: var(--accent); }
.provider-links { columns: 3 200px; padding-left: 18px; }

/* Calculator */
.calc-layout { display: grid; grid-template-columns: 340px 1fr; gap: 24px; align-items: start; }
.calc-form { display: grid; gap: 14px; }
.calc-form .field { display: grid; gap: 4px; }
.calc-form .hint { font-size: .82rem; color: var(--muted); }
.input-group { display: flex; align-items: stretch; border: 1px solid #cbd5e1; border-radius: 10px; background: var(--surface); overflow: hidden;
  transition: border-color .15s, box-shadow .15s; }
.input-group + .input-group { margin-top: 8px; }
.input-group:hover { border-color: #94a3b8; }
.input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input-group input { border: 0; border-radius: 0; box-shadow: none !important; background: transparent; min-width: 0; }
.input-group span { display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-size: .88rem; white-space: nowrap; background: var(--bg-soft); border-left: 1px solid var(--border); }
.calc-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.calc-results .stat dd { font-size: 1.35rem; }
.calc-highlight { background: var(--accent-soft); border-color: transparent; box-shadow: inset 3px 0 0 var(--gold); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .9rem; margin: 8px 0; }
.chart-legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--c); }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.mini-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; }

@media (max-width: 860px) {
  .calc-layout, .mini-calc { grid-template-columns: 1fr; }
  .calc-results { grid-template-columns: 1fr; }
}

/* AI page */
.code-block { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre; margin: 8px 0 16px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; max-width: 640px; }
.copy-row code { flex: 1; background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; overflow-x: auto; white-space: nowrap; }
.tabs [role="tablist"] { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; font: inherit; color: var(--muted); cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs [role="tabpanel"] { padding: 16px 0; }
.tool-list { display: grid; gap: 12px; list-style: none; padding: 0; }
.tool-list li { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.tool-list code { font-weight: 600; }
.example-list li { margin-bottom: 6px; }

/* Ads - reserved space prevents layout shift */
.ad-slot { margin: 24px 0; min-height: 110px; border: 1px dashed var(--border); border-radius: var(--radius); padding: 8px; }
.ad-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-soft); padding: 32px 0 24px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.footer-grid a { color: var(--text); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-brand { font-weight: 700; }
.footer-h { font-weight: 600; margin-bottom: 4px; }
.disclaimer { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* Cookie banner - "Reject all" on the first layer, same weight as "Accept" */
.cookie-banner { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.cookie-inner { padding: 18px 20px; }
.cookie-title { font-weight: 700; margin-bottom: 4px; }
.cookie-options { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 12px; }
.cookie-options label { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.cookie-actions .btn { flex: 1 1 auto; }

/* ===================== Motion =====================
   Calm, "financial" motion: slow ambient gradients, lines that draw themselves, content that
   eases in on scroll. Everything is switched off under prefers-reduced-motion (bottom). */

/* Header: glass + shadow once the page scrolls */
.site-header { transition: box-shadow .3s, background-color .3s; }
.site-header.is-scrolled { background: rgba(30,41,59,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); box-shadow: 0 6px 24px rgba(0,0,0,.15); }

/* Hero */
.hero { position: relative; isolation: isolate; }
.hero-glow { position: absolute; inset: -40px -16px 0; z-index: -1; overflow: hidden; pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 45%, transparent 100%); mask-image: radial-gradient(ellipse 70% 75% at 50% 45%, #000 45%, transparent 100%); }
.hero-glow span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: float 18s ease-in-out infinite alternate; }
.hero-glow span:nth-child(1) { width: 420px; height: 420px; background: #f5e0e0; left: -80px; top: -60px; }
.hero-glow span:nth-child(2) { width: 320px; height: 320px; background: #fde8d0; right: 8%; top: 10%; animation-duration: 22s; animation-delay: -6s; }
.hero-glow span:nth-child(3) { width: 260px; height: 260px; background: #e8ecf4; left: 40%; bottom: -80px; animation-duration: 26s; animation-delay: -12s; }
@keyframes float { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.08); } 100% { transform: translate(-30px,20px) scale(.96); } }

.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--accent); background: rgba(255,255,255,.7);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); position: relative; }
.pulse-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--gold); animation: pulse 2s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3); opacity: 0; } }

.hl { position: relative; white-space: nowrap; }
.hl::after { content: ""; position: absolute; left: 0; right: 0; bottom: .02em; height: .14em; border-radius: 4px; background: var(--gold); opacity: .75;
  transform: scaleX(0); transform-origin: left; animation: underline 1s .5s cubic-bezier(.2,.7,.2,1) forwards; z-index: -1; }
@keyframes underline { to { transform: scaleX(1); } }

.hero-copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero-copy > *:nth-child(2) { animation-delay: .08s; }
.hero-copy > *:nth-child(3) { animation-delay: .16s; }
.hero-copy > *:nth-child(4) { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.hero-card { background: rgba(255,255,255,.8); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 20px 50px rgba(20,32,46,.08);
  backdrop-filter: blur(6px); animation: rise .8s .2s cubic-bezier(.2,.7,.2,1) both; }
.hero-card .countdown { margin-bottom: 12px; }
.hero-chart { margin: 0; }
.hero-chart svg { width: 100%; height: 130px; display: block; overflow: visible; }
.hero-chart .grid { stroke: var(--border); stroke-dasharray: 3 5; }
.hero-chart path { fill: none; stroke-width: 3; stroke-linecap: round; }
.draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s cubic-bezier(.4,0,.2,1) forwards; }
.draw--1 { animation-delay: .5s; } .draw--2 { animation-delay: .7s; } .draw--3 { animation-delay: .9s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.end-dot { fill: var(--gold); opacity: 0; transform-origin: 318px 22px; animation: pop .4s 2.2s forwards, breathe 2.4s 2.6s ease-in-out infinite; }
@keyframes pop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
@keyframes breathe { 50% { transform: scale(1.35); } }
.hero-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); margin-top: 6px; }
.hero-legend span::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }

/* Institutions marquee */
.marquee { margin: 8px 0 24px; }
.marquee-label { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 8px; }
.marquee-viewport { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; gap: 10px; padding-right: 10px; }
.marquee-item { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); text-decoration: none; white-space: nowrap; font-size: .92rem; transition: border-color .2s, transform .2s; }
.marquee-item span { color: var(--muted); font-size: .78rem; }
.marquee-item:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Scroll reveal (class added by JS, so content stays visible without JS) */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: var(--d, 0s); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Hover depth on cards */
.points li, .stat, .provider-card, .mini-card a, .tool-list li, .faq-item { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.points li:hover, .stat:hover, .provider-card:hover, .tool-list li:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,32,46,.08); border-color: #cbd5e1; }
.points li svg { transition: transform .4s cubic-bezier(.2,.7,.2,1); }
.points li:hover svg { transform: scale(1.12) rotate(-4deg); }

/* Buttons */
.btn { position: relative; overflow: hidden; transition: background-color .2s, transform .15s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(239,68,68,.25); }
.btn:active { transform: translateY(0); box-shadow: none; }
.btn--ghost:hover { box-shadow: 0 4px 12px rgba(20,32,46,.08); }
.btn--shine::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,.35), transparent); transform: skewX(-20deg); animation: shine 4.5s 1.5s ease-in-out infinite; }
@keyframes shine { 0%, 70% { left: -60%; } 100% { left: 130%; } }

/* Mini calculator result: gentle flash when the number changes */
.calc-output strong { display: inline-block; transition: color .3s; }
.calc-output.is-updated strong { animation: bump .5s ease; }
@keyframes bump { 40% { transform: scale(1.08); color: var(--gold); } }

/* AI chat demo */
.chat-demo { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(20,32,46,.08); overflow: hidden; min-height: 250px; display: flex; flex-direction: column; }
.chat-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.chat-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.chat-title { margin-left: 8px; font-size: .8rem; color: var(--muted); font-weight: 600; }
.chat-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; justify-content: flex-end; }
.msg { max-width: 88%; padding: 9px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.45; animation: rise .35s ease both; }
.msg--user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.msg--bot { align-self: flex-start; background: var(--bg-soft); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg--tool { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font: 600 .75rem/1 ui-monospace, Menlo, monospace; color: var(--accent);
  background: var(--gold-soft); border: 1px solid #fed7aa; padding: 6px 10px; border-radius: 999px; }
.spinner { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--gold); border-right-color: transparent; animation: spin .8s linear infinite; }
.msg--tool.is-done .spinner { animation: none; border-color: var(--available); background: var(--available); }
@keyframes spin { to { transform: rotate(360deg); } }
.caret::after { content: "▍"; color: var(--gold); animation: blink 1s steps(1) infinite; margin-left: 1px; }
@keyframes blink { 50% { opacity: 0; } }

/* Calculator chart lines draw on first render */
.chart path.draw { animation-duration: 1.2s; }

@media (max-width: 860px) {
  .hero-glow span { filter: blur(40px); }
  .marquee-track { animation-duration: 45s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
  .marquee-viewport { overflow-x: auto; }
}

/* ── Chat widget ── */
.chat-widget { position: fixed; bottom: 24px; right: 24px; z-index: 900; font-family: inherit; }
.chat-toggle { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 20px rgba(239,68,68,.35); transition: transform .2s, box-shadow .2s; }
.chat-toggle:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(239,68,68,.45); }
.chat-toggle.is-open { transform: scale(.9) rotate(90deg); }

.chat-panel { position: fixed; bottom: 92px; right: 24px; width: 380px; max-width: calc(100vw - 32px); height: min(520px, calc(100vh - 120px)); background: #fff; border-radius: 16px; box-shadow: 0 12px 48px rgba(0,0,0,.18); display: flex; flex-direction: column; overflow: hidden; }

.chat-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--text); color: #fff; flex-shrink: 0; }
.chat-panel-title { font-weight: 600; font-size: .95rem; }
.chat-panel-close { background: none; border: none; color: #94a3b8; font-size: 1.5rem; cursor: pointer; padding: 0 4px; line-height: 1; }
.chat-panel-close:hover { color: #fff; }

.chat-panel-msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.chat-msg { max-width: 88%; animation: chatFadeIn .2s ease; }
@keyframes chatFadeIn { from { opacity: 0; transform: translateY(6px); } }
.chat-msg--user { align-self: flex-end; }
.chat-msg--bot { align-self: flex-start; }
.chat-msg--loading { align-self: flex-start; display: flex; align-items: center; gap: 8px; }

.chat-msg-text { padding: 10px 14px; border-radius: 14px; font-size: .9rem; line-height: 1.55; word-break: break-word; }
.chat-msg--user .chat-msg-text { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg--bot .chat-msg-text { background: #f1f5f9; color: var(--text); border-bottom-left-radius: 4px; }

.chat-dots { display: flex; gap: 4px; padding: 10px 14px; background: #f1f5f9; border-radius: 14px; }
.chat-dots span { width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; animation: chatBounce .6s infinite alternate; }
.chat-dots span:nth-child(2) { animation-delay: .15s; }
.chat-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes chatBounce { to { opacity: .3; transform: translateY(-3px); } }

.chat-tool-label { font-size: .8rem; color: var(--muted); white-space: nowrap; }

.chat-panel-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #e2e8f0; flex-shrink: 0; background: #fff; }
.chat-panel-input { flex: 1; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 14px; font-size: .9rem; font-family: inherit; outline: none; transition: border-color .15s; background: #fff; color: var(--text); }
.chat-panel-input:focus { border-color: var(--accent); }
.chat-panel-input:disabled { opacity: .6; }
.chat-panel-send { width: 40px; height: 40px; border-radius: 10px; border: none; background: var(--accent); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .15s; }
.chat-panel-send:hover { background: var(--accent-hover); }
.chat-panel-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  .chat-widget { bottom: 16px; right: 16px; }
  .chat-panel { bottom: 80px; right: 16px; width: calc(100vw - 32px); height: calc(100vh - 120px); border-radius: 12px; }
}
