/* Fonts served by SigDef itself (Geist, Geist Mono and Instrument Serif from @fontsource 5.3.0, Latin; SIL Open Font
   License: static/fonts/LICENSE-*.txt), so pages make no requests to other sites */
@font-face { font-family:'Geist'; font-style:normal; font-weight:400; font-display:swap; src:url('/static/fonts/geist-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Geist'; font-style:normal; font-weight:500; font-display:swap; src:url('/static/fonts/geist-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Geist'; font-style:normal; font-weight:600; font-display:swap; src:url('/static/fonts/geist-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family:'Geist Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/static/fonts/geist-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Geist Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/static/fonts/geist-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family:'Instrument Serif'; font-style:normal; font-weight:400; font-display:swap; src:url('/static/fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family:'Instrument Serif'; font-style:italic; font-weight:400; font-display:swap; src:url('/static/fonts/instrument-serif-latin-400-italic.woff2') format('woff2'); }

:root {
  --sapphire:#4A44C5; --sapphire-soft:#EEEDFB; --sapphire-rule:#C9C6F0;
  --emerald:#2E8B6A; --emerald-soft:#E6F4EE; --garnet:#C94A3F; --garnet-soft:#FBEAE8; --citrine:#B9731C; --citrine-soft:#FBF1E3;
  --wash:#F3F4F6; --stripe:#F3F5FC; --stripe-hover:#E9ECFA; --surface:#FFFFFF; --surface-2:#EEEFF2; --rule:#E2E4E9; --rule-soft:#EEF0F3;
  --ink:#2A2D37; --ink-strong:#13151B; --ink-soft:#5A606C; --ink-mute:#8A909C;
  --sans:"Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --serif:"Instrument Serif", Georgia, "Times New Roman", serif;
  --shadow:0 1px 0 0 rgba(137,148,169,.18), inset 0 1px 0 0 rgba(255,255,255,.6);
}
* { box-sizing:border-box; }
html, body { margin:0; }
body { font-family:var(--sans); font-size:14px; line-height:1.45; color:var(--ink); background:var(--wash); min-height:100vh; }
a { color:var(--sapphire); text-decoration:none; }
a:hover { text-decoration:underline; }

/* ---- top bar -------------------------------------------------------- */
.topbar { position:sticky; top:0; z-index:10; height:48px; background:rgba(255,255,255,.95); backdrop-filter:blur(6px); border-bottom:1px solid var(--rule); display:flex; align-items:center; padding:0 16px; gap:16px; }
.wordmark { display:flex; flex-direction:column; line-height:1; width:200px; }
.wordmark b { font-weight:600; font-size:17px; letter-spacing:.5px; color:var(--sapphire); }
.wordmark small { font-family:var(--mono); font-size:7.5px; letter-spacing:1.4px; color:var(--ink-soft); text-transform:uppercase; margin-top:2px; }
.wordmark small.product { font-family:inherit; font-size:13px; font-weight:500; letter-spacing:.2px; color:var(--ink-strong); text-transform:none; margin-top:3px; }
.topnav { display:flex; gap:4px; flex:1; }
.topnav a { padding:6px 10px; border-radius:4px; font-size:13px; color:var(--ink-soft); }
.topnav a.active, .topnav a:hover { background:var(--surface-2); color:var(--ink-strong); text-decoration:none; font-weight:500; }
.topbar .settings { margin-left:auto; display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:4px; color:var(--ink-soft); }
.topbar .settings:hover, .topbar .settings.active { background:var(--surface-2); color:var(--ink-strong); text-decoration:none; }

/* ---- layout --------------------------------------------------------- */
.shell { display:flex; min-height:calc(100vh - 48px); }
.sidebar { width:200px; flex:none; background:var(--surface); border-right:1px solid var(--rule); padding:14px 10px; }
.sidebar .switcher { display:flex; align-items:center; gap:10px; background:var(--sapphire); color:#fff; border-radius:6px; padding:8px 10px; margin-bottom:14px; }
.sidebar .switcher .mono { font-family:var(--serif); font-size:20px; line-height:1; letter-spacing:-.5px; }
.sidebar .switcher .name { font-size:12px; font-weight:500; line-height:1.2; }
.sidebar .switcher .lvl { font-family:var(--mono); font-size:9.5px; letter-spacing:1px; text-transform:uppercase; opacity:.8; }
.sidenav a { display:block; padding:7px 10px; border-radius:4px; font-size:13px; color:var(--ink); border-left:2px solid transparent; }
.sidenav a.active { color:var(--sapphire); font-weight:500; border-left-color:var(--sapphire); background:var(--sapphire-soft); border-radius:0 4px 4px 0; }
.sidenav a:hover { background:var(--surface-2); text-decoration:none; }
.sidenav .group { font-family:var(--mono); font-size:9.5px; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-mute); margin:14px 10px 4px; }
main { flex:1; min-width:0; padding:24px 40px 48px; }
.sub, .req, .prose { max-width:1100px; }
/* wide monitors: fill the width, slightly larger type, and keep long prose readable */
@media (min-width:1900px) {
  body { zoom:1.1; }
  main { padding:28px 56px 56px; }
  .stats { grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); }
  .sidebar { width:220px; }
}

/* ---- page header ---------------------------------------------------- */
.eyebrow { font-family:var(--mono); font-size:10.5px; letter-spacing:1.6px; text-transform:uppercase; color:var(--ink-soft); font-weight:500; margin-bottom:6px; }
.eyebrow a { color:var(--ink-soft); }
h1 { font-family:var(--serif); font-weight:400; font-size:34px; letter-spacing:-.6px; color:var(--ink-strong); margin:0 0 4px; line-height:1.1; }
h1 em { font-style:italic; color:var(--sapphire); }
h1 .meta { font-family:var(--sans); font-size:14px; letter-spacing:0; color:var(--ink-soft); margin-left:10px; }
h2 { font-family:var(--mono); font-size:11px; letter-spacing:1.6px; text-transform:uppercase; font-weight:500; color:var(--ink-strong); margin:26px 0 10px; }
h2:first-child { margin-top:0; }
.sub { color:var(--ink-soft); font-size:13px; margin-bottom:16px; max-width:1100px; }
.pagehead { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-bottom:18px; }
.chips { display:flex; gap:6px; flex-wrap:wrap; margin-top:8px; }
.chip { font-family:var(--mono); font-size:10px; letter-spacing:1.2px; text-transform:uppercase; background:var(--surface-2); color:var(--ink-soft); padding:3px 8px; border-radius:3px; }

/* ---- cards & tiles -------------------------------------------------- */
.card { background:var(--surface); border:1px solid var(--rule); border-radius:6px; padding:20px; margin-bottom:16px; box-shadow:var(--shadow); }
.card.tight { padding:0; overflow:hidden; }
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:10px; margin-bottom:18px; }
.stat { background:var(--surface); border:1px solid var(--rule); border-radius:6px; padding:12px 14px; box-shadow:var(--shadow); }
.stat.accent { background:var(--sapphire-soft); border-color:var(--sapphire-rule); }
.stat .lbl { font-family:var(--mono); font-size:10px; letter-spacing:1.4px; text-transform:uppercase; color:var(--ink-soft); }
.stat b { display:block; font-family:var(--serif); font-weight:400; font-size:36px; line-height:1.05; letter-spacing:-.4px; color:var(--ink-strong); margin:6px 0 2px; font-variant-numeric:tabular-nums; }
.stat b.ok { color:var(--emerald); } .stat b.bad { color:var(--garnet); } .stat b.warn { color:var(--citrine); }
.stat span { color:var(--ink-soft); font-size:12px; }
.stat a { color:inherit; }

/* ---- tables --------------------------------------------------------- */
table { width:100%; border-collapse:collapse; background:var(--surface); }
th { font-family:var(--mono); font-size:10px; letter-spacing:1.3px; text-transform:uppercase; font-weight:500; color:var(--ink-soft); text-align:left; padding:8px 12px; border-bottom:1px solid var(--rule); background:var(--surface); }
td { padding:9px 12px; border-bottom:1px solid var(--rule-soft); vertical-align:top; }
tr:last-child td { border-bottom:none; }
tr:nth-child(even) td { background:var(--stripe); }
tr:hover td { background:var(--stripe-hover); }
th { position:sticky; top:48px; z-index:2; }
.card > table th { top:48px; }
.card > table { margin:-20px; width:calc(100% + 40px); }
.card > table:not(:first-child) { margin-top:4px; }
.card > table + * { margin-top:28px; }
.card > table td:first-child, .card > table th:first-child { padding-left:20px; }   /* in line with the card's other content */
.card > table td:last-child, .card > table th:last-child { padding-right:20px; }
.card > table.kv { margin:0; width:100%; }
.card > table.kv td:first-child { padding-left:0; }
.card > table.kv td:last-child { padding-right:0; }
.num { text-align:right; font-variant-numeric:tabular-nums; font-family:var(--mono); font-size:12.5px; }
.mono { font-family:var(--mono); font-size:12.5px; }
.bar { height:6px; background:var(--surface-2); border-radius:3px; overflow:hidden; min-width:120px; }
.bar > div { height:100%; background:var(--emerald); }

/* ---- pills ---------------------------------------------------------- */
.pill { display:inline-block; font-family:var(--mono); font-size:10px; letter-spacing:1.2px; text-transform:uppercase; padding:3px 8px; border-radius:3px; background:var(--surface-2); color:var(--ink-soft); white-space:nowrap; }
.pill.Met { background:var(--emerald-soft); color:var(--emerald); }
.pill.NotMet { background:var(--garnet-soft); color:var(--garnet); }
.pill.InProgress { background:var(--citrine-soft); color:var(--citrine); }
.pill.NotStarted { background:var(--surface-2); color:var(--ink-mute); }
.pill.NA { background:var(--surface-2); color:var(--ink-mute); }
.pill.accent { background:var(--sapphire-soft); color:var(--sapphire); }
/* NIST CSF statuses and priorities */
.pill.Fully { background:var(--emerald-soft); color:var(--emerald); }
.pill.Largely { background:var(--sapphire-soft); color:var(--sapphire); }
.pill.Partially { background:var(--citrine-soft); color:var(--citrine); }
.pill.Notachieved { background:var(--garnet-soft); color:var(--garnet); }
.pill.Notassessed, .pill.Notapplicable { background:var(--surface-2); color:var(--ink-mute); }
.pill.prioHigh { background:var(--garnet-soft); color:var(--garnet); }
.pill.prioMedium { background:var(--citrine-soft); color:var(--citrine); }
.pill.prioLow { background:var(--surface-2); color:var(--ink-soft); }

/* ---- forms ---------------------------------------------------------- */
form.inline, .inline { display:flex; gap:10px; flex-wrap:wrap; align-items:end; }
label { display:block; font-family:var(--mono); font-size:10px; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-soft); margin-bottom:4px; }
input[type=text], select, textarea { font:inherit; font-size:13.5px; padding:7px 10px; border:1px solid var(--rule); border-radius:4px; width:100%; background:#fff; color:var(--ink); }
input[type=text]:focus, select:focus, textarea:focus { outline:none; border-color:var(--sapphire); box-shadow:0 0 0 3px var(--sapphire-soft); }
input[type=file] { font-size:13px; }
textarea { min-height:180px; line-height:1.5; }
button, .btn { font:inherit; font-size:13px; font-weight:500; height:32px; padding:0 12px; background:var(--sapphire); color:#fff; border:none; border-radius:4px; cursor:pointer; display:inline-flex; align-items:center; gap:6px; text-decoration:none; }
button:hover, .btn:hover { background:#3F39B0; text-decoration:none; }
button.secondary, .btn.secondary { background:#fff; color:var(--ink); border:1px solid var(--rule); }
button.secondary:hover, .btn.secondary:hover { background:var(--surface-2); }
button.danger { background:#fff; color:var(--garnet); border:1px solid var(--rule); height:28px; padding:0 10px; }
.grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field { margin-bottom:12px; }
.req { font-size:15px; color:var(--ink); margin:6px 0 16px; max-width:900px; }
.obj { display:grid; grid-template-columns:36px 1fr 150px; gap:8px; padding:7px 0; border-bottom:1px solid var(--rule-soft); align-items:center; }
.obj:last-child { border-bottom:none; }
.obj .k { font-family:var(--mono); font-size:12px; color:var(--sapphire); }
.tabs { display:flex; flex-wrap:wrap; gap:4px; margin-bottom:12px; }
.tabs a { padding:5px 9px; border-radius:4px; font-size:12.5px; color:var(--ink-soft); font-family:var(--mono); }
.tabs a.active { background:var(--ink-strong); color:#fff; }
.tabs a:hover { background:var(--surface-2); text-decoration:none; }
.nav { display:flex; justify-content:space-between; align-items:center; margin-top:16px; gap:8px; }
details summary { cursor:pointer; color:var(--sapphire); font-size:13px; }
tr.grp td { background:var(--sapphire-soft); border-top:1px solid var(--sapphire-rule); }
button.lock { background:#fff; color:var(--sapphire); border:1px solid var(--rule); border-radius:4px; height:26px; padding:0 7px; margin-right:6px; font-size:13px; }
button.lock.on { border-color:var(--sapphire); background:#fff; }
.monogram { display:inline-flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:6px; background:var(--sapphire); color:#fff; font-family:var(--serif); font-size:20px; letter-spacing:-.5px; margin-right:12px; vertical-align:middle; }
.orgcard { display:flex; gap:14px; align-items:flex-start; }
.orgcard .title { font-family:var(--serif); font-size:22px; letter-spacing:-.4px; color:var(--ink-strong); line-height:1.1; }
.orggrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; }
.help { font-size:12px; color:var(--ink-soft); }

/* ---- sticky save bar and unsaved-changes guard ----------------------- */
.savebar { position:sticky; bottom:0; z-index:5; display:flex; justify-content:space-between; align-items:center; gap:12px; background:rgba(255,255,255,.96); backdrop-filter:blur(6px); border:1px solid var(--rule); border-radius:6px; padding:10px 16px; margin:0 0 16px; box-shadow:0 -4px 16px rgba(19,21,27,.06); }
form[data-guard].dirty .savebar { border-color:var(--sapphire-rule); }
form[data-guard].dirty [data-dirty-note] { visibility:visible !important; color:var(--sapphire); }
details.objd > summary::-webkit-details-marker { display:none; }
summary.objsum { cursor:pointer; list-style:none; display:flex; gap:8px; align-items:center; padding:4px 0; }
details.objd > summary:hover { background:var(--stripe); }
.pill.unassessed { background:var(--surface-2); color:var(--ink-mute); }

/* ---- needs-attention strip ------------------------------------------- */
.attention { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:18px; }
.attention .item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-radius:6px; border:1px solid var(--rule); background:var(--surface); color:var(--ink); box-shadow:var(--shadow); }
.attention .item:hover { text-decoration:none; border-color:var(--sapphire-rule); }
.attention .item b { font-family:var(--serif); font-size:22px; line-height:1; font-weight:400; font-variant-numeric:tabular-nums; }
.attention .item span { font-size:12.5px; color:var(--ink-soft); }
.attention .item.clear b { color:var(--ink-mute); }
.attention .item.warn b { color:var(--citrine); }
.attention .item.bad b { color:var(--garnet); }
.attention .item.bad { background:var(--garnet-soft); border-color:#F0CFCB; }

/* ---- documentation wizard ------------------------------------------- */
.wiz-phases { display:flex; gap:6px; align-items:center; flex-wrap:wrap; padding:10px 12px; background:var(--surface); border:1px solid var(--rule); border-radius:6px; }
.wiz-phase { display:flex; gap:7px; align-items:center; padding:6px 12px; border-radius:20px; font-size:13px; text-decoration:none; color:var(--ink-soft); border:1px solid transparent; }
.wiz-phase .n { display:inline-flex; width:20px; height:20px; border-radius:50%; align-items:center; justify-content:center; font-size:11px; background:var(--surface-2); color:var(--ink-soft); font-family:var(--mono); }
.wiz-phase.current { background:var(--sapphire-soft); color:var(--sapphire); border-color:var(--sapphire); font-weight:600; }
.wiz-phase.current .n { background:var(--sapphire); color:#fff; }
.wiz-phase.complete .n { background:var(--emerald); color:#fff; }
.wiz-total { margin-left:auto; font-size:13px; color:var(--ink-soft); }
.wiz-bar input[type=text] { height:32px; font-size:12.5px; }

/* ---- accounts and admin ------------------------------------------------ */
input[type=password], input[type=number], input[type=date], input[type=time], input[type=search] { font:inherit; font-size:13.5px; padding:7px 10px; border:1px solid var(--rule); border-radius:4px; width:100%; background:#fff; color:var(--ink); }
input[type=password]:focus, input[type=number]:focus, input[type=date]:focus, input[type=time]:focus, input[type=search]:focus { outline:none; border-color:var(--sapphire); box-shadow:0 0 0 3px var(--sapphire-soft); }
.authwrap { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px 16px; }
.authcard { width:100%; max-width:420px; }
.authcard .wordmark { margin-bottom:18px; width:auto; }
.authcard h1 { font-size:28px; }
.authcard .field { margin-bottom:14px; }
.authcard button { width:100%; justify-content:center; height:38px; }
.notice { border:1px solid var(--rule); border-radius:6px; padding:10px 14px; margin-bottom:14px; font-size:13px; }
.notice.bad { border-color:#F0C4BF; background:var(--garnet-soft); color:var(--garnet); }
.notice.good { border-color:#BFE3D4; background:var(--emerald-soft); color:var(--emerald); }
.notice.warn { border-color:#F0D9B5; background:var(--citrine-soft); color:var(--citrine); }
.qr { display:flex; justify-content:center; margin:6px 0 12px; }
.qr svg { display:block; width:220px; height:220px; background:#fff; }
.secret { font-family:var(--mono); font-size:15px; letter-spacing:1px; text-align:center; background:var(--surface-2); border-radius:4px; padding:8px; margin-bottom:14px; word-break:break-all; }
.usermenu { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--ink-soft); }
.usermenu form { margin:0; }
.usermenu button { height:28px; }
.admintabs { display:flex; gap:4px; border-bottom:1px solid var(--rule); margin-bottom:16px; }
.admintabs a { padding:8px 12px; font-size:13px; color:var(--ink-soft); border-bottom:2px solid transparent; margin-bottom:-1px; }
.admintabs a.active { color:var(--sapphire); border-bottom-color:var(--sapphire); font-weight:500; }
.admintabs a:hover { text-decoration:none; color:var(--ink-strong); }
.readonly-banner { border:1px solid var(--sapphire-rule); background:var(--sapphire-soft); color:var(--sapphire); border-radius:6px; padding:8px 14px; margin-bottom:14px; font-size:13px; }
body.readonly main form[method=post] button[type=submit], body.readonly main form[method=post] input[type=submit] { opacity:.45; cursor:not-allowed; }
.changes { margin:6px 0 0; font-size:12px; }
.changes td { padding:3px 8px; border-bottom:1px solid var(--rule-soft); }
.changes .old { color:var(--garnet); white-space:pre-wrap; word-break:break-word; max-width:420px; }
.changes .new { color:var(--emerald); white-space:pre-wrap; word-break:break-word; max-width:420px; }
.changes form.undo { margin:0; } .changes form.undo button { padding:2px 10px; font-size:12px; height:auto; }
.changes .undo-cell { white-space:nowrap; } .changes .undo-cell .help { margin-bottom:2px; }
form.undo { margin:0; } form.undo button { padding:2px 10px; font-size:12px; height:auto; }
.filters { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.filters > div { min-width:140px; }
@media (max-width:700px) { main { padding:16px; } .grid { grid-template-columns:1fr; } }
.appfoot { margin-top:40px; font-family:var(--mono); font-size:10px; letter-spacing:1px; color:var(--ink-mute); }
.row-form { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.row-form .field { flex:1; min-width:140px; }
.tgrid-wrap { overflow-x:auto; margin:4px 0 8px; }
table.tgrid { width:100%; border-collapse:collapse; }
table.tgrid th { font-size:11px; white-space:nowrap; padding:4px 6px; position:static; }
table.tgrid td { padding:2px 3px; vertical-align:top; }
table.tgrid input[type=text] { min-width:120px; padding:5px 7px; font-size:12.5px; }
table.tgrid .tgrid-x { width:30px; text-align:center; }
button.tgrid-rm { background:none; border:none; color:var(--ink-mute); cursor:pointer; font-size:17px; line-height:1; height:28px; padding:0 6px; }
button.tgrid-rm:hover { color:var(--garnet); }
.tgrid-tools, .tgrid-excel { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.tgrid-excel { margin-top:10px; padding-top:10px; border-top:1px solid var(--rule); font-size:13px; }

/* ---- assessment companion --------------------------------------------- */
html.share-mode .private { display:none !important; }
.cmp-share.on { background:var(--citrine-soft); border-color:var(--citrine); color:var(--citrine); }
.cmp-head-tools { display:flex; gap:8px; align-items:center; }
.cmp-bar { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; background:var(--surface); border:1px solid var(--rule); border-radius:6px; padding:8px 12px; margin-bottom:14px; font-size:13px; box-shadow:var(--shadow); }
.cmp-bar .name { font-weight:600; color:var(--ink-strong); }
.cmp-bar .tools { margin-left:auto; display:flex; gap:8px; align-items:center; }
form.cmp-inline { display:inline; margin-left:6px; }
.cmp { display:grid; grid-template-columns:250px minmax(0, 1fr); gap:20px; align-items:start; }
.cmp-nav { position:sticky; top:62px; max-height:calc(100vh - 76px); overflow-y:auto; background:var(--surface); border:1px solid var(--rule); border-radius:6px; padding:10px 8px; font-size:12.5px; box-shadow:var(--shadow); }
.cmp-nav form { margin:0 0 8px; }
.cmp-nav input[type=search], .cmp-nav select { font-size:12.5px; padding:6px 8px; }
.cmp-fam { display:flex; justify-content:space-between; align-items:baseline; gap:6px; padding:5px 6px; border-radius:4px; color:var(--ink); line-height:1.3; }
.cmp-fam b { font-family:var(--mono); font-size:11px; font-weight:500; color:var(--sapphire); margin-right:2px; }
.cmp-fam.current { background:var(--sapphire-soft); }
.cmp-fam.off { color:var(--ink-mute); }
.cmp-fam .n { font-family:var(--mono); font-size:10.5px; color:var(--ink-mute); flex:none; }
a.cmp-fam:hover, a.cmp-prac:hover { background:var(--surface-2); text-decoration:none; }
.cmp-prac { display:flex; gap:6px; align-items:baseline; padding:3px 6px 3px 8px; border-radius:4px; color:var(--ink-soft); }
.cmp-prac.current { background:var(--surface-2); color:var(--ink-strong); font-weight:500; box-shadow:inset 2px 0 0 var(--sapphire); }
.cmp-prac .id { font-family:var(--mono); font-size:11px; flex:none; }
.cmp-prac .nm { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cmp-prac .dot { flex:none; width:6px; height:6px; border-radius:50%; background:var(--sapphire); align-self:center; }
.mark { flex:none; width:12px; text-align:center; font-size:11px; font-weight:600; }
.mark.met { color:var(--emerald); } .mark.notmet { color:var(--garnet); } .mark.follow { color:var(--citrine); } .mark.part { color:var(--ink-mute); }
.cmp-keys { margin:10px 6px 2px; font-size:11px; }
.cmp-title { margin-bottom:8px; }
.cmp-pn { display:flex; gap:8px; flex:none; }
.cmp-facts { padding:14px 20px; }
.cmp-meta { display:flex; flex-wrap:wrap; gap:4px 18px; align-items:center; font-size:12.5px; color:var(--ink-soft); }
.cmp-meta b { color:var(--ink); font-weight:500; }
.cmp-line, .cmp-params { margin-top:8px; font-size:13px; }
.cmp .lbl { display:block; font-family:var(--mono); font-size:10px; letter-spacing:1.2px; text-transform:uppercase; color:var(--ink-soft); margin-bottom:2px; }
.cmp-line > .lbl { display:inline; margin-right:6px; }
.warnt { color:var(--citrine); }
.cmp-objs { padding:16px 20px 6px; }
.cmp-objs h2 .help, .cmp-h2-note { font-family:var(--sans); font-size:12.5px; text-transform:none; letter-spacing:0; font-weight:400; color:var(--ink-soft); margin-left:6px; }
.cmp-obj { border-top:1px solid var(--rule); padding:14px 0; scroll-margin-top:64px; }
.cmp-obj:first-of-type { border-top:none; padding-top:4px; }
.cmp-obj:target { background:linear-gradient(var(--sapphire-soft), transparent 70%); }
.cmp-obj.dim { opacity:.45; }
.cmp-obj .head { display:flex; gap:10px; align-items:flex-start; }
.cmp-obj .tag { font-family:var(--mono); font-size:12.5px; color:var(--sapphire); flex:none; width:var(--tagw, 40px); padding-top:1px; overflow-wrap:anywhere; }
.cmp-obj .txt { flex:1; font-weight:500; color:var(--ink-strong); }
.cmp-obj .side { flex:none; display:flex; gap:8px; align-items:center; }
.cmp-body { padding-left:calc(var(--tagw, 40px) + 10px); }
.cmp-stmt { white-space:pre-wrap; margin:6px 0; font-size:14px; line-height:1.55; color:var(--ink); }
select.call { width:auto; font-size:12.5px; padding:4px 8px; }
select.call.Met { background:var(--emerald-soft); color:var(--emerald); border-color:#BFE3D4; }
select.call.NotMet { background:var(--garnet-soft); color:var(--garnet); border-color:#F0C4BF; }
select.call.Followup { background:var(--citrine-soft); color:var(--citrine); border-color:#F0D9B5; }
.pill.Followup { background:var(--citrine-soft); color:var(--citrine); }
.cmp-note { margin-top:8px; }
.cmp-note textarea { min-height:36px; font-size:13px; line-height:1.45; background:#FFFDF5; resize:vertical; overflow:hidden; }
.cmp-note-ro { white-space:pre-wrap; font-size:13px; background:#FFFDF5; border:1px solid var(--rule); border-radius:4px; padding:7px 10px; }
.cmp-note .st { font-size:11px; color:var(--ink-mute); min-height:15px; margin-top:2px; }
.cmp-note .st.bad { color:var(--garnet); font-weight:500; }
.cmp-actions { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:16px; }
.cmp-actions .help { margin:2px 0 8px; }
/* policy panel: the captured policy beside the practice, resizable, the sections citing the practice marked */
.cmp.with-docpanel { grid-template-columns:250px minmax(0, 1fr) var(--policy-w, 480px); }
.sd-docpanel { position:sticky; top:62px; height:calc(100vh - 76px); display:flex; flex-direction:column; background:var(--surface); border:1px solid var(--rule); border-radius:6px; box-shadow:var(--shadow); min-width:0; }
.sd-docpanel[hidden] { display:none; }
.sd-doc-grip { position:absolute; left:-6px; top:0; bottom:0; width:10px; cursor:col-resize; touch-action:none; }
.sd-doc-grip:hover { background:linear-gradient(90deg, transparent 4px, var(--sapphire) 4px, var(--sapphire) 6px, transparent 6px); }
.sd-doc-bar { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-bottom:1px solid var(--rule); font-size:13px; }
.sd-doc-bar button { padding:4px 10px; font-size:12px; }
.sd-doc-body { overflow-y:auto; padding:10px 14px 16px; flex:1; font-size:13px; line-height:1.5; }
.sd-doc-head { position:sticky; top:-10px; background:var(--surface); padding:2px 0 8px; margin-bottom:6px; border-bottom:1px solid var(--rule-soft); z-index:3; }
.sd-doc-head select { font-size:12.5px; padding:5px 8px; margin-bottom:4px; }
.sd-doc-doc h2 { font-size:16px; margin:6px 0 8px; }
.sd-doc-doc h3 { font-size:13.5px; margin:14px 0 4px; }
.sd-doc-doc h4 { font-size:13px; margin:12px 0 4px; }
.sd-doc-doc p { margin:0 0 7px; }
.sd-doc-doc ul { margin:0 0 7px 18px; padding:0; }
.sd-doc-doc table { font-size:12px; margin:6px 0 10px; }
.sd-doc-doc th { position:static; }
.sd-doc-doc sup { color:var(--ink-mute); font-size:9.5px; margin-left:1px; }
.sd-doc-sec { padding:2px 8px; margin:0 -8px; border-left:3px solid transparent; border-radius:2px; }
.sd-doc-sec.hit { border-left-color:var(--sapphire); background:var(--sapphire-soft); }
.sd-doc-empty { padding:6px 0; }
.cmp.with-docpanel .cmp-title { flex-wrap:wrap; gap:8px; }
.cmp.with-docpanel .cmp-pn { flex-wrap:wrap; }
/* with the panel open the practice column is narrower: an objective's status and call move under its text */
.cmp.with-docpanel .cmp-obj .head { flex-wrap:wrap; }
.cmp.with-docpanel .cmp-obj .txt { flex:1 1 calc(100% - var(--tagw, 40px) - 10px); }
.cmp.with-docpanel .cmp-obj .side { margin-left:calc(var(--tagw, 40px) + 10px); }
.sd-doc-modes { display:flex; }
.sd-doc-modes button { border-radius:0; }
.sd-doc-modes button:first-child { border-radius:4px 0 0 4px; }
.sd-doc-modes button:last-child { border-radius:0 4px 4px 0; margin-left:-1px; }
.sd-doc-modes button.on { background:var(--sapphire-soft); border-color:var(--sapphire); color:var(--sapphire); position:relative; }
.cmp-ssp-doc h3.ssp-h1 { font-size:14.5px; margin:18px 0 6px; border-bottom:1px solid var(--rule); padding-bottom:3px; }
.cmp-ssp-doc .ssp-kv th { width:38%; text-transform:none; letter-spacing:0; font-family:var(--sans); font-size:12px; }
.ssp-ctl { border:1px solid var(--sapphire-rule); border-radius:4px; margin:10px 0; font-size:12.5px; }
.ssp-ctl.hit { border-color:var(--sapphire); box-shadow:inset 3px 0 0 var(--sapphire); background:var(--sapphire-soft); }
.ssp-ctl-head { background:#1F3A5F; color:#fff; padding:5px 8px; border-radius:3px 3px 0 0; }
.ssp-ctl-req { padding:6px 8px; font-weight:500; white-space:pre-wrap; }
.ssp-ctl-objs { padding:4px 8px 6px; background:var(--surface-2); }
.ssp-ctl-objs .mono, .ssp-ctl .mono { color:var(--sapphire); font-size:11px; }
.ssp-ctl-kv { display:flex; flex-wrap:wrap; gap:2px 14px; padding:5px 8px; color:var(--ink-soft); }
.ssp-ctl > p, .ssp-ctl > .help { padding:0 8px; }
.sd-doc-bar { flex-wrap:wrap; gap:6px; }
.sd-doc-modes { flex-wrap:wrap; }
.sd-doc-find { display:flex; gap:6px; align-items:center; padding:6px 12px; border-bottom:1px solid var(--rule); }
.sd-doc-find input { flex:1; font-size:12.5px; padding:5px 8px; min-width:0; }
.sd-doc-find button { padding:3px 9px; font-size:12px; }
.sd-doc-find .help { white-space:nowrap; font-size:11.5px; }
mark.sd-find { background:#FCEFC4; color:inherit; padding:0; border-radius:2px; }
mark.sd-find.now { background:#F6C445; box-shadow:0 0 0 1px #C99A13; }
.sd-doc-fig { margin:8px 0 14px; }
.sd-doc-fig img, .sd-doc-file img { max-width:100%; height:auto; border:1px solid var(--rule); border-radius:3px; background:#fff; }
.sd-doc-fig figcaption { font-size:11.5px; color:var(--ink-soft); margin-top:3px; }
.sd-doc-file { margin:8px 0 16px; }
.sd-doc-file-name { margin-bottom:6px; font-size:12.5px; }
.sd-doc-pdf { width:100%; height:70vh; border:1px solid var(--rule); border-radius:3px; background:#fff; }
.sd-doc-text { max-height:50vh; overflow:auto; font-size:11.5px; background:var(--surface-2); padding:8px; border-radius:3px; white-space:pre-wrap; }
.sd-doc-blocked { flex-basis:100%; color:var(--garnet); }
.sd-doc-toggle.on { background:var(--sapphire-soft); border-color:var(--sapphire); color:var(--sapphire); }
/* narrow windows: the practice comes first; the go-to box and party filter stay above it, the family list is left out */
@media (max-width:1100px) { .cmp, .cmp.with-docpanel { grid-template-columns:1fr; gap:10px; } .sd-docpanel { position:static; height:70vh; } .sd-doc-grip { display:none; } .cmp-nav { position:static; max-height:none; display:flex; gap:8px; padding:8px; }
  .cmp-nav form { flex:1; margin:0; } .cmp-nav .cmp-fam, .cmp-nav .cmp-prac, .cmp-nav .cmp-keys { display:none; } .cmp-body { padding-left:0; } }

/* ---- confirmation dialog (app.js) ---------------------------------- */
dialog.confirm-box { border:1px solid var(--rule); border-radius:8px; padding:20px 22px; max-width:460px; width:calc(100% - 32px); background:var(--surface); color:var(--ink); box-shadow:0 10px 30px rgba(19,21,27,.18); }
dialog.confirm-box::backdrop { background:rgba(19,21,27,.35); }
dialog.confirm-box p { margin:0 0 16px; font-size:14px; white-space:pre-wrap; word-break:break-word; }
dialog.confirm-box .confirm-actions { display:flex; justify-content:flex-end; gap:8px; }
dialog.confirm-box button.danger { height:auto; padding:7px 14px; }

/* ---- Admin > About -------------------------------------------------- */
.about-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:6px; }
.about-head form { margin:0; }
table.kv { background:none; }
table.kv td { padding:6px 0; border-bottom:1px solid var(--rule-soft); background:none; }
table.kv tr:nth-child(even) td, table.kv tr:hover td { background:none; }
table.kv td:first-child { color:var(--ink-soft); width:38%; padding-right:12px; }
table.kv tr:last-child td { border-bottom:none; }

/* ---- Evidence page: list with a side panel ---------------------------- */
.ev-title { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.ev-export-help { margin:-6px 0 14px; max-width:900px; }
.ev-layout { display:grid; grid-template-columns:minmax(0, 1fr); gap:14px; align-items:start; }
.ev-layout.with-panel { grid-template-columns:minmax(0, 1fr) var(--ev-panel-w, 520px); }
.ev-list td.ev-wrap { word-break:break-word; }
.ev-list td.ev-nowrap { white-space:nowrap; }
.ev-layout.with-panel .ev-opt { display:none; }
tr.ev-archived td { color:var(--ink-mute); }
tr.ev-archived td a { color:var(--ink-soft); }
tr.ev-current td { background:var(--sapphire-soft) !important; }
.ev-panel { position:sticky; }
.ev-file-name { font-weight:600; font-size:14px; word-break:break-word; margin-bottom:8px; }
.ev-file-note { margin:0 0 8px; font-size:12.5px; }
.ev-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:10px; }
.ev-actions form { margin:0; }
.ev-actions .btn, .ev-actions button { height:30px; padding:0 12px; font-size:12.5px; }
.ev-facts { margin-bottom:12px; }
.ev-facts td:first-child { width:30%; }
.ev-hash { font-size:11px; word-break:break-all; }
.ev-preview img { max-width:100%; height:auto; border:1px solid var(--rule); border-radius:3px; background:#fff; }
@media (max-width:1100px) { .ev-layout.with-panel { grid-template-columns:1fr; } .ev-panel { position:static; height:75vh; } .ev-panel .sd-doc-grip { display:none; } }
.ev-archived-item > div, .ev-archived-item > a { opacity:.6; }

.saved { color:var(--emerald); font-size:13px; font-weight:500; }
