/* The app's look, from the platform owner's operator screens (design/operator-screens/):
   IBM Plex Sans with Plex Mono for codes, a warm ground, white cards, a slate sidebar and a
   deep teal for actions. Plain HTML elements are styled here, so every page takes the look;
   the classes below shape the screens the mockups drew. Fonts are served with the app. */

@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-400-normal.77bc02670657.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-500-normal.f7016cd446d2.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-600-normal.196e3cbc5fee.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-400-normal.1bc0d8e41d21.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-500-normal.93a0df997e00.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-600-normal.8fccbdf5bf67.woff2") format("woff2");
  unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF; }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-400-normal.79936b18df9f.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap;
  src: url("fonts/ibm-plex-mono-latin-500-normal.b1c8a895f5fd.woff2") format("woff2"); }

:root {
  --ground: #F3F1EC;
  --surface: #FFFFFF;
  --surface-sunk: #FAF9F6;
  --quote: #F6F4EF;
  --ink: #1B1D20;
  --ink-2: #33373C;
  --muted: #575C63;
  --line: #DCD8D0;
  --line-soft: #EDEAE4;
  --field: #B9B4AA;
  --accent: #1D5C63;
  --accent-deep: #123E43;
  --accent-soft: #E3EEEE;
  --accent-wash: #EEF5F5;
  --mark: #CFE3E3;
  --side: #1E2A2E;
  --side-hover: #2A383D;
  --side-current: #2F4449;
  --side-ink: #D6DEDF;
  --side-muted: #9FB0B3;
  --amber-soft: #FBEFD3;
  --amber-ink: #6B4400;
  --red-soft: #F8E1E0;
  --red-ink: #7A1F1F;
  --neutral-soft: #E7E4DD;
  --radius: 8px;
  --radius-sm: 6px;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 400 15px/1.5 var(--sans);
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-deep); }
code, kbd, samp, .mono { font-family: var(--mono); font-size: 0.9em; }
small, .muted { color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
img, svg { max-width: 100%; }
mark { background: var(--mark); color: var(--ink); padding: 2px 0;
  border-bottom: 2px solid var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* --- The shell: sidebar, top bar, content -------------------------------------------------- */

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 2px; padding: 20px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .brand { display: block; padding: 8px 12px 20px; line-height: 0; }
.sidebar .code { padding: 8px 12px; font: 500 11px/1.4 var(--mono); letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--side-muted); }
.sidebar .group { padding: 14px 12px 4px; font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--side-muted); }
.sidebar .nav { display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--side-ink); text-decoration: none; font-size: 14px; }
.sidebar .nav:hover { background: var(--side-hover); color: #FFFFFF; }
.sidebar .nav[aria-current="page"] { background: var(--side-current); color: #FFFFFF;
  font-weight: 500; }
.sidebar .back { margin-bottom: 4px; font-size: 13px; color: var(--side-muted); }
.sidebar .spacer { flex-grow: 1; }
.sidebar .foot { padding: 12px; font-size: 12px; color: var(--side-muted); line-height: 1.5; }

.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 56px; flex-shrink: 0; display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 0 32px; background: var(--surface);
  border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted);
}
.topbar .crumbs { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .crumbs strong { color: var(--ink); font-weight: 500; }
.topbar .who { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 16px; background: var(--accent);
  color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; }
.content { padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 20px;
  max-width: 1440px; width: 100%; }

/* A page without the shell: sign-in, a respondent's survey, the workspace chooser. */
.plain { max-width: 720px; margin: 0 auto; padding: 48px 24px; }
.plain > .brand { display: inline-block; margin-bottom: 28px; line-height: 0; }
/* The logo: "Pulsoq by Avivoq", drawn (static/web/brand), white tile on the slate sidebar. */
.brand img { display: block; height: 40px; width: auto; }
.plain > .brand img { height: 44px; }

/* Signing in and out (the login library's pages): one card centred on the ground. */
body.auth { min-height: 100vh; display: flex; }
.auth-page { flex-grow: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 24px; padding: 48px 20px; }
.auth-page > .brand { line-height: 0; }
.auth-page > .brand img { height: 44px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px;
  padding: 32px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 1px 2px rgba(27, 29, 32, 0.04), 0 12px 32px rgba(27, 29, 32, 0.06); }
.auth-head { display: flex; flex-direction: column; gap: 8px; }
.auth-head h1 { font-size: 22px; }
.auth-head .lead { color: var(--muted); }
.auth-card .providers { display: flex; flex-direction: column; gap: 10px; }
.auth-card .providers button, .auth-card > .button { width: 100%; }
/* The provider's own button (Google's guidelines: white, grey outline, its logo on the left). */
.auth-card button.provider[type="submit"] { min-height: 44px; gap: 12px; background: #FFFFFF;
  border: 1px solid #747775; border-radius: 4px; color: #1F1F1F; font-weight: 500; }
.auth-card button.provider[type="submit"]:hover { background: #F7F8F8; border-color: #747775;
  color: #1F1F1F; box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15); }
.auth-card button.provider svg { flex-shrink: 0; }
.auth-note { padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13px;
  color: var(--muted); }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  font-size: 13px; color: var(--muted); }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--accent); text-decoration: underline; }
