/* ============================================================
   Deep Ocean — brand design tokens & marketing styles
   ============================================================ */
:root {
    --navy: #0B2A4A;
    --navy-700: #0E3358;
    --navy-900: #07203A;
    --teal: #14B8A6;
    --cyan: #06B6D4;
    --crystal: #F59E0B;         /* amber — the logo crystal; a warm "mineral precipitating from brine" accent */
    --accent: var(--cyan);      /* semantic alias for the brand accent (Deep Ocean cyan) */
    --ink: #0F172A;
    --muted: #64748B;
    --surface: #F1F5F9;
    --white: #FFFFFF;
    --line: #E2E8F0;
    --bg: #FFFFFF;              /* page background */
    --card: #FFFFFF;           /* raised card / control surface */
    --heading: var(--navy);    /* navy as text (headings, labels); flips light in dark mode */
    color-scheme: light;
    --maxw: 1120px;
    /* align MudBlazor (calculator) typography with the marketing site */
    --mud-typography-default-family: 'Inter', system-ui, sans-serif;
}

/* ============================================================
   Dark theme — token overrides + the few colours that can't be
   tokenised. Applied via [data-theme="dark"] on <html>, which the
   inline script in App.razor sets before first paint (no flash).
   ============================================================ */
[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0A1320;
    --card: #111E2D;
    --surface: #18293B;
    --line: #26384D;
    --ink: #E3EAF2;
    --muted: #93A2B5;
    --heading: #EAF1F8;
    --white: #0A1320;
}
[data-theme="dark"] .site-nav { background: rgba(10,19,32,.82); }
/* primary CTA: navy is too close to the dark page, so use a vibrant accent fill with dark text */
[data-theme="dark"] .btn-primary { background: linear-gradient(135deg, var(--cyan), var(--teal)); color: #06121F; box-shadow: 0 2px 14px rgba(6,182,212,.28); }
[data-theme="dark"] .btn-primary:hover { background: linear-gradient(135deg, var(--teal), var(--cyan)); box-shadow: 0 8px 24px rgba(6,182,212,.42); }
/* status colours: keep the translucent tints, lift the text so it reads on dark chips */
[data-theme="dark"] .calc-summary.ok,
[data-theme="dark"] .calc-badge.ok,
[data-theme="dark"] .hc-badge,
[data-theme="dark"] .gas-out-amt.in { color: #4ADE80; }
[data-theme="dark"] .calc-summary.lvl-mod,
[data-theme="dark"] .sev-mod,
[data-theme="dark"] .calc-stale,
[data-theme="dark"] .calc-gas-warn,
[data-theme="dark"] .hc-summary,
[data-theme="dark"] .gas-out-amt.out { color: #FBBF24; }
[data-theme="dark"] .calc-summary.lvl-high,
[data-theme="dark"] .calc-badge.bad,
[data-theme="dark"] .sev-high,
[data-theme="dark"] .calc-error { color: #F87171; }
[data-theme="dark"] .calc-summary.lvl-low,
[data-theme="dark"] .sev-low,
[data-theme="dark"] .tag-skip { color: #A8B6C8; }
[data-theme="dark"] .tag-must { color: #5EEAD4; }
[data-theme="dark"] .tag-defer { color: #67E8F9; }

/* Theme toggle (nav) — shows a moon in light mode, a sun in dark */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--heading); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.theme-toggle svg { display: block; }
.theme-toggle .ic-sun { display: none; }
[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
[data-theme="dark"] .theme-toggle .ic-sun { display: block; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
}

* { box-sizing: border-box; }

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

/* ---- Nav ---- */
.site-nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 0 24px; height: 64px;
    display: flex; align-items: center; justify-content: space-between;
    position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { display: block; }
.brand-name { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.15rem; color: var(--heading); letter-spacing: -0.01em; }
.brand-accent { color: var(--cyan); }
/* brand mark: the crystal "grows" into the C on hover */
.brand-mark .brand-crystal { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
    .brand-mark .brand-crystal { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
    .brand:hover .brand-mark .brand-crystal { transform: scale(1.22); }
}
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-tools { display: flex; align-items: center; gap: 8px; }
.nav-burger { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border-radius: 9px; border: 1px solid var(--line); background: transparent; color: var(--heading); cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.nav-burger:hover { border-color: var(--accent); color: var(--accent); background: var(--surface); }
.nav-link {
    color: var(--ink); text-decoration: none; font-weight: 500; font-size: 0.94rem;
    padding: 8px 12px; border-radius: 8px;
}
.nav-link:hover { background: var(--surface); }
.nav-link.active { color: var(--heading); background: var(--surface); }

/* ---- Buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.94rem; text-decoration: none;
    padding: 9px 18px; border-radius: 10px; border: 1px solid transparent;
    cursor: pointer; transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 13px 26px; font-size: 1rem; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(11,42,74,.25); }
.btn-primary:hover { background: var(--navy-700); box-shadow: 0 6px 18px rgba(6,182,212,.18); }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { border-color: var(--cyan); color: var(--cyan); }

/* ---- Hero ---- */
.hero {
    background:
        radial-gradient(1100px 500px at 80% -10%, rgba(6,182,212,.18), transparent 60%),
        radial-gradient(900px 500px at 0% 0%, rgba(20,184,166,.12), transparent 55%),
        linear-gradient(180deg, var(--card) 0%, var(--surface) 100%);
    border-bottom: 1px solid var(--line);
}
.hero { position: relative; overflow: hidden; }
.hero-rings { position: absolute; right: -70px; top: -50px; width: 360px; height: 360px; opacity: 0.06; pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 84px 24px 80px; display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--teal); margin: 0 0 16px; }
.hero-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(2.1rem, 4.4vw, 3.3rem); line-height: 1.08; letter-spacing: -0.02em; color: var(--heading); margin: 0 0 20px; max-width: 18ch; }
.grad { background: linear-gradient(90deg, var(--cyan), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1.02rem, 2vw, 1.16rem); color: var(--muted); max-width: 52ch; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; justify-content: flex-start; flex-wrap: wrap; }
.hero-note { margin-top: 26px; font-size: .82rem; color: var(--muted); }

/* ---- Hero product card (#1) ---- */
.hero-visual { position: relative; }
.hero-visual::before { content: ""; position: absolute; right: -34px; top: -40px; width: 170px; height: 170px; border-radius: 50%; border: 26px solid var(--accent); opacity: .07; pointer-events: none; }
/* AI-assistant framing above the result card: a natural-language ask → "runs locally" → Crysalt's answer */
.hero-ask { position: relative; z-index: 1; max-width: 430px; margin: 0 0 0 auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px 14px 14px 5px; padding: 13px 17px; box-shadow: 0 10px 28px -18px rgba(11,42,74,.32); }
.hero-ask-who { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); font-weight: 700; }
.hero-ask-q { margin: 5px 0 0; color: var(--heading); font-size: 1.02rem; font-weight: 500; line-height: 1.45; }
.hero-relay { position: relative; z-index: 1; max-width: 430px; margin: 11px 0 12px auto; display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--muted); }
.hero-relay svg { color: var(--accent); flex-shrink: 0; }
.hero-card { position: relative; z-index: 1; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 20px; max-width: 430px; margin-left: auto; box-shadow: 0 26px 60px -22px rgba(11,42,74,.38), 0 8px 22px -12px rgba(11,42,74,.16); animation: floaty 7s ease-in-out infinite; }
.hero-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hc-title { font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--heading); font-size: .98rem; }
.hc-cond { font-size: .76rem; color: var(--muted); }
.hc-badge { margin-left: auto; font-size: .66rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(22,163,74,.12); color: #15803D; }
.hc-summary { background: rgba(217,119,6,.10); color: #92400E; border: 1px solid rgba(217,119,6,.22); border-radius: 9px; padding: 9px 12px; font-size: .85rem; margin-bottom: 14px; }
.hc-summary strong { font-family: 'Manrope', sans-serif; font-weight: 800; }
.hc-min { padding: 9px 0; border-bottom: 1px solid var(--line); }
.hc-min:last-of-type { border-bottom: none; }
.hc-min-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; }
.hc-name { font-weight: 600; color: var(--heading); font-size: .92rem; }
.hc-mass { font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--ink); font-size: .92rem; }
.hc-mass small { color: var(--muted); font-weight: 400; }
.hc-bar { height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.hc-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--teal)); }
.hc-stats { margin-top: 6px; font-size: .76rem; color: var(--muted); }
.hc-foot { margin-top: 12px; font-size: .72rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---- Credibility band (#2) ---- */
.credband { background: var(--navy); }
.credband-inner { max-width: var(--maxw); margin: 0 auto; padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px 40px; flex-wrap: wrap; }
.cred-stats { display: flex; gap: 36px; flex-wrap: wrap; }
.cred-stat { display: flex; flex-direction: column; }
.cred-num { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.9rem; line-height: 1; background: linear-gradient(90deg, #fff, #BAE6FD); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cred-label { font-size: .78rem; color: rgba(255,255,255,.7); margin-top: 5px; }
.cred-badges { display: flex; gap: 10px; flex-wrap: wrap; }
.cred-badge { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.92); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 14px; }

/* ---- Scroll-reveal motion (#3) — gated on .js so content shows if JS is off ---- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero-visual.reveal { transition-delay: .12s; }
.js .pillar.reveal:nth-child(2) { transition-delay: .08s; }
.js .pillar.reveal:nth-child(3) { transition-delay: .16s; }
.js .pillar.reveal:nth-child(4) { transition-delay: .24s; }

@media (max-width: 880px) {
    .hero-inner { grid-template-columns: 1fr; gap: 36px; padding: 60px 24px 52px; }
    .hero-title { max-width: 22ch; }
    .hero-card { margin: 0 auto; }
    .hero-visual::before { display: none; }
    .credband-inner { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-card { animation: none; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Sections ---- */
.section { padding: 78px 0; }
.section-alt { background: var(--surface); }
.section-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.02em; color: var(--heading); margin: 0 0 14px; }
.section-title.light { color: #fff; }
.section-lead { font-size: 1.08rem; color: var(--muted); max-width: 62ch; }
.section-lead.light { color: rgba(255,255,255,.82); }

/* ---- Pillars ---- */
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-top: 36px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 26px; transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.pillar:hover { box-shadow: 0 14px 40px rgba(11,42,74,.08); transform: translateY(-3px); border-color: rgba(6,182,212,.4); }
.pillar-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 11px; background: linear-gradient(135deg, var(--navy), var(--cyan)); color: #fff; font-size: 1.1rem; margin-bottom: 16px; }
.pillar h3 { font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--heading); margin: 0 0 8px; font-size: 1.15rem; }
.pillar p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---- Dark / science section ---- */
.section-dark { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); }
.split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
.science-card { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 16px; padding: 10px 22px; }
.science-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.science-row:last-child { border-bottom: none; }
.science-row span { color: rgba(255,255,255,.6); font-size: .92rem; }
.science-row b { color: #fff; font-weight: 600; font-size: .95rem; text-align: right; }

/* ---- CTA band ---- */
.cta-band { text-align: center; }
.cta-band .section-lead { margin: 0 auto 26px; }

/* ---- Contact ---- */
/* Reuses .split for the two-column grid, so it collapses at the same breakpoint as the other split
   sections. scroll-margin keeps the heading clear of the sticky nav when arriving via /#contact. */
#contact { scroll-margin-top: 90px; }
#contact .section-lead { margin-bottom: 24px; }
.contact-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.contact-reasons li { position: relative; padding-left: 26px; color: var(--muted); font-size: .96rem; }
.contact-reasons li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: linear-gradient(135deg, var(--cyan), var(--teal)); }
.contact-reasons b { color: var(--heading); font-weight: 600; }

.contact-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 28px 30px; box-shadow: 0 26px 60px -30px rgba(11,42,74,.34); }
.contact-card-label { display: flex; align-items: center; gap: 7px; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.contact-card-label svg { width: 15px; height: 15px; flex-shrink: 0; }
.contact-address { display: inline-block; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(1.15rem, 2.3vw, 1.5rem); letter-spacing: -.01em; color: var(--heading); text-decoration: none; word-break: break-word; border-bottom: 2px solid transparent; transition: color .15s ease, border-color .15s ease; }
.contact-address:hover { color: var(--accent); border-bottom-color: var(--accent); }
.contact-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.contact-copy-btn { gap: 8px; font-family: inherit; }
.contact-copy-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.contact-copy-btn.is-copied { border-color: var(--teal); color: var(--teal); }

/* ---- Docs ---- */
.docs { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 80px; display: grid; grid-template-columns: 232px 1fr; gap: 48px; align-items: start; }
.docs-sidebar { position: sticky; top: 88px; }
.docs-side-title { text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 700; color: var(--muted); margin: 0 0 12px; }
.docs-nav { display: flex; flex-direction: column; gap: 2px; }
.docs-nav-link { color: var(--ink); text-decoration: none; font-size: .94rem; padding: 8px 12px; border-radius: 8px; border-left: 2px solid transparent; }
.docs-nav-link:hover { background: var(--surface); }
.docs-nav-link.active { color: var(--heading); font-weight: 600; background: var(--surface); border-left-color: var(--cyan); }

.prose { max-width: 760px; color: var(--ink); }
.prose .eyebrow { margin-bottom: 10px; }
.prose h1 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; color: var(--heading); margin: 0 0 14px; }
.prose h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--heading); margin: 38px 0 12px; }
.prose .lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 8px; }
.prose p { margin: 12px 0; }
.prose ul { margin: 12px 0; padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--cyan); text-decoration: none; font-weight: 500; }
.prose a:hover { text-decoration: underline; }

code { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; font-size: .88em; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }
pre { background: var(--navy-900); color: #E6EDF3; border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-size: .86rem; line-height: 1.5; }
pre code { background: none; border: none; padding: 0; color: inherit; }

.doc-table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .94rem; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table thead th { font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.doc-table tbody tr:hover { background: var(--surface); }

.tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.tag-must { background: rgba(20,184,166,.14); color: #0F766E; }
.tag-defer { background: rgba(6,182,212,.14); color: #0E7490; }
.tag-skip { background: rgba(100,116,139,.16); color: #475569; }

.callout { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 10px; padding: 16px 18px; margin: 24px 0; color: var(--ink); font-size: .95rem; }
.callout.warn { border-left-color: #D97706; }

/* ---- Docs: rich content components (shared across pages) ---- */
/* feature / usage cards */
.doc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin: 18px 0; }
.doc-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.doc-card-ic { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(6,182,212,.10); color: var(--accent); margin-bottom: 10px; }
.doc-card-ic svg { width: 19px; height: 19px; }
.doc-card-tag { display: block; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin-bottom: 2px; }
.doc-card h3 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1rem; color: var(--heading); margin: 0 0 5px; }
.doc-card p { margin: 0; font-size: .9rem; color: var(--muted); line-height: 1.5; }

/* horizontal flow diagram */
.doc-flow { display: flex; align-items: stretch; gap: 0; margin: 22px 0; }
.doc-flow-stage { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 16px; }
.doc-flow-stage h4 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--accent); margin: 0 0 8px; }
.doc-flow-stage ul { margin: 0; padding-left: 16px; }
.doc-flow-stage li { font-size: .86rem; color: var(--ink); margin: 4px 0; }
.doc-flow-arrow { display: flex; align-items: center; color: var(--muted); padding: 0 8px; font-size: 1.1rem; }

/* stat badges */
.doc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 18px 0; }
.doc-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 15px 18px; }
.doc-stat b { display: block; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--heading); line-height: 1.1; }
.doc-stat span { font-size: .8rem; color: var(--muted); }

