/* SAMwise. Two voices: the State's text (SAM, SIMM, 5300-C criteria, 5330-B statements) is set
   in a serif as a quotation from the manual; the entity's own work is set in a plain sans.
   Fonts are bundled in fonts/ (SIL Open Font License) so the app makes no network calls. */
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Public Sans"; src: url(fonts/public-sans-latin-wght-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-wght-normal.woff2) format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(fonts/source-serif-4-latin-wght-italic.woff2) format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Warm stone neutrals from ivory to ink, a few muted dark accents (slate-teal, bronze),
     soft tints for status. Flat surfaces, tight corners. */
  --bg: #fafaf9;          /* ivory */
  --panel: #ffffff;
  --panel-2: #f2f1f0;
  --ink: #1f1d1a;
  --ink-2: #33312c;
  --muted: #706d66;
  --line: #e5e5e3;
  --line-2: #efeeec;
  --field: #cccac6;
  --navy: #f2f1f0;        /* sidebar: stone */
  --navy-ink: #33312c;
  --navy-muted: #8f8b85;
  --navy-hover: rgba(15, 14, 13, .05);
  --navy-active: #fafaf9;
  --navy-strong: #0f0e0d;
  --poppy: #0f0e0d;       /* brand mark and current-page marker: ink */
  --mark-ink: #fafaf9;
  --btn: #0f0e0d;         /* primary actions: ink on ivory */
  --btn-hover: #33312c;
  --btn-ink: #fafaf9;
  --accent: #2e5457;      /* links, focus, references: slate-teal */
  --accent-hover: #22403f;
  --accent-ink: #fafaf9;
  --accent-soft: #e7ecea;
  --bar: #333f40;         /* progress fills */
  /* Status colors stay soft everywhere: muted text (still AA on white), a pale fill and a light
     outline. No solid status blocks; sentences keep the normal ink color. */
  --ok: #4a7a5c;   --ok-soft: #eef4ef;   --ok-line: #b5cdbb;    /* sage */
  --warn: #85682a; --warn-soft: #f8f2e3; --warn-line: #e0cc98;  /* ochre */
  --bad: #9a5a52;  --bad-soft: #f9efed;  --bad-line: #dcaea8;   /* dusty rose */
  /* Risk ratings: muted tint, dark text of the same hue. */
  --r-vh: #e8cbc6; --r-h: #eedcce; --r-m: #f0e6c8; --r-l: #dfe6d8; --r-vl: #d9e1e0;
  --r-vh-ink: #593d3a; --r-h-ink: #6b4a2e; --r-m-ink: #63521c; --r-l-ink: #3d5a39; --r-vl-ink: #333f40;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: none;
  --lift: 0 12px 32px rgba(15, 14, 13, .14);
  color-scheme: light;
}
/* Night colors. Used when the viewer picks night, or when they have not picked and the
   system is in dark mode. The toggle in the sidebar sets data-theme on <html> (js/theme.js). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0e0d; --panel: #171614; --panel-2: #1f1d1a; --ink: #f2f1f0; --ink-2: #cccac6; --muted: #8f8b85;
    --line: #33312c; --line-2: #26241f; --field: #524f49; --navy: #141311; --navy-ink: #cccac6; --navy-muted: #8f8b85;
    --navy-hover: rgba(255, 255, 255, .05); --navy-active: #1f1d1a; --navy-strong: #fafaf9;
    --poppy: #fafaf9; --mark-ink: #0f0e0d; --btn: #fafaf9; --btn-hover: #e5e5e3; --btn-ink: #0f0e0d;
    --accent: #9cc2c0; --accent-hover: #b8d6d4; --accent-ink: #0f0e0d; --accent-soft: #232b2b; --bar: #9cb4b2;
    --ok: #9cc7aa; --ok-soft: #1a231d; --ok-line: #4d6b57; --warn: #dcc58a; --warn-soft: #26221a; --warn-line: #6e5f37; --bad: #e0aaa3; --bad-soft: #281e1d; --bad-line: #7a5853; --sel: #4d4a14; --sel-ink: #fafaf9;
    --r-vh: #3d2725; --r-h: #3a2c20; --r-m: #36301a; --r-l: #232e21; --r-vl: #222b2b;
    --r-vh-ink: #e8b4ad; --r-h-ink: #e6c0a2; --r-m-ink: #e3cd8a; --r-l-ink: #b1cfa6; --r-vl-ink: #b5cfcd;
    --shadow: none; --lift: 0 12px 32px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f0e0d; --panel: #171614; --panel-2: #1f1d1a; --ink: #f2f1f0; --ink-2: #cccac6; --muted: #8f8b85;
  --line: #33312c; --line-2: #26241f; --field: #524f49; --navy: #141311; --navy-ink: #cccac6; --navy-muted: #8f8b85;
  --navy-hover: rgba(255, 255, 255, .05); --navy-active: #1f1d1a; --navy-strong: #fafaf9;
  --poppy: #fafaf9; --mark-ink: #0f0e0d; --btn: #fafaf9; --btn-hover: #e5e5e3; --btn-ink: #0f0e0d;
  --accent: #9cc2c0; --accent-hover: #b8d6d4; --accent-ink: #0f0e0d; --accent-soft: #232b2b; --bar: #9cb4b2;
  --ok: #9cc7aa; --ok-soft: #1a231d; --ok-line: #4d6b57; --warn: #dcc58a; --warn-soft: #26221a; --warn-line: #6e5f37; --bad: #e0aaa3; --bad-soft: #281e1d; --bad-line: #7a5853; --sel: #4d4a14; --sel-ink: #fafaf9;
  --r-vh: #3d2725; --r-h: #3a2c20; --r-m: #36301a; --r-l: #232e21; --r-vl: #222b2b;
  --r-vh-ink: #e8b4ad; --r-h-ink: #e6c0a2; --r-m-ink: #e3cd8a; --r-l-ink: #b1cfa6; --r-vl-ink: #b5cfcd;
  --shadow: none; --lift: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.5 var(--sans); font-feature-settings: "tnum" 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 650; margin: 4px 0 0; letter-spacing: -.018em; }
h2 { font-size: 17px; line-height: 1.3; font-weight: 620; margin: 0 0 10px; letter-spacing: -.005em; }
h3 { font-size: 15px; font-weight: 620; margin: 2px 0; }
p { margin: 0 0 10px; }
strong, b { font-weight: 640; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.xsmall { font-size: 12px; }
/* Codes such as GV.OC-04.1, 5360.1 and AC-17: same face, even-width figures. */
.mono, .code { font-family: var(--sans); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; white-space: nowrap; color: var(--ink-2); }
a.mono { color: var(--accent); }
.ok { color: var(--ok); } .warn { color: var(--warn); } .bad { color: var(--bad); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.center { text-align: center; }

/* The State's words. */
.quote { font-family: var(--serif); font-size: 16px; line-height: 1.6; color: var(--ink); font-weight: 420; }
td.quote { font-size: 15px; line-height: 1.5; }
.lead-in { font-family: var(--serif); font-style: italic; font-size: 14.5px; line-height: 1.5; color: var(--muted); margin-bottom: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; min-height: 100dvh; background: linear-gradient(to right, var(--navy) 256px, transparent 256px); }
.shell > * { min-width: 0; }
.side {
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column;
  background: var(--navy); color: var(--navy-ink); padding: 22px 14px 16px; border-right: 1px solid var(--line);
}
.brand { display: flex; gap: 11px; align-items: center; padding: 0 8px 22px; }
.mark {
  flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--poppy); color: var(--mark-ink); font-family: var(--serif); font-size: 22px; font-weight: 700; line-height: 1;
}
.side > * { flex-shrink: 0; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; line-height: 1.1; color: var(--navy-strong); letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--navy-muted); margin-top: 2px; }
.theme-toggle {
  margin-left: auto; flex: none; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--navy-active); color: var(--navy-ink);
}
.theme-toggle:hover { color: var(--navy-strong); border-color: var(--field); }
.theme-toggle .sun, .theme-toggle .moon { display: none; }
/* Show the mode you would switch to. */
:root .theme-toggle .moon { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
}
#nav { display: flex; flex-direction: column; gap: 16px; }
.nav-group { display: flex; flex-direction: column; gap: 1px; }
.nav-label { font-size: 12px; font-weight: 600; color: var(--navy-muted); padding: 0 10px 4px; }
#nav a {
  position: relative; display: flex; align-items: center; gap: 10px; color: var(--navy-ink);
  padding: 7px 10px; border-radius: var(--radius-sm); font-size: 14px; line-height: 1.35;
  transition: background-color .15s, color .15s;
}
#nav a .ico { flex: none; opacity: .7; }
#nav a:hover { background: var(--navy-hover); color: var(--navy-strong); text-decoration: none; }
#nav a.active { background: var(--navy-active); color: var(--navy-strong); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
#nav a.active .ico { opacity: 1; color: var(--navy-strong); }
#nav a.active::before { content: ""; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--poppy); }
#nav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid var(--line); }
.lock { display: flex; gap: 7px; align-items: baseline; font-size: 12.5px; color: var(--ok); margin-bottom: 4px; line-height: 1.4; }
.lock::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 99px; background: var(--ok-line); transform: translateY(-1px); }
.side-note { font-size: 12px; color: var(--navy-muted); }
/* On wide screens the page sits centered in the space right of the sidebar. */
main { padding: 34px 44px 72px; max-width: 1320px; width: 100%; margin: 0 auto; outline: none; }

