﻿/* ============================================================
   HL7AI Studio — professional design system
   Palette: deep navy ink + teal/cyan brand, clean slate neutrals
   ============================================================ */
:root {
    --brand-900: #062a36;
    --brand-800: #0a3a4a;
    --brand-700: #0e5263;
    --brand-600: #0d7d8c;
    --brand-500: #119aa6;
    --brand-400: #2bb8bf;
    --accent:    #18d2c4;
    --accent-2:  #36a2ff;

    --ink:       #0f1f2b;
    --ink-2:     #2a3b48;
    --muted:     #5b6b7b;
    --muted-2:   #8294a3;
    --line:      #e4ebf1;
    --line-2:    #eef3f7;
    --bg:        #f5f8fb;
    --surface:   #ffffff;
    --surface-2: #f0f6f9;

    --ok:    #1f9d57;
    --warn:  #b9770e;
    --danger:#c0392b;

    --shadow-sm: 0 1px 2px rgba(12,40,56,.06), 0 1px 3px rgba(12,40,56,.05);
    --shadow-md: 0 6px 24px rgba(12,40,56,.09);
    --shadow-lg: 0 18px 50px rgba(8,30,44,.18);
    --radius: 14px;
    --radius-sm: 10px;
    --maxw: 1160px;

    --grad-brand: linear-gradient(135deg, var(--brand-600), var(--brand-400) 60%, var(--accent));
    --grad-hero:  radial-gradient(1200px 600px at 75% -10%, rgba(24,210,196,.22), transparent 60%),
                  radial-gradient(900px 500px at 10% 110%, rgba(54,162,255,.18), transparent 55%),
                  linear-gradient(160deg, #06222d 0%, #0a3947 55%, #0e5263 100%);
}

* { box-sizing: border-box; }

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

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -.015em; font-weight: 700; margin: 0; }
h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

a { color: var(--brand-600); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand-700); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-tight { padding: 3rem 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.narrow { max-width: 760px; margin: 0 auto; }
.center { text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700;
    color: var(--brand-600); margin-bottom: .9rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.muted { color: var(--muted); }
.page-pad { padding: 3rem 0 4rem; }

/* ---------- Buttons ---------- */
.btn-fhir, .btn-ghost, .btn-light {
    display: inline-flex; align-items: center; gap: .5rem;
    border-radius: 10px; padding: .72rem 1.35rem; font-weight: 600; font-size: .98rem;
    cursor: pointer; border: 1px solid transparent; transition: all .16s ease; line-height: 1;
}
.btn-fhir { background: var(--grad-brand); color: #fff !important; box-shadow: 0 6px 18px rgba(13,125,140,.28); }
.btn-fhir:hover { filter: brightness(1.05); transform: translateY(-1px); text-decoration: none; color:#fff !important; box-shadow: 0 10px 24px rgba(13,125,140,.34); }
.btn-ghost { background: var(--surface); color: var(--brand-700) !important; border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-400); color: var(--brand-700) !important; text-decoration: none; transform: translateY(-1px); }
.btn-light { background: rgba(255,255,255,.12); color: #fff !important; border-color: rgba(255,255,255,.28); backdrop-filter: blur(4px); }
.btn-light:hover { background: rgba(255,255,255,.2); text-decoration: none; color:#fff !important; }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.05rem; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn-danger-sm {
    background: #fff; color: var(--danger); border: 1px solid #f0d0cc;
    border-radius: 8px; padding: .3rem .7rem; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s;
}
.btn-danger-sm:hover { background: #fbeeec; }

/* ---------- Top navigation ---------- */
.fhir-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 1.5rem;
    height: 68px; padding: 0 1.5rem;
    background: rgba(255,255,255,.86);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--line);
}
.fhir-brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.15rem;
    color: var(--brand-900) !important; letter-spacing: -.02em; }
.fhir-brand:hover { text-decoration: none; }
.fhir-brand .logo { width: 30px; height: 30px; border-radius: 9px; background: var(--grad-brand);
    display: grid; place-items: center; color: #fff; font-weight: 800; font-size: .95rem; box-shadow: 0 4px 12px rgba(13,125,140,.35); }
.fhir-nav .links { display: flex; gap: .35rem; align-items: center; }
.fhir-nav .links a { color: var(--ink-2); font-weight: 500; padding: .5rem .8rem; border-radius: 8px; }
.fhir-nav .links a:hover { color: var(--brand-700); background: var(--surface-2); text-decoration: none; }
.nav-toggle { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }
.nav-menu { display: flex; align-items: center; flex: 1; gap: 1.5rem; }
.fhir-actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.fhir-lang { display: flex; align-items: center; gap: .25rem; font-size: .82rem; padding-left: .4rem; border-left: 1px solid var(--line); }
.fhir-lang a { color: var(--muted-2); padding: .2rem .35rem; border-radius: 6px; }
.fhir-lang a.on { font-weight: 700; color: var(--brand-700); background: var(--surface-2); }
@media (max-width: 900px) {
    .fhir-nav { gap: .8rem; }
    .nav-burger { display: flex; flex-direction: column; justify-content: center; gap: 5px;
        margin-left: auto; width: 42px; height: 42px; cursor: pointer; border-radius: 8px; }
    .nav-burger span { display: block; height: 2px; width: 22px; background: var(--ink-2); border-radius: 2px;
        transition: transform .2s ease, opacity .2s ease; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
    .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
    .nav-menu { position: absolute; top: 100%; left: 0; right: 0; display: none; flex: none;
        flex-direction: column; align-items: stretch; gap: .35rem;
        background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
        padding: .8rem 1.1rem 1.1rem; max-height: calc(100vh - 68px); overflow-y: auto; }
    .nav-toggle:checked ~ .nav-menu { display: flex; }
    .fhir-nav .links { flex-direction: column; align-items: stretch; gap: .1rem; }
    .fhir-nav .links > a, .menu-trigger { padding: .7rem .4rem; }
    .has-menu .menu { position: static; opacity: 1; visibility: visible; transform: none;
        box-shadow: none; border: none; min-width: 0; padding: 0 0 .3rem .8rem; }
    .has-menu .caret { display: none; }
    .fhir-actions { margin-left: 0; flex-direction: column; align-items: stretch; gap: .55rem;
        border-top: 1px solid var(--line); margin-top: .5rem; padding-top: .8rem; }
    .fhir-actions .btn-ghost, .fhir-actions .btn-fhir { text-align: center; width: 100%; }
    .fhir-lang { border-left: none; padding-left: 0; justify-content: center; padding-top: .3rem; }
}
/* Nav dropdown */
.has-menu { position: relative; }
.has-menu .caret { font-size: .7rem; opacity: .7; }
.has-menu .menu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
    background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md);
    padding: .5rem; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s; z-index: 60;
}
.has-menu:hover .menu, .has-menu:focus-within .menu { opacity: 1; visibility: visible; transform: translateY(0); }
.has-menu .menu a { display: flex; flex-direction: column; gap: .15rem; padding: .6rem .7rem; border-radius: 8px; }
.has-menu .menu a:hover { background: var(--surface-2); }
.has-menu .menu a strong { color: var(--brand-800); font-size: .95rem; }
.has-menu .menu a span { color: var(--muted); font-size: .82rem; font-weight: 400; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--grad-hero); color: #eaf6f8; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
    background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%); pointer-events: none; }