/* equation block */
.doc-eq { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 13px 18px; margin: 14px 0; font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .92rem; color: var(--ink); overflow-x: auto; }
.doc-eq small { display: block; margin-top: 7px; font-family: 'Inter', sans-serif; font-size: .8rem; color: var(--muted); }

/* numbered steps */
.doc-steps { list-style: none; counter-reset: step; padding: 0; margin: 18px 0; }
.doc-steps > li { counter-increment: step; position: relative; padding: 1px 0 20px 44px; margin: 0; }
.doc-steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #06121F; font-weight: 800; font-size: .88rem; display: flex; align-items: center; justify-content: center; }
.doc-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 13.5px; top: 32px; bottom: 2px; width: 1px; background: var(--line); }
.doc-steps h4 { margin: 3px 0 5px; font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--heading); font-size: .98rem; }

@media (max-width: 620px) {
    .doc-flow { flex-direction: column; }
    .doc-flow-arrow { transform: rotate(90deg); padding: 4px 0; align-self: center; }
}

.api-prose { max-width: 860px; }
.api-links { display: flex; gap: 12px; flex-wrap: wrap; }
.api-frame { display: block; width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: 12px; margin-top: 8px; background: var(--card); }
.api-note { max-width: 860px; color: var(--muted); font-size: .86rem; margin-top: 14px; }

