/* ==========================================================================
   SELF DOC - website and chatbot styles
   ========================================================================== */

:root {
  color-scheme: light;
  --bg: #f6f9f8;
  --bg-soft: #edf5f3;
  --surface: #ffffff;
  --surface-2: #f1f6f5;
  --border: #e0eae8;
  --text: #0c1f22;
  --text-2: #3d5457;
  --muted: #687c7f;
  --brand: #0b7a73;
  --brand-soft: #e2f4f0;
  --on-brand: #ffffff;
  --btn-bg: linear-gradient(135deg, #0d847c 0%, #095f5a 100%);
  --grad: linear-gradient(135deg, #14b3a1 0%, #0b7a73 50%, #105b73 100%);
  --grad-soft: linear-gradient(135deg, #e4f7f2 0%, #eef2ff 100%);
  --grad-text: linear-gradient(135deg, #12a594 0%, #0b7a73 55%, #105b73 100%);
  --accent: #ff7a59;
  --accent-soft: #fff0ea;
  --sun: #ffc857;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --bar: #2a78d6;
  --track: #e5eeec;
  --user-bubble: linear-gradient(135deg, #12a594 0%, #0b7a73 100%);
  --staff-bubble: #fff6e2;
  --staff-border: #f2d79c;
  --alert-bg: #fdeded;
  --alert-border: #f3b9b9;
  --blob-1: #9fe8d9;
  --blob-2: #cdd8ff;
  --blob-3: #ffd8c7;
  --glow: rgba(11, 122, 115, .55);
  --shadow-sm: 0 1px 2px rgba(12, 31, 34, .05), 0 3px 10px rgba(12, 31, 34, .04);
  --shadow: 0 14px 34px -10px rgba(12, 31, 34, .16), 0 4px 12px rgba(12, 31, 34, .05);
  --shadow-lg: 0 40px 90px -24px rgba(12, 31, 34, .4);
  --radius: 20px;
  --font: 'Plus Jakarta Sans', 'Noto Sans Sinhala', 'Noto Sans Tamil', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', 'Noto Sans Sinhala', 'Noto Sans Tamil', 'Plus Jakarta Sans', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0a1315; --bg-soft: #0d1a1c; --surface: #12211f; --surface-2: #172a2b; --border: #233a3b;
    --text: #e9f4f2; --text-2: #b5c8c6; --muted: #86a09d;
    --brand: #2cc4b5; --brand-soft: #123331; --on-brand: #03201d;
    --btn-bg: linear-gradient(135deg, #45d6c6 0%, #23ab9e 100%);
    --grad: linear-gradient(135deg, #17a998 0%, #0c6f69 50%, #0e4d61 100%);
    --grad-soft: linear-gradient(135deg, #0f2a28 0%, #141c31 100%);
    --grad-text: linear-gradient(135deg, #7cf0dd 0%, #2cc4b5 55%, #5bc0f0 100%);
    --accent: #ff8b6e; --accent-soft: #33201a;
    --bar: #3987e5; --track: #213538;
    --user-bubble: linear-gradient(135deg, #1a9e92 0%, #0e6c67 100%);
    --staff-bubble: #33290f; --staff-border: #6b5624;
    --alert-bg: #3a1a1a; --alert-border: #6e3535;
    --blob-1: #0f5c55; --blob-2: #24305e; --blob-3: #4d2a1f;
    --glow: rgba(44, 196, 181, .35);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
    --shadow-lg: 0 40px 90px -24px rgba(0, 0, 0, .75);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0a1315; --bg-soft: #0d1a1c; --surface: #12211f; --surface-2: #172a2b; --border: #233a3b;
  --text: #e9f4f2; --text-2: #b5c8c6; --muted: #86a09d;
  --brand: #2cc4b5; --brand-soft: #123331; --on-brand: #03201d;
  --btn-bg: linear-gradient(135deg, #45d6c6 0%, #23ab9e 100%);
  --grad: linear-gradient(135deg, #17a998 0%, #0c6f69 50%, #0e4d61 100%);
  --grad-soft: linear-gradient(135deg, #0f2a28 0%, #141c31 100%);
  --grad-text: linear-gradient(135deg, #7cf0dd 0%, #2cc4b5 55%, #5bc0f0 100%);
  --accent: #ff8b6e; --accent-soft: #33201a;
  --bar: #3987e5; --track: #213538;
  --user-bubble: linear-gradient(135deg, #1a9e92 0%, #0e6c67 100%);
  --staff-bubble: #33290f; --staff-border: #6b5624;
  --alert-bg: #3a1a1a; --alert-border: #6e3535;
  --blob-1: #0f5c55; --blob-2: #24305e; --blob-3: #4d2a1f;
  --glow: rgba(44, 196, 181, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35);
  --shadow: 0 14px 34px -10px rgba(0, 0, 0, .6);
  --shadow-lg: 0 40px 90px -24px rgba(0, 0, 0, .75);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
b, strong { font-weight: 700; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 700; box-shadow: var(--shadow); }
.skip:focus { top: 12px; }

/* scroll-in animation (only when JavaScript is running) */
.js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--delay, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; border: 1px solid transparent; border-radius: 999px; padding: .78em 1.4em; font: 700 .95rem var(--font); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .18s ease, box-shadow .2s ease, background .2s, border-color .2s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--btn-bg); color: var(--on-brand); box-shadow: 0 12px 26px -12px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px var(--glow), inset 0 1px 0 rgba(255, 255, 255, .2); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: translateY(-2px); }
.btn-light { background: #fff; color: #08504c; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .35); }
.btn-light:hover { transform: translateY(-2px); }
.btn-sm { padding: .58em 1.1em; font-size: .86rem; }
.btn-lg { padding: 1em 1.75em; font-size: 1.02rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- main call-to-action: "Start my free check" ---------- */
.cta-main { position: relative; display: inline-flex; align-items: center; gap: 18px; padding: 14px; border: 0; border-radius: 32px; background: var(--btn-bg); color: var(--on-brand); font-family: var(--font); text-align: left; cursor: pointer;
  box-shadow: 0 22px 44px -16px var(--glow), 0 4px 12px rgba(12, 31, 34, .12), inset 0 1px 0 rgba(255, 255, 255, .25);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.cta-main:hover { transform: translateY(-5px) scale(1.03); box-shadow: 0 30px 56px -18px var(--glow), 0 6px 16px rgba(12, 31, 34, .14), inset 0 1px 0 rgba(255, 255, 255, .25); }
.cta-main:active { transform: translateY(-1px) scale(.99); }
.cta-main:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }
/* soft glowing halo that breathes */
.cta-glow { position: absolute; inset: -10px; z-index: -1; border-radius: 40px; background: var(--grad); filter: blur(22px); opacity: .6; animation: cta-breathe 3s ease-in-out infinite; transition: opacity .3s; }
.cta-main:hover .cta-glow { opacity: .85; }
@keyframes cta-breathe { 0%, 100% { opacity: .45; transform: scale(.97); } 50% { opacity: .85; transform: scale(1.04); } }
/* expanding ring that invites a tap */
.cta-main::after { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; border: 2px solid var(--brand); animation: cta-ring 2.8s cubic-bezier(0, 0, .2, 1) infinite; pointer-events: none; }
@keyframes cta-ring { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.14, 1.35); } }
/* light streak that sweeps across every few seconds */
.cta-shine { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.cta-shine::after { content: ''; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent); transform: skewX(-20deg) translateX(0); animation: cta-sweep 4.2s ease-in-out infinite; }
@keyframes cta-sweep { 0%, 55% { transform: skewX(-20deg) translateX(0); } 85%, 100% { transform: skewX(-20deg) translateX(560%); } }
.cta-icon { position: relative; width: 68px; height: 68px; flex: none; border-radius: 22px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .45); transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.cta-icon svg { width: 46px; height: 46px; }
.cta-main:hover .cta-icon { transform: rotate(-10deg) scale(1.08); }
.cta-text { display: grid; line-height: 1.15; padding-right: 4px; }
.cta-text b { font-family: var(--display); font-size: 1.6rem; font-weight: 800; letter-spacing: -.01em; }
.cta-text small { margin-top: 5px; font-size: .92rem; font-weight: 600; opacity: .85; }
.cta-arrow { width: 60px; height: 60px; flex: none; border-radius: 20px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); transition: background .25s, transform .3s; }
.cta-arrow svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; animation: cta-nudge 2.6s ease-in-out infinite; }
@keyframes cta-nudge { 0%, 60%, 100% { transform: translateX(0); } 70% { transform: translateX(6px); } 80% { transform: translateX(0); } 88% { transform: translateX(4px); } }
.cta-main:hover .cta-arrow { background: rgba(255, 255, 255, .32); }
.cta-main:hover .cta-arrow svg { animation-duration: .9s; }
.cta-tag { position: absolute; top: -14px; right: -14px; padding: 6px 13px; border-radius: 999px; background: var(--sun); color: #3b2a00; font-size: .8rem; font-weight: 800; letter-spacing: .1em; box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4); transform: rotate(9deg); animation: cta-wiggle 5s ease-in-out infinite; }
@keyframes cta-wiggle { 0%, 88%, 100% { transform: rotate(9deg); } 91% { transform: rotate(-4deg) scale(1.1); } 94% { transform: rotate(14deg) scale(1.1); } 97% { transform: rotate(6deg); } }
.cta-main { flex: none; max-width: 100%; }
.cta-text { min-width: 0; }
@media (min-width: 601px) { .cta-text b { white-space: nowrap; } }
[data-theme="dark"] .cta-shine::after { background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent); }
/* white version for use on the gradient banner */
.cta-main.light { background: #fff; color: #08504c; box-shadow: 0 22px 44px -16px rgba(0, 0, 0, .45), inset 0 -2px 0 rgba(8, 80, 76, .08); }
.cta-main.light .cta-glow { background: #fff; opacity: .35; }
.cta-main.light::after { border-color: #fff; }
.cta-main.light .cta-shine::after { background: linear-gradient(100deg, transparent, rgba(20, 179, 161, .18), transparent); }
.cta-main.light .cta-icon { background: var(--brand-soft); box-shadow: none; }
.cta-main.light .cta-arrow { background: #0b7a73; color: #fff; }
.cta-main.light:hover .cta-arrow { background: #095f5a; }

/* ---------- navigation ---------- */
.nav { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, box-shadow .3s; }
.nav.scrolled { background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.5) blur(16px); -webkit-backdrop-filter: saturate(1.5) blur(16px); border-color: var(--border); }
.nav-inner { display: flex; align-items: center; gap: 24px; height: 74px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.brand-mark { width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--grad); display: grid; place-items: center; box-shadow: 0 8px 18px -8px var(--glow); }
.brand-mark svg { width: 22px; height: 22px; fill: #fff; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.2rem; letter-spacing: .06em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a { padding: 8px 14px; border-radius: 999px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: .92rem; transition: background .2s, color .2s; }
.nav-links a:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-toggle { width: 42px; height: 42px; border-radius: 13px; border: 1px solid var(--border); background: var(--surface); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .2s, border-color .2s; }
.icon-toggle:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); transform: rotate(-8deg); }
.icon-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sun { display: none !important; }
[data-theme="dark"] .i-sun { display: block !important; }
[data-theme="dark"] .i-moon { display: none !important; }
.menu-btn { display: none; }

/* language menu */
.lang-menu { position: relative; }
.lang-btn { width: auto; padding: 0 12px; gap: 7px; display: inline-flex; align-items: center; font: 800 .82rem var(--font); }
.lang-btn svg { width: 18px; height: 18px; }
.lang-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 190px; padding: 6px; display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); animation: pop .18s ease-out; }
.lang-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 12px; background: none; color: var(--text); font: 600 .95rem var(--font); text-align: left; cursor: pointer; }
.lang-item:hover, .lang-item:focus-visible { background: var(--surface-2); outline: none; }
.lang-short { width: 40px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); font-size: .74rem; font-weight: 800; color: var(--text-2); }
.lang-label { margin-right: auto; }
.lang-item[aria-checked="true"] { background: var(--brand-soft); }
.lang-item[aria-checked="true"] .lang-short { background: var(--brand); color: var(--on-brand); }
.lang-item[aria-checked="true"] .lang-check { width: 6px; height: 11px; border: solid var(--brand); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); margin-right: 4px; }

/* Sinhala and Tamil: no letter-spacing (it breaks these scripts), roomier lines, smaller big headings */
:lang(si), :lang(ta) { letter-spacing: 0 !important; }
:lang(si) *, :lang(ta) * { letter-spacing: 0 !important; }
html:lang(si) body, html:lang(ta) body { line-height: 1.75; }
html:lang(si) :is(h1, h2, h3), html:lang(ta) :is(h1, h2, h3) { line-height: 1.35; }
html:lang(si) .hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
html:lang(ta) .hero h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
html:lang(si) h2, html:lang(ta) h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
html:lang(si) .cta-text b, html:lang(ta) .cta-text b { white-space: normal; font-size: 1.3rem; line-height: 1.3; }
html:lang(ta) .cta-text b { font-size: 1.15rem; }
html:lang(si) .nav-links a, html:lang(ta) .nav-links a { font-size: .86rem; padding: 8px 10px; }
html:is(:lang(si), :lang(ta)) .fc-result { left: 2%; }
html:lang(si) .step-n, html:lang(ta) .step-n { font-family: 'Bricolage Grotesque', var(--font); }
/* Hide English text until a saved Sinhala/Tamil translation is applied (shown anyway after 1.5s). */
html.i18n-pending body { visibility: hidden; animation: i18n-show 0s linear 1.5s forwards; }
@keyframes i18n-show { to { visibility: visible; } }

/* ---------- hero ---------- */
.hero { position: relative; isolation: isolate; padding: 48px 0 84px; overflow: clip; }
.blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .7; pointer-events: none; }
.b1 { width: 560px; height: 560px; background: var(--blob-1); top: -180px; right: -140px; animation: drift 18s ease-in-out infinite; }
.b2 { width: 420px; height: 420px; background: var(--blob-2); top: 160px; right: 300px; opacity: .55; animation: drift 22s ease-in-out infinite reverse; }
.b3 { width: 380px; height: 380px; background: var(--blob-3); bottom: -200px; left: -140px; opacity: .6; animation: drift 20s ease-in-out infinite; }
@keyframes drift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(30px, 24px); } }
.hero-inner { display: grid; grid-template-columns: 1.02fr .98fr; gap: 32px; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-weight: 700; font-size: .85rem; color: var(--text-2); margin-bottom: 22px; }
.pill-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; }
.pill-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 0 var(--glow); animation: beacon 2s infinite; }
@keyframes beacon { 0% { box-shadow: 0 0 0 0 var(--glow); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: .35em; }
.hl { position: relative; display: inline-block; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .06em; }
.hl::after { content: ''; position: absolute; left: -2%; right: -2%; bottom: -.1em; height: .3em; z-index: -1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 10 C 40 3, 80 3, 110 8 S 170 12, 197 5' fill='none' stroke='%23ffc857' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.lead { font-size: 1.12rem; color: var(--text-2); max-width: 34em; }
.lead b { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 26px; margin: 34px 0 38px; }
.hero-link { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-weight: 700; text-decoration: none; padding: 8px 2px; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.hero-link:hover { color: var(--brand); border-color: currentColor; }
.hero-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-stats { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0; }
.hero-stats li { display: grid; padding: 0 26px; border-left: 1px solid var(--border); }
.hero-stats li:first-child { padding-left: 0; border-left: 0; }
.hero-stats b { font-family: var(--display); font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero-stats span { color: var(--muted); font-size: .86rem; font-weight: 600; }

.hero-visual { position: relative; display: grid; place-items: center; padding: 10px; }
.orbit { position: relative; width: min(100%, 470px); aspect-ratio: 1; }
.ring { position: absolute; border-radius: 50%; }
.ring.r1 { inset: 4%; border: 1.5px dashed color-mix(in srgb, var(--brand) 35%, transparent); animation: spin 70s linear infinite; }
.ring.r2 { inset: 19%; background: radial-gradient(circle at 50% 40%, var(--surface) 0%, color-mix(in srgb, var(--surface) 60%, transparent) 55%, transparent 72%); border: 1px solid color-mix(in srgb, var(--brand) 14%, transparent); }
@keyframes spin { to { transform: rotate(360deg); } }
.mascot { position: absolute; left: 50%; top: 50%; width: 44%; transform: translate(-50%, -52%); filter: drop-shadow(0 26px 30px rgba(11, 122, 115, .28)); animation: bob 5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translate(-50%, -52%) rotate(-2deg); } 50% { transform: translate(-50%, -57%) rotate(2deg); } }
.mascot .sparkle { transform-origin: 54px 9px; animation: twinkle 2.6s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.6); } }
.chip-float { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-weight: 700; font-size: .84rem; white-space: nowrap; animation: float 6.4s ease-in-out infinite; animation-delay: var(--d); }
.chip-float i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
@keyframes float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 9px)); } }
.float-card { position: absolute; background: color-mix(in srgb, var(--surface) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.fc-result { left: -7%; bottom: 3%; width: 222px; padding: 14px 16px; display: grid; gap: 6px; animation: float-y 7s ease-in-out infinite; }
.fc-badge { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .84rem; margin-bottom: 4px; }
.fc-row { display: flex; justify-content: space-between; font-size: .8rem; color: var(--text-2); }
.fc-row b { color: var(--text); }
.fc-bar { height: 6px; border-radius: 4px; background: var(--track); overflow: hidden; }
.fc-bar i { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.fc-ok { right: -3%; top: -2%; padding: 10px 14px; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .84rem; animation: float-y 6s ease-in-out infinite reverse; }
.fc-check { width: 22px; height: 22px; border-radius: 50%; background: var(--good); position: relative; flex: none; }
.fc-check::after { content: ''; position: absolute; left: 8px; top: 4px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
@keyframes float-y { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.good { background: var(--good); }
.dot.warn { background: var(--warning); }
.dot.serious { background: var(--serious); }
.dot.critical { background: var(--critical); }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; background: var(--surface); border-block: 1px solid var(--border); padding: 16px 0; }
.ticker-track { display: flex; width: max-content; animation: marquee 36s linear infinite; font-family: var(--display); font-weight: 700; font-size: 1.2rem; color: var(--text-2); }
.ticker-track > span { padding-right: 26px; }
.ticker-track .star { color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.section { padding: 100px 0; position: relative; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin: 0 auto 52px; text-align: center; }
.section-head p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.section-head.left { text-align: left; margin: 0; }
.section-head.left .btn { margin-top: 22px; }
.kicker { display: inline-block; font-weight: 800; font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); background: var(--brand-soft); padding: 6px 13px; border-radius: 999px; margin-bottom: 16px; }
.kicker.on-dark { background: rgba(255, 255, 255, .16); color: #fff; }

/* how it works */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.step { background: var(--surface); border: 1px solid var(--border); border-radius: 26px; padding: 30px; box-shadow: var(--shadow-sm); transition: transform .3s, box-shadow .3s; }
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.step-icon { width: 58px; height: 58px; border-radius: 18px; background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 22px -10px var(--glow); }
.step-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.step-n { font-family: var(--display); font-weight: 800; font-size: 3rem; line-height: 1; color: transparent; -webkit-text-stroke: 1.5px color-mix(in srgb, var(--brand) 40%, transparent); }
.step p { color: var(--text-2); margin: 0; }

/* the 8 areas */
.areas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: start; }
.area { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-sm); transition: transform .25s, box-shadow .25s, border-color .25s; }
.area:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.area[open] { border-color: color-mix(in srgb, var(--c) 50%, var(--border)); box-shadow: var(--shadow); transform: none; }
.area summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 22px; }
.area summary::-webkit-details-marker { display: none; }
.area-icon { width: 48px; height: 48px; flex: none; border-radius: 15px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, var(--surface)); color: var(--c); transition: transform .3s; }
.area:hover .area-icon { transform: rotate(-6deg) scale(1.05); }
.area-icon svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.area-title { display: grid; line-height: 1.3; margin-right: auto; }
.area-title b { font-family: var(--display); font-size: 1.06rem; }
.area-title small { color: var(--muted); font-size: .8rem; }
.area-plus { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); position: relative; transition: transform .3s, background .3s; }
.area-plus::before, .area-plus::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 2px; background: var(--text-2); transform: translate(-50%, -50%); }
.area-plus::after { transform: translate(-50%, -50%) rotate(90deg); }
.area[open] .area-plus { transform: rotate(45deg); background: color-mix(in srgb, var(--c) 18%, var(--surface)); }
.area-levels { list-style: none; margin: 0; padding: 0 18px 18px; display: grid; gap: 10px; animation: open .3s ease-out; }
@keyframes open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.area-levels li { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-2); line-height: 1.4; }
.area-levels b { display: block; color: var(--text); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.lv { flex: none; width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: .8rem; color: var(--text); border: 1.5px solid var(--lc); background: color-mix(in srgb, var(--lc) 18%, var(--surface)); }
.lv.l0 { --lc: var(--good); } .lv.l1 { --lc: var(--warning); } .lv.l2 { --lc: var(--serious); }

/* result meaning */
.triage { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-top: 30px; }
.triage-bar { position: absolute; top: 0; left: 0; right: 0; height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--good), var(--warning) 38%, var(--serious) 68%, var(--critical)); }
.triage-item { position: relative; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--s); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-sm); }
.triage-item::before { content: ''; position: absolute; top: -37px; left: 24px; width: 16px; height: 16px; border-radius: 50%; background: var(--s); border: 3px solid var(--bg); }
.triage-item h3 { margin-bottom: .2em; }
.triage-item p { color: var(--text-2); font-size: .92rem; margin: 0; }
.triage-item .t-when { font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.triage-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: color-mix(in srgb, var(--s) 18%, var(--surface)); color: var(--text); }
.triage-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.t-good { --s: var(--good); } .t-warn { --s: var(--warning); } .t-serious { --s: var(--serious); } .t-critical { --s: var(--critical); }


