/* ============================================================
   VirtualFAE — modern redesign
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* Surfaces */
    --bg:        #05070e;
    --bg-2:      #080c17;
    --surface:   rgba(255, 255, 255, 0.025);
    --surface-2: rgba(255, 255, 255, 0.045);
    --border:    rgba(255, 255, 255, 0.08);
    --border-2:  rgba(255, 255, 255, 0.14);

    /* Accents */
    --accent:    #38bdf8;
    --accent-2:  #818cf8;
    --accent-3:  #22d3ee;
    --grad:      linear-gradient(120deg, #38bdf8 0%, #818cf8 100%);
    --grad-soft: linear-gradient(120deg, rgba(56,189,248,0.16), rgba(129,140,248,0.16));

    /* Status */
    --ok:   #34d399;
    --warn: #fbbf24;
    --risk: #fb7185;

    /* Text */
    --text:  #eaf1ff;
    --muted: #8595b3;
    --faint: #5d6b85;

    --radius:    11px;
    --radius-sm: 8px;
    /* Geist (clean geometric, like the reference) with safe fallbacks; a real
       monospace for part numbers / codes gives the technical, professional feel. */
    --font:      'Geist', 'Inter', system-ui, -apple-system, sans-serif;
    --display:   'Geist', var(--font);
    --mono:      'JetBrains Mono', ui-monospace, 'Cascadia Code', 'SFMono-Regular', monospace;
    --ease:      cubic-bezier(.22, 1, .36, 1);
    --t:         .3s var(--ease);
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Flex children must be allowed to shrink below their content's intrinsic
   width, or a long unbreakable token (e.g. a stored filename) forces the
   whole column wider than the viewport on small screens. */
body > nav, body > main, body > footer { min-width: 0; }
/* Break long unbroken strings (filenames, part numbers) instead of overflowing. */
.auth-sub, .dz-text span, .sub-meta, .contact-detail-text span { overflow-wrap: anywhere; }

/* Ambient background glows + grid */
body::before {
    content: '';
    position: fixed; inset: 0; z-index: -2;
    background:
        radial-gradient(40rem 30rem at 78% -5%, rgba(56,189,248,0.14), transparent 60%),
        radial-gradient(36rem 28rem at 5% 18%, rgba(129,140,248,0.12), transparent 60%),
        radial-gradient(50rem 40rem at 50% 120%, rgba(34,211,238,0.08), transparent 60%);
}
body::after {
    content: '';
    position: fixed; inset: 0; z-index: -2; opacity: 0.5;
    background-image:
        linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
            mask-image: radial-gradient(circle at 50% 35%, #000 0%, transparent 75%);
}

a { color: var(--accent); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent-2); }
img { max-width: 100%; display: block; }

::selection { background: rgba(56,189,248,0.3); color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ── reusable gradient text ── */
.grad-text {
    background: var(--grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ─────────────────────────── NAV ─────────────────────────── */
.nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(8, 12, 23, 0.6);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.nav-logo {
    font-family: var(--display);
    font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em;
    color: var(--text); display: flex; align-items: center; gap: 9px;
}
.nav-logo .logo-mark {
    width: 32px; height: 32px;
    display: block; flex-shrink: 0;
    filter: drop-shadow(0 4px 12px rgba(56,189,248,0.35));
}
.nav-logo .logo-mark img { width: 100%; height: 100%; display: block; }
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
    padding: 8px 15px; border-radius: 9px;
    color: var(--muted); font-size: 0.78rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.09em;
    transition: color var(--t), background var(--t);
}
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--surface-2); }

.nav-cta {
    background: var(--grad) !important; color: var(--bg) !important;
    font-weight: 700 !important; padding: 9px 18px !important;
    box-shadow: 0 6px 20px rgba(56,189,248,0.3);
}
.nav-cta:hover { transform: translateY(-1px); }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; transition: all var(--t); }

/* ─────────────────────────── BUTTONS ─────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 10px 18px; border-radius: 9px;
    font-size: 0.88rem; font-weight: 600; font-family: var(--font); letter-spacing: 0.01em;
    transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t);
    cursor: pointer; border: none; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--grad); color: var(--bg); box-shadow: 0 4px 14px rgba(56,189,248,0.25); }
.btn-primary:hover { transform: translateY(-1px); color: var(--bg); box-shadow: 0 6px 20px rgba(56,189,248,0.38); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--text); }

/* ─────────────────────────── HERO ─────────────────────────── */
.hero {
    padding: 92px 0 80px;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}
/* Background rendered as a real <img> in the HTML (like the navbar logo),
   so it doesn't depend on the cached stylesheet for its URL. */
.hero-bg-img {
    position: absolute; inset: 0; z-index: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}
/* Readability overlay (gradients only — no image, safe to cache) */
.hero::after {
    content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5,7,14,0.95) 0%, rgba(5,7,14,0.78) 48%, rgba(5,7,14,0.5) 100%),
        linear-gradient(180deg, rgba(5,7,14,0.55) 0%, transparent 22%, transparent 78%, var(--bg) 100%);
}
.hero .hero-inner { position: relative; z-index: 2; }
@media (max-width: 760px) {
    .hero::after { background: linear-gradient(180deg, rgba(5,7,14,0.92) 0%, rgba(5,7,14,0.8) 60%, var(--bg) 100%); }
}
.hero-inner {
    display: grid; grid-template-columns: 1.05fr 0.95fr;
    gap: 56px; align-items: center;
}

.pill {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px 6px 7px; border-radius: 50px;
    border: 1px solid var(--border-2); background: var(--surface);
    color: var(--text); font-size: 0.78rem; font-weight: 500;
    margin-bottom: 26px;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(56,189,248,0.18); }