@media (max-width: 480px) { .auth-card { padding: 24px 20px; } }

/* --- Type ------------------------------------------------------------------------------------ */

h1 { margin: 0; font-size: 26px; line-height: 1.25; font-weight: 600; }
h2 { margin: 0; font-size: 17px; line-height: 1.35; font-weight: 600; }
h3 { margin: 0; font-size: 13px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--muted); }
p { margin: 0; }
.content > p, .card > p { max-width: 75ch; }
.lede { font-size: 14px; color: var(--muted); }

/* --- Cards: an article, a section card, a fact or finding ------------------------------------ */

.card, .content > article, .content > section > article, article.fact, article.finding {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; display: flex; flex-direction: column; gap: 14px;
}
article article.fact { background: var(--surface-sunk); }
.content > ul, .content > ol { margin: 0; padding: 0; list-style: none; display: flex;
  flex-direction: column; gap: 8px; }
.content > ul > li, .content > ol > li { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

/* A definition list reads as label and value side by side. */
dl { margin: 0; display: grid; grid-template-columns: minmax(120px, max-content) 1fr;
  gap: 8px 20px; font-size: 14px; }
dt { color: var(--muted); }
dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
blockquote { margin: 0; padding: 14px 18px; border-radius: var(--radius-sm);
  background: var(--quote); font-size: 15px; line-height: 1.7; }

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

table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); }
.content > table, .table {
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: block; overflow-x: auto;
}
.content > table > *, .table > * { display: table; width: 100%; }
.content > table > thead, .content > table > tbody { display: table-row-group; }
th { text-align: left; padding: 11px 14px; font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
  background: var(--surface-sunk); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--accent-wash); }
td small { display: block; margin-top: 2px; font-size: 12px; }

/* --- Tags: status, confidence, severity -------------------------------------------------------- */

.chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px;
  font-weight: 500; line-height: 1.6; background: var(--neutral-soft); color: var(--ink);
  white-space: nowrap; }
.chip.teal, .chip.supported, .chip.accepted, .chip.done, .chip.low { background: var(--accent-soft);
  color: var(--accent-deep); }
.chip.amber, .chip.indicated, .chip.candidate, .chip.medium, .chip.demo { background: var(--amber-soft);
  color: var(--amber-ink); }
.chip.red, .chip.contested, .chip.rejected, .chip.high, .chip.critical, .chip.blocked {
  background: var(--red-soft); color: var(--red-ink); }
.chip.solid { background: var(--accent); color: #FFFFFF; }

/* --- Forms and buttons -------------------------------------------------------------------------- */

form { display: flex; flex-direction: column; gap: 14px; }
form p { display: flex; flex-direction: column; gap: 6px; }
form.inline, td form, .actions form { flex-direction: row; flex-wrap: wrap; align-items: flex-end;
  gap: 10px; }
label { font-size: 13px; font-weight: 500; color: var(--ink); }
label:has(> input[type="checkbox"]), label:has(> input[type="radio"]) { display: inline-flex;
  align-items: center; gap: 8px; font-weight: 400; font-size: 14px; }
input[type="text"], input[type="email"], input[type="number"], input[type="date"],
input[type="url"], input[type="password"], input[type="search"], input:not([type]),
select, textarea {
  font: inherit; font-size: 15px; font-weight: 400; color: var(--ink); background: var(--surface);
  border: 1px solid var(--field); border-radius: var(--radius-sm); min-height: 44px;
  padding: 8px 12px; width: 100%; max-width: 480px;
}
textarea { min-height: 96px; max-width: 75ch; line-height: 1.5; }
input[type="file"] { font: inherit; font-size: 14px; }
input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
.helptext, form p .helptext { font-size: 13px; font-weight: 400; color: var(--muted); }
ul.errorlist { margin: 0; padding: 0; list-style: none; color: var(--red-ink); font-size: 13px; }
.error, p.error { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--red-soft);
  color: var(--red-ink); font-size: 14px; }