@media (max-width: 860px) {
    .docs { grid-template-columns: 1fr; gap: 20px; }
    .docs-sidebar { position: static; }
    .docs-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ---- Download ---- */
.dl { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 90px; }
.dl-inner { max-width: 800px; }
.dl-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(1.8rem, 3.4vw, 2.4rem); letter-spacing: -.02em; color: var(--heading); margin: 6px 0 12px; }
.dl-lead { color: var(--muted); font-size: 1.06rem; line-height: 1.6; margin: 0 0 30px; max-width: 64ch; }
.dl-status { display: flex; gap: 16px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin: 8px 0 22px; }
.dl-status-ic { flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(6,182,212,.10); color: var(--accent); }
.dl-status-ic svg { width: 24px; height: 24px; }
.dl-status h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--heading); margin: 2px 0 6px; }
.dl-status p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }
.dl-status p a { color: var(--cyan); text-decoration: none; font-weight: 500; }
.dl-status p a:hover { text-decoration: underline; }
.dl-foot { font-size: .9rem; color: var(--muted); }
.dl-foot a { color: var(--cyan); text-decoration: none; font-weight: 500; }
.dl-foot a:hover { text-decoration: underline; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.dl-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 24px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.dl-card:hover { border-color: rgba(6,182,212,.4); box-shadow: 0 14px 40px rgba(11,42,74,.08); transform: translateY(-3px); }
.dl-icon { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: rgba(6,182,212,.10); color: var(--accent); margin-bottom: 10px; }
.dl-icon svg { width: 24px; height: 24px; }
.dl-card h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--heading); margin: 0; }
.dl-arch { font-size: .82rem; color: var(--muted); margin: 2px 0 14px; }
.dl-btn { width: 100%; }
.dl-note { font-size: .9rem; color: var(--muted); line-height: 1.6; margin: 20px 0 0; }
.dl-note a { color: var(--cyan); text-decoration: none; font-weight: 500; }
.dl-note a:hover { text-decoration: underline; }
.dl-next { margin-top: 44px; padding-top: 32px; border-top: 1px solid var(--line); }
.dl-next h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.3rem; color: var(--heading); margin: 0 0 14px; }
.dl-steps { color: var(--ink); margin: 0 0 22px; padding-left: 22px; line-height: 1.6; }
.dl-steps li { margin: 7px 0; }