.hero h1 {
    font-family: var(--display);
    font-size: clamp(2.4rem, 5.2vw, 4rem);
    font-weight: 700; line-height: 1.06; letter-spacing: -0.03em;
    margin-bottom: 22px;
}
.hero-sub {
    font-size: clamp(1rem, 1.5vw, 1.12rem);
    color: var(--muted); max-width: 480px; margin-bottom: 34px;
}
.hero .btn-group { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.hero-scan { margin-bottom: 40px; }

/* Drag & drop upload */
.dropzone {
    display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; border-radius: var(--radius); cursor: pointer;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1.5px dashed var(--border-2);
    transition: border-color var(--t), background var(--t), transform var(--t), box-shadow var(--t);
    position: relative; overflow: hidden;
}
.dropzone::before {
    content: ''; position: absolute; inset: 0; opacity: 0; pointer-events: none;
    background: radial-gradient(24rem 12rem at 20% -20%, rgba(56,189,248,0.18), transparent 60%);
    transition: opacity var(--t);
}
.dropzone:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,0.35); }
.dropzone:hover::before { opacity: 1; }
.dropzone.is-drag { border-color: var(--accent); border-style: solid; background: rgba(56,189,248,0.08); transform: scale(1.01); }
.dropzone.is-loading { pointer-events: none; }
.dropzone.is-loading .dz-icon { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.45; } }

.dz-icon { width: 52px; height: 52px; flex-shrink: 0; border-radius: 13px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.dz-icon svg { width: 26px; height: 26px; }
.dz-text { display: flex; flex-direction: column; gap: 3px; flex-grow: 1; min-width: 0; }
.dz-text strong { font-family: var(--display); font-size: 1.02rem; font-weight: 600; }
.dz-text span { color: var(--muted); font-size: 0.82rem; }
.dz-action { flex-shrink: 0; padding: 11px 22px; pointer-events: none; }
@media (max-width: 540px) {
    .dropzone { flex-direction: column; text-align: center; padding: 28px 20px; }
    .dz-text { align-items: center; }
    .dz-action { width: 100%; justify-content: center; }
}

.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 16px; flex-wrap: wrap; }
.trust-pill {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 0.8rem; font-weight: 500; color: var(--muted);
    padding: 6px 13px; border-radius: 50px; background: var(--surface); border: 1px solid var(--border);
}
.trust-pill svg { width: 15px; height: 15px; color: var(--ok); }
.text-link { font-size: 0.86rem; font-weight: 500; color: var(--muted); }
.text-link:hover { color: var(--accent); }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stat .num {
    font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1;
    display: flex; align-items: center; gap: 7px;
}
.hero-stat .num svg { width: 20px; height: 20px; color: var(--accent); }
.hero-stat .lbl { color: var(--faint); font-size: 0.82rem; margin-top: 5px; }

/* Hero visual — CSS "analysis dashboard" */
.hero-visual { position: relative; }
.dash {
    background: linear-gradient(180deg, rgba(18,26,46,0.9), rgba(10,15,28,0.9));
    border: 1px solid var(--border-2);
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
    backdrop-filter: blur(8px);
}
.dash-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.dash-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--faint); display: inline-block; }
.dash-bar i:nth-child(1) { background: #fb7185; }
.dash-bar i:nth-child(2) { background: #fbbf24; }
.dash-bar i:nth-child(3) { background: #34d399; }
.dash-bar .dash-title { margin-left: 8px; font-size: 0.78rem; color: var(--muted); font-family: var(--display); }

.dash-body { padding: 18px; }
.dash-score { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.ring {
    width: 76px; height: 76px; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--accent) 0% 78%, rgba(255,255,255,0.07) 78% 100%);
    display: grid; place-items: center; position: relative;
}
.ring::after { content: ''; position: absolute; inset: 9px; border-radius: 50%; background: #0b1120; }
.ring b { position: relative; font-family: var(--display); font-size: 1.25rem; font-weight: 700; }
.dash-score-meta h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 3px; }
.dash-score-meta p { font-size: 0.8rem; color: var(--muted); }

.dash-row {
    display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 10px; background: var(--surface);
    border: 1px solid var(--border); margin-bottom: 8px;
}
.dash-row .part { font-size: 0.82rem; font-family: var(--display); letter-spacing: 0.01em; min-width: 0; overflow-wrap: anywhere; }
.dash-row .part small { display: block; color: var(--faint); font-size: 0.72rem; font-family: var(--font); font-weight: 400; }
.tag { font-size: 0.66rem; font-weight: 700; padding: 4px 10px; border-radius: 50px; letter-spacing: 0.05em; text-transform: uppercase; }

/* Part numbers / MPNs in a real monospace — the "engineering" credibility cue. */
.report-table td strong,
.dash-row .part,
.rec-info strong,
.alt-chip,
.result-table strong { font-family: var(--mono); letter-spacing: -0.01em; }
.tag.ok   { color: var(--ok);   background: rgba(52,211,153,0.12); }
.tag.warn { color: var(--warn); background: rgba(251,191,36,0.12); }
.tag.risk { color: var(--risk); background: rgba(251,113,133,0.12); }

/* ============================================================
   App shell with sidebar (dashboard) — AI2-style
   ============================================================ */
body.has-shell { display: block; }
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 248px; z-index: 50;
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column; padding: 20px 14px;
}
.side-brand {
    display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px;
    font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none;
}
.side-brand span:last-child { color: var(--accent); }
.side-brand .logo-mark { width: 30px; height: 30px; flex: 0 0 auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.side-group { margin-bottom: 14px; }
.side-group-label { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--faint); font-weight: 700; padding: 4px 12px 5px; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); }
.side-link {
    display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px;
    color: var(--muted); text-decoration: none; font-size: 0.85rem; font-weight: 500;
    letter-spacing: 0.01em; transition: background var(--t), color var(--t);
}
.side-link .side-label { flex: 1; min-width: 0; }
.side-badge {
    flex: 0 0 auto; background: rgba(56,189,248,0.14); color: var(--accent);
    font-size: 0.68rem; font-weight: 700; font-family: var(--mono);
    padding: 1px 7px; border-radius: 50px; border: 1px solid rgba(56,189,248,0.25);
}
.side-link.active .side-badge { background: rgba(56,189,248,0.24); }
.side-link:hover { color: var(--text); background: var(--surface-2); }
.side-link.active { color: var(--text); background: var(--grad-soft); box-shadow: inset 0 0 0 1px var(--border-2); }
.side-link.active .side-ic { color: var(--accent); }
.side-ic { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; }
.side-ic svg { width: 19px; height: 19px; }

