/* CreditLens workspace: deep indigo instrument chrome, iris-violet primary accent,
   brass reading marks, one restrained accent per workspace section. Native CSS, no external kit. */
:root {
  --cl-font: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", "Segoe UI", system-ui, sans-serif;
  --cl-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --cl-bg: #f1f3f8; --cl-surface: #ffffff; --cl-surface-2: #f6f7fb; --cl-sunken: #eceff6;
  --cl-line: #dde2ee; --cl-line-strong: #c4cbdd;
  --cl-ink: #161d43; --cl-ink-2: #2c3563; --cl-muted: #555e80; --cl-faint: #6c7493;
  --cl-night: #131a3a; --cl-night-2: #1b2450; --cl-night-line: #2b3566; --cl-night-ink: #eef0fa; --cl-night-muted: #aab2d6;
  --cl-brass: #85601f; --cl-brass-bright: #d5ac5f; --cl-brass-soft: #f6eedc;
  --cl-ok: #23694a; --cl-ok-bg: #e5f2ea; --cl-warn: #855610; --cl-warn-bg: #fbf0d9; --cl-bad: #a2302a; --cl-bad-bg: #fbe8e6;
  --cl-neutral: #555e80; --cl-neutral-bg: #eceff6; --cl-focus: #2f5bd3;
  --cl-iris: #5a48c2; --cl-iris-bright: #b6a6ff;
  --cl-research: var(--cl-iris); --cl-research-soft: #ece9fb;
  --cl-evidence: #1d5e94; --cl-evidence-soft: #e3eef8;
  --cl-review: #983a50; --cl-review-soft: #f7e6ea;
  --cl-lab: #286f62; --cl-lab-soft: #e1f0ec;
  --cl-shadow: 0 1px 2px #161d430d, 0 6px 18px #161d430a;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --cl-bg: #0b1026; --cl-surface: #121a37; --cl-surface-2: #172042; --cl-sunken: #0e1530;
  --cl-line: #26305a; --cl-line-strong: #36426f;
  --cl-ink: #e8ebf7; --cl-ink-2: #cfd5ee; --cl-muted: #a0a9cb; --cl-faint: #8f98bb;
  --cl-night: #080c1f; --cl-night-2: #10173a; --cl-night-line: #232c58; --cl-night-ink: #eef0fa; --cl-night-muted: #a7afd3;
  --cl-brass: #ddb468; --cl-brass-bright: #e7c27c; --cl-brass-soft: #2c2715;
  --cl-ok: #7fd1a7; --cl-ok-bg: #12301f; --cl-warn: #ecc072; --cl-warn-bg: #33270f; --cl-bad: #f29a90; --cl-bad-bg: #3a1716;
  --cl-neutral: #b4bcda; --cl-neutral-bg: #1f2849; --cl-focus: #93b0ff;
  --cl-iris: #ad9bff; --cl-iris-bright: #b6a6ff;
  --cl-research: var(--cl-iris); --cl-research-soft: #221d45;
  --cl-evidence: #84baf0; --cl-evidence-soft: #13284a;
  --cl-review: #ef9fb2; --cl-review-soft: #351a28;
  --cl-lab: #86cdbb; --cl-lab-soft: #11302c;
  --cl-shadow: 0 1px 2px #0006, 0 8px 22px #0004;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --cl-bg: #0b1026; --cl-surface: #121a37; --cl-surface-2: #172042; --cl-sunken: #0e1530;
    --cl-line: #26305a; --cl-line-strong: #36426f;
    --cl-ink: #e8ebf7; --cl-ink-2: #cfd5ee; --cl-muted: #a0a9cb; --cl-faint: #8f98bb;
    --cl-night: #080c1f; --cl-night-2: #10173a; --cl-night-line: #232c58; --cl-night-ink: #eef0fa; --cl-night-muted: #a7afd3;
    --cl-brass: #ddb468; --cl-brass-bright: #e7c27c; --cl-brass-soft: #2c2715;
    --cl-ok: #7fd1a7; --cl-ok-bg: #12301f; --cl-warn: #ecc072; --cl-warn-bg: #33270f; --cl-bad: #f29a90; --cl-bad-bg: #3a1716;
    --cl-neutral: #b4bcda; --cl-neutral-bg: #1f2849; --cl-focus: #93b0ff;
    --cl-iris: #ad9bff; --cl-iris-bright: #b6a6ff;
    --cl-research: var(--cl-iris); --cl-research-soft: #221d45;
    --cl-evidence: #84baf0; --cl-evidence-soft: #13284a;
    --cl-review: #ef9fb2; --cl-review-soft: #351a28;
    --cl-lab: #86cdbb; --cl-lab-soft: #11302c;
    --cl-shadow: 0 1px 2px #0006, 0 8px 22px #0004;
    color-scheme: dark;
  }
}

/* Each console section owns one accent; pages inherit it through legacy variables. */
body.cl-workspace { --section: var(--cl-research); --section-soft: var(--cl-research-soft); }
body:is(.cl-page-documents,.cl-page-cross-page) { --section: var(--cl-evidence); --section-soft: var(--cl-evidence-soft); }
body:is(.cl-page-review,.cl-page-explanation-reviews,.cl-page-reference-review) { --section: var(--cl-review); --section-soft: var(--cl-review-soft); }
body:is(.cl-page-experiments,.cl-page-transfer,.cl-page-preparation,.cl-page-workbench) { --section: var(--cl-lab); --section-soft: var(--cl-lab-soft); }
body.cl-workspace {
  --font: var(--cl-font); --text: var(--cl-ink); --ink: var(--cl-ink); --muted: var(--cl-muted); --line: var(--cl-line);
  --soft: var(--cl-surface-2); --bg: var(--cl-bg); --blue: var(--section); --green: var(--section); --accent: var(--section);
  --amber: var(--cl-warn); --red: var(--cl-bad);
  --page-accent: var(--section); --page-ink: var(--cl-ink); --page-wash: var(--cl-surface-2); --page-tint: var(--section-soft);
  margin: 0; background: var(--cl-bg); color: var(--cl-ink); font: 14px/1.6 var(--cl-font); font-kerning: normal; -webkit-font-smoothing: antialiased;
}
.cl-workspace * { box-sizing: border-box; }
.cl-workspace [hidden] { display: none !important; }
.cl-workspace a { color: var(--section); text-decoration: none; }
.cl-workspace a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cl-skip { position: fixed; top: -70px; left: 16px; z-index: 100; padding: 9px 14px; background: var(--cl-surface); color: var(--cl-ink); border: 1px solid var(--section); border-radius: 6px; }
.cl-skip:focus { top: 8px; }
.cl-app { min-height: 100dvh; display: block; }