.notice { display: flex; gap: 12px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--accent-soft); color: var(--accent-deep); font-size: 14px; line-height: 1.5; }
.notice.warn { background: var(--amber-soft); color: #5E3C00; }

button, .button {
  font: inherit; font-size: 14px; font-weight: 500; min-height: 44px; padding: 0 18px;
  border-radius: var(--radius-sm); border: 1px solid var(--accent); background: var(--surface);
  color: var(--accent); cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
button:hover, .button:hover { background: var(--accent-wash); color: var(--accent-deep); }
button.primary, .button.primary, button[value="accept"], button[value="set"],
form > button[type="submit"]:only-of-type, form > p + button[type="submit"]:last-child {
  background: var(--accent); color: #FFFFFF; border-color: var(--accent);
}
button.primary:hover, .button.primary:hover, button[value="accept"]:hover,
button[value="set"]:hover, form > button[type="submit"]:only-of-type:hover {
  background: var(--accent-deep); border-color: var(--accent-deep); color: #FFFFFF;
}
button.danger, button[value="reject"], button[value="clear"], button[value="delete"],
button[value="remove"], button[value="revoke"] {
  border-color: var(--field); color: var(--red-ink); background: var(--surface);
}
button.danger:hover, button[value="reject"]:hover, button[value="clear"]:hover {
  background: var(--red-soft); color: var(--red-ink);
}
button.quiet { border-color: var(--field); color: var(--ink); }
button:disabled { background: #C9CFCF; border-color: #C9CFCF; color: #3E4447; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.actions.end { justify-content: flex-end; }

/* --- Page head and split views --------------------------------------------------------------- */

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px; }
.page-head > div { display: flex; flex-direction: column; gap: 6px; }
.split { display: flex; gap: 24px; align-items: flex-start; }
.split > .list { flex-grow: 1; min-width: 0; }
.split > .detail { width: 480px; flex-shrink: 0; position: sticky; top: 24px; }
.stepper { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 13px; }
.stepper li { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--neutral-soft);
  color: var(--muted); }
.stepper li.done { background: var(--accent-soft); color: var(--accent-deep); }
.stepper li[aria-current] { background: var(--accent); color: #FFFFFF; font-weight: 500; }

/* --- Narrow screens: the sidebar folds above the page, tables scroll in their box ---------- */

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap;
    align-items: center; padding: 10px 12px; }
  .sidebar .brand { padding: 8px 12px; }
  .sidebar .brand img { height: 32px; }
  .sidebar .group, .sidebar .spacer, .sidebar .foot { display: none; }
  .topbar { padding: 0 16px; }
  .topbar .who > span:not(.avatar) { display: none; }
  .content { padding: 20px 16px 40px; }
  .split { flex-direction: column; }
  .split > .detail { width: 100%; position: static; }
  .grid-2 { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; gap: 2px 0; }
  dd { margin-bottom: 8px; }
}

/* --- Workspace home tiles, the workspace chooser, survey questions ------------------------- */

ul.tiles { margin: 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
ul.tiles a { display: block; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); font-weight: 500;
  text-decoration: none; color: var(--ink); }
ul.tiles a:hover { border-color: var(--accent); color: var(--accent); }
form.choices p { flex-direction: row; align-items: center; gap: 12px; }
button.choice { min-width: 280px; justify-content: flex-start; background: var(--surface);
  color: var(--ink); border-color: var(--line); font-size: 15px; }
button.choice:hover { border-color: var(--accent); color: var(--accent); }
fieldset { margin: 0; padding: 16px 20px 18px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface); display: flex;
  flex-direction: column; gap: 10px; }
legend { padding: 0 6px; font-weight: 500; font-size: 15px; }

/* --- A list beside its detail (findings, review queue) ----------------------------------------- */

.split .list table { border: 0; }
.selecting [data-target] { cursor: pointer; }
.selecting [data-target][aria-selected="true"] td { background: var(--accent-wash); }
.selecting [data-target][aria-selected="true"] td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.row-link { color: var(--ink); text-decoration: none; font-weight: 500; }
.row-link:hover { color: var(--accent); text-decoration: underline; }
.panels { display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 48px);
  overflow-y: auto; }
.panel-head { display: flex; flex-direction: column; gap: 6px; }
.panel-head h2 { font-size: 19px; }
.panel-head .mono { font-size: 12px; }
details { border-top: 1px solid var(--line-soft); padding-top: 12px; }
details > summary { cursor: pointer; font-size: 14px; font-weight: 500; color: var(--accent); }
details[open] > summary { margin-bottom: 12px; }
article.fact { padding: 14px 16px; gap: 8px; }
article.fact h3 { text-transform: none; letter-spacing: 0; font-family: var(--mono);
  font-size: 12px; font-weight: 500; color: var(--accent); }
