/* =====================================================================
   PlainScore – design system
   No JavaScript, no external resources (strict CSP). Fonts are self-hosted.
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable-Italic.woff2") format("woff2");
}

:root {
  --bg: #f3f5fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-2: #cbd5e1;

  --brand: #2563eb;
  --brand-2: #6d28d9;
  --brand-ink: #ffffff;
  --brand-soft: #e8efff;

  --ok: #16a34a;   --ok-soft: #e7f8ec;
  --warn: #d97706; --warn-soft: #fff4e0;
  --bad: #dc2626;  --bad-soft: #fdecec;
  --na: #94a3b8;   --na-soft: #f1f5f9;
  --info: #2563eb; --info-soft: #e8efff;

  --side-bg: #0b1220;
  --side-bg-2: #141d35;
  --side-ink: #cbd5e1;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 12px 32px -18px rgba(15, 23, 42, .25);
  --shadow-lg: 0 24px 60px -24px rgba(15, 23, 42, .35);
  --ring-track: #e9edf5;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px; line-height: 1.55;
  color: var(--ink); background: var(--bg);
  font-feature-settings: "cv11", "ss01", "tnum";
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 700; margin: 30px 0 12px; }
h3 { font-size: 15px; font-weight: 700; margin: 18px 0 8px; color: var(--ink-2); }
p { margin: 0 0 10px; }
p.lead { color: var(--muted); font-size: 15.5px; margin: 6px 0 0; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .92em; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--brand); }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: var(--side-ink); padding: 22px 16px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; padding: 4px 8px; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .8);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-sub { font-size: 11.5px; color: #8b9bb4; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: #6b7a94; padding: 14px 12px 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--side-ink); font-weight: 500; font-size: 14.5px;
}
.nav a svg { width: 19px; height: 19px; opacity: .8; flex: none; }
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a.active { background: linear-gradient(90deg, rgba(37, 99, 235, .35), rgba(109, 40, 217, .25)); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.nav a.active svg { opacity: 1; }
.side-user { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: #fff; font-weight: 700; font-size: 13px;
}
.side-user .who { min-width: 0; flex: 1; }
.side-user .who a { color: #fff; font-weight: 600; font-size: 14px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user .who span { color: #8b9bb4; font-size: 12px; }
.side-user form button { color: #8b9bb4; }
.side-user form button:hover { color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.content { padding: 30px 36px 60px; max-width: 1280px; width: 100%; }
.foot { color: var(--muted); font-size: 12.5px; padding: 18px 36px; margin-top: auto; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 8px; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-label { display: none; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
  .side-user { margin-top: 0; border: 0; padding: 0; margin-left: auto; }
  .content { padding: 20px 16px 40px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 .badge { vertical-align: middle; margin-left: 6px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- cards & grids ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.danger-card { border-color: #f5c2c0; box-shadow: 0 0 0 4px var(--bad-soft); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }

.stat { display: flex; align-items: center; gap: 16px; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand); }
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.ok { background: var(--ok-soft); color: var(--ok); }
.stat-icon.warn { background: var(--warn-soft); color: var(--warn); }
.stat-icon.bad { background: var(--bad-soft); color: var(--bad); }
.stat .num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 18px; }
.card .table-wrap { box-shadow: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .07em; background: var(--surface-2); }
tbody tr:hover { background: #fafbfe; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.withdrawn td { opacity: .55; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 10px;
  border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; line-height: 1.2;
  background: linear-gradient(135deg, var(--brand), #3b82f6); color: var(--brand-ink);
  box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .7); transition: transform .06s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .8); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-secondary { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); box-shadow: none; }
.btn-secondary:hover { background: var(--surface-2); box-shadow: none; }
.btn-danger { background: linear-gradient(135deg, var(--bad), #ef4444); box-shadow: 0 6px 16px -8px rgba(220, 38, 38, .7); }
.btn-sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn-link { background: none; border: 0; color: inherit; padding: 0; cursor: pointer; font: inherit; box-shadow: none; }
.btn-link:hover { text-decoration: underline; box-shadow: none; filter: none; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 14px 0; }

/* ---------- forms ---------- */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13.5px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; font: inherit; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 76px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; }
.field-inline { display: flex; gap: 10px; align-items: center; }
.field-inline label { margin: 0; }
.field-inline select { width: auto; }
input[type=checkbox], input[type=radio] { width: 17px; height: 17px; accent-color: var(--brand); }
.validation-summary-errors, .field-validation-error { color: var(--bad); font-size: 13px; }
.validation-summary-errors ul { margin: 6px 0 0; padding-left: 18px; }
.help { color: var(--muted); font-size: 13px; margin-top: 5px; }