/* ---- Footer ---- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,.7); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px; display: flex; flex-wrap: wrap; gap: 18px 40px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-wordmark { display: flex; align-items: center; gap: 10px; }
.footer-brand .brand-name { color: #fff; }
.footer-tag { font-size: .86rem; color: rgba(255,255,255,.55); }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: rgba(255,255,255,.8); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--cyan); }
.footer-muted { font-size: .82rem; color: rgba(255,255,255,.45); }

/* ---- Calculator ---- */
.calc { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 80px; }
.calc-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.calc-head-text { flex: 1; min-width: 260px; }
.calc-title { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 2rem; letter-spacing: -.02em; color: var(--heading); margin: 6px 0 8px; }
.calc-sub { color: var(--muted); font-size: 1.02rem; max-width: 62ch; margin: 0; }
.calc-loading { color: var(--muted); padding: 40px 0; }

.calc-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
.calc-col-inputs { display: flex; flex-direction: column; gap: 24px; }
.calc-col-results { position: sticky; top: 88px; }

.calc-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; }
.calc-card-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.calc-card-head h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--heading); margin: 0; }
.calc-unit { font-size: .82rem; color: var(--muted); }

.calc-comp { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.calc-comp-col h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 0 0 6px; }
.calc-comp-col:nth-child(3) h3 { margin-top: 16px; }
.calc-input-table { width: 100%; border-collapse: collapse; }
.calc-input-table td.sp { width: 1%; white-space: nowrap; padding: 5px 14px 5px 0; color: var(--heading); font-size: .9rem; font-weight: 500; }
.calc-input-table td.val { width: 100%; padding: 5px 0; }
.calc-input-table input { width: 100%; font: inherit; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; box-sizing: border-box; }
.calc-input-table input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }

.calc-scenarios { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.calc-scenarios-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin-right: 2px; }
.scn-chip { font: inherit; font-size: .82rem; font-weight: 500; color: var(--heading); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease; }
.scn-chip:hover { border-color: var(--accent); color: var(--accent); background: var(--card); }

/* Primary mode switcher (single brine / mix / profile) — a prominent full-width segmented control that
   clearly outranks the example chips below it */
