@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible Next";
    src: url("../fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Phosphor";
    src: url("../fonts/phosphor-regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: block;
}

@font-face {
    font-family: "Phosphor Bold";
    src: url("../fonts/phosphor-bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: block;
}

:root {
    --brand-blue: #29a9e0;
    --brand-turquoise: #74b2bb;
    --brand-green: #22b373;
    --brand-deep: #0b8093;
    --surface: #f2f8f8;
    --surface-deep: #e4eff1;
    --panel: #ffffff;
    --graphite: #12333b;
    --graphite-soft: #355860;
    --muted: #4f6d75;
    --line: #c5dadd;
    --line-strong: #91b0b6;
    --action: var(--brand-deep);
    --action-hover: #075c6b;
    --signal: var(--brand-blue);
    --signal-soft: #e2f3f9;
    --resolved: #167b52;
    --resolved-soft: #def3e8;
    --warning: #87520f;
    --warning-soft: #fff2dc;
    --error: #b34e42;
    --error-soft: #fff0ed;
    --error-border: #e2b8ae;
    --shadow: rgba(18, 51, 59, 0.12);
    --shadow-raised: 0 10px 26px rgba(18, 51, 59, 0.12);
    --weight-text: 460;
    --weight-label: 620;
    --weight-control: 660;
    --weight-heading: 720;
    --weight-display: 760;
    font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--graphite);
    background: var(--surface);
    font-size: 16px;
    line-height: 1.45;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface);
}

body {
    min-width: 320px;
    margin: 0;
    background: var(--surface);
    font-weight: var(--weight-text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex="0"]:focus-visible {
    outline: 3px solid var(--action);
    outline-offset: 3px;
}

h1:focus {
    outline: none;
}

a {
    color: inherit;
}

.ph-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    line-height: 1;
}