.shell { flex: 1; min-width: 0; margin-left: 248px; display: flex; flex-direction: column; }
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px; padding: 14px 26px;
    background: rgba(8,12,23,0.82); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.topbar-title { font-family: var(--display); font-weight: 600; font-size: 1.05rem; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.topbar-user { color: var(--muted); font-size: 0.82rem; }
.btn-sm { padding: 8px 14px; font-size: 0.82rem; }
.side-toggle { display: none; background: none; border: 0; color: var(--text); cursor: pointer; padding: 4px; }
.side-toggle svg { width: 24px; height: 24px; }
.shell-body { padding: 26px; max-width: 1100px; width: 100%; }
.shell-body .alert { margin-bottom: 20px; }
.sidebar-scrim { display: none; }

@media (max-width: 880px) {
    .sidebar { transform: translateX(-100%); transition: transform .28s var(--ease); box-shadow: 0 0 40px rgba(0,0,0,0.5); }
    body.side-open .sidebar { transform: translateX(0); }
    .shell { margin-left: 0; }
    .side-toggle { display: block; }
    body.side-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,0.5); }
    .shell-body { padding: 18px; }
    .topbar { padding: 12px 16px; }
    .topbar-user { display: none; }
}

/* Editable Build-a-BOM grid */
.bom-grid { width: 100%; border-collapse: collapse; margin: 8px 0 16px; }
.bom-grid th { text-align: left; padding: 8px 10px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); border-bottom: 1px solid var(--border); }
.bom-grid td { padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.bom-grid input { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 8px; padding: 9px 11px; font-size: 0.88rem; font-family: var(--mono); }
.bom-grid input:focus { outline: none; border-color: var(--accent); }
.bom-grid input.qty { font-family: var(--font); max-width: 110px; }
.bom-grid .row-del { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 4px 8px; border-radius: 6px; }
.bom-grid .row-del:hover { color: var(--risk); background: rgba(251,113,133,0.1); }

/* Stat cards row (overview) */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px 20px; }
.stat-card .sc-num { font-family: var(--display); font-size: 1.9rem; font-weight: 700; line-height: 1; }
.stat-card .sc-lbl { color: var(--muted); font-size: 0.8rem; margin-top: 6px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Toast notifications (slide-in, auto-dismiss) */
.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 36px)); }
.toast {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 12px;
    background: rgba(13,19,33,0.96); border: 1px solid var(--border-2); color: var(--text);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5); font-size: 0.88rem; line-height: 1.45;
    transform: translateX(120%); opacity: 0; transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast .t-ic { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; }
.toast.ok  { border-left: 3px solid var(--ok); }
.toast.err { border-left: 3px solid var(--risk); }
.toast.ok  .t-ic { color: var(--ok); }
.toast.err .t-ic { color: var(--risk); }
.toast .t-x { margin-left: auto; background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 0 2px; }
.toast .t-x:hover { color: var(--text); }

/* List toolbar: search + sort above a list */
.list-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.list-search { position: relative; flex: 1 1 220px; min-width: 0; }
.list-search input { width: 100%; background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px 10px 38px; font-size: 0.88rem; }
.list-search input:focus { outline: none; border-color: var(--accent); }
.list-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); }
.list-toolbar select { background: var(--surface); border: 1px solid var(--border); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 0.86rem; }
.list-count { color: var(--muted); font-size: 0.82rem; }
.list-empty { color: var(--muted); padding: 24px; text-align: center; }

/* Stored professional report rendered inside the dark dashboard (white paper) */
.report-paper {
    background: #fff; color: #111; border-radius: var(--radius);
    padding: 30px; margin-top: 8px; overflow-x: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
@media (max-width: 560px) { .report-paper { padding: 18px; } }

/* OEM "Recommended components" — design-in → design-win action */
.rec-block { margin-top: 34px; padding-top: 26px; border-top: 1px solid var(--border); }
.rec-head h2 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 4px; }
.rec-head .auth-sub { max-width: 640px; margin-bottom: 18px; }
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-card {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 14px 16px; border-radius: 12px;
    background: var(--surface); border: 1px solid var(--border);
}
.rec-card.is-selected { border-color: rgba(52,211,153,0.4); background: rgba(52,211,153,0.06); }
.report-table tr.rec-row-selected td { background: rgba(52,211,153,0.07); }