input, select, textarea { font: inherit; font-size: .95rem; color: var(--text); background: var(--surface-2); border: 1.5px solid transparent; border-radius: 14px; padding: .8em 1em; width: 100%; transition: border-color .2s, box-shadow .2s, background .2s; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:hover, select:hover, textarea:hover { border-color: var(--border); }
input:focus, select:focus, textarea:focus { outline: none; background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
textarea { resize: vertical; }

/* FAQ */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.faq { display: grid; gap: 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 0 22px; transition: box-shadow .25s, border-color .25s; }
.faq details[open] { box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 700; font-size: 1.02rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; position: absolute; right: 4px; top: 50%; width: 9px; height: 9px; border-right: 2.4px solid var(--brand); border-bottom: 2.4px solid var(--brand); transform: translateY(-70%) rotate(45deg); transition: transform .3s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq details p { margin: 0 0 20px; color: var(--text-2); animation: open .3s ease-out; }

/* closing call to action */
.cta-section { padding: 30px 0 70px; }
.cta-band { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 58px 60px; border-radius: 36px; background: var(--grad); color: #fff; box-shadow: var(--shadow-lg); }
.cta-band::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; right: -120px; top: -220px; background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 65%); }
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .86); font-size: 1.08rem; }
.cta-band > * { position: relative; }