.ph-icon::before {
    font-family: "Phosphor";
    font-style: normal;
    font-weight: 400;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.ph-icon--bold::before {
    font-family: "Phosphor Bold";
    font-weight: 700;
}

.ph-arrow-clockwise::before {
    content: "\e036";
}

.ph-arrow-left::before {
    content: "\e058";
}

.ph-arrow-right::before {
    content: "\e06c";
}

.ph-check-circle::before {
    content: "\e184";
}

.ph-keyboard::before {
    content: "\e2d8";
}

.ph-link::before {
    content: "\e2e2";
}

.ph-play::before {
    content: "\e3d0";
}

.ph-squares-four::before {
    content: "\e464";
}

.ph-warning-circle::before {
    content: "\e4e2";
}

.ph-x::before {
    content: "\e4f6";
}

.app-shell {
    min-height: 100vh;
}

.status-rail {
    position: sticky;
    z-index: 10;
    top: 0;
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 0 32px;
    color: var(--graphite);
    background: var(--panel);
    border-bottom: 2px solid var(--brand-turquoise);
    box-shadow: 0 1px 0 rgba(18, 51, 59, 0.08);
}

.wordmark {
    display: inline-grid;
    align-items: center;
    min-width: 0;
    color: var(--graphite);
    text-decoration: none;
}

.brand-lockup {
    grid-template-columns: 124px 2px minmax(0, 1fr);
    column-gap: 16px;
}

.esys-logo {
    display: inline-flex;
    align-items: center;
}

.esys-logo img {
    display: block;
    width: 124px;
    height: auto;
    object-fit: contain;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.brand-axis {
    width: 2px;
    height: 30px;
    background: var(--brand-turquoise);
}

.product-wordmark {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.product-name {
    color: var(--graphite);
    font-size: 1.2rem;
    font-weight: var(--weight-display);
    letter-spacing: -0.02em;
    line-height: 1;
}

.product-type {
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.12em;
    line-height: 1;
    text-transform: uppercase;
}

.top-nav {
    display: flex;
    align-self: stretch;
    gap: 4px;
    margin-left: auto;
    margin-right: 24px;
}

.top-nav a {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.top-nav a:hover,
.top-nav a.active {
    color: var(--graphite);
    background: var(--surface-deep);
}

.top-nav a.active {
    box-shadow: inset 0 -3px 0 var(--signal);
}

.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.13em;
}

.status-dot,
.scope-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.status-dot {
    background: var(--resolved);
    box-shadow: 0 0 0 4px rgba(22, 123, 82, 0.2);
}

.scope-pulse {
    background: var(--signal);
    box-shadow: 0 0 0 4px rgba(41, 169, 224, 0.2);
}

.status-rail .status-dot {
    background: var(--brand-green);
}

.app-content {
    min-height: calc(100vh - 64px);
}

.label-page {
    min-height: calc(100vh - 64px);
}

.bench,
.data-page,
.review-page {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: clamp(26px, 4vw, 56px) clamp(22px, 5vw, 76px) 70px;
}

.bench-header,
.data-page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.dataset-context {
    display: grid;
    gap: 4px;
    max-width: 760px;
    margin-top: 14px;
}

.dataset-name {
    color: var(--graphite);
    font-size: 1.18rem;
    font-weight: var(--weight-heading);
    letter-spacing: -0.015em;
    line-height: 1.15;
}

.dataset-meta {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.eyebrow {
    display: block;
    color: var(--action);
    font-size: 0.67rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.16em;
    line-height: 1.2;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 0;
    font-size: clamp(2rem, 4vw, 3.55rem);
    font-weight: var(--weight-display);
    letter-spacing: -0.045em;
    line-height: 0.98;
}

h2 {
    margin-bottom: 8px;
    font-size: clamp(1.35rem, 2vw, 2rem);
    font-weight: var(--weight-heading);
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.bench-readout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    min-width: 280px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--graphite);
    background: rgba(255, 255, 255, 0.78);
}

.readout-label {
    color: var(--muted);
    font-size: 0.61rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.11em;
}

.bench-readout strong {
    min-width: 0;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.bench-readout small {
    grid-column: 1 / -1;
    color: var(--muted);
    font-size: 0.69rem;
    line-height: 1.25;
}

.readout-divider {
    display: none;
}

.specimen-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(310px, 0.8fr);
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.specimen-bay,
.decision-panel,
.etched-panel {
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-raised);
}

.specimen-bay {
    min-width: 0;
    padding: clamp(19px, 3vw, 34px);
}

.scope-header,
.panel-heading,
.scope-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.scope-caption {
    min-width: 0;
    overflow: hidden;
}

.panel-index {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.scope-frame,
.review-scope {
    position: relative;
    min-height: 275px;
    margin-top: 26px;
    overflow: hidden;
    color: var(--panel);
    background: var(--graphite);
    border: 1px solid #23505b;
}

.specimen-bay > .scope-frame {
    margin-top: 0;
}

.scope-frame::after,
.review-scope::after {
    position: absolute;
    right: 17px;
    bottom: 15px;
    left: 17px;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    content: "";
}

.scope-header {
    position: relative;
    z-index: 1;
    padding: 15px 17px;
    color: #c7dde0;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.scope-header > span:nth-child(2) {
    margin-right: auto;
}

.scope-pulse {
    display: inline-block;
    background: var(--signal);
    box-shadow: 0 0 0 4px rgba(41, 169, 224, 0.18);
}

.scope-time {
    color: #8fb4ba;
}

.scope-grid {
    position: absolute;
    inset: 54px 17px 43px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    opacity: 0.6;
}

.scope-grid span {
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.scope-grid span:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.09);
}

.signal-track {
    position: absolute;
    top: 54px;
    right: 20px;
    bottom: 43px;
    left: 20px;
    overflow: hidden;
    --selection-start: 0%;
    --selection-end: 100%;
    --playhead: 0%;
}

.scope-bars {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    color: var(--signal);
}

.scope-bars polyline {
    filter: drop-shadow(0 0 3px rgba(41, 169, 224, 0.42));
    opacity: 0.88;
}

.signal-selection {
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: var(--selection-start);
    width: calc(var(--selection-end) - var(--selection-start));
    border-right: 1px solid rgba(116, 178, 187, 0.9);
    border-left: 1px solid rgba(116, 178, 187, 0.9);
    background: rgba(116, 178, 187, 0.11);
    pointer-events: none;
}

.signal-playhead {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    left: var(--playhead);
    width: 2px;
    background: #f7fbfb;
    box-shadow: 0 0 0 1px rgba(41, 169, 224, 0.45), 0 0 10px rgba(41, 169, 224, 0.72);
    pointer-events: none;
    transform: translateX(-1px);
}

.trim-range {
    position: absolute;
    z-index: 5;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    appearance: none;
    background: transparent;
    cursor: ew-resize;
    pointer-events: none;
}

.trim-range::-webkit-slider-runnable-track {
    height: 100%;
    background: transparent;
}

.trim-range::-moz-range-track {
    height: 100%;
    background: transparent;
}

.trim-range::-webkit-slider-thumb {
    width: 13px;
    height: 30px;
    appearance: none;
    border: 2px solid var(--panel);
    border-radius: 2px;
    background: var(--brand-turquoise);
    box-shadow: 0 0 0 1px var(--graphite), 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    pointer-events: auto;
}

.trim-range::-moz-range-thumb {
    width: 13px;
    height: 30px;
    border: 2px solid var(--panel);
    border-radius: 2px;
    background: var(--brand-turquoise);
    box-shadow: 0 0 0 1px var(--graphite), 0 2px 8px rgba(0, 0, 0, 0.3);
    cursor: ew-resize;
    pointer-events: auto;
}

.trim-range:disabled {
    cursor: default;
    opacity: 0.72;
}

.selection-readout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
}

.selection-readout strong {
    color: var(--graphite);
    font-weight: var(--weight-heading);
}

.scope-baseline {
    position: absolute;
    right: 20px;
    bottom: 117px;
    left: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.28);
}

.scope-caption {
    position: absolute;
    right: 17px;
    bottom: 14px;
    left: 17px;
    color: #7da1a7;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.57rem;
    letter-spacing: 0.08em;
}

.transport {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.transport-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 9px 15px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--graphite);
    background: var(--panel);
    cursor: pointer;
    font-weight: var(--weight-control);
    text-decoration: none;
    transition: transform 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out, box-shadow 160ms ease-out, color 160ms ease-out;
}

