@charset "UTF-8";

/* Контур — a quiet, legible instrument for observing movement. */
:root {
  color-scheme: light;
  --bg: #f5f4ef;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #111820;
  --muted: #111820;
  --muted-light: #111820;
  --accent: #345ce5;
  --accent-hover: #264bcb;
  --accent-soft: #edf1ff;
  --rail: #152d37;
  --rail-muted: #ffffff;
  --border: #dfe5e4;
  --success: #20765c;
  --success-soft: #eaf6ef;
  --warning: #94682a;
  --warning-soft: #fff7e9;
  --danger: #b84646;
  --danger-soft: #fff0ee;
  --radius: 16px;
  --radius-sm: 9px;
  --shadow: 0 5px 24px rgb(25 45 53 / 3%);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, a, input, select, textarea { outline-offset: 4px; }
:focus-visible { outline: 3px solid #6988ff; }
h1, h2, h3, h4, p { margin-top: 0; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { color: var(--ink); }
img, svg { max-width: 100%; }
svg { flex-shrink: 0; }
[hidden], .hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; align-self: start; height: 100vh; padding: 36px 22px 26px; background: var(--rail); color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 12px; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #819ba4; border-radius: 50%; color: #fff; font-size: 28px; font-weight: 300; }
.brand-mark svg { width: 30px; height: 30px; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong, .brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 28px; font-weight: 400; line-height: 1.1; letter-spacing: -.8px; }
.brand-subtitle { color: var(--rail-muted); font-size: 9px; text-transform: uppercase; letter-spacing: 1.65px; line-height: 1.6; }
.nav-list { display: flex; flex-direction: column; gap: 7px; margin-top: 66px; }
.nav-label { margin: 0 12px 12px; color: #fff; font-size: 9px; letter-spacing: 2px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; width: 100%; min-height: 48px; gap: 12px; border: 1px solid transparent; border-radius: 9px; padding: 12px 14px; background: transparent; color: #fff; text-align: left; text-decoration: none; font-size: 13px; font-weight: 500; transition: background .16s, color .16s; }
.nav-item:hover { background: #203e49; color: #fff; }
.nav-item.is-active, .nav-item.active, .nav-item[aria-current="page"] { background: #2a4651; border-color: #38545e; color: #fff; }
.nav-item svg { width: 18px; height: 18px; opacity: 1; }
.nav-number { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: rgb(255 255 255 / 6%); color: #fff; font-size: 11px; font-variant-numeric: tabular-nums; }
.nav-item.is-active .nav-number { color: #fff; background: rgb(255 255 255 / 12%); }
.sidebar-spacer { flex: 1; }
.sidebar-note { margin-top: auto; padding: 22px 12px 2px; color: #fff; font-size: 11px; line-height: 1.7; }
.sidebar-note::before { display: block; content: ""; width: 24px; height: 1px; margin-bottom: 18px; background: #496773; }
.sidebar-note strong { display: block; margin-bottom: 6px; color: #fff; font-size: 11px; font-weight: 500; }
.sidebar-footer { margin: 24px 12px 0; color: #fff; font-size: 10px; letter-spacing: .8px; }
.main { min-width: 0; padding: 31px 48px 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 30px; font-size: 11px; color: var(--muted); }
.topbar-label { display: inline-flex; gap: 8px; align-items: center; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #5a987d; }
.topbar-divider { width: 1px; height: 12px; background: var(--border); }
#view-root { max-width: 1320px; margin: 0 auto; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { display: block; margin: 0 0 11px; color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: 1.65px; line-height: 1.5; text-transform: uppercase; }
.page-title { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(30px, 2.8vw, 43px); font-weight: 400; line-height: 1.12; letter-spacing: -1.6px; }
.page-subtitle { max-width: 670px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.header-actions { display: flex; align-items: center; flex-shrink: 0; flex-wrap: wrap; gap: 9px; padding-bottom: 3px; }

.card { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.card + .card { margin-top: 22px; }
.card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 25px 28px 20px; }
.card-title { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -.2px; }
.card-description { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.card-body { padding: 0 28px 28px; }
.card-body:first-child { padding-top: 28px; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 28px; background: #fbfcfb; border-top: 1px solid var(--border); }
.card-section { border-top: 1px solid var(--border); padding: 24px 28px; }
.section-heading { display: flex; align-items: center; gap: 10px; margin: 0 0 17px; font-size: 13px; font-weight: 600; }
.section-number { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid #dce4ef; border-radius: 50%; color: var(--accent); background: #f5f7ff; font-size: 10px; font-weight: 600; }
.grid { display: grid; gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid > .card, .grid-2 > .card, .grid-3 > .card { margin: 0; }
.stack { display: grid; gap: 22px; }
.stack > .card { margin-top: 0; }
.section-gap { margin-top: 22px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(250px, 1fr); gap: 22px; align-items: start; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 22px; }
.field { display: flex; flex-direction: column; min-width: 0; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
.field-label, .field > label, label.field-label { color: var(--ink); font-size: 11px; font-weight: 600; }
.field-label small, .optional { color: var(--muted); font-weight: 400; }
.field-hint { color: var(--muted); font-size: 11px; line-height: 1.5; }
.input, .select, .textarea, input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]), select, textarea { width: 100%; min-height: 43px; border: 1px solid #d9e1e3; border-radius: 8px; padding: 10px 12px; background: #fff; color: var(--ink); font-size: 12px; box-shadow: 0 1px 1px rgb(23 45 55 / 2%); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--ink); opacity: 1; }
.input:hover, .select:hover, .textarea:hover, input:hover, select:hover, textarea:hover { border-color: #b9c7ce; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(52 92 229 / 12%); }
input:disabled, select:disabled, textarea:disabled { background: #f1f4f4; color: var(--ink); cursor: not-allowed; }
textarea { resize: vertical; min-height: 95px; }
select { padding-right: 30px; }
input[type="checkbox"], input[type="radio"] { width: 17px; height: 17px; accent-color: var(--accent); }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; }
.checkbox-field input { flex-shrink: 0; margin-top: 2px; }
.segmented { display: flex; padding: 3px; gap: 3px; border: 1px solid #e0e6e7; border-radius: 9px; background: #f4f6f6; }
.segment { display: flex; flex: 1; justify-content: center; align-items: center; gap: 7px; min-height: 35px; border: 1px solid transparent; border-radius: 6px; padding: 7px 9px; background: transparent; color: var(--muted); font-size: 11px; white-space: nowrap; }
.segment svg { width: 15px; height: 15px; }
.segment:hover { color: var(--ink); background: rgb(255 255 255 / 65%); }
.segment.is-active, .segment.active, .segment[aria-pressed="true"] { border-color: #dce3ef; background: #fff; color: var(--accent); box-shadow: 0 2px 5px rgb(23 45 55 / 4%); font-weight: 600; }
.btn, button.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; border: 1px solid transparent; border-radius: 8px; padding: 11px 18px; font-size: 12px; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background .16s, border-color .16s, box-shadow .16s; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 3px 7px rgb(52 92 229 / 13%); }
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); box-shadow: 0 4px 10px rgb(52 92 229 / 20%); }
.btn-secondary { border-color: #d9e1e4; background: #fff; color: var(--ink); }
.btn-secondary:hover:not(:disabled) { border-color: #b8c6cf; background: #f7f9fa; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover:not(:disabled) { background: #edf1f2; color: var(--ink); }
.btn-danger { border-color: #f0d1cf; background: #fff7f6; color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #ffece9; }
.btn-sm { min-height: 34px; padding: 7px 12px; font-size: 11px; }
.btn-lg { min-height: 49px; padding: 13px 24px; }
.btn-block { width: 100%; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

.path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.path-option { position: relative; display: flex; flex-direction: column; align-items: stretch; min-width: 0; border: 1px solid #dfe5e7; border-radius: 10px; padding: 13px 11px 11px; background: #fff; color: var(--ink); text-align: left; transition: border-color .16s, background .16s; }
.path-option:hover { border-color: #9caeed; background: #fafbff; }
.path-option.is-active, .path-option.active, .path-option[aria-pressed="true"] { border-color: var(--accent); background: #f4f6ff; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.path-option.is-active::after, .path-option[aria-pressed="true"]::after { position: absolute; top: 8px; right: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.path-preview { display: grid; place-items: center; width: 100%; height: 54px; margin-bottom: 10px; color: var(--ink); }
.path-preview svg { width: 100%; height: 100%; overflow: visible; }
.path-option.is-active .path-preview, .path-option[aria-pressed="true"] .path-preview { color: var(--accent); }
.path-label { font-size: 11px; font-weight: 600; }
.path-meta { margin-top: 3px; color: var(--ink); font-size: 9px; }
.range-field { padding: 17px 0 0; }
.range-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; font-size: 11px; font-weight: 500; }
.range-value { padding: 2px 7px; border: 1px solid #dfe5ee; border-radius: 5px; background: #f8faff; color: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
input[type="range"] { display: block; width: 100%; height: 22px; margin: 0; border: 0; padding: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: #e5eaf0; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 14px; height: 14px; margin-top: -5px; border: 3px solid #fff; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
input[type="range"] { -webkit-appearance: none; }
.range-ends { display: flex; justify-content: space-between; margin-top: 3px; color: var(--ink); font-size: 9px; }
.settings-summary { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border: 1px solid #dce3e4; border-radius: 5px; padding: 4px 8px; background: #f8faf9; color: var(--ink); font-size: 10px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.badge-success { border-color: #d3e8dd; background: var(--success-soft); color: var(--success); }
.badge-accent { border-color: #dce4ff; background: var(--accent-soft); color: var(--accent); }
.badge-warning { border-color: #eedec2; background: var(--warning-soft); color: var(--warning); }
.badge-danger { border-color: #f0d1cf; background: var(--danger-soft); color: var(--danger); }
.alert { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border: 1px solid #e2e6e4; border-radius: 9px; background: #f7f9f7; color: var(--ink); font-size: 11px; line-height: 1.65; }
.alert svg { width: 16px; height: 16px; margin-top: 2px; }
.alert strong { color: var(--ink); font-weight: 600; }
.alert-info { border-color: #dce4f3; background: #f4f7ff; color: var(--ink); }
.alert-error { border-color: #efcfcc; background: var(--danger-soft); color: #a73f3f; }
.alert-warning { border-color: #efdfc5; background: var(--warning-soft); color: #8a642c; }
.notice { margin-top: 20px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.method-list { display: grid; gap: 20px; list-style: none; margin: 0; padding: 0; counter-reset: steps; }
.method-list li { position: relative; padding-left: 34px; counter-increment: steps; color: var(--muted); font-size: 11px; line-height: 1.7; }
.method-list li::before { position: absolute; top: 0; left: 0; content: "0" counter(steps); color: var(--ink); font-size: 10px; letter-spacing: .7px; }
.method-list strong { display: block; margin-bottom: 3px; color: var(--ink); font-size: 12px; font-weight: 600; }
.method-footer { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--ink); font-size: 10px; line-height: 1.7; }

.test-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; align-items: start; }
.test-stage { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.test-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--border); background: #fff; }
.test-toolbar .card-title { font-size: 13px; }
.test-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.canvas-wrap { position: relative; overflow: hidden; min-width: 0; background-color: #fff; background-image: linear-gradient(#eff3f5 1px, transparent 1px), linear-gradient(90deg, #eff3f5 1px, transparent 1px); background-size: 24px 24px; }
.test-canvas, .canvas-wrap canvas, canvas#trace-canvas, canvas#test-canvas { display: block; width: 100%; height: auto; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.canvas-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: rgb(255 255 255 / 83%); text-align: center; backdrop-filter: blur(3px); }
.canvas-overlay h2 { max-width: 450px; margin-bottom: 11px; font-family: Georgia, "Times New Roman", serif; font-size: 30px; font-weight: 400; letter-spacing: -.8px; }
.canvas-overlay p { max-width: 380px; color: var(--muted); font-size: 12px; }
.canvas-overlay .btn { margin-top: 8px; }
.countdown { color: var(--accent); font-family: Georgia, serif; font-size: 88px; line-height: 1; }
.canvas-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 22px; border-top: 1px solid var(--border); color: var(--ink); font-size: 10px; }
.legend { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.legend-item { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.legend-line { display: inline-block; width: 17px; height: 2px; background: #345ce5; border-radius: 1px; }
.legend-line.reference { background: #94a4b0; }
.legend-line.band { height: 7px; background: #edf0f4; }
.legend-line.pass-2 { background: #df9561; }
.legend-line.pass-3 { background: #719c86; }
.test-sidebar { display: grid; gap: 18px; }
.test-sidebar .card { margin: 0; }
.test-sidebar .card-header { padding: 21px 22px 16px; }
.test-sidebar .card-body { padding: 0 22px 22px; }
.test-sidebar .card-title { font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric { min-width: 0; padding: 19px 20px; border: 1px solid var(--border); border-radius: 11px; background: #fff; }
.metric-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.metric-value { color: var(--ink); font-size: 27px; font-weight: 500; line-height: 1.1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.metric-unit { margin-left: 4px; color: var(--ink); font-size: 12px; font-weight: 400; letter-spacing: 0; }
.metric-hint { display: block; margin-top: 9px; color: var(--ink); font-size: 10px; }
.metric.accent { border-color: #dce3fd; background: #f4f6ff; }
.metric.accent .metric-value { color: var(--accent); }
.progress { height: 4px; overflow: hidden; border-radius: 4px; background: #e9eef0; }
.progress-bar { height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s linear; }
.session-progress { display: grid; gap: 10px; }
.session-progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.timer { margin: 9px 0 18px; font-size: 43px; font-weight: 400; line-height: 1; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.timer small { color: var(--ink); font-size: 15px; letter-spacing: 0; }
.key-value { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 8px 0; color: var(--muted); font-size: 11px; }
.key-value strong { color: var(--ink); font-weight: 500; text-align: right; }
.key-value + .key-value { border-top: 1px solid #edf0ef; }
.step-list { display: flex; flex-wrap: wrap; gap: 20px; margin: 0 0 25px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 11px; }
.step.is-active { color: var(--accent); }
.step.is-complete { color: var(--success); }
.step-dot { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }

.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; padding: 44px 24px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 62px; height: 62px; margin-bottom: 20px; border: 1px solid #dfe6ec; border-radius: 50%; background: #f6f8fb; color: var(--ink); }
.empty-icon svg { width: 25px; height: 25px; }
.empty-state h2, .empty-state h3 { margin-bottom: 10px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; letter-spacing: -.5px; }
.empty-state p { max-width: 420px; margin-bottom: 22px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
.data-table th { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 13px 18px; background: #f8faf9; color: var(--ink); font-size: 9px; font-weight: 600; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap; }
.data-table td { border-bottom: 1px solid #edf0ef; padding: 16px 18px; color: var(--ink); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fcfdfd; }
.data-table td strong { color: var(--ink); font-weight: 500; }
.data-table .actions { display: flex; gap: 6px; }
.table-muted { display: block; margin-top: 3px; color: var(--ink); font-size: 10px; }
.result-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 18px; }
.result-heading h2 { margin: 0; font-size: 15px; font-weight: 600; }
.result-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; }
.result-chart { min-width: 0; }
.result-chart canvas { display: block; width: 100%; height: auto; }
.result-note { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.75; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.toolbar-search { width: 280px; max-width: 100%; }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 25px; color: var(--muted); font-size: 11px; }

.auth-shell { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 32px 20px; background: var(--bg); }
.auth-card { width: min(100%, 420px); padding: 36px; border: 1px solid var(--border); border-radius: 19px; background: #fff; box-shadow: 0 15px 65px rgb(21 45 55 / 5%); }
.auth-card .brand { justify-content: center; margin-bottom: 36px; padding: 0; color: var(--rail); }
.auth-card .brand-subtitle { color: var(--muted); }
.auth-card .brand-mark { border-color: #a7b5bd; color: var(--rail); }
.auth-card .page-title { font-size: 31px; letter-spacing: -1px; }
.auth-card .page-subtitle { margin-bottom: 28px; font-size: 12px; }
.auth-card .field + .field { margin-top: 17px; }
.auth-card .btn-block { margin-top: 24px; }
.auth-footer { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--ink); text-align: center; font-size: 10px; }
.admin-shell .sidebar { background: #1e2c38; }
.admin-badge { color: #fff; font-size: 9px; text-transform: uppercase; letter-spacing: 1.8px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(13 29 38 / 45%); backdrop-filter: blur(3px); }
.modal { width: min(100%, 560px); max-height: 90vh; overflow-y: auto; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 20px 100px rgb(0 0 0 / 14%); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 24px 28px 18px; }
.modal-header h2 { margin: 0; font-size: 19px; font-weight: 500; }
.modal-body { padding: 0 28px 28px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 28px; border-top: 1px solid var(--border); }
.toast { position: fixed; z-index: 150; right: 28px; bottom: 26px; max-width: min(440px, calc(100vw - 40px)); border: 1px solid #cadbd2; border-radius: 11px; padding: 15px 20px; background: #f4fff8; box-shadow: 0 9px 35px rgb(21 45 55 / 12%); color: #24634a; font-size: 12px; }
.toast.error { border-color: #ebceca; background: #fff4f2; color: #ab4242; }
.loading { display: grid; place-items: center; min-height: 200px; color: var(--muted); }
.muted { color: var(--muted); }
.text-small { font-size: 11px; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }

/* Concrete view components. The 5:2 drawing area preserves measurement geometry. */
.field-full { grid-column: 1 / -1; }
.start-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); align-items: start; }
.start-grid > .card { margin: 0; }
.start-grid .card-header { min-height: 96px; }
.start-grid .form-grid { row-gap: 23px; }
.start-grid .form-grid > .field-full:has(> .btn) { margin-top: 7px; }
.privacy-note { margin: 0; padding-top: 17px; border-top: 1px solid #e8eceb; line-height: 1.8; }
.path-option > span:last-child { font-size: 10px; font-weight: 500; line-height: 1.5; }
.path-preview { font-size: 34px; line-height: 1; }
.path-option[aria-checked="true"] { border-color: var(--accent); background: #f4f6ff; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.range-scale { display: flex; justify-content: space-between; margin-top: 4px; color: var(--ink); font-size: 9px; }
.preview-box { margin-top: 24px; border: 1px solid #e3e9ed; border-radius: 9px; background: #fbfcff; overflow: hidden; }
.preview-top { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px 0; gap: 10px; }
.preview-top .eyebrow { margin: 0; color: var(--ink); font-size: 8px; letter-spacing: 1.25px; }
.preview-top .badge { border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 9px; }
.preview-canvas, .test-canvas, .admin-trajectory, #trace-canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; }
.preview-canvas { max-height: none; }
.method-copy { max-width: 850px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.method-copy .alert { margin: 23px 0; }
.live-heading { align-items: center; }
.timer-pill { display: flex; align-items: baseline; gap: 6px; flex-shrink: 0; padding: 10px 15px; border: 1px solid #e0e6f4; border-radius: 9px; background: #f7f9ff; color: var(--ink); font-size: 11px; }
.timer-label { align-self: center; margin-right: 9px; color: var(--ink); font-size: 8px; letter-spacing: 1px; }
.timer-pill strong { color: var(--accent); font-size: 28px; line-height: 1.2; font-weight: 500; font-variant-numeric: tabular-nums; }
.live-card .test-layout { grid-template-columns: minmax(0, 1fr) 228px; gap: 20px; }
.live-card .test-stage { border-radius: 10px; box-shadow: none; }
.live-card .test-stage > .legend { padding: 14px 20px; border-top: 1px solid var(--border); background: #fcfdfd; }
.live-card .test-toolbar { border-top: 1px solid var(--border); border-bottom: 0; padding: 14px 17px; }
.live-card .test-status { flex: 1 1 200px; align-items: flex-start; line-height: 1.6; }
.live-card .test-status .status-dot { margin-top: 6px; flex-shrink: 0; }
.live-side .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.live-side .metric { padding: 15px 12px; background: #fbfcfc; border-radius: 9px; }
.live-side .metric-value { font-size: 23px; font-weight: 500; }
.metric-value small { margin-left: 3px; color: var(--ink); font-size: 11px; font-weight: 400; letter-spacing: 0; white-space: nowrap; }
.legend-trace { background: #7854bb; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #345ce5; }
.section-kicker { color: var(--ink); font-size: 8px; font-weight: 500; letter-spacing: 1.3px; }
.pass-history { margin-top: 23px; }
.pass-list { margin: 11px 0 0; padding: 0; list-style: none; }
.pass-list li { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid #e5eae9; color: var(--ink); font-size: 10px; }
.pass-list li strong { color: var(--ink); font-size: 10px; font-weight: 500; }
.pass-index { color: var(--ink); font-variant-numeric: tabular-nums; }
.pass-error { grid-column: 2 / -1; color: var(--ink); font-size: 9px; }
.pass-list li.empty-state { display: block; min-height: 0; padding: 16px 0; border: 0; color: var(--ink); text-align: left; font-size: 10px; }
.method-footnote { margin: 21px 0 0; color: var(--ink); font-size: 10px; line-height: 1.6; }
.orientation-hint { display: none; }
.result-grid { align-items: start; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.result-metrics .metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
.result-metrics .metric:first-child { border-color: #dfe5fc; background: #f5f7ff; }
.result-metrics .metric:first-child .metric-value { color: var(--accent); }
.methodology-note { margin: 23px 0 20px; }
.admin-shell.app-shell { display: block; }
.admin-main { max-width: 1500px; min-height: 100vh; margin: 0 auto; padding: 45px 48px; }
.admin-header { padding-bottom: 13px; }
.admin-filters { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(130px, .6fr) minmax(130px, .6fr) auto; align-items: end; gap: 18px; }
.admin-shell .auth-shell { flex-direction: column; gap: 28px; min-height: calc(100vh - 90px); padding: 20px; }
.auth-shell > .brand { color: var(--rail); }
.auth-shell > .brand .brand-subtitle { color: var(--muted); }
.auth-shell > .brand .brand-mark { border-color: #849ba4; color: var(--rail); }
.auth-shell > .card { width: min(100%, 430px); }
.auth-shell > .card .card-header { padding-top: 31px; }
.auth-shell > .card .card-title { font-family: Georgia, serif; font-size: 26px; font-weight: 400; letter-spacing: -.5px; }
.auth-shell > .card .card-body { padding-bottom: 31px; }
.auth-foot { margin: 0; color: var(--ink); font-size: 10px; }
.detail-panel { margin: 28px; border: 1px solid #dce4e9; border-radius: 12px; background: #f8fafc; }
.detail-panel > .card-header { padding: 23px 23px 20px; }
.session-list { display: grid; gap: 10px; padding: 0 23px 23px; }
.session-detail { min-width: 0; border: 1px solid #dfe6e9; border-radius: 9px; background: #fff; overflow: hidden; }
.session-detail > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 25px; padding: 16px 20px; color: var(--ink); font-size: 11px; cursor: pointer; }
.session-detail > summary::before { content: "+"; color: var(--accent); font-size: 17px; font-weight: 300; }
.session-detail[open] > summary::before { content: "−"; }
.session-detail > summary > span:first-child { color: var(--ink); font-weight: 500; }
.session-detail > summary:hover { background: #fcfdff; }
.session-body { padding: 0 20px 20px; }
.session-body .metric-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.session-body .metric { background: #fafbfc; padding: 14px; border-radius: 8px; }
.session-body > .field-hint { margin: 18px 0; }
.admin-trajectory { border: 1px solid #e2e8ed; border-radius: 8px; background-color: #fff; background-image: linear-gradient(#f0f3f6 1px, transparent 1px), linear-gradient(90deg, #f0f3f6 1px, transparent 1px); background-size: 24px 24px; }

@media (max-width: 1200px) {
  .start-grid { grid-template-columns: minmax(0, 1fr); }
  .start-grid .card-header { min-height: auto; }
  .start-grid .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-grid .field-full { grid-column: 1 / -1; }
  .live-card .test-layout { grid-template-columns: minmax(0, 1fr); }
  .live-side { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .7fr); gap: 24px; }
  .pass-history { margin-top: 0; }
}
@media (max-width: 850px) {
  .admin-main { padding: 30px 24px; }
  .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell .auth-shell { min-height: calc(100vh - 60px); }
  .session-body .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .result-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  .start-grid .form-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .start-grid .form-grid > .field-full:has(> .btn) .btn { width: 100%; }
  .path-option > span:last-child { font-size: 12px; }
  .live-heading { align-items: flex-start; }
  .timer-pill { gap: 4px; padding: 8px 10px; }
  .timer-label { display: none; }
  .timer-pill strong { font-size: 25px; }
  .live-card .card-body { padding-right: 12px; padding-left: 12px; }
  .live-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .live-side .metric-grid > .metric:last-child { grid-column: auto; }
  .live-card .test-stage > .legend { padding: 12px; }
  .live-card .test-toolbar { padding: 12px; }
  .orientation-hint { display: block; margin: 0; padding: 10px 12px; border-top: 1px solid var(--border); background: #f7f9ff; color: var(--ink); font-size: 10px; line-height: 1.6; }
  .result-metrics { gap: 10px; }
  .result-metrics .metric { padding: 14px; }
  .admin-main { padding: 25px 16px; }
  .admin-header { padding-bottom: 0; }
  .admin-filters { gap: 15px 12px; }
  .admin-filters > .field:first-child { grid-column: 1 / -1; }
  .admin-filters .btn { grid-column: 1 / -1; }
  .admin-shell .auth-shell { min-height: calc(100vh - 50px); padding: 0; gap: 23px; }
  .detail-panel { margin: 16px 12px; }
  .detail-panel > .card-header { padding: 19px 15px; }
  .session-list { padding: 0 12px 15px; }
  .session-detail > summary { padding: 14px; gap: 8px 13px; font-size: 10px; }
  .session-body { padding: 0 12px 15px; }
  .session-body .metric { padding: 10px; }
}

@media (min-width: 1600px) {
  .main { padding-right: 64px; padding-left: 64px; }
  .sidebar { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 1200px) {
  .app-shell { grid-template-columns: 213px minmax(0, 1fr); }
  .sidebar { padding: 32px 16px 24px; }
  .main { padding: 28px; }
  .brand { gap: 10px; padding: 0 8px; }
  .brand-copy strong, .brand-name { font-size: 25px; }
  .brand-subtitle { font-size: 8px; letter-spacing: 1.2px; }
  .split-layout { grid-template-columns: minmax(0, 1.6fr) minmax(235px, 1fr); gap: 18px; }
  .test-layout, .result-layout { grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; }
  .card-header { padding: 23px 23px 18px; }
  .card-body { padding: 0 23px 23px; }
  .card-section { padding: 22px 23px; }
  .card-footer { padding: 18px 23px; }
  .metric-grid { gap: 10px; }
  .metric { padding: 16px; }
  .metric-value { font-size: 24px; }
}
@media (max-width: 1000px) {
  .split-layout, .test-layout, .result-layout { grid-template-columns: minmax(0, 1fr); }
  .test-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .test-sidebar > :only-child { grid-column: 1 / -1; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-header { align-items: flex-start; }
  .header-actions { justify-content: flex-end; }
}
@media (max-width: 850px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; padding: 18px 24px 0; }
  .brand { padding: 0; gap: 10px; }
  .brand-mark { width: 31px; height: 31px; }
  .brand-copy strong, .brand-name { font-size: 24px; }
  .brand-subtitle { font-size: 8px; }
  .nav-list { flex-direction: row; gap: 8px; margin-top: 18px; padding-bottom: 13px; overflow-x: auto; }
  .nav-item { width: auto; flex-shrink: 0; min-height: 41px; padding: 9px 14px; font-size: 11px; }
  .nav-label, .sidebar-note, .sidebar-footer, .sidebar-spacer { display: none; }
  .main { padding: 23px 24px 40px; }
  .topbar { padding-bottom: 26px; }
  .page-title { font-size: 36px; }
  .page-subtitle { font-size: 12px; }
}
@media (max-width: 580px) {
  body { font-size: 13px; }
  .sidebar { padding: 17px 18px 0; }
  .main { padding: 21px 16px 32px; }
  .topbar { padding-bottom: 23px; font-size: 10px; gap: 10px; }
  .page-header { flex-direction: column; gap: 17px; margin-bottom: 22px; }
  .page-title { font-size: 32px; letter-spacing: -1.1px; }
  .page-subtitle { margin-top: 11px; }
  .eyebrow { margin-bottom: 9px; font-size: 9px; }
  .header-actions { width: 100%; justify-content: flex-start; }
  .nav-list { gap: 6px; }
  .nav-item { gap: 7px; padding: 9px 11px; }
  .nav-number { width: 19px; height: 19px; font-size: 9px; }
  .card { border-radius: 12px; }
  .card + .card { margin-top: 16px; }
  .card-header { padding: 20px 18px 17px; gap: 12px; }
  .card-body, .card-body:first-child { padding: 0 18px 20px; }
  .card-body:first-child { padding-top: 20px; }
  .card-section { padding: 20px 18px; }
  .card-footer { flex-direction: column; align-items: stretch; padding: 17px 18px; }
  .card-footer .btn { width: 100%; }
  .card-title { font-size: 15px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .path-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .path-option { padding: 12px 13px; }
  .path-preview { height: 45px; margin-bottom: 7px; }
  .path-label { font-size: 12px; }
  .path-meta { font-size: 10px; }
  .segment { min-height: 38px; font-size: 11px; }
  .btn, button.btn { min-height: 44px; }
  .btn-sm { min-height: 38px; }
  .input, .select, .textarea, input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]), select, textarea { min-height: 45px; font-size: 14px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-grid > .metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .metric { padding: 16px; }
  .metric-value { font-size: 26px; }
  .test-sidebar { grid-template-columns: minmax(0, 1fr); }
  .test-toolbar { padding: 15px 17px; }
  .canvas-caption { padding: 13px 17px; }
  .canvas-overlay { padding: 18px; }
  .canvas-overlay h2 { font-size: 24px; }
  .canvas-overlay p { font-size: 11px; }
  .legend { gap: 11px; }
  .step-list { gap: 13px; }
  .step { font-size: 10px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .data-table th, .data-table td { padding-left: 14px; padding-right: 14px; }
  .auth-card { padding: 29px 24px; }
  .modal-backdrop { padding: 14px; }
  .modal-header { padding: 22px 20px 17px; }
  .modal-body { padding: 0 20px 22px; }
  .modal-footer { padding: 16px 20px; }
  .toolbar-search { width: 100%; }
  .pagination { padding: 16px 18px; }
  .toast { right: 20px; bottom: 20px; }
}
/* Reading sizes are kept consistent across desktop and touch layouts. */
body { font-size: 16px; }
.page-subtitle, .card-description, .field-hint, .privacy-note,
.method-copy, .notice, .method-footnote, .methodology-note, .result-note,
.checkbox-field, .alert, .empty-state p, .canvas-overlay p { font-size: 14px; line-height: 1.7; }
.field-label, .field > label, label.field-label, .range-head,
.segment, .step, .key-value, .session-progress-label { font-size: 14px; }
.input, .select, .textarea, input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]), select, textarea { min-height: 47px; font-size: 16px; }
.btn, button.btn { min-height: 47px; font-size: 14px; }
.btn-sm, button.btn-sm { min-height: 42px; padding: 9px 13px; font-size: 13px; }
.card-title, .test-sidebar .card-title { font-size: 18px; line-height: 1.4; }
.eyebrow { font-size: 11px; }
.nav-item { font-size: 14px; }
.nav-number { font-size: 12px; }
.sidebar-note, .sidebar-note strong { font-size: 13px; }
.brand-subtitle { font-size: 10px; letter-spacing: 1px; }
.path-label, .path-option > span:last-child { font-size: 14px; line-height: 1.45; }
.path-meta, .path-option .path-meta { font-size: 12px; }
.path-option { padding-top: 14px; padding-bottom: 14px; }
.range-value { font-size: 13px; padding: 3px 8px; }
.range-scale, .range-ends { font-size: 12px; }
.range-field { padding-top: 22px; }
.preview-top { padding: 15px 16px 0; }
.preview-top .eyebrow, .preview-top .badge { font-size: 11px; }
.badge { font-size: 12px; padding: 5px 9px; white-space: normal; }
.metric-label { font-size: 13px; line-height: 1.5; }
.metric-unit, .metric-value small { font-size: 14px; }
.metric-hint { font-size: 12px; }
.metric-value, .live-side .metric-value { font-size: 29px; }
#view-root > .card > .card-body > .result-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.test-toolbar .card-title { font-size: 16px; }
.test-status, .legend-item { font-size: 13px; }
.canvas-caption { font-size: 12px; }
.section-kicker { font-size: 11px; letter-spacing: .9px; }
.pass-list li, .pass-list li strong { font-size: 13px; }
.pass-list li { grid-template-columns: 22px 1fr auto; gap: 5px 9px; }
.pass-error, .pass-list li.empty-state { font-size: 12px; }
.live-card .test-layout { grid-template-columns: minmax(0, 1fr) 270px; }
.live-side .metric { padding: 16px 13px; }
.timer-label { font-size: 10px; }
.timer-pill { font-size: 14px; }
.timer-pill strong { font-size: 31px; }
.data-table { font-size: 14px; }
.data-table th { font-size: 11px; letter-spacing: .35px; padding-top: 15px; padding-bottom: 15px; }
.data-table td { padding-top: 17px; padding-bottom: 17px; }
.table-muted, .pagination, .auth-foot, .auth-footer { font-size: 12px; }
.session-detail > summary { font-size: 14px; }
.session-body .metric strong { font-size: 20px; font-weight: 500; }
.session-body .metric-grid { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
.toast { font-size: 14px; }
.method-list li { font-size: 14px; }
.method-list strong { font-size: 15px; }
.method-footer { font-size: 12px; }
.orientation-hint { font-size: 12px; }
.hybrid-progress { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 19px; }
.hybrid-step { display: inline-flex; align-items: center; gap: 7px; min-height: 35px; border: 1px solid #dfe5e8; border-radius: 7px; padding: 7px 11px; background: #f8fafb; color: var(--ink); font-size: 13px; line-height: 1.4; }
.hybrid-step.is-active { border-color: #afc0ff; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.hybrid-step.is-complete { border-color: #c9e0d3; background: var(--success-soft); color: var(--success); }
.hybrid-step.is-complete::before { content: "✓"; font-size: 13px; }
.hybrid-step small { font-size: 12px; }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 24px; align-items: start; }
.charts-grid > .chart-card:has(.trajectory-canvas) { grid-column: 1 / -1; }
.chart-card { min-width: 0; margin: 0; padding: 23px; border: 1px solid var(--border); border-radius: 13px; background: #fff; overflow: hidden; }
.charts-grid > .card + .card, .charts-grid > .chart-card + .chart-card { margin-top: 0; }
.chart-card h2, .chart-card h3, .chart-heading { margin: 0 0 10px; font-size: 18px; font-weight: 600; line-height: 1.45; letter-spacing: -.2px; }
.chart-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.chart-heading > div { min-width: 0; }
.chart-heading > .field { flex: 0 0 260px; }
.chart-card p, .chart-description, .chart-axis-note { margin: 0 0 17px; color: var(--muted); font-size: 14px; font-weight: 400; line-height: 1.65; }
.chart-card .card-header { padding: 0 0 18px; }
.chart-card .card-body { padding: 0; }
.chart-canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; min-width: 0; border: 1px solid #e5ebef; border-radius: 8px; background: #fff; }
.chart-canvas[data-chart="trajectory"], .chart-canvas.trajectory-canvas { aspect-ratio: 5 / 2; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 17px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.chart-axis-note { margin-top: 12px; margin-bottom: 0; font-size: 12px; }
.trajectory-select { max-width: 100%; margin: 2px 0 18px; }
.trajectory-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.trajectory-card { min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 16px; background: #fff; }
.trajectory-card canvas { display: block; width: 100%; height: auto; aspect-ratio: 5 / 2; }
.line-result-table { min-width: 650px; font-variant-numeric: tabular-nums; }
.charts-grid > .chart-card:only-child { grid-column: 1 / -1; }

@media (max-width: 1200px) {
  .live-card .test-layout { grid-template-columns: minmax(0, 1fr); }
  .charts-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 850px) {
  .nav-item { font-size: 14px; }
  .brand-subtitle { font-size: 10px; }
  .chart-card { padding: 20px; }
  .trajectory-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 580px) {
  body { font-size: 16px; }
  .nav-item { min-height: 44px; font-size: 13px; }
  .card-title { font-size: 18px; }
  .page-subtitle { font-size: 14px; }
  .eyebrow { font-size: 10px; }
  .header-actions { gap: 8px; }
  .path-label, .path-option > span:last-child { font-size: 14px; }
  .input, .select, .textarea, input:not([type="range"]):not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="submit"]), select, textarea { font-size: 16px; }
  .badge { font-size: 11px; }
  .metric-value, .live-side .metric-value { font-size: 27px; }
  .metric-label { font-size: 13px; }
  #view-root > .card > .card-body > .result-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .canvas-overlay p { font-size: 14px; }
  .legend-item { font-size: 12px; }
  .charts-grid { gap: 16px; margin-top: 18px; }
  .chart-card { padding: 18px 12px; }
  .chart-card h2, .chart-card h3 { font-size: 17px; }
  .chart-heading { flex-direction: column; gap: 0; }
  .chart-heading > .field { flex: initial; width: 100%; }
  .chart-canvas { aspect-ratio: 4 / 3; }
  .chart-canvas[data-chart="trajectory"], .chart-canvas.trajectory-canvas { aspect-ratio: 5 / 2; }
  .hybrid-progress { gap: 6px; }
  .hybrid-step { padding: 6px 9px; font-size: 12px; }
  .session-detail > summary { font-size: 13px; }
  .session-body .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .session-body .metric strong { font-size: 18px; }
  .data-table th { font-size: 11px; }
}

/* Researcher directory: compact pages, an explicit filter drawer and a separate profile. */
.admin-filter-details { margin-bottom: 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; overflow: hidden; }
.card > .admin-filter-details { margin-bottom: 0; border: 0; border-radius: 0; }
.admin-filter-details > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-height: 60px; padding: 17px 23px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.5; list-style: none; cursor: pointer; }
.admin-filter-details > summary::-webkit-details-marker { display: none; }
.admin-filter-details > summary::after { content: "+"; display: grid; place-items: center; width: 25px; height: 25px; flex-shrink: 0; margin-left: auto; border: 1px solid #dce4e8; border-radius: 6px; color: var(--ink); font-size: 20px; font-weight: 400; line-height: 1; }
.admin-filter-details[open] > summary::after { content: "−"; }
.admin-filter-details > summary:hover { background: #fafcff; }
.admin-filter-details[open] > summary { border-bottom: 1px solid #e6ebed; }
.admin-filter-details > summary:focus-visible { outline-offset: -4px; }
.admin-filter-details > summary .badge, .filter-active-count { display: inline-flex; align-items: center; width: fit-content; border: 1px solid #dce4ff; border-radius: 5px; padding: 3px 8px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; }
.admin-filter-details > summary .field-hint { font-size: 13px; font-weight: 400; }
.admin-filter-details .admin-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 19px 20px; padding: 23px; }
.admin-filter-details .admin-filters > .field:first-child { grid-column: span 2; }
.admin-filter-details .admin-filters > .field:has([name="instrument"]), .admin-filter-details .admin-filters > .field:has([name="from"]), .admin-filter-details .admin-filters > .field:has([name="to"]) { grid-column: span 2; }
.admin-filter-details .admin-filters .field-label { font-size: 13px; }
.filter-actions { display: flex; grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; align-items: center; gap: 10px; padding-top: 3px; }
.filter-actions .field-hint { flex: 1; margin: 0; font-size: 13px; }
.admin-pagination { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px 20px; padding: 17px 23px; border-top: 1px solid var(--border); color: var(--muted); background: #fbfcfc; font-size: 13px; line-height: 1.5; }
.admin-pagination > div, .pagination-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-pagination .btn { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.admin-pagination .btn[aria-disabled="true"] { opacity: .45; cursor: default; pointer-events: none; }
.admin-pagination strong { color: var(--ink); font-weight: 600; }
.admin-pagination .page-indicator { padding: 0 5px; font-variant-numeric: tabular-nums; }
.participants-table { width: 100%; min-width: 830px; }
.participants-table th { padding-top: 12px; padding-bottom: 12px; font-size: 11px; }
.participants-table td { padding-top: 12px; padding-bottom: 12px; font-size: 14px; }
.participants-table td:first-child { min-width: 190px; }
.participants-table td:first-child strong { display: block; overflow-wrap: anywhere; }
.participants-table td:not(:first-child) { white-space: nowrap; }
.participants-table .btn { min-height: 37px; padding: 7px 12px; font-size: 13px; }
.participants-table .table-muted { font-size: 12px; }
.participant-page { min-width: 0; }
.participant-back { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; margin: 0 0 21px; border: 1px solid transparent; border-radius: 7px; padding: 8px 0; background: transparent; color: var(--ink); font-size: 14px; font-weight: 500; text-decoration: none; }
.participant-back:hover { color: var(--accent); }
.participant-back.btn { padding-left: 13px; padding-right: 13px; border-color: #dce4e8; background: #fff; }
.participant-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.participant-header .page-title { overflow-wrap: anywhere; }
.participant-profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; }
.profile-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; border: 1px solid #e2e8eb; border-radius: 9px; padding: 17px 18px; background: #f9fbfc; }
.profile-label { margin: 0; color: var(--ink); font-size: 12px; line-height: 1.5; }
.profile-value { margin: 0; color: var(--ink); font-size: 16px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.participant-page > .card { margin-top: 22px; }
.participant-page > .card:first-child { margin-top: 0; }
.participant-page .session-list { padding: 0; }
.participant-page .session-detail { margin: 0; }
.participant-page .session-detail > summary { padding: 18px 22px; }
.participant-page .session-detail > summary::marker { content: ""; }
.participant-page .session-detail > summary::-webkit-details-marker { display: none; }
.participant-page .session-body { padding: 0 22px 22px; }
.participant-page .session-body > .metric-grid { padding-top: 3px; }
.participant-page .session-body .charts-grid { margin-top: 20px; }
.participant-page .session-body > .admin-trajectory { margin: 16px 0 20px; }
.participant-page .session-body .chart-card { padding: 18px; }
.participant-section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 16px; }
.participant-section-header h2 { margin: 0; font-size: 19px; font-weight: 600; }

@media (max-width: 1000px) {
  .admin-filter-details .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .participant-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .admin-filter-details { margin-bottom: 17px; }
  .admin-filter-details > summary { padding: 15px 17px; font-size: 14px; gap: 8px; }
  .admin-filter-details > summary .field-hint { flex-basis: 100%; font-size: 12px; order: 2; }
  .admin-filter-details .admin-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 18px 16px; gap: 17px 12px; }
  .admin-filter-details .admin-filters > .field:first-child { grid-column: 1 / -1; }
  .admin-filter-details .admin-filters > .btn { grid-column: auto; }
  .admin-filter-details .admin-filters .field-label { font-size: 12px; }
  .admin-filter-details .admin-filters input, .admin-filter-details .admin-filters select { padding-right: 8px; padding-left: 9px; }
  .filter-actions { justify-content: stretch; }
  .filter-actions .btn { flex: 1; }
  .filter-actions .field-hint { flex-basis: 100%; }
  .admin-pagination { justify-content: center; gap: 12px; padding: 16px; text-align: center; }
  .admin-pagination > div { justify-content: center; }
  .admin-pagination > .field-hint { width: 100%; }
  .participant-back { margin-bottom: 15px; }
  .participant-header { flex-direction: column; gap: 13px; }
  .participant-profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .profile-field { padding: 13px 11px; }
  .profile-label { font-size: 12px; }
  .profile-value { font-size: 14px; }
  .participant-page .session-detail > summary { padding: 16px; }
  .participant-page .session-body { padding: 0 12px 16px; }
  .participant-page .session-body .chart-card { padding: 16px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .card, .test-stage, .path-option, .segment, .btn, .nav-item { border: 1px solid CanvasText; }
  .path-option.is-active, .segment.is-active, .nav-item.is-active { outline: 2px solid Highlight; }
  .legend-line, .status-dot, .progress-bar { forced-color-adjust: none; }
}
@media print {
  body { background: #fff; font-size: 11px; }
  .app-shell { display: block; }
  .sidebar, .topbar, .header-actions, .form-actions, .button-row, .btn { display: none !important; }
  .main { padding: 0; }
  .card, .metric, .test-stage { box-shadow: none; break-inside: avoid; }
  .page-title { font-size: 28px; }
  .test-layout, .result-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Tooltips are positioned within the viewport by the help controller. */
.info-help { display: inline-flex; align-items: center; vertical-align: middle; margin-left: 6px; font-size: 16px; text-transform: none; letter-spacing: normal; }
.info-trigger { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; min-width: 28px; height: 28px; min-height: 28px; border: 1.5px solid #111820; border-radius: 50%; padding: 0; background: #fff; color: #111820; font-size: 17px; font-weight: 700; line-height: 1; cursor: help; }
.info-trigger:hover, .info-help:focus-within .info-trigger, .info-trigger[aria-expanded="true"] { background: #111820; color: #fff; }
.info-tooltip { display: none; position: fixed; z-index: 10000; width: min(320px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #111820; border-radius: 10px; padding: 14px 16px; background: #fff; color: #000; box-shadow: 0 8px 28px rgb(0 0 0 / 22%); font-size: 16px; font-weight: 400; line-height: 1.5; text-align: left; text-transform: none; letter-spacing: normal; white-space: normal; overflow-wrap: anywhere; cursor: auto; }
.info-help.is-open .info-tooltip, .info-tooltip.is-open { display: block; }
@media print {
  .info-help { display: none !important; }
}
