:root{font-family:Inter,"Segoe UI",Arial,sans-serif;color:#172b36;background:#f5f7f6;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer}.topbar{height:76px;background:#fff;border-bottom:1px solid #e3e9e7;display:flex;align-items:center;justify-content:space-between;padding:0 max(32px,calc((100vw - 1320px)/2));}.brand{display:flex;align-items:center;gap:13px;font-weight:750;font-size:20px;letter-spacing:-.04em}.brand small{display:block;font-weight:500;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#627982;margin-top:1px}.brand-mark{width:38px;height:38px;display:grid;place-items:center;background:#123746;color:white;border-radius:10px;letter-spacing:-.15em;font-size:15px}.brand-mark span{color:#6fd5b3}.edition{color:#678089;font-size:11px;letter-spacing:.15em;font-weight:700}main{max-width:1320px;margin:auto;padding:0 32px}.intro{display:grid;grid-template-columns:minmax(0,1fr) 305px;gap:80px;padding:65px 0 52px;align-items:end}.eyebrow{font-size:11px!important;letter-spacing:.16em!important;font-weight:800!important;color:#248a75!important;margin:0 0 13px!important;text-transform:uppercase}.intro h1{font-size:clamp(32px,3.2vw,48px);line-height:1.12;letter-spacing:-.055em;max-width:800px;margin:0 0 18px}.intro p{color:#586c75;line-height:1.6;font-size:16px;max-width:760px;margin:0}.intro-note{border-left:2px solid #6bceb0;padding:6px 0 2px 22px}.intro-note .note-icon{font-size:25px;color:#2d9e81;display:block;margin-bottom:9px}.intro-note strong{font-size:14px}.intro-note p{font-size:13px;line-height:1.5;margin-top:7px}.card{background:#fff;border:1px solid #e3eae8;border-radius:16px;box-shadow:0 10px 30px rgba(31,65,71,.035)}.setup{padding:30px}.section-heading{display:flex;justify-content:space-between;align-items:end;gap:20px}.section-heading h2{font-size:25px;letter-spacing:-.035em;margin:0}.section-heading>p,.results-heading p:not(.eyebrow){color:#809198;font-size:13px;margin:0}.file-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:27px}.file-card{border:1.5px dashed #bdcfc9;border-radius:12px;min-height:168px;padding:18px 20px;display:flex;flex-direction:column;align-items:flex-start;cursor:pointer;transition:.15s}.file-card:hover,.file-card:focus-within{border-color:#159477;background:#f8fcfa}.file-card input{position:absolute;width:1px;height:1px;opacity:0}.file-icon{font-size:25px;color:#299d82;line-height:1;margin-bottom:12px}.file-card strong{font-size:15px}.file-help{color:#70838b;font-size:12px;margin-top:5px}.file-value{color:#177f6b;background:#e9f7f0;border-radius:6px;padding:7px 10px;margin-top:auto;font-size:12px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.setting-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-top:28px}.setting-grid label{display:block;font-size:12px;font-weight:700;color:#38515b}.setting-grid label>span:first-child{display:block;margin-bottom:8px}.hint{border:0;border-radius:50%;background:#e7efed;color:#4b6e71;width:17px;height:17px;padding:0;line-height:17px;font-size:11px}.input-unit{display:flex;border:1px solid #dce5e3;border-radius:8px;align-items:center;height:45px}.input-unit:focus-within{outline:2px solid #9fdbcb}.input-unit input{width:100%;min-width:30px;border:0;background:transparent;outline:0;padding:0 13px;color:#17333b;font-weight:700}.input-unit em{font-style:normal;font-weight:500;color:#899ba0;white-space:nowrap;font-size:11px;padding-right:12px}.actions{display:flex;align-items:center;gap:18px;margin-top:27px}.primary{border:0;border-radius:8px;background:#087e67;color:#fff;font-weight:700;padding:13px 18px;min-width:190px}.primary:hover{background:#066b57}.primary:disabled{background:#a1bcb3;cursor:wait}.primary span{padding-left:16px}.actions p{color:#6b8087;font-size:12px;margin:0}.actions p.error{color:#ad3434}.results{margin:44px 0 80px}.hidden{display:none}.results-heading{margin-bottom:20px}.results-heading p:not(.eyebrow){margin-top:8px}.downloads{display:flex;gap:8px;flex-wrap:wrap}.downloads button{background:white;border:1px solid #dce6e3;border-radius:7px;padding:9px 12px;color:#24525a;font-size:12px;font-weight:700}.downloads button:hover{border-color:#087e67}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}.stat{background:white;border:1px solid #e3eae8;border-radius:11px;padding:18px 20px;cursor:pointer;text-align:left}.stat.active{outline:2px solid #248a75}.stat strong{display:block;font-size:29px;letter-spacing:-.05em;margin-top:6px}.stat span{font-size:12px;color:#687d85}.stat.pass strong{color:#14836b}.stat.fail strong{color:#c4622c}.stat.miss strong{color:#637993}.stat.incomplete strong{color:#8b697d}.report-layout{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:16px;align-items:start}.list-card{overflow:hidden}.list-head{display:flex;align-items:center;justify-content:space-between;padding:22px 22px 16px;gap:15px}.list-head h3,.detail-card h3{font-size:17px;margin:0;letter-spacing:-.02em}.list-head p{font-size:12px;color:#809198;margin:5px 0 0}.search{display:flex;align-items:center;border:1px solid #dde6e4;border-radius:7px;padding:0 10px;height:36px;color:#77929a}.search input{width:160px;border:0;outline:0;font-size:12px;padding-left:6px}.filters{display:flex;gap:6px;flex-wrap:wrap;padding:0 22px 15px}.filters button{border:1px solid #e1eae7;background:#f9fbfa;color:#61777c;border-radius:6px;padding:6px 9px;font-size:11px}.filters button.active{background:#e1f3eb;color:#087e67;border-color:#bde4d1;font-weight:700}.table-wrap{overflow:auto;max-height:570px}table{width:100%;border-collapse:collapse;font-size:12px}th{text-align:left;color:#819299;font-weight:700;background:#f8faf9;padding:12px 20px;position:sticky;top:0;z-index:1}td{padding:12px 20px;border-top:1px solid #eef2f0;white-space:nowrap}tbody tr{cursor:pointer}tbody tr:hover,tbody tr.selected{background:#f1faf5}td:first-child{font-weight:700;color:#233c45}.badge{border-radius:100px;padding:5px 9px;font-size:10px;font-weight:800;letter-spacing:.03em}.badge.pass{background:#e2f5eb;color:#087857}.badge.fail{background:#fff0e5;color:#ad5828}.badge.miss{background:#e9eef5;color:#556f8b}.badge.incomplete{background:#f3e9ef;color:#8a5873}.shown{font-size:11px;color:#87999e;margin:0;padding:13px 22px;border-top:1px solid #eef2f0}.detail-card{padding:22px;position:sticky;top:18px}.detail-card>p{font-size:12px;color:#7d9096;line-height:1.5}.detail-name{font-size:21px;font-weight:800;letter-spacing:-.04em;margin:18px 0 10px;overflow-wrap:anywhere}.detail-card dl{margin:20px 0 0}.detail-card dl div{display:flex;justify-content:space-between;gap:15px;border-top:1px solid #edf1f0;padding:11px 0;font-size:12px}.detail-card dt{color:#71848a}.detail-card dd{margin:0;font-weight:700;text-align:right}.detail-explain{background:#f5f8f7;border-radius:8px;padding:12px;margin-top:20px;font-size:12px;line-height:1.55;color:#587078}.method{margin-top:24px;border-left:3px solid #88cbb8;padding:5px 18px;color:#537079;font-size:12px;line-height:1.6}.method strong{color:#2c4850}.method p{margin:5px 0 0;max-width:960px}footer{border-top:1px solid #e3e9e7;padding:24px max(32px,calc((100vw - 1320px)/2));display:flex;justify-content:space-between;color:#8b9ca0;font-size:11px}@media(max-width:850px){.intro{grid-template-columns:1fr;gap:24px}.intro-note{max-width:450px}.report-layout{grid-template-columns:1fr}.detail-card{position:static}.setting-grid{grid-template-columns:1fr 1fr}.stats{grid-template-columns:1fr 1fr}}@media(max-width:580px){main{padding:0 16px}.topbar{padding:0 16px}.edition{display:none}.intro{padding:40px 0 30px}.setup{padding:20px}.file-grid,.setting-grid{grid-template-columns:1fr}.section-heading,.actions,.results-heading{align-items:flex-start;flex-direction:column}.stats{gap:8px}.stat{padding:13px}.stat strong{font-size:23px}.downloads{margin-top:14px}.list-head{align-items:flex-start;flex-direction:column}.search,.search input{width:100%}th,td{padding:11px}.topbar{height:64px}footer{padding:20px 16px}}

[hidden]{display:none!important}
.launch-warning{margin:24px 0 0;padding:18px 22px;border:2px solid #d39c3a;border-radius:12px;background:#fff6e6;color:#6b4512;font-size:15px;line-height:1.55}
.launch-warning strong{display:block;font-size:19px;margin-bottom:5px}
.launch-warning p{margin:0}
.progress-panel{margin-top:23px;padding:20px;border:1px solid #b6d8cb;border-radius:11px;background:#f4fbf7}
.progress-heading{display:flex;justify-content:space-between;gap:15px;align-items:center}
.progress-heading strong{font-size:16px;color:#0a6655}
.progress-heading span{font-variant-numeric:tabular-nums;font-size:13px;color:#51766e}
.progress-panel p{margin:8px 0 15px;color:#49665f;font-size:13px}
.progress-panel.failed{background:#fff8f5;border-color:#e5b6a7}
.progress-panel.failed .progress-heading strong{color:#a5472f}
.progress-panel progress{display:block;width:100%;height:12px;accent-color:#087e67}
.progress-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;list-style:none;margin:16px 0 0;padding:0}
.progress-steps{grid-template-columns:repeat(5,1fr)}
.progress-steps li{border-top:3px solid #d5e4de;padding-top:7px;font-size:11px;color:#718b82;font-weight:700}
.progress-steps li.active{border-color:#087e67;color:#087e67}
.progress-steps li.done{border-color:#69c5a6;color:#347b65}
@media(max-width:580px){.progress-steps{gap:4px}.progress-steps li{font-size:10px}.launch-warning{font-size:13px}}

/* Readability for people reviewing a report on an ordinary office screen. */
.file-card strong{font-size:17px}
.file-help,.file-value{font-size:14px}
.setting-grid label{font-size:14px}
.input-unit{height:48px}
.input-unit input{font-size:16px}
.primary{font-size:15px}
.actions p,.list-head p,.section-heading>p,.results-heading p:not(.eyebrow){font-size:14px}
.stat span,.filters button,.downloads button,.detail-card dl div,.detail-explain,.shown,.method{font-size:13px}
table{font-size:14px}
th,td{padding:13px 17px}

.viewer-card{overflow:hidden;margin-bottom:20px}
.previous-result-notice{margin:0 0 20px;padding:13px 16px;border:1px solid #b9d8cb;border-radius:9px;background:#eef8f2;color:#245d51;font-size:13px;font-weight:650}
.primary:disabled{cursor:not-allowed}.primary.busy:disabled{cursor:wait}
.viewer-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;padding:22px 24px}
.viewer-heading h3{font-size:21px;letter-spacing:-.03em;margin:0 0 5px}
.viewer-heading p:not(.eyebrow){font-size:13px;color:#72868b;margin:0}
.viewer-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.viewer-actions label{display:flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:#385a5e;white-space:nowrap}
.viewer-actions input{accent-color:#087e67;width:16px;height:16px}
.viewer-actions button{border:1px solid #d2dfda;background:#fff;border-radius:7px;padding:8px 11px;color:#166c5b;font-size:12px;font-weight:750}
.viewer-stage{position:relative;height:490px;background:#eaf0ed;overflow:hidden}
#viewer-canvas{width:100%;height:100%;touch-action:none}
#viewer-canvas canvas{display:block;width:100%;height:100%}
.viewer-message{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:rgba(255,255,255,.94);border:1px solid #d6e2dc;border-radius:10px;padding:14px 18px;color:#2f5855;font-weight:700;font-size:14px;text-align:center;max-width:min(90%,500px);pointer-events:none}
.viewer-selection{position:absolute;right:16px;top:16px;background:rgba(255,255,255,.95);border:1px solid #d6e2dc;border-radius:10px;box-shadow:0 7px 20px rgba(18,40,39,.09);padding:11px 13px;min-width:180px;max-width:260px;font-size:12px;line-height:1.5;pointer-events:none}
.viewer-selection strong{display:block;font-size:15px;color:#193b3b;margin-bottom:3px;overflow-wrap:anywhere}
.viewer-tooltip{position:absolute;z-index:3;pointer-events:none;padding:6px 9px;background:#163b3b;color:#fff;font-size:12px;border-radius:5px;white-space:nowrap}
.viewer-legend{display:flex;align-items:center;gap:17px;flex-wrap:wrap;padding:14px 24px;color:#496269;font-size:12px}
.viewer-legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.viewer-legend small{margin-left:auto;color:#7c8f93;font-size:11px}
.legend-dot{display:inline-block;width:9px;height:9px;border-radius:50%}
.legend-dot.pass{background:#159a72}.legend-dot.fail{background:#df7543}.legend-dot.miss{background:#6b86af}.legend-dot.incomplete{background:#a77b9b}
@media(max-width:850px){.viewer-heading{align-items:flex-start;flex-direction:column}.viewer-legend small{margin-left:0;width:100%}}
@media(max-width:580px){.viewer-heading{padding:18px}.viewer-stage{height:390px}.viewer-legend{padding:12px 18px;gap:9px}.viewer-selection{right:8px;top:8px}.viewer-actions{gap:10px}}
.mode-choice{border:0;padding:0;margin:26px 0 0;min-width:0}
.mode-choice legend{font-size:13px;font-weight:800;color:#38515b;margin-bottom:10px;padding:0}
.mode-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.mode-options label{display:grid;grid-template-columns:18px 1fr;align-content:start;column-gap:10px;row-gap:5px;padding:14px;border:1px solid #dce6e2;border-radius:9px;cursor:pointer}
.mode-options label:has(input:checked){border-color:#63b79c;background:#f2faf6}
.mode-options input{grid-row:1/3;accent-color:#087e67;margin:2px 0 0}
.mode-options strong{font-size:13px;color:#21464b}
.mode-options span{grid-column:2;color:#6c8186;font-size:11px;line-height:1.45}
.mode-alert{margin:14px 0 0;padding:12px 14px;border:1px solid #e8c98d;background:#fff8e9;border-radius:8px;color:#765216;font-size:13px;font-weight:650}
.mode-alert.info{border-color:#b9d8cb;background:#eef8f2;color:#245d51}
.list-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #eef2f0;padding:10px 22px}
.list-footer .shown{border:0;padding:0;margin:0}
.pages{display:flex;align-items:center;gap:7px;color:#647b80;font-size:12px;white-space:nowrap}
.pages button{border:1px solid #dce6e2;background:#fff;color:#166c5b;border-radius:6px;padding:6px 9px;font-size:12px;font-weight:700}
.pages button:disabled{color:#9babad;cursor:not-allowed}
@media(max-width:850px){.mode-options{grid-template-columns:1fr}}
@media(max-width:580px){.list-footer{align-items:flex-start;flex-direction:column}.pages{flex-wrap:wrap}}
/* Shared minimal palette with the ZIM calculators. */
html[data-theme="dark"] {
  color-scheme: dark;
  --page: #111314;
  --top: #17191b;
  --card: #1a1d1f;
  --surface: #202427;
  --surface-hover: #30363b;
  --stage: #111315;
  --text: #f0f1f2;
  --muted: #aeb6bd;
  --quiet: #8d989f;
  --line: #3d4246;
  --line-soft: #2c3235;
  --accent: #c6d2dc;
  --accent-deep: #30363b;
  --button: #e3e5e7;
  --button-text: #111416;
  --warning-bg: #342b1c;
  --warning-line: #806943;
  --warning-text: #f1d3a1;
  --info-bg: #191c1e;
  --info-text: #aab2b9;
  --error-bg: #382922;
  --error-text: #f0b49b;
  --pass-bg: #1c3c32;
  --pass-text: #92dec0;
  --fail-bg: #493124;
  --fail-text: #f4b28c;
  --miss-bg: #293745;
  --miss-text: #bad0ee;
  --incomplete-bg: #3b2b38;
  --incomplete-text: #dfb6d1;
  --overlay: rgba(24, 28, 30, .94);
}

html[data-theme="grey"] {
  color-scheme: light;
  --page: #dadddf;
  --top: #e9ebed;
  --card: #f0f1f2;
  --surface: #e4e7e9;
  --surface-hover: #d8dde1;
  --stage: #aab3b0;
  --text: #202629;
  --muted: #566168;
  --quiet: #657078;
  --line: #b7bfc5;
  --line-soft: #d0d5d9;
  --accent: #465661;
  --accent-deep: #d3dbe0;
  --button: #293238;
  --button-text: #fff;
  --warning-bg: #f6eacd;
  --warning-line: #d5b871;
  --warning-text: #664b1b;
  --info-bg: #e1e6ea;
  --info-text: #4c5a64;
  --error-bg: #f3dfd6;
  --error-text: #813f2b;
  --pass-bg: #d6ece0;
  --pass-text: #125d43;
  --fail-bg: #f4dfd1;
  --fail-text: #8e4b26;
  --miss-bg: #dde5ef;
  --miss-text: #455e7c;
  --incomplete-bg: #eadde6;
  --incomplete-text: #704c65;
  --overlay: rgba(240, 241, 242, .95);
}

html { background: var(--page); color: var(--text); }
body { background: var(--page); color: var(--text); }
.topbar { background: var(--top); border-color: var(--line); }
.brand small, .edition, .intro p, .intro-note p, .section-heading>p,
.results-heading p:not(.eyebrow), .file-help, .setting-grid label,
.input-unit em, .actions p, .list-head p, .stat span, .detail-card>p,
.detail-card dt, .shown, .pages, .method, footer, .viewer-heading p:not(.eyebrow),
.viewer-legend, .viewer-legend small, .mode-options span { color: var(--muted); }
.eyebrow { color: var(--accent)!important; }
.brand-mark { display: flex; flex: none; align-items: center; justify-content: center; white-space: nowrap; background: var(--accent-deep); color: var(--text); }
.brand-mark span, .file-icon, .intro-note .note-icon { color: var(--accent); }
.intro-note { border-color: var(--accent); }
.card, .stat { background: var(--card); border-color: var(--line); box-shadow: none; }
.file-card, .mode-options label { border-color: var(--line); }
.file-card:hover, .file-card:focus-within, .mode-options label:has(input:checked) {
  border-color: var(--accent); background: var(--surface);
}
.file-value, .filters button.active { color: var(--accent); background: var(--accent-deep); }
.mode-options strong, .mode-choice legend, .file-card strong,
.viewer-actions label, .detail-card h3, .list-head h3, .method strong { color: var(--text); }
.input-unit, .search, .downloads button, .viewer-actions button,
.viewer-actions select, .pages button { border-color: var(--line); background: var(--surface); color: var(--text); }
.input-unit input, .search input { color: var(--text); background: transparent; }
.input-unit:focus-within, .search:focus-within, .viewer-actions select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px;
}
.hint { background: var(--surface); color: var(--muted); }
.primary { background: var(--button); color: var(--button-text); }
.primary:hover { background: var(--text); color: var(--page); }
.primary:disabled { background: var(--surface-hover); color: var(--quiet); }
.downloads button:hover, .viewer-actions button:hover, .pages button:hover:not(:disabled) {
  background: var(--surface-hover); border-color: var(--accent);
}
.filters button { background: var(--surface); border-color: var(--line); color: var(--muted); }
.filters button:hover { border-color: var(--accent); }
.stat.active { outline-color: var(--accent); }
.stat.pass strong { color: var(--pass-text); }
.stat.fail strong { color: var(--fail-text); }
.stat.miss strong { color: var(--miss-text); }
.stat.incomplete strong { color: var(--incomplete-text); }
.table-wrap th { color: var(--muted); background: var(--surface); }
.table-wrap td, .detail-card dl div { border-color: var(--line-soft); }
.table-wrap td:first-child, .detail-name { color: var(--text); }
tbody tr:hover, tbody tr.selected { background: var(--surface-hover); }
.badge.pass { background: var(--pass-bg); color: var(--pass-text); }
.badge.fail { background: var(--fail-bg); color: var(--fail-text); }
.badge.miss { background: var(--miss-bg); color: var(--miss-text); }
.badge.incomplete { background: var(--incomplete-bg); color: var(--incomplete-text); }
.detail-explain { background: var(--surface); color: var(--muted); }
.method { border-color: var(--accent); }
footer, .list-footer { border-color: var(--line); }
.launch-warning, .mode-alert { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning-text); }
.mode-alert.info, .previous-result-notice { background: var(--info-bg); border-color: var(--accent); color: var(--info-text); }
.progress-panel { background: var(--surface); border-color: var(--line); }
.progress-panel.failed { background: var(--error-bg); border-color: var(--error-text); }
.progress-heading strong, .progress-steps li.active { color: var(--accent); }
.progress-heading span, .progress-panel p, .progress-steps li { color: var(--muted); }
.progress-panel.failed .progress-heading strong, .actions p.error { color: var(--error-text); }
.progress-panel progress, .mode-options input, .viewer-actions input { accent-color: var(--accent); }
.progress-steps li { border-color: var(--line); }
.progress-steps li.active, .progress-steps li.done { border-color: var(--accent); }
.progress-steps li.done { color: var(--accent); }
.viewer-stage { background: var(--stage); }
.viewer-message, .viewer-selection { background: var(--overlay); border-color: var(--line); color: var(--text); }
.viewer-selection strong { color: var(--text); }
.viewer-tooltip { background: var(--text); color: var(--page); }
.pages button:disabled { color: var(--quiet); }

.topbar-right { display: flex; align-items: center; gap: 24px; }
.theme-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.theme-switch button { border: 0; border-radius: 5px; padding: 6px 10px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.theme-switch button[aria-pressed="true"] { background: var(--button); color: var(--button-text); }
.theme-switch button:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.viewer-actions { gap: 9px; }
.viewer-actions .surface-control { gap: 8px; }
.viewer-actions select { border-radius: 7px; padding: 8px 9px; font-size: 12px; font-weight: 700; }
.viewer-actions button { white-space: nowrap; }
@media (max-width: 580px) { .topbar-right { gap: 8px; } .theme-switch button { padding: 5px 8px; } }

/* Typography, spacing and neutral controls match ZIM KALKULATORY / START.html. */
:root { font-family: system-ui, "Segoe UI", Arial, sans-serif; background: var(--page); color: var(--text); }
body { font: 15px/1.6 system-ui, "Segoe UI", Arial, sans-serif; }
main { max-width: 1260px; padding: 0 32px 40px; }
.topbar { display: block; height: auto; padding: 0; border-color: var(--line-soft); }
.topbar-inner { max-width: 1260px; margin: auto; padding: 20px 32px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { gap: 17px; font-size: 21px; font-weight: 650; letter-spacing: .02em; }
.brand small { margin: 0; font-size: 12px; font-weight: 400; letter-spacing: .1em; color: var(--quiet); }
.brand-mark { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 16px; letter-spacing: -.06em; }
.brand-mark span { margin: 0 1px; color: var(--muted); }
.edition { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--quiet); }
.intro { display: block; padding: 50px 0 0; }
.eyebrow { color: var(--quiet)!important; font-size: 11px!important; font-weight: 500!important; letter-spacing: .17em!important; }
.intro h1 { font-size: clamp(32px, 4vw, 48px); font-weight: 620; line-height: 1.15; letter-spacing: -.025em; max-width: 900px; margin: 15px 0 18px; }
.intro>div>p:not(.eyebrow) { font-size: 17px; line-height: 1.6; max-width: 760px; }
.intro .intro-note { display: flex; align-items: flex-start; gap: 12px; max-width: none; margin: 24px 0 32px; padding: 14px 17px; background: var(--info-bg); border: 1px solid var(--line-soft); border-radius: 8px; }
.intro>.intro-note>p:not(.eyebrow) { font-size: 12px; line-height: 1.6; margin: 0; max-width: none; color: var(--info-text); }
.intro-note strong { font-size: inherit; font-weight: 600; }
.note-dot { flex: none; width: 6px; height: 6px; margin-top: 7px; border-radius: 50%; background: var(--accent); }
.card { border-radius: 12px; }
.setup { padding: 24px; }
.section-heading h2 { font-size: 25px; font-weight: 620; line-height: 1.2; letter-spacing: -.02em; }
.section-heading>p, .results-heading p:not(.eyebrow) { font-size: 13px; }
.file-grid { gap: 17px; margin-top: 24px; }
.file-card { min-height: 176px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--top); }
.file-kind { color: var(--quiet); font-size: 10px; letter-spacing: .12em; margin-bottom: 8px; }
.file-card strong { font-size: 18px; font-weight: 580; line-height: 1.4; }
.file-help { font-size: 13px; margin-top: 3px; }
.file-value { margin-top: 16px; padding: 6px 10px; font-size: 12px; font-weight: 550; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.setting-grid label { font-size: 13px; font-weight: 550; }
.input-unit { height: 44px; border-radius: 7px; }
.input-unit input { font-size: 15px; font-weight: 550; }
.mode-choice legend { font-size: 13px; font-weight: 580; }
.mode-options label { border-radius: 8px; }
.mode-options strong { font-size: 14px; font-weight: 580; }
.mode-options span { font-size: 12px; line-height: 1.55; }
.primary { min-width: 0; padding: 10px 15px; border-radius: 7px; font-size: 13px; font-weight: 550; }
.actions p { font-size: 13px; }
.downloads button, .viewer-actions button, .viewer-actions select, .pages button { font-weight: 550; }
.filters button, .filters button.active { font-weight: 550; }
.stat strong { font-weight: 620; letter-spacing: -.025em; }
.list-head h3, .detail-card h3, .viewer-heading h3 { font-weight: 580; letter-spacing: -.015em; }
.table-wrap td:first-child, .detail-card dd, .viewer-actions label { font-weight: 550; }
.detail-name { font-weight: 620; letter-spacing: -.025em; }
.badge { font-weight: 600; letter-spacing: 0; }
.viewer-heading { align-items: flex-start; flex-wrap: wrap; }
.mode-alert.info, .previous-result-notice { border-color: var(--line); font-weight: 500; }
.progress-heading strong, .progress-steps li { font-weight: 550; }
.theme-switch button { font-weight: 550; }
footer { max-width: 1260px; margin: auto; padding: 24px 32px; }
@media (max-width: 850px) { .edition { display: none; } .intro { padding-top: 32px; } }
@media (max-width: 580px) {
  main { padding: 0 18px 32px; }
  .topbar-inner { padding: 17px 18px; gap: 10px; }
  .brand { gap: 10px; font-size: 19px; }
  .brand small { font-size: 10px; letter-spacing: .05em; }
  .brand-mark { width: 40px; height: 40px; }
  .intro { padding-top: 28px; }
  .intro>div>p:not(.eyebrow) { font-size: 15px; }
  .intro>.intro-note>p:not(.eyebrow) { font-size: 12px; }
  .setup { padding: 21px; }
  footer { padding: 20px 18px; gap: 12px; flex-wrap: wrap; }
}
@media (max-width: 380px) { .brand small { max-width: 130px; } .theme-switch button { padding: 5px 6px; } }

/* Keep the theme across the whole window, including below short pages. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { width: 100%; flex: 1; }
footer { width: 100%; }
.brand-logo { display: block; width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 11px; }
.progress-heading strong { display: flex; align-items: center; gap: 10px; }
.progress-panel.is-busy .progress-heading strong::before,
.viewer-message.is-busy::before {
  content: ""; display: inline-block; flex: none; width: 17px; height: 17px;
  border: 2px solid var(--line); border-top-color: var(--accent);
  border-radius: 50%; animation: camdist-spin .9s linear infinite;
}
.viewer-message.is-busy { display: flex; align-items: center; gap: 12px; }
@keyframes camdist-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .progress-panel.is-busy .progress-heading strong::before,
  .viewer-message.is-busy::before { animation-duration: 3s; }
}
.stat .stat-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.stat .stat-percent { font-size: 19px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.stats-note { margin: -7px 0 22px; color: var(--quiet); font-size: 12px; }
.viewer-content { display: grid; grid-template-columns: minmax(0, 1fr) 290px; border-block: 1px solid var(--line-soft); }
.camera-photo { min-width: 0; padding: 20px; border-left: 1px solid var(--line-soft); background: var(--top); }
.camera-photo .eyebrow { margin: 0 0 8px; }
.camera-photo h4 { margin: 0 0 15px; font-size: 15px; font-weight: 580; overflow-wrap: anywhere; }
.photo-frame { position: relative; display: grid; place-items: center; height: 300px; border: 1px solid var(--line-soft); border-radius: 7px; overflow: hidden; background: var(--stage); }
.photo-frame img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.photo-frame p { margin: 0; padding: 18px; color: var(--muted); text-align: center; font-size: 13px; }
.camera-photo a { display: inline-block; margin-top: 14px; font-size: 12px; color: var(--accent); text-underline-offset: 3px; }
.photo-note { color: var(--quiet); font-size: 11px; line-height: 1.6; margin: 12px 0 0; }
.detail-card .camera-photo { margin: 22px -22px; border-left: 0; border-block: 1px solid var(--line-soft); }
.detail-card .photo-frame { height: 260px; }
@media (max-width: 850px) {
  .viewer-content { grid-template-columns: 1fr; }
  .camera-photo { border-left: 0; border-top: 1px solid var(--line-soft); }
  .photo-frame { height: 280px; }
}
@media (max-width: 580px) { .brand-logo { width: 40px; height: 40px; } .stat .stat-percent { font-size: 16px; } }

/* Adjustable workspace; resizing does not change the camera pose. */
.camera-metadata-settings { padding: 16px 20px; margin: 0 0 20px; font-size: 13px; }
.camera-metadata-settings summary, .calibration-details summary { cursor: pointer; color: var(--text); font-weight: 550; }
#metadata-summary { display: inline-block; margin-left: 12px; font-weight: 400; color: var(--muted); font-size: 12px; }
.camera-metadata-settings p, .calibration-details p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.camera-metadata-settings label { display: block; color: var(--muted); margin: 10px 0 5px; }
.camera-metadata-settings select, .camera-metadata-settings input { max-width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; }
.camera-profile-custom { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 15px; }
.camera-profile-custom input { display: block; width: 100%; margin-top: 6px; }
.detail-card h4 { color: var(--text); margin: 20px 0 8px; font-size: 14px; }
.calibration-details { margin: 18px 0; border-block: 1px solid var(--line-soft); padding: 12px 0; font-size: 12px; }
.metadata-warning { padding: 10px; border: 1px solid var(--warning-line); background: var(--warning-bg); color: var(--warning-text)!important; border-radius: 6px; font-size: 12px; }
@media (max-width: 850px) { .camera-profile-custom { grid-template-columns: 1fr; } #metadata-summary { display: block; margin: 7px 0 0; } }
.viewer-adjustments { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 0 24px 17px; }
.marker-size-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.marker-size-control input { width: 180px; max-width: 45vw; margin: 0; accent-color: var(--accent); cursor: pointer; }
.marker-size-control output { min-width: 42px; color: var(--text); font-variant-numeric: tabular-nums; }
#viewer-layout-reset { background: var(--surface); color: var(--muted); border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; font-size: 12px; }
#viewer-layout-reset:hover { color: var(--text); border-color: var(--accent); }
.viewer-content {
  height: var(--viewer-height, 490px);
  grid-template-columns: clamp(280px, calc((100% - 12px) * var(--view-fraction, .75)), calc(100% - 232px)) 12px minmax(0, 1fr);
}
.viewer-content > .viewer-stage { height: 100%; min-width: 0; min-height: 0; }
.viewer-content > .camera-photo { height: 100%; min-height: 0; padding: 18px; border: 0; display: flex; flex-direction: column; overflow: hidden; }
.viewer-content .photo-frame { height: auto; min-height: 0; flex: 1; display: flex; align-items: center; justify-content: center; }
.viewer-content .photo-frame img { display: block; min-width: 0; width: 100%; height: 100%; object-fit: contain; }
.viewer-content .camera-photo > :not(.photo-frame) { flex-shrink: 0; }
.viewer-split-handle { display: flex; justify-content: center; align-items: center; min-height: 0; background: var(--surface); border-inline: 1px solid var(--line-soft); cursor: col-resize; touch-action: none; user-select: none; }
.viewer-split-handle span { width: 3px; height: 42px; border-radius: 2px; background: var(--quiet); }
.viewer-height-handle { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 32px; padding: 5px 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); color: var(--muted); cursor: row-resize; touch-action: none; user-select: none; font-size: 11px; }
.resize-grip { width: 32px; height: 3px; flex: none; background: var(--quiet); border-radius: 2px; }
#viewer-height-value { min-width: 48px; font-variant-numeric: tabular-nums; color: var(--quiet); }
.viewer-split-handle:hover, .viewer-height-handle:hover, .viewer-split-handle.dragging, .viewer-height-handle.dragging { background: var(--surface-hover); color: var(--text); }
.viewer-split-handle:focus-visible, .viewer-height-handle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
body.viewer-resizing { user-select: none; }
body.viewer-resizing[data-resize-axis="x"] { cursor: col-resize; }
body.viewer-resizing[data-resize-axis="y"] { cursor: row-resize; }
body.viewer-resizing * { cursor: inherit!important; }
@media (max-width: 850px) {
  .viewer-content { height: auto; grid-template-columns: minmax(0, 1fr); }
  .viewer-content > .viewer-stage { height: var(--viewer-height, 490px); }
  .viewer-content > .camera-photo { height: clamp(320px, 70vw, 520px); border-top: 1px solid var(--line-soft); }
  .viewer-split-handle { display: none; }
}
@media (max-width: 580px) {
  .viewer-adjustments { padding: 0 18px 16px; }
  .marker-size-control { gap: 8px; }
  .marker-size-control > span { flex-basis: 100%; }
  .viewer-height-handle { gap: 8px; font-size: 10px; }
  .resize-grip { width: 20px; }
}


/* Native browser report: stage-one controls and a readable photo/detail column. */
.native-stage-note { color: var(--muted); font-size: 13px; padding: 0 2px; margin: -12px 0 24px; }
.secondary { border: 1px solid var(--line); color: var(--text); background: var(--surface); border-radius: 7px; padding: 10px 15px; font-size: 13px; white-space: nowrap; }
.secondary:hover { border-color: var(--accent); background: var(--surface-hover); }
.secondary:disabled { cursor: wait; color: var(--quiet); }
.report-layout { grid-template-columns: minmax(0, 1fr) 360px; }
.detail-card { position: static; }
.actions { flex-wrap: wrap; }
@media (max-width: 1000px) { .report-layout { grid-template-columns: minmax(0, 1fr) 310px; } }
@media (max-width: 850px) { .report-layout { grid-template-columns: 1fr; } }