.hero .container { position: relative; z-index: 1; padding-top: 5.5rem; padding-bottom: 5.5rem; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: #bfe2e8; font-size: 1.25rem; max-width: 60ch; margin-top: 1.2rem; }
.hero .cta { display: flex; gap: .9rem; flex-wrap: wrap; margin-top: 2.2rem; }
.hero .pill { display: inline-flex; align-items: center; gap: .5rem; background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2); color: #d7eef1; padding: .35rem .85rem; border-radius: 999px;
    font-size: .85rem; font-weight: 600; margin-bottom: 1.4rem; }
.hero .pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(24,210,196,.25); }

/* ---------- Stats bar ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { text-align: center; padding: .5rem; }
.stat .n { font-size: 2rem; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; }
.stat .l { color: var(--muted); font-size: .92rem; }
@media (max-width: 720px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Feature grid ---------- */
.grid { display: grid; gap: 1.4rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card-fhir { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.6rem; box-shadow: var(--shadow-sm); }
.feature { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--brand-400); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--brand-600); margin-bottom: 1rem; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: .45rem; color: var(--brand-900); }
.feature p { color: var(--muted); margin: 0; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 1.2rem; }
.step { display: flex; gap: 1rem; align-items: flex-start; }
.step .num { counter-increment: step; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
    background: var(--grad-brand); color: #fff; font-weight: 700; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(13,125,140,.3); }
.step .num::before { content: counter(step); }
.step h3 { margin-bottom: .25rem; }
.step p { color: var(--muted); margin: 0; }

/* ---------- Split / module rows ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.split .visual { background: var(--grad-hero); border-radius: var(--radius); min-height: 240px; box-shadow: var(--shadow-md);
    display: grid; place-items: center; color: #cdeef1; padding: 1.5rem; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 1rem 0 0; }
.checklist li { display: flex; gap: .6rem; align-items: flex-start; color: var(--ink-2); margin-bottom: .6rem; }
.checklist li svg { flex: 0 0 auto; width: 20px; height: 20px; color: var(--brand-500); margin-top: 2px; }
.checklist.two { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem 1.8rem; }
@media (max-width: 720px) { .checklist.two { grid-template-columns: 1fr; } }
.section-intro { margin: 0 auto 1.8rem; }
.chart-cell { display: flex; flex-direction: column; }
.chart-cell > .chart-card, .chart-cell > div:first-child { flex: 0 0 auto; }
.chart-src { margin: .5rem 0 0; font-size: .78rem; color: var(--muted); line-height: 1.55; }
.chart-src b { color: var(--brand-700); font-weight: 700; }
.chart-src code { font-family: "Consolas", "SF Mono", monospace; font-size: .73rem; color: var(--ink-2);
    background: var(--surface-2); padding: .04rem .3rem; border-radius: 4px; }
.hl7-legend .leg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: .6rem .9rem; margin-top: .4rem; }
.hl7-legend .leg { display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .85rem;
    background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; }
.hl7-legend .leg code { flex: 0 0 auto; font-family: "Consolas", "SF Mono", monospace; font-size: .75rem;
    font-weight: 700; color: #fff; background: var(--brand-700); padding: .22rem .5rem; border-radius: 6px; white-space: nowrap; }
.hl7-legend .leg .d { font-size: .85rem; color: var(--muted); line-height: 1.5; }
.hl7-legend .leg .d b { color: var(--ink); font-weight: 700; }
/* Anatomy of a real HL7 message — annotated line by line */
.hl7-anatomy { max-width: 940px; margin: 0 auto 2rem; border: 1px solid var(--line); border-radius: 14px;
    overflow: hidden; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.hl7-anatomy .ana-head { display: flex; align-items: center; gap: .55rem; padding: .7rem 1.1rem;
    background: #0f2833; color: #d6edf0; font-size: .82rem; font-weight: 600; }
.hl7-anatomy .ana-head svg { width: 18px; height: 18px; color: #6fd3d0; flex: 0 0 auto; }
.ana-row { display: grid; grid-template-columns: 1.1fr 1fr; border-top: 1px solid var(--line); }
.ana-code { padding: .7rem 1.1rem; font-family: "Consolas", "SF Mono", monospace; font-size: .8rem; color: var(--ink-2);
    background: var(--surface-2); border-right: 1px solid var(--line); white-space: nowrap; overflow-x: auto; display: flex; align-items: center; }
.ana-code b { color: var(--brand-700); font-weight: 800; }
.ana-code b.hi { color: var(--danger); }
.ana-note { padding: .7rem 1.1rem; display: flex; gap: .6rem; align-items: center; font-size: .86rem; color: var(--ink-2); line-height: 1.45; }
.ana-note svg { width: 19px; height: 19px; color: var(--brand-500); flex: 0 0 auto; }
.ana-note b { color: var(--ink); font-weight: 700; }
@media (max-width: 720px) { .ana-row { grid-template-columns: 1fr; }
    .ana-code { white-space: normal; word-break: break-word; border-right: none; border-bottom: 1px solid var(--line); } }
.hl7-src { margin: 1rem 0 0; padding: .85rem 1.1rem; background: var(--surface-2); border: 1px solid var(--line);
    border-left: 3px solid var(--brand-500); border-radius: 10px; font-size: .82rem; color: var(--muted); line-height: 1.6; }
.hl7-src .hl7-src-h { display: block; margin-bottom: .5rem; color: var(--brand-700); font-size: .72rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.hl7-src .row { display: block; margin-top: .38rem; padding-left: .9rem; text-indent: -.9rem; }
.hl7-src b { color: var(--ink); font-weight: 700; }
.hl7-src code { font-family: "Consolas", "SF Mono", monospace; font-size: .74rem; color: var(--ink-2);
    background: var(--surface); border: 1px solid var(--line); padding: .06rem .34rem; border-radius: 5px; }

/* Clinical modeling — question callout + cross builder + feature chips */
.q-callout { max-width: 720px; margin: 0 auto 1.6rem; display: flex; align-items: center; gap: .85rem;
    padding: 1rem 1.35rem; background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.05)); }
.q-callout svg { width: 26px; height: 26px; color: var(--accent); flex: 0 0 auto; }
.q-callout span { font-size: 1.1rem; font-weight: 600; font-style: italic; color: var(--ink); line-height: 1.4; }
.xbuild { display: flex; align-items: stretch; justify-content: center; gap: .7rem; flex-wrap: wrap; margin: 0 auto 2rem; }
.xbuild .term { flex: 1 1 190px; max-width: 250px; text-align: center; padding: 1rem .9rem; background: var(--surface);
    border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.xbuild .term .tt { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.xbuild .term .tv { font-size: .98rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.xbuild .term .tc { font-family: "Consolas", "SF Mono", monospace; font-size: .74rem; color: var(--brand-700);
    background: var(--surface-2); padding: .12rem .45rem; border-radius: 5px; }
.xbuild .term.result { background: var(--brand-700); border-color: var(--brand-700); }
.xbuild .term.result .tt { color: rgba(255,255,255,.7); }
.xbuild .term.result .tv { color: #fff; }
.xbuild .term.result .tc { color: #fff; background: rgba(255,255,255,.18); }
.xbuild .op { display: flex; align-items: center; font-size: 1.5rem; font-weight: 800; color: var(--muted); padding: 0 .1rem; }
@media (max-width: 760px) { .xbuild { flex-direction: column; align-items: center; } .xbuild .term { max-width: 320px; width: 100%; } .xbuild .op { transform: rotate(90deg); } }
.xfeat { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem; max-width: 980px; margin: 0 auto; }
@media (max-width: 760px) { .xfeat { grid-template-columns: 1fr; } }
.xfeat .xf { display: flex; gap: .7rem; align-items: flex-start; padding: .9rem 1rem; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; color: var(--ink-2); line-height: 1.5; }
.xfeat .xf svg { width: 22px; height: 22px; color: var(--brand-500); flex: 0 0 auto; margin-top: 1px; }
.xfeat .xf b { color: var(--ink); font-weight: 700; }
.src-tags { max-width: 820px; margin: .9rem auto 0; text-align: center; font-size: .82rem; color: var(--muted); line-height: 1.7; }
.src-tags b { color: var(--brand-700); font-weight: 700; }
.src-tags code { font-family: "Consolas", "SF Mono", monospace; font-size: .78rem; color: var(--ink-2);
    background: var(--surface-2); padding: .06rem .35rem; border-radius: 5px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--grad-hero); color: #fff; border-radius: 20px; padding: 3rem; text-align: center;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c6e6ea; max-width: 56ch; margin: .8rem auto 1.8rem; }
.cta-band .cta { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.fhir-footer { background: #07222c; color: #9fc0c7; padding: 3.5rem 0 2rem; margin-top: 2rem; }
.fhir-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
@media (max-width: 760px) { .fhir-footer .cols { grid-template-columns: 1fr; gap: 1.5rem; } }
.fhir-footer h4 { color: #e6f4f6; font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: .9rem; }
.fhir-footer a { color: #9fc0c7; display: block; padding: .2rem 0; }
.fhir-footer a:hover { color: #fff; }
.fhir-footer .brand { display: flex; align-items: center; gap: .6rem; color: #fff; font-weight: 800; font-size: 1.1rem; margin-bottom: .6rem; }
.fhir-footer .brand .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--grad-brand); display: grid; place-items: center; color:#fff; font-weight:800; }
.fhir-footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.4rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .85rem; color: #7fa3ab; }

/* ---------- Auth & app cards ---------- */
.auth-card { max-width: 440px; margin: 0 auto; }
.auth-head { text-align: center; margin-bottom: 1.6rem; }
.auth-head .logo { width: 46px; height: 46px; border-radius: 12px; background: var(--grad-brand); display: inline-grid; place-items: center;
    color: #fff; font-weight: 800; margin-bottom: .9rem; box-shadow: 0 6px 16px rgba(13,125,140,.32); }
.form-row { margin-bottom: 1.05rem; }
.form-row label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; color: var(--ink-2); }
.form-row input, .form-row select, .form-row textarea {
    width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: 10px; font-size: 1rem;
    background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box; font-family: inherit;
}
.form-row textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(17,154,166,.15); }

.alert { border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1.1rem; font-size: .93rem; border: 1px solid transparent; }
.alert-error { background: #fdeeec; color: var(--danger); border-color: #f3d2cd; }
.alert-ok { background: #e9f7ef; color: var(--ok); border-color: #c7ecd5; }
.alert-info { background: #e7f4f6; color: var(--brand-700); border-color: #cce6ea; }

/* ---------- Tables & badges ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: .7rem .55rem; border-bottom: 1px solid var(--line); }
.tbl th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; }
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.badge-ok { background: #e9f7ef; color: var(--ok); }
.badge-warn { background: #fdf1e3; color: var(--warn); }
.badge-bad { background: #fbeeec; color: var(--danger); }

/* ---------- Pricing ---------- */
.price-card { max-width: 460px; margin: 0 auto; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
    box-shadow: var(--shadow-md); background: var(--surface); }
.price-card .head { background: var(--grad-hero); color: #fff; padding: 2rem; text-align: center; }
.price-card .head h3 { color: #fff; font-size: 1.3rem; }
.price-big { font-size: 3rem; font-weight: 800; color: #fff; letter-spacing: -.03em; line-height: 1; margin: .6rem 0 .2rem; }
.price-card .body { padding: 2rem; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.price-card ul li { display: flex; gap: .6rem; align-items: flex-start; padding: .45rem 0; color: var(--ink-2); }
.price-card ul li svg { width: 20px; height: 20px; color: var(--brand-500); flex: 0 0 auto; margin-top: 2px; }

/* ---------- Real-time alert cards ---------- */
.alert-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.3rem; }
.acard { --sev: var(--brand-500); background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sev);
    border-radius: 12px; box-shadow: var(--shadow-sm); padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem;
    transition: transform .16s ease, box-shadow .16s ease; }
.acard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.acard.crit { --sev: var(--danger); }
.acard.warn { --sev: var(--warn); }
.acard.info { --sev: #36a2ff; }
.acard .ah { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.acard .dom { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted);
    display: inline-flex; align-items: center; gap: .4rem; }
.acard .dom svg { width: 15px; height: 15px; color: var(--sev); }
.acard .sev-chip { font-size: .68rem; font-weight: 800; letter-spacing: .03em; padding: .16rem .55rem; border-radius: 999px; color: #fff; background: var(--sev); }
.acard h4 { margin: .1rem 0 .2rem; font-size: 1.05rem; color: var(--ink); }
.arow { font-size: .85rem; color: var(--ink-2); display: flex; gap: .6rem; line-height: 1.5; }
.arow .k { color: var(--muted); flex: 0 0 88px; }
.acard code { font-family: "Consolas", monospace; font-size: .77rem; background: var(--surface-2); padding: .05rem .32rem; border-radius: 4px; color: var(--ink-2); }
.acard .notify { margin-top: auto; display: flex; align-items: center; gap: .5rem; background: var(--surface-2);
    border-radius: 10px; padding: .55rem .75rem; font-size: .85rem; color: var(--ink-2); }
.acard .notify .t { margin-left: auto; font-weight: 800; color: var(--ok); white-space: nowrap; }
.acard .live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); flex: 0 0 auto;
    box-shadow: 0 0 0 0 rgba(31,157,87,.5); animation: pulse 1.8s infinite; }

/* ---------- Plan cards (pricing) ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.4rem; align-items: stretch; }
.plan { display: flex; flex-direction: column; }
.plan .pc { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--brand-600); font-weight: 700; min-height: 1.4em; }
.plan h3 { margin: .25rem 0 .55rem; font-size: 1.3rem; }
.plan .price { font-size: 1.9rem; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; line-height: 1.15; }
.plan .price .u { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-top: .15rem; }
.plan .checklist { flex: 1; margin: 1.1rem 0 1.3rem; }
.plan .checklist li { font-size: .9rem; }
.plan.featured { border-color: var(--brand-400); box-shadow: var(--shadow-md); position: relative; }
.plan .ribbon { position: absolute; top: -11px; right: 14px; background: var(--grad-brand); color: #fff;
    font-size: .7rem; font-weight: 700; padding: .22rem .65rem; border-radius: 999px; box-shadow: 0 4px 10px rgba(13,125,140,.3); }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.2rem; margin-bottom: .8rem; box-shadow: var(--shadow-sm); }
.faq summary { font-weight: 600; cursor: pointer; color: var(--ink); list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq details[open] summary { color: var(--brand-700); margin-bottom: .6rem; }
.faq p { color: var(--muted); margin: 0; }

/* ---------- BI dashboard mockups ---------- */
.dash { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-md); overflow: hidden; }
.dash-bar { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.dash-bar .dot3 { display: flex; gap: .35rem; }
.dash-bar .dot3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: inline-block; }
.dash-bar .t { font-weight: 600; font-size: .85rem; color: var(--muted); margin-left: .4rem; }
.dash-bar .live { margin-left: auto; display: inline-flex; align-items: center; gap: .4rem; font-size: .76rem; font-weight: 700; color: var(--ok); }
.dash-bar .live .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(31,157,87,.5); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31,157,87,.5);} 70% { box-shadow: 0 0 0 8px rgba(31,157,87,0);} 100% { box-shadow: 0 0 0 0 rgba(31,157,87,0);} }
.dash-body { padding: 1.3rem; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; box-shadow: var(--shadow-sm); }
.kpi .k-l { color: var(--muted); font-size: .8rem; }
.kpi .k-n { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); margin: .2rem 0; }
.kpi .k-d { font-size: .78rem; font-weight: 700; }
.kpi .k-d.up { color: var(--ok); } .kpi .k-d.down { color: var(--danger); } .kpi .k-d.warn { color: var(--warn); }

.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; box-shadow: var(--shadow-sm); }
.chart-head { margin-bottom: 1rem; }
.chart-head h4 { font-size: 1rem; color: var(--ink); margin: 0; }
.chart-head .chart-sub { font-size: .82rem; color: var(--muted); }

.bars { display: flex; align-items: flex-end; gap: .6rem; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .45rem; }
.bar-track { height: 190px; width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.bar { width: 64%; min-height: 4px; border-radius: 7px 7px 0 0; position: relative; }
.bar-val { position: absolute; top: -1.3rem; left: -20%; right: -20%; text-align: center; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.bar-lbl { font-size: .76rem; color: var(--muted); text-align: center; line-height: 1.2; }

.donut-wrap { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; }
.donut-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.donut-legend li { display: flex; align-items: center; gap: .55rem; font-size: .88rem; color: var(--ink-2); }
.donut-legend .sw { width: 12px; height: 12px; border-radius: 3px; flex: 0 0 auto; }
.donut-legend .v { margin-left: auto; font-weight: 700; color: var(--ink); padding-left: 1rem; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .dtable { min-width: 460px; }
.dtable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.dtable td, .dtable th { white-space: nowrap; }
.dtable th, .dtable td { text-align: left; padding: .55rem .5rem; border-bottom: 1px solid var(--line); }
.dtable th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.dtable td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.dtable .chip { display: inline-block; padding: .12rem .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; }
.dtable .chip.crit { background: #fbeeec; color: var(--danger); }
.dtable .chip.warnc { background: #fdf1e3; color: var(--warn); }
.dtable .chip.okc { background: #e9f7ef; color: var(--ok); }

.mini-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; }
@media (max-width: 880px) { .mini-grid { grid-template-columns: 1fr; } }

/* Stacked bars */
.sbars { display: flex; align-items: flex-end; gap: .7rem; }
.sbar-cell { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.sbar-total { font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.sbar-track { height: 185px; width: 66%; display: flex; flex-direction: column-reverse;
    border-radius: 7px 7px 0 0; overflow: hidden; background: var(--line-2); }
.sseg { width: 100%; min-height: 2px; }

/* Heatmap */
.heat { width: 100%; border-collapse: separate; border-spacing: 4px; }
.heat th { font-size: .74rem; color: var(--muted); font-weight: 700; padding: .3rem; text-align: center; }
.heat th.rowlbl { text-align: right; white-space: nowrap; padding-right: .6rem; color: var(--ink-2); }
.heat td { text-align: center; padding: .6rem .4rem; border-radius: 7px; font-weight: 700;
    font-size: .85rem; font-variant-numeric: tabular-nums; min-width: 46px; }

/* Cross-join key diagram */
.xkey { display: grid; grid-template-columns: 1.1fr auto 1fr; gap: 1.4rem; align-items: center; }
@media (max-width: 880px) { .xkey { grid-template-columns: 1fr; } }
.sources { display: grid; gap: .7rem; }
.src { display: flex; align-items: center; gap: .7rem; background: var(--surface);
    border: 1px solid var(--line); border-radius: 10px; padding: .65rem .8rem; box-shadow: var(--shadow-sm); }
.src .tag { font-weight: 800; font-size: .68rem; padding: .22rem .5rem; border-radius: 6px; color: #fff; flex: 0 0 auto; }
.src .fld { font-family: "Consolas", "SF Mono", monospace; font-size: .84rem; color: var(--ink-2); }
.src .fld b { color: var(--brand-700); }
.xkey .keynode { text-align: center; background: var(--grad-hero); color: #fff; border-radius: 16px;
    padding: 1.3rem 1.1rem; box-shadow: var(--shadow-md); }
.xkey .keynode .ico-k { width: 40px; height: 40px; margin: 0 auto .5rem; display: grid; place-items: center;
    background: rgba(255,255,255,.15); border-radius: 10px; }
.xkey .keynode .ico-k svg { width: 22px; height: 22px; }
.xkey .keynode .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.xkey .keynode .v { font-weight: 800; font-size: 1.05rem; margin-top: .25rem; }
.xkey .keynode .sub { font-size: .76rem; opacity: .8; margin-top: .2rem; }
.xkey .out { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1rem;
    box-shadow: var(--shadow-sm); }
.xkey .out h5 { margin: 0 0 .6rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.xkey .out .line { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0;
    border-bottom: 1px dashed var(--line); font-size: .88rem; }
.xkey .out .line:last-child { border-bottom: none; }
.xkey .out .line span:last-child { font-weight: 700; color: var(--ink); }

/* Cross-standard timeline */
.timeline { border-left: 2px solid var(--line); margin: .5rem 0 0 .6rem; }
.tl-item { position: relative; padding: 0 0 1.3rem 1.5rem; }
.tl-item::before { content: ''; position: absolute; left: -8px; top: 3px; width: 13px; height: 13px;
    border-radius: 50%; background: var(--brand-500); border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(17,154,166,.25); }
.tl-item:last-child { padding-bottom: 0; }
.tl-time { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-evt { font-weight: 600; color: var(--ink); margin: .1rem 0; }
.tl-evt .tag { font-weight: 800; font-size: .66rem; padding: .15rem .45rem; border-radius: 5px; color: #fff; margin-right: .5rem; vertical-align: middle; }
.tl-meta { font-size: .82rem; color: var(--muted); }

/* Horizontal bars */
.hbars { display: grid; gap: .7rem; }
.hbar-row { display: grid; grid-template-columns: 128px 1fr auto; align-items: center; gap: .8rem; }
.hbar-lbl { font-size: .86rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar-track { background: var(--line-2); border-radius: 6px; height: 16px; overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 6px; min-width: 3px; transition: width .3s ease; }
.hbar-val { font-size: .85rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Bullet chart (value vs target/threshold) */
.bullets { display: grid; gap: .7rem; }
.bullet-row { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: .8rem; }
.bullet-lbl { font-size: .85rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bullet-track { position: relative; background: var(--line-2); border-radius: 6px; height: 18px; }
.bullet-fill { height: 100%; border-radius: 6px; min-width: 3px; }
.bullet-target { position: absolute; top: -3px; bottom: -3px; width: 3px; border-radius: 2px; background: var(--ink); }
.bullet-val { font-size: .84rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bullet-legend { display: flex; gap: 1.2rem; margin-top: 1rem; font-size: .78rem; color: var(--muted); }
.bullet-legend .bdot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: .4rem; vertical-align: middle; }
.bullet-legend .btick { display: inline-block; width: 3px; height: 12px; background: var(--ink); border-radius: 2px; margin-right: .4rem; vertical-align: middle; }

/* ---------- AI marking & integration agent ---------- */
:root { --ai: #7c3aed; --ai-2: #a78bfa; --ai-soft: #f3effd; --ai-line: #e1d6fa; }
.ai-badge { display: inline-flex; align-items: center; gap: .35rem; background: linear-gradient(135deg, var(--ai), #0d7d8c);
    color: #fff; font-weight: 700; font-size: .72rem; letter-spacing: .02em; padding: .26rem .6rem; border-radius: 999px; white-space: nowrap; }
.ai-badge svg { width: 13px; height: 13px; }
.ai-chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--ai-soft); color: var(--ai);
    border: 1px solid var(--ai-line); font-weight: 600; font-size: .76rem; padding: .12rem .5rem; border-radius: 6px; }
.ai-chip svg { width: 12px; height: 12px; }

/* HL7 raw message block (terminal style) */
.hl7-raw { font-family: "Consolas", "SF Mono", monospace; font-size: .76rem; line-height: 1.7;
    background: #07222c; color: #bcd9de; border-radius: 14px; padding: 1.1rem 1.2rem; overflow-x: auto;
    box-shadow: var(--shadow-md); margin: 0; }
.hl7-raw .ln { display: block; white-space: nowrap; }
.hl7-raw .seg { color: #4fd1c5; font-weight: 700; }
.hl7-raw .hl { color: #ffd27a; }
.hl7-raw .crit { color: #ff8d7a; font-weight: 700; }
.hl7-raw .dim { color: #5b7e86; }

/* Generated document card */
.doc-card { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; height: 100%; display: flex; flex-direction: column; }
.doc-card.ai { border-color: var(--ai-line); }
.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--line); background: linear-gradient(0deg, var(--ai-soft), #fff); }
.doc-head h4 { margin: 0; font-size: 1rem; color: var(--ink); }
.doc-body { padding: 1.1rem; color: var(--ink-2); font-size: .92rem; line-height: 1.65; flex: 1; }
.doc-body p { margin: 0 0 .7rem; }
.doc-body .field { display: grid; grid-template-columns: 150px 1fr; gap: .3rem 1rem; font-size: .88rem; margin-bottom: .35rem; }
.doc-body .field span:first-child { color: var(--muted); }
.doc-foot { padding: .7rem 1.1rem; border-top: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.ai-meta { display: inline-flex; align-items: center; gap: .3rem; background: var(--surface-2); padding: .15rem .5rem; border-radius: 6px; font-size: .76rem; color: var(--muted); }
.ai-meta code { font-family: "Consolas", monospace; color: var(--ink-2); }

/* Transform before→after layout */
.xform { display: grid; grid-template-columns: 1fr 64px 1fr; gap: 1rem; align-items: center; }
@media (max-width: 900px) { .xform { grid-template-columns: 1fr; } .xform .xarrow { transform: rotate(90deg); margin: .3rem auto; } }
.xform .xarrow { display: grid; place-items: center; color: var(--ai); }
.xform .xarrow .a { font-size: 1.7rem; line-height: 1; }
.xform .xarrow .lbl { font-size: .66rem; color: var(--muted); text-align: center; margin-top: .3rem; }

/* Pipeline stepper */
.pipe { display: flex; gap: .8rem; flex-wrap: wrap; }
.pipe .pstep { flex: 1; min-width: 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
    padding: 1rem; position: relative; box-shadow: var(--shadow-sm); }
.pipe .pstep .pico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
    background: var(--surface-2); color: var(--brand-600); margin-bottom: .6rem; }
.pipe .pstep.ai .pico { background: var(--ai-soft); color: var(--ai); }
.pipe .pstep h4 { margin: 0 0 .2rem; font-size: .95rem; }
.pipe .pstep p { margin: 0; font-size: .82rem; color: var(--muted); }
.pipe .pstep .n { position: absolute; top: .7rem; right: .9rem; font-size: .8rem; font-weight: 800; color: var(--line); }

/* Routing table reuses .kpit; engine chips */
.eng { display: inline-block; font-size: .74rem; font-weight: 700; padding: .12rem .5rem; border-radius: 6px;
    background: var(--surface-2); color: var(--brand-700); margin: .1rem .15rem 0 0; }
.eng.mirth { background: #e8f1ff; color: #1d6fd0; }

/* ---------- KPI table ---------- */
.kpit { width: 100%; border-collapse: collapse; }
.kpit th, .kpit td { text-align: left; padding: .7rem .7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.kpit thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.kpit tbody tr:hover { background: var(--surface-2); }
.kpit .kpi-name { font-weight: 600; color: var(--ink); }
.kpit .kpi-val { font-weight: 800; font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpit .kpi-tgt { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpit .kpi-trend { font-weight: 700; white-space: nowrap; }
.kpit .kpi-trend.up { color: var(--ok); } .kpit .kpi-trend.down { color: var(--danger); } .kpit .kpi-trend.warn { color: var(--warn); }
.kpit .kpi-src code { font-family: "Consolas", "SF Mono", monospace; font-size: .74rem; color: var(--ink-2);
    background: var(--surface-2); padding: .05rem .35rem; border-radius: 5px; margin-right: .2rem; white-space: nowrap; }
.kpit .kpi-src .std { font-weight: 700; color: var(--brand-700); font-size: .72rem; margin-right: .25rem; }
@media (max-width: 820px) { .kpit .hide-sm { display: none; } }

/* ---------- Tabs (CSS radio, no JS) ---------- */
.bi-tabs > .tabr { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.tablist-wrap { position: sticky; top: 68px; z-index: 40; background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(10px); border-bottom: 1px solid var(--line); }
.tablist { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; max-width: var(--maxw);
    margin: 0 auto; padding: .7rem 1.2rem; }
.tablist label { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; white-space: nowrap;
    padding: .5rem .95rem; font-weight: 600; font-size: .9rem; color: var(--ink-2);
    background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
    transition: color .15s, background .15s, border-color .15s; }
.tablist label:hover { color: var(--brand-700); border-color: var(--brand-400); }
.tablist label svg { width: 17px; height: 17px; }
@media (max-width: 640px) {
    .tablist { gap: .4rem; padding: .6rem .8rem; }
    .tablist label { padding: .45rem .8rem; font-size: .82rem; }
    .tablist label svg { display: none; }
}
.bi-tabs > .tabpane { display: none; }
#bt-clin:checked ~ #pane-clin,
#bt-alert:checked ~ #pane-alert,
#bt-pacs:checked ~ #pane-pacs,
#bt-cross:checked ~ #pane-cross,
#bt-supp:checked ~ #pane-supp,
#bt-logi:checked ~ #pane-logi,
#bt-fin:checked ~ #pane-fin,
#bt-admin:checked ~ #pane-admin { display: block; }
#bt-clin:checked ~ .tablist-wrap label[for="bt-clin"],
#bt-alert:checked ~ .tablist-wrap label[for="bt-alert"],
#bt-pacs:checked ~ .tablist-wrap label[for="bt-pacs"],
#bt-cross:checked ~ .tablist-wrap label[for="bt-cross"],
#bt-supp:checked ~ .tablist-wrap label[for="bt-supp"],
#bt-logi:checked ~ .tablist-wrap label[for="bt-logi"],
#bt-fin:checked ~ .tablist-wrap label[for="bt-fin"],
#bt-admin:checked ~ .tablist-wrap label[for="bt-admin"] { color: #fff; background: var(--brand-700); border-color: var(--brand-700); box-shadow: 0 2px 8px rgba(13,125,140,.28); }
.tabr:focus-visible ~ .tablist-wrap label { outline: 2px solid var(--brand-400); outline-offset: 2px; }

/* Self-hosted CAPTCHA (login / register) */
.captcha { display: flex; align-items: center; gap: .6rem; margin-bottom: .5rem; }
.captcha-img { line-height: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.captcha-img svg { display: block; }
.captcha-reload { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px;
    border: 1px solid var(--line); border-radius: 8px; color: var(--brand-700); text-decoration: none;
    font-size: 1.2rem; line-height: 1; background: var(--surface); transition: background .15s, border-color .15s; }
.captcha-reload:hover { background: var(--surface-2); border-color: var(--brand-400); }
.captcha-input { text-transform: uppercase; letter-spacing: .12em; font-family: "Consolas", monospace; }

/* Needs / contact form */
.needs-section { border-top: 1px solid var(--line); padding-top: 1.3rem; margin-top: 1.3rem; }
.needs-section > h3 { margin: 0 0 .25rem; font-size: 1.05rem; display: flex; align-items: center; gap: .5rem; }
.needs-section > h3 svg { width: 19px; height: 19px; color: var(--brand-500); }
.needs-section > .hint { color: var(--muted); font-size: .85rem; margin: 0 0 .7rem; }
.checkgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .5rem .9rem; }
.checkgrid label { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; color: var(--ink-2); cursor: pointer; }
.checkgrid input[type=checkbox] { margin-top: .15rem; width: 16px; height: 16px; flex: 0 0 auto; accent-color: var(--brand-600); }
.scale-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem 1rem; }
.who-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: .75rem 1rem; font-size: .9rem; }
.who-box .muted { font-size: .82rem; }

/* error ui (framework) */
#blazor-error-ui { background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none;
    left: 0; padding: .8rem 1.2rem; position: fixed; width: 100%; z-index: 1000; }
