/* ============================================================
   Noukha Employee Bias Checker - Production UI
   Shares the Noukha platform design language (Poppins / #4D4DFF)
   ============================================================ */

:root {
    --primary: #4D4DFF;
    --primary-2: #7C3AED;
    --primary-hover: #3d3de6;
    --primary-light: #B5B5FF;
    --primary-bg: rgba(77, 77, 255, 0.06);
    --primary-ring: rgba(77, 77, 255, 0.12);
    --ink: #0b1020;
    --ink-2: #131a33;
    --bg: #f6f7fb;
    --bg-white: #ffffff;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e6e9f2;
    --border-hover: #cbd5e1;
    --green: #10b981;
    --green-bg: rgba(16,185,129,0.08);
    --red: #ef4444;
    --red-bg: rgba(239,68,68,0.06);
    --amber: #f59e0b;
    --amber-bg: rgba(245,158,11,0.10);
    --radius: 10px;
    --radius-sm: 7px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --shadow-xs: 0 1px 2px rgba(16,24,40,.05);
    --shadow: 0 4px 14px -6px rgba(16,24,40,.12), 0 2px 6px -3px rgba(16,24,40,.06);
    --shadow-md: 0 10px 26px -10px rgba(16,24,40,.18), 0 4px 10px -6px rgba(16,24,40,.10);
    --shadow-lg: 0 24px 48px -14px rgba(16,24,40,.24);
    --grad: linear-gradient(135deg, #4D4DFF 0%, #7C3AED 100%);
    --t: 0.22s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
::selection { background: rgba(77,77,255,.2); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ===================== TOP NAV ===================== */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.85); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--border); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 12px 32px; height: 62px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; }
.brand-logo { display: flex; align-items: center; gap: 11px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand-accent { color: var(--primary); margin-left: 1px; }
.brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-link { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--text-secondary); text-decoration: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); transition: all var(--t); }
.topbar-link:hover { color: var(--primary); border-color: var(--primary-light); background: var(--primary-bg); }

