/* Workspace 2: shared product shell, page compositions and component language. */
@import url('./admin-overview.css?v=20261012-overview-simple-151');
@import url('./role-config.css?v=20261012-rules-without-category-154');
@import url('./base.css') layer(legacy);
@import url('./styles.css') layer(legacy);
@import url('./vi-theme.css') layer(legacy);
@import url('./admin-theme.css') layer(legacy);
@import url('./typography.css') layer(legacy);
@import url('./knowledge-chat.css?v=20261023-no-qa-scope');
@import url('./admin-library.css?v=20261023-knowledge-library-unified');
@import url('./knowledge-metadata.css?v=20261023-knowledge-library-unified');
@import url('./admin-people.css?v=20261009-people-fit-128');
@import url('./capability-access.css?v=20261023-capability-filters-one-row');
@import url('./capability-config.css?v=20261102-no-sidebar');
@import url('./admin-rules.css?v=20261023-rule-optimization-topics');
@import url('./rule-standard-updates.css?v=20261023-standard-paper-review');
@import url('./admin-services.css?v=20261021-services-fields');
@import url('./conversation-audit.css?v=20261022-conversation-hints-removed');
@import url('./admin-conversation-record.css?v=20261022-archive-heading-simple');

:root {
  --vi-blue: #20498b; --brand: #20498b; --brand-dark: #163969; --brand-soft: #eaf1fc;
  --ink: #192a42; --ink-2: #41536b; --muted: #53657c; --faint: #66758a;
  --canvas: #edf2f7; --paper: #fff; --paper-2: #f5f8fc;
  --line: #dce4ee; --line-strong: #bacadd; --radius: 10px; --radius-lg: 18px;
  --shadow: 0 4px 18px rgb(28 50 84 / 4%);
  --text-caption: 14px; --text-body: 16px; --text-subheading: 20px; --text-section: 22px;
  --text-page: 32px; --text-metric: 36px; --text-display: clamp(36px,3.1vw,56px);
  --vi-font: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  --rail-width: 240px; --shell-height: 64px;
}
* { box-sizing: border-box; }
html,body,#root { min-height: 100%; margin: 0; }
html { scrollbar-gutter: stable; }
body { background: var(--canvas); color: var(--ink); -webkit-font-smoothing: antialiased; }
#root { font: 16px/1.65 var(--vi-font); }
:is(h1,h2,h3,h4,h5,h6) { color: var(--ink); font-weight: 600; line-height: 1.4; letter-spacing: -.025em; }
h1 { font-size: 32px; } h2 { font-size: 22px; } :is(h3,h4,h5,h6) { font-size: 20px; }
:is(button,input,select,textarea,label,td,th,p) { font-size: 16px; font-family: inherit; }
small { font-size: 14px; }
button { cursor: pointer; transition: background-color .18s, border-color .18s, box-shadow .18s; }
button:disabled { cursor: not-allowed; opacity: .55; }
button svg { flex-shrink: 0; }
:is(button,a,input,select,textarea):focus-visible { outline: 3px solid #4a83d2; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-to-content { position: fixed; z-index: 1000; left: 16px; top: 16px; padding: 12px 20px; transform: translateY(-180%); background: #fff; color: var(--brand); border: 2px solid var(--brand); border-radius: 8px; }
.skip-to-content:focus { transform: none; }

/* Controls: generous hit targets, a single primary action colour. */
:is(.primary-button,.secondary-button,.writer-new-scheme-button) { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; height: auto; padding: 11px 22px; border-radius: 10px; font-size: 16px; font-weight: 600; line-height: 1.5; white-space: nowrap; }
:is(.primary-button,.writer-new-scheme-button) { border: 1px solid var(--brand); background: var(--brand); color: white; box-shadow: 0 4px 10px #20498b16; }
:is(.primary-button,.writer-new-scheme-button):hover:not(:disabled) { background: #163969; border-color: #163969; box-shadow: 0 4px 14px #20498b26; }
.secondary-button { border: 1px solid #cbd8e8; background: #fff; color: #354f72; box-shadow: none; }
.secondary-button:hover:not(:disabled) { background: #edf3fb; border-color: #91abcd; }
:is(.text-button,.back-button) { min-height: 44px; border-radius: 8px; color: var(--brand); }
.icon-button { display: inline-grid; place-items: center; width: 44px; min-height: 44px; border-radius: 10px; }
:is(input,select,textarea) { color: var(--ink); background: #fff; border-color: var(--line-strong); border-radius: 9px; }
:is(input,textarea)::placeholder { color: #66758a; }
.field > span { margin-bottom: 10px; font-weight: 600; color: var(--ink); }
.field :is(input,select,textarea) { min-height: 48px; padding: 12px 16px; }
:is(input,textarea,select):focus { border-color: #698ebc; }
:is(.status-tag,.audit-record-category,.admin-category-state,.library-status) { min-height: 28px; height: auto; padding: 4px 10px; border-radius: 6px; font-size: var(--text-caption); line-height: 1.45; font-weight: 500; }

/* The entire platform now lives in a navy navigation rail + light workspace. */
.app-shell { display: grid; grid-template-columns: var(--rail-width) minmax(0,1fr); grid-template-rows: var(--shell-height) minmax(0,1fr); min-height: 100dvh; background: var(--canvas); }
.workspace-sidebar { grid-column: 1; grid-row: 1 / 3; position: sticky; top: 0; z-index: 45; display: flex; flex-direction: column; height: 100dvh; min-width: 0; overflow-y: auto; padding: 32px 18px 24px; color: #d0dcef; background: #122d52; }
.workspace-brand { display: flex; flex-direction: column; width: 100%; align-items: flex-start; gap: 4px; min-height: 70px; border: 0; background: transparent; color: #fff; text-align: left; padding: 0 8px 22px; }
.workspace-brand-logo { display: block; flex: 0 0 40px; width: 146px; height: 40px; overflow: hidden; }
.workspace-brand-logo img { display: block; width: 242px; max-width: none; height: 40px; filter: grayscale(1) invert(1) brightness(2); mix-blend-mode: screen; }
.workspace-brand-subtitle { display: block; color: #b6c9e3; font-size: 14px; line-height: 1.4; letter-spacing: .02em; white-space: nowrap; }
.workspace-sidebar nav { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.workspace-sidebar nav button { position: relative; display: flex; align-items: center; gap: 13px; width: 100%; min-height: 52px; padding: 14px; border: 0; border-radius: 10px; background: transparent; color: #cfdbed; font-size: 16px; text-align: left; }
.workspace-sidebar nav button > span { flex: 1; }
.workspace-sidebar nav button:hover { background: #ffffff0c; color: #fff; }
.workspace-sidebar nav button.active { background: #2b5489; color: #fff; font-weight: 600; box-shadow: inset 3px 0 #8bc9ef; }
.workspace-nav-arrow { opacity: 0; }
.workspace-sidebar nav button.active .workspace-nav-arrow { opacity: 1; }
.workspace-sidebar-footer { margin-top: auto; padding: 22px 0 0; border-top: 1px solid #ffffff20; }
.workspace-sidebar-toggle { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #ffffff20; border-radius: 10px; background: #ffffff0b; color: #d4e3f5; font-size: 15px; font-weight: 500; text-align: left; }
.workspace-sidebar-toggle:hover { background: #ffffff1b; border-color: #ffffff40; color: #fff; }
.workspace-sidebar-toggle > svg { flex: none; }
.topbar,.role-admin .topbar { grid-column: 2; grid-row: 1; position: sticky; z-index: 40; top: 0; display: flex; align-items: center; justify-content: flex-start; gap: 16px; height: var(--shell-height); min-height: var(--shell-height); padding: 0 32px; background: #fff; border: 0; border-bottom: 1px solid #dce4ee; box-shadow: none; }
.topbar::before { display: none; }
.workspace-breadcrumb { display: flex; align-items: center; gap: 13px; font-size: 14px; color: #60748f; }
.workspace-breadcrumb strong { color: var(--ink); font-size: 16px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 24px; margin-left: auto; }
.topbar .user-menu { min-width: 0; border: 0; padding: 0; }
.topbar .account-menu-trigger { min-width: 188px; height: 48px; gap: 10px; padding: 5px 9px 5px 6px; border: 1px solid #dce5f0; border-radius: 11px; background: #f8fafd; color: var(--ink); }
.topbar .account-menu-trigger:hover,.topbar .account-menu.open .account-menu-trigger { background: #eef4fc; border-color: #b5cbea; }
.topbar .account-menu-trigger:focus-visible { outline: 3px solid #4a83d2; outline-offset: 2px; }
.topbar .user-avatar { width: 36px; height: 36px; flex-basis: 36px; background: #dfeafb; color: var(--brand); border: 0; border-radius: 9px; font-size: 16px; }
.account-menu-copy { display: flex; flex: 1; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.2; }
.account-menu-copy strong { color: var(--ink); font-size: 16px; font-weight: 650; }
.topbar .account-current-role { display: block; margin: 0; color: #637791; font-size: 13px; font-weight: 500; }
.topbar .account-menu-trigger > svg { width: 16px; height: 16px; margin-left: 4px; color: #526c90; }
.topbar .account-dropdown { top: calc(100% + 10px); width: 300px; max-width: calc(100vw - 32px); border-radius: 14px; padding: 8px; border: 1px solid var(--line); box-shadow: 0 16px 48px #122d5226; }
.account-role-option { border-radius: 9px; }
.admin-service-health { font-size: 14px; color: #446c58; }
.app-main,.role-admin .app-main { grid-column: 2; grid-row: 2; display: block; min-width: 0; }
.content-area,.role-admin .content-area { min-width: 0; background: transparent; }
.content-area:not(.page-review):not(.page-expertReview):not(.page-document):not(.page-chat):not(.page-knowledge):not(.page-rules):not(.page-conversationAudit) { min-height: calc(100dvh - var(--shell-height)); padding: 36px clamp(24px,3vw,52px) 56px; }
.content-area::before,.writer-workbench::before,.dashboard-home::after { display: none; }
.content-area:is(.page-review,.page-expertReview,.page-document,.page-chat) { height: calc(100dvh - var(--shell-height)); min-height: 0; padding: 0; overflow: hidden; }
.app-shell.navigation-collapsed { --rail-width: 84px; }
.navigation-collapsed .workspace-sidebar { padding: 24px 12px; }
.navigation-collapsed .workspace-brand { align-items: center; padding: 0 0 24px; }
.navigation-collapsed .workspace-brand-logo { width: 40px; }
.navigation-collapsed :is(.workspace-brand-subtitle,.workspace-sidebar-toggle > span,.workspace-sidebar nav button > span,.workspace-nav-arrow) { display: none; }
.navigation-collapsed .workspace-sidebar nav { margin-top: 24px; }
.navigation-collapsed .workspace-sidebar nav button { justify-content: center; min-height: 52px; padding: 14px; }
.navigation-collapsed .workspace-sidebar-footer { padding: 20px 0 0; }
.navigation-collapsed .workspace-sidebar-toggle { justify-content: center; padding: 12px; }

/* Common page anatomy: purposeful heading, flexible work surface. */
:is(.writer-workbench,.admin-page,.admin-category-hub,.admin-category-editor,.project-detail-page,.preaudit-page,.audit-records-page,.problem-report-page,.review-progress-page),.role-admin .admin-page { width: 100%; max-width: 1440px; margin: 0 auto; background: transparent; }
:is(.admin-ops-heading,.admin-module-heading,.admin-page-heading,.page-intro,.category-review-header,.project-workspace-header,.problem-report-header,.review-progress-header) { min-height: 0; padding: 0; margin: 0 0 28px; border: 0; }
:is(.writer-workbench-heading,.admin-ops-heading)::after { display: none; }
:is(.writer-workbench-heading,.admin-ops-heading,.admin-module-heading,.admin-page-heading,.page-intro,.category-review-header,.project-heading-main,.problem-report-header,.review-progress-header) h1 { margin: 0; color: var(--ink); font-size: 32px; line-height: 1.45; font-weight: 600; }
:is(.admin-ops-heading,.admin-module-heading,.admin-page-heading,.category-review-header) p { margin-top: 10px; color: var(--muted); font-size: 16px; line-height: 1.7; }
:is(.admin-overview-eyebrow,.admin-module-heading > div > span) { display: none; }

/* Workbench: one clear primary action and aligned project information. */
.writer-workbench { display: block; min-height: 0; padding: 0; }
.workbench-introduction { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.writer-workbench-heading { display: block; min-width: 0; padding: 0; margin: 0; border: 0; min-height: 0; }
.writer-workbench-heading h1 { font-size: 30px; margin: 0; line-height: 1.4; }
.writer-workbench-heading p { margin: 8px 0 0; color: #566b85; font-size: 16px; line-height: 1.6; }
.workbench-introduction > .writer-new-scheme-button { flex: none; min-height: 46px; padding: 10px 20px; border-radius: 8px; box-shadow: none; }
.writer-panel.writer-recent-panel { background: #fff; border: 1px solid #dce5ef; border-radius: 12px; min-height: 0; box-shadow: 0 3px 16px #18325004; overflow: hidden; }
.writer-panel-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: nowrap; gap: 20px; margin: 0; padding: 18px 24px; background: #fff; border: 0; }
.workbench-list-title { display: flex; flex: none; align-items: center; gap: 10px; white-space: nowrap; }
.writer-panel-heading h2 { margin: 0; color: var(--ink); font-size: 20px; font-weight: 600; }
.writer-panel-heading .workbench-count { color: #66758a; background: transparent; margin: 0; padding: 0; border-radius: 0; font-size: 14px; font-weight: 400; }
.workbench-filters { display: flex; flex: 0 1 462px; align-items: center; flex-wrap: nowrap; gap: 10px; min-width: 0; max-width: 100%; }
.workbench-category-filter { flex: 0 0 132px; width: 132px; height: 44px; min-width: 0; padding: 8px 12px; border: 1px solid #d7e1ec; border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.workbench-category-filter:focus { border-color: #7095c2; }
.workbench-search { display: flex; flex: 1; align-items: center; gap: 10px; width: 320px; min-width: 0; max-width: 100%; padding: 0 12px; border: 1px solid #d7e1ec; border-radius: 8px; background: #f8fafc; color: #53657c; }
.workbench-search:focus-within { background: #fff; border-color: #7095c2; box-shadow: 0 0 0 3px #20498b14; }
.workbench-search input { height: 42px; min-height: 42px; width: 100%; min-width: 0; padding: 8px 0; border: 0; background: transparent; outline: 0; font-size: 14px; }
.workbench-list-columns,.writer-recent-item { display: grid; grid-template-columns: minmax(0,1fr) 112px 88px 152px 64px; align-items: center; gap: 20px; padding-inline: 24px; }
.workbench-list-columns { min-height: 44px; border-block: 1px solid #e8edf3; background: #f8fafc; color: #62748c; font-size: 14px; }
.workbench-list-columns > span:last-child { text-align: right; }
.writer-recent-list { display: block; list-style: none; margin: 0; padding: 0; }
.writer-recent-list > li { min-width: 0; margin: 0; padding: 0; }
.writer-recent-list > li + li { border-top: 1px solid #edf1f6; }
.writer-recent-item { width: 100%; height: auto; min-height: 88px; padding-block: 18px; background: #fff; color: var(--ink); border: 0; border-radius: 0; box-shadow: none; text-align: left; }
.writer-recent-item:hover { background: #f4f8fd; box-shadow: none; }
.writer-recent-item:focus-visible { position: relative; z-index: 1; outline: 2px solid #4a83d2; outline-offset: -3px; }
.workbench-project-name { display: flex; align-items: center; gap: 14px; min-width: 0; }
.writer-recent-file { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 44px; border: 0; border-radius: 8px; background: #eff4fb; color: #345f98; }
.writer-recent-copy { display: block; min-width: 0; flex: 1; }
.writer-recent-copy strong { display: block; white-space: normal; overflow-wrap: anywhere; font-size: 16px; line-height: 1.6; font-weight: 600; color: var(--ink); }
.writer-recent-copy small { display: block; margin-top: 3px; color: #6a7a90; font-size: 14px; line-height: 1.5; }
.workbench-project-details { display: contents; }
.workbench-category { justify-self: start; padding: 3px 9px; border-radius: 5px; color: #526a8a; background: #f0f4f9; font-size: 14px; line-height: 1.5; white-space: nowrap; }
.workbench-version { color: #475f7d; font-size: 14px; font-weight: 500; }
.workbench-version.is-draft { color: #8d6317; }
.workbench-updated { color: #62748c; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.workbench-open { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-height: 44px; color: var(--brand); font-size: 14px; font-weight: 500; white-space: nowrap; }
.writer-recent-panel > .audit-record-empty { border: 0; border-top: 1px solid #edf1f6; border-radius: 0; background: #fff; }

.audit-record-empty { display: grid; align-content: center; justify-items: center; min-height: 260px; gap: 12px; padding: 40px 24px; border: 1px dashed #bdcddd; border-radius: 16px; background: #ffffff94; color: #526984; }

/* A reusable visual journey carries creation through to the problem report. */
.review-journey { display: flex; flex-direction: column; list-style: none; margin: 0; padding: 0; gap: 32px; }
.review-journey li { position: relative; display: flex; gap: 14px; align-items: flex-start; color: #64758c; }
.review-journey li:not(:last-child)::after { position: absolute; content: ""; left: 21px; width: 1px; top: 52px; bottom: -22px; background: #cfdae8; }
.journey-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border: 1px solid #cbd8e8; border-radius: 12px; background: #f7f9fd; color: #617795; }
.review-journey strong { display: block; padding-top: 6px; font-size: 16px; color: #516781; font-weight: 500; }
.review-journey p { margin: 7px 0 0; font-size: 14px; line-height: 1.75; color: #64758c; }
.review-journey .current .journey-icon { color: #fff; background: #20498b; border-color: #20498b; box-shadow: 0 4px 12px #20498b20; }
.review-journey .current strong { color: #20498b; font-weight: 600; }
.review-journey .done .journey-icon { color: #247259; background: #eaf6f0; border-color: #c3dece; }
.review-journey.compact { flex-direction: row; padding: 20px 24px; gap: 28px; background: #f7faff; border: 1px solid #dce5f0; border-radius: 12px; margin: 0 0 24px; }
.review-journey.compact li { flex: 1; align-items: center; gap: 12px; }
.review-journey.compact li::after { display: none; }
.review-journey.compact strong { padding: 0; }
.review-journey.compact p { display: none; }

.project-detail-page:has(> .project-summary-bar) { display: grid; grid-template-columns: minmax(0,1fr) 280px; grid-template-areas: "heading heading" "banner banner" "upload summary" "history history"; gap: 0 28px; }
.project-detail-page > .project-workspace-header { grid-area: heading; }
.project-detail-page > .project-rejected-banner { grid-area: banner; margin-bottom: 24px; }
.project-detail-page > .project-summary-bar { grid-area: summary; align-self: start; margin: 0; border: 1px solid #dce5f0; border-radius: 16px; background: #f8fbff; }
.project-summary-bar dl { grid-template-columns: 1fr; padding: 8px 0; }
.project-summary-bar dl > div { padding: 16px 24px; border: 0; }
.project-summary-bar dl > div + div { border: 0; }
.project-summary-bar dt { font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.project-summary-bar dd { font-size: 16px; font-weight: 500; white-space: normal; overflow-wrap: anywhere; }
.project-detail-page > .project-version-workspace { grid-area: upload; display: block; min-width: 0; }
.project-detail-page > .project-version-history { grid-area: history; margin-top: 28px; }
.project-workspace-header { padding: 0 0 6px; }
.project-header-navigation { font-size: 14px; margin-bottom: 16px; }
.project-heading-main h1 { white-space: normal; overflow-wrap: anywhere; }
:is(.project-heading-icon,.project-upload-icon,.project-create-icon) { border-radius: 12px; background: #e6eef9; color: #20498b; }
:is(.project-version-upload,.project-version-history,.admin-panel) { background: #fff; border: 1px solid #dce5f0; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
:is(.project-upload-heading,.project-history-heading) { padding: 24px 28px; background: #fff; border-bottom: 1px solid var(--line); }
:is(.project-upload-heading,.project-history-heading) h2 { font-size: 22px; }
:is(.upload-zone,.upload-dropzone,.project-upload-dropzone,.standard-file-picker) { background: #f4f8fe; border: 1px dashed #98b3d4; border-radius: 12px; }
:is(.upload-zone,.upload-dropzone,.project-upload-dropzone,.standard-file-picker):hover { border-color: #20498b; background: #edf4fd; }
.project-version-upload .upload-zone { width: calc(100% - 48px); min-height: 230px; margin: 24px; padding: 32px 24px; }
.project-version-upload .upload-zone.has-file { background: #eef7f3; border-color: #91bba8; }
.project-upload-footer { padding: 22px 28px; background: #f8fafd; border-top: 1px solid var(--line); }
.project-detail-simple { display: block; padding: 0; }
.project-detail-simple > .project-workspace-header { gap: 12px; padding: 0; margin-bottom: 24px; border: 0; background: transparent; box-shadow: none; }
.project-detail-simple .project-header-navigation { margin: 0; }
.project-detail-simple .project-header-navigation .app-back-button { min-height: 44px; padding: 0 8px 0 0; border: 0; border-radius: 6px; background: transparent; box-shadow: none; font-size: 14px; }
.project-detail-simple .project-header-navigation .app-back-button:hover { color: var(--brand); background: #e5edf7; }
.project-detail-simple .app-back-button-icon { width: 24px; height: 24px; background: transparent; }
.project-detail-simple .project-heading-main h1 { font-size: 28px; line-height: 1.45; }
.project-detail-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 10px; color: #62748c; font-size: 14px; }
.project-detail-simple .project-heading-main p { margin: 10px 0 0; color: var(--muted); font-size: 16px; }
.project-detail-simple :is(.project-version-upload,.project-version-history) { border-radius: 12px; box-shadow: none; }
.project-detail-simple > .project-version-history { margin-top: 24px; }
.project-detail-simple :is(.project-upload-heading,.project-history-heading) { padding: 20px 24px; }
.project-detail-simple .project-upload-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.project-detail-simple :is(.project-upload-heading,.project-history-heading) h2 { font-size: 20px; font-weight: 600; }
.project-detail-simple .project-upload-heading p { margin-top: 6px; font-size: 14px; line-height: 1.6; }
.project-detail-simple .upload-zone { min-height: 144px; margin: 20px 24px; padding: 24px; border-radius: 8px; background: #f8fafd; }
.project-detail-simple .upload-zone.has-file { min-height: 100px; flex-wrap: wrap; }
.project-detail-simple .upload-zone.has-file > strong { white-space: normal; overflow-wrap: anywhere; }
.project-detail-simple .project-upload-footer { padding: 16px 24px; flex-wrap: wrap; background: #fff; }
.scheme-audit-page { width: 100%; max-width: 1100px; margin: 0 auto; }
.scheme-audit-name { padding: 24px 24px 0; }
.scheme-audit-name .field { display: flex; flex-direction: column; gap: 10px; }
.scheme-audit-name .field > span, .scheme-audit-file-label { font-size: 16px; font-weight: 500; color: var(--ink); }
.scheme-audit-name .field > span { margin: 0; }
.scheme-create-settings { display: grid; gap: 22px; padding: 22px 24px 0; }
.scheme-create-settings .field { display: flex; flex-direction: column; gap: 10px; }
.scheme-version-method { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 0; }
.scheme-version-method > span { margin: 0; font-size: 16px; font-weight: 500; color: var(--ink); }
.scheme-create-settings .field > span { margin: 0; font-size: 16px; font-weight: 500; }
.scheme-create-settings select { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.scheme-create-settings select:focus-visible, .scheme-method-options button:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.scheme-create-settings b { color: #b54840; }
.scheme-method-options { display: flex; flex-wrap: wrap; gap: 12px; }
.scheme-method-options button { min-height: 44px; padding: 10px 22px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink-2); font: inherit; cursor: pointer; }
.scheme-method-options button[aria-pressed=true] { border-color: var(--brand); color: var(--brand); background: #edf4fc; font-weight: 600; }
.scheme-conversation-intro, .scheme-package-empty { color: var(--muted); font-size: 14px; line-height: 1.7; }
.scheme-conversation-intro { margin: 20px 24px; }
.scheme-package-empty { margin: -10px 0 0; }
.scheme-audit-name input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.scheme-audit-name input:read-only { background: #f8fafd; }
.scheme-audit-name input:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.scheme-audit-name b, .scheme-audit-file-label b { color: #b54840; }
.scheme-audit-file-label { padding: 20px 24px 0; }
.scheme-audit-page .upload-zone { margin-top: 12px; }
.scheme-audit-page .project-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.scheme-audit-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 12px; margin-left: auto; }
@media (max-width: 700px) { .scheme-audit-name { padding: 20px 16px 0; } .scheme-audit-file-label { padding: 20px 16px 0; } .scheme-audit-page .upload-zone { width: calc(100% - 32px); margin-left: 16px; margin-right: 16px; } .scheme-audit-actions { width: 100%; } }
@media (max-width: 700px) { .scheme-create-settings, .scheme-version-method { padding: 20px 16px 0; } .scheme-conversation-intro { margin: 20px 16px; } }
.project-detail-simple .project-history-count { font-size: 14px; font-weight: 400; color: var(--muted); }
.project-detail-simple .project-version-table { min-width: 840px; }
.project-detail-simple .project-version-table th:nth-child(2) { width: 32%; }
.project-detail-simple .project-version-table :is(th,td):nth-child(n+3) { white-space: nowrap; }
.project-detail-simple .project-version-table th { padding: 12px 20px; background: #f8fafc; }
.project-detail-simple .project-version-table td { padding: 16px 20px; }
.review-progress-workspace { padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
.review-progress-status h2 { color: var(--ink); }
.review-progress-card { border-radius: 12px; background: #f5f8fc; box-shadow: none; }
.writer-review-progress-page { width: min(900px,100%); min-height: 0; overflow: visible; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.writer-review-progress-page .writer-progress-header { display: block; min-height: 0; margin: 0 0 24px; padding: 0; border: 0; background: transparent; }
.writer-progress-header .app-back-button { padding: 0 10px 0 0; border: 0; border-radius: 8px; background: transparent; font-size: 14px; }
.writer-progress-header .app-back-button-icon { width: 28px; height: 28px; flex-basis: 28px; background: #dfe9f6; }
.writer-progress-heading { min-width: 0; margin-top: 20px; }
.writer-progress-heading > span { color: var(--brand); font-size: 14px; font-weight: 600; }
.writer-progress-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 5px; }
.writer-progress-title-row h1 { margin: 0; font-size: 32px; line-height: 1.4; }
.writer-progress-heading > p { margin: 7px 0 0; color: var(--muted); font-size: 16px; overflow-wrap: anywhere; }
.writer-progress-panel { padding: 38px 40px 34px; border: 1px solid #d7e2ef; border-radius: 18px; background: #fff; box-shadow: 0 12px 32px #18375f0b; }
.writer-progress-summary { display: flex; align-items: flex-start; gap: 20px; }
.writer-progress-icon { display: grid; width: 60px; height: 60px; flex: 0 0 60px; place-items: center; border-radius: 14px; background: #e7effa; color: var(--brand); }
.writer-progress-eyebrow { color: var(--brand); font-size: 14px; font-weight: 600; }
.writer-progress-summary h2 { margin: 5px 0 8px; color: var(--ink); font-size: 26px; line-height: 1.4; }
.writer-progress-summary p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.writer-progress-meter { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.writer-progress-meter-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.writer-progress-meter-heading span { color: var(--ink-2); font-size: 16px; font-weight: 600; }
.writer-progress-meter-heading strong { color: var(--brand); font-size: 32px; line-height: 1; font-variant-numeric: tabular-nums; }
.writer-progress-meter .review-progress-bar { height: 12px; margin-top: 17px; background: #e8eef6; }
.writer-progress-meter .review-progress-bar > span { background: linear-gradient(90deg,#1d4b8b,#3e7dc7); }
.writer-progress-meter > p { display: flex; align-items: center; gap: 8px; margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.writer-progress-meter > p svg { flex: none; color: #2b7a61; }
.writer-progress-report-button { margin-top: 26px; }

/* Report is a readable question ledger with a document preview. */
.problem-report-page { max-width: 1440px; }
.problem-report-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0; }
.problem-report-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.problem-report-header h1 { margin: 12px 0 8px; }
.problem-report-header p { color: #526a87; font-size: 16px; }
.problem-report-layout { gap: 24px; }
.problem-report-list { background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.problem-list-heading { display: flex; align-items: flex-start; padding: 6px 0 22px; margin: 0; background: transparent; border: 0; }
.problem-list-heading h2 { font-size: 22px; color: var(--ink); }
.problem-list-heading h2 span { margin-left: 10px; padding: 4px 10px; color: #20498b; background: #dfe9f8; border-radius: 6px; font-size: 14px; }
.problem-list-heading p { font-size: 14px; color: #53657c; margin-top: 8px; }
.problem-groups { display: grid; gap: 30px; }
.problem-group-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 14px; }
.problem-group-heading > div { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.problem-group-heading h3 { margin: 0; font-size: 20px; }
.problem-group-heading span { padding: 3px 9px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.problem-group-heading small { color: var(--muted); font-size: 14px; }
.priority-important .problem-group-heading span { color: #a64032; background: #fff0ed; }
.priority-general .problem-group-heading span { color: #365c88; background: #e9f1fb; }
.problem-items { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.problem-items > li { overflow: hidden; border: 1px solid #dbe5f0; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px #152f5103; }
.problem-items > li + li { border-top: 1px solid #dbe5f0; }
.priority-important .problem-items > li { border-left: 3px solid #c65947; }
.priority-general .problem-items > li { border-left: 3px solid #8aa8cb; }
.problem-items > li.is-expanded { border-color: #9ab5d7; background: #fff; }
.problem-item-heading { min-height: 88px; padding: 20px; gap: 14px; align-items: center; flex-wrap: wrap; }
.problem-item-summary { display: flex; flex: 1 1 320px; align-items: center; gap: 14px; min-width: 0; }
.problem-item-summary strong { color: var(--ink); font-size: 16px; font-weight: 600; line-height: 1.65; overflow-wrap: anywhere; }
.problem-item-actions { display: flex; flex: none; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.problem-detail-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 13px; border: 1px solid #c8d8eb; border-radius: 8px; background: #fff; color: var(--brand); font-size: 14px; font-weight: 600; }
.problem-detail-button:hover { background: #edf4fd; border-color: #91afd2; }
.problem-item-toggle { min-height: 44px; align-items: flex-start; gap: 14px; }
.problem-item-toggle strong { padding-top: 2px; font-size: 16px; line-height: 1.8; font-weight: 600; }
.problem-number { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #eef3fa; color: #4c6b94; font-size: 14px; }
.is-expanded .problem-number { background: #20498b; color: #fff; }
.problem-detail { padding: 0 24px 24px 66px; }
.problem-detail > p { padding-top: 12px; border-top: 1px solid #e7edf5; color: #3c516d; font-size: 16px; line-height: 1.9; }
.problem-explanation { padding-top: 16px; border-top: 1px solid #e7edf5; }
.problem-explanation > strong,.problem-judgment > strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.problem-explanation > p,.problem-judgment > p { margin: 8px 0 0; color: #3c516d; font-size: 16px; line-height: 1.8; }
.problem-judgment { margin: 18px 0; padding: 16px 18px; border: 1px solid #dce7f4; border-radius: 10px; background: #f7faff; }
.problem-judgment > small { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid #dce7f4; color: #53657c; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.problem-excerpt { border-radius: 0 10px 10px 0; border-left: 3px solid #b6cae6; background: #f3f7fc; }
.problem-detail-backdrop { position: fixed; z-index: 250; inset: 0; display: grid; place-items: center; padding: 24px; background: #102a4b99; backdrop-filter: blur(4px); }
.problem-detail-dialog { display: flex; width: min(760px,100%); max-height: calc(100dvh - 48px); flex-direction: column; overflow: hidden; border: 1px solid #d4e1f0; border-radius: 18px; background: #fff; box-shadow: 0 28px 90px #0f294744; }
.problem-detail-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 26px 30px 22px; border-bottom: 1px solid var(--line); }
.problem-detail-dialog-header h2 { margin: 10px 0 0; font-size: 24px; line-height: 1.5; }
.problem-detail-close { flex: none; background: #f1f5fa; }
.problem-detail-priority { display: inline-flex; padding: 4px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; }
.problem-detail-priority.priority-important { color: #a64032; background: #fff0ed; }
.problem-detail-priority.priority-general { color: #365c88; background: #e9f1fb; }
.problem-detail-dialog-body { overflow-y: auto; padding: 4px 30px; }
.problem-detail-dialog-body > section { padding: 20px 0; border-bottom: 1px solid #e7edf5; }
.problem-detail-dialog-body > section:last-child { border-bottom: 0; }
.problem-detail-dialog-body h3 { margin: 0; color: var(--ink); font-size: 16px; }
.problem-detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.problem-detail-section-action { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 12px; border: 1px solid #c8d8eb; border-radius: 8px; background: #f5f9fe; color: var(--brand); font-size: 14px; font-weight: 600; white-space: nowrap; }
.problem-detail-section-action:hover { background: #eaf2fc; border-color: #91afd2; }
.problem-detail-dialog-body p { margin: 8px 0 0; color: #3c516d; font-size: 16px; line-height: 1.8; }
.problem-detail-dialog-body blockquote { margin: 12px 0 0; padding: 13px 16px; border-left: 3px solid #a9c2e3; border-radius: 0 8px 8px 0; background: #f4f8fd; color: #41536b; font-size: 15px; line-height: 1.8; }
.problem-detail-dialog-body small { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.problem-original-panel { margin-top: 14px; padding: 16px 18px; border: 1px solid #d7e3f1; border-radius: 10px; background: #f7faff; }
.problem-original-panel > strong { color: var(--ink); font-size: 14px; }
.problem-original-panel p { font-size: 14px; }
.problem-original-panel blockquote { background: #fff; }
.problem-detail-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 18px 30px; border-top: 1px solid var(--line); background: #fbfcfe; }
.report-preview-backdrop { position: fixed; z-index: 250; inset: 0; display: grid; place-items: center; padding: 24px; background: #102a4b99; backdrop-filter: blur(4px); }
.report-preview-dialog { display: flex; width: min(980px,100%); max-height: calc(100dvh - 48px); flex-direction: column; overflow: hidden; border: 1px solid #d4e1f0; border-radius: 18px; background: #fff; box-shadow: 0 28px 90px #0f294744; }
.report-preview-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 20px 28px; border-bottom: 1px solid var(--line); }
.report-preview-dialog-header h2 { margin: 0; color: var(--ink); font-size: 21px; }
.report-preview-dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 14px; }
.report-preview-close { flex: none; background: #f1f5fa; }
.report-preview-scroll { min-height: 0; overflow-y: auto; padding: 26px; background: #edf2f7; }
.report-preview-paper { max-width: 820px; margin: 0 auto; padding: 42px 48px 50px; background: #fff; border: 1px solid #dce4ee; box-shadow: 0 8px 28px #17375f0b; }
.report-preview-paper-header { padding-bottom: 28px; text-align: center; border-bottom: 2px solid #20498b; }
.report-preview-paper-header > span { color: #4a6485; font-size: 13px; letter-spacing: .08em; }
.report-preview-paper-header h3 { margin: 16px 0 10px; color: var(--ink); font-size: 30px; }
.report-preview-paper-header p { margin: 0; color: #405773; font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.report-preview-paper-header small { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.report-preview-overview { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; padding: 20px 0 12px; color: #49617d; font-size: 14px; }
.report-preview-overview strong { color: var(--ink); font-size: 16px; }
.report-preview-group { padding-top: 18px; }
.report-preview-group > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 10px; border-bottom: 1px solid #dbe5f0; }
.report-preview-group > header h4 { margin: 0; color: var(--ink); font-size: 19px; }
.report-preview-group > header span { color: var(--muted); font-size: 13px; }
.report-preview-entry { padding: 22px 0; border-bottom: 1px solid #e7edf5; }
.report-preview-entry h5 { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; color: var(--ink); font-size: 17px; line-height: 1.6; }
.report-preview-entry h5 span { display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 6px; background: #e8f0fb; color: var(--brand); font-size: 13px; }
.report-preview-entry dl { display: grid; gap: 13px; margin: 0; }
.report-preview-entry dl > div { display: grid; grid-template-columns: 84px minmax(0,1fr); gap: 14px; }
.report-preview-entry dt { color: #53657c; font-size: 14px; font-weight: 600; }
.report-preview-entry dd { margin: 0; color: #354b66; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.report-preview-entry dd small { display: block; margin-top: 5px; color: #63758c; font-size: 13px; }
.report-preview-entry blockquote { margin: 9px 0 0; padding: 10px 14px; border-left: 3px solid #a9c2e3; background: #f5f8fc; color: #405773; }
.report-preview-empty { margin: 24px 0 0; color: var(--muted); text-align: center; }
.report-preview-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--line); background: #fbfcfe; }
.report-preview-dialog-header p { overflow-wrap: anywhere; }
.original-preview-paper .report-preview-paper-header h3 { font-size: 25px; line-height: 1.6; }
.original-preview-section { padding-top: 28px; color: #354b66; font-size: 15px; line-height: 1.9; }
.original-preview-section h4 { margin: 0 0 16px; color: var(--ink); font-size: 19px; }
.original-preview-section p { margin: 0 0 14px; }
.original-preview-section ul { padding-left: 24px; }
.original-preview-section img { display: block; max-width: 100%; height: auto; margin: 20px auto; }
.original-preview-section footer { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 13px; }
.original-preview-dialog .admin-uploaded-file-preview { padding: 0; background: transparent; }
.original-preview-dialog .admin-uploaded-file-preview > object { height: 60dvh; min-height: 240px; }

/* Expert desktop: a document canvas surrounded by calm, separate reading tools. */
:is(.audit-workspace,.review-workspace,.review-results-panel,.document-workspace) { background: #e7edf5; }
.task-context { padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.task-title-row h2 { font-size: 20px; }
:is(.outline-panel,.review-panel,.chat-context-panel,.citation-panel) { background: #f9fbfe; border-color: #d5dfec; }
:is(.outline-header,.document-toolbar,.review-panel-header,.review-panel-titlebar,.expert-ai-assistant-header,.review-results-header) { background: #f9fbfe; border-color: #d5dfec; padding: 18px 20px; }
.document-paper { background: #fff; color: #283d56; border-radius: 4px; box-shadow: 0 6px 24px #223e6310; }
.document-paper p { font-size: 16px; line-height: 1.9; }
:is(.review-result-card,.issue-card,.review-issue-card) { padding: 20px; border: 1px solid #d9e3ef; border-radius: 14px; background: #fff; box-shadow: 0 3px 10px #152f5104; }
:is(.review-result-tabs,.expert-review-status-filter) { padding: 4px; background: #e8eef7; border-radius: 10px; gap: 4px; }
:is(.review-result-tabs,.expert-review-status-filter) button { border-radius: 7px; min-height: 44px; }
.review-submit-bar { padding: 18px 24px; background: #fff; border-top: 1px solid #d1ddec; box-shadow: 0 -4px 16px #16376106; }

/* Knowledge and rules use a full-height library and paper reading surface. */
.content-area:is(.page-knowledge,.page-rules),.role-admin .content-area:is(.page-knowledge,.page-rules) { height: calc(100dvh - var(--shell-height)); min-height: 620px; padding: 20px; background: var(--canvas); }
:is(.kb-reader-shell,.kb-admin-workspace) { width: 100%; max-width: none; height: 100%; min-height: 0; border: 1px solid #d7e2ef; border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
:is(.kb-reader-toolbar,.kb-admin-toolbar) { min-height: 88px; padding: 20px 24px; background: #fff; border-bottom: 1px solid #dbe5ef; gap: 16px; }
.kb-reader-toolbar-title strong { font-size: 22px; color: var(--ink); }
.kb-reader-toolbar-title > span { width: 46px; height: 46px; border-radius: 12px; background: #eaf1fc; color: #20498b; }
:is(.kb-reader-category-picker,.kb-reader-search) { border-radius: 9px; background: #fff; border-color: #ccd9e9; }
:is(.kb-reader-files,.kb-admin-files) { background: #f4f7fc; border-color: #d8e2ee; }
:is(.kb-reader-pane-heading,.kb-reader-chat-heading,.kb-reader-preview-heading) { min-height: 76px; padding: 18px 20px; border-color: #d8e2ee; background: transparent; }
.kb-reader-file { min-height: 80px; height: auto; padding: 16px; border: 1px solid transparent; border-radius: 10px; margin-bottom: 8px; }
.kb-reader-file strong { font-size: 16px; line-height: 1.65; }
.kb-reader-file:hover { background: #eaf0f8; }
.kb-reader-file.active { border-color: #c2d2e9; background: #fff; box-shadow: inset 3px 0 #20498b,0 3px 8px #18395e05; }
.kb-reader-preview { background: #e9eef5; }
.kb-reader-preview-scroll { padding: 28px; }
:is(.kb-reader-paper,.kb-admin-paper) { max-width: 820px; margin: 0 auto; padding: 36px clamp(24px,3vw,48px); border: 1px solid #dfe6ef; border-radius: 4px; background: #fff; box-shadow: 0 6px 20px #122d5208; }
:is(.kb-reader-paper,.kb-admin-paper) > header { padding-bottom: 28px; border-bottom: 1px solid #dbe5ef; }
:is(.kb-reader-paper,.kb-admin-paper) > header h1 { font-size: 26px; color: var(--ink); line-height: 1.65; }
.kb-reader-paper-section-title h2 { color: var(--ink); font-size: 20px; }
.kb-reader-paper p { color: #41536b; font-size: 16px; line-height: 1.95; }
.kb-reader-paper-summary { border: 0; border-radius: 10px; background: #f2f6fc; padding: 20px; }
.kb-reader-paper > section.active { background: #f7faff; border-color: #d5e3f5; border-radius: 10px; }
.kb-admin-space-switch { background: #eaf0f8; border: 0; border-radius: 10px; padding: 4px; }
.kb-admin-space-switch button { min-height: 44px; border-radius: 7px; }
.kb-admin-space-switch button.active { background: #fff; color: #20498b; box-shadow: 0 2px 6px #20498b12; }
.kb-admin-space-switch button.active b { background: #eaf1fc; color: #20498b; }
.rules-admin-rule-item { border-radius: 10px; background: #f7faff; border-color: #dce6f3; padding: 16px; }

/* Admin page context lives in the shell breadcrumb; tools stay beside their data. */
.admin-category-list-heading { flex-wrap: wrap; margin: 0 0 16px; }
.admin-category-list-heading .admin-resource-search { margin-left: auto; }
.admin-category-list-heading .primary-button { flex-shrink: 0; }
.kb-admin-toolbar .kb-admin-upload-button { margin-left: auto; }
.admin-audit-detail-page .admin-audit-facts { border-top: 1px solid var(--line); border-radius: 14px; }
.admin-audit-facts > .admin-audit-project-fact { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
.admin-audit-project-fact :is(strong,small) { font-size: 16px; }
.admin-audit-project-fact small { color: var(--muted); }
.admin-audit-project-fact .status-tag { margin-left: auto; }
@media (max-width: 600px) {
  .admin-category-list-heading .admin-resource-search { margin-left: 0; }
  .admin-category-list-heading > .primary-button { align-self: flex-start; }
  .kb-admin-toolbar .kb-admin-upload-button { margin-left: 0; }
}

/* Business ledger uses the shared brand, with readable totals and a scrollable table. */
.admin-statistics-ledger { min-width: 0; padding: 28px; margin-bottom: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); box-shadow: var(--shadow); }
.admin-ledger-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.admin-ledger-heading h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0; font-size: 22px; }
.admin-ledger-heading p { margin: 8px 0 0; color: var(--muted); font-size: 16px; }
.admin-ledger-demo { padding: 4px 9px; border-radius: 6px; background: #f0f4f9; color: var(--muted); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.admin-ledger-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; padding: 24px 0; margin-top: 8px; border-bottom: 1px solid var(--line); }
.admin-ledger-filters label,.admin-ledger-period-field { display: flex; flex-direction: column; gap: 8px; min-width: 130px; }
.admin-ledger-filters label > span,.admin-ledger-period-field > span { font-size: 14px; color: var(--ink-2); }
.admin-ledger-filters :is(input,select) { width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); background: #fff; font-size: 16px; }
.admin-ledger-filters input { max-width: 132px; }
.admin-ledger-mode { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #f0f4f9; }
.admin-ledger-mode button { min-height: 40px; padding: 8px 18px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 16px; }
.admin-ledger-mode button:hover { background: #e0e9f6; }
.admin-ledger-mode button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.admin-ledger-reset { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px; padding: 8px 14px; border: 0; background: transparent; }
.admin-ledger-reset:hover { background: var(--brand-soft); }
.admin-ledger-scope { margin: 24px 0 14px; color: var(--ink); font-size: 16px; font-weight: 600; }
.admin-ledger-scope span { color: var(--muted); font-weight: 400; }
.admin-ledger-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.admin-ledger-metrics article { display: flex; gap: 14px; align-items: flex-start; padding: 20px; border: 1px solid #dce6f3; border-radius: 10px; background: #f7faff; }
.admin-ledger-metrics article > svg { margin-top: 3px; flex-shrink: 0; color: var(--brand); }
.admin-ledger-metrics article span { color: var(--muted); font-size: 14px; }
.admin-ledger-metrics strong { display: block; margin-top: 8px; color: var(--ink); font-size: 30px; line-height: 1.3; font-variant-numeric: tabular-nums; font-weight: 600; }
.admin-ledger-metrics strong small { margin-left: 8px; color: var(--muted); font-size: 14px; font-weight: 400; }
.admin-ledger-metrics article p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.admin-ledger-table-hint { margin: 22px 0 12px; color: var(--muted); font-size: 14px; }
.admin-ledger-table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.admin-ledger-table { width: 100%; min-width: 960px; border-collapse: collapse; font-size: 16px; font-variant-numeric: tabular-nums; }
.admin-ledger-table :is(th,td) { padding: 17px 16px; border: 0; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-size: 16px; }
.admin-ledger-table thead th { color: var(--ink-2); background: #f0f4f9; font-weight: 600; }
.admin-ledger-table th small { display: block; margin-top: 4px; color: var(--muted); font-size: 14px; font-weight: 400; }
.admin-ledger-table tr > :is(th,td):nth-child(-n+2) { text-align: left; }
.admin-ledger-table tbody th { color: var(--ink); font-weight: 400; }
.admin-ledger-table tbody tr:hover { background: #f7faff; }
.admin-ledger-table tfoot :is(th,td) { border-bottom: 0; background: #eaf1fc; color: var(--ink); font-weight: 600; }
.admin-ledger-table tfoot td { text-align: right !important; }
.admin-ledger-empty { padding: 32px 16px; border: 1px solid var(--line); border-radius: 10px; text-align: center; }
.admin-ledger-empty svg { display: block; margin: 0 auto 12px; color: var(--muted); }
.admin-ledger-empty strong { font-size: 16px; font-weight: 600; }
.admin-ledger-empty p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.admin-ledger-definitions { margin-top: 20px; color: var(--muted); font-size: 14px; }
.admin-ledger-definitions summary { width: fit-content; min-height: 44px; padding: 10px 0; cursor: pointer; color: var(--brand); }
.admin-ledger-definitions p { margin: 6px 0 10px; font-size: 14px; line-height: 1.8; }
.admin-ledger-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 900px) {
  .admin-statistics-ledger { padding: 22px; }
  .admin-ledger-metrics article { padding: 16px; gap: 10px; }
  .admin-ledger-metrics article > svg { display: none; }
}
@media (max-width: 600px) {
  .admin-statistics-ledger { padding: 20px 16px; }
  .admin-ledger-heading { flex-direction: column; gap: 16px; }
  .admin-ledger-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px 12px; }
  .admin-ledger-filters label,.admin-ledger-period-field { min-width: 0; }
  .admin-ledger-filters input { max-width: none; }
  .admin-ledger-period-field { grid-column: 1 / -1; }
  .admin-ledger-mode button { flex: 1; padding-inline: 12px; }
  .admin-ledger-metrics { grid-template-columns: 1fr; gap: 12px; }
  .admin-ledger-metrics article > svg { display: block; }
  .admin-ledger-table-hint { line-height: 1.7; }
}

/* Admin: the same shell, with an overview split into a chart and operating facts. */
.role-admin :is(.admin-page,.admin-category-hub,.admin-category-editor) { max-width: 1440px; }
.admin-ops-surface { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(320px,1fr); align-items: start; gap: 24px; background: transparent; border: 0; box-shadow: none; border-radius: 0; overflow: visible; }
.admin-ops-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; padding: 0; border: 0; background: transparent; }
.admin-ops-summary article { display: flex; align-items: center; gap: 20px; padding: 26px; background: #fff; border: 1px solid #dce5ef; border-radius: 16px; box-shadow: var(--shadow); }
.admin-ops-summary article + article::before { display: none; }
.admin-ops-summary-icon { width: 52px; height: 52px; border-radius: 14px; background: #eaf1fc; color: #20498b; }
.admin-ops-summary article strong { margin: 8px 0 4px; font-size: 36px; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.admin-ops-summary article strong em { font-size: 14px; color: var(--muted); margin-left: 7px; }
.admin-ops-summary article p { font-size: 14px; color: var(--muted); }
.admin-ops-trend-section { grid-column: 1; padding: 28px; border: 1px solid #dce5ef; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.admin-ops-trend-section > header { align-items: flex-start; gap: 18px; flex-direction: column; }
.admin-ops-trend-section h2 { color: var(--ink); font-size: 22px; }
.admin-ops-chart-legend { display: flex; flex-wrap: wrap; gap: 12px 20px; font-size: 14px; }
.admin-trend-heading-row { display: flex; flex-wrap: wrap; align-items: flex-end; width: 100%; gap: 12px 20px; }
.admin-trend-heading-row h2 { position: relative; top: -10px; flex-shrink: 0; margin: 0; min-height: 40px; display: flex; align-items: center; }
.admin-trend-controls { display: flex; flex: 0 1 auto; max-width: 100%; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 10px; min-width: 0; }
.admin-trend-presets { display: inline-flex; align-items: center; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 8px; background: #f0f4f9; }
.admin-trend-presets button { min-width: 36px; min-height: 34px; padding: 6px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 14px; }
.admin-trend-presets button:hover { background: #e0e9f6; }
.admin-trend-presets button[aria-pressed="true"] { background: var(--brand); color: #fff; }
.admin-trend-filters { display: flex; flex: 0 1 auto; flex-wrap: wrap; justify-content: flex-end; align-items: flex-end; gap: 8px; margin: 0; padding: 0; border: 0; }
.admin-trend-filters label { display: flex; flex: 0 1 148px; width: 148px; flex-direction: column; min-width: 0; gap: 5px; }
.admin-trend-filters label span { color: var(--ink-2); font-size: 14px; }
.admin-trend-filters input { width: 100%; min-width: 0; height: 40px; min-height: 40px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; line-height: 1.5; background: #fff; }
.admin-trend-filters input:hover { border-color: var(--line-strong); }
.admin-trend-filters button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 40px; padding: 7px 9px; border: 0; background: transparent; font-size: 14px; text-decoration: none; }
.admin-trend-filters button:hover { background: var(--brand-soft); }
.admin-trend-error { margin: 12px 0 0; color: #b42318; font-size: 14px; }
.admin-trend-empty { display: grid; place-content: center; min-height: 240px; margin-top: 24px; padding: 24px 16px; border-radius: 10px; background: #f7faff; text-align: center; }
.admin-trend-empty strong { font-size: 16px; }
.admin-trend-empty p { color: var(--muted); font-size: 14px; }
.admin-trend-dates.single-date { justify-content: center; }
.admin-trend-plot .writer-point { fill: var(--vi-blue); }
.admin-trend-plot .expert-point { fill: var(--vi-cyan); }
.admin-trend-plot .total-point { fill: #52647c; }
@media (max-width: 600px) {
  .admin-trend-controls { justify-content: flex-start; margin-left: 0; }
  .admin-trend-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); flex-basis: 100%; width: 100%; }
  .admin-trend-filters label { width: auto; }
  .admin-trend-filters > button { justify-self: start; }
}
.admin-role-trend { margin-top: 28px; }
.admin-trend-plot svg { height: 240px; }
.admin-trend-axis { height: 240px; }
.admin-trend-unit { font-size: 14px; color: #53657c; margin-top: 20px; }
.admin-ops-overview,.admin-ops-simple .admin-ops-overview { grid-column: 2; display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; padding: 0; }
.admin-ops-reminder,.admin-ops-simple .admin-ops-reminder { padding: 20px 22px; border: 1px solid #e6d9be; border-radius: 14px; background: #fff9ed; }
.admin-ops-reminder h2 { font-size: 18px; margin: 0 0 12px; color: #71521b; }
.admin-ops-reminder > button { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: transparent; border: 0; padding: 0; min-height: 60px; }
.admin-ops-reminder > button > span { flex: 1 1 230px; }
.admin-ops-reminder > button > i { display: none; }
.admin-ops-reminder time { font-size: 14px; color: #786744; }
.admin-ops-reminder > button:hover { background: #fff2d9; }
.admin-ops-info-block { padding: 22px; margin: 0; border: 1px solid #dce5ef; background: #fff; border-radius: 14px; }
.admin-ops-info-block h2 { padding: 0; margin: 0 0 20px; font-size: 18px; }
.admin-ops-info-block > div { gap: 12px; padding: 0; min-height: 0; }
.admin-ops-model-usage > div { grid-template-columns: repeat(2,minmax(0,1fr)); }
.admin-ops-info-block article { padding: 0; }
.admin-ops-info-block article > span,.admin-ops-info-block article + article::before { display: none; }
.admin-ops-info-block strong { font-size: 22px; color: var(--ink); margin: 8px 0; }
.admin-ops-info-block :is(small,p) { font-size: 14px; }
.admin-ops-info-block :is(small,strong,p) { white-space: normal; overflow: visible; }

@media (min-width: 1501px) {
  .admin-ops-simple :is(.admin-ops-trend-section,.admin-ops-overview) { align-self: stretch; }
  .admin-ops-simple .admin-ops-overview { grid-template-rows: repeat(2,minmax(auto,1fr)); }
  .admin-ops-simple .admin-ops-info-block { display: flex; flex-direction: column; }
  .admin-ops-simple .admin-ops-info-block > div { flex: 1; }
}

/* Resource configuration is a library picker with a visible selection basket. */
.admin-category-list { border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.admin-category-table { min-width: 1120px; table-layout: fixed; }
.admin-category-table col { width: calc(80% / 5); }
.admin-category-table col.admin-category-remarks-column { width: 20%; }
.admin-category-table th { width: auto; }
.admin-category-table :is(th,td) { padding: 18px 16px; }
.admin-category-table :is(th,td):nth-child(6) { padding-left: 40px; }
.admin-category-name { display: flex; flex-direction: column; gap: 5px; }
:is(.admin-category-name strong,.library-file-name) { color: var(--ink); font-size: var(--text-body); font-weight: 600; overflow-wrap: anywhere; }
.admin-category-description { margin: 0; color: #53657c; line-height: 1.8; overflow-wrap: anywhere; }
.admin-category-count { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.admin-category-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); font-size: 14px; white-space: nowrap; }
.admin-category-toggle-track { display: inline-flex; align-items: center; flex: none; width: 38px; height: 22px; padding: 3px; border-radius: 11px; background: #8291a5; }
.admin-category-toggle-track > span { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #102a4b26; }
.admin-category-toggle[aria-checked="true"] { color: var(--brand); }
.admin-category-toggle[aria-checked="true"] .admin-category-toggle-track { background: var(--brand); }
.admin-category-toggle[aria-checked="true"] .admin-category-toggle-track > span { transform: translateX(16px); }
.admin-category-toggle:hover .admin-category-toggle-track { outline: 3px solid #20498b18; }
.admin-category-resource-warning { display: block; color: #9c4d21; font-size: 14px; }
.admin-category-error { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #f0c5bd; border-radius: 8px; background: #fff6f3; color: #b42318; font-size: 14px; }
:is(.admin-category-configure,.library-view) { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--brand); font-size: var(--text-body); font-weight: 600; line-height: 1.5; white-space: nowrap; }
:is(.admin-category-configure,.library-view):hover { color: var(--brand-dark); text-decoration: underline; text-underline-offset: 4px; }
.admin-category-basics { padding: 28px; border: 1px solid #d7e2ef; border-radius: 16px; background: #fff; gap: 24px; }
.admin-category-basics :is(input,select) { min-height: 48px; padding: 12px 14px; border-radius: 9px; }
.admin-resource-workspace { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; }
:is(.admin-resource-picker,.admin-selection-summary) { border: 1px solid #d7e2ef; border-radius: 16px; box-shadow: var(--shadow); background: #fff; overflow: hidden; }
.admin-resource-tabs { padding: 12px 20px; gap: 12px; background: #f7faff; border-bottom: 1px solid var(--line); }
.admin-resource-tabs button { min-height: 48px; padding: 10px 14px; border: 0; border-radius: 9px; }
.admin-resource-tabs button.active { background: #20498b; color: #fff; }
.admin-resource-tabs button.active b { background: #ffffff26; color: #fff; }
.admin-resource-toolbar { padding: 20px 24px; gap: 14px; }
.admin-resource-batch { padding: 14px 24px; background: #f3f7fc; }
.admin-resource-results > article { padding: 20px 24px; border-bottom: 1px solid #e5edf5; }
.admin-resource-results > article.selected { background: #f3f8ff; box-shadow: inset 3px 0 #20498b; }
.admin-resource-result-heading { gap: 16px; }
.admin-resource-result-heading input { width: 19px; height: 19px; }
.admin-selection-summary { position: sticky; top: calc(var(--shell-height) + 24px); align-self: start; }
.admin-selection-summary > header { padding: 22px; background: #e6effb; }
.admin-selection-summary h2 { font-size: 20px; color: #244a7e; }
.admin-selection-summary article { padding: 18px 20px; }
.admin-selection-summary footer { padding: 20px; background: #f5f8fc; }
.admin-config-save { padding: 20px 24px; border: 1px solid #cfdef0; border-radius: 14px; background: #fff; box-shadow: 0 -4px 20px #16376108; }

/* Category configuration: one form, one resource list, one scroll surface. */
.category-config-navigation { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin-bottom: 14px; }
.category-config-navigation .admin-config-back { margin: 0; }
.category-config-dirty { font-size: 14px; color: #86621e; }
.category-config-form { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.category-config-info { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(250px,1.8fr) auto; align-items: end; gap: 24px; padding: 26px 28px 20px; }
.category-config-info > label:not(.category-config-enabled) { display: grid; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 14px; }
.category-config-info input:not([type="checkbox"]),.category-config-filters > select { width: 100%; height: 44px; min-height: 44px; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 7px; background: #fff; color: var(--ink); font-size: 16px; }
.category-config-enabled,.category-config-selected { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; white-space: nowrap; color: var(--ink-2); font-size: 14px; cursor: pointer; }
.category-config input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--brand); cursor: pointer; }
.category-config-tabs { display: flex; gap: 30px; padding: 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.category-config-tabs > button { display: inline-flex; align-items: center; gap: 9px; min-height: 62px; padding: 12px 0; border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 16px; }
.category-config-tabs > button[aria-pressed="true"] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 600; }
.category-config-tabs > button:hover { color: var(--brand); }
.category-config-tabs > button > span { padding: 2px 7px; border-radius: 5px; background: #f0f4fa; color: var(--muted); font-size: 13px; font-weight: 400; }
.category-config-tabs > button[aria-pressed="true"] > span { background: var(--brand-soft); color: var(--brand); }
.category-config-filters { display: grid; grid-template-columns: minmax(200px,1fr) 160px auto; align-items: center; gap: 16px; padding: 20px 28px; }
.category-config-search { display: flex; align-items: center; gap: 10px; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #f7f9fc; color: var(--muted); }
.category-config-search > svg { flex: none; }
.category-config-search input { width: 100%; min-width: 0; min-height: 0; height: 42px; padding: 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 16px; box-shadow: none; }
.category-config-search:focus-within { outline: 2px solid var(--brand); outline-offset: 2px; }
.category-config-search > button { display: grid; place-items: center; flex: none; width: 44px; height: 44px; margin-right: -12px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.category-config-table-wrap { overflow-x: auto; }
.category-config-table { width: 100%; min-width: 660px; border-collapse: collapse; table-layout: fixed; text-align: left; }
.category-config-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f7f9fc; color: var(--muted); font-size: 14px; font-weight: 400; }
.category-config-table td { padding: 14px 16px; border-bottom: 1px solid #e8edf4; color: var(--ink-2); font-size: 16px; vertical-align: middle; }
.category-config-table tr.is-selected { background: #f6f9fd; }
.category-config-table tbody tr:hover { background: #f0f5fc; }
.category-config-table .category-config-check { width: 68px; padding: 0 8px 0 16px; }
.category-config-check > label { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; }
.category-config-resource-name { display: grid; gap: 5px; cursor: pointer; overflow-wrap: anywhere; line-height: 1.65; }
.category-config-resource-name > span { color: var(--ink); font-weight: 500; }
.category-config-resource-name small { color: var(--muted); font-size: 14px; }
.category-config-resource-name em { color: #9c4d21; font-size: 14px; font-style: normal; }
.category-config-scope { width: 150px; }
.category-config-scope-label { color: var(--muted); font-size: 14px; }
.category-config-action { width: 122px; }
.category-config-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 4px; border: 0; background: transparent; color: var(--brand); font-size: 14px; white-space: nowrap; }
.category-config-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.category-config-table .category-config-preview-cell { padding: 0 28px 18px 84px; background: #f6f9fd; }
.category-config-preview { margin: 0; padding: 16px 20px; border-left: 3px solid #b4c9e5; background: #fff; color: var(--ink-2); font-size: 15px; line-height: 1.9; white-space: pre-wrap; }
.category-config-empty { display: grid; justify-items: center; padding: 36px 20px; color: var(--muted); }
.category-config-empty p { margin: 12px 0 6px; color: var(--ink); }
.category-config-empty small { font-size: 14px; }
.category-config-pagination { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 28px; color: var(--muted); font-size: 14px; }
.category-config-pagination nav { display: flex; align-items: center; gap: 16px; }
.category-config-pagination button { min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 14px; }
.category-config-pagination button:hover:not(:disabled) { background: var(--brand-soft); border-color: var(--line-strong); }
.category-config-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fbfcfe; }
.category-config-footer > div { flex: 1; min-width: 220px; display: grid; gap: 4px; color: var(--ink-2); font-size: 14px; }
.category-config-footer small { color: var(--muted); font-size: 14px; }
.category-config-footer > button { min-height: 44px; padding: 10px 20px; }
.category-config-footer > p { flex-basis: 100%; margin: 0; color: #b42318; font-size: 14px; }
@media (max-width: 1100px) {
  .category-config-info { grid-template-columns: 1fr 2fr; gap: 16px; }
  .category-config-enabled { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .category-config-info { grid-template-columns: 1fr; padding: 20px 16px 12px; }
  .category-config-tabs { gap: 20px; padding: 0 16px; }
  .category-config-tabs > button { flex-wrap: wrap; gap: 6px; font-size: 15px; }
  .category-config-filters { grid-template-columns: 1fr auto; padding: 16px; gap: 12px; }
  .category-config-search { grid-column: 1 / -1; }
  .category-config-pagination,.category-config-footer { padding: 16px; }
  .category-config-footer > div { flex-basis: 100%; }
  .category-config-footer > button { flex: 1; }
}

/* Records, personnel and permissions share the same restrained data treatment. */
:is(.audit-record-table-wrap,.project-version-table-wrap,.admin-table-wrap) { overflow-x: auto; scrollbar-width: thin; }
:is(.audit-record-table,.project-version-table,.admin-table) { border-collapse: collapse; }
:is(.audit-record-table,.project-version-table,.admin-table) th { min-height: 48px; padding: 16px 20px; background: #edf3fa; border-bottom: 1px solid #d9e4ef; }
:is(.audit-record-table,.project-version-table,.admin-table) td { padding: 20px; border-bottom: 1px solid #e5edf5; }
/* The four management lists share their type scale, including resource libraries. */
:is(.audit-record-table,.project-version-table,.admin-table,.library-table) th { font-size: var(--text-caption); font-weight: 500; line-height: 1.65; color: #536a88; }
:is(.audit-record-table,.project-version-table,.admin-table,.library-table) td { font-size: var(--text-body); line-height: 1.65; color: #354c68; }
:is(.admin-project-cell,.library-file) small { font-size: var(--text-caption); font-weight: 400; line-height: 1.6; color: var(--muted); }
:is(.audit-record-table,.project-version-table,.admin-table) tbody tr:hover { background: #f4f8ff; }
.admin-section-title { padding: 24px; background: #fff; border-bottom: 1px solid var(--line); }
.admin-section-title strong { color: var(--ink); font-size: 20px; }
.admin-section-title > div span { color: var(--muted); font-size: 14px; }
.admin-filter-row { padding: 20px 24px; gap: 16px; }
.admin-audit-page .admin-audit-filters { display: grid; grid-template-columns: minmax(220px,1fr) 116px 144px 116px 124px; align-items: center; gap: 10px; min-height: 0; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.admin-audit-filters .admin-audit-search { display: flex; width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 0 12px; gap: 8px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; }
.admin-audit-search > svg { flex-shrink: 0; color: var(--muted); }
.admin-audit-filters .admin-audit-search input { flex: 1; width: 100%; min-width: 0; min-height: 0; height: 42px; padding: 0; border: 0; border-radius: 0; background: transparent; font-size: 16px; box-shadow: none; }
.admin-audit-filters .admin-audit-search:focus-within { border-color: #698ebc; background: #fff; box-shadow: 0 0 0 3px #20498b12; }
.admin-audit-search > button { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--muted); border-radius: 6px; }
.admin-audit-search > button:hover { color: var(--brand); background: var(--brand-soft); }
.admin-audit-page .admin-audit-filters > select { width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 0 28px 0 12px; border: 1px solid var(--line); border-radius: 8px; background-color: #fff; color: var(--ink-2); font-size: 16px; cursor: pointer; }
.admin-audit-page .admin-audit-filters > select:hover { border-color: var(--line-strong); }
.admin-audit-page .admin-audit-filters > select.is-filtered { border-color: #afc7e6; color: var(--brand); background-color: #f0f5fc; }
.admin-audit-page .admin-record-result { min-height: 40px; padding: 8px 20px 12px; border-radius: 0; border-bottom: 1px solid var(--line); background: #fff; }
@media (max-width: 1300px) {
  .admin-audit-page .admin-audit-filters { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .admin-audit-filters .admin-audit-search { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .admin-audit-page .admin-audit-filters { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 16px; gap: 10px; }
  .admin-audit-page .admin-record-result { flex-wrap: wrap; gap: 4px; padding: 8px 16px 12px; }
}
.admin-role-overview { gap: 20px; }
.admin-role-overview > button { background: #fff; border: 1px solid #d5e1ef; border-radius: 14px; padding: 24px; }
.admin-role-overview > button.active { background: #20498b; color: #fff; border-color: #20498b; }
.admin-role-overview > button.active :is(strong,small,b,svg) { color: #fff; }
.admin-summary-grid { gap: 20px; }
.admin-summary-grid article { padding: 24px; border: 1px solid #d5e1ef; border-radius: 14px; background: #fff; box-shadow: none; }
.admin-permission-grid { padding: 24px; gap: 16px; }
.admin-permission-grid label { border: 1px solid #d5e1ef; border-radius: 10px; padding: 18px; background: #f7faff; }
.admin-permission-grid label:has(input:checked) { background: #eaf2fc; border-color: #afc7e6; }
.admin-member-fields { gap: 24px; }
.admin-member-form-section { padding: 24px; }
.admin-record-result { border-radius: 8px; }
.admin-audit-table { min-width: 1120px; table-layout: auto; }
.admin-audit-table th:first-child { width: 28%; }
.admin-audit-table :is(th,td):nth-child(n+2) { white-space: nowrap; }
.admin-audit-table .admin-project-cell { min-width: 240px; }
.admin-audit-table .audit-record-action { min-height: 44px; gap: 6px; }
.admin-upload-person :is(strong,small) { display: block; }
.admin-upload-person strong { font-size: 16px; font-weight: 500; }
.admin-upload-person small { margin-top: 2px; color: var(--muted); font-size: 14px; }

/* Project archive: version history first, then a read-only file or report. */
.admin-project-history { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.admin-project-history .project-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.admin-project-history .project-history-heading h2 { margin: 0; font-size: 22px; font-weight: 600; }
.admin-project-history .project-history-count { color: var(--muted); font-size: 14px; font-weight: 400; }
.admin-project-history .project-version-table { min-width: 900px; }
.admin-project-history .project-version-table th { padding: 14px 24px; background: #f8fafc; }
.admin-project-history .project-version-table td { padding: 22px 24px; }
.admin-project-history .project-version-table th:nth-child(2) { width: 36%; }
.admin-project-history .project-version-table :is(th,td):nth-child(n+3) { white-space: nowrap; }
.admin-project-history .admin-history-file { padding: 0; width: 100%; border: 0; background: transparent; text-align: left; color: var(--ink); min-height: 44px; }
.admin-history-file > span { min-width: 0; }
.admin-history-file strong { overflow-wrap: anywhere; font-weight: 600; }
.admin-history-file:hover strong { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.admin-project-history .audit-record-action { min-height: 44px; }
.admin-history-pending { color: var(--muted); }
@media (max-width: 700px) {
  .admin-project-history .project-history-heading { padding: 20px 16px; }
  .admin-project-history .project-version-table :is(th,td) { padding: 16px; }
}
.admin-audit-detail-page { display: flex; flex-direction: column; gap: 0; }
.admin-project-navigation { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.admin-project-navigation > span { padding-left: 14px; border-left: 1px solid var(--line-strong); color: var(--muted); font-size: 14px; }
.admin-project-navigation .app-back-button { min-height: 36px; padding: 4px 0; background: transparent; border: 0; border-radius: 4px; box-shadow: none; font-size: 14px; font-weight: 500; }
.admin-project-navigation .app-back-button-icon { width: 24px; height: 24px; background: transparent; }
.admin-project-heading { padding: 0 0 24px; border: 0; background: transparent; }
.admin-project-title { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.admin-project-title h2 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: 0; }
.admin-project-title > span { padding: 3px 10px; border: 1px solid #cbd9e9; border-radius: 5px; color: #496284; font-size: 13px; background: #f5f8fc; }
.admin-project-heading p { margin: 8px 0 0; color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.admin-project-heading p > span { margin: 0 10px; color: #8a99ac; }
.admin-version-workspace { display: block; min-width: 0; border: 1px solid #d7e1ed; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #17335204; overflow: hidden; }
.admin-version-picker { display: flex; align-items: stretch; gap: 28px; padding: 0 28px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f8fafc; }
.admin-version-picker > header { display: flex; flex-direction: column; justify-content: center; gap: 3px; flex-shrink: 0; padding: 16px 0; }
.admin-version-picker > header strong { font-size: 14px; color: var(--ink-2); font-weight: 500; }
.admin-version-picker > header small { color: var(--muted); font-size: 12px; }
.admin-version-picker nav { display: flex; align-items: stretch; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: thin; }
.admin-version-picker nav > button { flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 5px; min-width: 158px; padding: 15px 20px 12px; border: 0; border-bottom: 3px solid transparent; border-radius: 0; color: var(--muted); background: transparent; text-align: left; }
.admin-version-picker nav > button:hover { background: #edf3fa; }
.admin-version-picker nav > button.active { background: #fff; border-bottom-color: var(--brand); }
.admin-version-picker-title { display: flex; align-items: center; gap: 8px; }
.admin-version-picker-title strong { font-size: 17px; font-weight: 600; color: inherit; }
.admin-version-picker .active .admin-version-picker-title strong { color: var(--brand); }
.admin-version-picker-title em { padding: 1px 5px; border-radius: 4px; color: var(--brand); background: #eaf1fc; font-size: 11px; font-style: normal; }
.admin-version-content { min-width: 0; }
.admin-version-content-heading { display: flex; align-items: center; gap: 10px; padding: 25px 28px 12px; }
.admin-version-content-heading > svg { flex-shrink: 0; color: var(--brand); }
.admin-version-content-heading > div { flex: 1; min-width: 0; }
.admin-version-content-heading h3 { margin: 0; font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
.admin-version-content-heading > .status-tag { flex-shrink: 0; border-radius: 5px; padding: 4px 10px; font-size: 13px; }
.admin-version-metadata { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 30px; margin: 0; padding: 0 28px 23px 59px; }
.admin-version-metadata > div { display: flex; align-items: baseline; gap: 8px; }
.admin-version-metadata dt { font-size: 13px; color: var(--muted); white-space: nowrap; }
.admin-version-metadata dd { margin: 0; color: var(--ink-2); font-size: 14px; font-variant-numeric: tabular-nums; }
.admin-version-metadata dd > span { color: var(--muted); font-size: 13px; }
.admin-version-viewbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-top: 1px solid #edf1f6; border-bottom: 1px solid var(--line); }
.admin-version-viewbar [role=tablist] { display: flex; gap: 28px; }
.admin-version-viewbar [role=tab] { display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font-size: 15px; font-weight: 500; }
.admin-version-viewbar [role=tab]:hover { color: var(--brand); }
.admin-version-viewbar [aria-selected=true] { color: var(--brand); border-bottom-color: var(--brand); }
.admin-version-viewbar .secondary-button { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 6px; gap: 6px; }
.admin-version-result-body { padding: 24px 28px 28px; }
.admin-version-opinion { padding: 16px 20px; margin: 0 0 22px; border-left: 3px solid #7d9cbe; background: #f5f8fc; }
.admin-version-opinion h4 { margin: 0; font-size: 14px; }
.admin-version-opinion p { margin: 6px 0 0; font-size: 15px; color: var(--ink-2); white-space: pre-wrap; }
.admin-version-issues-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.admin-version-issues-heading h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 16px; }
.admin-version-issues-heading h4 > span { padding: 0 7px; border-radius: 4px; background: #edf2f8; color: #557092; font-size: 12px; font-weight: 500; }
.admin-version-issues-heading > span { color: var(--muted); font-size: 13px; }
.admin-version-issue { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.admin-version-issue:last-of-type { border-bottom: 1px solid var(--line); }
.admin-version-issue summary { display: flex; align-items: center; gap: 16px; padding: 20px 12px; cursor: pointer; list-style: none; }
.admin-version-issue summary::-webkit-details-marker { display: none; }
.admin-version-issue summary:hover { background: #f8fafc; }
.admin-version-issue summary:focus-visible { outline: 3px solid #4a83d2; outline-offset: -3px; }
.admin-version-issue-number { align-self: flex-start; flex-shrink: 0; width: 26px; padding-top: 1px; font-size: 15px; color: #75879d; font-variant-numeric: tabular-nums; }
.admin-issue-summary-text { flex: 1; min-width: 0; }
.admin-issue-summary-text strong { display: block; font-size: 16px; font-weight: 500; line-height: 1.65; color: var(--ink); }
.admin-issue-summary-text small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.admin-version-issue summary em { flex-shrink: 0; padding: 3px 8px; border-radius: 4px; background: #f0f4f9; color: #526b88; font-size: 12px; font-style: normal; }
.admin-version-issue summary > svg { flex-shrink: 0; color: #7b8da3; }
.admin-version-issue details[open] > summary > svg { transform: rotate(180deg); }
.admin-issue-expanded { display: grid; grid-template-columns: minmax(0,1fr) minmax(220px,.4fr); gap: 28px; padding: 0 12px 24px 54px; }
.admin-issue-expanded dl { display: grid; gap: 12px; margin: 0; }
.admin-issue-expanded dl > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 12px; }
.admin-issue-expanded dt { padding-top: 2px; font-size: 13px; color: var(--muted); }
.admin-issue-expanded dd { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.8; overflow-wrap: anywhere; }
.admin-version-expert-note { padding: 14px 16px; border-left: 2px solid #cedbea; background: #f7f9fc; align-self: start; }
.admin-version-expert-note strong { font-size: 13px; color: #4b6584; font-weight: 500; }
.admin-version-expert-note p { margin: 7px 0 0; font-size: 14px; color: var(--ink-2); line-height: 1.8; white-space: pre-wrap; }
.admin-version-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 70px 24px; text-align: center; color: var(--muted); }
.admin-version-empty > svg { color: #6b87a9; }
.admin-version-empty strong { font-size: 17px; font-weight: 500; color: var(--ink-2); }
.admin-version-empty p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.admin-version-document { padding: 20px 28px 28px; background: #f5f7fa; }
.admin-version-document-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-version-document-toolbar label { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 14px; color: var(--muted); }
.admin-version-document-toolbar select { width: min(320px,100%); min-width: 0; min-height: 44px; padding: 8px 30px 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 14px; color: var(--ink-2); }
.admin-version-document-toolbar > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.admin-version-document > article { max-width: 960px; margin: auto; padding: clamp(20px,4vw,60px); border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.admin-version-document article > header { border-bottom: 1px solid var(--line); text-align: center; padding-bottom: 20px; margin-bottom: 28px; }
.admin-version-document h4 { margin: 0; font-size: 20px; }
.admin-version-document header p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.admin-version-document h5 { margin: 0 0 16px; font-size: 18px; }
.admin-version-document article :is(p,li) { line-height: 1.9; }
.admin-version-document img { display: block; max-width: 100%; height: auto; margin: 24px auto; }
.admin-version-document footer { margin-top: 40px; text-align: center; font-size: 14px; color: var(--muted); }
.admin-uploaded-file-preview { padding: 20px 28px 28px; background: #f5f7fa; }
.admin-uploaded-file-preview > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.admin-uploaded-file-preview > div:first-child > span { overflow-wrap: anywhere; min-width: 0; color: var(--muted); font-size: 14px; }
.admin-uploaded-file-preview .secondary-button { font-size: 14px; min-height: 44px; text-decoration: none; }
.admin-uploaded-file-preview > object { display: block; width: 100%; height: 70vh; min-height: 420px; border: 1px solid var(--line); background: #fff; }
@media (max-width: 1100px) {
  .admin-issue-expanded { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .admin-version-metadata { gap: 8px 20px; }
}
@media (max-width: 700px) {
  .admin-project-title h2 { font-size: 22px; }
  .admin-project-heading { padding-bottom: 18px; }
  .admin-version-picker { gap: 16px; padding: 0 16px; }
  .admin-version-picker nav > button { min-width: 135px; padding: 14px 12px 11px; }
  .admin-version-content-heading { flex-wrap: wrap; padding: 20px 16px 12px; }
  .admin-version-content-heading h3 { font-size: 16px; }
  .admin-version-content-heading > .status-tag { margin-left: 31px; }
  .admin-version-metadata { padding: 0 16px 20px; flex-direction: column; }
  .admin-version-viewbar { padding: 0 16px 8px; flex-wrap: wrap; gap: 8px; }
  .admin-version-viewbar [role=tablist] { gap: 24px; }
  .admin-version-viewbar .secondary-button { min-height: 44px; }
  .admin-version-result-body { padding: 20px 16px; }
  .admin-version-issues-heading > span { display: none; }
  .admin-version-issue summary { padding: 17px 0; gap: 10px; flex-wrap: wrap; }
  .admin-issue-summary-text { flex-basis: calc(100% - 66px); }
  .admin-version-issue summary em { margin-left: 36px; }
  .admin-version-issue summary > svg { margin-left: auto; }
  .admin-issue-expanded { padding: 0 0 20px 0; }
  .admin-issue-expanded dl > div { grid-template-columns: 60px minmax(0,1fr); gap: 8px; }
  .admin-version-document,.admin-uploaded-file-preview { padding: 18px 16px; }
  .admin-version-document-toolbar,.admin-uploaded-file-preview > div:first-child { flex-wrap: wrap; }
  .admin-version-document-toolbar label { flex-direction: column; align-items: flex-start; width: 100%; }
  .admin-version-document-toolbar select { width: 100%; }
}
.admin-person-cell > b { border-radius: 10px; background: #eaf1fc; color: #20498b; }

/* Login: a full-height architectural brand panel beside a calm form page. */
.login-shell { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(460px,.9fr); min-height: 100dvh; padding: 0; background: #fff; background-image: none; overflow: hidden; }
.login-shell::before,.login-shell::after { display: none; }
.login-brand { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; min-height: 100dvh; padding: clamp(40px,5vw,80px); overflow: hidden; background: #143761; }
.login-brand::before { content: ""; display: block; position: absolute; z-index: -2; inset: 0; width: auto; height: auto; background: url('./assets/login-engineering-background.png') 35% center / cover no-repeat; opacity: .17; filter: grayscale(1); }
.login-brand::after { content: ""; display: block; position: absolute; z-index: -1; inset: 0; width: auto; height: auto; border: 0; border-radius: 0; transform: none; background: linear-gradient(180deg,#122d5200 25%,#122d52c4 100%); }
.vi-login-lockup { width: min(330px,100%); height: auto; margin: 0 0 clamp(72px,14vh,180px); mix-blend-mode: screen; filter: grayscale(1) invert(1); opacity: .98; }
.login-brand > div { position: relative; z-index: 1; }
.login-brand .eyebrow { margin: 0 0 22px; color: #b8d0ed; font-size: 16px; letter-spacing: .05em; }
.login-brand h1 { color: #fff; font-size: var(--text-display); line-height: 1.55; font-weight: 600; letter-spacing: -.035em; }
.login-brand h1 span { display: block; white-space: normal; }
.login-brand h1::after { display: none; }
.login-brand .login-intro { color: #c4d6ed; margin: 26px 0 0; font-size: 18px; line-height: 1.9; }
.login-panel { display: grid; place-items: center; min-height: 100dvh; padding: 56px; background: #fff; border: 0; }
.login-card { width: min(440px,100%); padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.login-card::before,.login-card::after { display: none; }
.login-card h2 { color: #192a42; font-size: 34px; line-height: 1.4; margin: 0 0 16px; }
.vi-login-description { margin: 0 0 40px; color: #53657c; font-size: 16px; line-height: 1.8; }
.login-card form > label { margin: 22px 0 10px; font-size: 16px; font-weight: 500; }
.login-card input:not([type=checkbox]) { height: 56px; min-height: 56px; border: 1px solid #c9d6e7; border-radius: 10px; padding: 14px 16px; background: #f9fbfe; font-size: 16px; }
.login-card input:not([type=checkbox]):focus { border-color: #6f94c3; background: #fff; }
.login-card .login-button { min-height: 56px; border-radius: 10px; font-size: 18px; background: #20498b; }
.login-card .security-note { display: flex; align-items: flex-start; gap: 9px; padding-top: 24px; color: #64758c; font-size: 14px; line-height: 1.7; border-color: #dce5f0; }
.login-card .security-note svg { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 4px; color: currentColor; }

/* Dialogs, role switching and upload panels inherit the new surface language. */
:is(.confirm-modal,.role-selection-dialog,.role-selection-modal,.writer-category-modal,.kb-admin-upload-dialog,.standard-upload-dialog,.expert-issue-edit-dialog,.writer-modification-dialog) { max-height: calc(100dvh - 48px); overflow-y: auto; background: #fff; border: 1px solid #d9e3ef; border-radius: 18px; box-shadow: 0 28px 90px #0f294744; }
:is(.modal-backdrop,.writer-category-modal-backdrop,.kb-admin-upload-backdrop,.role-selection-backdrop) { padding: 24px; background: #0f294766; backdrop-filter: blur(4px); }
.writer-category-modal-backdrop { z-index: 260; font: var(--text-body)/1.65 var(--vi-font); }
.writer-category-modal { display: flex; flex-direction: column; width: min(820px,100%); min-width: 0; padding: 0; overflow: hidden; }
.writer-category-modal.is-compact { width: min(560px,100%); }
.writer-category-modal.is-compact .writer-category-options { grid-template-columns: 1fr; }
.writer-category-empty { min-height: 0; overflow-y: auto; padding: 32px 34px; text-align: center; }
.writer-category-empty strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: var(--text-subheading); font-weight: 600; }
.writer-category-modal-footer { display: flex; flex: none; justify-content: flex-end; padding: 16px 34px; border-top: 1px solid var(--line); }
.writer-category-modal > header { display: flex; flex: none; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0; padding: 24px 34px; border-bottom: 1px solid var(--line); }
.writer-category-modal > header span { color: var(--brand); font-size: 14px; font-weight: 600; }
.writer-category-modal h2 { color: var(--ink); font-size: 28px; margin: 4px 0 6px; }
.writer-category-modal p { margin: 0; font-size: 16px; line-height: 1.6; color: #53657c; }
.writer-category-modal > header > button { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: #f6f9fd; }
.writer-category-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 34px 34px; }
.writer-category-options > button { display: grid; grid-template-columns: 56px minmax(0,1fr) 20px; align-items: center; gap: 16px; min-width: 0; min-height: 144px; padding: 24px; background: linear-gradient(135deg,#fff 0%,#f4f8fe 100%); border: 1px solid #d4e1f0; border-radius: 14px; text-align: left; }
.writer-category-options > button > span:nth-child(2) { min-width: 0; }
.writer-category-options > button > svg { justify-self: end; color: var(--brand); }
.writer-category-options > button:hover { background: #edf4fd; border-color: #7498c9; box-shadow: 0 10px 22px #173f7a12; }
.writer-category-options strong { display: block; color: var(--ink); font-size: 20px; }
.writer-category-options small { display: block; margin-top: 5px; color: #53657c; font-size: 14px; line-height: 1.5; }
.vi-category-symbol { width: 56px; height: 56px; border-radius: 14px; background: #e4edfa; color: #20498b; }
.role-selection-card { min-height: 88px; border: 1px solid #d4e1f0; border-radius: 14px; padding: 18px 24px; }
.role-selection-icon { border-radius: 12px; background: #eaf1fc; }
.toast { border: 1px solid #bed0e9; border-radius: 12px; background: #fff; box-shadow: 0 8px 28px #122d521c; }

/* Adapt the composition, rather than scaling the text down. */
@media (max-width: 1500px) {
  :root { --rail-width: 224px; }
  .admin-ops-surface { grid-template-columns: minmax(0,1fr); }
  .admin-ops-trend-section,.admin-ops-overview,.admin-ops-simple .admin-ops-overview { grid-column: 1; }
  .admin-ops-overview,.admin-ops-simple .admin-ops-overview { grid-template-columns: 1fr 1fr; }
  .admin-ops-reminder,.admin-ops-simple .admin-ops-reminder { grid-column: 1 / -1; }
  .kb-reader-grid { grid-template-columns: var(--kb-files-width,220px) 10px var(--kb-chat-width,360px) 10px minmax(320px,1fr); overflow-x: auto; }
  .kb-reader-grid.files-collapsed { grid-template-columns: 56px 10px var(--kb-chat-width,360px) 10px minmax(320px,1fr); }
  .kb-admin-grid { grid-template-columns: 280px minmax(0,1fr); }
  .admin-resource-workspace { grid-template-columns: minmax(0,1fr); }
  .admin-selection-summary { position: static; }
  .audit-workspace.resizable-workspace { grid-template-columns: var(--outline-width,180px) 8px minmax(280px,1fr) 8px var(--review-width,360px); }
  .audit-workspace.resizable-workspace.outline-collapsed { grid-template-columns: 44px minmax(280px,1fr) 8px var(--review-width,360px); }
  .audit-workspace.resizable-workspace.review-collapsed { grid-template-columns: var(--outline-width,180px) 8px minmax(280px,1fr) 44px; }
  .audit-workspace.resizable-workspace.outline-collapsed.review-collapsed { grid-template-columns: 44px minmax(280px,1fr) 44px; }
}
@media (max-width: 1200px) {
  :root { --rail-width: 208px; }
  .workspace-sidebar { padding: 28px 12px 24px; }
  .workspace-brand { padding-left: 8px; padding-right: 8px; }
  .workspace-sidebar nav button { gap: 10px; padding: 12px; }
  .topbar,.role-admin .topbar { padding: 0 24px; }
  .content-area:not(.page-review):not(.page-expertReview):not(.page-document):not(.page-chat):not(.page-knowledge):not(.page-rules) { padding: 28px; }
  .project-detail-page:has(> .project-summary-bar) { grid-template-columns: minmax(0,1fr); grid-template-areas: "heading" "banner" "summary" "upload" "history"; }
  .project-detail-page > .project-summary-bar { margin-bottom: 24px; }
  .project-summary-bar dl { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .admin-ops-summary { gap: 16px; }
  .admin-ops-summary article { gap: 14px; padding: 20px; }
  .admin-ops-summary-icon { display: none; }
  .admin-service-health { display: none; }
  .login-panel { padding: 40px; }
}
@media (max-width: 1100px) {
  :root { --rail-width: 84px; }
  .workspace-sidebar { padding: 24px 12px; }
  .workspace-brand { justify-content: center; padding: 0 0 24px; }
  .workspace-brand-logo { width: 40px; }
  .workspace-brand-subtitle,.workspace-sidebar nav button > span,.workspace-nav-arrow { display: none; }
  .workspace-sidebar nav { margin-top: 24px; }
  .workspace-sidebar nav button { justify-content: center; padding: 14px; }
  .workspace-sidebar-footer { display: none; }
  .kb-admin-toolbar { flex-wrap: wrap; }
  .kb-admin-grid { grid-template-columns: 240px minmax(0,1fr); }
  .kb-reader-grid,.kb-reader-grid.files-collapsed { grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); grid-template-rows: auto minmax(0,1fr); overflow: auto; }
  .kb-reader-files { grid-column: 1 / -1; grid-row: 1; max-height: 220px; border-bottom: 1px solid var(--line); }
  .kb-reader-files.collapsed { max-height: 56px; }
  .kb-reader-collapsed-rail { flex-direction: row; }
  .kb-reader-chat { grid-column: 1; grid-row: 2; }
  .kb-reader-preview { grid-column: 2; grid-row: 2; }
  .kb-reader-resizer { display: none; }
  .admin-ops-overview,.admin-ops-simple .admin-ops-overview { grid-template-columns: minmax(0,1fr); }
  .login-shell { grid-template-columns: minmax(0,1fr) minmax(380px,1fr); }
  .login-brand { padding: 40px 32px; }
  .login-brand h1 { font-size: 32px; }
  .login-brand .eyebrow { font-size: 14px; }
  .login-panel { padding: 32px; }
}
@media (max-width: 1000px) {
  .workbench-list-columns { display: none; }
  .writer-recent-list { border-top: 1px solid #e8edf3; }
  .writer-recent-item { grid-template-columns: minmax(0,1fr) 64px; grid-template-areas: "name open" "details details"; gap: 10px 16px; }
  .workbench-project-name { grid-area: name; }
  .workbench-project-details { grid-area: details; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding-left: 54px; }
  .workbench-open { grid-area: open; }
}
@media (max-width: 700px) {
  .workbench-introduction { align-items: flex-start; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
  .writer-workbench-heading h1 { font-size: 28px; }
  .workbench-introduction > .writer-new-scheme-button { min-height: 44px; }
  .writer-panel-heading { padding: 20px; flex-wrap: wrap; }
  .writer-recent-item { padding: 16px 20px; }
  .workbench-project-name { gap: 10px; }
  .workbench-project-details { padding-left: 0; gap: 8px 12px; }

  .app-shell,.app-shell.navigation-collapsed { display: flex; flex-direction: column; --shell-height: 124px; }
  .workspace-sidebar,.navigation-collapsed .workspace-sidebar { position: sticky; top: 0; z-index: 46; display: flex; flex-direction: row; align-items: center; height: 64px; padding: 8px 12px; width: 100%; }
  .workspace-brand,.navigation-collapsed .workspace-brand { display: none; }
  .workspace-sidebar nav,.navigation-collapsed .workspace-sidebar nav { flex-direction: row; margin: 0; gap: 8px; width: 100%; overflow-x: auto; scrollbar-width: thin; }
  .workspace-sidebar nav button,.navigation-collapsed .workspace-sidebar nav button { width: auto; flex: none; min-height: 46px; gap: 8px; padding: 10px 14px; font-size: 14px; }
  .workspace-sidebar nav button > span,.navigation-collapsed .workspace-sidebar nav button > span { display: inline; }
  .workspace-sidebar nav button.active { box-shadow: none; }
  .workspace-sidebar-footer { display: none; }
  .topbar,.role-admin .topbar { position: sticky; top: 64px; height: 60px; min-height: 60px; padding: 0 16px; gap: 12px; flex-wrap: nowrap; }
  .workspace-breadcrumb { gap: 8px; }
  .workspace-breadcrumb > span { display: none; }
  .workspace-breadcrumb > svg { display: none; }
  .topbar .account-menu-trigger { width: 44px; min-width: 44px; height: 44px; justify-content: center; padding: 4px; }
  .topbar .account-menu-trigger > svg { display: none; }
  .topbar .user-avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .account-menu-copy { display: none; }
  .topbar-actions { gap: 0; }
  .content-area:not(.page-review):not(.page-expertReview):not(.page-document):not(.page-chat):not(.page-knowledge):not(.page-rules) { padding: 24px 16px 40px; }
  .workbench-search { width: 100%; }
  .workbench-filters { flex-basis: 100%; width: 100%; }
  .workbench-category-filter { flex-basis: 112px; width: 112px; }
  .writer-progress-panel { padding: 24px 20px; }
  .writer-progress-summary { gap: 14px; }
  .writer-progress-icon { width: 48px; height: 48px; flex-basis: 48px; }
  .writer-progress-summary h2 { font-size: 22px; }
  .writer-progress-meter { margin-top: 26px; padding-top: 22px; }
  .review-journey.compact { padding: 16px; gap: 12px; }
  .review-journey.compact li,.project-create-journey .review-journey li { flex-direction: column; align-items: flex-start; gap: 8px; }
  .review-journey strong { font-size: 14px; }
  .review-journey p { display: none; }
  .journey-icon { width: 36px; height: 36px; border-radius: 10px; }
  .project-header-content { flex-wrap: wrap; }
  .project-summary-bar dl { grid-template-columns: 1fr 1fr; }
  .project-summary-bar dl > div { padding: 14px 16px; }
  .project-heading-main h1 { font-size: 26px; }
  .project-upload-heading,.project-history-heading { padding: 20px; }
  .problem-item-heading { padding: 18px; flex-wrap: wrap; }
  .problem-item-toggle { flex-basis: 100%; }
  .problem-item-actions { width: 100%; justify-content: flex-start; padding-left: 46px; }
  .problem-detail-backdrop { padding: 12px; }
  .problem-detail-dialog { max-height: calc(100dvh - 24px); }
  .problem-detail-dialog-header { padding: 20px; }
  .problem-detail-dialog-header h2 { font-size: 20px; }
  .problem-detail-dialog-body { padding: 0 20px; }
  .problem-detail-dialog-actions { padding: 16px 20px; }
  .report-preview-backdrop { padding: 10px; }
  .report-preview-dialog { max-height: calc(100dvh - 20px); }
  .report-preview-dialog-header { padding: 18px; }
  .report-preview-scroll { padding: 12px; }
  .report-preview-paper { padding: 28px 20px 32px; }
  .report-preview-paper-header h3 { font-size: 25px; }
  .report-preview-entry dl > div { grid-template-columns: 1fr; gap: 2px; }
  .report-preview-dialog-actions { padding: 14px 18px; }
  .problem-detail { padding: 0 18px 22px; }
  .problem-report-header { align-items: flex-start; }
  .admin-ops-summary { grid-template-columns: 1fr; gap: 12px; }
  .admin-ops-summary article { padding: 22px; }
  .admin-ops-summary-icon { display: grid; }
  .admin-ops-trend-section { padding: 22px 16px; }
  .admin-ops-info-block > div { grid-template-columns: 1fr; gap: 18px; }
  .admin-category-basics { grid-template-columns: 1fr; padding: 22px; }
  .admin-resource-toolbar { flex-wrap: wrap; padding: 18px; }
  .admin-resource-tabs { flex-wrap: wrap; }
  .content-area:is(.page-knowledge,.page-rules),.role-admin .content-area:is(.page-knowledge,.page-rules) { height: auto; padding: 12px; overflow: visible; }
  .kb-reader-shell,.kb-admin-workspace { height: auto; overflow: visible; }
  .kb-reader-grid,.kb-reader-grid.files-collapsed { display: flex; flex-direction: column; overflow: visible; }
  .kb-reader-files,.kb-admin-files { max-height: 360px; min-height: 250px; }
  .kb-reader-resizer { display: none; }
  .kb-reader-chat { min-height: 480px; }
  .kb-reader-preview,.kb-admin-preview { min-height: 540px; }
  .kb-admin-grid { grid-template-columns: 1fr; }
  .kb-reader-toolbar,.kb-admin-toolbar { padding: 16px; flex-wrap: wrap; }
  .kb-reader-paper,.kb-admin-paper { padding: 24px; }
  .login-shell { display: block; }
  .login-brand { display: none; }
  .login-panel { min-height: 100dvh; padding: 32px 24px; }
  .login-card { max-width: 440px; }
  .mobile-brand { display: block; margin-bottom: 40px; }
  .writer-category-modal > header { padding: 22px 20px; }
  .writer-category-modal-backdrop { padding: 12px; }
  .writer-category-modal { max-height: calc(100dvh - 24px); }
  .writer-category-empty { padding: 28px 20px; }
  .writer-category-modal-footer { padding: 16px 20px; }
  .writer-category-options { grid-template-columns: 1fr; gap: 12px; padding: 20px; }
  .writer-category-options > button { grid-template-columns: 56px minmax(0,1fr) 18px; min-height: 96px; gap: 14px; padding: 16px; }
  .writer-category-options > button > svg { justify-self: end; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