.calc-mode { display: flex; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.calc-mode button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: .9rem; font-weight: 600; color: var(--muted); background: transparent; border: none; border-radius: 9px; padding: 11px 8px; cursor: pointer; white-space: nowrap; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.calc-mode button svg { width: 16px; height: 16px; flex-shrink: 0; }
.calc-mode button:hover { color: var(--heading); }
.calc-mode button.active { background: var(--card); color: var(--heading); box-shadow: 0 1px 3px rgba(11,42,74,.16); }
@media (max-width: 540px) {
    .calc-mode { flex-direction: column; }
    .calc-mode button { justify-content: flex-start; }
}

/* Mixing ratio slider (mix mode) */
.calc-mix-ratio { gap: 14px; }
.calc-mix-ratio > label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.calc-mix-ratio input[type=range] { flex: 1; min-width: 150px; accent-color: var(--accent); cursor: pointer; }
.calc-mix-ratio > span { font-size: .85rem; color: var(--ink); white-space: nowrap; }
.calc-mix-ratio b { color: var(--heading); font-weight: 700; }

/* P,T profile result — line chart + per-point table */
.profile-chart { width: 100%; height: auto; display: block; margin: 4px 0 6px; }
.profile-chart .pc-axis { stroke: var(--line); stroke-width: 1; }
.profile-chart .pc-ylab, .profile-chart .pc-end { fill: var(--muted); font-size: 9px; font-family: 'Inter', system-ui, sans-serif; }
.pc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 8px; }
.pc-leg { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink); }
.pc-leg i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.calc-table td.pc-min { text-align: left; color: var(--muted); }
.calc-table tr.pc-peak td { background: rgba(217,119,6,.10); font-weight: 600; }

.calc-conditions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 18px; }
.cond { display: flex; align-items: center; gap: 8px; }
.cond > label { font-size: .8rem; color: var(--muted); font-weight: 600; }
.cond > span { font-size: .85rem; color: var(--muted); }
.cond input { font: inherit; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; width: 78px; }
.cond input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.cond select { font: inherit; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; cursor: pointer; }
.cond select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.cond label[title] { cursor: help; text-decoration: underline dotted var(--line); text-underline-offset: 3px; }
.calc-note { font-size: .76rem; color: var(--muted); margin: 12px 0 0; cursor: help; }

