:root {
  --bg: #090b0d;
  --sidebar: #0d1013;
  --surface-1: #101418;
  --surface-2: #151a1f;
  --surface-3: #1b2228;
  --surface: var(--surface-1);
  --border: #283138;
  --line: var(--border);
  --line-strong: #3b4851;
  --text-primary: #f2f5f5;
  --text-secondary: #c3ccd0;
  --text-muted: #9aa7ae;
  --text: var(--text-primary);
  --muted: var(--text-muted);
  --accent-primary: #44d1ad;
  --accent: var(--accent-primary);
  --accent-ink: #062b22;
  --success: #4fc79f;
  --warning: #f0b85a;
  --danger: #f06b6b;
  --info: #65a9ff;
  --rate: #aab1b6;
  --feature: #f1d94c;
  --epic: #ff9a45;
  --legendary: #d765f3;
  --mythic: #54d8ec;
  --sidebar-width: 244px;
  --radius: 6px;
  --content-max: 1320px;
  --t-fast: 140ms;
  --t-med: 210ms;
  --z-base: 0;
  --z-sticky: 20;
  --z-menu: 40;
  --z-drawer: 60;
  --z-overlay: 80;
  --z-tooltip: 100;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; z-index: var(--z-tooltip); left: 12px; top: -50px; padding: 8px 12px; background: var(--accent); color: var(--accent-ink); border-radius: 4px; }
.skip-link:focus { top: 12px; }