/* Masthead: an instrument bar with a brass reading scale along its lower edge. */
.cl-workspace .cl-masthead { position: relative; display: flex; align-items: center; gap: 36px; min-height: 60px; margin: 0; padding: 0 28px; background: var(--cl-night); border: 0; border-radius: 0; box-shadow: none; }
.cl-workspace .cl-masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; pointer-events: none;
  background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--cl-brass-bright) 55%, transparent) 0 1px, transparent 1px 10px) bottom/100% 3px no-repeat,
              repeating-linear-gradient(90deg, color-mix(in srgb, var(--cl-brass-bright) 75%, transparent) 0 1px, transparent 1px 50px) bottom/100% 5px no-repeat; }
.cl-workspace .cl-wordmark { display: inline-flex; flex-shrink: 0; align-items: center; gap: 1px; padding: 0; font: 650 20px/1 var(--cl-font); letter-spacing: -.4px; color: var(--cl-night-ink); text-decoration: none; }
.cl-workspace .cl-wordmark:hover { text-decoration: none; }
.cl-wordmark .cl-loupe { position: relative; width: 15px; height: 15px; margin-right: 9px; border: 2px solid var(--cl-brass-bright); border-radius: 50%; flex-shrink: 0; }
.cl-wordmark .cl-loupe::after { content: ""; position: absolute; width: 7px; height: 2px; right: -7px; bottom: -3px; background: var(--cl-brass-bright); border-radius: 1px; transform: rotate(45deg); }
.cl-wordmark .cl-lens { color: var(--cl-brass-bright); font-weight: 500; }
.cl-workspace .cl-primary-nav { display: flex; align-items: stretch; align-self: stretch; gap: 4px; padding: 0; margin: 0; background: none; border: 0; }
.cl-primary-nav a { --tab: var(--cl-iris-bright); position: relative; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 0 14px; color: var(--cl-night-muted); font-size: 14px; font-weight: 500; white-space: nowrap; border-radius: 0; }
.cl-primary-nav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--tab); flex-shrink: 0; }
.cl-primary-nav a[data-section="evidence"] { --tab: #8fc0f2; }
.cl-primary-nav a[data-section="review"] { --tab: #f0a4b6; }
.cl-primary-nav a[data-section="lab"] { --tab: #8dd3c1; }
.cl-primary-nav a.is-current { color: var(--cl-night-ink); background: none; font-weight: 600; box-shadow: none; }
.cl-primary-nav a.is-current::before { background: var(--tab); }
.cl-primary-nav a.is-current::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 7px; height: 2px; background: var(--tab); border-radius: 1px; }
.cl-primary-nav a:hover { color: var(--cl-night-ink); text-decoration: none; background: none; }
.cl-masthead-meta { margin-left: auto; display: flex; align-items: center; gap: 16px; color: var(--cl-night-muted); font-size: 12px; white-space: nowrap; }
.cl-masthead-meta a { color: var(--cl-night-muted); font-size: 12px; }
.cl-masthead-meta a:hover { color: var(--cl-night-ink); }
.cl-dev-flag { padding: 2px 8px; border: 1px solid color-mix(in srgb, var(--cl-brass-bright) 55%, transparent); border-radius: 4px; color: var(--cl-brass-bright); font-size: 11px; letter-spacing: .5px; }
.cl-workspace .cl-theme, .cl-theme { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 3px 10px; border: 1px solid var(--cl-night-line); border-radius: 6px; background: transparent; color: var(--cl-night-muted); font: 500 12px/1 var(--cl-font); cursor: pointer; }
.cl-workspace .cl-theme:hover:not(:disabled), .cl-theme:hover { color: var(--cl-night-ink); border-color: var(--cl-night-muted); background: transparent; }
.cl-theme-mark { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
[data-theme-choice="light"] .cl-theme-mark { background: transparent; }
[data-theme-choice="dark"] .cl-theme-mark { background: currentColor; }

/* Page tabs within the section: a section label, then underlined tabs. */
.cl-workspace .cl-section-nav { display: flex; justify-content: flex-start; align-items: stretch; flex-wrap: nowrap; gap: 2px; min-height: 48px; padding: 0 28px; margin: 0; background: var(--cl-surface); border: 0; border-bottom: 1px solid var(--cl-line); overflow-x: auto; scrollbar-width: thin; }
.cl-section-nav::before { content: attr(data-section-label); display: flex; align-items: center; padding-right: 16px; margin-right: 6px; color: var(--section); font-size: 12px; font-weight: 600; white-space: nowrap; border-right: 1px solid var(--cl-line); margin-block: 12px; }
.cl-section-nav a { position: relative; display: flex; align-items: center; padding: 0 12px; color: var(--cl-muted); white-space: nowrap; font-size: 13px; border: 0; border-radius: 0; }
.cl-section-nav a:hover { color: var(--cl-ink); text-decoration: none; }
.cl-section-nav a[aria-current=page] { color: var(--cl-ink); background: none; font-weight: 600; box-shadow: none; }
.cl-section-nav a[aria-current=page]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--section); }
.cl-section-nav a.is-local { color: var(--cl-faint); }
.cl-section-nav a.is-local::after { content: "本地"; position: static; margin-left: 6px; padding: 0 5px; font-size: 10px; line-height: 16px; border: 1px solid var(--cl-line-strong); border-radius: 3px; color: var(--cl-faint); background: none; height: auto; }
.cl-primary-nav a.is-local { opacity: .78; }
.cl-main { min-width: 0; }
.cl-main>main, .cl-main>main.content { max-width: 1600px; width: 100%; margin: auto; padding: 26px 32px 48px; background: transparent; }
.cl-session { display: flex; justify-content: flex-end; padding: 12px 32px 0; max-width: 1600px; margin: auto; }
.cl-session .identity { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; }
.cl-session .identity input { max-width: 180px; }
.cl-session .identity :is(input,select,button) { min-height: 28px; padding: 3px 8px; font-size: 12px; }

/* Type scale and controls. */
.cl-workspace h1 { font: 650 26px/1.35 var(--cl-font); color: var(--cl-ink); letter-spacing: -.4px; margin: 0 0 6px; }
.cl-workspace h2 { font: 600 16px/1.5 var(--cl-font); margin: 0 0 10px; color: var(--cl-ink); letter-spacing: 0; }
.cl-workspace h3 { font: 600 13px/1.5 var(--cl-font); color: var(--cl-ink-2); }
.cl-page-heading { margin: 0 0 22px; padding: 0; border: 0; background: none; box-shadow: none; min-width: 0; }
.cl-page-heading :is(header,.intro,.heading,.lookup-heading) { margin: 0; padding: 0; border: 0; background: none; max-width: none; }
.cl-page-heading h1::before { content: ""; display: inline-block; width: 10px; height: 10px; margin: 0 10px 3px 0; border: 2px solid var(--section); border-radius: 50%; vertical-align: middle; }
.cl-page-heading p { margin: 5px 0 0; color: var(--cl-muted); font-size: 13px; line-height: 1.65; max-width: 920px; }
.cl-page-heading .heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.cl-page-heading .eyebrow, .cl-workspace .eyebrow { display: none; }
.cl-command-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.cl-page-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.cl-workspace p { line-height: 1.65; }
.cl-workspace :is(.muted,.sub,.small) { color: var(--cl-muted); font-size: 12px; }
.cl-workspace :is(.intro,.footnote,.caption,.sidebar-caption) { color: var(--cl-muted); }
.cl-workspace :is(button,input,select,textarea) { font-family: var(--cl-font); font-size: 13px; border-radius: 6px; box-shadow: none; }
.cl-workspace :is(button,input,select) { min-height: 34px; padding: 6px 12px; max-width: 100%; border: 1px solid var(--cl-line-strong); }
.cl-workspace :is(input,select,textarea) { background: var(--cl-surface); color: var(--cl-ink); border-color: var(--cl-line-strong); }
.cl-workspace input::placeholder, .cl-workspace textarea::placeholder { color: var(--cl-faint); }
.cl-workspace input:is([type=checkbox],[type=radio]) { min-height: auto; padding: 0; accent-color: var(--section); }
.cl-workspace button { background: var(--cl-surface); color: var(--cl-ink-2); white-space: normal; line-height: 1.45; font-weight: 500; cursor: pointer; }
.cl-workspace button:hover:not(:disabled) { background: var(--section-soft); color: var(--cl-ink); border-color: var(--section); }
.cl-workspace :is(button.primary,.primary) { color: #fff; background: var(--section); border-color: var(--section); }
.cl-workspace :is(button.primary,.primary):hover:not(:disabled) { color: #fff; background: var(--section); border-color: var(--section); filter: brightness(.92); }
:root[data-theme="dark"] .cl-workspace :is(button.primary,.primary), :root[data-theme="dark"] .cl-workspace :is(button.primary,.primary):hover:not(:disabled) { color: #0b1026; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .cl-workspace :is(button.primary,.primary), :root:not([data-theme="light"]) .cl-workspace :is(button.primary,.primary):hover:not(:disabled) { color: #0b1026; } }
.cl-workspace button:disabled, .cl-workspace button.primary:disabled { color: var(--cl-faint); background: var(--cl-sunken); border-color: var(--cl-line); opacity: 1; cursor: not-allowed; filter: none; }
.cl-workspace :focus-visible { outline: 2px solid var(--cl-focus); outline-offset: 3px; }
.cl-masthead :focus-visible, .lookup-evidence :focus-visible, .cl-page-tasks .task-head :focus-visible, .cl-page-research #evidence-panel :focus-visible, .cl-page-documents .document-paper :focus-visible { outline-color: var(--cl-brass-bright); }
.cl-workspace :is(button,a,input,select,summary) { transition: background-color .16s ease, border-color .16s ease, color .16s ease; }
.cl-workspace textarea { resize: vertical; padding: 9px 11px; line-height: 1.65; border: 1px solid var(--cl-line-strong); }
.cl-workspace label { font-size: 12px; color: var(--cl-muted); }
.cl-workspace .bar { gap: 10px; margin: 12px 0; }
.cl-workspace .actions { gap: 8px; }
.cl-workspace :is(.notice,.banner) { background: var(--cl-surface-2); border: 0; border-left: 3px solid var(--cl-line-strong); border-radius: 6px; padding: 10px 13px; margin: 12px 0; font-size: 12px; line-height: 1.65; color: var(--cl-muted); }
.cl-workspace :is(.notice,.banner) strong { color: var(--cl-ink-2); }
.cl-workspace .notice.good { background: var(--cl-ok-bg); border-left-color: var(--cl-ok); color: var(--cl-ink-2); }
.cl-workspace .comparison-note { background: var(--cl-warn-bg); color: var(--cl-ink-2); }
.cl-workspace .error { font-size: 13px; color: var(--cl-bad); background: var(--cl-bad-bg); border-color: transparent; }
.cl-workspace :is(.status,#status) { margin: 8px 0 14px; padding: 0; min-height: 18px; font-size: 12px; color: var(--cl-muted); background: none; }
.cl-workspace .status.error { color: var(--cl-bad); }
.cl-workspace .panel>:is(.status,#status):last-child { margin-bottom: 0; }
.cl-workspace #status:empty { display: none; }
.cl-workspace :is(.panel,.tools,.metrics,.top,.workspace,header:not(.cl-masthead)) { background: var(--cl-surface); color: var(--cl-ink); }
.cl-workspace .panel { padding: 22px 24px; border: 1px solid var(--cl-line); border-radius: 10px; box-shadow: none; }
.cl-workspace .controls { padding: 14px 18px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; box-shadow: none; }
.cl-workspace .panel>.controls { padding: 0; border: 0; }
.cl-workspace :is(.scroll,.table-wrap) { overflow: auto; max-width: 100%; border: 1px solid var(--cl-line); border-radius: 8px; }
.cl-workspace table { background: var(--cl-surface); color: var(--cl-ink); font-size: 13px; line-height: 1.5; border-collapse: collapse; }
.cl-workspace th { background: var(--cl-surface-2); color: var(--cl-muted); font-size: 12px; font-weight: 600; }
.cl-workspace :is(th,td) { padding: 9px 12px; border-bottom: 1px solid var(--cl-line); }
.cl-workspace td { font-variant-numeric: tabular-nums; }
.cl-workspace tbody tr:hover { background: var(--cl-surface-2); }
.cl-workspace .selected:not(.box) { background: var(--section-soft); }
.cl-workspace tr.focused { background: var(--cl-warn-bg); }
.cl-workspace .tag { display: inline-block; font-size: 11px; line-height: 22px; padding: 0 8px; border-radius: 4px; font-weight: 600; color: var(--cl-ok); background: var(--cl-ok-bg); }
.cl-workspace .tag:is(.consistent,.good) { color: var(--cl-ok); background: var(--cl-ok-bg); }
.cl-workspace .tag:is(.insufficient,.warn,.derived_requires_review) { color: var(--cl-warn); background: var(--cl-warn-bg); }
.cl-workspace .tag:is(.conflict,.danger,.blocked,.bad) { color: var(--cl-bad); background: var(--cl-bad-bg); }
.cl-workspace .tag.missing { color: var(--cl-neutral); background: var(--cl-neutral-bg); }
.cl-workspace .tabs { display: flex; gap: 22px; flex-wrap: nowrap; overflow-x: auto; margin: 18px 0 16px; border-bottom: 1px solid var(--cl-line); }
.cl-workspace .tabs button { padding: 9px 1px; background: transparent; border: 0; border-bottom: 2px solid transparent; border-radius: 0; color: var(--cl-muted); font-size: 12px; white-space: nowrap; }
.cl-workspace .tabs button:hover:not(:disabled) { background: transparent; border-color: transparent; border-bottom-color: var(--cl-line-strong); }
.cl-workspace .tabs button.active { color: var(--cl-ink); border-bottom-color: var(--section); font-weight: 600; }
.cl-workspace .empty { padding: 32px 24px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; text-align: left; }
.cl-workspace .empty h2 { font: 600 18px/1.5 var(--cl-font); }
.cl-workspace .empty p { margin: 10px 0; max-width: 680px; }
.cl-workspace .flow { justify-content: flex-start; }
.cl-workspace .metric { padding: 15px 18px; }
.cl-workspace .metric .number { font-size: 26px; margin: 8px 0; font-weight: 600; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.cl-workspace .metric button { background: var(--cl-surface-2); }
.cl-workspace :is(.footer,.foot) { font-size: 12px; color: var(--cl-muted); margin-top: 22px; border-color: var(--cl-line); }
.cl-workspace .section { padding: 20px 0; margin-bottom: 10px; border-color: var(--cl-line); }
.cl-workspace details summary { font-size: 12px; font-weight: 500; cursor: pointer; color: var(--section); }
.cl-workspace pre { max-width: 100%; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; font: 11px/1.65 var(--cl-mono); background: var(--cl-sunken); color: var(--cl-ink-2); border-radius: 6px; padding: 12px; }
.cl-workspace :is(code,.mono) { font-family: var(--cl-mono); }
.cl-workspace .columns { gap: 18px; }
.cl-workspace .limits { margin-top: 20px; }
.cl-workspace .source-meta { font-size: 12px; }
.cl-workspace hr { border: 0; border-top: 1px solid var(--cl-line); }
.cl-workspace :is(.evidence,.readout,.issue .record,.row-result:not(:empty),.demo,button.secondary) { background: var(--cl-surface-2); color: var(--cl-ink); }
.cl-workspace .row-result:not(:empty) { border-left-color: var(--section); }
.cl-workspace .track { background: var(--cl-sunken); }
/* Scans stay on paper in both themes; marks keep the colours named in page notes. */
.cl-workspace :is(.preview,.viewer) { background: #f3f1ea; border: 1px solid var(--cl-line); border-radius: 6px; overflow: hidden; }
.cl-workspace .viewer svg { background: #fff; }

/* Access fields are disclosed on demand; request status stays outside. */
.cl-access { position: relative; margin: 0; }
.cl-access>summary { list-style: none; padding: 7px 12px; min-height: 34px; border: 1px solid var(--cl-line-strong); border-radius: 6px; background: var(--cl-surface); color: var(--cl-muted); white-space: nowrap; }
.cl-access>summary::-webkit-details-marker { display: none; }
.cl-access>summary::after { content: "⌄"; margin-left: 9px; }
.cl-access[open]>summary { border-color: var(--section); color: var(--cl-ink); }
.cl-access-fields { position: absolute; right: 0; top: calc(100% + 8px); width: 280px; max-width: calc(100vw - 36px); padding: 16px; display: grid; gap: 12px; z-index: 25; border: 1px solid var(--cl-line-strong); background: var(--cl-surface); border-radius: 10px; box-shadow: var(--cl-shadow); }
.cl-access-fields label { display: flex; flex-direction: column; gap: 6px; }
.cl-access-fields :is(select,input) { width: 100% !important; }

/* Saved records stay close to their task content. */
.cl-records { display: flex; gap: 16px; align-items: center; padding: 0 0 16px; margin: 0 0 17px; border-bottom: 1px solid var(--cl-line); }
.cl-records>p { font-size: 12px; color: var(--cl-muted); white-space: nowrap; margin: 0; }
.cl-records>button { flex-shrink: 0; }
.cl-records .queue { display: flex; flex-direction: row; gap: 8px; min-width: 0; overflow: auto; margin: 0; max-height: 94px; flex: 1; }
.cl-records .queue button { display: block; flex: 0 0 250px; text-align: left; padding: 9px 12px; font: 12px/1.5 var(--cl-font); border: 1px solid var(--cl-line); border-radius: 8px; background: var(--cl-surface); color: var(--cl-ink-2); }
.cl-records .queue button.active { border-color: var(--section); background: var(--section-soft); color: var(--cl-ink); }
.cl-records .queue small { display: block; margin-top: 4px; color: var(--cl-muted); }

/* Table lookup: query, method comparison and a dark light-table for the source page. */
.cl-page-table-lookup .cl-page-heading { margin-bottom: 16px; }
.lookup-heading { display: flex; align-items: baseline; justify-content: space-between; }
.lookup-heading small { display: none; }
.lookup-toolbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--cl-line); border-radius: 10px; background: var(--cl-surface); }
.lookup-toolbar>label { display: flex; flex-direction: row; align-items: center; gap: 10px; margin-right: 4px; }
.lookup-toolbar #experiment { width: 260px; }
.lookup-toolbar #export { margin-left: auto; }
.lookup-context { display: flex; gap: 12px; align-items: baseline; margin: 0 0 14px; }
.lookup-context-label { color: var(--section); white-space: nowrap; font-size: 12px; font-weight: 600; }
.lookup-context #experimentNote { padding: 0; border: 0; margin: 0; background: none; font-size: 12px; color: var(--cl-muted); }
.lookup-grid { display: block; background: transparent; border: 0; border-radius: 0; }
.lookup-filters { display: grid; grid-template-columns: minmax(110px,.65fr) minmax(150px,.8fr) minmax(230px,1.6fr); gap: 12px 16px; align-items: end; padding: 14px 20px; background: var(--cl-surface); border: 1px solid var(--cl-line); margin: 0 0 14px; border-radius: 10px; }
.lookup-filters h2 { display: none; }
.lookup-filters label { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.lookup-filters :is(select,input) { width: 100%; min-width: 0; }
.lookup-filters #caseCount { margin: 8px 0 0; color: var(--cl-muted); font-size: 12px; }
.lookup-records { grid-column: 1/-1; margin: 0; }
.lookup-records>summary { white-space: nowrap; }
.lookup-list-tools { display: grid; grid-template-columns: 260px 1fr; gap: 8px 16px; margin-top: 10px; }
.lookup-list-count { color: var(--cl-muted); font-size: 12px; align-self: end; margin: 0 0 7px; }
.lookup-case-list { grid-column: 1/-1; display: grid; grid-template-columns: repeat(auto-fill,minmax(190px,1fr)); gap: 4px; overflow: auto; max-height: 180px; }
.lookup-case-list button { text-align: left; background: var(--cl-surface-2); border: 1px solid transparent; padding: 8px 11px; font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; }
.lookup-case-list button span { display: block; font: 11px/1.4 var(--cl-mono); color: var(--cl-muted); margin-top: 5px; }
.lookup-case-list button[aria-current=true] { border-color: var(--section); color: var(--cl-ink); background: var(--section-soft); }
.lookup-content { min-width: 0; }
.lookup-case { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 18px; align-items: start; }
.lookup-results { min-width: 0; padding: 20px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.lookup-results #queryTitle { font-size: 20px; letter-spacing: -.2px; margin: 0 0 4px; overflow-wrap: anywhere; }
.lookup-results #queryMeta { font: 12px/1.6 var(--cl-mono); margin: 4px 0 10px; color: var(--cl-muted); }
.lookup-results #caseDelta:empty { display: none; }
.cl-page-table-lookup #methods.detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; border: 0; margin: 14px 0 0; border-radius: 0; }
.cl-page-table-lookup #methods.three-methods { grid-template-columns: repeat(3,minmax(0,1fr)); }
.cl-page-table-lookup #methods>section { min-width: 0; border: 1px solid var(--cl-line); background: var(--cl-surface-2); border-radius: 8px; }
.cl-page-table-lookup #methods h3 { margin: 0; padding: 12px 16px 0; font-size: 13px; font-weight: 600; color: var(--cl-muted); background: transparent; border: 0; }
.cl-page-table-lookup #methods .field { padding: 12px 16px 16px; border: 0; }
.cl-page-table-lookup #methods .field>p { font-size: 12px; margin: 9px 0; }
.cl-page-table-lookup #methods .field>p:first-of-type { font-size: 22px; font-weight: 600; letter-spacing: -.4px; color: var(--cl-ink); margin-top: 12px; font-variant-numeric: tabular-nums; }
.cl-page-table-lookup #methods button { width: 100%; margin-top: 12px; padding: 6px; font-size: 12px; }
.cl-page-table-lookup #methods details { margin-top: 12px; }
.lookup-evidence { --lt-ink: #e8ebf7; --lt-muted: #a9b1d4; min-width: 0; position: sticky; top: 12px; align-self: stretch; max-height: calc(100dvh - 24px); overflow: auto; background: var(--cl-night-2); color: var(--lt-ink); border: 1px solid var(--cl-night-line); border-top: 3px solid var(--cl-brass-bright); border-radius: 10px; padding: 18px 20px; }
.lookup-evidence :is(h2,h3) { color: var(--lt-ink); }
.lookup-evidence a { color: var(--cl-brass-bright); }
.lookup-evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.lookup-evidence .lookup-evidence-head h2 { margin: 0; font-size: 14px; letter-spacing: .3px; }
.lookup-evidence .lookup-evidence-head h2::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; border: 2px solid var(--cl-brass-bright); border-radius: 50%; vertical-align: -1px; }
.cl-workspace .lookup-evidence button { min-height: 28px; font-size: 12px; padding: 3px 9px; background: transparent; color: var(--lt-ink); border-color: var(--cl-night-line); }
.cl-workspace .lookup-evidence button:hover:not(:disabled) { background: #ffffff12; color: #fff; border-color: var(--cl-brass-bright); }
.lookup-evidence :is(#source,#reference) { font-size: 12px; overflow-wrap: anywhere; color: var(--lt-ink); }
.lookup-evidence :is(.lookup-evidence-note,.muted,#previewNote) { font-size: 12px; color: var(--lt-muted); }
.lookup-evidence hr { border-top-color: var(--cl-night-line); }
.lookup-evidence #preview { margin: 14px 0 0; }
.lookup-evidence #previewTitle { font: 600 12px/1.5 var(--cl-mono); color: var(--cl-brass-bright); }
.lookup-evidence #closePreview { margin-top: 10px; }
.lookup-evidence pre { background: #0006; color: #cdd3ee; }
.lookup-evidence #caseRaw { max-height: 420px; }
.lookup-evidence details summary { color: var(--cl-brass-bright); }
.lookup-evidence #preview:not([hidden])~.lookup-evidence-note { display: none; }
.lookup-evidence .preview { border-color: #0000; box-shadow: 0 6px 22px #0007; }
.lookup-evidence.is-expanded { position: fixed; z-index: 40; top: 16px; right: 16px; bottom: 16px; width: min(860px,calc(100vw - 32px)); max-height: none; box-shadow: 0 18px 60px #0008; }
.lookup-evidence.is-expanded .lookup-evidence-head { position: sticky; top: -18px; padding: 14px 0; background: var(--cl-night-2); z-index: 2; border-bottom: 1px solid var(--cl-night-line); }
.lookup-audit { padding: 16px 20px; margin-top: 18px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.lookup-audit>summary { font-size: 12px; }
.lookup-audit .scroll { margin-top: 12px; }
.lookup-audit #transitionPanel { margin-top: 20px; }
.lookup-content>.footnote { padding: 0 4px; font-size: 12px; color: var(--cl-muted); }
.cl-page-table-lookup #selectionVerifyPanel { margin: 22px 0 0; padding: 16px 20px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-table-lookup #selectionVerifyPanel>summary { font-size: 14px; color: var(--cl-ink); }
.cl-page-table-lookup :is(#unitPanel,#rowPanel) { margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--cl-line); }
.cl-page-table-lookup :is(#unitPanel,#rowPanel) h2 { font-size: 14px; }
.cl-page-table-lookup #rowCandidates>section { border: 1px solid var(--cl-line); border-radius: 8px; }
.cl-page-table-lookup #rowCandidates h3 { background: var(--cl-surface-2); border-color: var(--cl-line); }

/* Margin bridge: period choice beside a night readout of the three margins. */
.margin-overview { display: grid; grid-template-columns: minmax(260px,.95fr) minmax(0,1.9fr); gap: 26px; align-items: center; padding: 0; background: transparent; border: 0; margin: 22px 0 26px; }
.margin-selection { padding: 12px 0; }
.margin-selection label { display: flex; flex-direction: column; gap: 12px; }
.margin-selection #company { width: 100%; min-width: 0; font-weight: 600; }
.margin-selection #periodNote { margin: 9px 0 0; font-size: 11px; line-height: 1.6; }
.cl-page-margin #headline { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 0; padding: 22px 12px; border: 1px solid var(--cl-night-line); border-top: 3px solid var(--cl-brass-bright); border-radius: 10px; background: var(--cl-night-2); box-shadow: none; }
.cl-page-margin #headline article { padding: 6px 16px; border: 0; background: none; }
.cl-page-margin #headline article+article { border-left: 1px solid var(--cl-night-line); }
.cl-page-margin #headline p { margin: 0 0 12px; color: var(--cl-night-muted); font-size: 12px; }
.cl-page-margin #headline .number { color: var(--cl-night-ink); font-size: clamp(21px,2.1vw,28px); font-weight: 600; letter-spacing: -.6px; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-page-margin #headline article:last-child .number { color: var(--cl-brass-bright); }
.cl-page-margin #content>.section { padding: 22px 24px; margin: 0 0 22px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-margin .margin-breakdown>.muted { margin-top: 0; }
.cl-page-margin .margin-breakdown .notice { margin-top: 18px; }
.cl-page-margin .evidence-grid>.section { padding: 22px 24px; margin-top: 0; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-margin .formula { font-family: var(--cl-mono); font-size: 13px; }
.cl-page-margin .claim-state { color: var(--cl-ink-2); }
.cl-page-margin .claims .scope-unavailable { color: var(--cl-warn); }
.cl-page-margin .blocked { color: var(--cl-bad); }
.cl-page-tasks #task { padding-top: 4px; }
.cl-page-documents #workspace>.columns>.panel:first-child { background: var(--cl-surface); }
.cl-page-cross-page #result { padding: 24px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-review .metric { background: var(--cl-surface); border: 0; border-radius: 10px; }
.cl-page-experiments .overview { gap: 16px; }
.cl-page-experiments .overview>article { padding: 22px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-experiments .overview>article h2 { color: var(--section); }
.cl-page-preparation .prep-grid { display: block; }
.cl-page-preparation .prep-grid>aside { padding: 18px; margin-bottom: 18px; background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }
.cl-page-preparation .prep-queue { display: flex; gap: 8px; max-height: 110px; overflow: auto; }
.cl-page-preparation .prep-queue button { flex: 0 0 250px; }
.cl-page-workbench .layout { grid-template-columns: minmax(300px,.7fr) minmax(0,1.7fr); }
.cl-page-workbench .layout>aside { background: var(--cl-surface); border: 1px solid var(--cl-line); border-radius: 10px; }

/* Module workspaces share controls, but arrange evidence around each task. */
.cl-workspace :is(.task-lobby,.research-analysis,.document-desk,.explanation-desk,.reference-catalog,.reference-observation,.transfer-diagnosis,.preparation-desk,.lab-output)>* { min-width:0; }
.cl-workspace :is(.toolbar,.module-toolbar) { padding:10px 18px; border-radius:10px; background:var(--cl-surface); border:1px solid var(--cl-line); }
.cl-workspace :is(.toolbar,.module-toolbar)>.cl-access { margin-left:auto; }

/* Research tasks: a brief, recent work and a full-width evidence ledger. */
.task-lobby { display:grid; grid-template-columns:minmax(260px,.85fr) minmax(0,1.5fr); gap:32px; align-items:center; margin-bottom:22px; }
.task-lobby .cl-page-heading { margin:0; }
.task-lobby .cl-records { display:block; margin:0; padding:14px 16px; border:1px solid var(--cl-line); border-radius:10px; background:var(--cl-surface); }
.task-lobby .cl-records>p { margin-bottom:9px; }
.cl-page-tasks .creation-body { background:var(--cl-surface); }
.cl-page-tasks #creation { padding:0; overflow:clip; }
.cl-page-tasks #creation>summary { padding:14px 22px; color:var(--cl-ink); background:var(--section-soft); }
.cl-page-tasks .task-brief { padding:20px 22px; }
.cl-page-tasks .task-brief .fields { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
.cl-page-tasks .task-head { padding:22px 24px; margin-top:20px; border-radius:10px; background:var(--cl-night-2); color:var(--cl-night-ink); border:1px solid var(--cl-night-line); border-top:3px solid var(--cl-brass-bright); }
.cl-page-tasks .task-head h2 { font-size:21px; margin-bottom:8px; color:var(--cl-night-ink); }
.cl-page-tasks .task-head :is(.meta,.small) { color:var(--cl-night-muted); }
.cl-page-tasks #materials { padding:18px; }
.cl-page-tasks .reason-list { color: var(--cl-ink-2); }

/* Quarter research: the time cutoff leads into a chart and its source inspector. */
.cl-page-research .controls { display:grid; grid-template-columns:1.2fr 1fr; align-items:center; gap:8px 22px; }
.cl-page-research .controls .fields { margin:0; }
.cl-page-research .presets { display:flex; gap:7px; align-items:center; flex-wrap:wrap; padding:0 0 0 20px; border:0; border-left:1px solid var(--cl-line); margin:0; }
.cl-page-research .controls #status { grid-column:1/-1; margin-bottom:0; }
.cl-page-research .controls .fields label { display:flex; flex-direction:row; align-items:center; gap:8px; }
.cl-page-research .workspace { margin-top:16px; background:transparent; }
.cl-page-research .snapshot-head { margin:18px 0 10px; }
.cl-page-research .snapshot-head p { margin:4px 0; }
.cl-page-research #snapshot-title { font-size:21px; }
.cl-page-research .quality { display:flex; gap:16px; flex-wrap:wrap; padding:0; margin:6px 0 18px; }
.cl-page-research .quality>* { background:transparent; border:0; padding:0; }
.cl-page-research .research-analysis { grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr); align-items:start; }
.cl-page-research .research-chart { padding:22px; }
.cl-page-research #chart { border:1px solid var(--cl-line); border-radius:8px; background:var(--cl-surface-2); padding:22px 18px 12px; }
.cl-page-research #evidence-panel { background:var(--cl-night-2); color:var(--cl-night-ink); border:1px solid var(--cl-night-line); border-top:3px solid var(--cl-brass-bright); }
.cl-page-research #evidence-panel :is(h2,h3,dt,dd,p) { color:var(--cl-night-ink); }
.cl-page-research #evidence-panel :is(.sub,.muted,.small) { color:var(--cl-night-muted); }
.cl-page-research #evidence-panel a { color:var(--cl-brass-bright); }
.cl-page-research #evidence-panel .evidence { background: transparent; color: var(--cl-night-ink); }
.cl-page-research .limits { padding:16px 22px; }

/* Document desk: paper surface, large source, narrow fact inspector. */
.cl-page-documents .document-toolbar { padding:12px 20px; }
.cl-page-documents .summary { display:flex; flex-wrap:wrap; gap:22px; padding:14px 0 0; margin:0; }
.cl-page-documents .summary>* { padding:0; background:transparent; border:0; box-shadow:none; }
.cl-page-documents .document-desk { grid-template-columns:minmax(0,1.55fr) minmax(350px,1fr); align-items:start; }
.cl-page-documents #workspace>.columns>.document-paper:first-child { background:var(--cl-night-2); border-color:var(--cl-night-line); padding:20px; }
.cl-page-documents .document-paper :is(h2,h3,.sub) { color:var(--cl-night-ink); }
.cl-page-documents .document-paper .viewer { border:0; box-shadow:0 8px 25px #0005; }
.cl-page-documents .document-inspector { padding:22px; }
.cl-page-documents .fact-selector { display:grid; grid-template-columns:1fr; gap:12px; padding:0 0 18px; border-bottom:1px solid var(--cl-line); }
.cl-page-documents .fact-selector label { display:flex; flex-direction:column; gap:5px; }
.cl-page-documents .fact-selector select { width:100%; }
.cl-page-documents .source { padding:16px 22px; }

/* Cross-page calculation: two amounts and a separate scope requirement. */
.cross-context { display:flex; gap:24px; justify-content:space-between; align-items:center; padding:12px 20px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; }
.cross-context .bar { margin:0; flex:1; }
.cross-context #taskMeta { max-width:48%; margin:0; }
.cl-page-cross-page .choices { display:grid; grid-template-columns:1fr 1fr .85fr; gap:14px; margin:22px 0 14px; }
.cl-page-cross-page .choices label { padding:14px 16px; border:1px solid var(--cl-line); border-radius:8px; background:var(--section-soft); }
.cl-page-cross-page .choices label:last-child { background:var(--cl-surface-2); }
.cl-page-cross-page .choices select { width:100%; margin-top:8px; }
.cl-page-cross-page .evidence-list { grid-template-columns:1fr 1fr .85fr; gap:14px; }
.cl-page-cross-page .evidence-list>article { border:1px solid var(--cl-line); border-radius:10px; padding:20px; background:var(--cl-surface); }
.cross-check { display:flex; justify-content:space-between; align-items:center; gap:20px; margin:22px 0 14px; padding:10px 20px; background:var(--section-soft); border-radius:10px; }
.cross-check p { font-size:12px; color:var(--cl-muted); }
.cl-page-cross-page #result { padding:24px 28px; border-left:4px solid var(--section); }
.cl-page-cross-page .formula { font:600 22px/1.5 var(--cl-font); color:var(--cl-ink); font-variant-numeric:tabular-nums; }

/* Credit review: portfolio queue, continuous metric strip and review priorities. */
.cl-page-review .tools { padding:18px 22px; background:var(--section-soft); border:0; border-radius:10px; }
.cl-page-review #metrics { gap:0; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; padding:8px 4px; margin-bottom:22px; }
.cl-page-review #metrics .metric { background:transparent; border-radius:0; border-right:1px solid var(--cl-line); }
.cl-page-review #metrics .metric:last-child { border:0; }
.cl-page-review .review-overview { grid-template-columns:minmax(0,1.45fr) minmax(300px,1fr); gap:22px; }
.cl-page-review .review-priorities { background:var(--section-soft); }
.cl-page-review .review-priorities h2 { color:var(--section); }
.cl-page-review #goReview { margin-top:18px; }
.cl-page-review .review-box { padding:20px; background:var(--cl-surface-2); border:0; border-radius:10px; }

/* Explanation supplements: editorial evidence column and a distinct handoff. */
.cl-page-explanation-reviews .explanation-context { background:var(--section-soft); padding:20px 24px; }
.cl-page-explanation-reviews .explanation-context .fields { grid-template-columns:1.3fr 1fr; }
.explanation-desk { display:grid; grid-template-columns:minmax(0,1.65fr) minmax(320px,1fr); gap:22px; align-items:start; margin-top:22px; }
.cl-page-explanation-reviews .explanation-handoff { border-top:3px solid var(--section); }
.cl-page-explanation-reviews .explanation-handoff .actions { flex-wrap:wrap; }
.cl-page-explanation-reviews .explanation-claims>h2 { font-size:19px; }

/* Manual observations: source and blank form share a reading desk. */
.reference-catalog { display:grid; grid-template-columns:minmax(0,1.4fr) minmax(280px,1fr); gap:18px; align-items:start; }
.cl-page-reference-review #catalogPanel { background:var(--section-soft); }
.cl-page-reference-review #detail { margin-top:22px; }
.reference-observation { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(340px,1fr); gap:24px; align-items:start; }
.reference-page { min-width:0; padding-top:12px; }
.reference-observation:has(#preview[hidden]) { grid-template-columns:1fr; }
.reference-observation:has(#entry[hidden]) { grid-template-columns:1fr; }
.reference-observation:has(#preview[hidden]) .reference-page { display:none; }
.cl-page-reference-review #entry { padding:20px; background:var(--cl-surface-2); border-radius:10px; border:0; }
.cl-page-reference-review .form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.cl-page-reference-review .form-grid label { min-width:0; }
.cl-page-reference-review .reference-decision { padding:20px; margin-top:22px; background:var(--cl-surface-2); border:0; border-radius:10px; }

/* Experiment results: paired summaries followed by method and stress sections. */
.cl-page-experiments .overview { grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:start; margin:22px 0; }
.cl-page-experiments .overview>.experiment-methods { background:var(--section-soft); border-color:transparent; }
.cl-page-experiments .overview>.experiment-degradation { margin-top:24px; }
.cl-page-experiments .experiment-facts { padding:22px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; margin-bottom:22px; }
.cl-page-experiments .experiment-facts>.bar { background:var(--cl-surface-2); padding:12px 16px; border-radius:8px; }
.cl-page-experiments .detail { gap:16px; border:0; }
.cl-page-experiments .detail>section { padding:16px; border:1px solid var(--cl-line); border-radius:8px; background:var(--cl-surface-2); }
.cl-page-experiments .detail h3 { background:transparent; border:0; }
.cl-page-experiments .experiment-stress { padding:22px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; }
.cl-page-experiments .source-section { border-color: var(--cl-line); }

/* Issuer diagnostics: shared source context, date issues and a compact baseline. */
.transfer-diagnosis { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(300px,1fr); gap:16px 22px; margin:20px 0; }
.transfer-source { grid-column:1/-1; }
.cl-page-transfer .transfer-dates { padding:22px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; margin:0; }
.transfer-summary { padding:22px; background:var(--section-soft); border-radius:10px; align-self:start; }
.cl-page-transfer #company { font-size:21px; margin-bottom:6px; }
.cl-page-transfer #factList { padding:22px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; margin-top:22px; }
.cl-page-transfer #detail { padding:24px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; margin-top:22px; }
.cl-page-transfer #detail>.detail { gap:16px; border:0; }
.cl-page-transfer #detail>.detail>section { padding:18px; border:0; border-radius:8px; background:var(--cl-surface-2); }
.cl-page-transfer #inputPanel { padding:14px 18px; border:1px solid var(--cl-line); border-radius:8px; }

/* Preparation: horizontal job history, input beside the selected attempt. */
.preparation-desk { display:grid; grid-template-columns:minmax(320px,.85fr) minmax(0,1.6fr); gap:22px; align-items:start; }
.cl-page-preparation .preparation-input { padding:22px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; }
.cl-page-preparation .preparation-input .bar { gap:8px; }
.cl-page-preparation #result { padding:24px; background:var(--cl-surface); border:1px solid var(--cl-line); border-radius:10px; }
.cl-page-preparation #result h2 { font-size:19px; overflow-wrap:anywhere; }
.cl-page-preparation #editor { padding:12px 14px; background:var(--cl-surface-2); border:0; border-radius:8px; }
.cl-page-preparation #editor textarea { min-height:340px; }
.cl-page-preparation .attempts { padding:0 0 14px; border-bottom:1px solid var(--cl-line); }
.cl-page-preparation .preparation-desk:not(:has(#result:not([hidden]))) { grid-template-columns:1fr; max-width:950px; }

/* FinQA: a horizontal query composer, then evidence and a calculation bench. */
.cl-page-workbench .layout { display:block; }
.cl-page-workbench .lab-query { display:grid; grid-template-columns:1fr 1.5fr .8fr; gap:18px 24px; background:var(--section-soft); padding:22px; }
.lab-query>div { min-width:0; }
.lab-query .lab-run { grid-column:1/-1; display:flex; align-items:center; gap:22px; flex-wrap:wrap; border-top:1px solid var(--cl-line); padding-top:14px; }
.lab-query .lab-run .notice { background:none; margin:0; padding:0; flex:1; min-width:220px; border:0; }
.cl-page-workbench .lab-query :is(input,select) { margin-bottom:8px; width:100%; }
.cl-page-workbench .lab-query textarea { min-height:144px; margin:0; }
.cl-page-workbench .lab-output { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(290px,1fr); gap:22px; margin-top:22px; align-items:start; }
.cl-page-workbench .lab-output .calc { margin:0; background:var(--cl-surface-2); }
.cl-page-workbench .calc-fields { grid-template-columns:1fr; gap:12px; }
.cl-page-workbench #calculate { width:100%; }

@media (min-width:1600px) {
  .lookup-case { grid-template-columns: minmax(0,1fr) 430px; }
}
@media (max-width:1100px) {
  .cl-workspace .cl-masthead { gap: 18px; padding: 0 20px; }
  .cl-masthead-meta .cl-meta-text { display: none; }
  .lookup-case { grid-template-columns: minmax(0,1fr) 320px; }
  .lookup-filters { grid-template-columns: minmax(100px,.65fr) minmax(140px,.85fr) minmax(190px,1.5fr); }
  .cl-page-table-lookup #methods.three-methods { grid-template-columns: minmax(0,1fr); }
  .margin-overview { grid-template-columns: 1fr; gap: 22px; }
  .cl-page-workbench .layout { grid-template-columns: minmax(0,1fr); }
  .task-lobby { grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr); gap:22px; }
  .cl-page-research .controls { grid-template-columns:1fr; }
  .cl-page-research .presets { border:0; padding:0; }
  .cl-page-research .research-analysis { grid-template-columns:minmax(0,1.3fr) minmax(280px,1fr); }
  .cl-page-documents .document-desk { grid-template-columns:minmax(0,1.2fr) minmax(300px,1fr); }
  .preparation-desk, .explanation-desk, .reference-observation { grid-template-columns:minmax(0,1fr); }
  .cl-page-workbench .lab-query { grid-template-columns:1fr 1.3fr; }
  .lab-query .lab-cutoff { grid-column:1/-1; display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
  .cl-page-workbench .lab-cutoff input { width:auto; margin:0; }
  .lab-cutoff .section-note { flex:1; min-width:250px; }
}
@media (max-width:760px) {
  .cl-workspace .cl-masthead { flex-wrap: wrap; gap: 0 12px; padding: 12px 16px 0; min-height: 0; }
  .cl-workspace .cl-wordmark { font-size: 19px; min-height: 36px; }
  .cl-masthead-meta { gap: 10px; }
  .cl-masthead-meta > a { display: none; }
  .cl-workspace .cl-primary-nav { order: 3; width: calc(100% + 32px); margin: 4px -16px 0; padding: 0 8px 4px; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .cl-primary-nav a { min-height: 44px; padding: 0 10px; font-size: 13px; gap: 6px; }
  .cl-primary-nav a.is-current::after { left: 10px; right: 10px; bottom: 6px; }
  .cl-workspace .cl-section-nav { padding: 0 8px; min-height: 44px; }
  .cl-section-nav::before { display: none; }
  .cl-section-nav a { font-size: 12px; padding: 0 10px; }
  .cl-session { padding: 10px 16px 0; }
  .cl-main>main, .cl-main>main.content { padding: 20px 16px 32px; }
  .cl-workspace h1 { font-size: 22px; }
  .cl-page-heading .heading, .cl-command-heading { flex-wrap: wrap; gap: 14px; }
  .cl-page-actions { flex-wrap: wrap; }
  .cl-workspace :is(.columns,.cols,.overview) { grid-template-columns: minmax(0,1fr); }
  .cl-records { flex-wrap: wrap; gap: 10px; }
  .cl-records .queue { flex-basis: 100%; }
  .lookup-toolbar { padding: 12px; gap: 8px; flex-wrap: wrap; }
  .lookup-toolbar>label { width: 100%; margin: 0 0 4px; }
  .lookup-toolbar #experiment { width: auto; flex: 1; min-width: 0; }
  .lookup-toolbar #export { margin-left: 0; }
  .lookup-toolbar .cl-access { margin-left: auto; }
  .lookup-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); padding: 14px; gap: 12px; }
  .lookup-filters .case-choice { grid-column: 1/-1; }
  .lookup-list-tools, .lookup-case-list, .lookup-case { grid-template-columns: minmax(0,1fr); }
  .lookup-results { padding: 16px 14px; }
  .lookup-results #queryTitle { font-size: 17px; }
  .lookup-evidence { position: static; max-height: none; }
  .cl-page-table-lookup #methods.detail { grid-template-columns: minmax(0,1fr); }
  .lookup-context { gap: 10px; flex-wrap: wrap; }
  .cl-workspace .panel { padding: 16px; }
  .cl-workspace .tabs { gap: 18px; }
  .cl-workspace :is(th,td) { padding: 8px 10px; }
  .margin-overview { padding: 0; gap: 16px; }
  .cl-page-margin #headline { grid-template-columns: 1fr; gap: 0; padding: 6px 18px; }
  .cl-page-margin #headline article { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border: 0; border-bottom: 1px solid var(--cl-night-line); }
  .cl-page-margin #headline article+article { border-left: 0; }
  .cl-page-margin #headline p { margin: 0; }
  .cl-page-margin #headline article:last-child { border-bottom: 0; }
  .cl-page-margin #headline .number { font-size: 22px; }
  .cl-page-margin #content>.section { padding: 16px; }
  .task-lobby, .reference-catalog, .transfer-diagnosis, .cl-page-research .research-analysis, .cl-page-documents .document-desk, .cl-page-review .review-overview, .cl-page-experiments .overview, .cl-page-workbench .lab-query, .cl-page-workbench .lab-output { grid-template-columns:minmax(0,1fr); }
  .task-lobby { gap:18px; }
  .cl-page-tasks .task-brief .fields, .cl-page-explanation-reviews .explanation-context .fields { grid-template-columns:1fr; }
  .cl-page-tasks .task-head { padding:18px; }
  .cl-page-research .controls .fields label { flex-direction:column; align-items:stretch; }
  .cross-context, .cross-check { display:block; padding:14px 16px; }
  .cross-context #taskMeta { max-width:none; margin-top:12px; }
  .cl-page-cross-page .choices, .cl-page-cross-page .evidence-list { grid-template-columns:1fr; }
  .cl-page-cross-page .choices { gap:8px; }
  .cl-page-cross-page .choices label { padding:10px 14px; }
  .cl-page-cross-page .formula { font-size:19px; overflow-wrap:anywhere; }
  .cl-page-review #metrics .metric { border:0; }
  .cl-page-experiments .overview>.experiment-degradation { margin:0; }
  .cl-page-experiments .detail { grid-template-columns:1fr; }
  .cl-page-reference-review .form-grid { grid-template-columns:1fr; }
  .cl-page-workbench .lab-run { display:block; }
  .lab-query .lab-run .notice { margin-top:12px; min-width:0; }
  .cl-page-workbench .lab-cutoff { display:block; }
  .cl-page-workbench .lab-cutoff input { width:100%; }
  .cl-page-workbench .lab-query textarea { min-height:110px; }
  .cl-page-documents #workspace>.columns>.document-paper:first-child, .cl-page-documents .document-inspector, .cl-page-experiments .experiment-facts, .cl-page-experiments .experiment-stress, .cl-page-transfer #factList, .cl-page-transfer #detail, .cl-page-preparation .preparation-input, .cl-page-preparation #result { padding:16px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
