@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 100 700; font-display: swap; src: url('/fonts/ibm-plex-sans-latin.woff2') format('woff2'); }
:root {
  color-scheme: light;
  --font: 'IBM Plex Sans', 'Segoe UI', Arial, sans-serif;
  --ink: #202b25; --muted: #58665e; --accent: #1e513b; --teal: #1e513b;
  --paper: #f5f7f5; --white: #fff; --line: #dbe2dc; --danger: #9b352e; --side: 16.25rem;
  --body: .9375rem; --ui: .875rem; --small: .8125rem;
  font-family: var(--font); font-synthesis: none; color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: var(--body); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { outline-offset: 3px; }
:focus-visible { outline: 2px solid #377d59; }
a { color: inherit; text-decoration: none; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 14px; background: var(--accent); border: 1px solid transparent; border-radius: 4px; color: #fff; font-size: var(--ui); font-weight: 500; line-height: 1.4; text-align: center; }
button:hover:not(:disabled), .button:hover { background: #173f2e; }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary, .button.secondary { background: #fff; color: var(--ink); border-color: #c5d0c7; }
button.secondary:hover, .button.secondary:hover { background: #eef3ef; border-color: #94ab9b; }
button.ghost, .button.ghost { background: transparent; color: var(--muted); padding: 8px; }
button.ghost:hover, .button.ghost:hover { background: #e8eee9; color: var(--ink); }
button.small, .button.small { min-height: 34px; padding: 6px 10px; font-size: var(--small); }
button.danger { background: #fae9e6; color: var(--danger); }
svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
::selection { background: #dbe9de; color: #172d20; }
input::placeholder, textarea::placeholder { color: #68736d; opacity: 1; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
kbd { font: inherit; font-size: var(--small); padding: 0 4px; border: 1px solid #cbd6ce; border-radius: 3px; color: var(--muted); }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.75rem; letter-spacing: -.025em; margin-bottom: 8px; }
h2 { font-size: 1.125rem; margin-bottom: 0; }
h3 { font-size: 1rem; margin-bottom: 12px; }
h4 { font-size: var(--body); margin-bottom: 10px; }
p { line-height: 1.65; }
small { font-size: var(--small); }
.muted, .subheading { color: var(--muted); }
.subheading { font-size: var(--body); margin: 0; max-width: 78ch; line-height: 1.65; }
.text-danger, .overdue-date { color: var(--danger); font-weight: 500; }
.eyebrow { font-size: var(--small); color: var(--muted); margin: 0 0 9px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin: 0 0 28px; }
.page-heading > .toolbar { justify-content: flex-end; margin-top: 3px; }
.toolbar, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.text-link, .source-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent); font-size: var(--ui); font-weight: 500; }
.text-link:hover, .source-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.text-link svg, .source-link svg { width: 16px; height: 16px; }
.source-link svg { transform: rotate(180deg); }
.skip-link { position: fixed; top: -90px; left: 260px; z-index: 300; padding: 12px 16px; background: #fff; border: 1px solid var(--line); }
.skip-link:focus { top: 10px; }

/* Project context and navigation. */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 40; width: var(--side); overflow-y: auto; display: flex; flex-direction: column; padding: 22px 14px 16px; background: #edf1ed; border-right: 1px solid #d5ded7; }
.brand { display: flex; align-items: center; gap: 10px; margin: 0 4px 22px; }
.brand-logo { display: block; width: 2.625rem; height: 2rem; object-fit: contain; flex-shrink: 0; }
.brand strong { font-size: var(--body); font-weight: 600; display: block; line-height: 1.3; }
.brand small { display: block; color: var(--muted); font-size: var(--small); line-height: 1.4; margin-top: 3px; }
.sidebar-search { width: 100%; background: #f9fbf9; color: var(--muted); border-color: #cbd6ce; justify-content: flex-start; font-size: var(--small); padding: 8px 10px; }
.sidebar-search:hover { background: #fff!important; }
.sidebar-search svg { width: 16px; height: 16px; }
.sidebar-search kbd { margin-left: auto; white-space: nowrap; }
.nav-label { font-size: var(--small); color: var(--muted); margin: 20px 11px 8px; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; min-height: 40px; margin: 1px 0; border-radius: 4px; color: #46564b; font-size: var(--ui); }
.nav-link:hover { background: #e1e9e2; }
.nav-link.active { background: #dce7de; color: #1e513b; font-weight: 600; }
.nav-link svg { width: 18px; height: 18px; }
.nav-count { margin-left: auto; font-size: var(--small); font-variant-numeric: tabular-nums; }
.sidebar-bottom { margin-top: auto; padding-top: 16px; }
.connection-line { display: flex; align-items: center; gap: 8px; padding: 11px 10px; color: var(--muted); font-size: var(--small); }
.connection-line svg { margin-left: auto; width: 13px; height: 13px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #377c51; flex-shrink: 0; }
.status-dot.pending { background: #a37017; }
.user-line { display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 16px 6px 0; border-top: 1px solid #cdd8cf; }
.avatar { width: 28px; height: 31px; color: #546a59; display: grid; place-items: center; flex-shrink: 0; }
.identity strong { display: block; font-size: var(--ui); font-weight: 500; }
.identity small { display: block; color: var(--muted); font-size: var(--small); line-height: 1.4; margin-top: 3px; }
.shell { container-type: inline-size; margin-left: var(--side); min-height: 100vh; }
.topbar { height: 64px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff; border-bottom: 1px solid var(--line); }
.crumb { display: flex; gap: 14px; align-items: center; min-width: 0; font-size: var(--ui); }
.crumb strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb-divider { color: #627069; }
.project-context { display: flex; align-items: center; gap: 9px; color: var(--muted); min-width: 0; }
.project-context > span { font-size: var(--small); }
.project-select { max-width: 190px; min-width: 0; min-height: 36px; border: 1px solid #829486; border-radius: 4px; padding: 7px 8px; color: var(--ink); background: #fff; font-size: var(--ui); }
.top-actions { display: flex; gap: 4px; align-items: center; flex-shrink: 0; }
.sync-time { font-size: var(--small); color: var(--muted); margin-right: 8px; white-space: nowrap; }
.top-actions .ghost { min-width: 38px; }
.mobile-menu, .nav-scrim { display: none; }
main.workspace { container-type: inline-size; max-width: 1640px; min-height: calc(100vh - 64px); padding: 30px 32px 24px; margin: 0 auto; }
.footer-note { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: var(--small); color: var(--muted); margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-dot { margin: 0 8px; }

/* Operational overview: record counts, follow-up queue, inspections, review. */
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin-bottom: 30px; }
.summary-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: 10px; padding: 0 20px; border-left: 1px solid var(--line); }
.summary-item:first-child { padding-left: 0; border-left: 0; }
.summary-item:last-child { padding-right: 0; }
.summary-item strong { font-size: 1.5rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.summary-item span { font-size: var(--ui); line-height: 1.4; color: var(--muted); }
.summary-item svg { width: 14px; height: 14px; color: var(--muted); }
.summary-item:hover span { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.work-section { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 17px; }
.section-head p { color: var(--muted); font-size: var(--ui); margin: 5px 0 0; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 18px; }
.tabs button { background: transparent; color: #4c6052; border-radius: 3px; min-height: 36px; padding: 7px 12px; font-size: var(--ui); font-weight: 400; }
.tabs button:hover { background: #e7eee8; }
.tabs button.active { background: #e0eae2; color: #204b31; font-weight: 500; }
.tab-count { font-size: var(--small); color: inherit; margin-left: auto; font-variant-numeric: tabular-nums; }
.tabs .tab-count { margin-left: 2px; }
.queue-tabs { margin-bottom: 12px; }
.operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 32px; }
.record-list { border-top: 1px solid var(--line); }
.record-row { display: flex; align-items: center; justify-content: flex-start; width: 100%; min-width: 0; gap: 12px; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); padding: 16px 0; border-radius: 0; text-align: left; white-space: normal; }
.record-row:hover { background: #eef3ee!important; }
.record-copy { flex: 1; min-width: 0; }
.record-copy strong { display: block; font-size: var(--body); font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.record-copy small { display: block; margin-top: 4px; font-size: var(--small); font-weight: 400; color: var(--muted); }
.record-row > svg { width: 14px; height: 14px; color: var(--muted); }
.inline-empty { display: flex; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); padding: 21px 22px; background: #fff; border-radius: 4px; }
.inline-empty strong { font-size: var(--body); font-weight: 500; }
.inline-empty p { color: var(--muted); margin: 5px 0 0; font-size: var(--ui); }
.inline-empty.vertical { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 0; border: 0; border-top: 1px solid var(--line); background: transparent; }
.inline-empty.vertical p { margin: 0; }
.pinned-section { margin-top: 32px; }
.pinned-list { display: flex; flex-wrap: wrap; column-gap: 24px; row-gap: 0; border-top: 1px solid var(--line); }
.pinned-link { display: flex; align-items: center; gap: 9px; padding: 14px 0; font-size: var(--ui); color: var(--accent); }
.pinned-link > svg { width: 17px; height: 17px; }
.pinned-link > svg:last-child { width: 12px; height: 12px; }
.pinned-link:hover span { text-decoration: underline; text-underline-offset: 3px; }

/* Grouped tools: use names and descriptions as the primary navigation. */
.catalog-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; }
.catalog-filters { display: flex; flex-direction: column; gap: 3px; align-self: start; }
.catalog-filters button { background: transparent; color: #475b4c; border-radius: 3px; width: 100%; justify-content: flex-start; text-align: left; min-height: 42px; padding: 10px 12px; font-size: var(--ui); font-weight: 400; }
.catalog-filters button:hover { background: #e8eee9; }
.catalog-filters button.active { background: #dee9e1; color: #204c33; font-weight: 500; }
.search { display: flex; align-items: center; gap: 10px; min-width: 210px; padding: 10px 13px; border: 1px solid #829486; border-radius: 4px; background: #fff; color: #586e5e; min-height: 42px; }
.search:focus-within { outline: 2px solid #377d59; border-color: #4b8a5e; }
.search input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: var(--body); }
.catalog-search { width: 100%; }
.result-label { color: var(--muted); font-size: var(--small); margin: 14px 0 24px; }
.tool-group { margin-bottom: 30px; }
.group-heading { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #bdcec1; padding-bottom: 11px; }
.group-heading h2 { font-size: 1rem; }
.group-heading > span { font-size: var(--small); color: var(--muted); }
.tool-row { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); min-width: 0; }
.tool-row:hover { background: #edf3ee; }
.tool-row-link { display: flex; align-items: flex-start; gap: 13px; flex: 1; min-width: 0; padding: 16px 5px 16px 0; }
.tool-row-link > svg { color: #556d5b; margin-top: 2px; width: 20px; height: 20px; }
.tool-copy { min-width: 0; }
.tool-copy, .catalog-filters button { overflow-wrap: anywhere; }
.tool-copy h3 { font-size: var(--body); font-weight: 500; margin: 0 0 5px; }
.tool-copy p { margin: 0; font-size: var(--ui); line-height: 1.6; color: var(--muted); }
.tool-mode { font-size: var(--small); color: var(--muted); white-space: nowrap; min-width: 72px; }
.pin { min-width: 38px; min-height: 38px; color: #64776a!important; }
.pin.pinned { color: var(--accent)!important; background: #e2ece4; }
.pin svg { width: 16px; height: 16px; }

/* Registers and document workflows. */
.panel { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 24px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.empty { text-align: left; color: var(--muted); padding: 26px 18px; font-size: var(--body); }
.empty h3 { color: var(--ink); margin-bottom: 8px; }
.empty p { margin-bottom: 18px; max-width: 62ch; }
.badge { display: inline-flex; align-items: center; border-radius: 3px; padding: 3px 7px; font-size: var(--small); font-weight: 500; line-height: 1.5; white-space: nowrap; background: #e8f2e9; color: #28583b; }
.badge.neutral { background: #edf1ee; color: #4c6051; }
.badge.warn { background: #fff1d6; color: #79500d; }
.badge.red { background: #f9e7e4; color: #96382e; }
.register-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin: 0 0 18px; }
.register-toolbar .tabs { margin: 0; }
.register-toolbar .search { max-width: 340px; }
.table-wrap { width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--ui); }
th { font-size: var(--small); font-weight: 500; color: #485e4e; background: #edf2ee; padding: 12px 14px; text-align: left; white-space: nowrap; }
td { border-top: 1px solid #e1e8e2; padding: 14px; vertical-align: middle; line-height: 1.6; overflow-wrap: anywhere; }
td .title-link { display: block; padding: 0!important; min-height: 0; border: 0; color: #244d33; font-size: var(--ui); font-weight: 500; white-space: normal; text-align: left; line-height: 1.6; }
.title-link:hover { text-decoration: underline; text-underline-offset: 3px; background: transparent!important; }
.record-details { display: block; font-size: var(--small); color: var(--muted); margin-top: 5px; line-height: 1.6; }
.row-actions { flex-wrap: nowrap; gap: 5px; }
.row-actions button { white-space: nowrap; }
.row-actions .ghost { text-decoration: underline; text-underline-offset: 3px; }
.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e1d1aa; border-radius: 4px; background: #fff8e7; color: #76551a; padding: 15px 17px; margin-bottom: 24px; font-size: var(--ui); line-height: 1.7; }
.notice.info { background: #edf5ee; color: #365b40; border-color: #c6dbca; }
.notice a { text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 28px; align-items: start; }
.form-panel h2 { margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid .wide { grid-column: 1/-1; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: var(--ui); font-weight: 500; margin-bottom: 0; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #829486; border-radius: 4px; background: #fff; color: var(--ink); font-size: var(--body); font-weight: 400; line-height: 1.5; }
.field textarea { min-height: 125px; resize: vertical; line-height: 1.7; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #377d59; border-color: #4c7f59; }
.form-section { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 26px; }
.form-section h3 { margin-bottom: 18px; }
.evidence-heading { margin-top: 26px; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.upload { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; border: 1px dashed #a8c0ae; background: #f6f9f6; color: var(--accent); padding: 20px; margin: 14px 0 10px; text-align: left; white-space: normal; }
.upload:hover { background: #ebf4ed!important; }
.upload strong { font-size: var(--body); font-weight: 500; }
.upload small { font-size: var(--small); color: #566f5d; line-height: 1.5; }
.file-pick { display: flex; align-items: center; gap: 10px; padding: 12px 0; font-size: var(--ui); font-weight: 400; line-height: 1.6; border-top: 1px solid var(--line); }
.file-pick span { min-width: 0; overflow-wrap: anywhere; }
.file-pick small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.upload-busy { color: var(--accent); font-size: var(--ui); padding: 9px 0; }
.tool-layout > aside .panel { border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; padding: 0 0 0 22px; }
.steps-list { padding-left: 20px; margin: 20px 0 28px; }
.steps-list li { color: var(--muted); padding: 0 0 17px 5px; font-size: var(--ui); line-height: 1.6; }
.steps-list strong { display: block; color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.details-list { padding-left: 20px; font-size: var(--body); line-height: 1.8; color: #475e4d; }
.tool-layout aside .details-list, .tool-layout aside .subheading { font-size: var(--ui); }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.activity-row { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding: 14px 0; }
.activity-row strong { display: block; font-size: var(--ui); font-weight: 500; overflow-wrap: anywhere; }
.activity-row small { display: block; color: var(--muted); font-size: var(--small); margin-top: 4px; }
.activity-row .badge { margin-left: auto; }
.report { max-width: 1120px; margin: 0 auto; }
.report > article.panel { padding: 36px; }
.report-head { border-bottom: 1px solid #b5cbbd; padding-bottom: 24px; margin-bottom: 24px; }
.report-head h1 { font-size: 1.875rem; line-height: 1.3; margin-bottom: 16px; }
.report-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; font-size: var(--small); color: var(--muted); }
.report-section { margin: 32px 0; }
.report-section h2 { margin-bottom: 14px; }
.report-section p { white-space: pre-wrap; color: #344d3b; font-size: 1rem; line-height: 1.8; max-width: 85ch; }
.report .table-wrap td { min-width: 110px; }
.report-editor > .field { margin-top: 20px; }
.report-editor textarea, .report-editor input { width: 100%; border: 1px solid #829486; border-radius: 4px; color: var(--ink); font: inherit; padding: 10px; }
.report-editor textarea { min-height: 150px; line-height: 1.7; }
.report-editor td textarea { min-height: 100px; min-width: 200px; }
.report-editor td input { min-width: 90px; }
.bowtie { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; align-items: center; }
.bowtie .center { border: 2px solid #9ab99f; padding: 25px; background: #edf5ee; border-radius: 4px; text-align: center; }
.bowtie .center h3 { margin: 12px 0 0; }
.bowtie .barrier { padding: 13px; border: 1px solid var(--line); background: #f7faf7; margin: 8px 0; font-size: var(--ui); line-height: 1.7; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: #fff; margin-bottom: 28px; }
.stat { padding: 20px; border-right: 1px solid var(--line); }
.stat:last-child { border: 0; }
.stat-top { display: flex; align-items: center; gap: 8px; font-size: var(--small); color: var(--muted); }
.stat-top svg { width: 16px; height: 16px; }
.stat strong { display: block; font-size: 1.75rem; font-weight: 500; margin: 12px 0 4px; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.chart { display: flex; align-items: flex-end; height: 210px; gap: 18px; border-bottom: 1px solid var(--line); padding-top: 20px; }
.bar-wrap { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; color: var(--muted); font-size: var(--small); text-align: center; }
.bar { background: #709b79; width: 75%; max-width: 80px; min-height: 3px; }
.bar-label { min-height: 25px; }
.check-item { display: grid; grid-template-columns: 1fr 140px; gap: 14px; align-items: center; border-top: 1px solid var(--line); padding: 20px 0; }
.check-item label { font-size: var(--body); }
.check-item textarea { grid-column: 1/-1; min-height: 95px; resize: vertical; }
.check-item textarea, .check-item select { background: #fff; color: var(--ink); border: 1px solid #829486; border-radius: 4px; padding: 11px; font: inherit; }
.timer-display { font-size: 3rem; font-variant-numeric: tabular-nums; font-weight: 500; margin: 18px 0; }
.settings-item { display: flex; align-items: center; justify-content: space-between; gap: 25px; padding: 21px 0; border-bottom: 1px solid var(--line); }
.settings-item:last-child { border-bottom: 0; }
.settings-item strong { font-weight: 500; }
.settings-item small { display: block; font-size: var(--ui); color: var(--muted); margin-top: 5px; }
.initial { display: grid; place-content: center; justify-items: center; text-align: center; height: 100vh; }
.initial h1 { margin-top: 24px; }
.initial p { color: var(--muted); }
.signin { max-width: 560px; padding: 35px; margin: 50px auto; }
.signin .brand-logo { margin-bottom: 25px; }
.signin .button { margin-top: 15px; }

/* Dialogs and search remain keyboard accessible. */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; background: #1d352c75; display: grid; place-items: center; padding: 24px; }
.modal { width: 100%; max-width: 780px; max-height: 92dvh; overflow: auto; background: #fff; border-radius: 6px; padding: 28px; box-shadow: 0 18px 70px #132e2526; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.modal-head h2 { font-size: 1.25rem; }
.modal .close { padding: 7px; min-height: 36px; min-width: 36px; background: #edf3ee; color: #3d5e47; }
.modal .form-grid { margin-top: 20px; }
.modal:has(.report-editor) { max-width: 1180px; }
.modal:has(.command-menu) { padding: 0; max-width: 680px; align-self: start; margin-top: 9vh; }
.modal:has(.command-menu) .modal-head { margin: 0; padding: 17px 22px 0; }
.modal:has(.command-menu) .modal-head h2 { font-size: var(--ui); color: var(--muted); }
.command-search { display: flex; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.command-search input { width: 100%; min-width: 0; background: transparent; color: var(--ink); outline: 0; border: 0; font-size: 1rem; }
.command-results { max-height: 52dvh; overflow: auto; padding: 8px; }
.command-label { font-size: var(--small); color: var(--muted); margin: 12px 14px 5px; }
.command-result { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 4px; }
.command-result:hover, .command-result:focus { background: #e9f3eb; outline: none; }
.command-icon { display: grid; place-items: center; width: 26px; color: #4b6c54; flex-shrink: 0; }
.command-result strong { display: block; font-size: var(--body); font-weight: 500; }
.command-result small { display: block; font-size: var(--small); color: var(--muted); margin-top: 3px; }
.command-result > svg { margin-left: auto; width: 14px; height: 14px; color: var(--muted); }
.command-help { display: flex; justify-content: space-between; gap: 20px; padding: 14px 22px; border-top: 1px solid var(--line); font-size: var(--small); color: var(--muted); }
#toast { display: none; position: fixed; z-index: 200; right: 24px; bottom: 24px; max-width: min(460px, 92vw); border: 1px solid #b3cbbb; border-radius: 5px; background: #fff; box-shadow: 0 6px 26px #183a281a; color: #254e32; padding: 16px 20px; font-size: var(--body); }
#toast.error { background: #fff7f4; border-color: #e0b4a9; color: #923e30; }
.loading { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lesson { padding: 26px; border: 1px solid #c0d7c5; border-radius: 4px; background: #f0f7f1; margin: 26px 0; }
.lesson p { white-space: pre-wrap; font-size: 1rem; line-height: 1.8; }
.quiz-question { padding: 25px 0; border-bottom: 1px solid var(--line); }
.quiz-question h3 { font-size: 1rem; line-height: 1.6; }
.quiz-option { display: flex; align-items: flex-start; gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 14px; margin: 10px 0; font-size: var(--body); line-height: 1.7; cursor: pointer; }
.quiz-option:has(input:checked) { border-color: #80a78b; background: #edf6ef; }
.quiz-feedback { background: #eaf5ec; color: #285934; padding: 15px; font-size: var(--body); line-height: 1.7; }
.quiz-feedback.wrong { background: #fff2de; color: #80551b; }
.certificate { background: #fff; padding: 35px; border: 2px solid #7da58a; text-align: center; margin: 28px 0; }
.certificate strong { font-size: 1.75rem; display: block; font-weight: 500; margin: 22px 0; }
.ask-box { margin-top: 28px; padding-top: 25px; border-top: 1px solid var(--line); }
.answer { padding: 20px; background: #edf5ee; font-size: var(--body); white-space: pre-wrap; line-height: 1.8; margin-top: 20px; }
[hidden] { display: none!important; }

@media (max-width: 1250px) { .sync-time { display: none; } .summary-item { grid-template-columns: auto 1fr; padding: 0 16px; } .summary-item svg { display: none; } .catalog-layout { grid-template-columns: 175px minmax(0, 1fr); gap: 22px; } .tool-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 24px; } }
@media (max-width: 1050px) { :root { --side: 13.75rem; } .brand { gap: 8px; } .brand-logo { width: 2.25rem; } .brand small { font-size: .8125rem; } .sidebar { padding-left: 12px; padding-right: 12px; } .sidebar-search kbd { display: none; } .nav-link { font-size: var(--small); } .topbar { padding: 0 24px; } .project-context > span { display: none; } main.workspace { padding: 28px 24px 24px; } .operations-grid { grid-template-columns: 1fr; gap: 28px; } .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 22px 0; } .summary-item:nth-child(3) { padding-left: 0; border-left: 0; } .summary-item strong { font-size: 1.5rem; } .tool-layout { grid-template-columns: 1fr; } .tool-layout > aside { margin-top: 5px; } .tool-layout > aside .panel { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--line); } .catalog-layout { grid-template-columns: 1fr; gap: 20px; } .catalog-filters { flex-direction: row; flex-wrap: wrap; } .catalog-filters button { width: auto; gap: 8px; min-height: 38px; padding: 8px 10px; } .tool-mode { min-width: 62px; } .lower-grid { grid-template-columns: 1fr; } .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(2) { border: 0; } .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 760px) {
  :root { --side: 0px; }
  .sidebar { width: 280px; visibility: hidden; transform: translateX(-100%); padding: 23px 16px 20px; }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .sidebar .nav-link { font-size: var(--ui); min-height: 44px; }
  .sidebar-search kbd { display: inline; }
  .sidebar .brand-logo { width: 2.625rem; }
  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: #233d2f60; border: 0; border-radius: 0; }
  .nav-scrim:hover { background: #233d2f60!important; }
  .topbar { height: 62px; padding: 0 16px; gap: 8px; }
  .crumb { gap: 8px; flex: 1; }
  .crumb > strong, .crumb-divider { display: none; }
  .mobile-menu { display: flex; min-height: 44px; min-width: 38px; padding: 7px!important; margin-left: -5px; }
  .project-context { flex: 1; min-width: 0; }
  .project-select { width: 100%; max-width: 210px; min-width: 0; font-size: var(--ui); min-height: 40px; }
  .top-actions .ghost { min-height: 44px; min-width: 38px; padding: 7px; }
  main.workspace { padding: 24px 18px; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.0625rem; }
  .page-heading { flex-wrap: wrap; gap: 18px; margin-bottom: 24px; }
  .page-heading > .toolbar { width: 100%; justify-content: flex-start; margin-top: 0; }
  .subheading { font-size: var(--body); }
  .summary-strip { gap: 20px 0; padding: 20px 0; margin-bottom: 28px; }
  .summary-item { padding: 0 14px; column-gap: 9px; }
  .summary-item span { font-size: var(--small); }
  .section-head { flex-wrap: wrap; gap: 9px; align-items: baseline; }
  .section-head .text-link { font-size: var(--small); }
  .tabs { gap: 3px; }
  .tabs button { min-height: 44px; padding: 9px 11px; }
  .inline-empty { align-items: flex-start; flex-direction: column; gap: 17px; padding: 20px; }
  .operations-grid { margin-top: 28px; gap: 27px; }
  .record-row { flex-wrap: wrap; gap: 9px; }
  .record-copy { flex-basis: calc(100% - 25px); }
  .record-row > .badge { order: 2; }
  .record-row > svg { margin-left: auto; }
  .pinned-list { display: grid; grid-template-columns: 1fr; }
  .pinned-link { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: var(--body); }
  .pinned-link > svg:last-child { margin-left: auto; }
  .catalog-filters { gap: 4px; }
  .catalog-filters button { min-height: 44px; font-size: var(--small); }
  .catalog-search input, .search input { font-size: 1rem; }
  .result-label { margin-bottom: 20px; }
  .tool-row { flex-wrap: wrap; gap: 0 8px; position: relative; }
  .tool-row-link { padding: 17px 43px 17px 0; }
  .tool-copy h3 { font-size: 1rem; }
  .tool-copy p { font-size: var(--ui); }
  .tool-mode { display: none; }
  .pin { position: absolute; top: 8px; right: 0; min-width: 44px; min-height: 44px; }
  button, .button { min-height: 44px; }
  button.small, .button.small { min-height: 40px; }
  .panel { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .field input, .field select, .field textarea { font-size: 1rem; }
  .form-actions > button[type=submit] { flex: 1; }
  .register-toolbar { gap: 16px; }
  .register-toolbar .search { max-width: none; width: 100%; min-height: 44px; }
  .register-toolbar > .tabs { width: 100%; }
  .table-wrap table { min-width: 620px; }
  .register-host .table-wrap, .action-queue .table-wrap { border: 0; background: transparent; overflow: visible; }
  .register-host .table-wrap table, .action-queue .table-wrap table { min-width: 0; display: block; }
  .register-host thead, .action-queue thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .register-host tbody, .action-queue tbody { display: block; }
  .register-host tbody tr, .action-queue tbody tr { display: block; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-bottom: 12px; }
  .register-host td, .action-queue td { display: grid; grid-template-columns: 115px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 7px 0; border: 0; font-size: var(--ui); }
  .register-host td:before, .action-queue td:before { content: attr(data-label); color: var(--muted); font-size: var(--small); }
  .register-host td:first-child, .action-queue td:first-child { display: block; padding: 0 0 12px; }
  .register-host td:first-child:before, .action-queue td:first-child:before { content: none; }
  .register-host td:first-child .title-link, .action-queue td:first-child .title-link { font-size: 1rem; }
  .register-host td[data-label=""], .action-queue td[data-label=""] { display: flex; justify-content: flex-start; flex-wrap: wrap; padding: 13px 0 0; }
  .register-host td[data-label=""]:before, .action-queue td[data-label=""]:before { content: none; }
  .register-host td .badge, .action-queue td .badge { justify-self: start; }
  .report > article.panel { padding: 25px 20px; }
  .report-head h1 { font-size: 1.5rem; }
  .report .toolbar { width: 100%; }
  .report-section p { font-size: 1rem; }
  .bowtie { grid-template-columns: 1fr; }
  .bowtie .center { order: -1; }
  .modal-backdrop { padding: 10px; }
  .modal { padding: 22px 18px; max-height: 94dvh; }
  .modal .close { min-width: 40px; min-height: 40px; }
  .modal h2 { font-size: 1.125rem; }
  .modal:has(.command-menu) { margin-top: 5vh; }
  .command-search { padding: 17px 20px; }
  .command-result { padding: 13px 12px; }
  .command-help { font-size: var(--small); padding: 13px 16px; flex-wrap: wrap; gap: 7px; }
  .check-item { grid-template-columns: 1fr; }
  .check-item textarea { grid-column: auto; }
  .check-item textarea, .check-item select { font-size: 1rem; }
  .settings-item { align-items: flex-start; gap: 15px; }
  .settings-item small { font-size: var(--ui); }
  .footer-note { font-size: var(--small); margin-top: 30px; }
  .skip-link { left: 15px; }
  .signin { margin: 20px auto; padding: 28px 22px; }
  .lesson, .certificate { padding: 23px; }
}
@container (max-width: 45rem) {
  .crumb > strong, .crumb-divider, .sync-time { display: none; }
  .project-context > span { display: none; }
  .topbar { min-height: 64px; height: auto; padding-top: 9px; padding-bottom: 9px; }
  .crumb { flex: 1; }
  .project-context { flex: 1; }
  .project-select { max-width: 100%; width: 100%; }
  .catalog-layout { grid-template-columns: 1fr; gap: 20px; }
  .catalog-filters { flex-direction: row; flex-wrap: wrap; }
  .catalog-filters button { width: auto; max-width: 100%; gap: 10px; }
  .page-heading { flex-wrap: wrap; }
  .operations-grid { grid-template-columns: 1fr; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); gap: 20px 0; }
  .summary-item:nth-child(3) { padding-left: 0; border-left: 0; }
  .tool-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .wide { grid-column: auto; }
  .tool-layout > aside .panel { border-left: 0; border-top: 1px solid var(--line); padding: 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) { *, *:before, *:after { animation: none!important; transition: none!important; scroll-behavior: auto!important; } }
@media print { body { background: #fff; color: #222; } .sidebar, .topbar, .no-print, .footer-note, #toast, #modal-root, .skip-link, .nav-scrim { display: none!important; } .shell { margin: 0; } main.workspace { padding: 0; max-width: none; } .panel, .report > article.panel { padding: 0; border: 0; } .report { max-width: none; } .report .table-wrap { overflow: visible; } .report table { font-size: 10pt; min-width: 0; } .report td { padding: 7px; min-width: 0!important; } .report-section { break-inside: avoid; } .report-section p, .details-list, .report-meta { color: #333; } h1, h2, h3 { break-after: avoid; } .certificate { break-before: page; } }

/* Template assessment: document fields remain a form, with no simulated Word layout. */
.ra-workflow { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:32px; align-items:start; }
.ra-workflow > .panel { min-width:0; }
.ra-workflow h2, .ra-review h2 { font-size:1.125rem; margin:0 0 16px; }
.ra-workflow .field { margin:18px 0; }
.ra-context textarea { min-height:230px; }
.ra-inspection-summary { display:flex; flex-direction:column; gap:5px; margin:24px 0 14px; padding-top:20px; border-top:1px solid var(--line); }
.ra-inspection-summary span { color:var(--muted); font-size:.875rem; }
.ra-field-group { border-top:1px solid var(--line); padding:14px 0; }
.ra-field-group summary { cursor:pointer; font-weight:500; font-size:.9375rem; }
.ra-slot-list { padding-top:8px; }
.ra-hash { overflow-wrap:anywhere; color:var(--muted); font-size:.8125rem; }
.ra-edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin-top:20px; }
.ra-edit-grid .field { display:flex; flex-direction:column; gap:6px; }
.ra-edit-grid textarea { width:100%; resize:vertical; }
.ra-edit-grid textarea[readonly] { background:var(--paper); color:var(--muted); }
.ra-report-status { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:16px 0; font-size:.875rem; }
.ra-open-items { margin:28px 0; }
.ra-open-items li { margin:8px 0; }
.ra-review { margin-top:28px; }
.ra-report-actions { margin-top:24px; flex-wrap:wrap; }
.ra-report-actions a[aria-disabled="true"] { opacity:.45; cursor:default; }
@media(max-width:960px) { .ra-workflow { grid-template-columns:minmax(0,1fr); gap:24px; } }
@media(max-width:600px) { .ra-edit-grid { grid-template-columns:1fr; } .ra-workflow .form-actions { flex-wrap:wrap; } }