.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.auth-gate[hidden], .app-shell[hidden] { display: none; }
.auth-panel { width: min(440px, 100%); padding: 36px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.auth-panel img { border-radius: 50%; }
.auth-panel h1 { margin: 8px 0; font-size: 2rem; }
.auth-panel p:not(.eyebrow) { color: var(--muted); margin: 0 0 24px; }
.quiet-link { display: block; width: max-content; margin-top: 18px; color: var(--muted); text-decoration: none; }
.application-page { min-height: 100vh; padding: 20px; background: var(--bg); }
.public-app-head { width: min(780px, 100%); margin: 0 auto 24px; display: flex; justify-content: space-between; }
.public-app-head .quiet-link { margin: 0; }
.application-shell { width: min(780px, 100%); margin: 0 auto; padding: 28px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--accent); border-radius: var(--radius); }
.application-shell h1 { margin: 5px 0; font-size: 2.5rem; letter-spacing: 0; }
.application-view-nav { display: flex; margin: 18px 0 4px; }
.application-menu-button { display: inline-flex; align-items: center; gap: 7px; border-color: var(--line-strong); }
.application-chooser { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.application-chooser h2, .application-history h3 { margin: 0 0 6px; }
.application-choice-list { display: grid; gap: 8px; margin-top: 18px; }
.application-choice { width: 100%; min-height: 84px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; padding: 15px 16px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); text-align: left; cursor: pointer; }
.application-choice:hover:not(:disabled), .application-choice:focus-visible:not(:disabled) { border-color: var(--accent); background: var(--surface-3); }
.application-choice:disabled { cursor: not-allowed; opacity: .55; }
.application-choice > span:first-child { display: grid; gap: 3px; }
.application-choice small { color: var(--muted); }
.application-choice-action { color: var(--accent); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.application-history { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.application-history-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 2px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.application-history-row:hover { background: var(--surface-2); }
.application-stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 28px 0; padding: 0; list-style: none; }
.application-stages li { position: relative; display: grid; justify-items: center; gap: 5px; color: var(--muted); font-size: .75rem; text-transform: capitalize; }
.application-stages li::before { content: ""; position: absolute; z-index: 0; top: 13px; right: 50%; width: 100%; height: 1px; background: var(--line-strong); }
.application-stages li:first-child::before { display: none; }
.application-stages span { z-index: 1; width: 27px; height: 27px; display: grid; place-items: center; background: var(--surface-3); border: 1px solid var(--line-strong); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); }
.application-stages li.complete { color: var(--text); }
.application-stages li.complete span, .application-stages li.complete::before { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.application-form-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 4px; color: var(--muted); font-size: .78rem; }
.application-form-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.application-form-section > header { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.application-form-section > header > span { width: 28px; height: 28px; display: grid; flex: 0 0 auto; place-items: center; color: var(--accent-ink); background: var(--accent); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); font-size: .76rem; font-weight: 800; }
.application-form-section > header h2, .application-form-section > header p { margin: 0; }
.application-form-section > header h2 { font-size: 1.08rem; }
.application-form-section > header p { color: var(--muted); font-size: .76rem; }
.application-form-section .form-question, .application-form-section .choice-question { margin: 0 0 22px; }
.application-form-section textarea { min-height: 132px; resize: vertical; }
[data-show-key][hidden] { display: none !important; }
.punishment-summary { margin: 18px 0; padding: 18px; border: 1px solid var(--line-strong); border-left: 3px solid var(--accent); background: var(--surface-2); }
.punishment-summary.warning { border-left-color: var(--warning); }
.punishment-summary dl { display: grid; gap: 12px; margin: 16px 0 0; }
.punishment-summary dl > div { display: grid; grid-template-columns: minmax(130px, .35fr) 1fr; gap: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.punishment-summary dt { color: var(--muted); }
.punishment-summary dd { margin: 0; overflow-wrap: anywhere; }
.manual-punishment { display: grid; gap: 18px; margin: 20px 0 4px; padding: 18px; background: var(--surface-2); border: 1px solid var(--line-strong); border-left: 3px solid var(--warning); }
.manual-punishment h2, .manual-punishment p { margin: 0; }
.manual-punishment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.manual-punishment-grid label { display: grid; align-content: start; gap: 5px; }
.manual-punishment-grid [hidden] { display: none !important; }
.manual-punishment-grid .wide { grid-column: 1 / -1; }
.manual-punishment-grid textarea { min-height: 92px; resize: vertical; }
.record-provenance { padding-top: 11px; color: var(--muted); border-top: 1px solid var(--line); font-size: .78rem; }
.appeal-chat { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.appeal-message-list { display: grid; gap: 10px; margin: 12px 0 18px; }
.appeal-message { padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-2); }
.appeal-message.staff, .appeal-message.system { border-left: 3px solid var(--accent); }
.appeal-message.applicant { margin-left: min(12%, 72px); }
.appeal-message p { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.appeal-message small { color: var(--muted); }
#appeal-message-form { display: grid; gap: 9px; }
#appeal-message-form textarea { min-height: 100px; }
.appeal-decision { margin-top: 16px; padding: 14px; border-left: 3px solid var(--success); background: var(--surface-2); }
.field-guidance, .answer-guidance { color: var(--muted); font-size: .8rem; font-weight: 400; }
.field-guidance { margin: 0 0 3px; }
.answer-guidance { display: block; margin-top: 3px; }
.application-save-row { position: sticky; bottom: 0; z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 24px -28px -28px; padding: 13px 28px; background: rgba(16,20,24,.97); border-top: 1px solid var(--line-strong); backdrop-filter: blur(10px); }
.application-save-row .dialog-actions { margin: 0; }
.save-status { min-height: 22px; margin: 0; color: var(--muted); font-size: .82rem; }
.submission-review { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.review-warning { margin: 16px 0; padding: 12px 14px; color: var(--warning); background: #211b10; border-left: 3px solid var(--warning); }
.review-warning ul { margin: 7px 0 0; padding-left: 20px; }
.review-ready { padding: 10px 12px; color: var(--success); background: #102721; border-left: 3px solid var(--success); }
.review-section { padding: 16px 0; border-top: 1px solid var(--line); }
.review-section h3 { margin: 0 0 8px; font-size: 1rem; }
.review-answer { padding: 10px 0; border-bottom: 1px solid var(--line); }
.review-answer small { color: var(--muted); }
.review-answer p { margin: 3px 0 0; white-space: pre-wrap; }
.submission-confirm { margin: 18px 0; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: var(--z-menu); width: var(--sidebar-width); display: flex; flex-direction: column; padding: 18px 14px; background: var(--sidebar); border-right: 1px solid var(--line); }
.sidebar::after { content: ""; position: absolute; inset: 0 0 auto auto; width: 22px; height: 22px; border-top: 1px solid var(--line-strong); transform: translate(11px, -11px) rotate(45deg); pointer-events: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 3px 7px 20px; text-decoration: none; }
.brand img { border-radius: 50%; }
.brand span, .sidebar-user span { min-width: 0; display: grid; }
.brand small, .sidebar-user small { color: var(--muted); font-size: .75rem; }
#primary-nav { display: grid; gap: 2px; }
.nav-button { position: relative; width: 100%; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--muted); text-align: left; padding: 9px 10px 9px 12px; border-radius: 3px; cursor: pointer; font-weight: 650; transition: color var(--t-fast), background var(--t-fast); }
.nav-icon { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; opacity: .78; transition: color var(--t-fast), opacity var(--t-fast); }
.nav-button::after { content: ""; position: absolute; inset: 7px auto 7px 0; width: 2px; background: transparent; transition: background var(--t-fast); }
.nav-button:hover { color: var(--text); background: var(--surface-1); }
.nav-button.active { color: var(--text); background: var(--surface-2); }
.nav-button:hover .nav-icon { opacity: 1; }
.nav-button.active .nav-icon { color: var(--accent); opacity: 1; }
.nav-button.active::after { background: var(--accent); }
.nav-label { min-width: 0; }
.nav-count { float: right; min-width: 20px; padding: 1px 6px; text-align: center; color: var(--accent); background: #18332d; border-radius: 10px; font-size: .75rem; }
.sidebar-profile-wrap { position: relative; margin-top: auto; border-top: 1px solid var(--line); padding-top: 8px; }
.sidebar-user { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 7px; color: var(--text); background: transparent; border: 0; border-radius: 5px; text-align: left; cursor: pointer; }
.sidebar-user { transition: background var(--t-fast), border-color var(--t-fast); border-left: 2px solid transparent; }
.sidebar-user:hover, .sidebar-user[aria-expanded="true"] { background: var(--surface-2); border-left-color: var(--line-strong); }
.sidebar-user img { border-radius: 50%; background: var(--surface-3); }
.profile-menu { position: absolute; z-index: var(--z-overlay); inset: auto 0 calc(100% + 8px); min-width: 230px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.profile-menu[hidden] { display: none; }
.profile-menu-summary { display: grid; gap: 2px; margin: 2px 4px 6px; padding: 7px 6px 10px; border-bottom: 1px solid var(--line); }
.profile-menu-summary span { color: var(--muted); font: .72rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.profile-menu button { display: block; width: 100%; padding: 8px 10px; color: var(--text); background: transparent; border: 0; border-radius: 4px; text-align: left; cursor: pointer; }
.profile-menu button:hover, .profile-menu button:focus-visible { background: var(--surface-3); }
.icon-link { padding: 0; color: var(--muted); background: none; border: 0; text-decoration: none; font: inherit; font-size: .78rem; cursor: pointer; }

.app-column { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 9px 28px; background: rgba(9,11,13,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.search-wrap { position: relative; width: min(560px, 100%); }
.search-wrap::before { content: ""; position: absolute; z-index: 1; top: 12px; left: 13px; width: 10px; height: 10px; border: 1.5px solid var(--muted); border-radius: 50%; pointer-events: none; }
.search-wrap input { width: 100%; height: 38px; padding: 0 74px 0 36px; color: var(--text); background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast); }
.search-wrap input:focus { border-color: var(--line-strong); background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); outline: none; }
.search-wrap::after { content: "⌘K"; position: absolute; top: 8px; right: 9px; padding: 1px 6px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; font-size: .72rem; pointer-events: none; }
.search-results { position: absolute; z-index: var(--z-overlay); inset: 44px 0 auto; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.45); overflow: hidden; }
.search-result { display: block; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line); color: var(--text); background: transparent; text-align: left; cursor: pointer; }
.search-result:hover { background: var(--surface-3); }
.search-result small { color: var(--muted); }
.jump-result { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.top-attention { margin-left: auto; color: var(--warning); font-size: .85rem; white-space: nowrap; }

#workspace { width: min(var(--content-max), 100%); margin: 0 auto; padding: 28px; }
.page-heading { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.page-heading::after { content: ""; position: absolute; bottom: -1px; left: 0; width: 54px; height: 2px; background: var(--accent); clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%); }
.page-heading h1 { margin: 2px 0 4px; font-size: 1.9rem; letter-spacing: 0; }
.page-heading p { margin: 0; color: var(--muted); }
.eyebrow { margin: 0; color: var(--accent) !important; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-nav { display: flex; gap: 3px; margin-bottom: 12px; padding: 4px; width: max-content; max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.section-nav[hidden] { display: none; }
.section-tab { border: 0; padding: 7px 12px; color: var(--muted); background: transparent; border-radius: 4px; cursor: pointer; white-space: nowrap; }
.section-tab.active { background: var(--surface-3); color: var(--text); }
.content-surface { min-height: 480px; padding: 4px 0 40px; }
.notice { margin-bottom: 12px; padding: 10px 12px; border: 1px solid #315c50; background: #102721; border-radius: var(--radius); }
.notice.error { border-color: #6d3434; background: #2b1515; }
.inline-warning { display: grid; gap: 2px; margin-bottom: 14px; padding: 10px 12px; border-left: 3px solid var(--warning); background: #211b10; }
.inline-warning span { color: var(--muted); font-size: .85rem; }

.summary-band { display: grid; grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(110px, .6fr)); border: 1px solid var(--line); margin: 0 0 22px; background: var(--surface-1); }
.summary-band > div { min-height: 96px; padding: 18px 20px; border-right: 1px solid var(--line); }
.summary-band > div:last-child { border-right: 0; }
.summary-band h2 { margin: 2px 0 3px; font-size: 1.25rem; }
.summary-band h2 { display: flex; align-items: center; gap: 8px; }
.summary-band strong { display: block; font-size: 1.6rem; }
.summary-band small, .muted { color: var(--muted); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 22px; }
.statistics-grid, .operations-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.provider-diagnostic + .provider-diagnostic { border-top: 1px solid var(--line); }
.provider-method { margin-left: 18px; font-size: .78rem; }
.provider-method strong { color: var(--muted); font-weight: 500; text-align: right; }
.panel { min-width: 0; padding: 16px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; }
.panel + .panel { margin-top: 14px; }
.workspace-grid .panel + .panel { margin-top: 0; }
.section-block { min-width: 0; padding: 18px 0; border-top: 1px solid var(--line); }
.section-block:first-child { border-top-color: var(--line-strong); }
.section-block h2, .section-block h3 { margin: 0; font-size: 1rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel h2, .panel h3 { margin: 0; font-size: 1rem; }
.metric-line { display: flex; justify-content: space-between; gap: 16px; margin: 12px 0 5px; }
.metric-line strong, .count-metric strong, .detail-stat strong, .rank-value, .priority-value { font-variant-numeric: tabular-nums; }
progress { width: 100%; height: 7px; border: 0; border-radius: 0; accent-color: var(--accent); background: var(--surface-3); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--surface-3); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.progress-component { min-width: 0; }
.progress-component > small { display: block; margin-top: 5px; }
.stack { display: grid; gap: 8px; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); transition: background var(--t-fast), box-shadow var(--t-fast); }
.list-row:last-child { border-bottom: 0; }
.list-row strong { display: block; }
.list-row small { color: var(--muted); }
.row-button { width: 100%; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; }
.row-button:hover, .row-button:focus-visible, .row-clickable:hover, .list-row:hover { background: var(--surface-1); }
.row-button.is-selected, .row-clickable.is-selected, .record-row.is-selected, .data-table tr.is-selected { background: var(--surface-2); box-shadow: inset 2px 0 0 var(--accent); }
.row-clickable { cursor: pointer; }
.secondary-id { display: block; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.row-actions { margin: 0; justify-content: flex-end; }
.identity-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.identity-row img { border-radius: 50%; background: var(--surface-2); }
.identity-row strong { overflow-wrap: anywhere; }
.human-row { min-height: 58px; }
.application-review { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, .8fr); gap: 18px; }
.application-side { border-left: 1px solid var(--line); padding-left: 18px; }
.application-side h4 { margin: 0 0 8px; }
.application-side h4:not(:first-child) { margin-top: 18px; }
.application-actions { grid-column: 1 / -1; }
.choice-question { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; border: 0; }
.choice-question legend { grid-column: 1 / -1; width: 100%; margin-bottom: 2px; font-weight: 700; }
.choice-question > .field-guidance, .choice-question > .field-help, .choice-question > .answer-guidance { grid-column: 1 / -1; }
.choice-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; overflow-wrap: anywhere; }
.choice-option:has(input:checked) { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.choice-option input { width: 16px; height: 16px; margin: 0; }
.field-help { margin: 4px 0 8px; color: var(--muted); font-size: .88rem; font-weight: 400; }
.field-help a { color: var(--accent); }
.field-label, .concept-label { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.help-tip { display: inline-grid; flex: 0 0 auto; width: 18px; height: 18px; min-width: 18px; min-height: 18px; margin: 0; padding: 0; place-items: center; color: var(--muted); background: transparent; border: 1px solid var(--line-strong); border-radius: 50%; font: 700 11px/1 system-ui, sans-serif; cursor: help; user-select: none; appearance: none; }
.help-tip:hover, .help-tip:focus-visible, .help-tip[aria-expanded="true"] { color: var(--text); border-color: var(--accent); outline: none; }
.overlay-tooltip-host { position: fixed; z-index: var(--z-tooltip); inset: 0; overflow: visible; pointer-events: none; }
.portal-help-tooltip { position: fixed; z-index: var(--z-tooltip); width: max-content; max-width: min(300px, calc(100dvw - 20px)); max-height: calc(100dvh - 20px); padding: 9px 11px; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 10px 26px rgba(0,0,0,.38); font: 12px/1.45 system-ui, sans-serif; text-align: left; white-space: normal; overflow-wrap: anywhere; pointer-events: none; }
.portal-help-tooltip[hidden] { display: none; }
.form-question { display: grid; gap: 5px; min-width: 0; }
.form-question > label { color: var(--muted); font-size: .85rem; }
.review-showcase { display: grid; gap: 10px; margin: 4px 0 8px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius); }
.review-showcase-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.review-showcase-head > div { display: grid; gap: 2px; min-width: 0; }
.review-showcase-head strong { color: var(--text); font-size: 1rem; }
.review-showcase-head span { color: var(--muted); font: .78rem/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.review-showcase-head a { flex: 0 0 auto; color: var(--accent); font-size: .82rem; }
.review-video { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; border: 1px solid var(--line); }
.review-video iframe { display: block; width: 100%; height: 100%; border: 0; }
.review-showcase p { margin: 0; color: var(--muted); font-size: .82rem; }
.rubric-summary { display: grid; gap: 8px; }
.rubric-assessment { padding: 12px 0; border-top: 1px solid var(--line); }
.rubric-assessment h4 { margin: 0 0 7px; }
.rubric-dimension { display: grid; grid-template-columns: minmax(130px, .7fr) 38px minmax(0, 1.4fr); gap: 9px; padding: 6px 0; align-items: start; }
.rubric-dimension small { color: var(--muted); }
.application-process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.application-process-grid > div { padding: 13px; background: var(--surface-1); }
.application-process-grid span, .application-process-grid small { display: block; color: var(--muted); }
.application-process-grid strong { font-size: 1.25rem; }
.view-mode-control { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.view-mode-control select { min-width: 130px; }
.view-mode-banner { padding: 8px 18px; color: #fff3cd; background: #4b3900; border-bottom: 1px solid #7d6200; text-align: center; font-size: .88rem; }
.view-mode-banner[hidden], .view-mode-control[hidden] { display: none; }
.milestones { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.personal-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 7px 0 24px; border-bottom: 1px solid var(--line-strong); }
.personal-header h2 { margin: 3px 0; font-size: 1.85rem; letter-spacing: 0; }
.personal-header p { margin: 0; color: var(--muted); }
.identity-kicker { margin-bottom: 7px; }
.attention-total { color: var(--warning); white-space: nowrap; font-size: .82rem; font-weight: 750; text-transform: uppercase; }
.overview-section { padding-top: 18px; }
.section-title { margin-bottom: 7px; }
.section-title .eyebrow { color: var(--muted) !important; }
.progress-strip, .today-line, .system-status-line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line-strong); }
.count-metric, .progress-unit { min-height: 92px; display: flex; flex-direction: column; justify-content: center; padding: 15px 18px; border-right: 1px solid var(--line); }
.count-metric:last-child, .progress-unit:last-child { border-right: 0; }
.count-metric span, .count-metric small { color: var(--muted); }
.count-metric strong { font-size: 1.45rem; font-variant-numeric: tabular-nums; }
.progress-unit .metric-line { margin: 0 0 5px; }
.pipeline-strip { display: grid; grid-template-columns: repeat(5, minmax(62px, 1fr)); margin-top: 8px; overflow-x: auto; }
.pipeline-stage { position: relative; display: grid; justify-items: start; gap: 1px; min-width: 74px; padding: 25px 10px 11px 0; }
.pipeline-stage::before { content: ""; position: absolute; top: 7px; right: calc(100% - 8px); width: calc(100% - 16px); height: 1px; background: var(--line-strong); }
.pipeline-stage:first-child::before { display: none; }
.pipeline-node { position: absolute; top: 3px; left: 3px; width: 9px; height: 9px; border: 1px solid var(--line-strong); transform: rotate(45deg); background: var(--surface-1); }
.pipeline-stage.complete::before, .pipeline-stage.current::before { background: var(--accent); }
.pipeline-stage.complete .pipeline-node { border-color: var(--accent); background: var(--accent); }
.pipeline-stage.current .pipeline-node { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--surface-1); background: var(--accent); }
.pipeline-strip strong { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.pipeline-strip .pipeline-stage > span:last-child { color: var(--muted); font-size: .75rem; }
.recent-block { margin-top: 10px; }
.activity-feed { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.activity-feed time { color: var(--muted); }
.milestone-line { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.milestone-line > div { display: flex; flex-wrap: wrap; gap: 12px; }
.milestone-marker { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: .84rem; }
.milestone-marker > span { color: var(--success); }
.work-rail { min-width: 0; }
.inbox-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.inbox-heading p { margin: 0; color: var(--muted); }
.work-item { min-height: 68px; }
.work-next { display: block; margin-top: 4px; color: var(--text-secondary); font-size: .78rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar input, .toolbar select, .form-grid input, .form-grid select, .form-grid textarea { min-height: 38px; padding: 8px 10px; color: var(--text); background: var(--bg); border: 1px solid var(--line-strong); border-radius: 5px; }
.form-grid input:focus-visible, .form-grid select:focus-visible, .form-grid textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-option:focus-within { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-option input:focus-visible { outline: none; }
.toolbar input { min-width: min(290px, 100%); }
.filter-field { display: grid; gap: 3px; color: var(--muted); font-size: .76rem; }
.filter-field select { min-width: 150px; color: var(--text); font-size: .9rem; }
.queue-tools { margin-bottom: 14px; }
.quick-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; margin-bottom: 8px; }
.filter-chip { min-height: 34px; padding: 6px 10px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast); }
.filter-chip:hover, .filter-chip:focus-visible { color: var(--text); border-color: var(--line-strong); }
.filter-chip.active { color: var(--text); background: var(--surface-2); border-color: var(--accent); box-shadow: inset 2px 0 0 var(--accent); }
.compact-filter { margin-left: auto; }
.compact-filter + .compact-filter { margin-left: 0; }
.compact-filter select { min-width: 118px; min-height: 34px; }
.queue-search-row { flex-wrap: nowrap; margin-bottom: 0; }
.queue-search-row input { flex: 1 1 auto; }
.application-filter-bar { align-items: end; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 7px 12px; border: 1px solid transparent; border-radius: 5px; font-weight: 700; text-decoration: none; cursor: pointer; transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast); }
.button.primary { color: var(--accent-ink); background: var(--accent); }
.button.secondary { color: var(--text); background: var(--surface-3); border-color: var(--line-strong); }
.button.tertiary { color: var(--text-secondary); background: transparent; border-color: transparent; }
.button:hover:not(:disabled), .button:focus-visible:not(:disabled) { border-color: var(--text-secondary); }
.button.tertiary:hover, .button.tertiary:focus-visible { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.button.danger { color: #fff; background: #a63f43; }
.button.small { min-height: 30px; padding: 4px 9px; font-size: .82rem; }
.icon-button { min-height: 34px; padding: 5px 9px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 5px; cursor: pointer; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 8px 10px; color: var(--muted); background: var(--bg); font-size: .71rem; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line-strong); }
.data-table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tbody tr { cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast); }
.data-table tbody tr:hover, .data-table tbody tr:focus-within { background: var(--surface-2); }
.table-wrap { width: 100%; overflow-x: auto; border-top: 1px solid var(--line-strong); }
.table-caption { margin: 10px 0 0; }
.queue-table { min-width: 980px; }
.queue-result-section { margin-top: 28px; }
.queue-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.queue-section-heading h2 { margin: 2px 0 0; font-size: 1.1rem; }
.queue-section-heading small { color: var(--muted); }
.pending-priority .rank-value, .pending-priority .priority-value { color: var(--muted); }
.level-cell strong, .level-cell small { display: block; }
.level-cell small { color: var(--muted); }
.level-cell .secondary-id { display: inline; }
.rank-value { color: var(--text-secondary); }
.priority-value { font-size: .92rem; }
.tier-cell { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.tier-cell.rate, .tier-text.rate { color: var(--rate); }
.tier-cell.feature, .tier-text.feature { color: var(--feature); }
.tier-cell.epic, .tier-text.epic { color: var(--epic); }
.tier-cell.legendary, .tier-text.legendary { color: var(--legendary); }
.tier-cell.mythic, .tier-text.mythic { color: var(--mythic); }
.tier-art { object-fit: contain; }
.tier-art-small { width: 24px; height: 24px; }
.tier-art-large { width: 64px; height: 64px; }
.pill { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 8px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 12px; font-size: .75rem; white-space: nowrap; }
.pill.rate { color: var(--rate); }.pill.feature { color: var(--feature); }.pill.epic { color: var(--epic); }.pill.legendary { color: var(--legendary); }.pill.mythic { color: var(--mythic); }
.pill.warning { color: var(--warning); border-color: #6c5930; }
.pill.accepted, .pill.accepted_pending_role { color: var(--success); border-color: #315c50; background: #102721; }
.pill.interview, .pill.claimed { color: var(--info); border-color: #31547a; background: #101f31; }
.pill.unclaimed { color: var(--muted); }
.pill.hold { color: var(--warning); border-color: #6c5930; background: #211b10; }
.pill.rejected, .pill.withdrawn { color: var(--danger); border-color: #6d3434; background: #2b1515; }
.pill.reviewer { color: var(--muted); }.pill.head_reviewer { color: var(--info); }.pill.admin { color: var(--warning); }.pill.owner { color: var(--accent); }.pill.dev { color: var(--mythic); border-color: #31727b; }
.role-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 7px; color: var(--muted); border-left: 2px solid var(--line-strong); background: var(--surface-2); font-size: .72rem; font-weight: 720; white-space: nowrap; }
.role-badge.head_reviewer { color: var(--info); border-left-color: var(--info); }
.role-badge.admin { color: var(--text-secondary); border-left-color: var(--info); }
.role-badge.owner { color: var(--accent); border-left-color: var(--accent); }
.role-badge.dev { color: var(--mythic); border-left-color: var(--mythic); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.distribution-row { display: grid; grid-template-columns: minmax(100px, .7fr) minmax(100px, 1.5fr) auto; align-items: center; gap: 10px; margin: 11px 0; }
.empty-state, .loading-state, .error-state { min-height: 164px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 26px 12px; color: var(--muted); text-align: center; }
.empty-state-mark { width: 18px; height: 18px; margin-bottom: 5px; border: 1px solid var(--line-strong); transform: rotate(45deg); }
.empty-state strong, .error-state strong { color: var(--text-secondary); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton-view { display: grid; gap: 11px; min-height: 320px; align-content: start; padding-top: 14px; }
.skeleton-view span { display: block; height: 54px; background: linear-gradient(90deg, var(--surface-1), var(--surface-2), var(--surface-1)); background-size: 220% 100%; animation: skeleton 1.2s ease-in-out infinite; border-radius: 4px; }
.skeleton-view span:first-child { height: 96px; }
.skeleton-view.compact { min-height: 180px; }
@keyframes skeleton { to { background-position: -220% 0; } }
.record-list { border-top: 1px solid var(--line-strong); }
.record-row { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 14px 7px; color: var(--text); background: transparent; border: 0; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; transition: background var(--t-fast), box-shadow var(--t-fast); }
.record-row:hover, .record-row:focus-visible { background: var(--surface-1); }
.record-row > span:first-child, .record-row > span:first-child > span { display: grid; min-width: 0; }
.record-row small { color: var(--muted); }
.record-tags { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.row-chevron { color: var(--muted); font-size: .78rem; }
.avatar-fallback { width: 40px; height: 40px; flex: 0 0 auto; border: 1px solid var(--line-strong); transform: rotate(45deg) scale(.72); background: var(--surface-2); }
.avatar-fallback.large { width: 64px; height: 64px; }

.detail-drawer { position: fixed; z-index: var(--z-drawer); inset: 0 0 0 auto; width: min(500px, 100%); padding: 20px 24px 38px; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--line-strong); clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%, 0 14px); transform: translateX(102%); opacity: .75; transition: transform var(--t-med) ease, opacity var(--t-med) ease; box-shadow: -8px 0 22px rgba(0,0,0,.22); }
.detail-drawer::before { content: ""; position: absolute; top: 7px; left: -2px; width: 20px; height: 1px; transform: rotate(-45deg); background: var(--accent); }
.detail-drawer.open { transform: translateX(0); opacity: 1; }
.drawer-scrim { position: fixed; z-index: calc(var(--z-drawer) - 1); inset: 0; background: rgba(0,0,0,.62); }
.drawer-head { z-index: var(--z-sticky); display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: -20px; padding: 8px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; }
.drawer-identity { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawer-identity > div { min-width: 0; display: grid; }
.drawer-identity span, .drawer-identity small { color: var(--muted); }
.drawer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 0; color: var(--muted); }
.drawer-meta .quiet-link { margin: 0; }
.drawer-section { padding: 18px 0; border-top: 1px solid var(--line); }
.drawer-section summary { cursor: pointer; font-weight: 700; }
.drawer-section[open] summary { margin-bottom: 14px; }
.drawer-section h3 { margin: 0 0 10px; }
.answer-list { display: grid; gap: 15px; }
.answer-list div { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.answer-list small { color: var(--muted); }
.answer-list p { margin: 5px 0 0; white-space: pre-wrap; }
.profile-hero { display: flex; align-items: center; gap: 14px; padding: 18px 0; }
.profile-hero img { border-radius: 50%; background: var(--surface-2); }
.profile-hero > div { display: flex; gap: 6px; }
.profile-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.profile-about-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.profile-about-heading h3 { margin: 0; }
.profile-about-quote { margin: 10px 0; color: var(--text); line-height: 1.55; overflow-wrap: anywhere; }
.pill.published { color: var(--success); border-color: #315c50; background: #102721; }
body.drawer-open { overflow: hidden; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.pps-lab { margin-top: 24px; }
.model-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1px; margin: 20px 0; background: var(--line); border: 1px solid var(--line); }
.model-row { min-height: 112px; background: var(--surface); }
.model-result { display: grid; justify-items: end; gap: 4px; }
.model-result > strong { font-size: 1.55rem; letter-spacing: 0; }
.model-result > small { color: var(--muted); }
.capacity-route-grid { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); gap: 12px; margin-bottom: 14px; }
.calibration-bin { padding-left: 18px; }
.detail-stat { padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-stat small, .detail-stat strong { display: block; }
.detail-stat small { color: var(--muted); }
.timeline { margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line-strong); list-style: none; }
.timeline li { position: relative; padding: 0 0 17px 14px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 7px; height: 7px; border: 1px solid var(--accent); transform: rotate(45deg); background: var(--surface); }
.level-inspector-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line-strong); }
.level-inspector-hero > div { min-width: 0; }
.level-inspector-hero span, .level-inspector-hero small { display: block; color: var(--muted); font-size: .76rem; }
.level-inspector-hero > div > strong { display: block; margin-top: 3px; }
.priority-total { padding-left: 14px; border-left: 1px solid var(--line); text-align: right; }
.priority-total strong { font-size: 1.65rem; font-variant-numeric: tabular-nums; }
.priority-breakdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.priority-breakdown > div { min-width: 0; padding: 12px 8px; border-right: 1px solid var(--line); }
.priority-breakdown > div:last-child { border-right: 0; }
.priority-breakdown small, .priority-breakdown strong, .priority-breakdown span { display: block; }
.priority-breakdown small, .priority-breakdown span { color: var(--muted); font-size: .72rem; line-height: 1.4; overflow-wrap: anywhere; }
.priority-breakdown strong { margin: 3px 0; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.priority-breakdown .total strong { color: var(--accent); }

body.modal-open { overflow: hidden; }
dialog { width: min(560px, calc(100% - 24px)); max-height: min(86vh, 820px); padding: 0; color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: visible; }
dialog::backdrop { background: rgba(0,0,0,.7); }
.dialog-shell { position: relative; max-height: inherit; overflow: visible; background: var(--surface); border-radius: inherit; }
dialog form { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto auto; max-height: inherit; padding: 20px; overflow: hidden; border-radius: inherit; }
.dialog-head, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialog-head h2 { margin: 0; }
.dialog-actions { justify-content: flex-end; margin-top: 20px; }
.form-grid, .dialog-scroll-region { display: grid; gap: 12px; overflow-y: auto; overscroll-behavior: contain; padding: 2px 3px; }
.form-grid label { display: grid; gap: 5px; color: var(--muted); font-size: .85rem; }
.form-grid [data-field-wrapper][hidden] { display: none; }
.form-grid textarea { min-height: 96px; resize: vertical; }
.profile-detail { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.profile-detail small { color: var(--muted); }
.profile-detail strong { min-width: 0; overflow-wrap: anywhere; }
.field-error { color: var(--danger); }
.checkbox-row { display: flex !important; align-items: flex-start; gap: 9px !important; padding: 8px 0; color: var(--text) !important; }
.checkbox-row input { flex: 0 0 auto; width: 17px; height: 17px; min-height: 0; margin: 2px 0 0; }
.required-marker { margin-left: 4px; color: var(--danger); }
.incident-panel { margin-top: 14px; }
.incident-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.incident-row:last-child { border-bottom: 0; }
.incident-row span, .incident-row small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.incident-meta { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 7px 14px; margin-bottom: 14px; }
.incident-meta span { color: var(--muted); }
.trace-block { max-height: 42vh; margin: 0; padding: 12px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--bg); border: 1px solid var(--line); font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.admin-disclosure { padding: 15px 0; border-bottom: 1px solid var(--line); }
.admin-disclosure > summary { cursor: pointer; font-weight: 750; }
.admin-disclosure > summary > span { display: inline-grid; gap: 2px; margin-left: 4px; vertical-align: top; }
.admin-disclosure > summary small { color: var(--muted); font-weight: 450; }
.admin-disclosure[open] > summary { margin-bottom: 12px; }
.diagnostic-body { padding: 3px 0 4px 22px; }
.diagnostic-body h3 { margin: 16px 0 5px; font-size: .9rem; }
.system-console { border-top: 1px solid var(--line-strong); }
.state-dot { display: inline-block; width: 9px; height: 9px; transform: rotate(45deg); background: var(--muted); }
.state-dot.healthy { background: var(--success); }
.state-dot.degraded { background: var(--warning); }
.compact-form { width: min(520px, 100%); overflow: visible; }
.danger-zone { border-color: #663638; }

.mobile-only { display: none; }
@media (max-width: 900px) {
  .app-shell { display: block; }
  .app-column { min-height: 100vh; }
  .sidebar { transform: translateX(-102%); transition: transform var(--t-med) ease; box-shadow: 12px 0 28px rgba(0,0,0,.32); }
  .sidebar.open { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  #workspace { padding: 20px 14px 40px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .statistics-grid, .operations-grid { grid-template-columns: 1fr; }
  .summary-band { grid-template-columns: 1fr 1fr; }
  .summary-band > div { border-bottom: 1px solid var(--line); }
  .progress-strip, .today-line, .system-status-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .count-metric:nth-child(2), .progress-unit:nth-child(2) { border-right: 0; }
  .count-metric, .progress-unit { border-bottom: 1px solid var(--line); }
  .top-attention { display: none; }
}
@media (max-width: 680px) {
  .model-grid { grid-template-columns: 1fr; }
  .capacity-route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { align-items: flex-start; }
  .personal-header { align-items: flex-start; flex-direction: column; }
  .summary-band { display: block; }
  .summary-band > div { min-height: auto; border-right: 0; }
  .content-surface { padding: 0 0 30px; }
  .summary-band { margin: 0 0 16px; }
  .activity-feed { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: minmax(0, 1fr) auto; }
  .record-row .row-chevron { display: none; }
  .detail-drawer { width: 100%; padding: 16px 16px 34px; border-left: 0; clip-path: none; }
  .detail-drawer::before { display: none; }
  .drawer-head { top: -16px; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .queue-table { min-width: 0; }
  .table-wrap { overflow: visible; }
  .data-table tr { padding: 12px 0; border-bottom: 1px solid var(--line-strong); }
  .data-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .data-table td::before { content: attr(data-label); color: var(--muted); font-size: .78rem; }
  .data-table td.level-cell { display: block; padding-bottom: 8px; }
  .data-table td.level-cell::before { display: none; }
  .toolbar > * { flex: 1 1 140px; }
  .toolbar input { min-width: 0; }
  .quick-filters { align-items: stretch; }
  .filter-chip { flex: 1 1 auto; }
  .compact-filter { flex: 1 1 calc(50% - 4px); margin-left: 0; }
  .compact-filter select { width: 100%; }
  .queue-search-row { flex-wrap: wrap; }
  .queue-search-row > * { flex: 1 1 100%; }
  .application-review { grid-template-columns: 1fr; }
  .choice-question, .manual-punishment-grid { grid-template-columns: 1fr; }
  .manual-punishment-grid .wide { grid-column: auto; }
  .application-save-row { position: static; align-items: stretch; flex-direction: column; margin: 24px -14px -22px; padding: 14px; }
  .application-save-row .dialog-actions { width: 100%; }
  .application-process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rubric-dimension { grid-template-columns: minmax(0, 1fr) 38px; }
  .rubric-dimension small { grid-column: 1 / -1; }
  .application-side { border-left: 0; border-top: 1px solid var(--line); padding: 16px 0 0; }
  .application-page { padding: 0; }
  .public-app-head { padding: 14px; margin: 0; }
  .application-shell { min-height: calc(100vh - 54px); padding: 22px 14px; border-left: 0; border-right: 0; border-bottom: 0; }
  .application-choice { grid-template-columns: 1fr; gap: 8px; }
  .application-choice-action { white-space: normal; }
  dialog { width: calc(100% - 12px); max-height: calc(100dvh - 12px); }
  dialog form { padding: 16px; }
  .incident-row { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .topbar { gap: 8px; }
  .search-wrap::after { display: none; }
  .search-wrap input { padding-right: 10px; }
  #workspace { padding: 16px 12px 32px; }
  .page-heading { gap: 8px; }
  .progress-strip, .today-line, .system-status-line { grid-template-columns: 1fr 1fr; }
  .count-metric, .progress-unit { min-height: 80px; padding: 11px 12px; }
  .detail-grid { grid-template-columns: 1fr; }
  .section-nav { width: 100%; }
  .record-row { gap: 8px; padding: 13px 2px; }
  .record-row .pill { display: none; }
  .record-row .role-badge { justify-self: end; }
  .level-inspector-hero { grid-template-columns: 54px minmax(0, 1fr); }
  .tier-art-large { width: 54px; height: 54px; }
  .priority-total { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; text-align: left; }
  .priority-breakdown { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .priority-breakdown > div:nth-child(2) { border-right: 0; }
  .priority-breakdown > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .application-stages li { font-size: .68rem; }
  .application-process-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