/* ---------- flash, badges ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 18px; font-weight: 500; }
.flash::before { content: ""; width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; flex: none; }
.flash-ok { background: var(--ok-soft); color: #14532d; border: 1px solid #bbe5c8; }
.flash-ok::before { background: var(--ok); }
.flash-err { background: var(--bad-soft); color: #7f1d1d; border: 1px solid #f5c2c0; }
.flash-err::before { background: var(--bad); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--na-soft); color: var(--ink-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.badge-ok { background: var(--ok-soft); color: #15803d; }
.badge-warn { background: var(--warn-soft); color: #b45309; }
.badge-bad { background: var(--bad-soft); color: #b91c1c; }
.badge-na { background: var(--na-soft); color: var(--muted); }
.badge-info { background: var(--info-soft); color: #1d4ed8; }

/* ---------- score bar & ring ---------- */
.score { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.score .pct { width: 42px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13.5px; }
.bar { position: relative; height: 9px; flex: 1; min-width: 90px; background: var(--ring-track); border-radius: 999px; overflow: hidden; }
.bar > span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #60a5fa); }
.bar.ok > span { background: linear-gradient(90deg, #15803d, #4ade80); }
.bar.warn > span { background: linear-gradient(90deg, #b45309, #fbbf24); }
.bar.bad > span { background: linear-gradient(90deg, #b91c1c, #f87171); }

.ring { --size: 92px; --thick: 9px; --ring-color: var(--brand); --p: 0; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative; flex: none;
  background: conic-gradient(var(--ring-color) calc(var(--p) * 1%), var(--ring-track) 0); }
.ring::before { content: ""; position: absolute; inset: var(--thick); background: var(--surface); border-radius: 50%; }
.ring > .ring-value { position: relative; font-weight: 800; font-size: calc(var(--size) * .24); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ring > .ring-value small { font-size: .6em; font-weight: 600; color: var(--muted); }
.ring.ok { --ring-color: var(--ok); }
.ring.warn { --ring-color: var(--warn); }
.ring.bad { --ring-color: var(--bad); }
.ring.na { --ring-color: var(--na); }
.ring-lg { --size: 132px; --thick: 12px; }
.ring-sm { --size: 64px; --thick: 7px; }
.ring-block { display: flex; align-items: center; gap: 16px; }
.ring-block .lbl { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.ring-block .sub { font-size: 13px; color: var(--ink-2); }

/* ---------- client cards (dashboard) ---------- */
.client-card { display: flex; flex-direction: column; gap: 14px; }
.client-card .client-name { font-size: 17px; font-weight: 700; }
.client-card .client-name a { color: var(--ink); }
.client-card .client-meta { color: var(--muted); font-size: 13px; }
.fw-row { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.fw-row .fw-name { font-weight: 600; font-size: 14px; }
.fw-row .fw-name a { color: var(--ink); }
.fw-row .fw-sub { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.fw-row .fw-sub .bar { max-width: 140px; }
.client-card .client-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--line-2); margin-bottom: 10px; }

/* ---------- tree / control views ---------- */
.tree { list-style: none; padding-left: 0; margin: 0; }
.tree ul { list-style: none; padding-left: 22px; margin: 4px 0 0; }
.tree li { margin: 5px 0; }
.tree .id { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: var(--muted); margin-right: 8px; }
.withdrawn { opacity: .55; text-decoration: line-through; }
.q { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; margin-bottom: 14px; }
.q-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.q-head .id { font-family: ui-monospace, Consolas, monospace; font-weight: 700; }
.q details { margin-top: 8px; }
.q summary, .question-help summary { cursor: pointer; color: var(--brand); font-size: 13.5px; font-weight: 500; }
.q ul.examples { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
pre.prose { white-space: pre-wrap; font: inherit; margin: 0; }

/* ---------- questionnaire ---------- */
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 8px; }
.section-progress { min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.question { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--na); border-radius: var(--radius); padding: 22px 24px; margin: 18px 0; box-shadow: var(--shadow); }
.question.state-ok { border-left-color: var(--ok); }
.question.state-warn { border-left-color: var(--warn); }
.question.state-bad { border-left-color: var(--bad); }
.question-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.question-num { font-weight: 700; color: var(--brand); text-transform: uppercase; font-size: 11.5px; letter-spacing: .08em; }
.question-text { font-size: 19px; line-height: 1.45; margin: 4px 0 6px; font-weight: 600; letter-spacing: -0.005em; }
.question-why { color: var(--muted); margin: 0 0 8px; }
.question-help { margin: 6px 0; }
.question-help .official { margin: 8px 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--line); font-size: 14px; }
.question-help .official pre.prose { font-size: 14px; }
ul.examples { margin: 6px 0 0; padding-left: 22px; }
ul.examples li { margin: 4px 0; }
/* "What a full Yes looks like": three example cards under the answer area of every question. */
.yes-examples { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.yes-examples-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 10px; }
.yes-examples-title { font-weight: 700; color: #15803d; }
.yes-examples-title::before { content: "\2713"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 8px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 12px; vertical-align: -3px; }
.yes-examples-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .yes-examples-grid { grid-template-columns: 1fr; } }
.yes-example { background: var(--ok-soft); border: 1px solid #bfe3c9; border-radius: 12px; padding: 12px 14px; font-size: 14px; line-height: 1.5; color: var(--ink); }
.yes-example p { margin: 4px 0 0; }
.yes-example-num { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #15803d; }

.answer { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 24px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
@media (max-width: 820px) { .answer { grid-template-columns: 1fr; } }
.answer-label { display: block; font-weight: 700; margin-bottom: 8px; }
/* Framework picker: a <details> drop-down holding clickable toggle chips. Pure CSS - the CSP allows no scripts. */
.dropdown { position: relative; display: inline-block; max-width: 100%; }
.dropdown > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown .caret { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid currentColor; opacity: .7; transition: transform .15s; }
.dropdown[open] .caret { transform: rotate(180deg); }
.dropdown[open] > summary { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.dropdown-panel { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-lg); min-width: min(560px, 100%); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips-static { margin-top: 0; }
.chip-input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; font-weight: 500; cursor: pointer; line-height: 1.2; transition: border-color .12s, background .12s, color .12s; }
.chip small { color: var(--muted); font-weight: 400; font-size: 12px; }
.chip em { font-style: normal; font-size: 11px; color: #b45309; background: var(--warn-soft); padding: 1px 7px; border-radius: 999px; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip-check { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; position: relative; }
.chip-input:checked + .chip, .chip-on { border-color: var(--brand); background: var(--brand-soft); color: #1d4ed8; }
.chip-input:checked + .chip .chip-check { border-color: var(--brand); background: var(--brand); }
.chip-input:checked + .chip .chip-check::after { content: ""; position: absolute; left: 4px; top: 1px; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chip-input:focus-visible + .chip { outline: none; box-shadow: 0 0 0 4px rgba(37, 99, 235, .25); }
.chips-static .chip { cursor: default; }
tr.muted td { color: var(--muted); }

.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; font-weight: normal; transition: border-color .12s, background .12s; }
.choice:hover { border-color: var(--brand); }
.choice input { margin-top: 3px; }
.choice-text { display: flex; flex-direction: column; }
.choice-text small { color: var(--muted); font-size: 12px; }
.choice:has(input:checked) { border-width: 2px; padding: 9px 11px; }
.choice-ok:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }
.choice-warn:has(input:checked) { border-color: var(--warn); background: var(--warn-soft); }
.choice-bad:has(input:checked) { border-color: var(--bad); background: var(--bad-soft); }
.choice-na:has(input:checked) { border-color: var(--na); background: var(--na-soft); }
.choice:has(input:disabled) { cursor: default; opacity: .8; }
.answer-notes .field { margin-bottom: 10px; }
.sticky-actions { position: sticky; bottom: 0; background: rgba(243, 245, 250, .92); backdrop-filter: blur(6px); padding: 12px 0; border-top: 1px solid var(--line); z-index: 2; }
.tracker-row { display: flex; gap: 10px; align-items: center; margin: 3px 0; }
.tracker-row .score { min-width: 180px; }
.impact { margin: 8px 0 14px; padding-left: 20px; }
.impact li { margin: 4px 0; }

/* ---------- pager ---------- */
.pager { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-size: 13.5px; font-weight: 500; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- auth (sign-in) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 1fr) minmax(360px, 520px); }
.auth-hero { background: radial-gradient(1200px 600px at 20% 0%, rgba(99, 102, 241, .45), transparent 60%), linear-gradient(160deg, #0b1220, #1e1b4b 70%, #172554); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-hero .brand-name { font-size: 20px; }
.auth-hero h2 { font-size: 40px; line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; max-width: 14ch; }
.auth-hero p { color: #b6c2d9; font-size: 16px; max-width: 46ch; }
.auth-hero ul { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.auth-hero li { display: flex; gap: 10px; align-items: center; color: #dbe3f0; }
.auth-hero li svg { width: 18px; height: 18px; color: #7dd3fc; flex: none; }
.auth-hero .fine { color: #6b7a94; font-size: 12.5px; }
.auth-panel { background: var(--surface); display: flex; align-items: center; justify-content: center; padding: 40px 32px; }
.auth-form { width: 100%; max-width: 380px; }
.auth-form h1 { font-size: 26px; margin-bottom: 4px; }
.auth-form .lead { margin-bottom: 22px; }
.auth-form .btn { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth-hero { padding: 32px 24px; } .auth-hero h2 { font-size: 30px; } }
.login { max-width: 460px; margin: 24px auto; }

/* ---------- generated utilities: bar widths & ring percentages (CSP forbids inline styles) ---------- */
.bar > span.w0 { width: 0%; }
.bar > span.w1 { width: 1%; }
.bar > span.w2 { width: 2%; }
.bar > span.w3 { width: 3%; }
.bar > span.w4 { width: 4%; }
.bar > span.w5 { width: 5%; }
.bar > span.w6 { width: 6%; }
.bar > span.w7 { width: 7%; }
.bar > span.w8 { width: 8%; }
.bar > span.w9 { width: 9%; }
.bar > span.w10 { width: 10%; }
.bar > span.w11 { width: 11%; }
.bar > span.w12 { width: 12%; }
.bar > span.w13 { width: 13%; }
.bar > span.w14 { width: 14%; }
.bar > span.w15 { width: 15%; }
.bar > span.w16 { width: 16%; }
.bar > span.w17 { width: 17%; }
.bar > span.w18 { width: 18%; }
.bar > span.w19 { width: 19%; }
.bar > span.w20 { width: 20%; }
.bar > span.w21 { width: 21%; }
.bar > span.w22 { width: 22%; }
.bar > span.w23 { width: 23%; }
.bar > span.w24 { width: 24%; }
.bar > span.w25 { width: 25%; }
.bar > span.w26 { width: 26%; }
.bar > span.w27 { width: 27%; }
.bar > span.w28 { width: 28%; }
.bar > span.w29 { width: 29%; }
.bar > span.w30 { width: 30%; }
.bar > span.w31 { width: 31%; }
.bar > span.w32 { width: 32%; }
.bar > span.w33 { width: 33%; }
.bar > span.w34 { width: 34%; }
.bar > span.w35 { width: 35%; }
.bar > span.w36 { width: 36%; }
.bar > span.w37 { width: 37%; }
.bar > span.w38 { width: 38%; }
.bar > span.w39 { width: 39%; }
.bar > span.w40 { width: 40%; }
.bar > span.w41 { width: 41%; }
.bar > span.w42 { width: 42%; }
.bar > span.w43 { width: 43%; }
.bar > span.w44 { width: 44%; }
.bar > span.w45 { width: 45%; }
.bar > span.w46 { width: 46%; }
.bar > span.w47 { width: 47%; }
.bar > span.w48 { width: 48%; }
.bar > span.w49 { width: 49%; }
.bar > span.w50 { width: 50%; }
.bar > span.w51 { width: 51%; }
.bar > span.w52 { width: 52%; }
.bar > span.w53 { width: 53%; }
.bar > span.w54 { width: 54%; }
.bar > span.w55 { width: 55%; }
.bar > span.w56 { width: 56%; }
.bar > span.w57 { width: 57%; }
.bar > span.w58 { width: 58%; }
.bar > span.w59 { width: 59%; }
.bar > span.w60 { width: 60%; }
.bar > span.w61 { width: 61%; }
.bar > span.w62 { width: 62%; }
.bar > span.w63 { width: 63%; }
.bar > span.w64 { width: 64%; }
.bar > span.w65 { width: 65%; }
.bar > span.w66 { width: 66%; }
.bar > span.w67 { width: 67%; }
.bar > span.w68 { width: 68%; }
.bar > span.w69 { width: 69%; }
.bar > span.w70 { width: 70%; }
.bar > span.w71 { width: 71%; }
.bar > span.w72 { width: 72%; }
.bar > span.w73 { width: 73%; }
.bar > span.w74 { width: 74%; }
.bar > span.w75 { width: 75%; }
.bar > span.w76 { width: 76%; }
.bar > span.w77 { width: 77%; }
.bar > span.w78 { width: 78%; }
.bar > span.w79 { width: 79%; }
.bar > span.w80 { width: 80%; }
.bar > span.w81 { width: 81%; }
.bar > span.w82 { width: 82%; }
.bar > span.w83 { width: 83%; }
.bar > span.w84 { width: 84%; }
.bar > span.w85 { width: 85%; }
.bar > span.w86 { width: 86%; }
.bar > span.w87 { width: 87%; }
.bar > span.w88 { width: 88%; }
.bar > span.w89 { width: 89%; }
.bar > span.w90 { width: 90%; }
.bar > span.w91 { width: 91%; }
.bar > span.w92 { width: 92%; }
.bar > span.w93 { width: 93%; }
.bar > span.w94 { width: 94%; }
.bar > span.w95 { width: 95%; }
.bar > span.w96 { width: 96%; }
.bar > span.w97 { width: 97%; }
.bar > span.w98 { width: 98%; }
.bar > span.w99 { width: 99%; }
.bar > span.w100 { width: 100%; }
.ring.p0 { --p: 0; }
.ring.p1 { --p: 1; }
.ring.p2 { --p: 2; }
.ring.p3 { --p: 3; }
.ring.p4 { --p: 4; }
.ring.p5 { --p: 5; }
.ring.p6 { --p: 6; }
.ring.p7 { --p: 7; }
.ring.p8 { --p: 8; }
.ring.p9 { --p: 9; }
.ring.p10 { --p: 10; }
.ring.p11 { --p: 11; }
.ring.p12 { --p: 12; }
.ring.p13 { --p: 13; }
.ring.p14 { --p: 14; }
.ring.p15 { --p: 15; }
.ring.p16 { --p: 16; }
.ring.p17 { --p: 17; }
.ring.p18 { --p: 18; }
.ring.p19 { --p: 19; }
.ring.p20 { --p: 20; }
.ring.p21 { --p: 21; }
.ring.p22 { --p: 22; }
.ring.p23 { --p: 23; }
.ring.p24 { --p: 24; }
.ring.p25 { --p: 25; }
.ring.p26 { --p: 26; }
.ring.p27 { --p: 27; }
.ring.p28 { --p: 28; }
.ring.p29 { --p: 29; }
.ring.p30 { --p: 30; }
.ring.p31 { --p: 31; }
.ring.p32 { --p: 32; }
.ring.p33 { --p: 33; }
.ring.p34 { --p: 34; }
.ring.p35 { --p: 35; }
.ring.p36 { --p: 36; }
.ring.p37 { --p: 37; }
.ring.p38 { --p: 38; }
.ring.p39 { --p: 39; }
.ring.p40 { --p: 40; }
.ring.p41 { --p: 41; }
.ring.p42 { --p: 42; }
.ring.p43 { --p: 43; }
.ring.p44 { --p: 44; }
.ring.p45 { --p: 45; }
.ring.p46 { --p: 46; }
.ring.p47 { --p: 47; }
.ring.p48 { --p: 48; }
.ring.p49 { --p: 49; }
.ring.p50 { --p: 50; }
.ring.p51 { --p: 51; }
.ring.p52 { --p: 52; }
.ring.p53 { --p: 53; }
.ring.p54 { --p: 54; }
.ring.p55 { --p: 55; }
.ring.p56 { --p: 56; }
.ring.p57 { --p: 57; }
.ring.p58 { --p: 58; }
.ring.p59 { --p: 59; }
.ring.p60 { --p: 60; }
.ring.p61 { --p: 61; }
.ring.p62 { --p: 62; }
.ring.p63 { --p: 63; }
.ring.p64 { --p: 64; }
.ring.p65 { --p: 65; }
.ring.p66 { --p: 66; }
.ring.p67 { --p: 67; }
.ring.p68 { --p: 68; }
.ring.p69 { --p: 69; }
.ring.p70 { --p: 70; }
.ring.p71 { --p: 71; }
.ring.p72 { --p: 72; }
.ring.p73 { --p: 73; }
.ring.p74 { --p: 74; }
.ring.p75 { --p: 75; }
.ring.p76 { --p: 76; }
.ring.p77 { --p: 77; }
.ring.p78 { --p: 78; }
.ring.p79 { --p: 79; }
.ring.p80 { --p: 80; }
.ring.p81 { --p: 81; }
.ring.p82 { --p: 82; }
.ring.p83 { --p: 83; }
.ring.p84 { --p: 84; }
.ring.p85 { --p: 85; }
.ring.p86 { --p: 86; }
.ring.p87 { --p: 87; }
.ring.p88 { --p: 88; }
.ring.p89 { --p: 89; }
.ring.p90 { --p: 90; }
.ring.p91 { --p: 91; }
.ring.p92 { --p: 92; }
.ring.p93 { --p: 93; }
.ring.p94 { --p: 94; }
.ring.p95 { --p: 95; }
.ring.p96 { --p: 96; }
.ring.p97 { --p: 97; }
.ring.p98 { --p: 98; }
.ring.p99 { --p: 99; }
.ring.p100 { --p: 100; }

/* ---------- text bubbles (more pronounced shading around text boxes) ---------- */
.answer-notes .field { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 12px;
  box-shadow: 0 6px 18px -10px rgba(15, 23, 42, .35), inset 0 1px 0 rgba(255, 255, 255, .8); }
.answer-notes .field label { color: var(--ink); }
.answer-notes textarea, .answer-notes input[type=number] { background: #fff; border-color: var(--line-2); box-shadow: inset 0 2px 4px rgba(15, 23, 42, .06); }
.answer-notes textarea:focus { box-shadow: inset 0 2px 4px rgba(15, 23, 42, .06), 0 0 0 4px rgba(37, 99, 235, .15); }
.answer-notes .question-help { padding: 0 4px; }
/* Action-items bubble: hidden unless a gap answer is selected (or it already has text in read-only mode). */
.action-block { display: none; background: var(--warn-soft); border-color: #f3d9a4; }
.action-block label { color: #92400e; }
.action-block .help { color: #92400e; }
.question:has(input[value="LargelyImplemented"]:checked) .action-block,
.question:has(input[value="PartiallyImplemented"]:checked) .action-block,
.question:has(input[value="NotImplemented"]:checked) .action-block,
.question:has(input:disabled) .action-block.has-text { display: block; }
.question.state-bad .action-block { background: var(--bad-soft); border-color: #f5c2c0; }
.question.state-bad .action-block label, .question.state-bad .action-block .help { color: #991b1b; }
/* Clickable stat cards on the dashboard */
a.card.stat { color: inherit; transition: transform .08s ease, box-shadow .15s ease; }
a.card.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
a.card.stat .hint { color: var(--brand); font-size: 12.5px; font-weight: 600; }

/* ---------- attestation readiness ---------- */
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.btn-disabled, .btn-disabled:hover { opacity: .55; cursor: not-allowed; filter: grayscale(1); box-shadow: none; text-decoration: none; pointer-events: auto; }
a.stat.readiness-stat { color: inherit; }
a.stat.readiness-stat:hover { text-decoration: none; }
a.stat.readiness-stat .num.small-num { font-size: 20px; }
a.stat.readiness-stat .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.gate-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.gate { border-left: 5px solid var(--line-2); }
.gate.gate-pass { border-left-color: var(--ok); }
.gate.gate-fail { border-left-color: var(--bad); }
.gate .num { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.gate .lbl { color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.gate .sub { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
table.subsets { margin-top: 12px; }
ul.blockers { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
ul.blockers li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid #f5c2c0; background: var(--bad-soft); border-radius: 10px; font-size: 13.5px; }
ul.blockers li .badge { flex: none; }
form.declare { display: flex; gap: 6px; align-items: center; }
form.declare input[type=text] { min-width: 220px; }
.tier-form { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.tier-form .choice { width: 100%; max-width: 640px; }

/* ---------- mandatory questions ---------- */
.question.question-mandatory { border-left: 6px solid var(--bad); box-shadow: 0 0 0 1px rgba(220, 38, 38, .25), var(--shadow); }
.question.question-mandatory.state-ok { border-left-color: var(--ok); box-shadow: 0 0 0 1px rgba(21, 128, 61, .25), var(--shadow); }
.mandatory-flag { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 0 0 12px; border-radius: 10px; background: var(--bad-soft); color: #7f1d1d; border: 1px solid #f5c2c0; font-size: 13.5px; }
.mandatory-flag svg, .mandatory-notice svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.question-mandatory.state-ok .mandatory-flag { background: var(--ok-soft); color: #14532d; border-color: #bbe5c8; }
.mandatory-notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin: 12px 0; border-radius: 12px; background: var(--bad-soft); color: #7f1d1d; border: 1px solid #f5c2c0; font-size: 14px; }
.mandatory-notice.is-met { background: var(--ok-soft); color: #14532d; border-color: #bbe5c8; }
