:root {
  --navy: #17365d;
  --blue: #2f75b5;
  --teal: #008c95;
  --green: #5b8c3a;
  --orange: #c96824;
  --red: #b42318;
  --ink: #1f2937;
  --muted: #64748b;
  --line: #d7dee8;
  --surface: #ffffff;
  --subtle: #f5f7fa;
  --shadow: 0 8px 24px rgba(23, 54, 93, .08);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #eef2f6; font: 14px/1.55 "Microsoft YaHei", "Segoe UI", sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 28px; color: #fff; background: var(--navy); }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; color: var(--navy); background: #f4b183; font-size: 20px; font-weight: 800; border-radius: 6px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.25; }
.brand-copy strong { font-size: 17px; letter-spacing: .02em; }
.brand-copy span { color: #bdcde0; font-size: 11px; }
.top-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.save-state { color: #c6d6e9; font-size: 12px; }
.ghost-btn, .primary-btn, .secondary-btn { border: 1px solid transparent; border-radius: 5px; padding: 8px 13px; font-weight: 600; }
.ghost-btn { color: #dce7f3; background: transparent; border-color: #557492; }
.primary-btn { color: #fff; background: var(--teal); }
.primary-btn:disabled { cursor: not-allowed; opacity: .45; }
.secondary-btn { color: var(--navy); background: #fff; border-color: #9ab1c9; }
.shell { width: min(1480px, calc(100% - 40px)); margin: 0 auto; padding: 22px 0 44px; }
.hero-band { display: flex; justify-content: space-between; gap: 24px; padding: 22px 26px; color: #fff; background: #274d71; border-left: 6px solid #f4b183; border-radius: 7px; box-shadow: var(--shadow); }
.eyebrow { margin: 0 0 6px; color: #bcd0e5; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 0; font-size: 32px; line-height: 1.25; }
.hero-subtitle { max-width: 820px; margin: 8px 0 0; color: #d9e5f1; }
.target-switch { display: flex; align-items: center; align-self: center; flex-wrap: wrap; gap: 7px; min-width: 214px; }
.target-switch span { width: 100%; color: #bcd0e5; font-size: 12px; }
.target-switch button { padding: 9px 14px; color: #fff; background: transparent; border: 1px solid #6e8baa; border-radius: 5px; }
.target-switch button.active { color: var(--navy); background: #f4b183; border-color: #f4b183; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 2px 10px rgba(15, 23, 42, .04); }
.tab { padding: 10px 15px; color: var(--muted); background: transparent; border: 0; border-radius: 4px; font-weight: 600; }
.tab:hover { color: var(--navy); background: #e8f1f8; }
.tab.active { color: var(--navy); background: #f4b183; }
.view-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 22px 0 14px; }
.view-header h2 { margin: 0; color: var(--navy); font-size: 22px; }
.view-header p { margin: 4px 0 0; color: var(--muted); }
.grid { display: grid; gap: 14px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.panel h3 { margin: 0 0 12px; color: var(--navy); font-size: 16px; }
.metric { min-height: 108px; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { margin-top: 8px; color: var(--navy); font-size: 29px; font-weight: 800; line-height: 1.15; }
.metric-value.good { color: var(--green); }
.metric-value.warn { color: var(--orange); }
.metric-value.bad { color: var(--red); }
.metric-note { margin-top: 5px; color: var(--muted); font-size: 12px; }
.progress { height: 8px; overflow: hidden; background: #e6edf4; border-radius: 99px; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.gate-list { display: grid; gap: 8px; }
.gate-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 9px; align-items: start; padding: 10px 11px; background: var(--subtle); border-left: 3px solid var(--line); }
.gate-item.pass { border-left-color: var(--green); }
.gate-item.fail { border-left-color: var(--red); }
.gate-icon { font-weight: 800; }
.gate-item.pass .gate-icon { color: var(--green); }
.gate-item.fail .gate-icon { color: var(--red); }
.gate-item small { display: block; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 99px; color: #475569; background: #e9eef4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-pill.good { color: #286024; background: #dff0d6; }
.status-pill.warn { color: #8a4b10; background: #fff0d9; }
.status-pill.bad { color: #8d1b14; background: #f9d9d6; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-actions button { padding: 9px 12px; color: var(--navy); background: #edf4f9; border: 1px solid #c9d9e6; border-radius: 5px; font-weight: 600; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td { padding: 10px 11px; border-bottom: 1px solid #e5eaf0; text-align: left; vertical-align: top; }
th { color: var(--navy); background: #eaf1f7; font-size: 12px; white-space: nowrap; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
.task-table { width: 100%; min-width: 1000px; max-width: none; table-layout: fixed; }
.task-table .task-day-col { width: 5%; }
.task-table .task-title-col { width: 14%; }
.task-table .task-focus-col { width: 24%; }
.task-table .task-output-col { width: 18%; }
.task-table .task-status-col { width: 11%; }
.task-table .task-owner-col { width: 14%; }
.task-table .task-date-col { width: 14%; }
.task-table td { overflow-wrap: anywhere; word-break: break-word; }
.task-table td:first-child { white-space: nowrap; }
.task-table td:nth-child(5), .task-table td:nth-child(6), .task-table td:nth-child(7) { vertical-align: middle; }
.task-table .select, .task-table .field { min-height: 36px; }
.compact-table th, .compact-table td { padding: 10px 10px; }
.scene-table { width: 100%; min-width: 1584px; table-layout: fixed; }
.scene-table .scene-code-col { width: 64px; }
.scene-table .scene-name-col { width: 240px; }
.scene-table .scene-benchmark-col { width: 420px; }
.scene-table .scene-level-col { width: 120px; }
.scene-table .scene-review-col { width: 260px; }
.scene-table .scene-status-col { width: 100px; }
.scene-table th:first-child, .scene-table td:first-child,
.scene-table th:nth-child(2), .scene-table td:nth-child(2) { position: sticky; z-index: 2; background: #fff; }
.scene-table th:first-child, .scene-table th:nth-child(2) { background: #eaf1f7; z-index: 4; }
.scene-table th:first-child, .scene-table td:first-child { left: 0; }
.scene-table th:nth-child(2), .scene-table td:nth-child(2) { left: 64px; box-shadow: 7px 0 9px rgba(23, 54, 93, .12); }
.scene-table th:nth-child(1), .scene-table th:nth-child(4), .scene-table th:nth-child(5), .scene-table th:nth-child(8),
.scene-table td:nth-child(1), .scene-table td:nth-child(4), .scene-table td:nth-child(5), .scene-table td:nth-child(8) { text-align: center; }
.scene-table th { font-size: 13px; }
.scene-table td { font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; word-break: break-word; }
.scene-code { color: var(--navy); text-align: center; white-space: nowrap; }
.scene-name { min-width: 0; color: var(--navy); font-weight: 700; }
.scene-name .muted { font-size: 12px; }
.benchmark { min-width: 0; color: #475569; font-size: 13px; line-height: 1.6; }
.review-summary { color: #475569; font-size: 12px; line-height: 1.55; }
.check-stack { display: grid; gap: 5px; min-width: 0; }
.check-stack label { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.check-inline { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer; }
.selection-locked { color: #a0acb9; cursor: not-allowed; }
.selection-locked .check { accent-color: #cbd5df; }
.selection-disabled { color: #94a3b8; cursor: not-allowed; }
.selection-disabled .check { accent-color: #cbd5df; opacity: .7; cursor: not-allowed; }
.selection-ineligible .selection-warning { color: #94a3b8; }
.ai-summary .metric-value { font-size: 18px; line-height: 1.4; overflow-wrap: anywhere; }
.ai-table-panel { padding-bottom: 20px; }
.ai-table-note { margin-bottom: 12px; padding: 9px 11px; color: #52677d; background: #f5f8fb; border-left: 3px solid var(--teal); line-height: 1.6; }
.ai-table { width: 100%; min-width: 2240px; table-layout: fixed; }
.ai-table .ai-code-col { width: 64px; }
.ai-table .ai-name-col { width: 240px; }
.ai-table .ai-level-col { width: 400px; }
.ai-table .ai-rating-col { width: 140px; }
.ai-table .ai-application-col { width: 596px; }
.ai-table th:first-child, .ai-table td:first-child,
.ai-table th:nth-child(2), .ai-table td:nth-child(2) { position: sticky; z-index: 2; background: #fff; }
.ai-table th:first-child, .ai-table th:nth-child(2) { background: #eaf1f7; z-index: 4; }
.ai-table th:first-child, .ai-table td:first-child { left: 0; }
.ai-table th:nth-child(2), .ai-table td:nth-child(2) { left: 64px; box-shadow: 7px 0 9px rgba(23, 54, 93, .12); }
.ai-table th, .ai-table td { font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; word-break: break-word; }
.ai-typical-index-panel { margin-top: 14px; }
.ai-typical-index { min-width: 980px; table-layout: fixed; }
.ai-typical-index th:nth-child(1), .ai-typical-index td:nth-child(1) { width: 70px; text-align: center; }
.ai-typical-index th:nth-child(2), .ai-typical-index td:nth-child(2) { width: 220px; }
.ai-typical-index th:nth-child(3), .ai-typical-index td:nth-child(3) { width: 110px; text-align: center; }
.ai-typical-index th:nth-child(4), .ai-typical-index td:nth-child(4) { width: 430px; }
.ai-typical-index th:nth-child(5), .ai-typical-index td:nth-child(5) { width: 150px; }
.ai-typical-index th, .ai-typical-index td { overflow-wrap: anywhere; word-break: break-word; }
.ai-table th:first-child, .ai-table td:first-child { text-align: center; }
.ai-code { color: var(--navy); text-align: center; white-space: nowrap; }
.ai-name { color: var(--navy); }
.ai-related { margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 400; }
.ai-level-description { color: #475569; vertical-align: top; }
.ai-level-description.not-applicable { color: #94a3b8; background: #f8fafc; text-align: center; font-weight: 700; }
.ai-self-rating { min-width: 0; vertical-align: middle; }
.ai-rating-box { width: 100%; min-width: 0; min-height: 104px; height: 104px; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; box-sizing: border-box; }
.ai-rating-box .select { min-width: 0; height: 42px; min-height: 42px; }
.ai-rating-box .status-pill { width: 100%; min-height: 28px; height: 28px; }
.ai-application-cell { vertical-align: middle; }
.ai-application-cell details { min-width: 260px; }
.ai-application-cell summary { padding: 6px 8px; color: var(--navy); background: #edf4f9; border: 1px solid #c9d9e6; border-radius: 4px; cursor: pointer; font-weight: 700; }
.ai-editor { display: grid; gap: 8px; margin-top: 9px; padding: 9px; background: #f8fafc; border: 1px solid var(--line); }
.ai-editor label { display: grid; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.ai-editor .textarea { min-height: 86px; font-size: 12px; }
.field-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 600; }
.ai-evidence-list { display: grid; gap: 4px; max-height: 170px; overflow: auto; padding: 6px; background: #fff; border: 1px solid #d7dee8; }
.ai-evidence-option { display: flex; align-items: center; gap: 5px; min-width: 0; padding: 4px; font-size: 11px; font-weight: 400; }
.ai-evidence-option span { min-width: 0; overflow-wrap: anywhere; }
.ai-evidence-option .status-pill { margin-left: auto; flex: 0 0 auto; }
.ai-kpi-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
.ai-kpi-fields .field { min-width: 0; padding: 6px; font-size: 11px; }
.selection-ineligible { min-width: 0; }
.selection-warning { margin-top: 3px; color: var(--red); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.selection-muted { color: #94a3b8; font-weight: 600; }
.scene-quantity { margin-bottom: 14px; }
.scene-quantity-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.scene-quantity-header h3 { margin: 0; color: var(--navy); font-size: 16px; }
.scene-quantity-header .muted { font-size: 12px; }
.scene-quantity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scene-quantity-card { padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.scene-quantity-card.current { border-color: #f4b183; box-shadow: 0 0 0 2px rgba(244, 177, 131, .25); }
.scene-quantity-card.state-bad { border-left: 4px solid var(--red); }
.scene-quantity-card.state-warn { border-left: 4px solid #d99a24; }
.scene-quantity-card.state-good { border-left: 4px solid var(--green); }
.scene-quantity-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--navy); }
.scene-quantity-title strong { font-size: 15px; }
.scene-quantity-title .status-pill { padding: 5px 10px; font-size: 13px; }
.scene-quantity-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.scene-quantity-metric { min-width: 0; padding: 8px; background: var(--subtle); }
.scene-quantity-metric span, .scene-quantity-metric small { display: block; color: var(--muted); font-size: 11px; }
.scene-quantity-metric strong { display: inline-block; margin-top: 2px; color: var(--navy); font-size: 22px; line-height: 1.2; }
.scene-quantity-card.state-bad .scene-quantity-metric:first-child strong { color: var(--red); }
.scene-quantity-card.state-warn .scene-quantity-metric:first-child strong { color: #b56d0b; }
.scene-quantity-card.state-good .scene-quantity-metric:first-child strong { color: var(--green); }
.scene-quantity-note { margin-top: 8px; color: #52677d; font-size: 12px; line-height: 1.5; }
.scene-legend { margin: -2px 0 12px; padding: 8px 10px; color: #52677d; background: #f5f8fb; border-left: 3px solid #9ab1c9; font-size: 13px; line-height: 1.6; }
.field, .select, .textarea { width: 100%; padding: 8px 9px; color: var(--ink); background: #fff; border: 1px solid #bac8d6; border-radius: 4px; }
.field:focus, .select:focus, .textarea:focus { outline: 2px solid #b9dbe0; border-color: var(--teal); }
.textarea { min-height: 116px; resize: vertical; line-height: 1.55; }
.field-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.submission-sections { display: grid; gap: 14px; }
.submission-subheader { margin: 8px 0 0; }
.submission-panel { overflow: hidden; }
.submission-factory-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.submission-wide-field { margin-top: 12px; }
.submission-table { width: 100%; min-width: 980px; table-layout: fixed; }
.history-table { min-width: 1160px; }
.performance-table { min-width: 1280px; }
.history-table th, .history-table td { min-width: 150px; }
.history-table th:first-child, .history-table td:first-child { width: 88px; min-width: 88px; }
.performance-table th:nth-child(1), .performance-table td:nth-child(1) { width: 115px; }
.performance-table th:nth-child(2), .performance-table td:nth-child(2) { width: 220px; }
.performance-table th:nth-child(3), .performance-table td:nth-child(3) { width: 90px; }
.performance-table th:nth-child(4), .performance-table td:nth-child(4), .performance-table th:nth-child(5), .performance-table td:nth-child(5), .performance-table th:nth-child(6), .performance-table td:nth-child(6) { width: 120px; }
.performance-table th:last-child, .performance-table td:last-child { width: 48px; }
.performance-rate { color: var(--navy); background: #f5f8fb; }
.instance-list { display: grid; gap: 10px; }
.instance-card { border: 1px solid var(--line); background: #fff; }
.instance-card > summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px 13px; color: var(--navy); cursor: pointer; list-style-position: inside; }
.instance-card > summary::marker { color: var(--teal); }
.instance-editor { display: grid; gap: 11px; padding: 13px; border-top: 1px solid var(--line); background: #f8fafc; }
.instance-editor .textarea { min-height: 92px; }
.ai-instance-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 8px; background: #fff; border: 1px solid var(--line); }
.nested-editor { padding: 9px; background: #fff; border: 1px solid var(--line); }
.nested-editor > summary { color: var(--navy); cursor: pointer; font-weight: 700; }
.nested-rows { display: grid; gap: 7px; margin: 8px 0; overflow-x: auto; }
.nested-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) 34px; gap: 6px; min-width: 900px; align-items: end; padding: 7px; background: #f8fafc; border: 1px solid #e1e7ee; }
.nested-row label { display: grid; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; }
.nested-row .field { min-width: 0; padding: 6px; font-size: 11px; }
.icon-btn { width: 32px; height: 32px; padding: 0; color: var(--red); background: #fff; border: 1px solid #e5b7b2; border-radius: 4px; font-size: 19px; line-height: 1; }
.icon-btn:hover { color: #fff; background: var(--red); }
.form-actions .icon-btn { align-self: center; }
.submission-section-title { margin: 10px 0 0; }
.submission-section-title h2 { margin: 0; color: var(--navy); font-size: 20px; }
.submission-section-title p { margin: 4px 0 0; color: var(--muted); }
.submission-catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.catalog-panel { min-width: 0; }
.catalog-table { min-width: 720px; table-layout: fixed; }
.catalog-table th, .catalog-table td { min-width: 125px; padding: 7px; }
.catalog-table th:last-child, .catalog-table td:last-child { width: 42px; min-width: 42px; }
.catalog-table .field, .catalog-table .select { min-width: 0; padding: 6px; font-size: 11px; }
.assessment-fields { grid-template-columns: minmax(0, .45fr) minmax(0, .45fr) minmax(0, 1.55fr) minmax(0, 1.55fr); }
.field-group label { display: block; margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 600; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.check { width: 18px; height: 18px; accent-color: var(--teal); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filter-bar .field { max-width: 280px; }
.compliance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.section-card { display: grid; gap: 9px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-title h3 { margin: 0; }
.section-meta { color: var(--muted); font-size: 12px; }
.blocked { padding: 14px; color: #7a241d; background: #fff0ee; border: 1px solid #f1c6c1; border-radius: 5px; }
.blocked strong { display: block; margin-bottom: 4px; }
.blocked ul { margin: 5px 0 0 18px; padding: 0; }
.ready { padding: 14px; color: #286024; background: #eef8e9; border: 1px solid #c7e2b9; border-radius: 5px; }
.empty { padding: 30px; color: var(--muted); text-align: center; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 10; max-width: 360px; padding: 11px 14px; color: #fff; background: #263b53; border-radius: 5px; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.file-link { color: var(--blue); text-decoration: underline; }
.muted { color: var(--muted); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field-grid, .assessment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .assessment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .topbar { padding: 0 15px; } .shell { width: min(100% - 24px, 1480px); padding-top: 12px; } .hero-band { flex-direction: column; padding: 18px; } .target-switch { align-self: stretch; } h1 { font-size: 24px; } .grid-4, .grid-3, .grid-2, .field-grid, .scene-quantity-grid, .compliance-grid { grid-template-columns: 1fr; } .tabs { overflow-x: auto; flex-wrap: nowrap; } .tab { white-space: nowrap; } .view-header { flex-direction: column; } .submission-catalog-grid { grid-template-columns: 1fr; } .ai-instance-checks { grid-template-columns: 1fr; } .instance-card > summary { align-items: flex-start; flex-direction: column; } }

/* Industrial command-center glass theme */
:root {
  --navy: #0c3040;
  --blue: #26758c;
  --teal: #159b98;
  --green: #358b68;
  --orange: #cf7b2e;
  --red: #bd4a4a;
  --ink: #172a34;
  --muted: #607783;
  --line: rgba(49, 88, 103, .19);
  --surface: rgba(255, 255, 255, .64);
  --subtle: rgba(236, 246, 245, .58);
  --shadow: 0 18px 48px rgba(10, 39, 51, .13);
}

* { letter-spacing: 0; }
html { min-width: 320px; background: #091a24; }
body {
  min-height: 100vh;
  color: var(--ink);
  background-color: #e7f0ef;
  background-image: linear-gradient(rgba(24, 79, 87, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(24, 79, 87, .045) 1px, transparent 1px), linear-gradient(180deg, #eef6f3 0%, #e5edf1 100%);
  background-size: 34px 34px, 34px 34px, 100% 100%;
  font: 15px/1.65 "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .12) 0 1px, transparent 1px 7px);
  opacity: .18;
}
button, input, select, textarea { font: inherit; }
button { transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease; }
button:hover:not(:disabled) { transform: translateY(-1px); }
button:active:not(:disabled) { transform: translateY(0); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(21, 155, 152, .25); outline-offset: 2px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 74px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(8px, 1vw, 14px);
  padding: 0 clamp(18px, 4vw, 54px);
  color: #f4fbfa;
  background: rgba(7, 29, 40, .92);
  border-bottom: 1px solid rgba(173, 224, 218, .18);
  box-shadow: 0 12px 28px rgba(4, 24, 33, .2);
  backdrop-filter: blur(18px) saturate(135%);
}
.brand-mark {
  width: 42px;
  height: 42px;
  color: #0c3040;
  background: #b8e6dc;
  border: 1px solid rgba(222, 255, 249, .5);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 6px 16px rgba(0, 0, 0, .16);
  font-size: 22px;
  flex: 0 0 auto;
}
.brand-copy { min-width: 0; flex: 0 1 236px; gap: 2px; overflow: hidden; }
.brand-copy strong, .brand-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy strong { font-size: 19px; font-weight: 750; }
.brand-copy span { color: #aac8cf; font-size: 12px; }
.top-actions { min-width: 0; display: flex; align-items: center; flex: 0 0 auto; gap: clamp(8px, 1.1vw, 14px); }
.save-state { color: #b8d5d8; font-size: 13px; }
.ghost-btn, .primary-btn, .secondary-btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}
.ghost-btn { color: #e2f1ef; background: rgba(255, 255, 255, .07); border-color: rgba(182, 222, 220, .35); }
.ghost-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .15); border-color: rgba(182, 222, 220, .62); }
.primary-btn { color: #fff; background: #128a89; border-color: #128a89; box-shadow: 0 6px 16px rgba(18, 138, 137, .2); }
.primary-btn:hover:not(:disabled) { background: #0f7777; box-shadow: 0 9px 22px rgba(18, 138, 137, .28); }
.primary-btn:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; }
.secondary-btn { color: var(--navy); background: rgba(255, 255, 255, .72); border-color: rgba(38, 117, 140, .35); }
.secondary-btn:hover:not(:disabled) { background: #fff; border-color: rgba(21, 155, 152, .7); }

.shell { width: min(1510px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 64px; }
.hero-band {
  position: relative;
  min-height: 184px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  overflow: hidden;
  padding: 30px 34px;
  color: #f4fbfa;
  background: rgba(13, 57, 70, .82);
  border: 1px solid rgba(171, 225, 219, .2);
  border-left: 5px solid #e7a45e;
  border-radius: 8px;
  box-shadow: 0 22px 52px rgba(9, 39, 49, .2), inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(18px) saturate(135%);
}
.hero-band::after {
  position: absolute;
  top: -45%;
  right: -8%;
  width: 58%;
  height: 190%;
  content: "";
  pointer-events: none;
  background: linear-gradient(115deg, transparent 0 43%, rgba(113, 221, 209, .12) 43% 46%, transparent 46% 100%);
  transform: rotate(-8deg);
}
.hero-band > * { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 7px; color: #b5d9d7; font-size: 12px; font-weight: 700; text-transform: uppercase; }
h1 { margin: 0; color: #f9ffff; font-size: 36px; font-weight: 760; line-height: 1.25; }
.hero-subtitle { max-width: 820px; margin: 10px 0 0; color: #c9e1df; font-size: 16px; line-height: 1.7; }
.target-switch {
  min-width: 248px;
  display: flex;
  align-items: center;
  align-self: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px;
  background: rgba(4, 31, 41, .34);
  border: 1px solid rgba(191, 231, 225, .22);
  border-radius: 7px;
}
.target-switch span { width: 100%; color: #a8cbca; font-size: 13px; font-weight: 700; }
.target-switch button { min-height: 40px; flex: 1; padding: 8px 14px; color: #eaf8f5; background: rgba(255, 255, 255, .04); border: 1px solid rgba(185, 226, 221, .3); border-radius: 5px; font-weight: 700; }
.target-switch button:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }
.target-switch button.active { color: #0c3040; background: #b8e6dc; border-color: #b8e6dc; box-shadow: 0 5px 14px rgba(184, 230, 220, .18); }

.tabs {
  position: sticky;
  top: 74px;
  z-index: 15;
  min-height: 58px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin: 20px 0 26px;
  padding: 6px;
  background: rgba(250, 255, 254, .74);
  border: 1px solid rgba(50, 91, 104, .2);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(12, 54, 64, .1), inset 0 1px 0 rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px) saturate(135%);
}
.tab { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; color: #5b7180; background: transparent; border: 0; border-radius: 5px; font-size: 14px; font-weight: 700; }
.tab:hover { color: var(--navy); background: rgba(21, 155, 152, .1); }
.tab.active { color: #f4ffff; background: #0c4655; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 5px 12px rgba(12, 70, 85, .18); }

.view-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 26px 0 17px; }
.view-header h2 { margin: 0; color: var(--navy); font-size: 27px; font-weight: 760; line-height: 1.25; }
.view-header p { margin: 6px 0 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.grid { gap: 20px 18px; }
.grid + .panel, #content > [style*="margin-top"] { margin-top: 20px !important; }
.submission-sections { gap: 20px; }
.submission-sections > .submission-subheader { margin: 0 0 2px; }
.section-card { gap: 12px; }
.panel {
  position: relative;
  overflow: hidden;
  padding: 22px 23px;
  background: var(--surface);
  border: 1px solid rgba(49, 88, 103, .2);
  border-radius: 8px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .78);
  backdrop-filter: blur(20px) saturate(125%);
}
.panel::before { position: absolute; inset: 0 0 auto; height: 1px; content: ""; pointer-events: none; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .86), transparent); }
.panel > * { position: relative; z-index: 1; }
.panel h3 { margin: 0 0 15px; color: var(--navy); font-size: 18px; font-weight: 760; line-height: 1.35; }
.metric { min-height: 126px; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 650; }
.metric-value { margin-top: 9px; color: var(--navy); font-size: 34px; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.metric-value.good { color: var(--green); }
.metric-value.warn { color: var(--orange); }
.metric-value.bad { color: var(--red); }
.metric-note { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.progress { height: 10px; overflow: hidden; background: rgba(115, 155, 163, .2); border: 1px solid rgba(81, 127, 135, .12); border-radius: 99px; }
.progress > span { display: block; height: 100%; background: var(--teal); border-radius: inherit; box-shadow: 0 0 12px rgba(21, 155, 152, .35); }
.gate-list { display: grid; gap: 10px; }
.gate-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 11px; align-items: center; padding: 12px 13px; background: rgba(235, 246, 245, .68); border: 1px solid rgba(49, 88, 103, .1); border-left: 4px solid rgba(49, 88, 103, .22); border-radius: 5px; }
.gate-item.pass { border-left-color: var(--green); }
.gate-item.fail { border-left-color: var(--red); }
.gate-icon { font-size: 18px; font-weight: 800; line-height: 1; }
.gate-item.pass .gate-icon { color: var(--green); }
.gate-item.fail .gate-icon { color: var(--red); }
.gate-item small { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }
.status-pill { min-height: 26px; display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; color: #47616c; background: rgba(220, 233, 235, .88); border: 1px solid rgba(71, 97, 108, .12); border-radius: 99px; font-size: 12px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.status-pill.good { color: #236247; background: rgba(213, 240, 223, .9); border-color: rgba(53, 139, 104, .2); }
.status-pill.warn { color: #87500f; background: rgba(255, 235, 199, .92); border-color: rgba(207, 123, 46, .2); }
.status-pill.bad { color: #8d3030; background: rgba(250, 218, 216, .92); border-color: rgba(189, 74, 74, .2); }
.quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.quick-actions button { min-height: 42px; padding: 9px 14px; color: var(--navy); background: rgba(235, 246, 246, .8); border: 1px solid rgba(38, 117, 140, .25); border-radius: 6px; font-size: 14px; font-weight: 700; }
.quick-actions button:hover { background: #fff; border-color: rgba(21, 155, 152, .62); }

.table-wrap { overflow: auto; background: rgba(255, 255, 255, .52); border: 1px solid rgba(49, 88, 103, .2); border-radius: 7px; box-shadow: inset 0 1px 3px rgba(14, 53, 63, .04); }
table { width: 100%; min-width: 980px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid rgba(49, 88, 103, .14); text-align: left; vertical-align: middle; }
th { color: var(--navy); background: rgba(224, 239, 238, .94); font-size: 13px; font-weight: 760; white-space: nowrap; }
td { color: #29404b; font-size: 14px; line-height: 1.6; }
tbody tr { transition: background-color .16s ease; }
tbody tr:hover td { background: rgba(196, 231, 226, .2); }
tr:last-child td { border-bottom: 0; }
.task-table td:nth-child(3), .task-table td:nth-child(4) { color: #526b76; }
.task-table .select, .task-table .field { min-height: 42px; }
.compact-table th, .compact-table td { padding: 13px 12px; }
.scene-table td { font-size: 14px; }
.scene-name { color: var(--navy); }
.scene-name .muted, .scene-code .muted { font-size: 13px; }
.benchmark { color: #48626c; font-size: 14px; line-height: 1.7; vertical-align: middle; }
.selection-ineligible { min-width: 0; min-height: 70px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.scene-table th:first-child, .scene-table td:first-child, .scene-table th:nth-child(2), .scene-table td:nth-child(2) { background: rgba(246, 251, 250, .96); }
.scene-table th:first-child, .scene-table th:nth-child(2) { background: rgba(221, 239, 238, .98); }
.scene-table th:first-child, .scene-table td:first-child, .scene-table th:nth-child(2), .scene-table td:nth-child(2) { box-shadow: inset 1px 0 0 rgba(255, 255, 255, .5); }
.scene-table th:nth-child(2), .scene-table td:nth-child(2), .ai-table th:nth-child(2), .ai-table td:nth-child(2) { box-shadow: 8px 0 12px rgba(17, 65, 73, .1); }
.ai-table th, .ai-table td { font-size: 13px; line-height: 1.7; vertical-align: middle; }
.ai-level-description { color: #3f5964; vertical-align: middle; }
.ai-level-description.not-applicable { color: #82959c; background: rgba(239, 245, 245, .8); text-align: center; font-weight: 700; font-size: 17px; line-height: 1; vertical-align: middle; }

.field, .select, .textarea { width: 100%; min-height: 42px; padding: 10px 11px; color: var(--ink); background: rgba(255, 255, 255, .74); border: 1px solid rgba(66, 107, 120, .3); border-radius: 6px; box-shadow: inset 0 1px 2px rgba(14, 53, 63, .04); font-size: 14px; }
.field::placeholder, .textarea::placeholder { color: #91a3aa; }
.field:hover, .select:hover, .textarea:hover { border-color: rgba(21, 155, 152, .5); }
.field:focus, .select:focus, .textarea:focus { outline: 3px solid rgba(21, 155, 152, .18); border-color: var(--teal); box-shadow: 0 0 0 1px rgba(21, 155, 152, .16), inset 0 1px 2px rgba(14, 53, 63, .04); }
.textarea { min-height: 132px; line-height: 1.7; resize: vertical; }
.field-grid { display: grid; align-items: start; gap: 16px; }
.field-group label { display: block; margin-bottom: 7px; color: #526c77; font-size: 13px; font-weight: 700; line-height: 1.45; }
.assessment-fields { gap: 16px; }
.form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.check { width: 19px; height: 19px; accent-color: var(--teal); }
.check-inline { min-height: 32px; display: inline-flex; align-items: center; gap: 7px; color: #3e5964; white-space: normal; cursor: pointer; font-size: 14px; line-height: 1.45; }
.selection-locked { color: #98aab0; cursor: not-allowed; }
.selection-locked .check { accent-color: #cbd5df; }
.selection-disabled { color: #8d9fa5; cursor: not-allowed; }
.selection-disabled .check { accent-color: #cbd5df; opacity: .7; cursor: not-allowed; }
.selection-ineligible .selection-warning { color: #87999f; font-size: 12px; }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
.filter-bar .field { max-width: 320px; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.section-title h3 { margin: 0; }
.scene-legend, .ai-table-note { color: #52707a; background: rgba(231, 244, 242, .72); border-color: rgba(21, 155, 152, .28); font-size: 14px; line-height: 1.65; }
.scene-legend { margin: -2px 0 14px; padding: 11px 13px; border-left: 4px solid #75bebb; }
.ai-table-note { margin-bottom: 14px; padding: 12px 14px; border-left: 4px solid var(--teal); }
.scene-quantity { margin-bottom: 18px; }
.scene-quantity-header { align-items: center; margin-bottom: 11px; }
.scene-quantity-header h3 { font-size: 18px; }
.scene-quantity-header .muted { font-size: 13px; }
.scene-quantity-grid { gap: 14px; }
.scene-quantity-card { padding: 16px; background: rgba(255, 255, 255, .68); border-color: rgba(49, 88, 103, .2); border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .76); }
.scene-quantity-card.current { border-color: rgba(207, 123, 46, .7); box-shadow: 0 0 0 2px rgba(207, 123, 46, .14), inset 0 1px 0 rgba(255, 255, 255, .76); }
.scene-quantity-title strong { font-size: 17px; }
.scene-quantity-title .status-pill { min-height: 28px; padding: 5px 11px; font-size: 12px; }
.scene-quantity-metrics { gap: 10px; margin-top: 13px; }
.scene-quantity-metric { padding: 10px; background: rgba(234, 245, 243, .74); border-radius: 5px; }
.scene-quantity-metric span, .scene-quantity-metric small { font-size: 12px; }
.scene-quantity-metric strong { font-size: 28px; }
.scene-quantity-note { margin-top: 10px; color: #5b747d; font-size: 13px; line-height: 1.6; }

.ai-summary .metric-value { font-size: 22px; line-height: 1.4; }
.ai-typical-index-panel { margin-top: 18px; }
.ai-typical-index th, .ai-typical-index td { font-size: 13px; }
.ai-application-cell summary { min-height: 40px; display: flex; align-items: center; padding: 8px 10px; color: var(--navy); background: rgba(226, 242, 240, .78); border: 1px solid rgba(38, 117, 140, .25); border-radius: 5px; cursor: pointer; font-size: 13px; font-weight: 750; }
.ai-editor, .instance-editor { gap: 11px; background: rgba(241, 248, 247, .72); border-color: rgba(49, 88, 103, .16); }
.ai-editor label, .nested-row label { color: #5a727b; font-size: 12px; }
.ai-evidence-list { background: rgba(255, 255, 255, .75); border-color: rgba(49, 88, 103, .18); }
.instance-card, .nested-editor { border-color: rgba(49, 88, 103, .2); background: rgba(255, 255, 255, .62); border-radius: 6px; }
.instance-card > summary { min-height: 48px; align-items: center; padding: 12px 14px; font-size: 14px; }
.nested-editor > summary { min-height: 38px; display: flex; align-items: center; font-size: 14px; }
.nested-row { padding: 9px; background: rgba(244, 249, 248, .78); border-color: rgba(49, 88, 103, .15); border-radius: 5px; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--red); background: rgba(255, 255, 255, .78); border-color: rgba(189, 74, 74, .35); border-radius: 5px; }
.icon-btn:hover { color: #fff; background: var(--red); }

.submission-section-title { margin: 16px 0 2px; }
.submission-section-title h2 { font-size: 24px; }
.submission-section-title p, .submission-subheader p { font-size: 15px; }
.submission-panel { overflow: hidden; }
.catalog-panel { min-width: 0; }
.catalog-table .field, .catalog-table .select, .nested-row .field { min-height: 40px; font-size: 13px; }
.performance-rate { color: var(--navy); background: rgba(232, 243, 242, .76); }
.blocked, .ready { padding: 17px; border-radius: 7px; font-size: 14px; line-height: 1.65; }
.blocked { color: #7e2d2d; background: rgba(255, 239, 237, .86); border-color: rgba(189, 74, 74, .28); }
.ready { color: #266247; background: rgba(234, 248, 235, .86); border-color: rgba(53, 139, 104, .3); }
.empty { padding: 38px 20px; color: var(--muted); font-size: 14px; }
.toast { right: 26px; bottom: 26px; max-width: 390px; padding: 13px 16px; color: #f4ffff; background: rgba(9, 46, 58, .93); border: 1px solid rgba(174, 226, 219, .22); border-radius: 7px; box-shadow: 0 16px 36px rgba(8, 34, 43, .25); font-size: 14px; backdrop-filter: blur(14px); }
.file-link { color: #1f7282; font-weight: 700; }
.muted { color: var(--muted); }

.field-label, .ai-related, .ai-evidence-option { font-size: 12px; }
.ai-kpi-fields .field { font-size: 12px; }
.scene-self-evaluation { display: grid; gap: 9px; min-width: 0; }
.scene-self-description { min-height: 104px; padding: 9px 10px; font-size: 13px; line-height: 1.6; }
.scene-self-evaluation > .muted { display: block; padding: 9px 10px; color: #82959c; background: rgba(238, 246, 245, .72); border: 1px dashed rgba(66, 107, 120, .22); border-radius: 5px; font-size: 12px; line-height: 1.55; }
.scene-table td:nth-child(4), .scene-table td:nth-child(5), .scene-table td:nth-child(6), .scene-table td:nth-child(7) { vertical-align: middle; }
.ai-application-cell .ai-self-description { width: 100%; min-width: 0; min-height: 104px; height: 104px; display: flex; align-items: center; justify-content: flex-start; box-sizing: border-box; padding: 9px 10px; color: var(--ink); background: rgba(255, 255, 255, .74); border: 1px solid rgba(66, 107, 120, .3); border-radius: 6px; font-size: 13px; line-height: 1.6; text-align: left; white-space: pre-wrap; overflow: auto; overflow-wrap: anywhere; word-break: break-word; cursor: text; }
.ai-application-cell .ai-self-description:empty::before, .ai-application-cell .ai-self-description:has(> br:only-child)::before { content: attr(data-placeholder); color: #91a3aa; pointer-events: none; }
.ai-application-cell > .selection-locked { display: flex; align-items: center; min-width: 0; min-height: 104px; height: 104px; box-sizing: border-box; padding: 10px; color: #82959c; background: rgba(238, 246, 245, .72); border: 1px dashed rgba(66, 107, 120, .22); border-radius: 5px; font-size: 12px; line-height: 1.55; }
@media (max-width: 720px) {
  .ai-rating-box { min-height: 88px; height: 88px; }
  .ai-application-cell .ai-self-description, .ai-application-cell > .selection-locked { min-height: 88px; height: 88px; }
}

#content > * { animation: view-enter .34s ease both; }
@keyframes view-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@supports not (backdrop-filter: blur(1px)) {
  .topbar { background: #0a2b3b; }
  .tabs, .panel, .table-wrap, .scene-quantity-card { background: #f8fbfa; }
}
@media (max-width: 1100px) {
  .hero-band { align-items: center; }
  .target-switch { align-self: center; }
}
@media (max-width: 720px) {
  .topbar { height: auto; min-height: 68px; padding: 11px 16px; }
  .brand-mark { width: 38px; height: 38px; font-size: 20px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy span { display: none; }
  .top-actions { gap: 8px; }
  .save-state { display: none; }
  .ghost-btn { min-height: 38px; padding: 7px 11px; }
  .shell { width: min(100% - 24px, 1510px); padding: 16px 0 40px; }
  .hero-band { min-height: 0; gap: 20px; padding: 22px 20px; }
  h1 { font-size: 28px; }
  .hero-subtitle { font-size: 15px; }
  .target-switch { width: 100%; min-width: 0; }
  .tabs { top: 68px; margin: 14px 0 20px; overflow-x: auto; flex-wrap: nowrap; }
  .tab { flex: 0 0 auto; min-height: 42px; padding: 9px 14px; white-space: nowrap; }
  .view-header { align-items: flex-start; margin: 22px 0 14px; }
  .view-header h2 { font-size: 24px; }
  .view-header p { font-size: 14px; }
  .panel { padding: 18px 16px; }
  .panel h3 { font-size: 17px; }
  .metric-value { font-size: 31px; }
  .gate-item { grid-template-columns: 24px 1fr; }
  .gate-item .status-pill { grid-column: 2; justify-self: start; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .scene-quantity-header { align-items: flex-start; }
  .scene-quantity-header .muted { font-size: 12px; }
  .scene-quantity-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scene-quantity-metric { padding: 8px; }
  .scene-quantity-metric strong { font-size: 23px; }
  .form-actions { justify-content: stretch; }
  .form-actions > button { flex: 1 1 auto; }
  .submission-catalog-grid { grid-template-columns: 1fr; }
  .ai-instance-checks { grid-template-columns: 1fr; }
  .instance-card > summary { align-items: flex-start; flex-direction: column; }
  .toast { right: 14px; bottom: 14px; left: 14px; max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Keep expanded AI details aligned with the row's center line. */
.ai-application-cell { min-width: 0; vertical-align: middle; }
.ai-application-cell details { width: 100%; min-width: 0; }
.ai-application-cell summary {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-sizing: border-box;
  padding: 8px 10px;
}
.ai-application-cell summary::marker,
.ai-application-cell summary::-webkit-details-marker { content: ""; display: none; }
.ai-application-cell summary::after {
  content: "+";
  display: inline-grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: #3f727c;
  border: 1px solid rgba(38, 117, 140, .22);
  border-radius: 50%;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}
.ai-application-cell details[open] summary {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}
.ai-application-cell details[open] summary::after { content: "-"; }
.ai-application-cell .ai-editor {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
}
.ai-application-cell details[open] .ai-editor {
  border-top: 0;
  border-top-right-radius: 5px;
  border-top-left-radius: 0;
}
.ai-code strong { display: inline-block; color: #0c4655; font-size: 15px; font-weight: 800; }
.ai-related { display: block; margin-top: 7px; color: #748b94; font-size: 12px; line-height: 1.6; }
.ai-related-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 3px; color: #617b84; line-height: 1.55; }
.ai-related-status { font-weight: 750; }
.ai-related-status.is-selected {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 7px;
  color: #236247;
  background: rgba(213, 240, 223, .82);
  border: 1px solid rgba(53, 139, 104, .28);
  border-radius: 4px;
  font-weight: 750;
}
.ai-related-list { display: grid; gap: 2px; margin-top: 2px; }
.ai-related-scene { display: block; color: inherit; overflow-wrap: anywhere; }
.ai-related-scene.is-selected {
  justify-self: start;
  max-width: 100%;
  box-sizing: border-box;
  padding: 3px 7px;
  color: #236247;
  background: rgba(213, 240, 223, .82);
  border: 1px solid rgba(53, 139, 104, .28);
  border-radius: 4px;
  font-weight: 750;
}
/* Navigation glass shell and DL-AI brand treatment. */
.topbar { background: rgba(7, 29, 40, .84); }
body.auth-required .topbar { display: none; }
.brand-mark {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  padding: 2px;
  background: transparent;
  border: 0;
  border-radius: 10px;
  box-shadow: none;
}
.brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.hero-band { min-height: 164px; }
.tabs {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(250, 255, 254, .52);
}
.tab-list {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}
.tabs .target-switch {
  min-width: 278px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-left: auto;
  padding: 4px 5px 4px 11px;
  background: rgba(7, 44, 54, .22);
  border: 1px solid rgba(151, 211, 205, .28);
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 6px 16px rgba(11, 54, 62, .08);
  backdrop-filter: blur(14px) saturate(135%);
}
.tabs .target-switch span {
  width: auto;
  margin-right: auto;
  color: #4f6f78;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}
.tabs .target-switch button {
  min-width: 82px;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #3f626c;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(84, 137, 146, .3);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 750;
}
.tabs .target-switch button:hover:not(:disabled) { color: #173f4d; background: rgba(255, 255, 255, .62); border-color: rgba(38, 117, 140, .48); }
.tabs .target-switch button.active {
  color: #fff;
  background: #087f83;
  border-color: #087f83;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 4px rgba(8, 127, 131, .28), 0 7px 18px rgba(8, 127, 131, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
  font-weight: 800;
}
.tabs .target-switch button[data-target="advanced"].active {
  color: #fff;
  background: #c5681b;
  border-color: #c5681b;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .95), 0 0 0 4px rgba(197, 104, 27, .28), 0 7px 18px rgba(168, 79, 17, .3), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.tabs .target-switch button[data-target="excellent"].active {
  color: #fff;
  background: #087f83;
  border-color: #087f83;
}
@media (max-width: 900px) {
  .tabs { align-items: stretch; flex-wrap: wrap; }
  .tab-list { flex: 1 1 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tabs .target-switch { width: 100%; min-width: 0; margin-left: 0; }
  .tabs .target-switch button { flex: 1 1 0; }
}
@media (max-width: 720px) {
  .brand-mark { width: 42px; height: 42px; }
  .tabs .target-switch { padding-left: 9px; }
  .tabs .target-switch span { font-size: 12px; }
}

.export-btn { min-width: 74px; }
.site-btn { white-space: nowrap; text-decoration: none; }
.export-icon { display: inline-block; font-size: 18px; line-height: 1; }
.back-to-top {
  position: fixed;
  right: clamp(16px, 2.8vw, 32px);
  bottom: clamp(16px, 2.8vw, 28px);
  z-index: 18;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #0b6467;
  background: rgba(224, 246, 242, .94);
  border: 1px solid rgba(21, 155, 152, .42);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(7, 73, 81, .13), inset 0 1px 0 rgba(255, 255, 255, .72);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.back-to-top:hover, .back-to-top:focus-visible { transform: translateY(-2px); color: #fff; background: #087f83; border-color: #087f83; box-shadow: 0 13px 28px rgba(7, 73, 81, .3), inset 0 1px 0 rgba(255, 255, 255, .34); }
.back-to-top:active { transform: translateY(0); }
.back-to-top:focus-visible { outline: 3px solid rgba(21, 155, 152, .28); outline-offset: 3px; }
.back-to-top span { width: 0; height: 0; border-right: 8px solid transparent; border-bottom: 11px solid currentColor; border-left: 8px solid transparent; transform: translateY(-1px); }
@media (max-width: 720px) {
  .back-to-top { right: 14px; bottom: 16px; width: 42px; height: 42px; }
}
.metric.metric-ai-good {
  background: rgba(220, 246, 230, .72);
  border-color: rgba(53, 139, 104, .36);
  box-shadow: 0 18px 48px rgba(20, 94, 63, .13), inset 0 1px 0 rgba(255, 255, 255, .82);
}
.metric.metric-ai-good .metric-label, .metric.metric-ai-good .metric-note { color: #3d7258; }
.metric.metric-ai-warn {
  background: rgba(255, 242, 216, .74);
  border-color: rgba(207, 123, 46, .38);
  box-shadow: 0 18px 48px rgba(137, 84, 20, .11), inset 0 1px 0 rgba(255, 255, 255, .82);
}
.metric.metric-ai-warn .metric-label, .metric.metric-ai-warn .metric-note { color: #89642d; }
@media (max-width: 720px) {
  .export-btn { min-width: 42px; padding-right: 10px; padding-left: 10px; }
  .export-label { display: none; }
  .export-icon { font-size: 20px; }
}

[hidden] { display: none !important; }
.enterprise-context {
  min-width: 0;
  flex: 1 1 420px;
  max-width: 600px;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: clamp(8px, 1.5vw, 20px);
  padding: 5px 6px 5px 12px;
  color: #dff3ef;
  background: rgba(16, 66, 77, .46);
  border: 1px solid rgba(176, 231, 224, .34);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 22px rgba(3, 28, 37, .16);
  backdrop-filter: blur(16px) saturate(140%);
}
.enterprise-context.enterprise-context-account {
  flex: 0 1 auto;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
}
.enterprise-context.enterprise-context-account .enterprise-picker {
  width: max-content;
  max-width: none;
  flex: 0 1 auto;
}
.enterprise-context.enterprise-context-account .enterprise-selector {
  width: max-content;
  max-width: 100%;
}
.enterprise-context.enterprise-context-admin {
  flex: 0 1 auto;
  width: max-content;
  max-width: min(600px, calc(100vw - 32px));
}
.enterprise-context.enterprise-context-admin .enterprise-picker {
  width: max-content;
  max-width: min(340px, 100%);
  flex: 0 1 auto;
}
.enterprise-context.enterprise-context-admin .enterprise-selector {
  width: max-content;
  max-width: 100%;
}
.enterprise-picker { position: relative; min-width: 0; max-width: 340px; flex: 1 1 280px; }
.enterprise-selector {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 11px;
  color: #f2fffc;
  background: rgba(5, 38, 49, .62);
  border: 1px solid rgba(164, 224, 217, .34);
  border-radius: 6px;
  outline: none;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 750;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 3px 10px rgba(3, 28, 37, .12);
}
.enterprise-selector-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.enterprise-selector-arrow { width: 9px; height: 9px; flex: 0 0 auto; margin: -4px 3px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .18s ease, margin .18s ease; }
.enterprise-selector[aria-expanded="true"] .enterprise-selector-arrow { margin-top: 5px; transform: rotate(225deg); }
.enterprise-selector:hover:not(:disabled) { background: rgba(9, 53, 64, .78); border-color: rgba(164, 224, 217, .58); }
.enterprise-selector:focus-visible { outline: 3px solid rgba(120, 224, 211, .34); outline-offset: 2px; border-color: #78d8cd; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(120, 224, 211, .28); }
.enterprise-selector[aria-expanded="true"] { border-color: #78d8cd; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 0 0 2px rgba(120, 224, 211, .2), 0 8px 18px rgba(3, 28, 37, .18); }
.enterprise-selector:disabled { cursor: default; opacity: .96; }
.enterprise-picker-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: max-content;
  min-width: 100%;
  max-width: min(680px, calc(100vw - 32px));
  display: grid;
  gap: 4px;
  max-height: 320px;
  overflow-x: auto;
  overflow-y: auto;
  padding: 6px;
  background: rgba(7, 42, 53, .94);
  border: 1px solid rgba(164, 224, 217, .42);
  border-radius: 7px;
  box-shadow: 0 18px 38px rgba(3, 28, 37, .32), inset 0 1px 0 rgba(255, 255, 255, .12);
  backdrop-filter: blur(18px) saturate(145%);
}
.enterprise-option {
  width: max-content;
  min-width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  color: #dff4f0;
  background: rgba(255, 255, 255, .04);
  border: 1px solid transparent;
  border-radius: 5px;
  text-align: left;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}
.enterprise-option-name { white-space: nowrap; }
.enterprise-option:hover, .enterprise-option:focus-visible { color: #fff; background: rgba(21, 155, 152, .3); border-color: rgba(118, 213, 202, .5); outline: none; }
.enterprise-option.is-selected { color: #082f3b; background: #b8e6dc; border-color: #8dd4c8; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65); }
.enterprise-option.is-selected:hover, .enterprise-option.is-selected:focus-visible { color: #082f3b; background: #c9f1e8; }
.enterprise-option-check { flex: 0 0 auto; font-size: 17px; font-weight: 900; line-height: 1; }
.enterprise-add-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 7px 12px;
  color: #e6fff9;
  background: rgba(21, 155, 152, .28);
  border: 1px solid rgba(118, 213, 202, .5);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.enterprise-add-btn:hover { color: #fff; background: rgba(21, 155, 152, .5); border-color: rgba(151, 235, 222, .78); box-shadow: 0 5px 14px rgba(21, 155, 152, .2), inset 0 1px 0 rgba(255, 255, 255, .18); }
.enterprise-delete-btn { min-height: 38px; flex: 0 0 auto; padding: 7px 11px; color: #ffd9d6; background: rgba(164, 52, 52, .38); border: 1px solid rgba(247, 171, 164, .58); border-radius: 6px; font-size: 13px; font-weight: 800; white-space: nowrap; }
.enterprise-delete-btn:hover:not(:disabled) { color: #fff; background: rgba(184, 77, 77, .78); border-color: rgba(255, 198, 191, .88); box-shadow: 0 5px 14px rgba(184, 77, 77, .22); }
.enterprise-delete-btn:disabled { cursor: not-allowed; opacity: .55; }
.auth-user { max-width: 90px; flex: 0 0 auto; overflow: hidden; padding: 0 2px; color: #b8d5d8; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 19;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 24px;
  background: rgba(5, 24, 32, .64);
  backdrop-filter: blur(16px) saturate(120%);
  isolation: isolate;
}
#auth-gate {
  background-color: #0b2f39;
  background-image: linear-gradient(120deg, rgba(8, 38, 47, .34), rgba(11, 88, 91, .13) 52%, rgba(7, 32, 41, .38)), url("images/smartfactory.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 470px);
  overflow: hidden;
  padding: 30px;
  color: #123642;
  background: rgba(232, 243, 241, .58);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(3, 24, 31, .32), inset 0 1px 0 rgba(255, 255, 255, .82), inset 0 -1px 0 rgba(63, 119, 121, .16);
  backdrop-filter: blur(26px) saturate(125%);
  -webkit-backdrop-filter: blur(26px) saturate(125%);
}
.auth-card::before { position: absolute; inset: 0; content: ""; pointer-events: none; border-radius: inherit; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .54), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.auth-card > * { position: relative; z-index: 1; }
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.auth-brand-mark { width: 45px; height: 45px; display: grid; place-items: center; padding: 2px; background: #0c3040; border: 1px solid rgba(21, 155, 152, .35); border-radius: 9px; }
.auth-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { color: #0c4655; font-size: 16px; }
.auth-brand span { margin-top: 2px; color: var(--muted); font-size: 12px; }
.auth-card h2 { margin: 0; color: var(--navy); font-size: 25px; line-height: 1.3; }
.auth-card > p { margin: 7px 0 19px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.auth-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 18px; padding: 4px; background: rgba(222, 239, 237, .38); border: 1px solid rgba(255, 255, 255, .44); border-radius: 8px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42); }
.auth-modes button { min-height: 38px; padding: 7px 8px; color: #54717a; background: transparent; border: 0; border-radius: 6px; font-size: 13px; font-weight: 750; }
.auth-modes button:hover { background: rgba(255, 255, 255, .32); }
.auth-modes button.active { color: #fff; background: #087f83; box-shadow: 0 4px 12px rgba(8, 127, 131, .28), inset 0 1px 0 rgba(255, 255, 255, .46); }
.auth-card .field { background: rgba(255, 255, 255, .5); border-color: rgba(255, 255, 255, .66); box-shadow: inset 0 1px 2px rgba(14, 53, 63, .07), inset 0 1px 0 rgba(255, 255, 255, .34); backdrop-filter: blur(12px) saturate(120%); -webkit-backdrop-filter: blur(12px) saturate(120%); }
.auth-card .field:hover { background: rgba(255, 255, 255, .56); }
.auth-card .field:focus { background: rgba(255, 255, 255, .64); }
.auth-field { display: grid; gap: 6px; margin-top: 12px; }
.auth-field label { color: #526c77; font-size: 13px; font-weight: 750; }
.password-field { position: relative; }
.password-field .field { padding-right: 48px; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 34px; height: 34px; display: grid; place-items: center; padding: 0; color: #5c7880; background: transparent; border: 0; border-radius: 6px; transform: translateY(-50%); }
.password-toggle:hover, .password-toggle:focus-visible { color: #087f83; background: rgba(255, 255, 255, .4); }
.password-toggle:hover:not(:disabled), .password-toggle:active:not(:disabled) { transform: translateY(-50%); }
.password-toggle-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.auth-submit { width: 100%; margin-top: 20px; }
.enterprise-create-card { width: min(100%, 540px); }
.enterprise-create-card > p { margin-bottom: 16px; }
.enterprise-create-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }
.enterprise-create-actions .primary-btn { min-width: 170px; }
.auth-error { margin: 14px 0 0 !important; padding: 10px 12px; color: #8d3030 !important; background: rgba(250, 218, 216, .72); border: 1px solid rgba(189, 74, 74, .25); border-radius: 6px; }
@media (max-width: 1100px) {
  .topbar { height: auto; min-height: 74px; flex-wrap: wrap; row-gap: 8px; padding-top: 10px; padding-bottom: 10px; }
  .brand-copy { flex: 1 1 auto; }
  .enterprise-context { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .enterprise-picker { max-width: none; }
  .enterprise-selector { max-width: none; }
}
@media (max-width: 720px) {
  .topbar { gap: 8px; }
  .top-actions { gap: 6px; }
  .site-btn { display: none; }
  .enterprise-context { gap: 6px; padding-right: 8px; padding-left: 8px; }
  .enterprise-add-btn, .enterprise-delete-btn { padding-right: 9px; padding-left: 9px; }
  .enterprise-delete-btn { font-size: 12px; }
  .auth-card { padding: 23px 20px; }
  .auth-gate { padding: 14px; }
}

.admin-overview-grid { align-items: stretch; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 24px; }
.admin-overview-grid > .panel { height: 100%; min-height: 0; }
.admin-summary-panel, .admin-record-panel { min-width: 0; }
.admin-summary-panel { display: flex; flex-direction: column; gap: 20px; }
.admin-summary-panel > .section-title { padding-bottom: 14px; border-bottom: 1px solid rgba(49, 88, 103, .14); }
.admin-summary-actions { justify-content: flex-end; margin: auto 0 0; padding-top: 16px; border-top: 1px solid rgba(49, 88, 103, .14); }
.admin-summary-actions .secondary-btn { min-width: 150px; }
.admin-record-panel { display: flex; flex-direction: column; }
.admin-record-form { display: flex; flex: 1; flex-direction: column; gap: 15px; }
.admin-record-form .field-group + .field-group { margin-top: 0 !important; }
.admin-record-form .form-actions { margin-top: auto; }
.admin-record-form .textarea { min-height: 96px; }
.enterprise-table-panel { margin-top: 24px !important; }
.diagnosis-record-panel { margin-top: 24px; }
.admin-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-header-actions .danger-btn { color: #8d3030; background: rgba(250, 218, 216, .86); border: 1px solid rgba(189, 74, 74, .38); border-radius: 5px; font-weight: 800; }
.admin-header-actions .danger-btn:hover:not(:disabled) { color: #fff; background: #b84d4d; border-color: #b84d4d; box-shadow: 0 5px 14px rgba(184, 77, 77, .2); }
.admin-header-actions .danger-btn:disabled { cursor: not-allowed; opacity: .55; }
.enterprise-table { min-width: 1240px; table-layout: fixed; }
.enterprise-table th, .enterprise-table td { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.enterprise-table th:first-child, .enterprise-table td:first-child { width: 300px; min-width: 300px; position: sticky; left: 0; z-index: 2; background: rgba(248, 253, 252, .96); box-shadow: 10px 0 18px rgba(8, 34, 43, .08); }
.enterprise-table th:first-child { z-index: 3; }
.enterprise-table th:nth-child(2), .enterprise-table td:nth-child(2) { width: 250px; }
.enterprise-table th:nth-child(3), .enterprise-table td:nth-child(3) { width: 170px; }
.enterprise-table th:nth-child(4), .enterprise-table td:nth-child(4) { width: 125px; }
.enterprise-table th:nth-child(5), .enterprise-table td:nth-child(5), .enterprise-table th:nth-child(6), .enterprise-table td:nth-child(6) { width: 115px; text-align: center; }
.enterprise-table th:nth-child(7), .enterprise-table td:nth-child(7) { width: 78px; text-align: center; }
.enterprise-table th:nth-child(8), .enterprise-table td:nth-child(8) { width: 175px; }
.enterprise-table td:first-child strong { color: var(--navy); }
.enterprise-actions { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.enterprise-actions .enterprise-action { margin: 0; }
.enterprise-table .enterprise-action { min-height: 36px; margin: 2px; padding: 7px 10px; font-size: 12px; }
.enterprise-table td .muted { margin-top: 3px; font-size: 12px; }
.enterprise-table .enterprise-current td { background: rgba(213, 240, 223, .28); }
.enterprise-table .enterprise-archived { opacity: .68; }
.enterprise-table .enterprise-action { min-height: 36px; margin: 2px; padding: 7px 10px; font-size: 12px; }
.enterprise-table .enterprise-action:disabled { cursor: default; opacity: .7; }
.enterprise-table .danger-btn { color: #8d3030; background: rgba(250, 218, 216, .78); border: 1px solid rgba(189, 74, 74, .32); border-radius: 5px; font-weight: 800; }
.enterprise-table .danger-btn:hover { color: #fff; background: #b84d4d; border-color: #b84d4d; box-shadow: 0 5px 14px rgba(184, 77, 77, .2); }
.admin-current-enterprise {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 5px 0 5px 18px;
  background: linear-gradient(90deg, rgba(222, 242, 238, .74), rgba(222, 242, 238, .16) 78%, transparent);
  border: 0;
  border-left: 4px solid #159b98;
  border-radius: 0;
}
.admin-current-enterprise strong { color: var(--navy); font-size: 23px; line-height: 1.35; overflow-wrap: anywhere; }
.admin-current-enterprise span { color: #4e7079; font-size: 15px; }
.admin-current-enterprise small { max-width: 620px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.diagnosis-record-list { display: grid; gap: 10px; }
.diagnosis-record { padding: 14px 15px; background: rgba(239, 248, 246, .58); border: 1px solid rgba(49, 88, 103, .16); border-radius: 7px; }
.diagnosis-record-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.diagnosis-record-head strong { color: var(--navy); font-size: 15px; }
.diagnosis-record p { margin: 8px 0 5px; color: #526b76; font-size: 13px; line-height: 1.6; }
.diagnosis-record-meta { color: #5c7880; font-size: 12px; line-height: 1.5; }
@media (max-width: 720px) {
  .admin-overview-grid { grid-template-columns: 1fr; gap: 16px; }
  .admin-summary-actions { justify-content: stretch; }
  .admin-header-actions { width: 100%; }
  .admin-header-actions > button { flex: 1 1 auto; }
  .enterprise-table .enterprise-action { min-height: 34px; }
  .diagnosis-record-head { align-items: flex-start; flex-direction: column; gap: 7px; }
}

.assessment-overview-grid {
  align-items: stretch;
  gap: 24px;
}
.assessment-overview-grid > .panel { min-width: 0; }
.assessment-input-panel, .assessment-compare-panel { display: flex; flex-direction: column; gap: 22px; }
.assessment-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(49, 88, 103, .14); }
.assessment-panel-heading h3 { margin: 3px 0 0; color: var(--navy); font-size: 21px; line-height: 1.3; }
.assessment-kicker { display: block; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
.assessment-panel-status { flex: 0 0 auto; padding: 5px 9px; color: #53717a; background: rgba(225, 240, 239, .72); border: 1px solid rgba(21, 155, 152, .18); border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.assessment-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.assessment-fields .field, .assessment-fields .select { min-height: 46px; }
.assessment-actions { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(49, 88, 103, .14); }
.assessment-actions .primary-btn { min-width: 160px; }
.assessment-level-grid { gap: 14px; }
.assessment-level-card { display: flex; flex-direction: column; min-width: 0; min-height: 178px; padding: 17px 18px; background: rgba(241, 248, 247, .78); border: 1px solid rgba(49, 88, 103, .16); border-top: 4px solid rgba(49, 88, 103, .3); border-radius: 7px; }
.assessment-level-card.assessment-advanced { background: rgba(255, 244, 226, .72); border-top-color: #c5681b; }
.assessment-level-card.assessment-excellent { background: rgba(224, 245, 240, .72); border-top-color: #087f83; }
.assessment-level-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assessment-level-head .metric-label { color: var(--navy); font-size: 15px; font-weight: 800; }
.assessment-level-card .metric-value { margin-top: 18px; font-size: 36px; }
.assessment-level-card .metric-note { margin-top: auto; padding-top: 13px; border-top: 1px solid rgba(49, 88, 103, .13); }
.assessment-policy-note { padding: 12px 14px; color: #52707a; background: rgba(231, 244, 242, .72); border-left: 4px solid #75bebb; border-radius: 5px; font-size: 13px; line-height: 1.65; }
.assessment-scenes-panel { margin-top: 24px !important; }
.assessment-scenes-header { margin: 0 0 16px; }
.assessment-scenes-header h3 { margin: 4px 0 5px; color: var(--navy); font-size: 21px; line-height: 1.3; }
.assessment-scenes-header p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
@media (max-width: 720px) {
  .assessment-overview-grid { grid-template-columns: 1fr; gap: 16px; }
  .assessment-fields { grid-template-columns: 1fr; }
  .assessment-panel-heading { gap: 10px; }
  .assessment-panel-status { font-size: 11px; }
  .assessment-level-card { min-height: 0; }
  .assessment-actions .primary-btn { width: 100%; }
}

/* Shared top controls for the three wide working tables. */
.table-scroll-shell { position: relative; min-width: 0; }
.panel:has(.table-scroll-shell) { overflow: visible; }
.table-scroll-controls {
  position: sticky;
  top: 142px;
  z-index: 8;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  grid-template-rows: 32px;
  align-items: stretch;
  gap: 9px;
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0 0 9px;
  padding: 5px 8px;
  background: rgba(235, 248, 245, .94);
  border: 1px solid rgba(21, 155, 152, .28);
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(19, 76, 78, .12), inset 0 1px 0 rgba(255, 255, 255, .86);
  backdrop-filter: blur(15px) saturate(135%);
  -webkit-backdrop-filter: blur(15px) saturate(135%);
}
.table-scroll-controls[hidden] { display: none !important; }
.table-scroll-button {
  width: 36px;
  height: 32px;
  min-height: 32px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  color: #087f83;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(8, 127, 131, .4);
  border-radius: 5px;
  font-size: 25px;
  font-weight: 900;
  line-height: 1;
}
.table-scroll-button > span {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  display: block;
  box-sizing: border-box;
  border: solid currentColor;
  border-width: 0 3px 3px 0;
  font-size: 0;
  line-height: 0;
  transform: rotate(-45deg);
}
.table-scroll-left > span { transform: rotate(135deg); }
.table-scroll-button:hover:not(:disabled) { transform: none; color: #005d68; background: #fff; border-color: #087f83; box-shadow: 0 4px 10px rgba(21, 155, 152, .2); }
.table-scroll-button:active:not(:disabled) { transform: none; }
.table-scroll-button:disabled { cursor: default; color: #709296; background: rgba(239, 247, 246, .84); border-color: rgba(84, 119, 123, .28); opacity: 1; }
.table-scroll-range {
  width: 100%;
  min-width: 0;
  height: 32px;
  min-height: 32px;
  align-self: stretch;
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: grab;
}
.table-scroll-range:active { cursor: grabbing; }
.table-scroll-range:focus-visible { outline: 3px solid rgba(21, 155, 152, .25); outline-offset: 2px; border-radius: 999px; }
.table-scroll-range::-webkit-slider-runnable-track { height: 8px; background: rgba(73, 126, 132, .2); border: 1px solid rgba(67, 113, 120, .18); border-radius: 999px; }
.table-scroll-range::-webkit-slider-thumb { width: 38px; height: 18px; margin-top: -6px; appearance: none; -webkit-appearance: none; background: #159b98; border: 2px solid rgba(255, 255, 255, .92); border-radius: 999px; box-shadow: 0 2px 8px rgba(10, 104, 101, .28); }
.table-scroll-range::-moz-range-track { height: 8px; background: rgba(73, 126, 132, .2); border: 1px solid rgba(67, 113, 120, .18); border-radius: 999px; }
.table-scroll-range::-moz-range-progress { height: 8px; background: rgba(21, 155, 152, .72); border-radius: 999px; }
.table-scroll-range::-moz-range-thumb { width: 34px; height: 16px; background: #159b98; border: 2px solid rgba(255, 255, 255, .92); border-radius: 999px; box-shadow: 0 2px 8px rgba(10, 104, 101, .28); }
.table-scroll-shell > .table-wrap { scrollbar-color: rgba(38, 117, 140, .52) rgba(220, 236, 234, .42); scrollbar-width: thin; }
.table-scroll-shell > .table-wrap::-webkit-scrollbar { height: 10px; }
.table-scroll-shell > .table-wrap::-webkit-scrollbar-track { background: rgba(220, 236, 234, .42); border-radius: 999px; }
.table-scroll-shell > .table-wrap::-webkit-scrollbar-thumb { background: rgba(38, 117, 140, .52); border: 2px solid rgba(220, 236, 234, .42); border-radius: 999px; }
@media (max-width: 1100px) {
  .table-scroll-controls { top: 188px; }
}
@media (max-width: 900px) {
  .table-scroll-controls { position: relative; top: auto; }
}
@media (max-width: 720px) {
  .table-scroll-controls { grid-template-columns: 34px minmax(0, 1fr) 34px; grid-template-rows: 32px; gap: 6px; height: 42px; min-height: 42px; margin-bottom: 7px; padding: 4px 6px; }
  .table-scroll-button { width: 34px; height: 32px; min-height: 32px; }
  .table-scroll-range { height: 32px; min-height: 32px; }
}

/* Readable interface type scale. */
small { font-size: 13px; }
.brand-copy span, .auth-user { font-size: 13px; }
.metric-label, .metric-note { font-size: 14px; }
.status-pill { font-size: 13px; }
th, .scene-table th, .ai-table th, .ai-table td, .ai-table-note { font-size: 14px; }
.field-group label { font-size: 14px; }
.scene-name .muted, .scene-code .muted, .review-summary, .scene-self-description { font-size: 14px; }
.selection-warning, .selection-ineligible .selection-warning, .field-label, .ai-evidence-option, .ai-kpi-fields .field { font-size: 13px; }
.scene-quantity-header .muted, .scene-quantity-note { font-size: 14px; }
.scene-quantity-title .status-pill, .scene-quantity-metric span, .scene-quantity-metric small { font-size: 13px; }
.ai-related { font-size: 13px; }
.ai-editor label, .nested-row label, .ai-editor .textarea, .nested-row .field { font-size: 14px; }
.ai-typical-index th, .ai-typical-index td, .ai-application-cell summary { font-size: 14px; }
.scene-self-evaluation > .muted, .ai-application-cell > .selection-locked { font-size: 14px; }
.ai-application-cell .ai-self-description { font-size: 14px; }
.catalog-table .field, .catalog-table .select { font-size: 14px; }
.section-meta, .enterprise-table .enterprise-action, .enterprise-table td .muted { font-size: 13px; }
.auth-brand span, .auth-field label, .auth-modes button { font-size: 13px; }
.assessment-kicker { font-size: 12px; }
.assessment-panel-status, .assessment-policy-note, .diagnosis-record p { font-size: 14px; }
.diagnosis-record-meta, .admin-current-enterprise small { font-size: 13px; }
.tabs .target-switch span { font-size: 13px; }
.enterprise-delete-btn { font-size: 13px; }

/* AI standard ladder: body colors show prerequisite, current, and improvement scope. */
.ai-table th.ai-standard-heading { font-weight: 800; }
.ai-table th.ai-standard-foundation { color: #0b5b5d; background: #d9efeb; box-shadow: inset 0 3px 0 #159b98; }
.ai-table th.ai-standard-basic { color: #24527b; background: #dce8f6; box-shadow: inset 0 3px 0 #4f7fb4; }
.ai-table th.ai-standard-advanced { color: #8a5814; background: #f8e8c7; box-shadow: inset 0 3px 0 #d38a28; }
.ai-table td.ai-level-description.is-in-scope.is-prerequisite { color: #29404b; background: #e6f5f2; box-shadow: inset 3px 0 0 #159b98; }
.ai-table td.ai-level-description.is-in-scope.is-current { color: #29404b; background: #eaf2fb; box-shadow: inset 3px 0 0 #4f7fb4; }
.ai-table td.ai-level-description.is-in-scope.is-improvement { color: #29404b; background: #fff4df; box-shadow: inset 3px 0 0 #d38a28; }
.ai-table td.ai-level-description.not-applicable { color: #82959c; background: rgba(239, 245, 245, .8); box-shadow: none; }

.scene-standard-line { display: block; padding: 4px 8px; border-left: 3px solid transparent; border-radius: 5px; }
.scene-standard-line + .scene-standard-line { margin-top: 6px; }
.scene-standard-line.is-prerequisite { color: #29404b; background: #e6f5f2; border-left-color: #159b98; }
.scene-standard-line.is-current { color: #29404b; background: #eaf2fb; border-left-color: #4f7fb4; }
.scene-standard-line.is-improvement { color: #29404b; background: #fff4df; border-left-color: #d38a28; }
.scene-standard-line.not-applicable { color: #82959c; background: rgba(239, 245, 245, .8); border-left-color: transparent; }

/* Admin-only scenario guide drawer and library. */
.scene-name-heading, .ai-name-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.scene-name-heading > strong, .ai-name-heading > strong { min-width: 0; overflow-wrap: anywhere; }
.guide-inline-button { flex: 0 0 auto; min-height: 30px; padding: 5px 8px; color: #0b6467; background: rgba(224, 246, 242, .78); border-color: rgba(21, 155, 152, .32); font-size: 12px; font-weight: 800; white-space: nowrap; }
.secondary-btn.guide-inline-button:hover:not(:disabled), .secondary-btn.guide-inline-button:focus-visible:not(:disabled), .secondary-btn.guide-open-button:hover:not(:disabled), .secondary-btn.guide-open-button:focus-visible:not(:disabled) { color: #fff; background: #087f83; border-color: #087f83; box-shadow: 0 5px 14px rgba(8, 127, 131, .2); }
.scenario-guide-scrim { position: fixed; inset: 0; z-index: 60; display: block; width: 100%; height: 100%; padding: 0; background: rgba(7, 30, 38, .3); border: 0; cursor: default; }
.scenario-guide-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: min(760px, 94vw); display: flex; flex-direction: column; overflow: hidden; color: #244650; background: #f8fdfc; border-left: 1px solid rgba(21, 155, 152, .3); box-shadow: -18px 0 46px rgba(5, 44, 53, .22); }
.scenario-guide-drawer[hidden], .scenario-guide-scrim[hidden] { display: none !important; }
body.guide-drawer-open { overflow: hidden; }
.scenario-guide-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex: 0 0 auto; padding: 22px 24px 18px; background: #e8f5f2; border-bottom: 1px solid rgba(21, 155, 152, .22); }
.scenario-guide-kicker { display: block; margin-bottom: 5px; color: #087f83; font-size: 11px; font-weight: 850; letter-spacing: .12em; line-height: 1.3; text-transform: uppercase; }
.scenario-guide-drawer-head h2 { margin: 0; color: #0c4655; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.scenario-guide-drawer-head p { margin: 5px 0 0; color: #54747c; font-size: 13px; line-height: 1.5; }
.scenario-guide-close { flex: 0 0 auto; color: #0c6870; background: rgba(255, 255, 255, .62); border-color: rgba(21, 155, 152, .32); font-size: 24px; }
.scenario-guide-close:hover { color: #fff; background: #087f83; border-color: #087f83; }
.scenario-guide-content { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 24px clamp(18px, 3vw, 32px) 42px; overscroll-behavior: contain; scrollbar-color: rgba(38, 117, 140, .52) rgba(220, 236, 234, .42); scrollbar-width: thin; }
.scenario-guide-content::-webkit-scrollbar { width: 10px; }
.scenario-guide-content::-webkit-scrollbar-track { background: rgba(220, 236, 234, .42); }
.scenario-guide-content::-webkit-scrollbar-thumb { background: rgba(38, 117, 140, .52); border: 2px solid rgba(220, 236, 234, .42); border-radius: 999px; }
.scenario-guide-overline { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 9px; color: #5f7d84; font-size: 13px; line-height: 1.5; }
.guide-id { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; color: #0c6870; background: #dff1ed; border: 1px solid rgba(21, 155, 152, .24); border-radius: 5px; font-size: 12px; font-weight: 850; letter-spacing: .03em; }
.scenario-guide-name { margin: 10px 0 5px; color: #0c4655; font-size: clamp(22px, 3vw, 30px); line-height: 1.25; overflow-wrap: anywhere; }
.guide-copy { margin: 7px 0 0; color: #526f77; font-size: 14px; line-height: 1.75; white-space: pre-line; overflow-wrap: anywhere; }
.guide-summary { margin: 0; color: #2f5962; font-size: 15px; font-weight: 650; }
.guide-context-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin: 20px 0 4px; }
.guide-context-item { min-width: 0; padding: 11px 12px; background: #eef8f6; border: 1px solid rgba(49, 88, 103, .14); border-top: 3px solid #78c4bd; border-radius: 6px; }
.guide-context-item span, .guide-metric-grid span, .guide-section > div > strong, .guide-system-grid > div > strong, .guide-filing-grid > div > strong { display: block; color: #65828a; font-size: 12px; font-weight: 800; line-height: 1.4; }
.guide-context-item strong { display: block; margin-top: 5px; color: #244e59; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.guide-section { margin-top: 24px; padding-top: 21px; border-top: 1px solid rgba(49, 88, 103, .16); }
.guide-section-head { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.guide-section-head > span { display: inline-grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; color: #fff; background: #087f83; border-radius: 5px; font-size: 11px; font-weight: 850; }
.guide-section-head h4 { margin: 0; color: #0c4655; font-size: 18px; line-height: 1.35; }
.guide-source-label { display: inline-flex; max-width: 100%; padding: 4px 8px; color: #8a5814; background: #fff3dd; border: 1px solid rgba(211, 138, 40, .28); border-radius: 4px; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.guide-example, .guide-evidence-note, .guide-mapping, .guide-formula, .guide-no-metric { margin-top: 12px; padding: 12px 13px; background: #f2f8f7; border-left: 3px solid #78c4bd; border-radius: 5px; }
.guide-example > strong, .guide-evidence-note > strong, .guide-mapping > strong, .guide-formula > strong, .guide-no-metric > strong { display: block; color: #315e68; font-size: 13px; }
.guide-standard-list { display: grid; gap: 9px; margin-top: 13px; }
.guide-standard-list > div { padding: 11px 12px; background: #fff; border: 1px solid rgba(49, 88, 103, .15); border-radius: 5px; }
.guide-standard-list strong { color: #315e68; font-size: 13px; }
.guide-standard-copy { margin-top: 5px; }
.guide-policy-system-note { margin-top: 12px; padding: 11px 12px; color: #6f531f; background: #fff5e4; border: 1px solid rgba(211, 138, 40, .24); border-left: 3px solid #d38a28; border-radius: 5px; }
.guide-policy-system-note strong { color: #8a5814; font-size: 13px; }
.guide-policy-system-note .guide-copy { color: #735c31; }
.guide-system-grid, .guide-filing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-system-grid > div, .guide-filing-grid > div { min-width: 0; padding: 12px; background: #fff; border: 1px solid rgba(49, 88, 103, .14); border-radius: 5px; }
.guide-mapping, .guide-formula { background: #fff8e9; border-left-color: #d38a28; }
.guide-metric-list { display: grid; gap: 10px; margin-top: 13px; }
.guide-metric-item { padding: 12px; background: #fff; border: 1px solid rgba(49, 88, 103, .15); border-radius: 6px; }
.guide-metric-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.guide-metric-head strong { color: #0c4655; font-size: 14px; overflow-wrap: anywhere; }
.guide-metric-head span { flex: 0 0 auto; color: #7a949a; font-size: 11px; }
.guide-metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 11px; }
.guide-metric-grid > div { min-width: 0; padding-top: 8px; border-top: 1px solid rgba(49, 88, 103, .12); }
.guide-metric-grid .guide-copy { margin-top: 4px; font-size: 13px; line-height: 1.6; }
.guide-phase-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.guide-phase { min-width: 0; padding: 14px; background: #eef8f6; border: 1px solid rgba(21, 155, 152, .2); border-top: 4px solid #159b98; border-radius: 6px; }
.guide-phase.next { background: #fff5e5; border-color: rgba(211, 138, 40, .24); border-top-color: #d38a28; }
.guide-phase-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin-bottom: 9px; }
.guide-phase-head h4 { margin: 0; color: #0c4655; font-size: 15px; line-height: 1.4; }
.guide-phase-head span { flex: 0 0 auto; color: #527982; font-size: 11px; font-weight: 800; white-space: nowrap; }
.guide-phase.next .guide-phase-head span { color: #8a5814; }
.guide-phase > div + div { margin-top: 10px; padding-top: 9px; border-top: 1px solid rgba(49, 88, 103, .12); }
.guide-phase .guide-copy { margin-top: 4px; font-size: 13px; line-height: 1.6; }
.guide-filing-wide { grid-column: 1 / -1; }
.guide-ai-axis-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.guide-ai-axis-grid > div { min-width: 0; padding: 11px; background: #eef4fb; border: 1px solid rgba(79, 127, 180, .22); border-radius: 5px; }
.guide-ai-axis-grid strong { color: #315d85; font-size: 13px; }
.guide-ai-axis-grid .guide-copy { font-size: 13px; line-height: 1.6; }
.guide-footnote { margin-top: 12px; color: #58747b; font-size: 13px; }
.guide-answer-section { padding-bottom: 4px; }
.guide-ai-contract { margin-top: 13px; padding: 12px 13px; background: #eaf2fb; border-left: 3px solid #4f7fb4; border-radius: 5px; }
.guide-ai-contract > strong { color: #315d85; font-size: 13px; }
.guide-ai-contract > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.guide-ai-contract span { padding: 7px 6px; color: #315d85; background: rgba(255, 255, 255, .64); border: 1px solid rgba(79, 127, 180, .18); border-radius: 4px; font-size: 12px; line-height: 1.4; text-align: center; }
.guide-common-qa { margin-top: 16px; border-top: 1px solid rgba(49, 88, 103, .15); }
.guide-common-qa summary { padding: 12px 0 4px; color: #0b6467; cursor: pointer; font-size: 13px; font-weight: 800; }
.guide-qa-list { display: grid; gap: 9px; margin-top: 10px; }
.guide-qa-list article { padding: 10px 12px; background: #fff; border: 1px solid rgba(49, 88, 103, .14); border-radius: 5px; }
.guide-qa-list article > strong { color: #315e68; font-size: 13px; line-height: 1.5; }
.guide-qa-list .guide-copy { font-size: 13px; line-height: 1.6; }
.guide-loading, .guide-loading-panel { color: #5b7b82; font-size: 14px; line-height: 1.7; }
.guide-loading { padding: 24px 4px; text-align: center; }
.guide-library-header { align-items: flex-end; }
.guide-library-header h2 { margin-top: 4px; }
.guide-library-counts { display: grid; grid-template-columns: auto auto; gap: 2px 10px; align-items: baseline; min-width: 170px; padding: 12px 14px; background: #e8f5f2; border-left: 4px solid #159b98; border-radius: 5px; }
.guide-library-counts strong { color: #0c4655; font-size: 25px; line-height: 1.1; text-align: right; }
.guide-library-counts span { color: #54747c; font-size: 12px; font-weight: 750; }
.guide-library-panel { padding: 20px; }
.guide-library-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.guide-kind-switch { display: inline-flex; gap: 4px; padding: 4px; background: #edf7f5; border: 1px solid rgba(21, 155, 152, .22); border-radius: 7px; }
.guide-kind-switch button { min-height: 38px; padding: 7px 12px; color: #4d7078; background: transparent; border: 0; border-radius: 5px; font-size: 13px; font-weight: 800; }
.guide-kind-switch button:hover { background: rgba(255, 255, 255, .72); }
.guide-kind-switch button.active { color: #fff; background: #087f83; box-shadow: 0 4px 10px rgba(8, 127, 131, .2); }
.guide-search-field { display: grid; flex: 1 1 280px; gap: 5px; min-width: 220px; color: #54747c; font-size: 12px; font-weight: 800; }
.guide-search-field .field { min-height: 40px; }
.guide-library-toolbar > .status-pill { min-height: 30px; align-self: center; }
.guide-library-context { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 12px; margin: 17px 0 14px; padding: 10px 12px; color: #54747c; background: #f2f8f7; border-left: 3px solid #78c4bd; border-radius: 5px; font-size: 13px; line-height: 1.6; }
.guide-library-context strong { color: #0c4655; }
.guide-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.guide-library-item { min-width: 0; display: flex; flex-direction: column; padding: 14px; background: #fff; border: 1px solid rgba(49, 88, 103, .15); border-radius: 6px; }
.guide-library-item-head { display: flex; align-items: center; justify-content: space-between; gap: 9px; color: #6a858b; font-size: 12px; }
.guide-library-item h3 { margin: 10px 0 4px; color: #0c4655; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.guide-library-item > p { margin: 0; color: #5a777e; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.guide-library-item-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; color: #7a949a; font-size: 12px; }
.guide-open-button { flex: 0 0 auto; min-height: 36px; padding: 7px 10px; color: #0b6467; background: #eef8f6; border-color: rgba(21, 155, 152, .27); font-size: 12px; font-weight: 800; white-space: nowrap; }
.guide-open-button span { margin-left: 3px; font-size: 15px; }
.guide-library-empty { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .scenario-guide-scrim { background: rgba(7, 30, 38, .42); }
  .scenario-guide-drawer { width: min(760px, 100vw); }
  .guide-library-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .scenario-guide-drawer-head { padding: 17px 16px 14px; }
  .scenario-guide-drawer-head h2 { font-size: 20px; }
  .scenario-guide-content { padding: 18px 15px 34px; }
  .scenario-guide-name { font-size: 24px; }
  .guide-context-grid, .guide-system-grid, .guide-filing-grid, .guide-metric-grid, .guide-phase-grid { grid-template-columns: 1fr; }
  .guide-ai-axis-grid { grid-template-columns: 1fr; }
  .guide-filing-wide { grid-column: auto; }
  .guide-ai-contract > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-library-header { align-items: stretch; flex-direction: column; }
  .guide-library-counts { width: 100%; grid-template-columns: repeat(4, auto); justify-content: start; gap: 2px 8px; }
  .guide-library-counts strong { text-align: left; }
  .guide-library-toolbar { align-items: stretch; flex-direction: column; }
  .guide-kind-switch { width: 100%; }
  .guide-kind-switch button { flex: 1 1 0; }
  .guide-search-field { min-width: 0; }
  .guide-library-toolbar > .status-pill { align-self: flex-start; }
  .guide-library-panel { padding: 16px; }
  .guide-library-item-foot { align-items: flex-start; flex-direction: column; }
  .guide-open-button { width: 100%; }
}
