* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: oklch(98% 0.004 250);
  font-family: 'Public Sans', Helvetica, Arial, sans-serif;
  color: oklch(22% 0.02 255);
  -webkit-font-smoothing: antialiased;
}
a { color: #0B2245; }
a:hover { color: oklch(45% 0.09 255); }
select, input, button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: oklch(85% 0.01 250); border-radius: 4px; }

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

/* ---------- Sidebar ---------- */
.sidebar {
  width: 248px; flex-shrink: 0; background: #0B2245; color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-brand { padding: 28px 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.12); }
.sidebar-brand .eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .6; font-weight: 600; }
.sidebar-brand .name { font-size: 19px; font-weight: 700; margin-top: 4px; }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 8px;
  cursor: pointer; background: transparent; border: none; color: #fff; text-align: left; width: 100%;
  font-family: inherit;
}
.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active { background: rgba(255,255,255,0.14); }
.nav-item .num {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.35);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.nav-item.active .num { background: #fff; color: #0B2245; border-color: #fff; }
.nav-item .label { font-size: 14px; font-weight: 500; }

.sidebar-score { padding: 20px 24px; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-score .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .6; margin-bottom: 6px; }
.sidebar-score .value-row { display: flex; align-items: baseline; gap: 8px; }
.sidebar-score .value { font-size: 32px; font-weight: 800; line-height: 1; }
.sidebar-score .of100 { font-size: 13px; opacity: .7; }
.sidebar-score .grade { font-size: 13px; opacity: .75; margin-top: 2px; }

.sidebar-settings { padding: 16px 24px 22px; border-top: 1px solid rgba(255,255,255,0.12); }
.sidebar-settings summary { cursor: pointer; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; font-weight: 600; list-style: none; }
.sidebar-settings summary::-webkit-details-marker { display: none; }
.sidebar-settings[open] summary { margin-bottom: 10px; }
.settings-field { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.settings-field label { font-size: 11px; opacity: .75; }
.settings-field select, .settings-field input {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: #fff;
  border-radius: 6px; padding: 6px 8px; font-size: 12px;
}
.settings-field select option { color: #111; }
.reset-btn {
  margin-top: 14px; width: 100%; background: transparent; border: 1px solid rgba(255,255,255,0.3); color: #fff;
  padding: 8px; border-radius: 6px; font-size: 12px; cursor: pointer;
}
.reset-btn:hover { background: rgba(255,255,255,0.1); }

/* ---------- Main ---------- */
.main { flex: 1; min-width: 0; padding: 40px 48px 80px; max-width: 1180px; }
.step-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: oklch(50% 0.09 255); margin-bottom: 8px; }
h1.page-title { font-size: 30px; font-weight: 700; margin: 0 0 8px; }
p.page-desc { font-size: 15px; color: oklch(45% 0.02 255); margin: 0 0 32px; line-height: 1.5; max-width: 720px; }

.field-group { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.flex1 { flex: 1; }
.field-row { display: flex; gap: 16px; }
.field-label { font-size: 13px; font-weight: 600; color: oklch(35% 0.02 255); }
.field input, .field select {
  padding: 10px 12px; border: 1px solid oklch(88% 0.006 250); border-radius: 6px; font-size: 14px; background: #fff;
}
.field input[type="date"] { max-width: 220px; }

.btn-primary {
  background: #0B2245; color: #fff; border: none; padding: 12px 22px; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 32px;
}
.btn-primary:hover { background: oklch(28% 0.08 255); }
.btn-secondary {
  background: #fff; color: #0B2245; border: 1px solid oklch(80% 0.02 255); padding: 12px 22px; border-radius: 6px;
  font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 32px; margin-left: 12px;
}
.btn-secondary:hover { background: oklch(96% 0.01 255); }

/* ---------- Checklist ---------- */
.domain-block { margin-bottom: 36px; }
.domain-header {
  font-size: 17px; font-weight: 700; color: #0B2245; padding-bottom: 8px; border-bottom: 2px solid #0B2245;
  margin-bottom: 14px; display: flex; align-items: baseline; gap: 10px;
}
.domain-header .count { font-size: 12px; font-weight: 500; color: oklch(50% 0.02 255); }
.feature-list { display: flex; flex-direction: column; gap: 10px; }
.feature-card { background: #fff; border: 1px solid oklch(90% 0.006 250); border-radius: 10px; padding: 16px 18px; }
.feature-top { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.feature-name { font-size: 14px; font-weight: 700; }
.feature-name .type { font-weight: 500; color: oklch(50% 0.02 255); }
.feature-question { font-size: 13px; color: oklch(45% 0.02 255); margin-top: 2px; max-width: 640px; }
.badge { flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; height: fit-content; white-space: nowrap; }
.feature-selects { display: flex; gap: 20px; flex-wrap: wrap; }
.select-col { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 200px; }
.select-col .lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: oklch(50% 0.02 255); }
.select-col.desired .lbl { color: oklch(50% 0.09 255); }
.select-col select { padding: 8px 10px; border: 1px solid oklch(88% 0.006 250); border-radius: 6px; font-size: 13px; background: oklch(97% 0.004 250); }
.select-col.desired select { background: oklch(96% 0.03 255); }
.select-col .desc { font-size: 12px; color: oklch(45% 0.02 255); line-height: 1.4; }

/* ---------- Scoring ---------- */
.score-cards { display: flex; gap: 16px; margin-bottom: 36px; }
.score-card { flex: 1; background: #fff; border: 1px solid oklch(90% 0.006 250); border-radius: 12px; padding: 22px 24px; }
.score-card.dark { background: #0B2245; color: #fff; border: none; }
.score-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: oklch(50% 0.02 255); }
.score-card.dark .label { opacity: .65; color: inherit; }
.score-card .big { font-size: 40px; font-weight: 800; margin-top: 6px; color: #0B2245; }
.score-card.dark .big { color: #fff; }
.score-card .sub { font-size: 13px; color: oklch(45% 0.02 255); margin-top: 2px; }
.score-card.dark .sub { opacity: .8; color: inherit; }

.section-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.domain-bars { display: flex; flex-direction: column; gap: 14px; margin-bottom: 40px; }
.domain-bar-row .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.domain-bar-row .top .name { font-weight: 600; }
.domain-bar-row .top .vals { color: oklch(45% 0.02 255); }
.bar-track { position: relative; height: 10px; background: oklch(93% 0.006 250); border-radius: 6px; overflow: hidden; }
.bar-fill-desired { position: absolute; left: 0; top: 0; height: 100%; background: oklch(80% 0.05 255); }
.bar-fill-existing { position: absolute; left: 0; top: 0; height: 100%; background: #0B2245; }

.data-table { display: flex; flex-direction: column; gap: 1px; border: 1px solid oklch(90% 0.006 250); border-radius: 10px; overflow: hidden; background: oklch(90% 0.006 250); }
.data-table .row {
  display: grid; gap: 1px; background: #fff; padding: 12px 16px; font-size: 13px; align-items: center;
}
.data-table .row.head {
  background: oklch(96% 0.006 250); padding: 10px 16px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: oklch(45% 0.02 255);
}
.cols-4 { grid-template-columns: 2.2fr 1fr 1fr 1fr; }
.cols-5 { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
.cell-strong { font-weight: 600; }
.cell-muted { font-weight: 400; color: oklch(50% 0.02 255); }
.cell-accent { color: #0B2245; font-weight: 600; }
.cell-green { color: oklch(50% 0.12 150); }
.empty-note { padding: 24px 16px; text-align: center; color: oklch(50% 0.02 255); font-size: 13px; background: #fff; }

/* ---------- Financial ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 32px; }
.kpi-card { background: #fff; border: 1px solid oklch(90% 0.006 250); border-radius: 12px; padding: 18px 20px; }
.kpi-card .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: oklch(50% 0.02 255); }
.kpi-card .big { font-size: 26px; font-weight: 800; margin-top: 6px; }
.kpi-card .big.accent { color: #0B2245; }
.kpi-card .big.green { color: oklch(55% 0.13 150); }

/* ---------- Report ---------- */
.report-card { background: #fff; border: 1px solid oklch(90% 0.006 250); border-radius: 14px; padding: 44px 48px; max-width: 900px; }
.report-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #0B2245; padding-bottom: 20px; margin-bottom: 28px; gap: 16px; }
.report-header .eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: oklch(50% 0.09 255); }
.report-header .proj-name { font-size: 26px; font-weight: 800; margin-top: 6px; }
.report-header .proj-meta { font-size: 13px; color: oklch(45% 0.02 255); margin-top: 4px; }
.report-header .score-box { text-align: right; flex-shrink: 0; }
.report-header .score-box .score { font-size: 44px; font-weight: 800; color: #0B2245; line-height: 1; }
.report-header .score-box .tag { font-size: 13px; color: oklch(45% 0.02 255); margin-top: 2px; }

.report-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 32px; }
.report-summary .label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: oklch(50% 0.02 255); }
.report-summary .val { font-size: 20px; font-weight: 700; margin-top: 4px; }
.report-summary .val.green { color: oklch(50% 0.12 150); }

.report-scorecard { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.report-scorecard .row { display: flex; align-items: center; gap: 12px; }
.report-scorecard .name { width: 150px; font-size: 13px; font-weight: 600; }
.report-scorecard .track { flex: 1; position: relative; height: 8px; background: oklch(93% 0.006 250); border-radius: 6px; overflow: hidden; }
.report-scorecard .fill { position: absolute; left: 0; top: 0; height: 100%; background: #0B2245; }
.report-scorecard .score { width: 36px; text-align: right; font-size: 13px; font-weight: 700; }

.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid oklch(93% 0.006 250); }
.action-rank {
  width: 22px; height: 22px; border-radius: 50%; background: #0B2245; color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px;
}
.action-title { font-size: 13px; font-weight: 600; }
.action-sub { font-size: 12px; color: oklch(45% 0.02 255); margin-top: 2px; }

.report-actions { margin-top: 28px; display: flex; gap: 12px; }
.report-actions .btn-primary, .report-actions .btn-secondary { margin-top: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { position: static; height: auto; width: 100%; }
  .main { padding: 24px 20px 60px; max-width: none; }
  .kpi-grid { grid-template-columns: repeat(2,1fr); }
  .score-cards { flex-direction: column; }
  .data-table { overflow-x: auto; }
  .data-table .row, .data-table .row.head { min-width: 560px; }
  .report-card { padding: 24px; }
  .report-header { flex-direction: column; }
  .report-header .score-box { text-align: left; }
}

/* ---------- Print ---------- */
@media print {
  .sidebar, .step-eyebrow, .report-actions { display: none !important; }
  .layout { display: block; }
  .main { padding: 0; max-width: none; }
  .report-card { border: none; padding: 0; max-width: none; }
}

/* ---------------- Admin ---------------- */
.nav-divider { height: 1px; background: rgba(255,255,255,0.12); margin: 10px 12px; }

.admin-toolbar { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.admin-toolbar .field { min-width: 160px; }
.admin-toolbar .btn-secondary { margin-top: 0; margin-left: 0; }
.admin-toolbar .data-source-note { margin-left: auto; font-size: 12px; color: oklch(50% 0.02 255); align-self: center; }

.admin-filter { margin-bottom: 20px; }
.admin-filter input {
  width: 100%; max-width: 420px; padding: 10px 12px; border: 1px solid oklch(88% 0.006 250);
  border-radius: 6px; font-size: 14px; background: #fff;
}

.admin-new-toggle summary { cursor: pointer; font-size: 14px; font-weight: 700; color: #0B2245; margin-bottom: 16px; list-style: none; }
.admin-new-toggle summary::-webkit-details-marker { display: none; }
.admin-new-toggle summary::before { content: '+ '; }
.admin-new-toggle[open] summary::before { content: '\2212 '; }
.admin-new-toggle { margin-bottom: 32px; }

.admin-card { background: #fff; border: 1px solid oklch(90% 0.006 250); border-radius: 10px; padding: 18px 20px; margin-bottom: 14px; }
.admin-row { display: grid; gap: 12px; margin-bottom: 12px; }
.admin-row.cols-3 { grid-template-columns: 1fr 2fr 1fr; }
.admin-row.cols-5 { grid-template-columns: repeat(5, 1fr); }
.admin-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.admin-field { display: flex; flex-direction: column; gap: 4px; }
.admin-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: oklch(50% 0.02 255); }
.admin-field input, .admin-field select, .admin-field textarea {
  padding: 8px 10px; border: 1px solid oklch(88% 0.006 250); border-radius: 6px; font-size: 13px; font-family: inherit; background: oklch(98% 0.004 250);
}
.admin-field textarea { resize: vertical; min-height: 42px; line-height: 1.4; }
.admin-card-actions { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.admin-card-actions .btn-primary, .admin-card-actions .btn-secondary { margin-top: 0; padding: 8px 16px; font-size: 13px; }
.admin-card-actions .btn-danger {
  background: #fff; color: oklch(45% 0.15 25); border: 1px solid oklch(80% 0.08 25); padding: 8px 16px;
  border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.admin-card-actions .btn-danger:hover { background: oklch(96% 0.03 25); }
.admin-status { font-size: 12px; font-weight: 600; }
.admin-status.ok { color: oklch(50% 0.12 150); }
.admin-status.err { color: oklch(45% 0.15 25); }
.admin-domain-heading {
  font-size: 15px; font-weight: 700; color: #0B2245; margin: 32px 0 14px; padding-bottom: 6px; border-bottom: 2px solid #0B2245;
}
.admin-domain-heading:first-of-type { margin-top: 0; }