.transport-button:hover,
.button:hover {
    border-color: var(--graphite);
    box-shadow: 0 6px 14px rgba(18, 51, 59, 0.14);
    transform: translateY(-1px);
}

.transport-button:active,
.button:active {
    box-shadow: none;
    transform: translateY(1px);
}

.transport-primary,
.button-primary {
    color: var(--panel);
    background: var(--action);
    border-color: var(--action-hover);
}

.transport-primary:hover,
.button-primary:hover {
    color: var(--panel);
    background: var(--action-hover);
    border-color: var(--action-hover);
}

.transport-note {
    margin-left: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.recording-time {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.74rem;
}

.recording-time > span {
    color: var(--graphite);
    font-size: 0.67rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.08em;
}

.recording-time time,
.recording-time-cell,
.source-occurrence time {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-variant-numeric: tabular-nums;
}

.recording-time small {
    color: var(--muted);
    font-size: inherit;
}

.native-audio {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.inline-notice {
    margin: 12px 0 0;
    color: var(--action);
    font-size: 0.8rem;
}

.decision-panel {
    padding: clamp(19px, 3vw, 29px);
}

.decision-heading p,
.lede {
    max-width: 630px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.decision-list {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    min-width: 0;
}

.boundary-observations {
    display: grid;
    gap: 10px;
    margin: 22px 0 0;
    padding: 13px 14px 14px;
    border: 1px solid var(--line);
    color: var(--graphite);
}

.boundary-observations legend {
    padding: 0 6px;
    color: var(--action);
    font-size: 0.68rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.boundary-options {
    display: grid;
    gap: 8px;
}

.boundary-toggle {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
}

.boundary-toggle input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: var(--action);
}

.boundary-toggle input:disabled {
    cursor: not-allowed;
}

.boundary-toggle:has(input:disabled) {
    cursor: not-allowed;
    opacity: 0.62;
}

.decision-key {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-width: 0;
    min-height: 67px;
    padding: 9px 12px 9px 9px;
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 0;
    color: var(--graphite);
    background: var(--panel);
    cursor: pointer;
    text-align: left;
    transition: transform 180ms ease-out, border-color 180ms ease-out, background 180ms ease-out, box-shadow 180ms ease-out;
}

.decision-key:hover:not(:disabled) {
    border-color: var(--graphite);
    box-shadow: inset 3px 0 0 var(--signal), 0 7px 18px rgba(18, 51, 59, 0.11);
    transform: translateX(1px);
}

.decision-key:disabled {
    cursor: wait;
    opacity: 0.68;
}

.decision-key.is-selected {
    background: var(--resolved-soft);
    box-shadow: inset 3px 0 0 var(--resolved), 0 7px 18px rgba(22, 123, 82, 0.12);
}

.keycap {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--panel);
    background: var(--graphite);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: var(--weight-heading);
}

.decision-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.decision-copy strong {
    min-width: 0;
    font-size: 0.93rem;
    font-weight: var(--weight-control);
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.decision-copy small {
    min-width: 0;
    overflow: visible;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.25;
    white-space: normal;
}

.decision-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.keyboard-hint {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 20px;
    padding-top: 17px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.76rem;
}

.keyboard-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--graphite);
}

.text-button {
    min-height: 44px;
    padding: 10px 4px;
    border: 0;
    border-bottom: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--muted);
    background: transparent;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: var(--weight-label);
}