/* Per-component "choose the recommendation" cell on the report dashboard */
.rec-cell { min-width: 200px; }
.rec-pick { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rec-pick-info { display: flex; flex-direction: column; min-width: 0; }
.rec-pick-info strong { font-family: var(--mono); font-size: 0.84rem; overflow-wrap: anywhere; }
.rec-pick-info .rec-mfr { color: var(--faint); font-size: 0.72rem; }
.rec-pick .btn { flex: 0 0 auto; }

/* Bulk-select table + floating action bar (AI2-style) */
.report-table.picky th:first-child, .report-table.picky td.pick-col { text-align: center; }
.report-table tbody tr:hover td { background: rgba(255,255,255,0.022); }
.row-pick, #pickAll { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
.bulk-bar {
    position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 140%);
    display: flex; align-items: center; gap: 12px; z-index: 200; min-width: 300px;
    background: rgba(13,19,33,0.97); border: 1px solid var(--border-2); border-radius: 12px;
    padding: 10px 14px; box-shadow: 0 18px 48px rgba(0,0,0,0.6); opacity: 0;
    transition: transform .3s var(--ease), opacity .3s var(--ease); backdrop-filter: blur(10px);
}
.bulk-bar.show { transform: translate(-50%, 0); opacity: 1; }
.bulk-bar b { color: var(--accent); font-family: var(--mono); }
.bulk-spacer { flex: 1; }
@media (max-width: 560px) { .bulk-bar { left: 12px; right: 12px; transform: translateY(140%); min-width: 0; } .bulk-bar.show { transform: translateY(0); } }

/* Collapsible formal (PDF) report under the interactive dashboard */
.formal-report { margin-top: 26px; border-top: 1px solid var(--border); padding-top: 16px; }
.formal-report > summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; font-weight: 600; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.formal-report > summary::before { content: '▸'; color: var(--accent); transition: transform var(--t); }
.formal-report[open] > summary::before { transform: rotate(90deg); }
.formal-report > summary:hover { color: var(--text); }
.rec-info { display: flex; flex-direction: column; min-width: 0; }
.rec-info strong { font-family: var(--display); font-size: 0.98rem; overflow-wrap: anywhere; }
.rec-mfr { color: var(--faint); font-size: 0.8rem; }
.rec-card form { margin: 0; flex-shrink: 0; }
@media (max-width: 480px) {
    .rec-card { flex-direction: column; align-items: stretch; text-align: left; }
    .rec-card form, .rec-card .tag { width: 100%; text-align: center; }
    .rec-card .btn { width: 100%; }
}

.hero-float {
    position: absolute; left: -26px; bottom: 28px;
    background: rgba(11,17,32,0.92); border: 1px solid var(--border-2);
    border-radius: 13px; padding: 12px 16px;
    display: flex; align-items: center; gap: 11px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.5);
    animation: float 4.5s ease-in-out infinite;
}
.hero-float .fi { width: 34px; height: 34px; border-radius: 9px; background: rgba(52,211,153,0.14); color: var(--ok); display: grid; place-items: center; }
.hero-float .fi svg { width: 18px; height: 18px; }
.hero-float b { font-size: 0.82rem; }
.hero-float small { display: block; color: var(--muted); font-size: 0.72rem; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ─────────────────────────── SECTIONS ─────────────────────────── */
section { padding: 68px 0; position: relative; }

.section-head { max-width: 640px; margin: 0 auto 38px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.section-label {
    display: inline-flex; align-items: center; gap: 8px;
    text-transform: uppercase; letter-spacing: 0.14em;
    font-size: 0.74rem; font-weight: 700; color: var(--accent);
    margin-bottom: 14px;
}
.section-label::before { content: ''; width: 18px; height: 1px; background: var(--accent); }
.section-head:not(.left) .section-label { justify-content: center; }

.section-title {
    font-family: var(--display);
    font-size: clamp(1.8rem, 3.6vw, 2.7rem);
    font-weight: 700; letter-spacing: -0.025em; line-height: 1.12;
    margin-bottom: 16px;
}
.section-desc { color: var(--muted); font-size: 1.04rem; max-width: 560px; margin: 0 auto; }
.section-head.left .section-desc { margin: 0; }

/* ─────────────────────────── BENTO SERVICES ─────────────────────────── */
.bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.tile {
    position: relative; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 28px;
    transition: transform var(--t), border-color var(--t), background var(--t);
}
.tile::after {
    content: ''; position: absolute; inset: 0; opacity: 0;
    background: radial-gradient(20rem 16rem at var(--mx, 50%) var(--my, 0%), rgba(56,189,248,0.1), transparent 60%);
    transition: opacity var(--t); pointer-events: none;
}
.tile:hover { transform: translateY(-5px); border-color: var(--border-2); background: var(--surface-2); }
.tile:hover::after { opacity: 1; }
.tile.wide { grid-column: span 2; }

.tile-icon {
    width: 52px; height: 52px; border-radius: 13px;
    background: var(--grad-soft); border: 1px solid var(--border);
    display: grid; place-items: center; color: var(--accent);
    margin-bottom: 18px;
}
.tile-icon svg { width: 26px; height: 26px; }
.tile h3 { font-family: var(--display); font-size: 1.12rem; font-weight: 600; margin-bottom: 7px; }
.tile p { color: var(--muted); font-size: 0.9rem; }

.tile.feature {
    background: linear-gradient(150deg, rgba(56,189,248,0.12), rgba(129,140,248,0.06));
    border-color: rgba(56,189,248,0.3);
    display: flex; flex-direction: column; justify-content: space-between;
}
.tile.feature h3 { font-size: 1.45rem; line-height: 1.15; }
.tile.feature .tile-link { margin-top: 18px; font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 6px; }

/* ─────────────────────────── VALUES ─────────────────────────── */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.value-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px; text-align: center;
    transition: transform var(--t), border-color var(--t);
}
.value-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.value-card .icon {
    width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
    background: var(--grad-soft); display: grid; place-items: center; color: var(--accent);
}
.value-card .icon svg { width: 26px; height: 26px; }
.value-card h4 { font-family: var(--display); font-weight: 600; font-size: 1.02rem; margin-bottom: 6px; }
.value-card p { color: var(--muted); font-size: 0.85rem; }

/* ─────────────────────────── PROCESS ─────────────────────────── */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; position: relative; }
.process::before {
    content: ''; position: absolute; top: 34px; left: 16%; right: 16%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-2), transparent);
}
.step { text-align: center; position: relative; }
.step-num {
    width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 50%;
    background: var(--bg-2); border: 1px solid var(--border-2);
    display: grid; place-items: center; color: var(--accent);
    position: relative; z-index: 1;
    box-shadow: 0 0 0 8px var(--bg);
}
.step-num svg { width: 28px; height: 28px; }
.step-badge {
    position: absolute; top: -4px; right: calc(50% - 42px);
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--grad); color: var(--bg);
    font-family: var(--display); font-weight: 700; font-size: 0.78rem;
    display: grid; place-items: center; z-index: 2;
}
.step h3 { font-family: var(--display); font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 0.9rem; max-width: 280px; margin: 0 auto; }