/* ---------- page parts ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 8px; }
.page-head + p { max-width: 78ch; margin: -8px 0 22px; color: var(--muted); }
/* Source citation above a title, e.g. "SIMM 5305-C Risk Register ...". */
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; line-height: 1.4; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; margin-bottom: 18px; box-shadow: var(--shadow); overflow-x: auto;
}
.card.flush { padding: 0; }
.pad { padding: 16px 20px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2.tight, .grid-3.tight { gap: 12px; }
.grid-2 > *, .grid-3 > *, .kpis > * { min-width: 0; }
.callout { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.callout.info { background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line); margin: 0 0 18px; }

/* ---------- buttons, inputs ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--btn); background: var(--btn);
  color: var(--btn-ink); padding: 9px 16px; border-radius: var(--radius-sm); font: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel); color: var(--ink); border-color: var(--field); }
.btn.ghost:hover { background: var(--panel-2); border-color: var(--ink); }
.btn.danger { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad); }
.btn.danger:hover { background: var(--bad-soft); border-color: var(--bad); }
.btn.small { padding: 5px 11px; font-size: 13px; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 13px; padding: 0; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--bad); }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
input, select, textarea {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--field);
  border-radius: var(--radius-sm); padding: 8px 10px; width: 100%; font-weight: 400; transition: border-color .12s, box-shadow .12s;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%238f8b85' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 16px;
}
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: var(--navy-muted); }
input[type=date]::-webkit-calendar-picker-indicator { opacity: .45; cursor: pointer; }
input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: .8; }
input[type=file] { padding: 5px; cursor: pointer; color: var(--muted); }
input[type=file]::file-selector-button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--panel-2);
  border: 1px solid var(--field); border-radius: var(--radius-sm); padding: 6px 12px; margin-right: 10px; cursor: pointer;
}
input[type=file]::file-selector-button:hover { border-color: var(--ink); }
input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }
.btn:disabled, .btn[aria-disabled=true] { opacity: .45; cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input[type=checkbox] { width: auto; accent-color: var(--btn); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn:focus-visible, a:focus-visible, button:focus-visible, tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cell { padding: 5px 8px; font-size: 13px; min-width: 110px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 600; }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-size: 13px; font-weight: 650; color: var(--ink-2); padding: 0 6px; }

/* ---------- key numbers: one strip, cells split by hairlines ---------- */
.kpis {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-bottom: 18px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
.kpis.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); max-width: 780px; }
.kpi { display: block; background: var(--panel); padding: 18px 22px 20px; color: inherit; }
a.kpi { transition: background-color .12s; }
a.kpi:hover { background: var(--panel-2); text-decoration: none; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 550; }
.kpi-value { font-size: 34px; line-height: 1.15; margin-top: 6px; font-weight: 650; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.kpis.small .kpi { padding: 14px 18px 16px; }
.kpis.small .kpi-value { font-size: 26px; margin-top: 4px; }
.kpi-of { font-size: 17px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.kpi-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.kpi-sub.bad { color: var(--bad); }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 84px 1fr 92px; gap: 14px; align-items: center; color: inherit; font-size: 14px; }
.bar-row:hover { text-decoration: none; }
.bar-row:hover .bar-label { color: var(--accent); }
.bar { display: block; height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--bar); border-radius: 99px; transition: width .4s ease; }
.bar-num { text-align: right; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- deadlines ---------- */
.deadlines { list-style: none; padding: 0; margin: 0; }
.deadlines li { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.deadlines li:first-child { padding-top: 2px; }
.deadlines li:last-child { border-bottom: 0; }
.dl-date { font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dl-body { display: flex; flex-direction: column; gap: 1px; font-size: 14px; line-height: 1.45; }
.dl-body strong { font-weight: 600; }
.dl-in { font-size: 12px; font-weight: 650; white-space: nowrap; padding: 2px 8px; border-radius: 5px; background: var(--panel-2); color: var(--muted); }
.dl-in.warn { background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); } .dl-in.bad { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--panel-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table.compact td { padding: 10px 8px; }
.card:not(.flush) .table th { background: transparent; padding-left: 8px; }
.card:not(.flush) .table td { padding-left: 8px; }
.card:not(.flush) .table td:first-child, .card:not(.flush) .table th:first-child { padding-left: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }
tr.hl td { background: var(--accent-soft); }

/* ---------- chips ---------- */
.chip {
  display: inline-block; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 1px 8px; border-radius: 5px;
  background: var(--panel-2); color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap;
}
a.chip:hover { text-decoration: none; filter: brightness(.97); }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: var(--bad-line); }
.chip.big { font-size: 14px; padding: 4px 12px; }
.r-veryhigh { background: var(--r-vh) !important; color: var(--r-vh-ink) !important; border-color: transparent !important; }
.r-high { background: var(--r-h) !important; color: var(--r-h-ink) !important; border-color: transparent !important; }
.r-moderate { background: var(--r-m) !important; color: var(--r-m-ink) !important; border-color: transparent !important; }
.r-low { background: var(--r-l) !important; color: var(--r-l-ink) !important; border-color: transparent !important; }
.r-verylow { background: var(--r-vl) !important; color: var(--r-vl-ink) !important; border-color: transparent !important; }
.ref {
  display: inline-block; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; padding: 1px 7px; margin: 3px 4px 0 0;
  border-radius: 6px; background: var(--accent-soft); color: var(--accent);
}
.ref:hover { text-decoration: none; filter: brightness(.96); }

/* ---------- overview ---------- */
.health { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.health-item { color: inherit; padding: 14px; border-radius: 10px; background: var(--panel-2); border: 1px solid transparent; display: flex; flex-direction: column; gap: 6px; transition: border-color .12s; }
.health-item:hover { text-decoration: none; border-color: var(--accent); }
.big { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.risk-stack { display: flex; gap: 4px; }
.risk-pill { min-width: 30px; text-align: center; padding: 3px 6px; border-radius: 6px; font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.hero { max-width: 720px; margin: 72px 0 0; }
.hero h1 { font-family: var(--serif); font-size: 44px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em; margin-bottom: 18px; }
.hero p { font-size: 17px; line-height: 1.6; color: var(--ink-2); max-width: 62ch; }
.hero .muted { color: var(--muted); }
.hero-actions { display: flex; gap: 10px; margin: 26px 0 16px; flex-wrap: wrap; }

/* ---------- assessment ---------- */
.score-big { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 6px 0 16px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 0; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { padding: 7px 13px; border-radius: var(--radius-sm); color: var(--ink-2); font-size: 14px; border: 1px solid transparent; }
.tab.active { background: var(--panel); border-color: var(--line); color: var(--ink); font-weight: 600; box-shadow: var(--shadow); }
.tab:hover { text-decoration: none; background: var(--panel); }
.seg { display: inline-flex; border: 1px solid var(--field); border-radius: var(--radius-sm); overflow: hidden; background: var(--panel); }
.seg a, .seg button { padding: 6px 12px; color: var(--ink-2); border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; border-right: 1px solid var(--line); }
.seg a:last-child, .seg button:last-child { border-right: 0; }
.seg a:hover, .seg button:hover { text-decoration: none; background: var(--panel-2); }
.seg .active { background: var(--ink); color: var(--bg); font-weight: 600; }
.seg .active.ok { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.seg .active.bad { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.sub-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.sub-score { font-size: 15px; white-space: nowrap; color: var(--muted); }
.sub-score strong { color: var(--ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.crit { display: grid; grid-template-columns: 96px 1fr 210px; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.crit-pts { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.crit-pts strong { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.crit-body p { margin: 0 0 6px; }
.crit-ctl { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.crit.is-met, .req.st-ok { box-shadow: inset 3px 0 0 var(--ok-line); padding-left: 14px; }
.crit.is-gap, .req.st-bad { box-shadow: inset 3px 0 0 var(--bad-line); padding-left: 14px; }
.req.st-warn { box-shadow: inset 3px 0 0 var(--warn-line); padding-left: 14px; }
.req.st-na { box-shadow: inset 3px 0 0 var(--field); padding-left: 14px; }
.note { margin-top: 8px; font-size: 13px; resize: vertical; min-height: 34px; background: var(--panel-2); border-color: var(--line); }
.band { font-size: 13px; }
.refs { margin-top: 4px; }
.bulk { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: var(--panel-2); border-color: transparent; font-size: 14px; box-shadow: none; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-bg { position: absolute; inset: 0; background: rgba(15, 14, 13, .28); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer.entering .drawer-bg { animation: fade-in .2s ease-out; }
.drawer.entering .drawer-panel { animation: drawer-in .24s cubic-bezier(.2, .8, .2, 1); }
@keyframes fade-in { from { opacity: 0; } }
.modal-open, .modal-open body { overflow: hidden; }
.icon-btn {
  flex: none; width: 34px; height: 34px; display: grid; place-items: center; cursor: pointer; color: var(--muted);
  background: transparent; border: 1px solid transparent; border-radius: var(--radius-sm); transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--panel-2); color: var(--ink); border-color: var(--line); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(720px, 100%); background: var(--panel); overflow-y: auto; box-shadow: var(--lift); }
@keyframes drawer-in { from { transform: translateX(32px); opacity: 0; } }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 2; }
.drawer-head h2 { margin: 4px 0 0; font-size: 19px; }
.drawer-body { padding: 20px 24px; }
.drawer-actions { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; }
.rating-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-weight: 600; font-size: 14px; }

/* ---------- 5330-B certification ---------- */
.verdict { display: flex; gap: 20px; align-items: center; padding: 18px 22px; border-radius: var(--radius); margin-bottom: 18px; }
.verdict.ok { background: var(--ok-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ok-line); } .verdict.bad { background: var(--bad-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--bad-line); }
.verdict-num { font-size: 34px; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.verdict.ok .verdict-num { color: var(--ok); } .verdict.bad .verdict-num { color: var(--bad); }
.stmt { border-left: 4px solid var(--line); }
.stmt.pass { border-left-color: var(--ok-line); } .stmt.fail { border-left-color: var(--bad-line); }
.stmt-head { display: flex; gap: 14px; }
.stmt-icon { width: 28px; height: 28px; flex: none; border-radius: 99px; display: grid; place-items: center; font-weight: 800; color: #fff; }
.pass .stmt-icon { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok-line); } .fail .stmt-icon { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1.5px var(--bad-line); }
.stmt-text { font-family: var(--serif); font-size: 17.5px; line-height: 1.55; color: var(--ink); margin-top: 4px; }
.checks { list-style: none; margin: 6px 0 0 42px; padding: 0; }
.checks li { font-size: 14px; padding: 5px 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.checks li > span { font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 5px; }
.checks li.ok { color: var(--ink-2); }
.checks li.ok > span { background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line); }
.checks li.bad { color: var(--ink-2); }
.checks li.bad > span { background: var(--bad-soft); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-line); }
.phases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 10px; }
.phase { display: flex; gap: 10px; padding: 14px; border-radius: 10px; background: var(--panel-2); }
.phase-n { width: 26px; height: 26px; flex: none; border-radius: 99px; background: var(--warn-soft); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-line); display: grid; place-items: center; font-weight: 700; }

/* ---------- cal-secure ---------- */
.heat { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.heat-col { display: flex; flex-direction: column; gap: 6px; }
.heat-fn { font-size: 13px; font-weight: 650; color: var(--ink-2); padding-bottom: 2px; }
.heat-cell {
  display: flex; justify-content: space-between; gap: 6px; align-items: flex-start; padding: 9px 10px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.3; color: var(--ink); border: 2px solid transparent; min-height: 52px;
}
.heat-cell:hover { text-decoration: none; filter: brightness(.96); }
.heat-cell.sel { border-color: var(--accent); }
.heat-cell b { font-size: 12px; }
.off { background: var(--panel-2); color: var(--muted); border: 1px dashed var(--field); }
.unset { background: var(--panel-2); }
.g0 { background: var(--ok-soft); }
.g1 { background: var(--warn-soft); }
.g2 { background: var(--r-h); }
.g3 { background: var(--r-vh); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--line); }
.levels { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 16px; }
.level { border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-size: 13px; }
.level p { margin: 4px 0 0; color: var(--ink-2); }
.level-name { font-weight: 700; font-size: 13px; }
.level.cur { border-color: var(--warn-line); background: var(--warn-soft); }
.level.tgt { border-color: var(--ok-line); background: var(--ok-soft); }
.refs-block { display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); padding-top: 10px; border-top: 1px solid var(--line-2); }

/* ---------- crosswalk ---------- */
.search { display: flex; gap: 8px; margin: 6px 0 10px; max-width: 680px; }
.search input { font-size: 16px; padding: 11px 14px; border-radius: 10px; }
.search .btn { border-radius: 10px; }
.examples { margin-bottom: 16px; }
.xrow { padding: 9px 0; border-top: 1px solid var(--line-2); font-size: 14px; line-height: 1.5; }
.xrow:first-of-type { border-top: 0; }

/* ---------- requirements library ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 4px 0 18px; position: sticky; top: 0; z-index: 3; background: var(--bg); padding: 10px 0; }
.filters select { width: auto; max-width: 280px; font-size: 13px; padding: 7px 28px 7px 10px; }
.filters input { width: 260px; font-size: 13px; padding: 7px 10px; }
.lib-group > .card-head { padding-bottom: 12px; margin-bottom: 0; border-bottom: 1px solid var(--line); }
.lib-group > .callout { margin: 14px 0 4px; }
.lib-actions { display: flex; align-items: center; gap: 12px; }
.lib-bar { width: 120px; }
.req { display: grid; grid-template-columns: 116px 1fr 200px; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line-2); }
.lib-group > .card-head + .req, .lib-group > .callout + .req { border-top: 0; }
.req-id { display: flex; flex-direction: column; gap: 3px; }
.req-id .mono { font-size: 12.5px; }
.req-body .eyebrow { font-size: 12.5px; margin-bottom: 4px; }
.req-body p { margin: 0 0 6px; }
.req-ctl { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.related { font-size: 13px; margin-top: 6px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(16px); opacity: 0;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); padding: 11px 18px; border-radius: 10px; font-size: 14px; box-shadow: var(--lift);
  transition: opacity .2s, transform .2s; pointer-events: none; z-index: 30;
  display: flex; align-items: center; gap: 10px;
}
.toast::before {
  content: "✓"; flex: none; width: 20px; height: 20px; border-radius: 99px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--ok-soft); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-line);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- responsive ----------
   Above 1240: full sidebar. 900 to 1240: narrower sidebar, two-column cards drop to one at 1100.
   Below 900: the sidebar becomes a top bar so the page gets the full width.
   Below 760: phone layout; editable tables turn into one card per row. */
@media (max-width: 1240px) {
  .shell { grid-template-columns: 224px 1fr; background: linear-gradient(to right, var(--navy) 224px, transparent 224px); }
  .heat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  main { padding: 28px 28px 60px; }
  .grid-2, .health, .phases { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .levels { grid-template-columns: 1fr; }
  .crit, .req { grid-template-columns: 1fr; gap: 10px; }
  .crit-ctl { align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .filters input { width: 100%; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; background: none; }
  .side { position: static; height: auto; overflow: visible; padding: 14px 16px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0 0 12px; }
  #nav { flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
  .nav-group { flex-direction: row; gap: 4px; }
  .nav-label { display: none; }
  #nav a { white-space: nowrap; padding: 7px 10px; }
  #nav a.active::before { display: none; }
}
@media (max-width: 760px) {
  main { padding: 22px 16px 48px; }
  h1 { font-size: 24px; }
  .hero { margin-top: 32px; }
  .hero h1 { font-size: 32px; }
  .grid-3 { grid-template-columns: 1fr; }
  .heat { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.small { grid-template-columns: repeat(2, 1fr); }
  .kpi { padding: 14px 16px; }
  .kpi-value { font-size: 28px; }
  .card { padding: 16px; }
  .deadlines li { grid-template-columns: 1fr auto; }
  .dl-date { grid-column: 1 / -1; }
  .bar-row { grid-template-columns: 70px 1fr 72px; gap: 8px; }
  .page-head { align-items: flex-start; }
  .head-actions { flex-wrap: wrap; }
}

/* Editable tables turn into one card per row on tablets and phones, so nothing scrolls sideways.
   Tablets show the labeled values two to a line; phones one to a line. */
/* The 8-column policy table needs more room, so it stacks sooner. */
@media (max-width: 1300px) {
  .table.stack-wide thead { display: none; }
  .table.stack-wide, .table.stack-wide tbody { display: block; }
  .table.stack-wide tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
  .table.stack-wide tr:last-child { border-bottom: 0; }
  .card.flush .table.stack-wide tr { padding: 16px 20px; }
  .table.stack-wide td, .card:not(.flush) .table.stack-wide td { display: block; padding: 0; border: 0; min-width: 0; background: none; }
  .table.stack-wide tr.clickable:hover { background: var(--panel-2); }
  .table.stack-wide .stack-hide { display: none !important; }
  .table.stack-wide .stack-title { grid-column: 1; }
  .table.stack-wide .stack-badge { grid-column: 2; grid-row: 1; justify-self: end; }
  .table.stack-wide .stack-end { grid-column: 1 / -1; }
  .table.stack-wide td[data-label] { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; white-space: normal; text-align: left; }
  .table.stack-wide td[data-label]::before { content: attr(data-label); font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .table.stack-wide td[data-label] > * { justify-self: start; max-width: 100%; }
  .table.stack-wide td[data-label] > :is(div, input, select) { justify-self: stretch; }
  .table.stack-wide .cell { width: 100%; min-width: 0; }
}
@media (max-width: 1100px) {
  .table.stack thead { display: none; }
  .table.stack, .table.stack tbody { display: block; }
  .table.stack tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
  .table.stack tr:last-child { border-bottom: 0; }
  .card.flush .table.stack tr { padding: 16px 20px; }
  .table.stack td, .card:not(.flush) .table.stack td { display: block; padding: 0; border: 0; min-width: 0; background: none; }
  .table.stack tr.clickable:hover { background: var(--panel-2); }
  .stack-hide { display: none !important; }
  .stack-title { grid-column: 1; }
  .stack-badge { grid-column: 2; grid-row: 1; justify-self: end; }
  .stack-end { grid-column: 1 / -1; }
  .table.stack td[data-label] { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 10px; align-items: center; white-space: normal; text-align: left; }
  .table.stack td[data-label]::before { content: attr(data-label); font-size: 12.5px; font-weight: 600; color: var(--muted); }
  .table.stack td[data-label] > * { justify-self: start; max-width: 100%; }
  .table.stack td[data-label] > :is(div, input, select) { justify-self: stretch; }
  .table.stack .cell { width: 100%; min-width: 0; }
}
@media (max-width: 600px) {
  .table.stack tr { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px 0; }
  .card.flush .table.stack tr { padding: 14px 16px; }
  .table.stack td[data-label] { grid-column: 1 / -1; }
  /* Short read-only lists (gaps, agencies) stack on phones only. */
  .table.stack-phone, .table.stack-phone tbody { display: block; }
  .table.stack-phone thead { display: none; }
  .table.stack-phone tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .table.stack-phone tr:last-child { border-bottom: 0; }
  .table.stack-phone td, .card:not(.flush) .table.stack-phone td { display: block; padding: 0; border: 0; }
  .table.stack-phone .stack-end { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- touch screens (phones, iPads) ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button, select, input, tr.clickable { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
@media (pointer: coarse) {
  /* Safari zooms the page when a field under 16px gets focus. */
  input, select, textarea, .cell, .filters input, .filters select { font-size: 16px; }
  .cell { padding: 8px 10px; }
  input[type=checkbox] { width: 22px; height: 22px; }
  #nav a { padding: 10px 12px; }
  .btn { min-height: 42px; }
  .icon-btn, .theme-toggle { min-width: 40px; min-height: 40px; }
  .link { padding: 8px 0; }
  .heat-cell { min-height: 56px; }
}
/* Hover looks only where there is a real pointer, so a tap doesn't leave rows lit. */
@media (hover: none) {
  tr.clickable:hover td, .table.stack tr.clickable:hover { background: none; }
  #nav a:hover:not(.active) { background: none; }
  tr.clickable:active td, .table.stack tr.clickable:active { background: var(--panel-2); }
}

/* ---------- print (5330-B briefing) ---------- */
@media print {
  .side, .head-actions, .toolbar, .filters, .drawer, .toast { display: none !important; }
  .shell { display: block; background: none; }
  main { padding: 0; max-width: none; }
  .card, .kpis { box-shadow: none; break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* ---------- feel ---------- */
::selection { background: var(--sel, #f3ee9e); color: var(--sel-ink, #0f0e0d); }  /* soft highlighter */
html { scrollbar-color: var(--field) transparent; }
.side { scrollbar-width: thin; }

/* Page change: a short fade, nothing more. */
main.enter { animation: page-in .22s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } }

/* Skip link for keyboard users: hidden until focused. */
.skip {
  position: fixed; top: 10px; left: 10px; z-index: 40; padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--btn); color: var(--btn-ink); font-weight: 600; font-size: 14px; transform: translateY(-160%);
}
.skip:focus { transform: none; text-decoration: none; }

/* "Saved 3:42 PM" in the sidebar footer. */
.saved { font-size: 12px; color: var(--navy-muted); min-height: 18px; opacity: 0; transition: opacity .3s; }
.saved.show { opacity: 1; }

/* Placeholder shown while the data loads. */
.boot { display: flex; flex-direction: column; gap: 14px; padding-top: 6px; }
.boot-line, .boot-block { background: var(--panel-2); border-radius: var(--radius-sm); }
.boot-line { height: 14px; } .boot-line.tall { height: 30px; }
.boot-line.w30 { width: 30%; } .boot-line.w60 { width: 55%; }
.boot-block { height: 120px; border-radius: var(--radius); }
.boot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.boot-grid .boot-block { height: 240px; }
.saved:empty { display: none; }

/* ---------- sign in ---------- */
.auth[hidden], .shell[hidden] { display: none; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 24px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.auth-card h1 { font-size: 24px; margin: 0 0 6px; }
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.auth-note { font-size: 14px; color: var(--ink-2); background: var(--panel-2); border-radius: var(--radius-sm); padding: 9px 12px; margin: 10px 0 16px; }
.auth-error, .form-error { font-size: 13.5px; line-height: 1.45; color: var(--bad); background: var(--bad-soft); box-shadow: inset 0 0 0 1px var(--bad-line); border-radius: var(--radius-sm); padding: 9px 12px; margin: 10px 0 14px; }
.auth-error[hidden], .form-error[hidden] { display: none; }
.auth form { margin-top: 18px; }
.auth-foot { font-size: 13px; color: var(--muted); margin: 18px 0 0; line-height: 1.5; }
.btn.block { width: 100%; justify-content: center; padding-top: 10px; padding-bottom: 10px; margin-top: 4px; }
form.narrow { max-width: 420px; }

/* ---------- account (sidebar foot) ---------- */
.account { margin-bottom: 6px; }
.who-name { font-size: 13.5px; font-weight: 600; color: var(--navy-strong); line-height: 1.3; }
.who-role { font-size: 12px; color: var(--navy-muted); line-height: 1.4; overflow-wrap: anywhere; }
.who-actions { display: flex; gap: 14px; margin-top: 6px; }
.who-actions .link { font-size: 12.5px; color: var(--navy-ink); }
.saved.bad { color: var(--bad); }

/* ---------- roles, team, workbooks ---------- */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain:disabled input, fieldset.plain:disabled select { background: var(--panel-2); color: var(--muted); cursor: not-allowed; }
fieldset.plain:disabled .btn, fieldset.plain:disabled .link { display: none; }
.callout.ok { background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-line); }
.callout.wide { margin: 0 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.callout.review { margin: 0 0 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.fresh { margin: 0 0 18px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.fresh p { margin: 8px 0 0; }
.temp-pw { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.temp-pw code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .02em; background: var(--panel); border: 1px solid var(--ok-line); border-radius: var(--radius-sm); padding: 5px 10px; user-select: all; }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .link + .link { margin-left: 14px; }
.roles { display: grid; gap: 14px; }
.role h3 { margin: 0 0 4px; }
.role ul { margin: 0; padding-left: 18px; color: var(--ink-2); line-height: 1.55; }
.head-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.wb-rows { display: grid; gap: 0; margin-top: 6px; }
.wb-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.wb-row .head-actions { flex-wrap: wrap; }
.link.inline { font-size: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 0; vertical-align: baseline; }
.head-actions { flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 900px) {
  /* The sidebar becomes a top bar; keep the account controls reachable in it. */
  .side-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; padding: 10px 0 0; }
  .account { display: flex; align-items: center; gap: 14px; margin: 0; flex-wrap: wrap; }
  .who-actions { margin: 0; }
  .head-side { align-items: flex-start; }
}
@media (max-width: 760px) {
  .who-role { display: none; }
  .account { gap: 4px 14px; }
  .head-actions { justify-content: flex-start; }
  .row-actions { text-align: left; white-space: normal; }
  .fresh, .callout.review { flex-direction: column; }
  .auth-card { padding: 24px 20px 20px; }
}

