:root {
  color-scheme: light;
  --navy-950: #0a1424;
  --navy-900: #101d31;
  --navy-800: #182940;
  --blue-700: #175cd3;
  --blue-600: #2472e5;
  --blue-100: #e9f1ff;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f6;
  --text: #17202e;
  --text-2: #526174;
  --text-3: #758296;
  --line: #dfe5ec;
  --line-strong: #cbd4df;
  --green: #14805e;
  --green-bg: #e7f6f0;
  --amber: #9a6205;
  --amber-bg: #fff4da;
  --red: #b42318;
  --red-bg: #fff0ee;
  --purple: #6941c6;
  --purple-bg: #f2edff;
  --shadow: 0 12px 34px rgba(17, 32, 54, .08);
  --radius: 12px;
  --sidebar: 252px;
  font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c1420;
  --surface: #121e2d;
  --surface-2: #172536;
  --surface-3: #1d2d40;
  --text: #edf2f7;
  --text-2: #afbdcc;
  --text-3: #8999ac;
  --line: #293b4f;
  --line-strong: #3b4f65;
  --blue-100: #172f50;
  --blue-700: #72a7ff;
  --blue-600: #8bb6ff;
  --green: #6fd6b1;
  --green-bg: #13372f;
  --amber: #f0bd64;
  --amber-bg: #3a2e18;
  --red: #ff9c93;
  --red-bg: #402421;
  --purple: #c4adff;
  --purple-bg: #2d2746;
  --shadow: 0 14px 40px rgba(0, 0, 0, .24);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--blue-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(36, 114, 229, .35); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { font-family: Bahnschrift, "Segoe UI Variable", sans-serif; letter-spacing: -.02em; }
h1 { font-size: 23px; line-height: 1.15; }
h2 { font-size: 20px; line-height: 1.25; }
h3 { font-size: 16px; line-height: 1.35; }
svg { display: block; flex: 0 0 auto; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 100; left: 12px; top: -60px; background: var(--surface); padding: 12px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 30; display: flex; flex-direction: column; padding: 22px 14px 16px; color: #dbe5f2; background: var(--navy-950); border-right: 1px solid #22334a; }
.brand { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 8px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #4d6682; border-radius: 10px; background: #172b45; color: #fff; font: 700 22px Bahnschrift, sans-serif; }
.brand strong { display: block; color: #fff; font: 700 20px Bahnschrift, sans-serif; letter-spacing: .12em; }
.brand small, .system-mini small { display: block; margin-top: 1px; color: #8fa3ba; font-size: 11px; }
.prototype-label { display: flex; align-items: center; gap: 8px; margin: 20px 8px 16px; padding: 8px 10px; border: 1px solid #30445e; border-radius: 7px; background: #132239; color: #b9c9dc; font-size: 11px; font-weight: 600; letter-spacing: .025em; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #f3b24b; }
.nav-list { display: grid; gap: 3px; }
.nav-list a { display: flex; align-items: center; gap: 11px; min-height: 44px; padding: 9px 11px; border-radius: 8px; color: #afbdd0; font-weight: 500; }
.nav-list a:hover { background: var(--navy-800); color: #fff; text-decoration: none; }
.nav-list a.active { background: #1b3454; color: #fff; box-shadow: inset 3px 0 #71a7ff; }
.nav-list a svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; min-width: 23px; padding: 1px 6px; border-radius: 10px; background: #243a55; color: #c3d1e2; font-size: 11px; text-align: center; }
.nav-separator { margin: 17px 11px 6px; color: #657c97; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #24364c; }
.sidebar-foot p { margin-top: 12px; color: #6f849c; font-size: 11px; }
.system-mini { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; }
.system-mini strong { color: #c6d3e1; font-weight: 600; }
.status-dot { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--text-3); }
.status-dot.success { background: #43c59e; box-shadow: 0 0 0 3px rgba(67, 197, 158, .1); }
.status-dot.warning { background: #dc9a2d; }
.sidebar-close, .sidebar-scrim { display: none; }
.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; min-height: 80px; padding: 15px 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(12px); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 14px; }
.eyebrow { margin-bottom: 3px; color: var(--text-3); font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.snapshot-badge { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 7px; color: var(--text-2); background: var(--surface-2); font-size: 11px; }
.snapshot-badge .status-dot { margin: 0; }
.icon-button { display: inline-grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text-2); }
.icon-button:hover { color: var(--text); background: var(--surface-3); }
.icon-button svg { width: 19px; height: 19px; }
.sidebar-close { display: none; }
.menu-button { display: none; }
.avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy-900); color: white; font-weight: 700; }
#content { max-width: 1600px; margin: 0 auto; padding: 28px 32px 18px; }
#app { min-height: calc(100vh - 180px); }
.app-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 32px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 11px; }
.page-intro { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 22px; }
.page-intro p { max-width: 760px; margin-top: 6px; color: var(--text-2); }
.page-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; background: var(--blue-700); color: #fff; font-weight: 600; line-height: 1.25; }
.button:hover { background: var(--blue-600); text-decoration: none; }
.button svg { width: 17px; height: 17px; }
.button.secondary { border-color: var(--line-strong); background: var(--surface); color: var(--text); }
.button.secondary:hover { background: var(--surface-3); }
.button.ghost { border-color: transparent; background: transparent; color: var(--blue-700); }
.button.danger { border-color: color-mix(in srgb, var(--red) 30%, var(--line)); background: var(--red-bg); color: var(--red); }
.button.small { min-height: 44px; padding: 7px 11px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .5; }
.notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid #d7e4f6; border-left: 3px solid var(--blue-600); border-radius: 9px; background: var(--blue-100); color: var(--text-2); }
.notice svg { width: 19px; height: 19px; margin-top: 1px; color: var(--blue-700); }
.notice strong { display: block; margin-bottom: 2px; color: var(--text); }
.notice.warning { border-color: color-mix(in srgb, var(--amber) 25%, var(--line)); border-left-color: var(--amber); background: var(--amber-bg); }
.notice.danger { border-color: color-mix(in srgb, var(--red) 25%, var(--line)); border-left-color: var(--red); background: var(--red-bg); }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { position: relative; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-card .stat-icon { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 15px; border-radius: 8px; background: var(--blue-100); color: var(--blue-700); }
.stat-card .stat-icon svg { width: 18px; height: 18px; }
.stat-value { display: block; font: 700 30px/1 Bahnschrift, sans-serif; letter-spacing: -.03em; }
.stat-label { display: block; margin-top: 7px; color: var(--text-2); font-size: 12px; }
.stat-note { display: block; margin-top: 8px; color: var(--text-3); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr); gap: 18px; }
.stack { display: grid; gap: 18px; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 62px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card-head p { margin-top: 3px; color: var(--text-2); font-size: 12px; }
.card-body { padding: 18px; }
.card-body.flush { padding: 0; }
.card-link { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: 12px; font-weight: 600; }
.card-link svg { width: 15px; height: 15px; }
.run-list, .activity-list, .stage-list, .compact-list { list-style: none; margin: 0; padding: 0; }
.run-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.run-item:last-child, .activity-list li:last-child, .stage-item:last-child { border-bottom: 0; }
.run-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.run-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small-text { font-size: 12px; }
.mono { font-family: Consolas, monospace; font-size: .92em; overflow-wrap: anywhere; }
.time { color: var(--text-3); font-size: 11px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 10px; font-weight: 700; letter-spacing: .02em; white-space: nowrap; }
.badge.success { background: var(--green-bg); color: var(--green); }
.badge.warning { background: var(--amber-bg); color: var(--amber); }
.badge.danger { background: var(--red-bg); color: var(--red); }
.badge.info { background: var(--blue-100); color: var(--blue-700); }
.badge.purple { background: var(--purple-bg); color: var(--purple); }
.activity-list li { display: flex; gap: 11px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity-list li:first-child { padding-top: 0; }
.activity-list li:last-child { padding-bottom: 0; }
.activity-marker { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 8px; background: var(--surface-3); color: var(--text-2); }
.activity-marker svg { width: 15px; height: 15px; }
.health-list { display: grid; gap: 14px; }
.health-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.health-row > span:first-child { display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.health-row .status-dot { margin: 0; }
.mode-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.mode-tab { display: flex; align-items: flex-start; gap: 12px; min-height: 76px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); text-align: left; }
.mode-tab:hover { border-color: var(--blue-600); }
.mode-tab.active { border-color: var(--blue-600); background: var(--blue-100); box-shadow: 0 0 0 1px var(--blue-600); }
.mode-letter { display: grid; place-items: center; flex: 0 0 auto; width: 30px; height: 30px; border-radius: 7px; background: var(--surface-3); color: var(--text-2); font: 700 14px Bahnschrift, sans-serif; }
.mode-tab.active .mode-letter { background: var(--blue-700); color: #fff; }
.mode-tab strong { display: block; margin-bottom: 3px; }
.mode-tab small { display: block; color: var(--text-2); line-height: 1.35; }
.research-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: var(--text); font-size: 12px; font-weight: 600; }
.field label span { color: var(--red); }
.field input, .field select, .field textarea, .filter-control { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); }
.field textarea { min-height: 92px; resize: vertical; }
.field small { color: var(--text-3); font-size: 11px; }
.checkbox-group { display: grid; gap: 8px; }
.checkbox { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--blue-700); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-actions p { margin-right: auto; color: var(--text-3); font-size: 11px; }
.pipeline-preview { list-style: none; margin: 0; padding: 0; counter-reset: stages; }
.pipeline-preview li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; counter-increment: stages; }
.pipeline-preview li::before { content: counter(stages); position: relative; z-index: 1; display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--blue-100); color: var(--blue-700); font-size: 11px; font-weight: 700; }
.pipeline-preview li::after { content: ""; position: absolute; left: 12px; top: 27px; bottom: 0; width: 1px; background: var(--line); }
.pipeline-preview li:last-child { padding-bottom: 0; }
.pipeline-preview li:last-child::after { display: none; }
.pipeline-preview strong { display: block; font-size: 12px; }
.pipeline-preview small { color: var(--text-3); font-size: 11px; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.filters .field { min-width: 150px; flex: 1; }
.filters .field.search-field { flex: 2; min-width: 220px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); color: var(--text-3); font-size: 10px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
.cell-title { display: block; max-width: 360px; color: var(--text); font-weight: 600; }
.cell-subtitle { display: block; max-width: 360px; margin-top: 3px; color: var(--text-3); font-size: 11px; overflow-wrap: anywhere; }
.score { display: flex; align-items: center; gap: 8px; min-width: 100px; }
.score-bar { width: 46px; height: 5px; overflow: hidden; border-radius: 4px; background: var(--surface-3); }
.score-bar span { display: block; height: 100%; border-radius: inherit; background: var(--blue-600); }
.empty-state { display: grid; place-items: center; min-height: 220px; padding: 30px; text-align: center; }
.empty-state .empty-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 13px; border-radius: 12px; background: var(--surface-3); color: var(--text-3); }
.empty-state svg { width: 23px; height: 23px; }
.empty-state h3 { margin-bottom: 6px; }
.empty-state p { max-width: 480px; color: var(--text-2); }
.results-meta { margin: 12px 2px 0; color: var(--text-3); font-size: 11px; }
.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.article-card { display: flex; flex-direction: column; min-height: 235px; padding: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.article-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.article-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.article-card h3 { margin: 15px 0 7px; font-size: 17px; }
.article-card .article-id { color: var(--text-3); font-size: 10px; overflow-wrap: anywhere; }
.article-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 16px; }
.progress-track { height: 6px; margin-top: 16px; overflow: hidden; border-radius: 5px; background: var(--surface-3); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: var(--blue-600); }
.progress-label { display: flex; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--text-3); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .65fr); gap: 18px; }
.stage-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.stage-number { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 50%; color: var(--text-3); font-weight: 700; }
.stage-item.done .stage-number { border-color: transparent; background: var(--green-bg); color: var(--green); }
.stage-item.error .stage-number { border-color: transparent; background: var(--red-bg); color: var(--red); }
.stage-item.current .stage-number { border-color: transparent; background: var(--blue-100); color: var(--blue-700); }
.stage-item h3 { margin-bottom: 3px; }
.stage-item p { color: var(--text-2); font-size: 12px; }
.stage-meta { margin-top: 6px; color: var(--text-3); font-size: 11px; }
.stage-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.detail-list { display: grid; gap: 0; margin: 0; }
.detail-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: 0; }
.detail-row dt { color: var(--text-3); font-size: 11px; }
.detail-row dd { margin: 0; overflow-wrap: anywhere; }
.subtabs { display: flex; gap: 3px; margin-bottom: 18px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.subtab { flex: 1; min-height: 44px; padding: 8px 13px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); white-space: nowrap; }
.subtab.active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.writer-layout { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; }
.readiness-list { display: grid; gap: 11px; }
.readiness-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.readiness-row:last-child { padding-bottom: 0; border: 0; }
.document-preview { min-height: 250px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); }
.document-preview h3 { margin-bottom: 14px; }
.document-preview p { margin-top: 12px; color: var(--text-2); }
.document-preview ul { margin: 10px 0 0; padding-left: 19px; color: var(--text-2); }
.report-list { display: grid; gap: 10px; }
.report-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; align-items: center; gap: 13px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.report-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--blue-100); color: var(--blue-700); }
.report-icon svg { width: 18px; height: 18px; }
.report-row h3 { font-size: 14px; }
.report-row p { margin-top: 3px; color: var(--text-3); font-size: 11px; }
.period-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.period-control { display: flex; gap: 4px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.period-control button { min-height: 44px; padding: 7px 12px; border: 0; border-radius: 6px; background: transparent; color: var(--text-2); white-space: nowrap; }
.period-control button.active { background: var(--blue-100); color: var(--blue-700); font-weight: 600; }
.source-label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.source-label::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--text-3); }
.metric-empty { color: var(--text-3); font-size: 11px; }
.chart-empty { position: relative; display: grid; place-items: center; min-height: 260px; overflow: hidden; background: var(--surface-2); }
.chart-empty::after { content: ""; position: absolute; inset: auto 0 0; height: 1px; background: var(--line); }
.chart-empty > div { position: relative; z-index: 1; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.chart-empty p { margin-top: 4px; color: var(--text-3); font-size: 11px; }
.integration-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.integration { padding: 15px; border: 1px solid var(--line); border-radius: 9px; }
.integration-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.integration p { min-height: 38px; color: var(--text-2); font-size: 12px; }
.integration .button { margin-top: 12px; }
.dialog { width: min(620px, calc(100vw - 32px)); max-height: min(84vh, 800px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0, 0, 0, .3); }
.dialog::backdrop { background: rgba(5, 13, 24, .65); backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; gap: 20px; padding: 20px 22px 15px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-body { padding: 20px 22px; }
.dialog-body > p + p { margin-top: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; padding: 15px 22px 20px; border-top: 1px solid var(--line); }
.dialog-actions:empty { display: none; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; width: min(390px, calc(100vw - 32px)); pointer-events: none; }
.toast { padding: 14px 16px; border: 1px solid #355273; border-radius: 10px; background: var(--navy-900); color: #fff; box-shadow: var(--shadow); font-size: 12px; }
.noscript { position: fixed; inset: auto 16px 16px calc(var(--sidebar) + 16px); z-index: 100; padding: 16px; background: var(--red-bg); color: var(--red); border: 1px solid var(--red); }
@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  body.menu-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: grid; margin-left: auto; border-color: #30445e; background: #132239; color: #dbe5f2; }
  .sidebar-scrim { position: fixed; inset: 0; z-index: 25; width: 100%; height: 100%; border: 0; background: rgba(5, 13, 24, .6); }
  body.menu-open .sidebar-scrim { display: block; }
  .workspace { margin-left: 0; }
  .menu-button { display: grid; }
  .research-layout, .writer-layout { grid-template-columns: 1fr; }
  .topbar { padding: 14px 20px; }
  #content { padding: 24px 20px 16px; }
  .noscript { left: 16px; }
}
@media (max-width: 620px) {
  body { font-size: 13px; }
  h1 { font-size: 20px; }
  h2 { font-size: 18px; }
  .topbar { min-height: 70px; padding: 11px 14px; }
  .topbar-left, .topbar-actions { gap: 8px; }
  .snapshot-badge { display: none; }
  .avatar { width: 34px; height: 34px; }
  #content { padding: 18px 14px 14px; }
  .page-intro { display: grid; gap: 14px; margin-bottom: 17px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-icon { margin-bottom: 12px; }
  .stat-value { font-size: 26px; }
  .stat-label { font-size: 11px; }
  .stat-note { display: none; }
  .mode-tabs { grid-template-columns: 1fr; gap: 8px; }
  .mode-tab { min-height: 64px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions p { margin: 0; }
  .filters { display: grid; grid-template-columns: 1fr; }
  .filters .field, .filters .field.search-field { min-width: 0; }
  .article-grid, .integration-grid { grid-template-columns: 1fr; }
  .article-card { min-height: 220px; }
  .card-head { align-items: flex-start; padding: 14px; }
  .card-body { padding: 14px; }
  .run-item { padding: 13px 14px; }
  .run-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .run-title strong { white-space: normal; overflow-wrap: anywhere; }
  .stage-item { grid-template-columns: 30px minmax(0, 1fr); padding: 15px 14px; }
  .stage-actions { grid-column: 2; justify-content: flex-start; }
  .report-row { grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; padding: 13px; }
  .report-row > .badge { display: none; }
  .report-row .button { width: 44px; padding: 0; font-size: 0; }
  .period-bar { align-items: stretch; flex-direction: column; }
  .period-control { width: 100%; }
  .period-control button { flex: 1; padding: 7px 9px; }
  .app-footer { flex-direction: column; gap: 5px; }
  .dialog-head, .dialog-body { padding-left: 17px; padding-right: 17px; }
  .dialog-actions { padding: 14px 17px 17px; }
  .dialog-actions .button { flex: 1; }
  .detail-row { grid-template-columns: 90px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