/* ─────────────────────────── PRICING ─────────────────────────── */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.pricing-card {
    display: flex; flex-direction: column;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 30px 26px;
    position: relative; transition: transform var(--t), border-color var(--t);
}
.pricing-card:hover { transform: translateY(-5px); border-color: var(--border-2); }
.pricing-card.featured {
    border-color: rgba(56,189,248,0.4);
    background: linear-gradient(165deg, rgba(56,189,248,0.1), rgba(129,140,248,0.04));
    box-shadow: 0 24px 60px rgba(56,189,248,0.12);
}
.pricing-badge {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--grad); color: var(--bg);
    font-size: 0.68rem; font-weight: 800; padding: 5px 16px; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
    box-shadow: 0 6px 18px rgba(56,189,248,0.35);
}
.pricing-card .tier-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.pricing-card .tier-icon svg { width: 24px; height: 24px; }
.pricing-card h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; margin-bottom: 4px; }
.pricing-card .scale { color: var(--accent); font-size: 0.82rem; font-weight: 600; margin-bottom: 18px; }
.pricing-features { list-style: none; margin-bottom: 24px; flex-grow: 1; }
.pricing-features li { padding: 7px 0; color: var(--muted); font-size: 0.88rem; display: flex; align-items: flex-start; gap: 10px; }
.pricing-features li svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 3px; }
.pricing-card .btn { width: 100%; }

/* ─────────────────────────── CONTACT ─────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 28px; align-items: start; }
.form-single { max-width: 620px; margin: 0 auto; }

.contact-info {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 32px;
}
.contact-info h3 { font-family: var(--display); font-size: 1.3rem; font-weight: 600; margin-bottom: 24px; }
.contact-detail { display: flex; align-items: center; gap: 15px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-detail:last-of-type { border-bottom: none; }
.contact-detail .icon { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.contact-detail .icon svg { width: 21px; height: 21px; }
.contact-detail-text strong { display: block; font-weight: 600; font-size: 0.95rem; }
.contact-detail-text span { color: var(--muted); font-size: 0.86rem; }

.contact-cta-box { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--border); }
.contact-cta-box .btn { width: 100%; }

.form-wrap {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 26px;
}
.form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group label { font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-control {
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--radius-sm); color: var(--text);
    padding: 11px 14px; font-size: 0.9rem; font-family: var(--font);
    transition: border-color var(--t), box-shadow var(--t); width: 100%;
}
.form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(56,189,248,0.15); }
.form-control::placeholder { color: var(--faint); }
textarea.form-control { resize: vertical; min-height: 110px; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-2); }

.file-upload {
    border: 1.5px dashed var(--border-2); border-radius: var(--radius);
    padding: 28px; text-align: center; cursor: pointer;
    transition: border-color var(--t), background var(--t); display: block;
}
.file-upload:hover { border-color: var(--accent); background: var(--surface); }
.file-upload input { display: none; }
.file-upload .upload-icon { width: 48px; height: 48px; margin: 0 auto 12px; border-radius: 12px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.file-upload .upload-icon svg { width: 24px; height: 24px; }
.file-upload p { color: var(--muted); font-size: 0.88rem; }
.file-upload strong { color: var(--text); display: block; margin-bottom: 3px; }

.alert { border-radius: var(--radius-sm); padding: 16px 18px; margin-bottom: 20px; font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; }
.alert-ok   { background: rgba(52,211,153,0.1);  border: 1px solid rgba(52,211,153,0.35);  color: #6ee7b7; }
.alert-err  { background: rgba(251,113,133,0.1); border: 1px solid rgba(251,113,133,0.35); color: #fda4af; }

.form-note { color: var(--faint); font-size: 0.78rem; text-align: center; }

/* ─────────────────────────── FINAL CTA ─────────────────────────── */
.final-cta { text-align: center; }
.final-cta .cta-inner {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, rgba(56,189,248,0.14), rgba(129,140,248,0.08));
    border: 1px solid var(--border-2);
    border-radius: 16px; padding: 52px 30px;
}
.final-cta .cta-inner::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: radial-gradient(30rem 20rem at 50% 0%, rgba(56,189,248,0.25), transparent 70%);
}
.final-cta h2 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; letter-spacing: -0.025em; margin-bottom: 16px; }
.final-cta p { color: var(--muted); max-width: 460px; margin: 0 auto 32px; }