.text-button:hover {
    color: var(--action);
    border-bottom-color: var(--signal);
}

.decision-panel > .text-button {
    margin-top: 22px;
}

.state-panel {
    display: grid;
    grid-template-columns: 46px minmax(0, 650px);
    gap: 22px;
    align-items: start;
    padding: clamp(26px, 5vw, 58px);
    border: 1px solid var(--line-strong);
    border-top: 4px solid var(--graphite);
    background: var(--panel);
    box-shadow: var(--shadow-raised);
}

.state-panel h2 {
    margin-top: 8px;
}

.state-panel p {
    margin-bottom: 0;
    color: var(--muted);
}

.state-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin-top: 22px;
}

.state-panel-actions .text-button {
    min-height: 40px;
}

.state-index {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: var(--panel);
    background: var(--graphite);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: var(--weight-heading);
}

.state-index.ph-icon {
    font-size: 1.4rem;
}

.state-panel-error {
    border-top-color: var(--error);
}

.state-panel-error .state-index {
    color: var(--panel);
    background: var(--error);
}

.state-panel-complete {
    border-top-color: var(--resolved);
}

.state-panel-complete .state-index {
    background: var(--resolved);
}

.state-panel-loading {
    grid-template-columns: 42px minmax(0, 1fr);
}

.loader {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid var(--line);
    border-top-color: var(--signal);
    border-radius: 50%;
    animation: spin 720ms linear infinite;
}

.loader-small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 11px 14px;
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--muted);
    font-size: 0.8rem;
}

.saving-status {
    position: fixed;
    z-index: 11;
    top: 76px;
    right: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 0 5px 16px rgba(18, 51, 59, 0.16);
    color: var(--graphite);
    font-size: 0.8rem;
}

.notice {
    color: var(--error);
    border-color: var(--error-border);
    background: var(--error-soft);
}

.notice-symbol {
    display: grid;
    place-items: center;
    width: 19px;
    height: 19px;
    color: var(--panel);
    background: var(--error);
    border-radius: 50%;
    font-size: 1rem;
}

.notice-close {
    margin-left: auto;
    padding: 0 2px;
    border: 0;
    color: var(--error);
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.button-secondary {
    background: transparent;
}

.button-icon.ph-icon,
.decision-arrow.ph-icon,
.keyboard-icon.ph-icon {
    flex: 0 0 auto;
}

.data-page-header {
    align-items: start;
}

.data-page-header .lede {
    margin-top: 17px;
}

.data-freshness {
    margin: 8px 0 0;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.69rem;
}

.metric-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 3px solid var(--graphite);
    border-bottom: 1px solid var(--line-strong);
    background: var(--panel);
}

.metric-cell {
    display: grid;
    gap: 7px;
    min-height: 132px;
    padding: 19px 20px;
    border-right: 1px solid var(--line);
}

.metric-cell-action {
    position: relative;
    color: inherit;
    text-decoration: none;
}

.metric-cell-action:hover {
    background: var(--warning-soft);
}

.metric-cell-action:active {
    background: #f8e5bf;
}

.metric-action-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    color: var(--warning);
    font-size: 0.73rem;
    font-weight: var(--weight-control);
}

.metric-cell:last-child {
    border-right: 0;
}

.metric-cell-teal {
    background: var(--resolved-soft);
}

.metric-label {
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.14em;
}

.metric-cell strong {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    font-weight: var(--weight-heading);
    letter-spacing: -0.06em;
    line-height: 1;
}

.metric-cell small {
    color: var(--muted);
    font-size: 0.75rem;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.9fr;
    gap: 20px;
    margin-top: 20px;
}

.etched-panel {
    padding: clamp(19px, 3vw, 29px);
}