/* contact */
.contact-section { padding: 30px 0 90px; }
.contact { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.contact-card { display: flex; gap: 16px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-sm); }
.contact-card h3 { margin-bottom: .3em; }
.contact-card p { margin: 0; color: var(--text-2); }
.contact-icon { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.contact-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact-card.emergency { background: var(--alert-bg); border-color: var(--alert-border); }
.contact-card.emergency .contact-icon { background: color-mix(in srgb, var(--critical) 18%, var(--surface)); color: var(--critical); }

.footer { padding: 34px 0 120px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.footer-inner { display: flex; gap: 28px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.footer p { margin: 0; max-width: 640px; }

/* ==========================================================================
   Chatbot widget
   ========================================================================== */
.chat-launcher { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 12px; padding: 9px 22px 9px 9px; border: 0; border-radius: 999px; background: var(--btn-bg); color: var(--on-brand); font-family: var(--font); cursor: pointer; box-shadow: 0 20px 40px -14px var(--glow), 0 6px 14px rgba(0, 0, 0, .12); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.chat-launcher:hover { transform: translateY(-4px) scale(1.02); }
.launcher-icon { position: relative; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .2); display: grid; place-items: center; }
.launcher-icon::after { content: ''; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); animation: ping 2.6s cubic-bezier(0, 0, .2, 1) infinite; }
@keyframes ping { 0% { transform: scale(.92); opacity: .9; } 80%, 100% { transform: scale(1.55); opacity: 0; } }
.launcher-icon svg { width: 22px; height: 22px; fill: currentColor; }
.launcher-text { display: grid; text-align: left; line-height: 1.15; }
.launcher-text b { font-size: 1rem; }
.launcher-text small { font-size: .74rem; opacity: .85; font-weight: 600; }
.launcher-badge { position: absolute; top: -4px; right: -2px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--critical); color: #fff; font-size: .75rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--bg); }
.chat-open .chat-launcher { display: none; }

.chat { position: fixed; right: 22px; bottom: 22px; z-index: 50; width: min(430px, calc(100vw - 32px)); height: min(730px, calc(100dvh - 44px)); display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--border); border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; transform-origin: bottom right; animation: chat-in .3s cubic-bezier(.2, .8, .2, 1); }
@keyframes chat-in { from { opacity: 0; transform: translateY(18px) scale(.95); } to { opacity: 1; transform: none; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 12px 16px 16px; background: var(--grad); color: #fff; }
.chat-avatar { width: 44px; height: 44px; flex: none; border-radius: 15px; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .4); }
.chat-avatar svg { width: 30px; height: 30px; }
.chat-title { display: grid; line-height: 1.25; margin-right: auto; }
.chat-title b { font-family: var(--display); font-size: 1.12rem; letter-spacing: -.01em; }
.chat-title span { display: flex; align-items: center; gap: 6px; font-size: .78rem; opacity: .92; }
.online { width: 8px; height: 8px; border-radius: 50%; background: #7dffb4; box-shadow: 0 0 0 3px rgba(125, 255, 180, .25); display: inline-block; }
.icon-btn { width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; transition: background .2s; }
.icon-btn:hover { background: rgba(255, 255, 255, .18); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.chat-progress { padding: 12px 18px; background: var(--surface); border-bottom: 1px solid var(--border); }
.chat-progress-label { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 800; color: var(--muted); margin-bottom: 8px; }
#progress-section { color: var(--brand); text-transform: uppercase; letter-spacing: .1em; }
.chat-progress-bar { height: 7px; background: var(--track); border-radius: 999px; overflow: hidden; }
.chat-progress-bar i { display: block; height: 100%; width: 0; background: var(--btn-bg); border-radius: 999px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }

.chat-log { flex: 1; overflow-y: auto; padding: 16px 16px 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); }
.chat-log > * { flex-shrink: 0; }
.chat-intro { align-self: stretch; text-align: center; padding: 18px 16px 16px; margin-bottom: 10px; border-radius: 22px; background: var(--grad-soft); border: 1px solid var(--border); }
.intro-mark svg { width: 52px; height: 52px; margin: 0 auto 8px; filter: drop-shadow(0 8px 10px rgba(11, 122, 115, .25)); }
.chat-intro b { display: block; font-family: var(--display); font-size: 1.06rem; }
.chat-intro p { margin: 4px 0 12px; font-size: .8rem; color: var(--text-2); line-height: 1.45; }
.chat-intro ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.intro-langs { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.intro-langs > span { font-size: .72rem; font-weight: 800; color: var(--muted); margin-right: 2px; }
.intro-lang { border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 999px; padding: 5px 13px; font: 700 .82rem var(--font); cursor: pointer; transition: border-color .15s, background .15s; }
.intro-lang:hover { border-color: var(--brand); }
.intro-lang[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.chat-intro li { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-2); }

.msg { max-width: 84%; padding: 11px 15px; border-radius: 20px; font-size: .92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; animation: pop .22s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msg.bot, .msg.ai, .msg.staff { position: relative; align-self: flex-start; margin-left: 36px; border-bottom-left-radius: 6px; }
.msg.bot, .msg.ai { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.msg.bot::before, .msg.ai::before { content: ''; position: absolute; left: -36px; bottom: 0; width: 28px; height: 28px; border-radius: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cpath fill='%23fff' d='M20 6c-9 0-15 7-15 17 0 8 4 13 6 22 2 9 4 13 8 13 5 0 5-12 13-12s8 12 13 12c4 0 6-4 8-13 2-9 6-14 6-22 0-10-6-17-15-17-6 0-8 3-12 3S26 6 20 6z'/%3E%3C/svg%3E") center / 16px no-repeat, var(--grad); }
.msg:is(.bot, .ai):has(+ .msg:is(.bot, .ai))::before { visibility: hidden; }
.msg.user { align-self: flex-end; background: var(--user-bubble); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 10px 20px -12px var(--glow); }
.msg.user + .msg:not(.user), .msg:not(.user) + .msg.user { margin-top: 8px; }
.msg.staff { background: var(--staff-bubble); border: 1px solid var(--staff-border); }
.msg.alert { background: var(--alert-bg); border-color: var(--alert-border); font-weight: 600; }
.msg-tag { display: block; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 3px; }
.typing { display: inline-flex; gap: 5px; padding: 15px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); animation: blink 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.chat-answer { padding: 0 14px; background: var(--surface); border-top: 1px solid var(--border); max-height: 48%; overflow-y: auto; }
.chat-answer:empty { display: none; }
.answer-inner { padding: 12px 0 6px; display: grid; gap: 8px; animation: pop .25s ease-out; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts.stack { display: grid; gap: 7px; }
.opt { display: flex; align-items: center; gap: 11px; width: 100%; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); border-radius: 15px; padding: 10px 13px; font: 600 .88rem var(--font); line-height: 1.35; cursor: pointer; text-align: left; transition: border-color .15s, background .15s, transform .12s, box-shadow .15s; }
.opt:hover:not(:disabled) { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 60%, var(--surface)); box-shadow: var(--shadow-sm); }
.opt:active:not(:disabled) { transform: scale(.985); }
.opt:disabled { opacity: .55; cursor: default; }
.opt-key { flex: none; width: 26px; height: 26px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; font-size: .74rem; font-weight: 800; color: var(--text-2); transition: background .15s, color .15s; }
.opt:hover:not(:disabled) .opt-key { background: var(--brand); color: var(--on-brand); border-color: transparent; }
.opt-box { flex: none; width: 22px; height: 22px; border-radius: 7px; border: 2px solid color-mix(in srgb, var(--text-2) 35%, var(--border)); display: grid; place-items: center; transition: background .15s, border-color .15s; }
.opt[aria-pressed="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand-soft) 75%, var(--surface)); }
.opt[aria-pressed="true"] .opt-box { background: var(--brand); border-color: var(--brand); }
.opt[aria-pressed="true"] .opt-box::after { content: ''; width: 5px; height: 10px; margin-top: -2px; border: solid var(--on-brand); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; }
.scale .opt { justify-content: center; padding: 10px 0; border-radius: 10px; font-weight: 800; background: color-mix(in srgb, hsl(calc(130 - var(--i, 0) * 13) 72% 45%) 20%, var(--surface)); border-color: color-mix(in srgb, hsl(calc(130 - var(--i, 0) * 13) 72% 45%) 45%, var(--border)); }
.scale-legend { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 600; color: var(--muted); }
.answer-hint { font-size: .76rem; color: var(--muted); font-weight: 600; }

.chat-input { display: flex; gap: 8px; padding: 10px 12px 12px; background: var(--surface); border-top: 1px solid var(--border); }
.chat-input input { border-radius: 999px; padding: .78em 1.15em; }
.send-btn { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--btn-bg); color: var(--on-brand); cursor: pointer; display: grid; place-items: center; box-shadow: 0 8px 16px -8px var(--glow); transition: transform .15s; }
.send-btn:hover { transform: scale(1.06) rotate(-8deg); }
.send-btn svg { width: 20px; height: 20px; fill: currentColor; }

/* result card */
.lvl-good { --lvl: var(--good); } .lvl-warning { --lvl: var(--warning); } .lvl-serious { --lvl: var(--serious); } .lvl-critical { --lvl: var(--critical); }
.result { align-self: stretch; max-width: 100%; margin-top: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); animation: pop .35s ease-out; }
.result-head { padding: 16px 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--lvl) 24%, var(--surface)), color-mix(in srgb, var(--lvl) 7%, var(--surface))); border-bottom: 1px solid color-mix(in srgb, var(--lvl) 30%, var(--border)); }
.result-head .lvl { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.lvl-icon { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--lvl); color: #fff; display: grid; place-items: center; }
.lvl-warning .lvl-icon { color: #3b2a00; }
.lvl-icon svg { width: 20px; height: 20px; }
.result-head p { margin: 8px 0 0; font-size: .86rem; color: var(--text-2); line-height: 1.5; }
.result-head .when { font-weight: 800; color: var(--text); }
.result-body { padding: 16px 18px 18px; display: grid; gap: 18px; }
.result h4 { margin: 0 0 10px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.score-block { display: flex; align-items: center; gap: 16px; }
.gauge { width: 88px; height: 88px; flex: none; }
.g-track { fill: none; stroke: var(--track); stroke-width: 8; }
.g-fill { fill: none; stroke: var(--lvl); stroke-width: 8; stroke-linecap: round; }
.g-num { font-family: var(--display); font-weight: 800; font-size: 24px; fill: var(--text); }
.g-of { font-size: 9.5px; font-weight: 700; fill: var(--muted); }
.score-text { display: grid; gap: 2px; }
.score-text b { font-family: var(--display); font-size: 1.05rem; }
.score-text > span { color: var(--muted); font-size: .8rem; font-weight: 600; }
.risks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); white-space: nowrap; }
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cat { display: grid; gap: 2px; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--border); border-left: 4px solid var(--cs, var(--border)); background: var(--surface); }
.cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.cat-top b { font-size: .8rem; }
.cat .sc { font-size: .66rem; font-weight: 800; color: var(--text-2); white-space: nowrap; }
.cat small { font-size: .72rem; color: var(--muted); line-height: 1.3; }
.cat.s0 { --cs: var(--good); } .cat.s1 { --cs: var(--warning); } .cat.s2 { --cs: var(--serious); }
.cond { display: grid; gap: 5px; padding: 12px 0; border-top: 1px solid var(--border); }
.cond:first-of-type { border-top: 0; padding-top: 0; }
.cond-top { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 700; }
.cond-top span:last-child { white-space: nowrap; color: var(--text-2); font-size: .82rem; }
.cond p { margin: 0; font-size: .82rem; color: var(--text-2); }
.cond .ev { font-size: .74rem; color: var(--muted); }
.bar { height: 7px; background: var(--track); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--bar); border-radius: 0 4px 4px 0; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 9px; font-size: .85rem; }
.tips li { position: relative; padding-left: 28px; line-height: 1.45; }
.tips li::before { content: ''; position: absolute; left: 0; top: 1px; width: 19px; height: 19px; border-radius: 6px; background: var(--brand-soft); }
.tips li::after { content: ''; position: absolute; left: 7px; top: 4px; width: 4px; height: 9px; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.reasons { margin: 0; padding-left: 18px; display: grid; gap: 5px; font-size: .84rem; color: var(--text-2); }
.reasons li::marker { color: var(--lvl); }
.disclaimer { font-size: .74rem; color: var(--muted); margin: 0; line-height: 1.45; }
.ref { font-size: .78rem; color: var(--muted); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.result-actions .btn { font-size: .84rem; padding: .6em 1.05em; }
.inline-form { display: grid; gap: 8px; padding: 14px; border: 1.5px dashed var(--border); border-radius: 16px; background: var(--surface-2); }
.inline-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline-form input, .inline-form select { padding: .6em .8em; font-size: .88rem; background: var(--surface); }
.inline-form .btn { justify-self: start; }

#print-area { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .areas { grid-template-columns: repeat(2, 1fr); }
  .triage { grid-template-columns: repeat(2, 1fr); padding-top: 0; }
  .triage-bar, .triage-item::before { display: none; }
}
/* six menu links: on small laptops, tighter links and no menu button (the page has its own) */
@media (min-width: 901px) and (max-width: 1100px) {
  .nav-cta { display: none; }
  .nav-inner { gap: 16px; }
  .nav-links a { padding: 8px 10px; }
}
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav-cta { display: none; }
  .nav-actions { margin-left: auto; }
  .nav-links { position: absolute; top: 74px; left: 12px; right: 12px; display: none; flex-direction: column; gap: 2px; padding: 10px; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; animation: pop .2s ease-out; }
  .nav-links a { padding: 13px 16px; font-size: 1rem; }
  .nav:has(.nav-links.open) { background: var(--bg); border-color: var(--border); }
  .hero { padding-top: 28px; }
  .hero-inner { grid-template-columns: 1fr; gap: 20px; }
  .hero-visual { max-width: 460px; width: 100%; margin: 0 auto; }
  .steps { grid-template-columns: 1fr; }
  .faq-wrap { grid-template-columns: 1fr; gap: 28px; }
  .contact { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; padding: 44px 32px; }
  .section { padding: 76px 0; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 2.55rem; }
  .hero-cta .btn, .hero-cta .cta-main { flex: 1 1 100%; }
  .cta-main .cta-text { margin-right: auto; }
  .cta-main { gap: 14px; padding: 12px; border-radius: 28px; }
  .cta-icon { width: 58px; height: 58px; border-radius: 19px; }
  .cta-icon svg { width: 40px; height: 40px; }
  .cta-text b { font-size: 1.2rem; letter-spacing: -.02em; }
  .cta-text small { font-size: .82rem; }
  .cta-arrow { width: 52px; height: 52px; border-radius: 17px; }
  .hero-link { margin: 0 auto; }
  .cta-band .cta-main { width: 100%; }
  .cta-tag { right: -4px; }
  html:lang(si) .cta-text b { font-size: 1.08rem; }
  html:lang(ta) .cta-text b { font-size: .98rem; }
  html:is(:lang(si), :lang(ta)) .cta-text small { font-size: .74rem; }
  html:is(:lang(si), :lang(ta)) .cta-tag { font-size: .68rem; padding: 5px 10px; }
  .hero-stats li { padding: 0 16px; }
  .chip-float { font-size: .7rem; padding: 6px 10px 6px 8px; }
  .fc-result { width: 200px; left: 0; }
  .fc-ok { display: none; }
  .areas, .triage { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .chat { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
  .launcher-text small { display: none; }
  .chat-launcher { right: 16px; bottom: 16px; padding-right: 18px; }
}

@media (max-width: 1180px) {
  html:is(:lang(si), :lang(ta)) .menu-btn { display: grid; }
  html:is(:lang(si), :lang(ta)) .nav-cta { display: none; }
  html:is(:lang(si), :lang(ta)) .nav-actions { margin-left: auto; }
  html:is(:lang(si), :lang(ta)) .nav-links { position: absolute; top: 74px; left: 12px; right: 12px; display: none; flex-direction: column; gap: 2px; padding: 10px; margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
  html:is(:lang(si), :lang(ta)) .nav-links.open { display: flex; }
  html:is(:lang(si), :lang(ta)) .nav-links a { padding: 13px 16px; font-size: 1rem; }
}
@media (max-width: 420px) {
  .lang-btn .lang-current { display: none; }
  .lang-btn { padding: 0; width: 42px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

@media print {
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: block !important; padding: 24px; }
  #print-area .result-actions, #print-area .inline-form { display: none !important; }
  #print-area .result { border: 1px solid #ccc; box-shadow: none; }
}
