/* ==========================================================================
   DD Scorecard — design system
   ========================================================================== */

:root {
    --bg: #F4F6FA;
    --surface: #FFFFFF;
    --surface-2: #F8F9FC;
    --surface-3: #EEF1F6;
    --border: #E3E7EF;
    --border-strong: #CDD3DF;
    --text: #111827;
    --text-2: #475266;
    --text-3: #7B8599;

    --brand: #0E3A5B;
    --brand-600: #14507E;
    --brand-500: #1D64A0;
    --brand-50: #EAF1F8;
    --brand-100: #D3E3F1;
    --accent: #C8963E;
    --accent-300: #E2B867;
    --accent-50: #FBF4E6;

    --green: #157347; --green-50: #E6F5EC; --green-200: #A9DDBF;
    --amber: #A85F0C; --amber-50: #FDF2E1; --amber-200: #F4CF97;
    --red: #B42F25;   --red-50: #FDEBE9;   --red-200: #F3B5AE;
    --blue: #1F5FBF;  --blue-50: #E9F0FC;  --blue-200: #B4CBF2;
    --slate: #4C5A71; --slate-50: #EDF0F5; --slate-200: #CBD2DE;
    --gray: #6B7280;  --gray-50: #F1F3F6;  --gray-200: #D7DBE2;

    --radius: 14px;
    --radius-sm: 9px;
    --radius-xs: 6px;
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .07), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow: 0 4px 12px -2px rgba(16, 24, 40, .08), 0 2px 4px -2px rgba(16, 24, 40, .04);
    --shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
    --ring: 0 0 0 3px rgba(29, 100, 160, .22);

    --font: "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
    --sidebar-w: 252px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-500); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-3); padding: 1px 6px; border-radius: 5px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

.icon { width: 18px; height: 18px; flex: none; }
.muted { color: var(--text-3); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 20px; } .mt-4 { margin-top: 28px; }

/* ---------- App shell ---------------------------------------------------- */

