/* Refined presentation for the original historical UI. No record values are changed. */
@font-face { font-family: Cleanroom; src: url('/fonts/glow-sans-sc-normal-regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Cleanroom; src: url('/fonts/glow-sans-sc-normal-medium.woff2') format('woff2'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Cleanroom; src: url('/fonts/glow-sans-sc-normal-bold.woff2') format('woff2'); font-weight: 700 800; font-display: swap; }
:root { --bg: #edf1f5; --panel: rgba(255, 255, 255, .7); --panel-strong: #fafbfd; --line: #dce2e9; --line-strong: #c4ceda; --text: #29323e; --muted: #647181; --cyan: #748599; --red: #b66462; --green: #527c6c; --acrylic-edge: rgba(255, 255, 255, .88); --acrylic-shadow: inset 0 1px 0 #fff, 0 0 0 1px #52647a08, 0 8px 28px -12px #33455c24; }
html { scroll-padding-top: 20px; }
body { min-width: 280px; background: radial-gradient(ellipse at 94% 8%, #e1e7ed80 0%, transparent 48%), linear-gradient(145deg, #f8f9fa 0%, #f0f3f6 58%, #eaf0f4 100%); background-attachment: fixed; font-family: Cleanroom, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
body::before { display: none; }
.stage { width: min(1240px, calc(100% - 64px)); padding: 16px 0 28px; }
.topbar { grid-template-columns: 1fr auto auto; min-height: 62px; gap: 24px; padding: 10px 16px; border: 1px solid var(--acrylic-edge); border-radius: 16px; background: linear-gradient(120deg, #ffffffbf, #ffffff70); box-shadow: var(--acrylic-shadow); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.brand { font-size: 14px; letter-spacing: -.02em; }
.brand-mark { flex-shrink: 0; width: 32px; height: 28px; border-radius: 0; transform: none; background: url('../../../standard-form.webp') 50% 52% / 130% auto no-repeat; box-shadow: none; }
.nav-links { display: flex; gap: 24px; font-size: 12px; }
.nav-links a { transition: color 150ms ease; }
.ghost-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 7px 12px; border-radius: 10px; border-color: #ffffffeb; background: linear-gradient(#ffffffe6, #ffffff85); color: #394452; font-size: 12px; box-shadow: inset 0 1px 0 #fff, 0 2px 5px #33455c0c; transition: background 160ms ease, border-color 160ms ease, transform 160ms ease; }
.ghost-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ghost-button:hover { background: #ffffffed; border-color: #fff; transform: translateY(-1px); }
.ghost-button:active { transform: translateY(0); }
.workspace-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 27px 0 19px; }
.workspace-heading h1 { margin: 0; font-size: 25px; font-weight: 600; line-height: 1.35; letter-spacing: -.04em; }
.archive-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 0 19px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.archive-label { margin-right: 2px; }
.batch-nav { display: flex; gap: 6px; }
.batch-nav a { padding: 7px 11px; border: 1px solid transparent; border-radius: 9px; color: #657183; transition: color 150ms, background 150ms, border-color 150ms; font-variant-numeric: tabular-nums; }
.batch-nav a:hover { color: var(--text); background: #ffffff78; }
.batch-nav a[aria-current='page'] { background: linear-gradient(#fffffff0, #ffffff9c); border-color: var(--acrylic-edge); color: #354254; box-shadow: inset 0 1px 0 #fff, 0 3px 9px #33455c0a; }
.workspace { grid-template-columns: minmax(230px, .72fr) minmax(0, 2fr); padding-top: 0; gap: 16px; align-items: start; }
.workspace > * { min-width: 0; }
.control-panel, .result-panel, .report-panel { border-color: var(--acrylic-edge); background: linear-gradient(135deg, #ffffffe0, #ffffff91); border-radius: 18px; box-shadow: var(--acrylic-shadow); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.control-panel { padding: 19px; }
.section-title p { margin-bottom: 5px; font-size: 11px; color: var(--muted); font-weight: 400; }
.section-title h2 { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 600; letter-spacing: -.02em; }
.form-grid { gap: 15px; margin-top: 22px; }
.threshold-grid { gap: 16px 10px; }
.threshold-field { display: grid; gap: 7px; min-width: 0; }
.parameter-heading { display: flex; align-items: center; gap: 5px; width: fit-content; max-width: 100%; }
.parameter-heading label { color: #596879; font-size: 11px; cursor: help; }
.parameter-help { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 24px; height: 24px; margin: -4px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: #738195; font-size: 10px; line-height: 1; }
.parameter-help > span { display: grid; place-items: center; width: 14px; height: 14px; border: 1px solid #b6c1ce; border-radius: 50%; }
.parameter-help:hover, .parameter-help[aria-expanded='true'] { color: #354d68; background: #e9eef4; }
.parameter-tooltip { position: fixed; z-index: 100; width: min(320px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 13px 15px; border: 1px solid #dce3eb; border-radius: 12px; background: #fff; color: #536174; box-shadow: 0 8px 28px #2a3a5024; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.parameter-tooltip strong { display: block; margin-bottom: 5px; color: #2f4056; font-size: 12px; font-weight: 600; }
.parameter-tooltip p { margin: 0; }
.parameter-diagram { margin: 10px 0; }
.parameter-diagram img { display: block; width: 100%; height: auto; border: 1px solid #e8edf3; border-radius: 10px; }
.parameter-tooltip[hidden], .preset-preview[hidden], .preset-custom[hidden] { display: none; }
label { gap: 7px; }
label span { color: #69717e; font-size: 11px; }
input { min-height: 35px; padding: 8px 10px; background: #ffffff91; border: 1px solid #dfe5edb3; border-radius: 9px; box-shadow: inset 0 1px 2px #33455c05, 0 1px 0 #ffffffc9; color: #525b68; font-size: 12px; font-variant-numeric: tabular-nums; }
input:disabled { opacity: 1; -webkit-text-fill-color: #525b68; }
.config-disclosure { border-top: 1px solid #dce3ecb3; padding-top: 12px; }
.config-disclosure summary { display: flex; align-items: center; justify-content: space-between; padding: 2px 0; cursor: pointer; list-style: none; font-size: 11px; color: #69717e; }
.config-disclosure summary::-webkit-details-marker { display: none; }
.config-disclosure summary::after { content: '+'; color: #9299a4; font-size: 15px; }
.config-disclosure[open] summary::after { content: '−'; }
.config-disclosure > :not(summary) { margin-top: 14px; }
.preset-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: -5px; color: #536174; font-size: 11px; }
.preset-custom { padding: 2px 6px; border-radius: 5px; background: #e9eef4; color: #526174; font-size: 10px; }
.preset-row { gap: 6px; }
.preset, .primary-button, .secondary-button { font-size: 11px; border-color: #ffffffd9; border-radius: 9px; min-height: 34px; box-shadow: inset 0 1px 0 #ffffffb3, 0 2px 5px #33455c08; }
.preset, .secondary-button { background: linear-gradient(#ffffffc9, #ffffff75); color: #566476; }
.preset { position: relative; min-height: 48px; padding: 12px 5px 9px; border-color: #c8d2df; background: #ffffffd9; color: #455870; font-size: 12px; font-weight: 500; transition: color 160ms, background 160ms, border-color 160ms, box-shadow 160ms; }
.preset:hover { border-color: #8c9fb5; background: #f1f5fa; }
.preset-check { position: absolute; top: 3px; right: 5px; color: inherit; font-size: 10px; line-height: 1; visibility: hidden; }
.preset.is-active, .preset[aria-pressed='true'] { border-color: #415873; background: #415873; color: #fff; box-shadow: inset 0 1px 0 #ffffff26, 0 3px 8px #33455c20; font-weight: 600; }
.preset[aria-pressed='true'] .preset-check { visibility: visible; }
.preset-preview { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px; margin-top: -6px; color: #68778a; font-size: 11px; }
.preset-restore { padding: 4px 0; border: 0; background: transparent; color: #435d7b; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.primary-button, .secondary-button { width: 100%; }
.primary-button { min-height: 38px; border-color: #48586b; background: linear-gradient(135deg, #5c6c80, #344357); color: #fff; box-shadow: inset 0 1px 0 #ffffff30, 0 4px 10px #33455c1a; font-weight: 500; }
.primary-button .button-icon { color: #dce5ef; }
:is(.primary-button, .secondary-button):disabled { cursor: default; opacity: .78; }
.result-panel { padding: 19px; }
.metrics { gap: 0; margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid #dce3ecb3; }
.metrics div { min-height: auto; border: 0; border-radius: 0; padding: 0 18px; background: transparent; }
.metrics div:first-child { padding-left: 0; }
.metrics div + div { border-left: 1px solid #dce3ecb3; }
.metrics span { font-size: 11px; color: #69717e; }
.metrics strong { margin-top: 8px; font-size: 29px; font-weight: 500; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
#acceptedCount { color: #507564; }
#rejectedCount { color: #a47b76; }
.review-head { flex-direction: row; gap: 12px; align-items: center; }
.review-head p { display: none; }
.review-head h2 { font-size: 17px; font-weight: 600; line-height: 1.5; letter-spacing: -.02em; }
.tab-row { position: relative; isolation: isolate; width: 248px; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 4px; background: #dce4ed73; border-radius: 11px; box-shadow: inset 0 1px 2px #33455c0a, 0 1px 0 #ffffffbf; }
.tab-indicator { position: absolute; inset: 4px auto 4px 4px; width: calc((100% - 8px) / 2); background: linear-gradient(#fffffffa, #ffffffb3); border: 1px solid #fffffff0; border-radius: 8px; box-shadow: 0 2px 5px #33455c12; pointer-events: none; }
.tab-row[data-active='rejected'] .tab-indicator { transform: translateX(100%); }
.tab { z-index: 1; min-height: 28px; padding: 4px 8px; border: 0; border-radius: 6px; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; background: transparent; color: #69717e; transition: color 150ms ease; }
.tab.is-active { background: transparent; border-color: transparent; color: #313843; }
.preview-tools { display: flex; align-items: center; justify-content: space-between; margin: 15px 0 9px; color: #747d89; font-size: 11px; }
.preview-zoom { padding: 4px 0 4px 8px; border: 0; background: none; font-size: 11px; color: #69717e; cursor: pointer; transition: color 150ms; }
.preview-zoom:hover { color: var(--text); }
.preview-frame { margin-top: 0; height: 420px; border-radius: 12px; background: #fff; border-color: #dfe5ec; box-shadow: 0 1px 0 #ffffffeb; scrollbar-width: thin; scrollbar-color: #c8d1dc transparent; }
.preview-image { width: 100%; min-width: 0; max-width: 100%; }
.preview-frame[data-zoom='true'] .preview-image { width: auto; max-width: none; min-width: 100%; }
.report-panel { margin-top: 16px; padding: 20px; }
.score-cell, .grade-key { --grade-color: #647181; --grade-soft: #edf1f5; --grade-border: #d4dce5; }
:is(.score-cell, .grade-key)[data-grade='S'] { --grade-color: #6942a5; --grade-soft: #eee5fa; --grade-border: #d1beee; }
:is(.score-cell, .grade-key)[data-grade='A'] { --grade-color: #206e55; --grade-soft: #e2f2eb; --grade-border: #b4decf; }
:is(.score-cell, .grade-key)[data-grade='B'] { --grade-color: #315f9f; --grade-soft: #e5eefb; --grade-border: #c3d4f0; }
:is(.score-cell, .grade-key)[data-grade='C'] { --grade-color: #8b5b12; --grade-soft: #fbefda; --grade-border: #ecd19f; }
:is(.score-cell, .grade-key)[data-grade='D'] { --grade-color: #a14452; --grade-soft: #f9e5e8; --grade-border: #e6b8c1; }
.score-cell { display: flex; align-items: center; gap: 9px; min-width: 94px; padding-block: 1px; }
.grade-badge { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 32px; height: 32px; border: 1px solid var(--grade-border); border-radius: 8px; background: var(--grade-soft); color: var(--grade-color); font-size: 15px; font-weight: 700; line-height: 1; }
.score-value { display: grid; gap: 6px; min-width: 52px; }
.score-cell strong { color: var(--grade-color); font-size: 15px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.score-meter { display: block; width: 52px; height: 3px; overflow: hidden; border-radius: 2px; background: var(--grade-soft); }
.score-meter i { display: block; height: 100%; border-radius: inherit; background: var(--grade-color); }
.score-unavailable { color: #8692a1; font-size: 11px; white-space: nowrap; }
.grade-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; margin-top: 16px; }
.grade-legend-label { color: #69778a; font-size: 11px; }
.grade-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.grade-key .grade-badge { width: 24px; height: 24px; border-radius: 6px; font-size: 12px; }
.grade-range { color: #617083; font-size: 11px; font-variant-numeric: tabular-nums; }
.table-wrap { max-height: 420px; margin-top: 15px; border: 1px solid #e2e7ee; border-radius: 12px; background: #ffffffdb; scrollbar-width: thin; scrollbar-color: #c8d1dc transparent; }
th, td { padding: 11px 12px; font-size: 11px; line-height: 1.5; border-bottom-color: #eff1f4; }
th { position: sticky; top: 0; z-index: 1; background: #f1f4f8; color: #606d7e; font-size: 11px; font-weight: 400; }
td { color: #727b88; font-variant-numeric: tabular-nums; }
td strong { color: #414a57; font-weight: 500; }
tr { transition: background 140ms ease; }
tbody tr:hover { background: #f7f9fc; }
.status { min-height: 21px; padding: 2px 7px; border-radius: 5px; font-size: 11px; font-weight: 400; white-space: nowrap; }
.status.accepted { background: #edf5f0; color: #688873; }
.status.rejected { background: #faf0ef; color: #ae827b; }
.muted { margin-top: 5px; color: #78818f; font-size: 11px; }
:where(a,button,summary,[tabindex]):focus-visible { outline: 2px solid #8896ad; outline-offset: 3px; }
.portfolio-embedded .stage { width: calc(100% - 40px); }
@media (max-width: 760px) {
  .stage, .portfolio-embedded .stage { width: calc(100% - 24px); }
  .stage { padding-top: 12px; }
  .topbar { min-height: 59px; gap: 12px; padding-inline: 12px; }
  .nav-links { gap: 14px; }
  .workspace-heading { margin: 24px 0 15px; flex-direction: column; gap: 5px; }
  .workspace-heading h1 { font-size: 23px; }
  .archive-bar { gap: 8px; padding-bottom: 16px; }
  .archive-label { display: none; }
  .batch-nav a { padding-inline: 9px; }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .result-panel { order: -1; padding: 15px; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 19px; padding-bottom: 18px; }
  .metrics div { padding-inline: 12px; }
  .metrics strong { font-size: 27px; }
  .review-head { align-items: stretch; flex-direction: column; gap: 11px; }
  .tab-row { width: 100%; }
  .tab { min-height: 32px; font-size: 12px; }
  .preview-frame { height: 350px; }
  .control-panel { padding: 17px; }
  .threshold-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-panel { padding: 15px; }
}
@media (max-width: 430px) {
  .topbar { grid-template-columns: 1fr auto; gap: 12px; padding-block: 12px; }
  .nav-links { display: flex; grid-column: 1 / -1; grid-row: 2; }
}
@media (prefers-reduced-transparency: reduce) {
  body { background: var(--bg); }
  .topbar, .control-panel, .result-panel, .report-panel { background: #f8fafc; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