article.fact dl { font-size: 13px; gap: 4px 14px; }
form.actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
form.actions.end { justify-content: flex-end; }

/* --- Review queue: proposals beside their evidence -------------------------------------------- */

.stack { display: flex; flex-direction: column; gap: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); text-decoration: none; }
.tabs a:hover { border-color: var(--accent); color: var(--accent); }
ul.queue { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px;
  width: 400px; flex-grow: 0; flex-shrink: 0; }
ul.queue li { padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface);
  border: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
ul.queue li[aria-selected="true"] { border: 2px solid var(--accent); padding: 11px 13px; }
ul.queue .attr { font-size: 12px; color: var(--muted); }
ul.queue li[aria-selected="true"] .attr { color: var(--accent); }
ul.queue .meta { font-size: 12px; color: var(--muted); }
.split > .detail.wide { width: auto; flex-grow: 1; min-width: 0; }
.panel-head.row { flex-direction: row; flex-wrap: wrap; justify-content: space-between;
  align-items: flex-start; gap: 16px; }
.panel .panel-head h2 { font-size: 22px; }
.panel > article.fact { background: var(--surface); padding: 20px 24px; }
.panel > article.fact dl { font-size: 14px; }
.panel > article.fact dd mark { font-size: 16px; }
h3.title { text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); }
p.anchor { padding: 12px 16px; border-radius: var(--radius-sm); background: var(--quote);
  line-height: 1.7; }
q { quotes: "“" "”"; }
.empty { color: var(--muted); padding: 16px 20px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--surface-sunk); }
@media (max-width: 900px) { ul.queue { width: 100%; } }
[hidden] { display: none !important; }
.split > ul.queue { flex-grow: 0; }
.split > .detail.wide { flex-shrink: 1; }
.panel > article.fact > h3 { display: none; }  /* the panel's heading already names it */

/* --- Engagement overview: setup at a glance ------------------------------------------------------ */

.stepper li a { color: inherit; text-decoration: none; }
.stepper li a:hover { text-decoration: underline; }
ul.checks, ul.gates, ul.plain-list { margin: 0; padding: 0; list-style: none; display: flex;
  flex-direction: column; gap: 8px; }
ul.checks li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
ul.checks li span:not(.chip) { grid-column: 1; font-size: 13px; color: var(--muted); }
ul.checks li .chip { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
ul.gates li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px;
  border-radius: var(--radius-sm); font-size: 14px; }
ul.gates li span:first-child { font-weight: 500; }
ul.gates li.blocked { background: var(--red-soft); }
ul.gates li.blocked span:last-child { color: var(--red-ink); font-size: 13px; }
ul.gates li.open { background: var(--accent-soft); color: var(--accent-deep); }
ul.plain-list li { font-size: 13px; }
tr.dim td { color: var(--muted); }
.card table th { background: transparent; padding-left: 0; }
.card table td { padding-left: 0; }
.card table tbody tr:hover td { background: transparent; }

/* --- Setup pages ------------------------------------------------------------------------------- */

.narrow { max-width: 720px; }
label.check-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 400; font-size: 14px; }
label.check-card:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
label.check-card input { margin-top: 2px; flex-shrink: 0; }
label.check-card > span { display: flex; flex-direction: column; gap: 3px; }
label.check-card > span > span { font-size: 13px; color: var(--muted); }
table.edit td { vertical-align: middle; padding: 8px 10px; }
table.edit select { min-width: 130px; min-height: 38px; padding: 4px 8px; font-size: 14px; }
table.edit textarea { min-height: 38px; min-width: 200px; font-size: 14px; padding: 6px 8px; }
ul.error { margin: 0; list-style: none; }

/* --- The process page: the diagram beside the selected step or flow -------------------------- */