.panel-heading {
    align-items: start;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin-top: 8px;
    margin-bottom: 0;
}

.distribution-list {
    display: grid;
    gap: 17px;
    margin-top: 24px;
}

.distribution-empty {
    display: grid;
    gap: 6px;
    max-width: 48ch;
    padding: 26px 0 6px;
}

.distribution-empty strong {
    font-size: 0.95rem;
}

.distribution-empty p {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.distribution-row {
    display: grid;
    gap: 7px;
}

.distribution-label {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--graphite-soft);
    font-size: 0.82rem;
}

.distribution-label strong {
    color: var(--graphite);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.distribution-value {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    flex: 0 0 auto;
}

.distribution-value small {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.71rem;
}

.meter {
    height: 8px;
    background: var(--surface-deep);
}

.meter span {
    display: block;
    height: 100%;
    min-width: 3px;
    background: var(--action);
}

.source-occurrence {
    display: grid;
    gap: 4px;
    margin-top: 10px;
}

.source-occurrence time {
    color: var(--graphite);
    font-size: 0.75rem;
}

.meter-fill {
    width: 0;
}

.meter-10 {
    width: 10%;
}

.meter-20 {
    width: 20%;
}

.meter-30 {
    width: 30%;
}

.meter-40 {
    width: 40%;
}

.meter-50 {
    width: 50%;
}

.meter-60 {
    width: 60%;
}

.meter-70 {
    width: 70%;
}

.meter-80 {
    width: 80%;
}

.meter-90 {
    width: 90%;
}

.meter-100 {
    width: 100%;
}

.audit-figure {
    display: flex;
    align-items: baseline;
    gap: 13px;
    margin: 28px 0 27px;
}

.audit-figure strong {
    color: var(--resolved);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    letter-spacing: -0.08em;
    line-height: 1;
}

.audit-figure span {
    color: var(--muted);
    font-size: 0.82rem;
}

.audit-breakdown {
    display: grid;
    gap: 10px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
}

.audit-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 8px;
    border-radius: 50%;
}

.dot-teal {
    background: var(--resolved);
}

.dot-orange {
    background: var(--warning);
}

.dot-gray {
    background: var(--line-strong);
}

.sample-table-panel {
    margin-top: 20px;
}

.table-scroll {
    overflow-x: auto;
    margin: 18px -10px -8px;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
}

.table-page-status,
.table-page-number {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.71rem;
}

.table-pagination-controls {
    display: flex;
    align-items: center;
    gap: 7px;
}

.table-pagination .text-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 8px;
}

.table-pagination .text-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.81rem;
}