.app { display: flex; min-height: 100vh; }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 40;
    width: var(--sidebar-w);
    display: flex; flex-direction: column;
    background: linear-gradient(180deg, #0B2C47 0%, #0A2238 100%);
    color: #C9D5E3;
    padding: 18px 14px 14px;
}
.brand {
    display: flex; align-items: center; gap: 11px;
    padding: 6px 8px 20px; color: #fff; text-decoration: none !important;
}
.brand-mark {
    width: 36px; height: 36px; border-radius: 10px; flex: none;
    display: grid; place-items: center;
    background: linear-gradient(135deg, var(--accent-300), var(--accent));
    color: #0B2C47; box-shadow: 0 6px 16px -6px rgba(226, 184, 103, .7);
}
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 3; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15px; letter-spacing: .01em; }
.brand-text small { font-size: 11.5px; color: #8EA3BA; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
    color: #6F86A0; padding: 16px 12px 6px;
}
.nav-label:first-child { padding-top: 4px; }
.nav-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 9px;
    color: #C9D5E3; font-weight: 500; text-decoration: none !important;
    transition: background .15s, color .15s;
}
.nav-link .icon { width: 18px; height: 18px; opacity: .85; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active { background: rgba(255, 255, 255, .11); color: #fff; box-shadow: inset 3px 0 0 var(--accent-300); }
.nav-link.active .icon { color: var(--accent-300); opacity: 1; }

.sidebar-note {
    display: flex; align-items: center; gap: 8px;
    margin: 10px 4px; padding: 9px 12px; border-radius: 9px;
    background: rgba(226, 184, 103, .12); color: var(--accent-300); font-size: 12.5px; font-weight: 600;
}
.sidebar-note .icon { width: 15px; height: 15px; }
.sidebar-user {
    display: flex; align-items: center; gap: 6px;
    border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 12px; margin-top: 8px;
}
.sidebar-user-link { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 6px; border-radius: 9px; color: #fff; text-decoration: none !important; }
.sidebar-user-link:hover { background: rgba(255, 255, 255, .06); }
.sidebar-user-text { display: flex; flex-direction: column; min-width: 0; }
.sidebar-user-text strong { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-text small { font-size: 11.5px; color: #8EA3BA; }
.sidebar .icon-btn { color: #8EA3BA; }
.sidebar .icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); }
.content { max-width: 1280px; margin: 0 auto; padding: 32px 36px 64px; }
.topbar { display: none; }
.sidebar-scrim { display: none; }

/* ---------- Page head ----------------------------------------------------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--text-2); margin-top: 6px; max-width: 760px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-3); margin-bottom: 10px; }
.back-link .icon { width: 15px; height: 15px; }
.back-link:hover { color: var(--brand-500); text-decoration: none; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ---------- Buttons ------------------------------------------------------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 16px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 14px; white-space: nowrap;
    cursor: pointer; text-decoration: none !important;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(14, 58, 91, .3), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #B4842F; }
.btn-success { background: var(--green); color: #fff; }
.btn-success:hover { background: #0F5F3A; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover { background: var(--surface-2); border-color: #B9C1D0; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #9A271F; }
.btn-danger-ghost { background: transparent; color: var(--red); }
.btn-danger-ghost:hover { background: var(--red-50); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn.is-pending { opacity: .62; }
a.step { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.step:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.legend .assign-btn { display: inline-grid; place-items: center; }
.legend .assign-btn .icon { width: 12px; height: 12px; }

.icon-btn {
    display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
    border: 0; border-radius: 8px; background: transparent; color: var(--text-3); cursor: pointer;
    transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--red-50); color: var(--red); }
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn:disabled { opacity: .35; cursor: default; pointer-events: none; }
.inline-form { display: inline; }

/* ---------- Cards --------------------------------------------------------- */

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h2, .card-head h3 { font-size: 16px; font-weight: 650; }
.card-head .sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.card-body { padding: 22px; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.card-flush { overflow: hidden; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.grid-side { grid-template-columns: 360px minmax(0, 1fr); align-items: start; }

/* ---------- KPI tiles ----------------------------------------------------- */

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); overflow: hidden; }
.kpi-label { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.kpi-label .icon { width: 15px; height: 15px; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-value small { font-size: 15px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.kpi-foot { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kpi-accent, transparent); }
.kpi.k-green  { --kpi-accent: var(--green); }  .kpi.k-green .kpi-value { color: var(--green); }
.kpi.k-amber  { --kpi-accent: var(--amber); }  .kpi.k-amber .kpi-value { color: var(--amber); }
.kpi.k-slate  { --kpi-accent: var(--slate); }
.kpi.k-brand  { --kpi-accent: var(--brand); }

/* ---------- Badges, chips, pills ----------------------------------------- */

.badge {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 4px 11px 4px 9px; border-radius: 999px;
    font-size: 12.5px; font-weight: 650; white-space: nowrap; border: 1px solid transparent;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-50); color: var(--green); border-color: var(--green-200); }
.badge-amber { background: var(--amber-50); color: var(--amber); border-color: var(--amber-200); }
.badge-red   { background: var(--red-50);   color: var(--red);   border-color: var(--red-200); }
.badge-slate { background: var(--slate-50); color: var(--slate); border-color: var(--slate-200); }
.badge-gray  { background: var(--gray-50);  color: var(--gray);  border-color: var(--gray-200); }
.badge-blue  { background: var(--blue-50);  color: var(--blue);  border-color: var(--blue-200); }
.badge-lg { font-size: 14px; padding: 7px 15px 7px 12px; }
.badge-lg .dot { width: 8px; height: 8px; }
.rec-detail { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip-gray  { background: var(--gray-50);  color: var(--gray); }
.chip-blue  { background: var(--blue-50);  color: var(--blue); }
.chip-green { background: var(--green-50); color: var(--green); }
.chip-amber { background: var(--amber-50); color: var(--amber); }
.chip-red   { background: var(--red-50);   color: var(--red); }
.chip-brand { background: var(--brand-50); color: var(--brand); }
.chip-accent { background: var(--accent-50); color: #8C6420; }
.chip .icon { width: 13px; height: 13px; }

.code-chip {
    display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 7px;
    border-radius: 6px; font-size: 12px; font-weight: 700; font-family: var(--mono);
    background: var(--brand-50); color: var(--brand);
}
.opt-pill {
    --credit: 0;
    --h: calc(var(--credit) * 1.22);
    display: inline-grid; place-items: center; min-width: 30px; height: 26px; padding: 0 8px;
    border-radius: 7px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
    background: hsl(var(--h) 62% 94%); color: hsl(var(--h) 65% 27%); border: 1px solid hsl(var(--h) 45% 82%);
}
.opt-pill.empty { background: var(--surface-3); color: var(--text-3); border-color: var(--border); font-weight: 500; }

.tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12.5px; font-weight: 500; }

/* ---------- Avatars ------------------------------------------------------- */

.avatar {
    --av: var(--brand);
    display: inline-grid; place-items: center; flex: none;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--av); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
    box-shadow: 0 0 0 2px var(--surface);
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.xl { width: 60px; height: 60px; font-size: 20px; border-radius: 16px; }
.avatar.square { border-radius: 10px; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar + .avatar { margin-left: -8px; }
.avatar-stack .more { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: -8px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); font-size: 10.5px; font-weight: 700; box-shadow: 0 0 0 2px var(--surface); }

.team-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.team-cell strong { display: block; font-weight: 650; color: var(--text); }
.team-cell .sub { font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 300px; }

/* ---------- Progress & score bars ---------------------------------------- */

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-500); transition: width .4s ease; }
.progress.green > span { background: var(--green); }
.progress.thin { height: 5px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }

.scorebar { position: relative; display: flex; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: visible; min-width: 120px; }
.scorebar .seg { height: 100%; }
.scorebar .seg:first-child { border-radius: 99px 0 0 99px; }
.scorebar .seg:last-of-type { border-radius: 0 99px 99px 0; }
.scorebar .seg:only-of-type { border-radius: 99px; }
.scorebar .pass-tick { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--text); opacity: .55; }
.scorebar.lg { height: 14px; }

.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .tick { width: 2px; height: 12px; border-radius: 1px; background: var(--text); opacity: .55; }

.ring {
    --pct: 0; --color: var(--brand);
    position: relative; width: 132px; height: 132px; border-radius: 50%; flex: none;
    background: conic-gradient(var(--color) calc(var(--pct) * 1%), var(--surface-3) 0);
    display: grid; place-items: center;
}
.ring::before { content: ""; position: absolute; inset: 11px; border-radius: 50%; background: var(--surface); }
.ring-inner { position: relative; text-align: center; }
.ring-value { font-size: 30px; font-weight: 750; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.ring.sm { width: 76px; height: 76px; }
.ring.sm::before { inset: 7px; }
.ring.sm .ring-value { font-size: 18px; }
.ring.sm .ring-sub { font-size: 10.5px; margin-top: 2px; }

/* ---------- Tables -------------------------------------------------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th {
    text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--text-3); background: var(--surface-2); padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 14px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table.hover tbody tr:hover { background: #F9FAFD; }
.table tr.clickable { cursor: pointer; }
.table tfoot td { background: var(--surface-2); font-weight: 650; border-top: 1px solid var(--border); border-bottom: 0; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { vertical-align: middle; }
.table th.num, .table td.num { text-align: right; }
.table-compact td { padding: 10px 14px; }
.table tr.is-flagged td { background: #FFFBF3; }
.table tr.is-muted td { opacity: .55; }

.rank {
    display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    font-weight: 750; font-size: 13px; background: var(--surface-3); color: var(--text-2);
}
.rank.r1 { background: linear-gradient(135deg, #F5D27A, #D9A43A); color: #5A3E05; }
.rank.r2 { background: linear-gradient(135deg, #E6EAF0, #B7C0CC); color: #3A4556; }
.rank.r3 { background: linear-gradient(135deg, #F1C9A5, #C98E5B); color: #5A3112; }
.rank.none { background: transparent; color: var(--text-3); }

.final-score { font-size: 17px; font-weight: 750; font-variant-numeric: tabular-nums; }
.final-score small { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ---------- Filters / search --------------------------------------------- */

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
    display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 99px; background: var(--surface);
    font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; transition: all .15s;
}
.pill:hover { border-color: var(--border-strong); color: var(--text); }
.pill .count { font-size: 11.5px; padding: 0 7px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); line-height: 18px; }
.pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pill.active .count { background: rgba(255, 255, 255, .2); color: #fff; }
.search { position: relative; flex: 1; max-width: 320px; min-width: 180px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); }
.search input { padding-left: 35px; height: 36px; }

/* ---------- Forms --------------------------------------------------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field, .field + .field-row, .field-row + .field, .field-row + .field-row { margin-top: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-row > .field + .field { margin-top: 0; }
.field label, .label { font-size: 13px; font-weight: 600; color: var(--text); }
.field .hint { font-size: 12.5px; color: var(--text-3); }
.req { color: var(--red); }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); box-shadow: var(--shadow-xs);
    transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237B8599' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
.input::placeholder, .textarea::placeholder { color: #A3ABBA; }
.input-sm { height: 34px; font-size: 13.5px; }
.input-group { display: flex; align-items: center; gap: 8px; }
.input-suffix { position: relative; }
.input-suffix .input { padding-right: 34px; }
.input-suffix span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 13px; pointer-events: none; }

.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 14px; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--brand); flex: none; cursor: pointer; }
.check small { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.check-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 220px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.check-list .check { font-size: 13.5px; }

.choice-cards { display: grid; gap: 10px; }
.choice-card { position: relative; display: flex; gap: 12px; padding: 13px 14px; border: 1.5px solid var(--border); border-radius: 11px; cursor: pointer; transition: border-color .15s, background .15s; }
.choice-card:hover { border-color: var(--border-strong); }
.choice-card input { accent-color: var(--brand); margin-top: 3px; flex: none; }
.choice-card strong { display: block; font-size: 14px; }
.choice-card small { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.choice-card:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 42px; height: 24px; border-radius: 99px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* ---------- Alerts / callouts -------------------------------------------- */

.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid; font-size: 13.5px; line-height: 1.55; }
.alert .icon { width: 19px; height: 19px; flex: none; margin-top: 1px; }
.alert strong { font-weight: 650; }
.alert-info    { background: var(--blue-50);  border-color: var(--blue-200);  color: #1A4B94; }
.alert-warning { background: var(--amber-50); border-color: var(--amber-200); color: #7D4708; }
.alert-success { background: var(--green-50); border-color: var(--green-200); color: #10583A; }
.alert-danger  { background: var(--red-50);   border-color: var(--red-200);   color: #8C241C; }
.alert-neutral { background: var(--surface-2); border-color: var(--border); color: var(--text-2); }
.alert .alert-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.empty { text-align: center; padding: 56px 24px; color: var(--text-3); }
.empty .empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin: 0 auto 14px; background: var(--brand-50); color: var(--brand); }
.empty .empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { max-width: 420px; margin: 0 auto 18px; }

/* ---------- Modal (native <dialog>) -------------------------------------- */

.modal { border: 0; padding: 0; background: transparent; width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: visible; }
.modal.modal-sm { width: min(440px, calc(100vw - 32px)); }
.modal.modal-lg { width: min(820px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(10, 22, 38, .45); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.modal-card { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-head p { font-size: 13px; color: var(--text-3); margin-top: 3px; }
.modal-body { padding: 22px 24px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 16px 16px; }
.confirm-body { display: flex; gap: 16px; }
.confirm-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--red-50); color: var(--red); flex: none; }
.confirm-body h3 { font-size: 17px; margin-bottom: 6px; }
.confirm-body p { color: var(--text-2); font-size: 14px; }

/* ---------- Toasts -------------------------------------------------------- */

.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast {
    display: flex; align-items: center; gap: 10px; max-width: 420px;
    padding: 12px 16px; border-radius: 12px; background: #13243A; color: #fff;
    box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; pointer-events: auto;
    animation: toast-in .25s ease-out;
}
.toast .icon { width: 18px; height: 18px; color: #6EE7A8; }
.toast-error .icon { color: #FCA5A0; }
.toast.out { animation: toast-out .25s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Rating / answer buttons -------------------------------------- */

.criterion { padding: 22px 24px; border-bottom: 1px solid var(--border); scroll-margin-top: 20px; }
.criterion:last-child { border-bottom: 0; }
.criterion-head { display: flex; align-items: flex-start; gap: 12px; }
.criterion-head h4 { font-size: 15.5px; font-weight: 650; }
.criterion-head .pts { margin-left: auto; font-size: 12.5px; color: var(--text-3); white-space: nowrap; font-weight: 600; padding-top: 2px; }
.criterion-guide { color: var(--text-2); font-size: 13.5px; margin: 6px 0 14px 42px; }
.criterion-body { margin-left: 42px; }
.criterion.is-done .code-chip { background: var(--green-50); color: var(--green); }
.criterion.is-missing { background: #FFFBF3; }

.options { display: grid; grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: 8px; }
.opt {
    --credit: 0;
    --h: calc(var(--credit) * 1.22);
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 62px; padding: 8px 6px;
    border: 1.5px solid var(--border); border-radius: 11px; background: var(--surface);
    cursor: pointer; text-align: center; transition: border-color .15s, background .15s, transform .08s, box-shadow .15s;
}
.opt:hover { border-color: var(--border-strong); background: var(--surface-2); }
.opt:active { transform: scale(.97); }
.opt:focus-visible { outline: none; box-shadow: var(--ring); }
.opt .opt-short { font-size: 20px; font-weight: 750; line-height: 1.1; color: var(--text); }
.opt .opt-label { font-size: 11.5px; font-weight: 600; color: var(--text-3); line-height: 1.2; }
.opt.no-short .opt-label { font-size: 13.5px; color: var(--text-2); }
.opt.is-selected {
    background: hsl(var(--h) 65% 95%);
    border-color: hsl(var(--h) 50% 45%);
    box-shadow: 0 0 0 3px hsl(var(--h) 60% 45% / .14);
}
.opt.is-selected .opt-short, .opt.is-selected .opt-label { color: hsl(var(--h) 65% 26%); }
.opt.is-selected::after {
    content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
    background: hsl(var(--h) 55% 42%);
}
.opt:disabled { cursor: default; }
.opt:disabled:not(.is-selected) { opacity: .55; }
.opt-desc { min-height: 20px; margin-top: 10px; font-size: 13px; color: var(--text-2); }
.opt-desc b { font-weight: 650; color: var(--text); }

.note-toggle { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 0; border: 0; background: none; color: var(--brand-500); font-size: 13px; font-weight: 600; cursor: pointer; }
.note-toggle .icon { width: 14px; height: 14px; }
.note-box { margin-top: 10px; }
.note-box .textarea { min-height: 70px; font-size: 13.5px; }

.status-picker { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface-3); flex-wrap: wrap; }
.status-picker .opt { min-height: 32px; padding: 4px 12px; border-radius: 8px; border-color: transparent; background: transparent; flex-direction: row; }
.status-picker .opt .opt-label { font-size: 12.5px; color: var(--text-2); }
.status-picker .opt:hover { background: rgba(255, 255, 255, .6); }
.status-picker .opt.is-selected { background: var(--surface); box-shadow: var(--shadow-sm); border-color: hsl(var(--h) 45% 70%); }
.status-picker .opt.is-selected::after { display: none; }

/* ---------- Evaluation page ---------------------------------------------- */

.eval-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.eval-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.section-head { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-radius: var(--radius) var(--radius) 0 0; }
.section-head .sec-code { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 750; flex: none; }
.section-head h3 { font-size: 16.5px; font-weight: 700; }
.section-head p { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.section-head .sec-max { margin-left: auto; text-align: right; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.section-head .sec-max strong { display: block; font-size: 16px; color: var(--text); }

.team-hero { display: flex; gap: 18px; align-items: center; padding: 22px 24px; flex-wrap: wrap; }
.team-hero h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.team-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; color: var(--text-2); font-size: 13.5px; }
.team-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.team-hero .meta .icon { width: 15px; height: 15px; color: var(--text-3); }
.members { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.progress-card { padding: 20px; }
.progress-card .big { display: flex; align-items: center; gap: 16px; }
.save-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.save-state .icon { width: 14px; height: 14px; }
.save-state.saving { color: var(--blue); }
.save-state.saved { color: var(--green); }
.save-state.error { color: var(--red); }
.mini-sections { display: flex; flex-direction: column; gap: 12px; }
.mini-sections .ms-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.mini-sections .ms-row span { color: var(--text-2); }
.mini-sections .ms-row strong { font-variant-numeric: tabular-nums; }

.mobile-bar { display: none; }

.submitted-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--radius); background: linear-gradient(135deg, #E9F7EF, #F4FBF7); border: 1px solid var(--green-200); margin-bottom: 20px; flex-wrap: wrap; }
.submitted-banner .sb-icon { width: 44px; height: 44px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; flex: none; }
.submitted-banner h3 { font-size: 16px; color: #0F5132; }
.submitted-banner p { font-size: 13.5px; color: #2D6A4F; }

/* ---------- Team cards (evaluator home) ---------------------------------- */

.welcome {
    position: relative; overflow: hidden;
    padding: 28px 30px; border-radius: 18px; margin-bottom: 26px; color: #fff;
    background: radial-gradient(1200px 300px at 100% 0%, rgba(226, 184, 103, .28), transparent 60%), linear-gradient(135deg, #0E3A5B 0%, #0A2238 100%);
    box-shadow: var(--shadow);
}
.welcome h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.welcome p { color: #C4D2E2; margin-top: 6px; max-width: 620px; }
.welcome .welcome-stats { display: flex; gap: 32px; margin-top: 22px; flex-wrap: wrap; align-items: flex-end; }
.welcome .ws-value { font-size: 28px; font-weight: 750; line-height: 1; }
.welcome .ws-label { font-size: 12.5px; color: #9FB3C8; margin-top: 4px; }
.welcome .progress { background: rgba(255, 255, 255, .14); height: 8px; width: 260px; max-width: 100%; }
.welcome .progress > span { background: var(--accent-300); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 26px; }
.step { display: flex; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; font-weight: 750; font-size: 13px; flex: none; }
.step strong { display: block; font-size: 14px; }
.step span { font-size: 12.5px; color: var(--text-3); }

.team-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: box-shadow .2s, transform .2s, border-color .2s; }
.team-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--border-strong); }
.team-card-body { padding: 20px; flex: 1; }
.team-card-top { display: flex; align-items: flex-start; gap: 12px; }
.team-card h3 { font-size: 16px; font-weight: 700; }
.team-card .sub { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.team-card .tc-status { margin-left: auto; }
.team-card .tc-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.team-card .tc-progress { margin-top: 16px; }
.team-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.team-card-foot .your-score { font-size: 13px; color: var(--text-2); }
.team-card-foot .your-score strong { font-size: 15px; color: var(--text); }

/* ---------- Team detail -------------------------------------------------- */

.score-summary { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.section-breakdown { display: flex; flex-direction: column; gap: 16px; }
.sb-item .sb-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 13.5px; }
.sb-item .sb-top span { color: var(--text-2); }
.sb-item .sb-top strong { font-variant-numeric: tabular-nums; }
.sb-item .sb-flags { margin-top: 5px; display: flex; gap: 6px; flex-wrap: wrap; }
.sb-item .progress > span { background: var(--sb-color, var(--brand)); }

.flag { display: inline-flex; align-items: center; gap: 5px; color: var(--amber); font-size: 12.5px; font-weight: 600; }
.flag .icon { width: 14px; height: 14px; }

.comment { display: flex; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.comment-meta strong { font-weight: 650; }
.comment-text { margin-top: 4px; color: var(--text-2); font-size: 14px; white-space: pre-line; }
.comment-notes { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.comment-notes div { font-size: 13px; color: var(--text-2); padding: 7px 10px; border-left: 3px solid var(--brand-100); background: var(--surface-2); border-radius: 0 6px 6px 0; }

.record-row { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.record-row:last-child { border-bottom: 0; }
.record-info { flex: 1; min-width: 220px; }
.record-info h4 { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.record-info p { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.record-pts { width: 74px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.record-pts small { color: var(--text-3); font-weight: 500; }

/* ---------- Assignment matrix ------------------------------------------- */

.matrix th.ev-col { text-transform: none; letter-spacing: 0; font-size: 12.5px; color: var(--text); text-align: center; min-width: 110px; vertical-align: bottom; }
.matrix th.ev-col .avatar { display: grid; margin: 0 auto 6px; letter-spacing: .02em; }
.matrix th.ev-col span { display: block; max-width: 120px; margin: 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.matrix td.cell { text-align: center; padding: 10px; }
.matrix tbody th { text-transform: none; letter-spacing: 0; background: var(--surface); font-size: 14px; color: var(--text); font-weight: 600; position: sticky; left: 0; z-index: 1; border-bottom: 1px solid var(--border); }
.assign-btn {
    width: 38px; height: 38px; border-radius: 10px; border: 1.5px dashed var(--border-strong);
    background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: transparent;
    transition: all .15s;
}
.assign-btn .icon { width: 18px; height: 18px; }
.assign-btn:hover { border-color: var(--brand-500); color: var(--brand-100); }
.assign-btn.on { border-style: solid; border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-500); }
.assign-btn.on.s-draft { border-color: var(--blue); background: var(--blue-50); color: var(--blue); }
.assign-btn.on.s-submitted { border-color: var(--green); background: var(--green); color: #fff; }
.assign-btn.on.s-needs_update { border-color: var(--amber); background: var(--amber-50); color: var(--amber); }
.assign-btn.busy { opacity: .5; pointer-events: none; }

/* ---------- Scorecard builder ------------------------------------------- */

.totals-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 24px; }
.totals-strip > div { padding: 16px 20px; border-right: 1px solid var(--border); }
.totals-strip > div:last-child { border-right: 0; }
.totals-strip .t-label { font-size: 12.5px; font-weight: 600; color: var(--text-3); }
.totals-strip .t-value { font-size: 24px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; }
.totals-strip .t-value small { font-size: 13px; color: var(--text-3); font-weight: 500; }

.section-card .section-head { border-radius: var(--radius) var(--radius) 0 0; }
.section-card .flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.crit-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) 160px 76px 148px; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--border); }
.crit-row:last-child { border-bottom: 0; }
.crit-row h4 { font-size: 14.5px; font-weight: 650; }
.crit-row p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.crit-row .pts { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.crit-row .pts small { display: block; font-size: 11px; color: var(--text-3); font-weight: 500; }
.crit-row .actions { display: flex; justify-content: flex-end; gap: 2px; }
.crit-head { background: var(--surface-2); padding-top: 9px; padding-bottom: 9px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }

.scale-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.scale-opts .opt-pill { display: inline-flex; align-items: center; height: auto; min-height: 26px; padding: 3px 9px; white-space: nowrap; }
.scale-opt-row { display: grid; grid-template-columns: 70px 1fr 1.6fr 92px 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.scale-opt-head { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); margin-bottom: 6px; }

/* ---------- Auth pages --------------------------------------------------- */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--surface); }
.auth-brand {
    position: relative; overflow: hidden; color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background: radial-gradient(900px 500px at 110% -10%, rgba(226, 184, 103, .35), transparent 60%), radial-gradient(700px 500px at -20% 120%, rgba(42, 157, 143, .28), transparent 60%), linear-gradient(150deg, #0E3A5B 0%, #091D31 100%);
}
.auth-brand .brand { padding: 0; }
.auth-brand h1 { font-size: 38px; font-weight: 750; letter-spacing: -.025em; line-height: 1.15; max-width: 520px; }
.auth-brand h1 em { font-style: normal; color: var(--accent-300); }
.auth-brand p { color: #B6C6D8; font-size: 16px; margin-top: 16px; max-width: 480px; }
.auth-points { display: grid; gap: 14px; margin-top: 34px; }
.auth-points div { display: flex; align-items: center; gap: 12px; color: #DCE6F1; }
.auth-points .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: rgba(255, 255, 255, .1); color: var(--accent-300); }
.auth-foot { font-size: 12.5px; color: #7F95AD; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.auth-card .page-sub { margin-bottom: 28px; }

/* ---------- Help page ---------------------------------------------------- */

.prose h2 { font-size: 18px; margin: 0 0 10px; }
.prose p, .prose li { color: var(--text-2); font-size: 14.5px; line-height: 1.65; }
.prose ul, .prose ol { padding-left: 20px; margin: 8px 0 0; }
.prose li + li { margin-top: 6px; }
.flow { display: flex; flex-direction: column; gap: 0; }
.flow-step { display: flex; gap: 14px; position: relative; padding-bottom: 18px; }
.flow-step:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--border); }
.flow-step .step-num { width: 32px; height: 32px; }
.flow-step.ok .step-num { background: var(--green-50); color: var(--green); }
.flow-step.warn .step-num { background: var(--amber-50); color: var(--amber); }
.flow-step.bad .step-num { background: var(--red-50); color: var(--red); }
.flow-step h4 { font-size: 14.5px; margin-top: 5px; }
.flow-step p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }

/* ---------- Responsive -------------------------------------------------- */

@media (max-width: 1180px) {
    .grid-main, .grid-side { grid-template-columns: 1fr; }
    .eval-layout { grid-template-columns: 1fr; }
    .eval-aside { position: static; }
    .crit-row { grid-template-columns: 46px minmax(0, 1fr) 70px 148px; }
    .crit-row .scale-col { display: none; }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-lg); }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-open .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 30; background: rgba(10, 22, 38, .45); }
    .main { margin-left: 0; }
    .topbar {
        display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
        height: 56px; padding: 0 12px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
    }
    .topbar-title { font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .content { padding: 22px 16px 96px; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .totals-strip { grid-template-columns: 1fr 1fr; }
    .totals-strip > div:nth-child(2) { border-right: 0; }
    .totals-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
    .auth { grid-template-columns: 1fr; }
    .auth-brand { padding: 32px 24px; }
    .auth-brand h1 { font-size: 28px; }
    .auth-points, .auth-foot { display: none; }
    .page-head h1 { font-size: 22px; }
    .field-row { grid-template-columns: 1fr; }
    .criterion { padding: 18px 16px; }
    .criterion-guide, .criterion-body { margin-left: 0; }
    .options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .section-head { padding: 16px; }
    .eval-aside .progress-card.desktop-only { display: none; }
    .mobile-bar {
        display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -12px rgba(16, 24, 40, .2);
    }
    .mobile-bar .mb-text { flex: 1; font-size: 13px; color: var(--text-2); }
    .mobile-bar .mb-text strong { display: block; font-size: 15px; color: var(--text); }
    .crit-row { grid-template-columns: minmax(0, 1fr) auto auto; padding: 14px 16px; }
    .team-hero { align-items: flex-start; padding: 18px; }
    .team-hero h1 { font-size: 21px; }
    .section-head p { display: none; }
    .crit-row .code-col, .crit-row .scale-col { display: none; }
    .crit-row .pts { text-align: left; }
    .crit-head { display: none; }
    .scale-opt-row { grid-template-columns: 54px 1fr 80px 34px; }
    .scale-opt-row .desc-col { display: none; }
    .toast-stack { left: 16px; right: 16px; bottom: 84px; align-items: stretch; }
}

/* ---------- Print ------------------------------------------------------- */

@media print {
    body { background: #fff; font-size: 12px; }
    .sidebar, .topbar, .toast-stack, .page-actions, .no-print, .mobile-bar, .toolbar, .back-link, .icon-btn { display: none !important; }
    .main { margin: 0; }
    .content { padding: 0; max-width: none; }
    .card, .kpi { box-shadow: none; break-inside: avoid; }
    .grid-main, .grid-side { grid-template-columns: 1fr; }
    .table th { background: #f3f4f6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .scorebar .seg, .badge, .opt-pill, .rank, .progress > span, .ring { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; }
}