/* ─────────────────────────── FOOTER ─────────────────────────── */
.footer { margin-top: auto; border-top: 1px solid var(--border); padding: 56px 0 28px; background: var(--bg-2); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand { max-width: 280px; }
.footer-logo { font-family: var(--display); font-size: 1.2rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-logo .logo-mark { width: 28px; height: 28px; display: block; flex-shrink: 0; }
.footer-logo .logo-mark img { width: 100%; height: 100%; display: block; }
.footer-logo span { color: var(--accent); }
.footer-brand p { color: var(--muted); font-size: 0.86rem; }
.footer-col h4 { font-weight: 600; margin-bottom: 14px; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { color: var(--muted); font-size: 0.88rem; }
.footer-col ul li a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.footer-bottom p { color: var(--faint); font-size: 0.8rem; }

/* ─────────────────────────── APP / AUTH / DASHBOARD ─────────────────────────── */
.app-main { padding: 44px 0 64px; flex: 1; }

.auth-card {
    max-width: 420px; margin: 24px auto;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 38px;
}
.auth-card h1 { font-family: var(--display); font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 0.92rem; margin-bottom: 26px; }
.auth-card .form { margin-bottom: 20px; }
.auth-alt { text-align: center; color: var(--muted); font-size: 0.88rem; }

.dash-head, .report-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 32px; flex-wrap: wrap; }
.dash-head h1, .report-head h1 { font-family: var(--display); font-size: 1.8rem; font-weight: 700; }

.empty-state { text-align: center; padding: 50px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 16px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.empty-icon svg { width: 32px; height: 32px; }
.empty-state h3 { font-family: var(--display); font-size: 1.25rem; margin-bottom: 8px; }
.empty-state p { color: var(--muted); margin-bottom: 22px; }

.sub-list { display: flex; flex-direction: column; gap: 14px; }
.sub-card {
    display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px;
    transition: border-color var(--t);
}
.sub-card:hover { border-color: var(--border-2); }
.sub-title { display: flex; align-items: center; gap: 12px; margin-bottom: 5px; }
.sub-title strong { font-family: var(--display); font-size: 1.05rem; }
.sub-meta { color: var(--muted); font-size: 0.84rem; }
.sub-right { display: flex; align-items: center; gap: 18px; }
.mini-score { text-align: center; }
.mini-num { font-family: var(--display); font-size: 1.5rem; font-weight: 700; color: var(--accent); display: block; line-height: 1; }
.mini-lbl { font-size: 0.7rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

.back-link { display: inline-block; color: var(--muted); font-size: 0.88rem; margin-bottom: 18px; }
.report-ring { width: 88px; height: 88px; }
.report-ring b { font-size: 1.5rem; }
.report-summary { display: flex; gap: 14px; margin-bottom: 28px; }
.sum-stat { flex: 1; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; text-align: center; }
.sum-num { font-family: var(--display); font-size: 2rem; font-weight: 700; display: block; line-height: 1; }
.sum-lbl { color: var(--muted); font-size: 0.82rem; }

.report-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 720px; }
.report-table th { text-align: left; padding: 14px 18px; color: var(--faint); font-weight: 600; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.report-table td { padding: 16px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.report-table tr:last-child td { border-bottom: none; }
.report-table td strong { font-family: var(--display); display: block; }
.report-table td small { display: block; color: var(--faint); font-size: 0.76rem; margin-top: 2px; }
.report-table .note { color: var(--muted); }
.alts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.alt-chip { font-size: 0.72rem; padding: 3px 9px; border-radius: 50px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); }

@media (max-width: 540px) {
    .report-summary { flex-direction: column; }
}

/* ─────────────────────────── INSTANT RESULT / PREVIEW ─────────────────────────── */
.result-wrap { max-width: 900px; margin: 0 auto; }
.result-head { text-align: center; margin-bottom: 40px; }
.result-head h1 { font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin: 6px 0; }

.result-loading { text-align: center; padding: 56px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.result-loading h3 { font-family: var(--display); font-size: 1.3rem; margin-bottom: 10px; }
.result-loading p { color: var(--muted); max-width: 440px; margin: 0 auto; }
.spinner {
    width: 54px; height: 54px; margin: 0 auto 24px; border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--accent);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.checks-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 24px; }
.check {
    display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 12px 14px; font-size: 0.84rem; font-weight: 500; color: var(--muted);
}
.check-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: var(--grad-soft); color: var(--accent); display: grid; place-items: center; }
.check-ic svg { width: 17px; height: 17px; }
@media (max-width: 620px) { .checks-strip { grid-template-columns: 1fr 1fr; } }

.result-table-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 32px 0 14px; flex-wrap: wrap; }
.result-table-head h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 600; }
.result-badge { font-size: 0.8rem; font-weight: 600; color: var(--accent); background: var(--grad-soft); border: 1px solid var(--border); padding: 5px 12px; border-radius: 50px; }
.result-badge:empty { display: none; }

.result-cta {
    margin-top: 28px; padding: 28px 32px; border-radius: var(--radius);
    background: linear-gradient(150deg, rgba(56,189,248,0.12), rgba(129,140,248,0.06));
    border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.result-cta h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; }
.result-cta p { color: var(--muted); font-size: 0.92rem; max-width: 460px; }
.result-cta-actions { display: flex; flex-direction: column; gap: 10px; flex-shrink: 0; }
@media (max-width: 620px) { .result-cta-actions { width: 100%; } .result-cta-actions .btn { width: 100%; } }

.result-actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
@media (max-width: 480px) { .result-actions { flex-direction: column; } .result-actions .btn { width: 100%; } }

/* Unlock-the-full-report card on the instant-result page */
.unlock-card {
    margin-top: 34px; padding: 26px 28px; border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(52,211,153,0.08));
    border: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
}
.unlock-text h3 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 6px; }
.unlock-text p { color: var(--muted); font-size: 0.92rem; max-width: 560px; margin: 0; }
.unlock-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) {
    .unlock-card { flex-direction: column; align-items: stretch; text-align: left; }
    .unlock-actions { width: 100%; }
    .unlock-actions .btn { flex: 1; justify-content: center; }
}

