/* style.css - MCEWR web edition (all pages) and the evaluator (app.html)
 *
 * One stylesheet for the whole site.  The first part is the design system
 * shared by every page (colours, type, header, cards, tables, forms,
 * buttons, badges); the second part is the evaluator's layout: a sidebar
 * of ten numbered steps on the left and one step pane on the right.
 * No framework, no build step, no external font: system fonts only.
 * Revised September 2026 (evaluator redesign). */

/* ------------------------------------------------------------------ tokens */
:root {
  --navy: #1F3B5A;        /* header, headings              */
  --blue: #2E75B6;        /* primary actions, links        */
  --blue-dark: #1F5C93;
  --blue-soft: #EAF2FB;   /* selected / highlighted        */
  --ink: #1F2933;         /* body text                     */
  --muted: #5F6B7A;       /* secondary text                */
  --line: #D9DEE5;        /* borders                       */
  --line-soft: #EAEEF2;
  --bg: #F4F6F8;          /* page background               */
  --card: #FFFFFF;
  --ok: #2E7D32;   --ok-bg: #E6F4EA;
  --warn: #9A6200; --warn-bg: #FFF4DB;
  --bad: #B3261E;  --bad-bg: #FDECEA;
  --edit: #FFFBEA;        /* editable cell background      */
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --font: "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "Roboto Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.45; color: var(--ink); background: var(--bg); }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
code { font-family: var(--mono); font-size: .92em; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }
pre { font-family: var(--mono); }
h2 { color: var(--navy); font-size: 22px; font-weight: 650; margin: 28px 0 10px; }
h3 { color: var(--navy); font-size: 16px; font-weight: 650; margin: 20px 0 8px; }
h2 + p, h3 + p { margin-top: 4px; }
p { margin: 8px 0; }
p.lead { font-size: 16.5px; color: #33404d; }
ul, ol { padding-left: 22px; }
li { margin: 3px 0; }
.help, .muted { color: var(--muted); font-size: 13px; }
.small { font-size: 13px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* ------------------------------------------------------------------ header */
header.top { background: var(--navy); color: #fff; padding: 0 28px; display: flex; align-items: center; gap: 28px; min-height: 56px; flex-wrap: wrap; }
header.top h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: .04em; }
header.top h1 small { display: block; font-size: 11px; font-weight: 400; letter-spacing: .02em; color: #B8CCE2; margin-top: -2px; }
header.top nav { display: flex; gap: 2px; flex-wrap: wrap; }
header.top nav a { color: #D6E4F2; text-decoration: none; padding: 17px 12px; font-size: 14px; border-bottom: 3px solid transparent; }
header.top nav a:hover { color: #fff; }
header.top nav a.here { color: #fff; border-bottom-color: #7FB3E6; font-weight: 600; }

/* --------------------------------------------------------------- page body */
main { max-width: 1180px; margin: 0 auto; padding: 22px 28px 48px; background: var(--card); min-height: 60vh; }
body.app-page main { max-width: none; margin: 0; padding: 0; background: transparent; min-height: 0; }
footer { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 28px; border-top: 1px solid var(--line); background: var(--card); }
footer a { color: var(--blue); }

/* ------------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 18px 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; background: var(--card); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.note { border-left: 4px solid var(--blue); background: var(--blue-soft); padding: 10px 14px; margin: 12px 0; border-radius: 0 6px 6px 0; }

/* ----------------------------------------------------------------- buttons */
a.button, button, .button { background: var(--blue); color: #fff; border: 1px solid var(--blue); border-radius: 6px; padding: 7px 14px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; line-height: 1.3; white-space: nowrap; }
a.button:hover, button:hover, .button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
a.button.secondary, button.secondary, .button.secondary { background: var(--card); color: var(--blue); border-color: var(--blue); }
a.button.secondary:hover, button.secondary:hover, .button.secondary:hover { background: var(--blue-soft); color: var(--blue-dark); }
button.ghost { background: transparent; color: var(--muted); border-color: transparent; padding: 5px 8px; font-weight: 500; }
button.ghost:hover { background: var(--line-soft); color: var(--ink); border-color: transparent; }
button.danger { background: transparent; color: var(--bad); border-color: transparent; padding: 4px 8px; }
button.danger:hover { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
button.big { padding: 11px 22px; font-size: 15px; font-weight: 600; }
button:disabled, button:disabled:hover { opacity: .5; cursor: default; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 12px 0; }

/* ------------------------------------------------------------------ badges */
.badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; vertical-align: middle; letter-spacing: .01em; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.prov { background: var(--warn-bg); color: var(--warn); }
.badge.id { background: var(--line-soft); color: var(--muted); font-family: var(--mono); font-weight: 500; }
.badge.max { background: var(--ok-bg); color: var(--ok); }
.badge.min { background: #E8EEF6; color: #34506B; }
.badge.neutral { background: var(--line-soft); color: var(--muted); }

/* ------------------------------------------------------------------ tables */
.scroll { overflow-x: auto; max-width: 100%; }
table.grid { border-collapse: separate; border-spacing: 0; margin: 8px 0 14px; font-size: 13.5px; width: auto; min-width: 320px; }
table.grid th { background: var(--navy); color: #fff; padding: 7px 10px; text-align: left; white-space: nowrap; font-weight: 600; position: sticky; top: 0; z-index: 1; }
table.grid th.num { text-align: right; }
table.grid th.sub { background: #2B4C70; font-weight: 500; font-size: 12.5px; }
table.grid th.group { text-align: center; background: #16304A; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
table.grid td { border-bottom: 1px solid var(--line-soft); padding: 5px 10px; white-space: nowrap; vertical-align: middle; background: var(--card); }
table.grid tbody tr:nth-child(even) td { background: #FAFBFC; }
table.grid tbody tr:hover td { background: var(--blue-soft); }
table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 13px; }
table.grid td.dim { color: var(--muted); }
table.grid td.hl { background: #DCE9F7 !important; }
table.grid th.hl { background: #DCE9F7 !important; color: var(--navy); box-shadow: inset 0 -3px 0 var(--blue); }
table.grid tr.off td { color: #9AA5B1; }
table.grid tr.off td.name { text-decoration: line-through; }
table.grid td.name { white-space: normal; min-width: 180px; }
table.grid tr.aggregate td.name { font-weight: 600; }
table.grid td[contenteditable] { background: var(--edit); cursor: text; }
table.grid td[contenteditable]:focus { outline: 2px solid var(--blue); background: #fff; }
table.grid td.indent-1 { padding-left: 26px; } table.grid td.indent-2 { padding-left: 42px; } table.grid td.indent-3 { padding-left: 58px; }
.tree-mark { color: var(--muted); font-size: 12px; margin-right: 2px; }
.name-wrap { display: flex; align-items: center; gap: 4px; min-width: 240px; }
.name-wrap input { flex: 1 1 auto; }
table.grid th.colhead { max-width: 150px; white-space: normal; line-height: 1.25; vertical-align: bottom; }
table.grid th.colhead small { display: block; font-weight: 400; font-size: 11.5px; color: #C9D8E8; }
table.grid td.cell input.cell-input.num { min-width: 70px; width: 92px; }

/* editable cells: an input that fills the cell, no border until focus */
table.grid td.cell { padding: 2px 4px; background: var(--edit) !important; }
table.grid tbody tr:hover td.cell { background: #FFF6CC !important; }
input.cell-input, select.cell-input {
  width: 100%; min-width: 64px; border: 1px solid transparent; background: transparent; padding: 4px 6px; border-radius: 4px;
  font: inherit; font-size: 13.5px; color: var(--ink); }
input.cell-input.num { text-align: right; font-family: var(--mono); font-size: 13px; }
input.cell-input.wide { min-width: 200px; }
input.cell-input.narrow { min-width: 52px; width: 64px; }
input.cell-input:hover, select.cell-input:hover { border-color: var(--line); }
input.cell-input:focus, select.cell-input:focus { outline: none; border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(46, 117, 182, .18); }
input.cell-input.invalid { border-color: var(--bad); background: var(--bad-bg); }
input.cell-input.saved { animation: saved .9s ease-out; }
@keyframes saved { from { box-shadow: 0 0 0 3px rgba(46, 125, 50, .35); } to { box-shadow: none; } }
td.cell.readonly { background: var(--line-soft) !important; color: var(--muted); font-style: italic; padding: 5px 10px; }

/* rank table */
.rank-badge { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--line-soft); color: var(--ink); font-weight: 700; font-size: 12.5px; }
.rank-badge.r1 { background: #F6D365; color: #5A4300; } .rank-badge.r2 { background: #DCE1E7; color: #3A4652; } .rank-badge.r3 { background: #E8C9A8; color: #5B3A16; }
.bar { display: inline-block; height: 10px; background: var(--blue); border-radius: 3px; vertical-align: middle; margin-right: 8px; min-width: 2px; }
.bar.min { background: #7CA9D4; }
td.barcell { min-width: 180px; }
td.rank-cell { width: 36px; }

/* heat colours for rank matrices (1 = best) */
td.heat { text-align: center; font-family: var(--mono); font-size: 13px; }
td.heat.h1 { background: #CDEBD3 !important; } td.heat.h2 { background: #DFF1E1 !important; } td.heat.h3 { background: #EEF6EE !important; }
td.heat.hlow { background: #FBE9E7 !important; } td.heat.hmid { background: #FFF6E0 !important; }
td.rho { text-align: right; font-family: var(--mono); font-size: 13px; }
td.rho.high { background: #DCEFE0 !important; } td.rho.low { background: #FBE9E7 !important; } td.rho.diag { color: var(--muted); }

/* ------------------------------------------------------------------- forms */
label { font-size: 14px; }
select, input[type=text], input[type=number], textarea {
  font: inherit; font-size: 14px; padding: 6px 9px; border: 1px solid #C5CDD6; border-radius: 6px; background: #fff; color: var(--ink); }
select:focus, input[type=text]:focus, input[type=number]:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 117, 182, .18); }
select { padding-right: 26px; }
textarea { width: 100%; resize: vertical; min-height: 64px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline > span { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--ink); }
.fields { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; margin: 8px 0 14px; }
.fields .field input[type=number] { width: 96px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 12px; margin: 0 0 12px; background: var(--card); }
legend { color: var(--navy); font-weight: 600; padding: 0 6px; font-size: 14px; }
label.chk { display: flex; align-items: flex-start; gap: 8px; margin: 5px 0; cursor: pointer; }
label.chk input { margin-top: 3px; }
.opt { display: grid; grid-template-columns: 200px 130px 1fr; gap: 10px; align-items: center; margin: 8px 0; }
.opt code { font-size: 13px; }
.opt .help { line-height: 1.35; }
.opt input[type=number], .opt input[type=text] { width: 120px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.col { flex: 1 1 320px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.chips label { border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px 5px 8px; background: var(--card); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; }
.chips label:has(input:checked), .chips label.selected { background: var(--blue-soft); border-color: var(--blue); color: var(--blue-dark); }
.chips input { margin: 0; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 34px; height: 18px; appearance: none; background: #C5CDD6; border-radius: 10px; position: relative; margin: 0; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; background: #fff; border-radius: 50%; transition: left .15s; }
.switch input:checked { background: var(--blue); }
.switch input:checked::after { left: 18px; }

/* option cards (radio buttons that look like cards) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 14px; }
.choice { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--card); cursor: pointer; display: block; position: relative; }
.choice:hover { border-color: #9DBBD9; }
.choice input { position: absolute; opacity: 0; }
.choice:has(input:checked), .choice.selected { border-color: var(--blue); background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.choice b { display: block; font-size: 14px; color: var(--navy); margin-bottom: 3px; padding-right: 76px; }
.choice .help { display: block; line-height: 1.35; }
.choice .badge { position: absolute; top: 10px; right: 10px; }
.choice.na { opacity: .55; }

/* alerts */
.alert { border-radius: var(--radius); padding: 10px 14px; margin: 10px 0; border: 1px solid; font-size: 13.5px; }
.alert.warn { background: var(--warn-bg); border-color: #F0D9A6; color: #5C3D00; }
.alert.bad { background: var(--bad-bg); border-color: #F1B8B3; color: #7A1B15; }
.alert.ok { background: var(--ok-bg); border-color: #B6DDBC; color: #1D5A24; }
.alert.info { background: var(--blue-soft); border-color: #BFD6EE; color: #1B3F62; }
.alert ul { margin: 4px 0 0; padding-left: 20px; }
.alert b { font-weight: 650; }

/* stats */
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; min-width: 110px; background: #FAFBFC; }
.stat b { display: block; font-size: 20px; color: var(--navy); font-weight: 700; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* ------------------------------------------------------------- the evaluator */
.app { display: flex; align-items: flex-start; gap: 0; max-width: 1480px; margin: 0 auto; }
aside.side { flex: 0 0 258px; position: sticky; top: 0; align-self: flex-start; max-height: 100vh; overflow-y: auto; padding: 18px 14px 18px 22px; }
.content { flex: 1 1 auto; min-width: 0; padding: 18px 26px 40px 18px; }
.side-problem { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 10px 12px; margin-bottom: 14px; box-shadow: var(--shadow); }
.side-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.side-file { font-weight: 650; color: var(--navy); margin: 2px 0; word-break: break-word; }
.side-meta { font-size: 12.5px; color: var(--muted); }
.steps { display: flex; flex-direction: column; gap: 2px; }
.steps .group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 12px 0 4px 6px; }
.step { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); text-align: left; width: 100%; cursor: pointer; font: inherit; }
.step:hover { background: #E9EEF4; border-color: transparent; color: var(--ink); }
.step .n { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #D8DFE7; color: #34404D; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700; }
.step .t { display: flex; flex-direction: column; line-height: 1.2; }
.step .t b { font-size: 13.5px; font-weight: 600; }
.step .t small { font-size: 11.5px; color: var(--muted); }
.step.active { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); }
.step.active .n { background: var(--blue); color: #fff; }
.step.done .n { background: var(--ok-bg); color: var(--ok); }
.step.done .n::before { content: "\2713"; }
.step.done .n span { display: none; }
.step.locked { opacity: .6; }
.side-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.4; padding: 0 6px; }
.side-note b { color: var(--ink); }
.side-note p.lead { font-size: inherit; color: inherit; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow); }
.toolbar-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select { max-width: 320px; }
.toolbar .status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); padding: 4px 10px; border-radius: 12px; background: var(--line-soft); }
.toolbar .status-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #9AA5B1; }
.toolbar .status-pill.ready .dot { background: var(--ok); }
.toolbar .status-pill.busy .dot { background: var(--warn); animation: pulse 1s infinite; }
.toolbar .status-pill.bad .dot { background: var(--bad); }
@keyframes pulse { 50% { opacity: .3; } }
.menu { position: relative; }
.menu-list { display: none; position: absolute; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); min-width: 250px; z-index: 20; padding: 6px; }
.menu.open .menu-list { display: block; }
.menu-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; background: transparent; color: var(--ink); border: 0; border-radius: 6px; padding: 8px 10px; text-align: left; white-space: normal; }
.menu-list button:hover { background: var(--blue-soft); color: var(--ink); }
.menu-list button small { color: var(--muted); font-weight: 400; font-size: 12px; }

.pane { display: none; }
.pane.active { display: block; }
.pane.pane-locked > *:not(.step-head):not(.needs-problem):not(.step-nav) { display: none !important; }
.step-head { margin-bottom: 14px; }
.step-head .kicker { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--blue); font-weight: 700; }
.step-head h2 { margin: 2px 0 6px; font-size: 24px; }
.step-head .intro { color: #33404d; margin: 0; max-width: 860px; font-size: 15px; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted); background: var(--card); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 15px; }
.card + .card { margin-top: 14px; }
.card .card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.card .card-head h3 { margin: 0; }
.two-col { display: grid; grid-template-columns: minmax(300px, 420px) 1fr; gap: 16px; align-items: start; }
.result-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.result-head .winner { font-size: 22px; font-weight: 700; color: var(--navy); }
.result-head .winner small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.result-head .meta { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
details { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; background: var(--card); margin: 12px 0; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details[open] summary { margin-bottom: 8px; }
pre.summary { background: #F7F9FB; border: 1px solid var(--line); padding: 10px 12px; font-size: 12.5px; overflow-x: auto; max-height: 460px; border-radius: 6px; margin: 0; }
ul.warn { margin: 0; padding-left: 18px; }
ul.warn li { color: #5C3D00; margin: 3px 0; }
.method-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13.5px; margin: 10px 0; }
.method-info dt { color: var(--muted); font-weight: 600; }
.method-info dd { margin: 0; }
.checks li { margin: 4px 0; }
.checks li::before { content: "\2713"; color: var(--ok); font-weight: 700; margin-right: 6px; }
.checks li.warn::before { content: "!"; color: var(--warn); }
.checks li.bad::before { content: "\00d7"; color: var(--bad); }
.checks { list-style: none; padding: 0; margin: 6px 0; }
.kbd { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: #fff; }
.toolbtn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 8px 0 4px; }
.tag-hint { font-size: 12.5px; color: var(--muted); }

/* sub-tabs inside a step */
.subtabs { display: flex; gap: 6px; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.subtabs button { background: transparent; color: var(--muted); border: 0; border-bottom: 3px solid transparent; border-radius: 0; padding: 8px 14px; font-weight: 600; }
.subtabs button:hover { background: var(--line-soft); color: var(--ink); }
.subtabs button.active { color: var(--blue-dark); border-bottom-color: var(--blue); background: transparent; }
.sub { display: none; }
.sub.active { display: block; }

/* modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(16, 24, 40, .45); z-index: 50; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal .box { background: var(--card); border-radius: 10px; padding: 20px 22px; width: 100%; max-width: 480px; box-shadow: 0 16px 48px rgba(16, 24, 40, .3); }
.modal .box h3 { margin-top: 0; }
.modal .box .btn-row { justify-content: flex-end; margin-bottom: 0; }

/* status bar */
#statusbar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 6px 28px; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; z-index: 5; }
#spinner { display: none; width: 14px; height: 14px; border: 2px solid var(--blue); border-top-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* legacy classes still used by the generated pages */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 12px 0; }
.tab { padding: 8px 14px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--bg); cursor: pointer; color: var(--muted); }
.tab.active { background: var(--card); color: var(--navy); font-weight: 600; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 980px) {
  .two-col { grid-template-columns: 1fr; }
  .opt { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 820px) {
  .app { flex-direction: column; }
  aside.side { position: static; flex: none; width: 100%; max-height: none; padding: 12px 16px 0; }
  .steps { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 6px; }
  .steps .group-label { display: none; }
  .step { flex: 0 0 auto; padding: 6px 10px; }
  .step .t small { display: none; }
  .content { padding: 12px 16px 32px; }
  header.top { padding: 0 16px; }
}
@media print {
  header.top, aside.side, .toolbar, .step-nav, #statusbar, footer { display: none !important; }
  .content { padding: 0; }
}