/* Gas phase (open-system partitioning) input */
.calc-gas-tag { font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); background: rgba(6,182,212,.10); border: 1px solid rgba(6,182,212,.25); border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; }
.calc-gas-note { font-size: .82rem; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.calc-gas-note sub { font-size: .72em; }
.calc-gas-grid { display: flex; flex-direction: column; gap: 8px; }
.gas-row { display: grid; grid-template-columns: minmax(56px, auto) 1fr 92px minmax(78px, auto); align-items: center; gap: 12px; }
.gas-row .gas-sp { color: var(--heading); font-size: .92rem; font-weight: 600; white-space: nowrap; }
.gas-row .gas-role { font-size: .78rem; color: var(--muted); }
.gas-row input { font: inherit; font-size: .9rem; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; width: 92px; box-sizing: border-box; }
.gas-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.gas-row .gas-pp { font-size: .8rem; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.calc-gas-warn { margin-top: 12px; background: rgba(217,119,6,.10); border: 1px solid rgba(217,119,6,.25); color: #92400E; font-size: .82rem; padding: 9px 13px; border-radius: 8px; }

/* Gas phase exchange (results) */
.calc-gas-out { margin-top: 6px; }
.gas-out-row { display: flex; align-items: baseline; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.gas-out-row:last-child { border-bottom: none; }
.gas-out-name { color: var(--heading); font-weight: 600; min-width: 48px; }
.gas-out-pp { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.gas-out-pp small, .gas-out-amt small { color: var(--muted); font-weight: 400; }
.gas-out-amt { margin-left: auto; font-size: .9rem; font-variant-numeric: tabular-nums; }
.gas-out-amt b { font-weight: 700; }
.gas-out-amt.out { color: #B45309; }
.gas-out-amt.in { color: #15803D; }

.calc-action { display: flex; flex-direction: column; gap: 10px; }
.calc-predict { width: 100%; }
.calc-error { background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.25); color: #B91C1C; font-size: .88rem; padding: 10px 14px; border-radius: 8px; }

.calc-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--muted); min-height: 240px; }

.calc-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.calc-results-head h2 { font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--heading); margin: 0; }
.calc-badge { font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.calc-badge.ok { background: rgba(22,163,74,.12); color: #15803D; }
.calc-badge.bad { background: rgba(220,38,38,.12); color: #B91C1C; }

/* Export control (results header) */
.calc-results-actions { display: flex; align-items: center; gap: 10px; }
.calc-export { position: relative; }
.calc-export > summary { list-style: none; cursor: pointer; font-size: .8rem; font-weight: 600; color: var(--heading); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 4px 11px; user-select: none; }
.calc-export > summary::-webkit-details-marker { display: none; }
.calc-export > summary:hover { border-color: var(--accent); color: var(--accent); }
.calc-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; display: flex; flex-direction: column; min-width: 168px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 14px 36px -14px rgba(11,42,74,.34); }
.calc-export-menu button { font: inherit; text-align: left; font-size: .86rem; color: var(--ink); background: transparent; border: none; border-radius: 7px; padding: 8px 10px; cursor: pointer; }
.calc-export-menu button:hover { background: var(--surface); color: var(--heading); }
.calc-export-menu button small { color: var(--muted); }

.calc-summary { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .95rem; }
.calc-summary.ok { background: rgba(22,163,74,.10); color: #15803D; border: 1px solid rgba(22,163,74,.25); }
/* severity-tiered verdict banner — Low/Trace stay calm, only Moderate/High escalate to amber/red */
.calc-summary.lvl-low { background: rgba(100,116,139,.10); color: #475569; border: 1px solid rgba(100,116,139,.22); }
.calc-summary.lvl-mod { background: rgba(217,119,6,.10); color: #92400E; border: 1px solid rgba(217,119,6,.25); }
.calc-summary.lvl-high { background: rgba(220,38,38,.10); color: #B91C1C; border: 1px solid rgba(220,38,38,.25); }
.calc-summary-n { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.3rem; }
.calc-summary-sev { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 1.05rem; }
.calc-summary-min { font-size: .9rem; opacity: .9; }
.calc-summary-min::before { content: "— "; opacity: .7; }
.calc-summary-ph { margin-left: auto; color: var(--muted); font-size: .85rem; cursor: help; }

/* Stale result — inputs changed since the shown numbers were computed */
.calc-stale { background: rgba(217,119,6,.10); border: 1px solid rgba(217,119,6,.25); color: #92400E; font-size: .84rem; padding: 9px 13px; border-radius: 8px; margin-bottom: 14px; }
.calc-result-body.is-stale { opacity: .5; transition: opacity .15s ease; }

/* Indicative per-mineral severity pill (reuses the error/warn/neutral tones — no new hue) */
.sev-pill { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; cursor: help; }
.sev-high { background: rgba(220,38,38,.12); color: #B91C1C; }
.sev-mod  { background: rgba(217,119,6,.12); color: #92400E; }
.sev-low  { background: rgba(100,116,139,.14); color: #475569; }
.sev-trace { background: var(--surface); color: var(--muted); }

/* tooltip affordance for the jargon/help hovers */
.calc-diag span[title], .calc-mineral-stats span[title], .calc-mineral-mass[title], .calc-badge[title] { cursor: help; }

.calc-warn { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 8px; padding: 10px 14px; font-size: .86rem; color: var(--ink); margin-bottom: 10px; }

.calc-mineral { padding: 14px 0; border-bottom: 1px solid var(--line); }
.calc-mineral:last-of-type { border-bottom: none; }
.calc-mineral-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.calc-mineral-name { font-weight: 600; color: var(--heading); }
.calc-mineral-mass { font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--ink); }
.calc-mineral-mass small { color: var(--muted); font-weight: 400; }
.calc-bar { height: 9px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.calc-bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--teal)); border-radius: 999px; }
.calc-mineral-stats { display: flex; gap: 18px; margin-top: 7px; font-size: .82rem; color: var(--muted); }
.calc-mineral-stats b { color: var(--ink); font-weight: 600; }

.calc-diag { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: .82rem; color: var(--muted); margin-bottom: 16px; }
.calc-diag b { color: var(--ink); font-weight: 600; }

.calc-extra { margin-top: 16px; border-top: 1px solid var(--line); }
.calc-extra-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; margin: 14px 0 2px; }
.calc-acc { border-bottom: 1px solid var(--line); }
.calc-acc:last-child { border-bottom: none; }
.calc-acc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 11px 2px; font-size: .9rem; font-weight: 600; color: var(--heading); }
.calc-acc > summary::-webkit-details-marker { display: none; }
.calc-acc > summary::before { content: "▸"; color: var(--muted); font-size: .8rem; transition: transform .15s ease; }
.calc-acc[open] > summary::before { transform: rotate(90deg); }
.calc-table { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 2px 0 14px; }
.calc-table th { text-align: right; font-weight: 700; color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; padding: 4px 8px; border-bottom: 1px solid var(--line); }
.calc-table th:first-child, .calc-table td:first-child { text-align: left; }
.calc-table td { text-align: right; padding: 5px 8px; color: var(--ink); border-bottom: 1px solid var(--surface); font-variant-numeric: tabular-nums; }
.calc-table tr:last-child td { border-bottom: none; }
.calc-table td:first-child { color: var(--heading); font-weight: 500; }

@media (max-width: 860px) {
    .calc-grid { grid-template-columns: 1fr; }
    .calc-col-results { position: static; }
}

@media (max-width: 760px) {
    .split { grid-template-columns: 1fr; }
    /* collapse the nav into a hamburger dropdown */
    .nav-burger { display: inline-flex; }
    .nav-links {
        display: none; position: absolute; top: calc(100% + 1px); left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 2px;
        background: var(--card); border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 34px -20px rgba(11,42,74,.4); padding: 10px 16px 16px;
    }
    .nav-links.open { display: flex; }
    .nav-links .nav-link { padding: 11px 12px; }
    .nav-links .btn-primary { margin-top: 8px; justify-content: center; }
}

h1:focus {
    outline: none;
}

/* Print / Save-as-PDF: a clean report of the scenario (inputs + result), chrome stripped */
@media print {
    .site-nav, .site-footer, .calc-scenarios, .calc-action, .calc-export, .calc-empty { display: none !important; }
    .calc { padding: 0; max-width: none; }
    .calc-grid { display: block; }
    .calc-col-results { position: static; }
    .calc-card { box-shadow: none; margin-bottom: 12px; }
    .calc-result-body.is-stale { opacity: 1; }   /* never print a dimmed result */
    .calc-summary, .calc-badge, .calc-bar-fill, .sev-pill {
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    /* the "Full output" accordions are force-opened by crysaltPrintReport — show their content and
       keep rows/cards from splitting across pages */
    .calc-acc > summary::before { content: ""; }
    .calc-mineral, .gas-out-row, .calc-table tr { break-inside: avoid; }
    a[href]::after { content: ""; }              /* suppress URL footnotes */
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
/* ---- Terms page ---- */
.doc-meta { font-size: .82rem; color: var(--muted); margin: 0 0 8px; }

/* ---- Playground terms gate ---- */
.calc-gate {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(6, 18, 31, .62); backdrop-filter: blur(3px);
}
.calc-gate-card {
    background: var(--card); border: 1px solid var(--line); border-left: 3px solid #D97706;
    border-radius: 14px; padding: 26px 28px; max-width: 560px; width: 100%;
    max-height: calc(100vh - 48px); overflow-y: auto;
    box-shadow: 0 24px 60px rgba(6, 18, 31, .34); color: var(--ink);
}
.calc-gate-card h2 {
    font-family: Manrope, sans-serif; font-weight: 800; font-size: 1.22rem;
    color: var(--heading); margin: 0 0 10px;
}
.calc-gate-card p { margin: 0 0 12px; font-size: .95rem; }
.calc-gate-card ul { margin: 0 0 20px; padding-left: 20px; }
.calc-gate-card li { margin: 7px 0; font-size: .92rem; }
.calc-gate-card a { color: var(--cyan); text-decoration: none; font-weight: 500; }
.calc-gate-card a:hover { text-decoration: underline; }
.calc-gate-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---- Standing result disclaimer ---- */
/* Neutral on purpose: amber stays reserved for real per-result warnings. */
.calc-disclaimer {
    margin: 18px 0 0; padding-top: 12px; border-top: 1px solid var(--line);
    font-size: .8rem; line-height: 1.5; color: var(--muted);
}
.calc-disclaimer a { color: var(--cyan); text-decoration: none; }
.calc-disclaimer a:hover { text-decoration: underline; }

@media print {
    .calc-gate { display: none !important; }
    .calc-disclaimer { color: #333; border-top: 1px solid #bbb; }
}