.small-link { font-size: 13px; text-decoration: none; }
.eyebrow { font-size: 12px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.diagram-split { align-items: stretch; }
.card.diagram { padding: 0; gap: 0; overflow: hidden; }
.diagram-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.diagram-bar.foot { border-bottom: 0; border-top: 1px solid var(--line-soft); }
.canvas { height: 62vh; min-height: 420px; background: var(--surface); }
button.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.element-panels { width: 340px; }
.element-panels .panel { display: flex; flex-direction: column; gap: 14px; }
ul.facts li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 13px; }
.djs-element.picked .djs-visual > :nth-child(1) { stroke: var(--accent) !important; stroke-width: 3px !important; }
.djs-connection.picked .djs-visual > path { stroke: var(--accent) !important; stroke-width: 3px !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
select.compact, input.compact { min-height: 36px; width: auto; max-width: 110px; padding: 4px 8px; font-size: 13px; }
@media (max-width: 900px) { .element-panels { width: 100%; } .canvas { height: 50vh; } }
.split > .detail.element-panels { width: 340px; }

/* --- Forms keep their buttons to their natural width ------------------------------------------- */

form > button, form > .button, form > p > button { align-self: flex-start; }
form.actions > button, form.inline > button { align-self: auto; }
.small { font-size: 12px; }
td.nowrap { white-space: nowrap; }
td.prose { max-width: 70ch; line-height: 1.55; }

/* --- Scorecard grid ---------------------------------------------------------------------------- */

table.scorecard td.cell { padding: 6px; text-align: center; vertical-align: middle; }
table.scorecard th:not(:first-child) { text-align: center; }
table.scorecard td.figure { text-align: center; vertical-align: middle; font: 600 16px/1 var(--mono); }

/* Overall maturity above the scorecard: the figure, its level, the spider chart (DESIGN.md 10.1). */
.card.maturity { flex-direction: row; flex-wrap: wrap; gap: 16px 40px; align-items: center; }
.maturity-figure { flex: 1 1 240px; display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.maturity-figure .big { display: flex; align-items: baseline; gap: 8px; }
.maturity-figure .big strong { font: 600 60px/1 var(--sans); letter-spacing: -0.02em;
  color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.maturity-figure .big span { font-size: 15px; color: var(--muted); }
.maturity-figure .level { font-weight: 600; font-size: 16px; }
.maturity-figure p { font-size: 13.5px; margin: 0; }
.radar { flex: 2 1 420px; min-width: 0; max-width: 720px; height: auto; }
.radar .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.radar .spoke { stroke: var(--line-soft); stroke-width: 1; }
.radar .shape { fill: var(--accent); fill-opacity: 0.14; stroke: var(--accent); stroke-width: 2;
  stroke-linejoin: round; }
.radar .dot { fill: var(--accent); }
.radar .tick { font: 400 10px var(--mono); fill: var(--muted); }
.radar .label { font: 400 12px var(--sans); fill: var(--ink-2); }
.radar .label .fig { font: 600 12px var(--mono); fill: var(--accent-deep); }
a.level { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 56px; border-radius: var(--radius-sm); border: 1px dashed var(--line);
  text-decoration: none; color: var(--ink); }
a.level:hover { border-color: var(--accent); }
a.level.set { background: var(--accent-soft); border: 1px solid transparent; color: var(--accent-deep); }
a.level.proposed { background: var(--amber-soft); border: 1px solid transparent; color: var(--amber-ink); }
a.level strong { font-size: 20px; line-height: 1; }
a.level small { font-size: 11px; }

/* --- Narrow screens: the sidebar is one row that scrolls sideways ------------------------------ */

@media (max-width: 900px) {
  .sidebar { flex-wrap: nowrap; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .sidebar .nav { white-space: nowrap; flex-shrink: 0; }
  .sidebar .back, .sidebar .code { display: none; }
}

/* --- Walk mode on a tablet (DESIGN.md 17.3, phase 12): read on the floor, with a finger, at
   arm's length. Only the page's content grows; the shell stays as it is. ------------------- */

body.walk .content { font-size: 18px; }
body.walk .content input, body.walk .content select, body.walk .content textarea {
  max-width: none; min-height: 52px; font-size: 18px; }
body.walk .content form > button, body.walk .content form button[type="submit"] {
  align-self: stretch; min-height: 56px; font-size: 19px; }
ul.walk-tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
ul.walk-tiles a { display: flex; flex-direction: column; gap: 6px; min-height: 88px;
  font-weight: 400; }
ul.walk-tiles a strong { font-weight: 600; color: var(--accent); }
ul.walk-tiles .reading { font-size: 15px; }

/* --- Client portal ---------------------------------------------------------------------------- */

ul.portal-tiles a { display: flex; flex-direction: column; gap: 6px; min-height: 120px; }
ul.portal-tiles strong { font-size: 22px; }
ul.report-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column;
  gap: 10px; }
ul.report-list li.card { flex-direction: row; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; }
ul.report-list li.card > div { display: flex; flex-direction: column; gap: 4px; }

/* --- A report read as a document beside its validation and approval --------------------------- */

.report-split .document { padding: 32px 40px; gap: 28px; }
.document .section { display: flex; flex-direction: column; gap: 12px; max-width: 80ch; }
.document .section > h2 { font-size: 20px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.document .section > p { line-height: 1.65; }
.finding-block { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px;
  border-radius: var(--radius-sm); background: var(--surface-sunk); }
p.chips { display: flex; gap: 8px; align-items: center; }
.report-side { width: 340px; }
.split > .detail.report-side { width: 340px; }
ul.failures li { font-size: 13px; color: var(--red-ink); }

/* --- A page's form as a card --------------------------------------------------------------------- */

form.form-card { gap: 4px; }
form.form-card > p { padding: 8px 0; }
form.form-card > .actions { padding-top: 12px; border-top: 1px solid var(--line-soft); margin-top: 8px; }
form.form-card ul.errorlist { order: 0; }
.danger-card { border-color: #E6B8B5; }
.danger-card h2 { color: var(--red-ink); }
button.danger:not(:hover) { background: var(--surface); }

/* --- Figures in a row, rubric criteria ------------------------------------------------------- */

ul.kpis { margin: 0; padding: 0; list-style: none; display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
ul.kpis li { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  border-radius: var(--radius-sm); background: var(--surface-sunk); }
ul.kpis span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
ul.kpis strong { font-size: 20px; font-weight: 600; }
ol.criteria { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
ol.criteria li { display: flex; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); font-size: 14px; }
ol.criteria li.current { border-color: var(--accent); background: var(--accent-wash); }
.level-number { flex-shrink: 0; width: 28px; height: 28px; border-radius: 14px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--neutral-soft); font-weight: 600; }
ol.criteria li.current .level-number { background: var(--accent); color: #FFFFFF; }
.big-level { font-size: 44px; font-weight: 600; color: var(--accent-deep); line-height: 1; }

/* --- Transcript review, interview guides ------------------------------------------------------- */

.transcript { gap: 10px; }
ol.segments { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column;
  gap: 2px; max-height: 70vh; overflow-y: auto; }
ol.segments li { display: grid; grid-template-columns: 64px 64px 1fr; gap: 10px; padding: 8px 6px;
  border-bottom: 1px solid var(--line-soft); font-size: 14px; line-height: 1.6; }
.seg-meta { color: var(--muted); font-size: 11px; padding-top: 3px; }
.seg-speaker { color: var(--accent); font-size: 12px; padding-top: 2px; }
ul.people li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 14px;
  padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
ul.people small { flex-basis: 100%; }
ol.questions { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
ol.questions li { line-height: 1.55; padding-left: 4px; }
ol.questions li span:first-child { margin-right: 6px; }

/* --- Printing a guide or a page: the content only -------------------------------------------- */

@media print {
  .sidebar, .topbar, .no-print, button { display: none !important; }
  body { background: #FFFFFF; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; }
}
select.compact.wide { max-width: 320px; }

/* A danger or quiet button keeps its look even when it is a form's only button. */
form > button.danger, form > button.danger:only-of-type, button.danger {
  background: var(--surface); color: var(--red-ink); border-color: var(--field); }
form > button.danger:hover, button.danger:hover { background: var(--red-soft); color: var(--red-ink); }
form > button.quiet, form > button.quiet:only-of-type, button.quiet, .button.quiet {
  background: var(--surface); color: var(--ink); border-color: var(--field); }
form > button.quiet:hover, button.quiet:hover, .button.quiet:hover {
  background: var(--accent-wash); color: var(--accent-deep); border-color: var(--accent); }

/* Benchmarks (DESIGN.md 11.1): the client's figure beside the published ones. */
.benchmark-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end;
  gap: 12px 24px; }
.benchmark-head h2 { margin: 4px 0 0; font-size: 19px; }
.client-figure { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.client-figure strong { font: 600 32px/1 var(--sans); color: var(--accent-deep);
  font-variant-numeric: tabular-nums; }
.client-figure span { font-size: 13px; color: var(--muted); }
.client-figure small { font-size: 12.5px; color: var(--muted); }
.benchmark tr.home td { background: var(--accent-wash); }
.benchmark td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Maturity assessments (DESIGN.md 10.1): the profile's chart, the area's ladder, the floor audit. */
.radar-wrap { flex: 2 1 420px; min-width: 0; max-width: 720px; margin: 0; display: flex;
  flex-direction: column; gap: 6px; }
.radar-wrap .radar { max-width: 100%; }
.radar .target { fill: none; stroke: var(--amber-ink); stroke-width: 1.5; stroke-dasharray: 5 4; }
.legend { display: flex; gap: 14px; align-items: center; font-size: 12.5px; color: var(--muted); }
.legend .key { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--accent); }
.legend .key.target { border-top: 2px dashed var(--amber-ink); }
.legend .key.rated { border-top: 2px dotted var(--ink-2); }
.radar .rated { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 2 3; }
.radar .rated-dot { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.5; }
.self-figure { font-size: 14px; margin: 0; }
.self-figure strong { font: 600 17px var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.wrap-form { align-items: flex-end; }
.wrap-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.gaps ol { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px;
  font-size: 14px; }
table.profile td.figure { text-align: center; font: 600 16px/1 var(--mono); }
fieldset.ladder { display: flex; flex-direction: column; gap: 8px; border: 0; padding: 0; margin: 0; }
fieldset.ladder legend { font-weight: 600; margin-bottom: 6px; }
.ladder .rung { display: grid; grid-template-columns: auto 28px 1fr; gap: 10px; align-items: start;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer; }
.rung:has(input:checked) { border-color: var(--accent); background: var(--accent-wash); }
.rung b { display: block; font-size: 13px; }
.rung .lvl { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 6px;
  background: var(--accent); color: #FFFFFF; font: 600 13px var(--mono); }
label.check { display: block; font-size: 14px; padding: 4px 0; }
.audit fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
.audit legend { font-weight: 600; padding: 0 6px; }
.audit-item { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft); }
.audit-item:last-child { border-bottom: 0; padding-bottom: 0; }
.audit-item .choices { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.audit-item .choices label { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; }

fieldset.ladder legend .heading { display: block; font-size: 17px; font-weight: 600; color: var(--ink); }
fieldset.ladder legend .question { display: block; font-weight: 400; color: var(--ink-2); margin-top: 2px; }
fieldset.ladder + fieldset.ladder { margin-top: 18px; }

/* The ISO 9001:2026 pages (DESIGN.md 16.3): the summary figures and the status chips. */
.iso-figures { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.iso-figures div { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.iso-figures strong { font: 600 28px/1.1 var(--sans); color: var(--accent-deep);
  font-variant-numeric: tabular-nums; }
.iso-figures span { font-size: 13px; color: var(--muted); }
.chip.status-conforms, .chip.status-present { background: var(--accent-soft); color: var(--accent-deep); }
.chip.status-partial, .chip.status-outdated { background: var(--amber-soft); color: var(--amber-ink); }
.chip.status-gap, .chip.status-missing { background: var(--red-soft); color: var(--red-ink); }
.chip.status-not_applicable { background: var(--neutral-soft); color: var(--ink-2); }
.choices-row { display: flex; flex-wrap: wrap; gap: 8px 20px; border: 0; padding: 0; margin: 0; }
.choices-row legend { font-weight: 600; margin-bottom: 6px; }
.doc-item header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.doc-item h3 { margin: 0; font-size: 15px; flex: 1 1 280px; }
ul.plain-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }

/* Client documents (DESIGN.md 7.6): a document's converted text. */
.document-text p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; max-width: 80ch; }
.inline-form { display: inline; }

/* The name scan's findings in a text under review (DESIGN.md 7.3 step 5): amber, not the teal
   of a quote, since each is a question for the reviewer. */
mark.found { background: var(--amber-soft); color: var(--amber-ink); border-bottom: 2px solid #D9A441;
  padding: 0 2px; border-radius: 2px; }
.found-list ul { display: flex; flex-direction: column; gap: 12px; }
.found-list li { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft); }
.found-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.found-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.found-actions form.inline { align-items: center; gap: 8px; }
.found-actions label { font-weight: 400; }
.found-actions select { width: auto; max-width: 200px; min-height: 32px; padding: 4px 8px;
  font-size: 13px; }

/* An image beside its reading (DESIGN.md 7.6). */
.reading-split > .list { padding: 16px; }
.reading-image img { display: block; width: 100%; height: auto; border-radius: var(--radius-sm);
  border: 1px solid var(--line-soft); }
.reading-image p { margin: 8px 0 0; }
.reading-text { font-size: 15px; line-height: 1.6; }
.reading-text p { margin: 0 0 10px; }
/* An org chart's proposal under its image (DESIGN.md 7.6): charts are wide, so the image takes
   the page's width, above the form. */
.org-chart-import { display: flex; flex-direction: column; gap: 20px; }
.org-chart-import > .reading-image { padding: 16px; }
.org-chart-import > .reading-image img { max-height: 60vh; width: auto; max-width: 100%; margin: 0 auto; }
.org-chart-form { display: flex; flex-direction: column; gap: 12px; padding: 20px; }
.org-chart-form h2 { margin: 8px 0 0; }
.org-chart-form table input[type="text"], .org-chart-form table select { min-height: 36px;
  padding: 4px 8px; font-size: 14px; }
.org-chart-form input.narrow { max-width: 90px; min-height: 36px; padding: 4px 8px; }

/* Points to check from shorthand notes (DESIGN.md 7.3). */
.open-points ul { display: flex; flex-direction: column; gap: 6px; }
.open-points li { padding-left: 24px; position: relative; }
.open-points li::before { content: "??"; position: absolute; left: 0; top: 2px; font-family: var(--mono);
  font-size: 11px; color: var(--amber-ink); }

/* Typed notes with the shorthand helper (DESIGN.md 7.3). */
.notes-editor { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 20px;
  align-items: start; }
.notes-form { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.notes-form textarea { width: 100%; max-width: none; min-height: 60vh; font-family: var(--mono);
  font-size: 14px; line-height: 1.75; resize: vertical; }
.notes-form .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.notes-help ol.shorthand-lines { list-style: none; margin: 0; padding: 0; max-height: 44vh; overflow-y: auto;
  display: flex; flex-direction: column; }
.shorthand-lines li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px; padding: 7px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.shorthand-lines li:last-child { border-bottom: 0; }
.shorthand-lines .ln { font-family: var(--mono); font-size: 11px; color: var(--muted); text-align: right;
  padding-top: 2px; }
.shorthand-lines .chips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 2px; }
.shorthand-lines .chip.kind { font-family: var(--mono); font-size: 11px; }
.shorthand-lines .chip.said, .shorthand-lines .chip.people { background: var(--accent-soft); color: var(--accent-deep); }
.shorthand-lines .chip.own { background: var(--amber-soft); color: var(--amber-ink); }
.shorthand-lines .chip.off, .shorthand-lines .chip.warn { background: var(--red-soft); color: var(--red-ink); }
.shorthand-lines .chip.fig { background: var(--surface-sunk); border: 1px solid var(--line); font-family: var(--mono);
  font-size: 11px; }
.notes-marks dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 12px; margin: 0;
  font-size: 13px; }
.notes-marks dt { font-family: var(--mono); color: var(--accent-deep); }
.notes-marks dd { margin: 0; color: var(--ink-2); }
@media (max-width: 1000px) { .notes-editor { grid-template-columns: 1fr; } }

/* A maturity gap and the finding raised from it (DESIGN.md 11.1). */
.gaps li form.inline { display: inline-flex; margin: 0 0 0 8px; vertical-align: middle; }
.gap-finding { display: inline-flex; align-items: center; gap: 8px; margin-left: 8px; }
.suggested-templates { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; }
.suggested-templates ul { display: flex; flex-direction: column; gap: 6px; }

/* MCT by product family (DESIGN.md 9.2): the path an order's critical time runs along. */
.mct-family { display: flex; flex-direction: column; gap: 12px; }
.mct-family .actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mct-family form.inline select { width: auto; max-width: 320px; min-height: 36px; padding: 4px 8px; }
ol.mct-path { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
ol.mct-path li { font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--surface-sunk);
  border: 1px solid var(--line); }
ol.mct-path li + li::before { content: "→ "; color: var(--muted); }

/* Report diagrams (DESIGN.md 9.2): the picture on white, as in the Word file; a click opens it. */
.report-diagram { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.report-diagram a { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.report-diagram img { display: block; max-width: 100%; height: auto; }
.report-diagram figcaption { color: var(--muted); font-size: 13px; }

/* Layout editing on the process pages (DESIGN.md 9.2). */
.diagram-bar .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.layout-status { font-size: 13px; color: var(--muted); }
.layout-status.error { color: var(--red-ink); }
.canvas.editing { outline: 2px dashed var(--accent); outline-offset: -2px; }

/* Walk-mode photos (DESIGN.md 7.3 step 9): a thumbnail beside its reading; one column on a phone. */
.walk-readings, .walk-photos { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.walk-photo-form { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.walk-photo-form label { text-align: left; }
.walk-photo-form input[type="file"] { padding: 14px; border: 2px dashed var(--line);
  border-radius: 8px; background: var(--surface); cursor: pointer; }
.photo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.photo { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.photo img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; display: block; }
.photo-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.photo .reading { white-space: normal; overflow-wrap: anywhere; }
@media (max-width: 640px) { .photo { grid-template-columns: 1fr; } }