.status-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.status-chip--ok { background: var(--green-bg); color: #059669; }
.status-chip--err { background: var(--red-bg); color: var(--red); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(16,185,129,.15); animation: blink 2s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* ===================== HERO BAND ===================== */
.hero-band { position: relative; overflow: hidden; background: radial-gradient(900px 300px at 20% -40%, #eef0ff 0%, transparent 60%), radial-gradient(700px 300px at 90% -30%, #f3ecff 0%, transparent 55%), var(--bg); border-bottom: 1px solid var(--border); }
.hero-aurora { position: absolute; inset: 0; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .35; }
.blob-1 { width: 300px; height: 300px; background: #a5b4fc; top: -140px; left: 8%; }
.blob-2 { width: 260px; height: 260px; background: #d8b4fe; top: -120px; right: 12%; }
.hero-band-inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 34px 32px 30px; text-align: center; }
.hero-eyebrow { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--primary); background: var(--primary-bg); border: 1px solid var(--primary-ring); padding: 5px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero-title { font-size: clamp(24px, 4vw, 38px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-sub { max-width: 620px; margin: 14px auto 0; font-size: 14.5px; color: var(--text-secondary); line-height: 1.65; }

/* ===================== CONTAINER / STEPS ===================== */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 32px; flex: 1; display: flex; flex-direction: column; }
.steps { display: flex; align-items: center; justify-content: center; padding: 26px 0 20px; flex-shrink: 0; }
.step { display: flex; align-items: center; gap: 9px; opacity: 0.4; transition: opacity var(--t); }
.step.active { opacity: 1; }
.step.done { opacity: 0.75; }
.step-num { width: 30px; height: 30px; border-radius: 50%; background: var(--bg-white); border: 1px solid var(--border); color: var(--text-secondary); font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; transition: all var(--t); }
.step.active .step-num { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -4px rgba(77,77,255,.5); }
.step.done .step-num { background: var(--green); border-color: transparent; color: #fff; }
.step-label { font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.step.active .step-label { color: var(--text); font-weight: 600; }
.step-line { width: 64px; height: 2px; background: var(--border); margin: 0 14px; border-radius: 2px; transition: background var(--t); }
.step-line.done { background: var(--green); }

/* ===================== SECTION / GRID / CARDS ===================== */
.section { padding-bottom: 40px; animation: fadeUp 0.4s ease; flex: 1; display: flex; flex-direction: column; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.section-grid { display: grid; grid-template-columns: 4fr 6fr; gap: 22px; align-items: stretch; flex: 1; }
.card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); transition: border-color var(--t), box-shadow var(--t); display: flex; flex-direction: column; }
.card:hover { box-shadow: var(--shadow-md); }
.card-section { padding: 22px 24px; }
.card-divider { height: 1px; background: var(--border); }
.card-label { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 10px; letter-spacing: -.01em; }
.hint { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.label-row { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.info-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--border); color: var(--text-secondary); font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; cursor: help; font-style: italic; }

/* ===================== SAMPLE LIST ===================== */
.sample-list { display: flex; flex-direction: column; gap: 10px; }
.sample-item { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; transition: all var(--t); background: var(--bg-white); position: relative; overflow: hidden; }
.sample-item::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: 0; transition: opacity var(--t); }
.sample-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-1px); }
.sample-item.selected { border-color: transparent; background: var(--primary-bg); box-shadow: 0 0 0 2px var(--primary-ring); }
.sample-item.selected::before { opacity: 1; }
.sample-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 14px -6px rgba(77,77,255,.6); }
.sample-icon svg { width: 18px; height: 18px; }
.sample-info { flex: 1; min-width: 0; }
.sample-title { font-size: 13px; font-weight: 600; color: var(--text); }
.sample-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.sample-tag { font-size: 10px; font-weight: 700; padding: 3px 9px; border-radius: 999px; flex-shrink: 0; text-transform: uppercase; letter-spacing: .03em; }
.tag-high { background: var(--red-bg); color: var(--red); }
.tag-critical { background: #fee2e2; color: #b91c1c; }
.tag-low { background: var(--green-bg); color: #059669; }

/* ===================== SEGMENTED ===================== */
.seg { display: inline-flex; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 4px; gap: 4px; }
.seg-btn { border: none; background: none; padding: 7px 18px; border-radius: 7px; font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 500; color: var(--text-secondary); cursor: pointer; transition: all var(--t); }
.seg-btn:hover { color: var(--primary); }
.seg-btn.active { background: var(--bg-white); color: var(--primary); font-weight: 600; box-shadow: var(--shadow-xs); }

/* ===================== REVIEW EDITOR ===================== */
.card--upload { display: flex; flex-direction: column; }
.review-editor { flex: 1; display: flex; flex-direction: column; }
.editor-meta { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 13px; margin-bottom: 18px; }
.meta-field { display: flex; flex-direction: column; gap: 5px; }
.meta-field label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.meta-field input { padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-family: 'Poppins', sans-serif; font-size: 12.5px; color: var(--text); transition: border-color var(--t), box-shadow var(--t); }
.meta-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--bg-white); }
.editor-label { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 7px; }

.textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 13.5px; font-family: 'Poppins', sans-serif; line-height: 1.75; resize: vertical; transition: border-color var(--t), box-shadow var(--t); }
.textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--bg-white); }
.textarea::placeholder { color: var(--text-muted); }
.textarea--tall { flex: 1; min-height: 190px; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ===================== BUTTONS ===================== */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border: none; border-radius: var(--radius); font-weight: 600; font-size: 13.5px; cursor: pointer; font-family: 'Poppins', sans-serif; white-space: nowrap; transition: all var(--t); line-height: 1.4; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(77,77,255,.6); }
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(77,77,255,.7); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: var(--bg-white); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); border-color: var(--border-hover); }
.btn-ghost { background: rgba(255,255,255,0.16); color: #fff; border: 1px solid rgba(255,255,255,0.32); backdrop-filter: blur(6px); }
.btn-ghost:hover { background: rgba(255,255,255,0.26); }

/* ===================== PROCESSING ===================== */
.card--processing { padding: 48px 40px; flex: 1; display: flex; align-items: center; justify-content: center; }
.proc-grid { display: flex; align-items: flex-start; gap: 52px; justify-content: center; flex-wrap: wrap; }
.proc-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 16px; flex-shrink: 0; }
.proc-ring { position: relative; width: 140px; height: 140px; }
.proc-ring svg { display: block; }
.proc-ring-pct { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.proc-ring-label { font-size: 13.5px; font-weight: 600; color: var(--text); text-align: center; }
.proc-pipeline { min-width: 300px; max-width: 380px; }
.proc-pipeline-head { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.proc-pipeline-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--grad); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 6px 14px -6px rgba(77,77,255,.6); }
.proc-pipeline-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.proc-pipeline-sub { font-size: 11.5px; color: var(--text-muted); font-weight: 500; }
.proc-steps { display: flex; flex-direction: column; }
.proc-step { display: flex; align-items: flex-start; gap: 13px; position: relative; padding: 10px 0; }
.proc-step:not(:last-child)::after { content: ''; position: absolute; left: 10px; top: 32px; width: 2px; height: calc(100% - 14px); background: var(--border); transition: background .3s ease; }
.proc-step.done:not(:last-child)::after { background: var(--green); }
.proc-step-dot { width: 21px; height: 21px; border-radius: 50%; border: 2px solid var(--border); background: var(--bg-white); display: flex; align-items: center; justify-content: center; flex-shrink: 0; position: relative; z-index: 1; transition: all .3s ease; }
.proc-step.active .proc-step-dot { border-color: var(--primary); background: var(--primary-bg); }
.proc-step.active .proc-step-dot::after { content: ''; width: 8px; height: 8px; border: 1.5px solid transparent; border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.proc-step.done .proc-step-dot { border-color: var(--green); background: var(--green); }
.proc-step.done .proc-step-dot svg { display: block; }
.proc-step:not(.done) .proc-step-dot svg { display: none; }
.proc-step-info { flex: 1; min-width: 0; padding-top: 1px; }
.proc-step-label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); transition: color .3s ease; }
.proc-step.active .proc-step-label { color: var(--text); font-weight: 600; }
.proc-step.done .proc-step-label { color: var(--text-secondary); }
.proc-step-tag { display: inline-block; margin-top: 2px; padding: 2px 7px; border-radius: 5px; font-size: 10px; font-weight: 600; background: var(--bg); color: var(--text-muted); transition: all .3s ease; }
.proc-step.active .proc-step-tag { background: var(--primary-bg); color: var(--primary); }
.proc-step.done .proc-step-tag { background: var(--green-bg); color: var(--green); }