/* Two-step "get your full report" block on the home page */
.report-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; margin: 0 auto; }
.report-step {
    position: relative; padding: 30px 26px 28px; border-radius: var(--radius);
    background: var(--card-bg); border: 1px solid var(--border);
}
.report-step .rs-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px;
    background: var(--accent); color: #06121f; font-family: var(--display); font-weight: 700;
}
.report-step h3 { font-family: var(--display); font-size: 1.18rem; margin: 0 0 8px; }
.report-step p { color: var(--muted); font-size: 0.9rem; margin: 0 0 18px; }
.rs-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 640px) {
    .report-steps { grid-template-columns: 1fr; }
    .rs-actions { flex-direction: column; }
    .rs-actions .btn, .report-step > .btn { width: 100%; justify-content: center; }
}

/* ─────────────────────────── EDITABLE ROWS / PAGER ─────────────────────────── */
.xref-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.xref-head, .xref-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.xref-head { color: var(--faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); }
.xref-row:last-child { border-bottom: none; }
.xref-row .form-control { padding: 8px 10px; font-size: 0.85rem; }
.xref-actions { display: flex; gap: 6px; }
.xref-actions .btn { padding: 7px 12px; font-size: 0.8rem; }
.btn-danger { background: rgba(251,113,133,0.12); color: var(--risk); border: 1px solid rgba(251,113,133,0.3); }
.btn-danger:hover { background: rgba(251,113,133,0.2); color: var(--risk); }
.xref-add { background: var(--surface-2); }
@media (max-width: 620px) {
    .xref-head { display: none; }
    .xref-row { grid-template-columns: 1fr; gap: 6px; }
}