th,
td {
    padding: 13px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.63rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

tbody tr:hover {
    background: rgba(228, 239, 241, 0.68);
}

code {
    color: var(--graphite-soft);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.76rem;
}

.source-cell {
    max-width: 350px;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.tabular {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.status-tag {
    display: inline-block;
    padding: 3px 7px;
    color: var(--graphite-soft);
    background: var(--surface-deep);
    font-size: 0.65rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-teal {
    color: var(--resolved);
    background: var(--resolved-soft);
}

.status-orange {
    color: var(--warning);
    background: var(--warning-soft);
}

.table-empty {
    padding: 30px 0 8px;
    color: var(--muted);
}

.review-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(350px, 0.75fr);
    gap: 20px;
    align-items: start;
}

.review-specimen,
.review-decision {
    min-width: 0;
}

.review-scope {
    min-height: 245px;
    margin-top: 24px;
}

.review-bars {
    bottom: 42px;
}

.review-scope .scope-baseline {
    bottom: 102px;
}

.source-register {
    display: grid;
    gap: 7px;
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
}

.source-register code {
    overflow-wrap: anywhere;
}

.vote-list {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.vote-row {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(110px, auto) auto;
    align-items: center;
    gap: 9px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.82rem;
}

.vote-avatar {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: var(--panel);
    background: var(--graphite);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.65rem;
    font-weight: 800;
}

.vote-row time {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.69rem;
}

.vote-trim {
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.66rem;
    white-space: nowrap;
}

.review-form {
    display: grid;
    gap: 8px;
    margin-top: 25px;
}

.review-form label,
.review-decision > label {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: var(--weight-label);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

select,
textarea,
input {
    width: 100%;
    padding: 10px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 0;
    color: var(--graphite);
    background: var(--panel);
}

textarea {
    resize: vertical;
}

.button-wide {
    width: 100%;
    margin-top: 5px;
}

.review-divider {
    height: 1px;
    margin: 25px 0 16px;
    background: var(--line);
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

.text-button-next {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 22px;
    margin-left: auto;
}

.empty-state {
    width: min(640px, calc(100% - 44px));
    margin: 10vh auto;
    padding: 42px;
    border: 1px solid var(--line-strong);
    background: var(--panel);
}

.empty-state-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 17px;
    color: var(--panel);
    background: var(--graphite);
    font-size: 1.4rem;
}

.empty-state h1 {
    margin: 0 0 15px;
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.empty-state p {
    color: var(--muted);
}

.boot-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 100vh;
    color: var(--muted);
}

#blazor-error-ui {
    position: fixed;
    z-index: 100;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    padding: 12px 20px;
    color: var(--panel);
    background: var(--error);
    text-align: center;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 12px;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
}

@media (max-width: 980px) {
    .specimen-layout,
    .review-grid,
    .overview-grid {
        grid-template-columns: 1fr;
    }

    .decision-panel {
        order: 0;
    }
}

@media (max-width: 720px) {
    .status-rail {
        min-height: 82px;
        padding: 8px 14px 0;
        flex-wrap: wrap;
        align-content: flex-start;
        row-gap: 6px;
        column-gap: 12px;
    }

    .status-chip {
        display: none;
    }

    .brand-lockup {
        grid-template-columns: 94px 2px minmax(0, 1fr);
        column-gap: 10px;
    }

    .esys-logo img {
        width: 94px;
    }

    .brand-axis {
        height: 24px;
    }

    .product-name {
        font-size: 1.02rem;
    }

    .product-type {
        font-size: 0.58rem;
        letter-spacing: 0.1em;
    }

    .top-nav {
        order: 3;
        flex: 0 0 100%;
        width: 100%;
        min-width: 0;
        min-height: 34px;
        margin: 0;
        align-items: stretch;
        gap: 0;
    }

    .top-nav a {
        flex: 1 1 0;
        min-width: 0;
        height: 100%;
        justify-content: center;
        padding: 0 8px;
        font-size: 0.75rem;
        letter-spacing: 0.04em;
        white-space: nowrap;
    }

    .top-nav a[href="/review"] {
        position: relative;
        color: transparent;
    }

    .top-nav a[href="/review"]::after {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--muted);
        content: "Konflikte";
    }

    .top-nav a[href="/review"].active::after {
        color: var(--graphite);
    }

    .bench,
    .data-page,
    .review-page {
        overflow-x: clip;
        padding-right: 14px;
        padding-left: 14px;
    }

    .app-content,
    .label-page {
        min-height: calc(100vh - 82px);
    }

    .bench-header,
    .data-page-header {
        display: grid;
        gap: 12px;
        margin-bottom: 18px;
    }

    .bench-readout {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 5px 10px;
        padding: 8px 12px;
        justify-self: start;
    }

    .dataset-context {
        max-width: none;
        margin-top: 10px;
    }

    .bench-readout .readout-divider {
        display: none;
    }

    .saving-status {
        top: 90px;
        right: 14px;
        left: 14px;
        justify-content: center;
    }

    .state-panel {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 14px;
        padding: 25px 18px;
    }

    .state-index {
        width: 34px;
        height: 34px;
    }

    .scope-frame {
        min-height: 220px;
    }

    .scope-bars {
        height: 95px;
    }

    .transport-note {
        display: none;
    }

    .decision-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 16px;
    }

    .decision-panel {
        min-width: 0;
        overflow-x: clip;
    }

    .decision-key:last-child {
        grid-column: 1 / -1;
    }

    .metric-strip {
        grid-template-columns: 1fr 1fr;
    }

    .metric-cell:nth-child(2) {
        border-right: 0;
    }

    .metric-cell:nth-child(-n + 2) {
        border-bottom: 1px solid var(--line);
    }

    .review-grid {
        display: flex;
        flex-direction: column;
    }

    .table-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .table-pagination-controls {
        justify-content: space-between;
        width: 100%;
    }

    .table-pagination .text-button {
        min-height: 44px;
        padding: 8px 11px;
    }

    .sample-table-panel th:nth-child(5),
    .sample-table-panel td:nth-child(5) {
        display: none;
    }

    .review-decision {
        order: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