/* ===================== VERDICT BANNER ===================== */
.verdict { position: relative; display: flex; align-items: center; gap: 26px; padding: 28px 30px; border-radius: var(--radius-xl); margin-bottom: 22px; color: #fff; box-shadow: var(--shadow-md); flex-wrap: wrap; overflow: hidden; }
.verdict::after { content: ''; position: absolute; inset: 0; background: radial-gradient(600px 200px at 100% 0%, rgba(255,255,255,.18), transparent 60%); pointer-events: none; }
.verdict.v-high { background: linear-gradient(135deg, #f43f5e, #dc2626); }
.verdict.v-medium { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.verdict.v-low { background: linear-gradient(135deg, #10b981, #059669); }
.verdict-gauge { position: relative; width: 104px; height: 104px; flex-shrink: 0; z-index: 1; }
.verdict-gauge svg { width: 100%; height: 100%; display: block; }
.verdict-gauge-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.verdict-gauge-num { font-size: 21px; font-weight: 800; letter-spacing: -.03em; }
.verdict-gauge-lbl { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.85; margin-top: 3px; }
.verdict-main { flex: 1; min-width: 240px; z-index: 1; }
.verdict-icon { display: inline-flex; vertical-align: middle; margin-right: 9px; }
.verdict-headline { font-size: 22px; font-weight: 800; letter-spacing: -.02em; display: flex; align-items: center; gap: 10px; }
.verdict-sub { font-size: 13.5px; opacity: 0.95; margin-top: 8px; line-height: 1.6; max-width: 660px; }
.verdict-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.verdict-chip { background: rgba(255,255,255,0.22); border: 1px solid rgba(255,255,255,0.3); padding: 5px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.verdict-actions { display: flex; flex-direction: column; gap: 9px; flex-shrink: 0; z-index: 1; }

/* ===================== OVERVIEW STAT STRIP ===================== */
.overview { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 22px; }
.overview:empty { display: none; }
.ov-tile { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 18px; box-shadow: var(--shadow-xs); transition: transform var(--t), box-shadow var(--t); position: relative; overflow: hidden; }
.ov-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); opacity: .0; transition: opacity var(--t); }
.ov-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ov-tile:hover::before { opacity: 1; }
.ov-val { font-size: 26px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.ov-lbl { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 5px; letter-spacing: .01em; }

/* ===================== RECOMMEND PANEL ===================== */
.recommend { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); padding: 24px 26px; margin-top: 24px; }
.recommend:empty { display: none; }
.rec-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.rec-head-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--grad); display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 8px 18px -8px rgba(77,77,255,.6); }
.recommend--ok .rec-head-icon { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 8px 18px -8px rgba(16,185,129,.6); }
.rec-head-title { font-size: 16px; font-weight: 700; letter-spacing: -.01em; color: var(--text); }
.rec-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.rec-item { display: flex; align-items: flex-start; gap: 13px; font-size: 13.5px; color: var(--text-secondary); line-height: 1.55; }
.rec-num { width: 24px; height: 24px; border-radius: 8px; background: var(--primary-bg); color: var(--primary); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.recommend--ok .rec-num { background: var(--green-bg); color: #059669; }
.rec-compliance { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 14px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); }
.rec-comp-title { font-size: 12px; font-weight: 700; color: #b91c1c; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.rec-comp-text { font-size: 12.5px; color: #7f1d1d; line-height: 1.5; }

/* ===================== PANEL (annotated) ===================== */
.panel { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); margin-bottom: 22px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-title { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.panel-hint { font-size: 12px; color: var(--text-muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 13px 26px; background: var(--bg); border-bottom: 1px solid var(--border); }
.legend:empty { display: none; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.legend-swatch { width: 14px; height: 14px; border-radius: 4px; }
.annotated { padding: 26px 30px; font-size: 15.5px; line-height: 2.15; color: var(--text); }

/* Inline highlight + hover popover */
.hl { position: relative; border-radius: 4px; padding: 1px 4px; cursor: help; font-weight: 500; transition: filter var(--t); }
.hl:hover { filter: brightness(0.95); }
.hl-pop { position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 290px; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 13px 15px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease; z-index: 30; text-align: left; font-weight: 400; pointer-events: none; }
.hl-pop::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.hl:hover .hl-pop { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(-2px); }
.hl-pop-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; opacity: 0.75; margin-bottom: 5px; }
.hl-pop-why { font-size: 12px; line-height: 1.5; color: #e2e8f0; }
.hl-pop-fix { font-size: 12px; margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,0.15); color: #86efac; line-height: 1.5; }
.hl-pop-fix b { color: #bbf7d0; }

/* ===================== FINDINGS ===================== */
.findings-head { font-size: 16px; font-weight: 700; color: var(--text); margin: 6px 0 16px; letter-spacing: -.01em; }
.findings-head:empty { display: none; }
.results-list { display: flex; flex-direction: column; gap: 16px; }
.finding-card { background: var(--bg-white); border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-xs); transition: box-shadow var(--t), transform var(--t); animation: fadeUp .4s ease both; }
.finding-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.finding-header { display: flex; align-items: center; gap: 13px; padding: 15px 22px; background: linear-gradient(180deg, var(--bg), var(--bg-white)); border-bottom: 1px solid var(--border); }
.finding-idx { width: 26px; height: 26px; border-radius: 8px; color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 10px -4px rgba(16,24,40,.35); }
.finding-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.finding-titlewrap { display: flex; flex-direction: column; line-height: 1.2; }
.finding-title { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.finding-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; margin-top: 1px; }
.sev-badge { padding: 4px 13px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
.sev-Low { background: var(--green-bg); color: #059669; }
.sev-Medium { background: var(--amber-bg); color: #b45309; }
.sev-High { background: var(--red-bg); color: var(--red); }
.sev-Critical { background: #fee2e2; color: #b91c1c; }
.conf { margin-left: auto; display: flex; align-items: center; gap: 9px; font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.conf-bar { width: 64px; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.conf-fill { height: 100%; border-radius: 3px; background: var(--primary); }
.finding-body { padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.f-block-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 9px; }
.f-reason { font-size: 13.5px; color: var(--text-secondary); line-height: 1.65; }
.f-impact { font-size: 12.5px; color: var(--text-secondary); line-height: 1.55; margin-top: 9px; padding: 10px 13px; background: var(--amber-bg); border-radius: var(--radius-sm); border-left: 3px solid var(--amber); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.stat-cell { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat-cell-val { font-size: 17px; font-weight: 800; color: var(--text); }
.stat-cell-lbl { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.rewrite-item { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: stretch; gap: 11px; margin-bottom: 11px; }
.rewrite-side { padding: 11px 13px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.5; }
.rewrite-from { background: var(--red-bg); border: 1px solid #fecaca; color: #b91c1c; }
.rewrite-to { background: var(--green-bg); border: 1px solid #bbf7d0; color: #047857; }
.rewrite-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; display: block; margin-bottom: 4px; }
.rewrite-arrow { display: flex; align-items: center; justify-content: center; color: var(--primary); }

.citations { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.citations li { font-size: 11.5px; color: var(--text-muted); padding-left: 15px; position: relative; line-height: 1.5; }
.citations li::before { content: '\00A7'; position: absolute; left: 0; color: var(--primary-light); font-weight: 700; }

.empty-clean { text-align: center; padding: 48px; background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow); }
.empty-clean svg { margin-bottom: 14px; }
.empty-clean h3 { font-size: 17px; color: var(--text); margin-bottom: 6px; }
.empty-clean p { font-size: 13.5px; color: var(--text-muted); }

/* ===================== FOOTER ===================== */
.footer { margin-top: 40px; background: var(--ink); color: #c7d0e8; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 30px 32px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-left { display: flex; align-items: center; gap: 13px; }
.footer-name { font-weight: 700; color: #fff; font-size: 14.5px; }
.footer-tag { font-size: 12px; color: #8b97b8; margin-top: 2px; }
.footer-copy { font-size: 12px; color: #8b97b8; }

/* ===================== TOAST ===================== */
.toast-container { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { padding: 12px 22px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); background: var(--ink-2); color: #fff; border: 1px solid rgba(255,255,255,.1); animation: toastIn 0.3s ease; }
.toast--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.toast--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1000px) {
    .overview { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .section-grid { grid-template-columns: 1fr; }
    .editor-meta { grid-template-columns: 1fr 1fr; }
    .proc-grid { flex-direction: column; text-align: center; align-items: center; }
    .verdict { flex-direction: column; align-items: flex-start; }
    .verdict-actions { flex-direction: row; width: 100%; }
    .verdict-actions .btn { flex: 1; justify-content: center; }
    .rewrite-item { grid-template-columns: 1fr; }
    .rewrite-arrow { transform: rotate(90deg); height: 20px; }
}
@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .topbar-inner { padding: 10px 16px; }
    .hero-band-inner { padding: 26px 16px 24px; }
    .topbar-link span, .brand-sub { display: none; }
    .step-label { display: none; }
    .step-line { width: 36px; margin: 0 10px; }
    .overview { grid-template-columns: repeat(2, 1fr); }
    .card-section { padding: 18px; }
    .editor-meta { grid-template-columns: 1fr; }
    .footer-inner { padding: 26px 16px; flex-direction: column; text-align: center; }
    .hl-pop { width: 220px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) { .blob, .card, .finding-card { animation: none !important; } }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   ATTRITION ENGINE — tool-specific additions
   (reuses .topbar/.hero-band/.card/.btn/.seg/.verdict/.toast tokens)
   ============================================================ */

/* Section wrappers */
.section { animation: fadeUp 0.4s ease; padding-top: 28px; padding-bottom: 34px; }
.sec-head { margin-bottom: 20px; }
.sec-head-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
.sec-head-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }

/* Model-not-loaded notice */
.model-notice { display: flex; align-items: flex-start; gap: 14px; margin-top: 26px; padding: 16px 20px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.model-notice-icon { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, #f59e0b, #ea580c); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.model-notice-title { font-size: 13.5px; font-weight: 700; color: #b45309; }
.model-notice-text { font-size: 12.5px; color: #92400e; line-height: 1.55; margin-top: 3px; }

/* ---- Risk summary tiles + distribution ---- */
.risk-summary { display: grid; grid-template-columns: 1.4fr 2fr; gap: 18px; margin-bottom: 22px; align-items: stretch; }
.risk-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.risk-tile { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px; box-shadow: var(--shadow-xs); position: relative; overflow: hidden; transition: transform var(--t), box-shadow var(--t); }
.risk-tile::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.risk-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.risk-tile--high::before { background: var(--red); }
.risk-tile--medium::before { background: var(--amber); }
.risk-tile--low::before { background: var(--green); }
.risk-tile-val { font-size: 30px; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; }
.risk-tile--high .risk-tile-val { color: var(--red); }
.risk-tile--medium .risk-tile-val { color: var(--amber); }
.risk-tile--low .risk-tile-val { color: var(--green); }
.risk-tile-lbl { font-size: 11.5px; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

.risk-dist { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow-xs); display: flex; flex-direction: column; justify-content: center; }
.risk-dist-label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 12px; }
.risk-dist-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--bg); border: 1px solid var(--border); }
.rd-seg { height: 100%; transition: width .6s ease; }
.rd-seg.rd-high { background: var(--red); }
.rd-seg.rd-medium { background: var(--amber); }
.rd-seg.rd-low { background: var(--green); }
.risk-dist-legend { display: flex; gap: 20px; margin-top: 14px; flex-wrap: wrap; }
.rd-key { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.rd-dot { width: 11px; height: 11px; border-radius: 4px; display: inline-block; }
.rd-dot.rd-high { background: var(--red); }
.rd-dot.rd-medium { background: var(--amber); }
.rd-dot.rd-low { background: var(--green); }

/* ---- Employee table ---- */
.table-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-search { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text-muted); transition: border-color var(--t), box-shadow var(--t); }
.table-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--bg-white); color: var(--primary); }
.table-search input { border: none; background: none; outline: none; font-family: 'Poppins', sans-serif; font-size: 12.5px; color: var(--text); width: 170px; }
.table-search input::placeholder { color: var(--text-muted); }

.table-wrap { overflow-x: auto; }
.emp-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.emp-table thead th { text-align: left; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); padding: 13px 20px; border-bottom: 1px solid var(--border); background: var(--bg); white-space: nowrap; }
.emp-table th.num { text-align: right; }
.emp-table th.sortable { cursor: pointer; user-select: none; transition: color var(--t); }
.emp-table th.sortable:hover { color: var(--primary); }
.emp-table th.sortable::after { content: '\2195'; margin-left: 6px; opacity: .35; font-size: 11px; }
.emp-table th.sorted.asc::after { content: '\2191'; opacity: 1; color: var(--primary); }
.emp-table th.sorted.desc::after { content: '\2193'; opacity: 1; color: var(--primary); }
.emp-table tbody tr { border-bottom: 1px solid var(--border); cursor: pointer; transition: background var(--t); }
.emp-table tbody tr:last-child { border-bottom: none; }
.emp-table tbody tr:hover { background: var(--primary-bg); }
.emp-table tbody tr.selected { background: var(--primary-bg); box-shadow: inset 3px 0 0 var(--primary); }
.emp-table td { padding: 13px 20px; color: var(--text-secondary); vertical-align: middle; }
.emp-table td.num { text-align: right; }
.cell-name { font-weight: 600; color: var(--text); }
.cell-muted { color: var(--text-muted); }
.cell-pct { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.table-empty { padding: 40px; text-align: center; font-size: 13px; color: var(--text-muted); }

.tier-badge { display: inline-flex; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tier-High { background: var(--red-bg); color: var(--red); }
.tier-Medium { background: var(--amber-bg); color: #b45309; }
.tier-Low { background: var(--green-bg); color: #059669; }

/* ---- Predictor layout ---- */
.predictor-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 22px; align-items: start; }
.card--form, .card--results { display: flex; flex-direction: column; }
.form-emp-head { padding: 12px 15px; border: 1px solid var(--primary-ring); background: var(--primary-bg); border-radius: var(--radius); margin-bottom: 18px; }
.form-emp-name { font-size: 14px; font-weight: 700; color: var(--text); }
.form-emp-meta { font-size: 11.5px; color: var(--text-secondary); margin-top: 2px; }

.signals-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 16px; }
.signal-field { display: flex; flex-direction: column; gap: 7px; }
.signal-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.signal-label-row label { font-size: 11.5px; font-weight: 600; color: var(--text-secondary); }
.signal-hint { font-size: 10px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.signal-input-row { display: flex; align-items: center; gap: 10px; }
.signal-range { flex: 1; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 999px; background: linear-gradient(90deg, var(--primary-light), var(--primary)); outline: none; cursor: pointer; }
.signal-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); box-shadow: var(--shadow-xs); cursor: pointer; transition: transform var(--t); }
.signal-range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.signal-range::-moz-range-thumb { width: 15px; height: 15px; border-radius: 50%; background: #fff; border: 2px solid var(--primary); cursor: pointer; }
.signal-num { width: 62px; padding: 7px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); font-family: 'Poppins', sans-serif; font-size: 12px; color: var(--text); text-align: center; transition: border-color var(--t), box-shadow var(--t); }
.signal-num:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); background: var(--bg-white); }
.signal-num::placeholder { color: var(--text-muted); font-style: italic; }
.editor-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* button spinner + loading */
.btn.is-loading { opacity: .85; cursor: progress; }
.btn-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; }

/* ---- Results ---- */
.results-placeholder { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.results-placeholder svg { margin-bottom: 14px; }
.results-placeholder h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.results-placeholder p { font-size: 13px; color: var(--text-muted); max-width: 340px; margin: 0 auto; line-height: 1.6; }

/* verdict is defined in shared css; add local spacing + meta strip */
.predict-results .verdict { margin-bottom: 20px; }
.verdict-meta { display: flex; gap: 22px; margin-top: 14px; flex-wrap: wrap; }
.vm-item { display: flex; flex-direction: column; font-size: 11px; font-weight: 500; opacity: .95; line-height: 1.2; }
.vm-item b { font-size: 16px; font-weight: 800; margin-bottom: 2px; }

/* SHAP waterfall */
.shap-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--bg-white); box-shadow: var(--shadow-xs); margin-bottom: 18px; }
.shap-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shap-title { font-size: 13.5px; font-weight: 700; color: var(--text); letter-spacing: -.01em; }
.shap-legend { display: flex; gap: 16px; }
.shap-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-secondary); }
.shap-dot { width: 10px; height: 10px; border-radius: 3px; }
.shap-dot.shap-up { background: var(--red); }
.shap-dot.shap-down { background: var(--green); }
.shap-list { display: flex; flex-direction: column; gap: 14px; }
.shap-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.shap-name { font-size: 12.5px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.shap-vals { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0; }
.shap-raw { font-size: 11.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.shap-pp { font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shap-up-text { color: var(--red); }
.shap-down-text { color: #059669; }
.shap-track { height: 18px; border-radius: 6px; background: var(--bg); overflow: hidden; }
.shap-bar { height: 100%; border-radius: 6px; min-width: 3px; transition: width .6s ease; }
.shap-bar.shap-up { background: linear-gradient(90deg, #f87171, var(--red)); }
.shap-bar.shap-down { background: linear-gradient(90deg, #34d399, var(--green)); }
/* direction now sits in the row head as a readable pill (never over the bar) */
.shap-dir-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.shap-dir-tag.shap-up { background: var(--red-bg); color: var(--red); }
.shap-dir-tag.shap-down { background: var(--green-bg); color: #059669; }
.sig-tag { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 5px; }
.sig-tag-eng { background: var(--primary-bg); color: var(--primary); }
.sig-tag-imp { background: var(--amber-bg); color: #b45309; }
.shap-empty { font-size: 12.5px; color: var(--text-muted); padding: 12px 0; }

/* chips */
.chip-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.chip-block-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 9px; }
.chip-label-red { color: var(--red); }
.chip-label-green { color: #059669; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.chip-red { background: var(--red-bg); color: var(--red); border: 1px solid #fecaca; }
.chip-green { background: var(--green-bg); color: #047857; border: 1px solid #bbf7d0; }
.chip-muted { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.missing-note { padding-top: 4px; }
.missing-note-label { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 9px; }

/* ---- Attrition responsive ---- */
@media (max-width: 1000px) {
    .risk-summary { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .predictor-grid { grid-template-columns: 1fr; }
    .chip-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .risk-tiles { grid-template-columns: repeat(3, 1fr); }
    .signals-grid { grid-template-columns: 1fr; }
    .table-controls { width: 100%; }
    .table-search input { width: 100%; }
    .verdict-meta { gap: 16px; }
}

/* ============================================================
   ATTRITION ENGINE — enterprise UX refresh (v5)
   grouped form + help tips + plain-language factors + collapsible breakdown
   ============================================================ */

/* Signal form: vertical groups, each a 2-col grid */
.signals-grid { display: flex; flex-direction: column; gap: 18px; }
.sig-group-head { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--primary); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.sig-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.signal-label-row label { display: inline-flex; align-items: center; }

/* Help tooltip ("?") */
.help-tip { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; margin-left: 5px; border-radius: 50%; background: var(--border); color: var(--text-muted); font-size: 9px; font-weight: 800; cursor: help; position: relative; vertical-align: middle; transition: background var(--t), color var(--t); }
.help-tip:hover, .help-tip:focus { background: var(--primary); color: #fff; outline: none; }
.help-tip .tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 208px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 500; line-height: 1.5; letter-spacing: normal; text-transform: none; padding: 9px 11px; border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .15s ease; z-index: 40; pointer-events: none; }
.help-tip .tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); }
.help-tip:hover .tip, .help-tip:focus .tip { opacity: 1; visibility: visible; }

/* Selected-employee header with avatar */
.form-emp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--primary-ring); background: var(--primary-bg); border-radius: var(--radius); margin-bottom: 18px; }
.form-emp-ava { width: 38px; height: 38px; border-radius: 10px; background: var(--grad); color: #fff; font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; letter-spacing: .02em; }
.form-emp-ava--blank { background: var(--border); color: var(--text-muted); font-size: 20px; font-weight: 500; }
.form-emp-info { min-width: 0; }

/* Table row avatar + tier dot */
.cell-name { display: flex; align-items: center; gap: 9px; font-weight: 600; color: var(--text); }
.cell-ava { width: 26px; height: 26px; border-radius: 7px; background: var(--primary-bg); color: var(--primary); font-size: 10px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tier-badge { align-items: center; gap: 6px; }
.tier-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }

/* Verdict recommended-action line */
.verdict-action { display: flex; align-items: baseline; gap: 9px; margin-top: 13px; font-size: 12.5px; line-height: 1.5; opacity: .97; }
.verdict-action-label { font-size: 9.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.32); padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }

/* Plain-language "why" factor cards */
.factors-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; background: var(--bg-white); box-shadow: var(--shadow-xs); margin-bottom: 16px; }
.factors-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.factor-col-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 13px; padding-bottom: 9px; border-bottom: 1px solid var(--border); }
.factor-head-up { color: var(--red); }
.factor-head-down { color: #059669; }
.factor-list { display: flex; flex-direction: column; gap: 12px; }
.factor-item { display: flex; align-items: flex-start; gap: 10px; }
.factor-icon { width: 27px; height: 27px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.factor-up { background: var(--red-bg); color: var(--red); }
.factor-down { background: var(--green-bg); color: #059669; }
.factor-text { min-width: 0; }
.factor-name { font-size: 13px; font-weight: 600; color: var(--text); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.factor-val { font-size: 11.5px; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.factor-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.factor-empty { font-size: 12.5px; color: var(--text-muted); padding: 6px 0; }

/* Collapsible full breakdown */
.breakdown-panel { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-white); box-shadow: var(--shadow-xs); overflow: hidden; }
.breakdown-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: none; border: none; cursor: pointer; font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); transition: background var(--t), color var(--t); }
.breakdown-toggle:hover { background: var(--bg); color: var(--primary); }
.bd-caret { transition: transform .2s ease; flex-shrink: 0; }
.breakdown-toggle.open .bd-caret { transform: rotate(180deg); }
.breakdown-body { padding: 2px 18px 18px; border-top: 1px solid var(--border); }
.breakdown-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 0; }
.bd-note { font-size: 11px; color: var(--text-muted); flex-basis: 100%; line-height: 1.5; }

/* responsive */
@media (max-width: 900px) {
    .factors-grid { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 600px) {
    .sig-group-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Floating Agent Control Bar (AutoDemo)
   ========================================================================== */
#hr-demo-control-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  background: rgba(11, 16, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 12px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(77, 77, 255, 0.2);
  color: #ffffff;
  font-family: 'Poppins', -apple-system, sans-serif;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.hr-demo-bar-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 20px) !important;
}
.hr-demo-bar-content {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}
.hr-demo-left-status {
  display: flex;
  align-items: center;
  gap: 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  padding-right: 16px;
}
.hr-demo-dot-emerald {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 10px #34d399;
  animation: hr-pulse 1.5s infinite;
}
.hr-demo-dot-amber {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}
@keyframes hr-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
.hr-demo-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 800;
  color: #34d399;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.hr-demo-sub-text {
  font-size: 11px;
  font-weight: 500;
  color: #cbd5e1;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.3;
}
.hr-demo-timer-badge {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 6px 14px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.hr-demo-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hr-demo-btn {
  border: none;
  padding: 7px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.hr-demo-btn-secondary {
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.hr-demo-btn-secondary:hover {
  background: rgba(51, 65, 85, 1);
  border-color: rgba(255, 255, 255, 0.3);
}
.hr-demo-btn-danger {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}
.hr-demo-btn-danger:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