/* Detailed editable part cards */
.xref-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.xref-card.add { background: var(--surface-2); border-style: dashed; }
.xref-card .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.xref-card .fg { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.xref-card label { font-size: 0.72rem; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.xref-card .form-control { padding: 8px 11px; font-size: 0.88rem; }
.xref-card-actions { display: flex; gap: 8px; }
@media (max-width: 600px) { .xref-card .g2 { grid-template-columns: 1fr; } }

/* Toolbar above the catalog table */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .actions .btn { padding: 9px 16px; }
.inline-upload { display: flex; gap: 8px; align-items: center; }
.inline-upload .form-control { padding: 7px 10px; font-size: 0.85rem; }
.table-actions .btn { padding: 6px 12px; font-size: 0.8rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(3,6,12,0.7); backdrop-filter: blur(5px); display: none; align-items: flex-start; justify-content: center; z-index: 200; padding: 6vh 16px; overflow-y: auto; }
.modal-overlay.open { display: flex; }
.modal { background: var(--bg-2); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 520px; box-shadow: 0 30px 80px rgba(0,0,0,0.6); }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.modal-head h3 { font-family: var(--display); font-size: 1.25rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--muted); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.modal-close:hover { color: var(--text); }
.modal .g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .fg { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.modal label { font-size: 0.78rem; color: var(--muted); font-weight: 500; }
@media (max-width: 480px) { .modal .g2 { grid-template-columns: 1fr; } }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 18px; }
.pager .btn { padding: 8px 16px; }
.pager .muted { color: var(--faint); font-size: 0.85rem; }

/* ─────────────────────────── ANIMATIONS ─────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

.hero .pill,
.hero h1,
.hero-sub,
.hero .btn-group,
.hero-stats,
.hero-visual { animation: fadeUp .8s var(--ease) both; }
.hero h1        { animation-delay: .08s; }
.hero-sub       { animation-delay: .16s; }
.hero .btn-group{ animation-delay: .24s; }
.hero-stats     { animation-delay: .32s; }
.hero-visual    { animation-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    .hero .pill, .hero h1, .hero-sub, .hero .btn-group, .hero-stats, .hero-visual, .hero-float { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
    html { scroll-behavior: auto; }
}

/* ─────────────────────────── RESPONSIVE ─────────────────────────── */
@media (max-width: 980px) {
    .hero-inner { grid-template-columns: 1fr; gap: 48px; }
    .hero-visual { max-width: 480px; }
    .bento { grid-template-columns: repeat(2, 1fr); }
    .tile.wide { grid-column: span 2; }
    .values { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: span 2; max-width: 100%; }
}

@media (max-width: 760px) {
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
    .process { grid-template-columns: 1fr; gap: 40px; }
    .process::before { display: none; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
        background: rgba(8,12,23,0.97); backdrop-filter: blur(16px);
        padding: 16px; gap: 4px; border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 12px 15px; }
    .nav-toggle { display: block; }
    .bento, .values { grid-template-columns: 1fr; }
    .tile.wide { grid-column: span 1; }
    .form-row { grid-template-columns: 1fr; }
    section { padding: 72px 0; }
    .hero { padding: 64px 0 60px; }
    .final-cta .cta-inner { padding: 52px 22px; }
}

/* Small phones (down to 320px) */
/* ── App-shell + dashboard pages: phones down to 320px ── */
@media (max-width: 600px) {
    .dash-head, .report-head { flex-direction: column; align-items: stretch; gap: 14px; margin-bottom: 22px; }
    .dash-head h1, .report-head h1 { font-size: 1.5rem; }
    .dash-head > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
    .dash-head > div:last-child .btn { flex: 1 1 auto; justify-content: center; }
    .stat-row { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px 16px; }
    .stat-card .sc-num { font-size: 1.55rem; }
    .sub-card { flex-direction: column; align-items: stretch; gap: 12px; }
    .sub-right { justify-content: space-between; gap: 10px; }
    .topbar-title { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bom-grid { min-width: 480px; } /* scrolls within its wrap rather than crushing inputs */
}
@media (max-width: 380px) {
    .stat-row { grid-template-columns: 1fr; }
    .shell-body { padding: 14px; }
    .topbar { padding: 11px 12px; gap: 10px; }
    .topbar-actions .btn { padding: 7px 10px; font-size: 0.76rem; }
    .report-paper { padding: 12px; }
    .dash-head h1, .report-head h1 { font-size: 1.35rem; }
}

@media (max-width: 400px) {
    .container { padding: 0 16px; }

    .hero { padding: 52px 0 52px; }
    .hero h1 { font-size: 2.05rem; }
    .hero-sub { font-size: 0.95rem; }
    .hero-stats { gap: 14px 20px; }
    .hero-stat .num { font-size: 1.4rem; }
    .hero-stat .num svg { width: 17px; height: 17px; }

    /* Dashboard mockup */
    .dash-body { padding: 14px; }
    .dash-score { gap: 14px; }
    .ring { width: 62px; height: 62px; }
    .ring b { font-size: 1.05rem; }
    .dash-row { padding: 10px; gap: 8px; }
    .hero-float { left: 0; right: 0; margin-inline: auto; width: fit-content; max-width: calc(100% - 8px); bottom: 12px; padding: 10px 13px; }

    /* Type + spacing */
    .pill { font-size: 0.72rem; padding: 5px 12px 5px 7px; }
    .section-title { font-size: 1.55rem; }
    .section-desc { font-size: 0.96rem; }
    .nav-logo { font-size: 1.2rem; }

    /* Cards / panels breathe less on tiny screens */
    .tile, .value-card, .form-wrap, .auth-card, .contact-info, .pricing-card { padding: 22px 18px; }
    .final-cta .cta-inner { padding: 40px 16px; border-radius: 20px; }
    .dropzone { padding: 22px 16px; }

    /* Result / report */
    .report-head { gap: 14px; }
    .sum-num { font-size: 1.7rem; }
    .checks-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
    .report-table { font-size: 0.82rem; }
    .report-table th, .report-table td { padding: 12px 12px; }
}

/* ───── Journey rail (OEM overview flow guide) ───── */
.flow-rail{display:flex;align-items:stretch;gap:8px;margin:0 0 22px;flex-wrap:wrap;}
.flow-step{flex:1;min-width:200px;display:flex;align-items:center;gap:12px;text-decoration:none;
    background:var(--card,#0f1722);border:1px solid var(--border,#1e2a3a);border-radius:var(--radius,12px);
    padding:14px 16px;transition:.16s;}
.flow-step:hover{border-color:var(--accent);transform:translateY(-2px);}
.flow-num{flex:none;width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    font-weight:800;font-size:.95rem;color:#0b121b;background:var(--accent);}
.flow-body{display:flex;flex-direction:column;gap:2px;}
.flow-t{color:#e2e8f0;font-weight:600;font-size:.92rem;}
.flow-d{color:var(--muted);font-size:.76rem;line-height:1.25;}
.flow-arrow{display:flex;align-items:center;color:var(--muted);font-size:1.25rem;}
@media(max-width:680px){.flow-arrow{display:none;}.flow-step{min-width:100%;}}

/* ───── Preview top unlock bar (login visible without scrolling) ───── */
.unlock-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:space-between;
    margin:18px 0 6px;padding:14px 18px;border:1px solid color-mix(in srgb,var(--accent) 40%,transparent);
    border-radius:var(--radius,12px);background:linear-gradient(120deg,color-mix(in srgb,var(--accent) 12%,transparent),transparent);}
.unlock-bar-text{font-size:.92rem;color:var(--text,#e2e8f0);font-weight:500;flex:1;min-width:220px;}
.unlock-bar-actions{display:flex;gap:10px;flex-wrap:wrap;}
@media(max-width:560px){.unlock-bar-actions{width:100%;}.unlock-bar-actions .btn{flex:1;text-align:center;}}

/* ───── Report per-row request/cancel ───── */
.rec-action{display:flex;align-items:center;gap:8px;margin-top:7px;flex-wrap:wrap;}
.btn-req{padding:5px 14px;font-size:.8rem;border-radius:8px;line-height:1.2;}
.link-cancel{background:none;border:none;color:var(--muted,#94a3b8);font-size:.8rem;cursor:pointer;
    text-decoration:underline;padding:2px 4px;font-family:inherit;}
.link-cancel:hover{color:#f87171;}

/* ───── Uniform status pill (Open · Requested · Closed) — used everywhere ───── */
.status-pill{display:inline-flex;align-items:center;gap:6px;padding:3px 11px;border-radius:999px;
    font-size:.74rem;font-weight:600;color:var(--c);white-space:nowrap;
    background:color-mix(in srgb,var(--c) 15%,transparent);border:1px solid color-mix(in srgb,var(--c) 32%,transparent);}
.status-pill::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--c);}
