/* PL1 layout system for the Portal tool. Loaded last on every page.
   1 design tokens  2 generated scale snap (tools/gen-scale.mjs)  3 components.
   Presentation only: same colours and workflows as before, one calm type scale, one spacing scale, one set of control sizes. */

/* ===== 1. design tokens ===== */
:root {
  /* type scale, size with a fixed line height */
  --pl-fs-12: 12px; --pl-lh-12: 16px;
  --pl-fs-14: 14px; --pl-lh-14: 20px;
  --pl-fs-16: 16px; --pl-lh-16: 24px;
  --pl-fs-20: 20px; --pl-lh-20: 28px;
  --pl-fs-24: 24px; --pl-lh-24: 32px;
  --pl-fs-32: 32px; --pl-lh-32: 40px;
  /* weights: regular, medium, semibold, bold */
  --pl-fw-4: 400; --pl-fw-5: 500; --pl-fw-6: 600; --pl-fw-7: 700;
  /* spacing scale */
  --pl-s-4: 4px; --pl-s-8: 8px; --pl-s-12: 12px; --pl-s-16: 16px; --pl-s-24: 24px; --pl-s-32: 32px; --pl-s-48: 48px;
  /* controls: one standard and one compact height, three radii */
  --pl-h: 44px; --pl-h-sm: 36px;
  --pl-r-ctl: 10px; --pl-r-card: 12px; --pl-r-panel: 16px;
  --card-radius: 12px; --control-radius: 10px; /* the older page rules read these two names */
  --pl-shadow-card: 0 1px 2px rgba(23, 25, 29, .06);
  --pl-shadow-panel: 0 8px 24px rgba(23, 25, 29, .08);
  /* sticky stack, kept exact by layout.js */
  --pl-header-h: 76px;
  --pl-sticky-h: 76px;
  /* quiet colours, AA on white and on the cream surfaces */
  --muted: #5b6472;
  --pl-ink-2: #3b414b;
  --pl-gold-text: #7a5a22;
  --pl-surface: #fbfaf7;
  --pl-surface-2: #f7f3ea;
}
html { scroll-padding-top: calc(var(--pl-sticky-h) + var(--pl-s-8)); }

/* ===== 2. generated scale snap ===== */
/* >>> GENERATED SCALE (tools/gen-scale.mjs, do not edit by hand) */
body { font-size: 14px; line-height: 20px; }
header { padding-right: 24px; padding-left: 24px; }
.mark { font-weight: 700; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
h1 { font-size: 20px; line-height: 28px; }
header p { font-size: 12px; line-height: 16px; margin-top: 4px; }
main { padding-top: 32px; padding-bottom: 32px; }
.launcher { row-gap: 16px; column-gap: 16px; }
@media (max-width: 680px) {
  main { padding-top: 24px; padding-bottom: 24px; }
}
.launch-card { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; row-gap: 16px; column-gap: 16px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.launch-icon { font-size: 20px; line-height: 28px; }
.launch-card h2 { font-size: 20px; line-height: 28px; }
.modal-wrap { padding-top: 32px; padding-bottom: 32px; }
.modal-head { padding-top: 16px; padding-right: 24px; padding-bottom: 16px; padding-left: 24px; }
.modal-title h2 { font-size: 20px; line-height: 28px; }
.modal-title p { font-size: 12px; line-height: 16px; margin-top: 4px; }
.close { font-size: 20px; line-height: 28px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.modal-body { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.form-grid { row-gap: 16px; column-gap: 16px; }
label { font-size: 12px; line-height: 16px; font-weight: 700; margin-bottom: 4px; }
input, select, textarea { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.media-prep-option { padding-top: 12px; padding-bottom: 12px; row-gap: 12px; column-gap: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.media-prep-option input { margin-top: 0px; }
.media-prep-option span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.media-step { padding-top: 16px; padding-bottom: 16px; }
.media-step h4 { font-size: 14px; line-height: 20px; }
.media-step p { font-size: 12px; line-height: 16px; }
.image-preview-summary { row-gap: 12px; column-gap: 12px; }
.image-preview-summary strong { font-size: 14px; line-height: 20px; }
.image-preview-summary span { font-size: 12px; line-height: 16px; }
.image-preview-item { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.image-preview-meta { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
.image-preview-meta strong { font-size: 12px; line-height: 16px; }
.image-preview-meta span { font-size: 12px; line-height: 16px; }
.image-preview-meta .prepared { font-weight: 700; }
.image-preview-delete { font-size: 20px; line-height: 28px; }
.actions { row-gap: 12px; column-gap: 12px; }
button { font-weight: 700; padding-top: 12px; padding-bottom: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.statusline { font-size: 12px; line-height: 16px; }
.notice { font-size: 12px; line-height: 16px; padding-top: 12px; padding-bottom: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.map-pin { padding-right: 16px; padding-left: 16px; row-gap: 12px; column-gap: 12px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.map-pin-head { row-gap: 12px; column-gap: 12px; }
.map-pin-head h4 { font-size: 14px; line-height: 20px; }
.map-pin-text { font-size: 12px; line-height: 16px; }
.map-pin-meta { font-size: 12px; line-height: 16px; column-gap: 16px; }
.map-pin-warn { font-size: 12px; line-height: 16px; padding-right: 12px; padding-left: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
#mapPinManualResult { row-gap: 12px; column-gap: 12px; }
.result { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.result-head { padding-right: 16px; padding-left: 16px; row-gap: 12px; column-gap: 12px; }
.result-head h3 { font-size: 14px; line-height: 20px; }
.copy-all { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.row { padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px; }
@media (max-width: 640px) {
  .row { row-gap: 4px; column-gap: 4px; }
}
.row-label { font-size: 12px; line-height: 16px; row-gap: 8px; column-gap: 8px; }
.row-value { font-weight: 700; }
.download-link { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 8px; padding-bottom: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.copy-btn { font-size: 14px; line-height: 20px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.badge { font-size: 12px; line-height: 16px; font-weight: 700; padding-right: 8px; padding-left: 8px; }
.copybox { font-size: 12px; line-height: 16px; padding-right: 16px; padding-left: 16px; }
.records-tools { row-gap: 12px; column-gap: 12px; }
.records-table-wrap { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.records-table { font-size: 12px; line-height: 16px; }
.records-table th, .records-table td { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
.records-table th { font-size: 12px; line-height: 16px; }
.field-table-title { font-size: 14px; line-height: 20px; }
.field-table { font-size: 12px; line-height: 16px; }
.field-table th, .field-table td { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
.field-table th { font-size: 12px; line-height: 16px; }
.mini-btn { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.sidebar { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
.sidebar-brand { row-gap: 12px; column-gap: 12px; }
.brand-copy strong { font-size: 14px; line-height: 20px; }
.brand-copy span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.sidebar-nav { padding-top: 16px; padding-bottom: 16px; }
.nav-label { font-size: 12px; line-height: 16px; font-weight: 700; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.nav-link { padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; row-gap: 8px; column-gap: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.nav-icon { font-size: 16px; line-height: 24px; }
.nav-icon.aed { font-size: 12px; line-height: 16px; font-weight: 700; }
.sidebar-foot { font-size: 12px; line-height: 16px; padding-top: 16px; padding-right: 12px; padding-bottom: 4px; padding-left: 12px; row-gap: 8px; column-gap: 8px; }
.ai-banner { font-size: 14px; line-height: 20px; padding-top: 8px; padding-right: 32px; padding-bottom: 8px; padding-left: 32px; }
.ai-banner button { font-size: 12px; line-height: 16px; padding-right: 12px; padding-left: 12px; }
@media (max-width: 900px) {
  .ai-banner { padding-top: 8px; padding-right: 16px; padding-bottom: 8px; padding-left: 16px; }
}
.app-header { padding-right: 32px; padding-left: 32px; row-gap: 16px; column-gap: 16px; }
.app-header h1 { font-size: 20px; line-height: 28px; }
.route-label { font-size: 12px; line-height: 16px; padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px; }
.logout-button { font-size: 12px; line-height: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.menu-toggle { font-size: 20px; line-height: 28px; }
.dashboard-main { padding-top: 32px; padding-right: 32px; padding-bottom: 32px; padding-left: 32px; }
.workflow-head { padding-top: 16px; padding-right: 24px; padding-bottom: 16px; padding-left: 24px; }
.workflow-icon { font-size: 16px; line-height: 24px; font-weight: 700; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.workflow-icon.aed { font-size: 12px; line-height: 16px; }
.workflow-title h2 { font-size: 16px; line-height: 24px; }
.workflow-title p { font-size: 12px; line-height: 16px; margin-top: 4px; }
.workflow-body { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.workflow-panel.workspace-mode .workflow-body { padding-top: 24px; }
.unit-switcher { row-gap: 8px; column-gap: 8px; }
.unit-switcher button { font-size: 20px; line-height: 28px; }
.nav-group summary { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.nav-group .nav-link { margin-top: 4px; }
.sidebar-tooltip { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.page-toolbar h3, .unit-command h3 { font-size: 20px; line-height: 28px; }
.page-toolbar p, .unit-command p { font-size: 12px; line-height: 16px; }
.metrics-strip, .facts-strip { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.metric, .fact { padding-top: 16px; padding-bottom: 16px; }
.metric span, .fact span { font-size: 12px; line-height: 16px; font-weight: 700; }
.metric strong, .fact strong { font-size: 20px; line-height: 28px; margin-top: 4px; }
.fact strong { font-size: 14px; line-height: 20px; }
.workspace-facts .fact small { font-size: 12px; line-height: 16px; }
.workspace-progress { margin-top: 12px; }
.workspace-progress-step { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 32px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.workspace-progress-step::before { font-size: 12px; line-height: 16px; font-weight: 700; }
.workspace-progress-step strong { font-size: 12px; line-height: 16px; }
.workspace-progress-step small { font-size: 12px; line-height: 16px; margin-top: 4px; }
.workspace-continuation { padding-right: 16px; padding-left: 16px; row-gap: 16px; column-gap: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.workspace-continuation strong { font-size: 12px; line-height: 16px; }
.workspace-continuation span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.operations-wrap { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.operations-table { font-size: 12px; line-height: 16px; }
.operations-table th, .operations-table td { padding-top: 12px; padding-bottom: 12px; }
.operations-table th { font-size: 12px; line-height: 16px; }
.permit-queue-table .unit-link { font-weight: 700; }
.permit-queue-table .queue-status-select { padding-right: 24px; padding-left: 12px; }
.inbox-toolbar-actions, .inbox-filters, .recent-units { row-gap: 8px; column-gap: 8px; }
.inbox-filters { margin-top: 4px; }
.inbox-control-row { row-gap: 8px; column-gap: 8px; }
.inbox-filter, .recent-unit { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.inbox-list { row-gap: 8px; column-gap: 8px; }
.inbox-item { padding-top: 16px; padding-bottom: 16px; row-gap: 16px; column-gap: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.inbox-unit { row-gap: 12px; column-gap: 12px; }
.inbox-unit-id { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.inbox-unit strong, .inbox-reason strong { font-size: 14px; line-height: 20px; }
.inbox-item-actions { row-gap: 8px; column-gap: 8px; }
.inbox-item-actions .secondary { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; }
.inbox-urgency { font-weight: 700; }
.inbox-empty { padding-top: 32px; padding-right: 24px; padding-bottom: 32px; padding-left: 24px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.inbox-pagination { row-gap: 8px; column-gap: 8px; }
.inbox-pagination span { font-size: 12px; line-height: 16px; font-weight: 700; }
@media (max-width: 820px) {
  .permit-queue-table tr { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .permit-queue-table td[data-label]::before { font-size: 12px; line-height: 16px; font-weight: 700; margin-bottom: 4px; }
}
.pf-verification-table .unit-link { font-weight: 700; }
.pf-verification-table .queue-status-select { padding-right: 24px; padding-left: 12px; }
.pf-export-label { font-size: 12px; line-height: 16px; font-weight: 700; }
.pf-export-label input { font-size: 12px; line-height: 16px; }
.pf-tracker { padding-top: 16px; padding-bottom: 16px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.pf-tracker-head { margin-bottom: 12px; row-gap: 12px; column-gap: 12px; }
.pf-slot-list { padding-left: 16px; }
@media (max-width: 820px) {
  .pf-verification-table tr { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .pf-verification-table td[data-label]::before { font-size: 12px; line-height: 16px; font-weight: 700; margin-bottom: 4px; }
}
.queue-status-select { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 32px; padding-bottom: 8px; padding-left: 8px; margin-top: 8px; }
.unit-link { font-weight: 700; }
.workspace-grid { row-gap: 16px; column-gap: 16px; }
.workspace-hero { row-gap: 16px; column-gap: 16px; }
.workspace-hero h2 { font-size: 20px; line-height: 28px; margin-top: 4px; margin-bottom: 4px; }
.workspace-hero p { font-size: 12px; line-height: 16px; }
.workspace-identity { font-size: 12px; line-height: 16px; font-weight: 700; }
.lifecycle-strip { margin-top: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.lifecycle-step { padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 48px; }
.lifecycle-step::before { font-size: 12px; line-height: 16px; font-weight: 700; }
.lifecycle-step strong { font-size: 12px; line-height: 16px; }
.lifecycle-step span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.workspace-layout { margin-top: 16px; row-gap: 24px; column-gap: 24px; }
.workspace-operation-sidebar { row-gap: 8px; column-gap: 8px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.workspace-operation-label { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 4px; padding-bottom: 8px; }
.workspace-operation { padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; row-gap: 8px; column-gap: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.workspace-operation-icon { font-size: 12px; line-height: 16px; font-weight: 700; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.workspace-operation strong { font-size: 12px; line-height: 16px; }
.workspace-operation small { font-size: 12px; line-height: 16px; }
.workspace-tool-switcher { margin-bottom: 16px; row-gap: 8px; column-gap: 8px; }
.workspace-tool { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.workspace-panel-head h3 { font-size: 16px; line-height: 24px; }
.workspace-panel-head p { font-size: 12px; line-height: 16px; }
.workspace-permit-grid { row-gap: 24px; column-gap: 24px; }
.workspace-subsection { padding-top: 16px; }
.workspace-subsection h4 { font-size: 14px; line-height: 20px; margin-bottom: 12px; }
.field-hint { font-size: 12px; line-height: 16px; margin-top: 8px; }
.activity-row small { font-size: 12px; line-height: 16px; }
.workspace-action-stack { row-gap: 16px; column-gap: 16px; }
.portal-defaults summary { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 12px; padding-bottom: 12px; }
.workspace-activity { margin-top: 24px; }
.workspace-activity summary { font-size: 12px; line-height: 16px; font-weight: 700; }
.workspace-activity[open] summary { margin-bottom: 8px; }
.workspace-activity-row { font-size: 12px; line-height: 16px; padding-top: 8px; padding-bottom: 8px; }
.workspace-empty-actions { margin-top: 16px; }
.section-block { padding-top: 16px; }
.section-block h4 { font-size: 14px; line-height: 20px; margin-bottom: 12px; }
.issue-analysis { row-gap: 16px; column-gap: 16px; }
.issue-summary { padding-bottom: 16px; row-gap: 16px; column-gap: 16px; }
.issue-summary h3 { font-size: 14px; line-height: 20px; margin-bottom: 4px; }
.issue-summary-meta { row-gap: 8px; column-gap: 8px; }
.issue-fix-header { font-size: 12px; line-height: 16px; font-weight: 700; padding-right: 12px; padding-left: 12px; }
.issue-fix-row { padding-right: 12px; padding-left: 12px; }
.issue-fix-field strong { font-size: 12px; line-height: 16px; }
.issue-fix-field p { font-size: 12px; line-height: 16px; }
.issue-evidence { font-size: 12px; line-height: 16px; }
.issue-fix-badges { margin-top: 8px; row-gap: 4px; column-gap: 4px; }
.issue-fix-current { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.issue-fix-value { font-size: 12px; line-height: 16px; padding-right: 12px; padding-left: 12px; }
.issue-mobile-label { font-size: 12px; line-height: 16px; font-weight: 700; }
.issue-approval-note { font-size: 12px; line-height: 16px; }
.quality-readiness { padding-top: 16px; padding-bottom: 16px; row-gap: 16px; column-gap: 16px; }
.quality-readiness strong { font-size: 20px; line-height: 28px; }
.quality-readiness p { font-size: 12px; line-height: 16px; }
.quality-readiness-state { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.quality-scorecards { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.quality-mini-card { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
.quality-mini-card span { font-size: 12px; line-height: 16px; font-weight: 700; }
.quality-mini-card strong { font-size: 20px; line-height: 28px; }
.quality-mini-card small { font-size: 12px; line-height: 16px; margin-top: 4px; }
.quality-source { font-size: 12px; line-height: 16px; margin-top: 4px; }
.quality-evidence { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.quality-evidence div { padding-right: 16px; padding-left: 16px; }
.quality-evidence span { font-size: 12px; line-height: 16px; font-weight: 700; }
.quality-evidence strong { font-size: 12px; line-height: 16px; margin-top: 4px; }
.quality-filters { row-gap: 8px; column-gap: 8px; }
.quality-filter { font-size: 12px; line-height: 16px; padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px; }
.quality-confirm { font-size: 12px; line-height: 16px; padding-top: 4px; padding-bottom: 4px; }
.quality-mode-note { font-size: 12px; line-height: 16px; }
.command-bar button { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.primary-action { font-size: 14px; line-height: 20px; }
.missing-list { font-size: 12px; line-height: 16px; row-gap: 8px; column-gap: 16px; }
.empty-state, .loading-state { padding-top: 32px; padding-right: 16px; padding-bottom: 32px; padding-left: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.ai-tag { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 4px; padding-right: 4px; padding-bottom: 4px; padding-left: 4px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.report-copy { font-size: 12px; line-height: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.activity-row { font-size: 12px; line-height: 16px; padding-top: 12px; padding-bottom: 12px; }
@media (min-width: 901px) {
  body.sidebar-collapsed .sidebar { padding-right: 12px; padding-left: 12px; }
  body.sidebar-collapsed .nav-link { padding-right: 4px; padding-left: 4px; }
  body.sidebar-collapsed .nav-group summary { font-size: 12px; line-height: 16px; padding-top: 8px; padding-bottom: 8px; }
  body.sidebar-collapsed .nav-group summary::before { font-size: 12px; line-height: 16px; }
}
@media (max-width: 900px) {
  .app-header { padding-right: 16px; padding-left: 16px; }
  .dashboard-main { padding-top: 24px; padding-right: 16px; padding-bottom: 24px; padding-left: 16px; }
  .workspace-layout { row-gap: 16px; column-gap: 16px; }
}
@media (max-width: 620px) {
  .workflow-head { padding-top: 16px; padding-bottom: 16px; }
  .dashboard-main { padding-top: 16px; padding-bottom: 16px; }
  .app-header { padding-top: 12px; padding-bottom: 12px; }
  .activity-row { row-gap: 4px; column-gap: 4px; }
  .workspace-activity-row { row-gap: 4px; column-gap: 4px; }
}
button { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
button.secondary { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
input, select, textarea { padding-right: 16px; padding-left: 16px; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
label { font-size: 12px; line-height: 16px; margin-bottom: 8px; }
.sidebar { padding-top: 24px; padding-bottom: 24px; }
.sidebar-brand { padding-bottom: 16px; }
.sidebar-brand .mark, .mark { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
.sidebar .brand-copy strong { font-size: 16px; line-height: 24px; }
.sidebar-nav { padding-top: 24px; padding-bottom: 24px; row-gap: 8px; column-gap: 8px; }
.nav-link { padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
.nav-icon { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.app-header { padding-right: 32px; padding-left: 32px; }
.app-header h1 { font-size: 20px; line-height: 28px; }
.logout-button { padding-top: 8px; padding-right: 16px; padding-bottom: 8px; padding-left: 16px; border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
.menu-toggle { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
.dashboard-main { padding-top: 32px; padding-bottom: 32px; }
.workflow-panel { border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; }
.workflow-head { padding-top: 16px; padding-right: 24px; padding-bottom: 16px; padding-left: 24px; }
.workflow-title h2 { font-size: 20px; line-height: 28px; }
.workflow-body { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; row-gap: 24px; column-gap: 24px; }
.page-toolbar h3, .unit-command h3 { font-size: 20px; line-height: 28px; }
.metric, .fact { padding-right: 16px; padding-left: 16px; }
.metric strong { font-size: 20px; line-height: 28px; }
.workspace-operation-sidebar { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
.workspace-operation-icon { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.modal { border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; }
.modal-head { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.modal-body { row-gap: 24px; column-gap: 24px; }
@media (max-width: 900px) {
  .app-header { padding-right: 24px; padding-left: 24px; }
  .dashboard-main { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 620px) {
  .app-header { padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px; }
  .dashboard-main { padding-top: 16px; padding-right: 12px; padding-left: 12px; }
  .workflow-panel { border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; }
  .workflow-body { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
  .page-toolbar h3, .unit-command h3 { font-size: 20px; line-height: 28px; }
  .modal-wrap { padding-right: 12px; padding-left: 12px; }
  .modal-body { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
}
.workspace-mode .workspace-hero { padding-bottom: 16px; }
.workspace-mode .workspace-hero h2 { font-size: 20px; line-height: 28px; }
.workspace-mode .workspace-hero p { font-size: 14px; line-height: 20px; }
.workspace-mode .workspace-facts { margin-top: 16px; }
.workspace-mode .workspace-facts .fact { padding-top: 16px; padding-bottom: 16px; }
.workspace-mode .workspace-facts strong { font-size: 14px; line-height: 20px; }
.workspace-mode .workspace-facts small { font-size: 12px; line-height: 16px; }
.workspace-mode .workspace-layout { margin-top: 24px; }
.workspace-operation-tabs { margin-bottom: 24px; row-gap: 12px; column-gap: 12px; }
.workspace-operation-tabs .workspace-operation { row-gap: 12px; column-gap: 12px; }
.workspace-operation-tabs .workspace-operation-icon { font-size: 14px; line-height: 20px; }
.workspace-operation-tabs .workspace-operation strong { font-size: 14px; line-height: 20px; }
.workspace-operation-tabs .workspace-operation small { font-size: 12px; line-height: 16px; }
.workspace-mode .workspace-tool-switcher { padding-bottom: 16px; margin-bottom: 16px; row-gap: 8px; column-gap: 8px; }
.workspace-mode .workspace-tool { font-size: 14px; line-height: 20px; padding-top: 8px; padding-right: 16px; padding-bottom: 8px; padding-left: 16px; }
.workspace-mode .workspace-tool-content { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.workspace-mode .workspace-panel-head { margin-bottom: 16px; }
.workspace-mode .workspace-panel-head h3 { font-size: 20px; line-height: 28px; }
.workspace-mode .workspace-panel-head p { font-size: 14px; line-height: 20px; }
.workspace-mode .workspace-permit-grid { row-gap: 16px; column-gap: 16px; }
.workspace-card { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.workspace-card-heading { margin-bottom: 16px; }
.workspace-card-heading h4 { font-size: 14px; line-height: 20px; }
.workspace-card-heading p { font-size: 14px; line-height: 20px; }
.workspace-step-number { font-size: 12px; line-height: 16px; font-weight: 700; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.workspace-prepare-prompt { font-size: 12px; line-height: 16px; }
.workspace-prepare-card .result.show { margin-top: 16px; }
.workspace-mode :is(input, select, textarea) { font-size: 14px; line-height: 20px; }
.workspace-mode select { padding-right: 32px; }
.workspace-mode label { font-size: 14px; line-height: 20px; font-weight: 600; }
.workspace-mode :is(.actions, .command-bar, .workspace-card-heading) > button, .workspace-mode .primary-action { font-size: 14px; line-height: 20px; padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px; }
.workspace-mode .actions { margin-top: 16px; row-gap: 12px; column-gap: 12px; }
.workspace-mode .field-hint { font-size: 12px; line-height: 16px; }
.workspace-mode input[type="file"] { font-size: 14px; line-height: 20px; padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; }
.workspace-mode input[type="file"]::file-selector-button { padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.workspace-record-card { padding-right: 24px; padding-left: 24px; }
.workspace-record-card summary { font-size: 14px; line-height: 20px; }
.workspace-record-card summary span { font-size: 12px; line-height: 16px; }
.workspace-record-facts .activity-row { font-size: 14px; line-height: 20px; row-gap: 8px; column-gap: 8px; }
.workspace-mode .workspace-activity { padding-right: 24px; padding-left: 24px; }
.workspace-mode .workspace-activity summary { font-size: 14px; line-height: 20px; }
.workspace-mode .media-step { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
.workspace-mode .media-step p { font-size: 14px; line-height: 20px; }
.workspace-mode .media-step h4 { font-size: 14px; line-height: 20px; }
.workspace-mode .notice { font-size: 14px; line-height: 20px; }
@container unit-workspace (max-width: 540px) {
  .workspace-mode .workspace-operation { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .workspace-mode .workspace-operation-icon { font-size: 14px; line-height: 20px; }
  .workspace-mode .workspace-operation small { font-size: 12px; line-height: 16px; }
  .workspace-mode .workspace-hero h2 { font-size: 20px; line-height: 28px; }
}
@media (max-width: 620px) {
  .dashboard-main:has(.workspace-mode) { padding-top: 16px; padding-right: 12px; padding-bottom: 16px; padding-left: 12px; }
  .workspace-mode :is(input, select, textarea) { font-size: 16px; line-height: 24px; }
}
.test-mode-banner { font-size: 14px; line-height: 20px; }
.test-mode-banner strong { font-size: 14px; line-height: 20px; }
.test-mode-tag { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 4px; padding-right: 12px; padding-bottom: 4px; padding-left: 12px; }
.maptab-early-note { font-size: 14px; line-height: 20px; }
.maptab-current { padding-top: 16px; padding-bottom: 16px; }
.maptab-current-row { row-gap: 8px; }
.maptab-current-row > span:first-child { font-size: 12px; line-height: 16px; font-weight: 700; }
.maptab-current-row strong { font-size: 14px; line-height: 20px; }
.maptab-current-meta { font-size: 12px; line-height: 16px; }
.maptab-link { font-size: 12px; line-height: 16px; font-weight: 700; }
.maptab-grid { row-gap: 16px; column-gap: 16px; }
.maptab-side { row-gap: 16px; column-gap: 16px; }
.maptab-toolbar { row-gap: 12px; column-gap: 12px; }
.maptab-search-results button { font-size: 14px; line-height: 20px; padding-top: 8px; padding-bottom: 8px; row-gap: 4px; column-gap: 4px; }
.maptab-search-results small { font-size: 12px; line-height: 16px; }
.maptab-search-results p { font-size: 12px; line-height: 16px; padding-top: 12px; padding-bottom: 12px; }
.maptab-layers button { font-size: 14px; line-height: 20px; padding-right: 16px; padding-left: 16px; }
.maptab-canvas { font-size: 12px; line-height: 16px; }
.maptab-map-loading { font-size: 14px; line-height: 20px; padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; }
.maptab-map-note { font-size: 14px; line-height: 20px; padding-top: 16px; padding-right: 24px; padding-bottom: 16px; padding-left: 24px; }
.maptab-readout { font-size: 14px; line-height: 20px; column-gap: 16px; }
.maptab-result { font-size: 14px; line-height: 20px; font-weight: 700; padding-right: 16px; padding-left: 16px; }
.maptab-result small { font-size: 12px; line-height: 16px; }
.maptab-offer { padding-top: 16px; padding-bottom: 16px; row-gap: 12px; column-gap: 12px; }
.maptab-offer-head strong { font-size: 14px; line-height: 20px; }
.maptab-offer-head span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.maptab-offer-select { row-gap: 8px; }
.maptab-live { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 0px; padding-right: 8px; padding-bottom: 0px; padding-left: 8px; }
.maptab-offer-list { row-gap: 4px; column-gap: 4px; }
.maptab-offer-list label { font-size: 14px; line-height: 20px; padding-top: 8px; padding-bottom: 8px; row-gap: 12px; column-gap: 12px; }
.maptab-offer-list small { font-size: 12px; line-height: 16px; }
.maptab-card { padding-top: 16px; padding-bottom: 16px; row-gap: 12px; column-gap: 12px; }
.maptab-card h4 { font-size: 14px; line-height: 20px; }
.maptab-card p { font-size: 12px; line-height: 16px; }
.maptab-card-head { row-gap: 12px; column-gap: 12px; }
.workspace-mode .maptab-card-head button { font-size: 12px; line-height: 16px; padding-top: 8px; padding-bottom: 8px; }
.maptab-suggestion { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; row-gap: 12px; column-gap: 12px; }
.maptab-letter { font-size: 12px; line-height: 16px; font-weight: 700; }
.maptab-suggestion strong { font-size: 14px; line-height: 20px; }
.maptab-suggestion small { font-size: 12px; line-height: 16px; margin-top: 4px; }
.workspace-mode .maptab-suggestion button { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.maptab-tag { font-size: 12px; line-height: 16px; font-weight: 700; padding-top: 4px; padding-bottom: 4px; margin-top: 4px; }
.maptab-checked { font-size: 12px; line-height: 16px; }
.maptab-units li { font-size: 12px; line-height: 16px; padding-top: 8px; padding-bottom: 8px; }
.maptab-counts { row-gap: 8px; column-gap: 8px; }
.maptab-fixes summary { font-size: 14px; line-height: 20px; }
.maptab-fix { font-size: 12px; line-height: 16px; }
.maptab-fix strong { font-size: 14px; line-height: 20px; }
.workspace-mode .maptab-fix button { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.maptab-crm-icon span, .maptab-sugg-icon span { font-weight: 700; }
.maptab-crm-icon span { font-size: 12px; line-height: 16px; }
.maptab-sugg-icon span { font-size: 12px; line-height: 16px; }
.map-fix-table button { font-size: 12px; line-height: 16px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
@media (max-width: 820px) {
  .map-fix-table td { padding-top: 8px; padding-bottom: 8px; }
  .map-fix-table td[data-label]::before { font-size: 12px; line-height: 16px; font-weight: 700; margin-bottom: 4px; }
}
.reports-mode .app-header { row-gap: 12px; column-gap: 12px; }
.report-toolbar, .report-exports, .report-pagination, .report-pagination > div { row-gap: 12px; column-gap: 12px; }
.report-toolbar { margin-bottom: 24px; }
.report-toolbar p { font-size: 14px; line-height: 20px; }
.report-filters { padding-top: 24px; padding-right: 24px; padding-bottom: 24px; padding-left: 24px; row-gap: 16px; column-gap: 16px; }
.portal-report label { font-size: 14px; line-height: 20px; font-weight: 600; }
.portal-report :is(input, select, button) { border-top-left-radius: 12px; border-top-right-radius: 12px; border-bottom-right-radius: 12px; border-bottom-left-radius: 12px; }
.portal-report :is(input, select) { font-size: 14px; line-height: 20px; }
.portal-report button { font-size: 14px; line-height: 20px; }
.report-message { font-size: 14px; line-height: 20px; margin-top: 16px; margin-bottom: 16px; }
.report-message.error { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
.report-metrics { margin-top: 24px; }
.report-metric { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; }
.report-metric span { font-size: 14px; line-height: 20px; }
.report-metric strong { font-size: 24px; line-height: 32px; }
.report-source, .report-import { padding-top: 16px; padding-bottom: 16px; }
.portal-report summary { font-size: 14px; line-height: 20px; }
.report-source p, .report-import p { font-size: 14px; line-height: 20px; margin-top: 12px; }
.report-import a { font-size: 14px; line-height: 20px; font-weight: 600; margin-top: 16px; margin-bottom: 16px; }
.report-file { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
#reportImportResult { font-size: 14px; line-height: 20px; margin-top: 16px; }
.report-breakdown { margin-top: 24px; margin-bottom: 24px; }
.report-breakdown h3 { font-size: 14px; line-height: 20px; }
.report-breakdown-items { row-gap: 12px; column-gap: 12px; }
.report-breakdown-items > div { padding-top: 12px; padding-right: 16px; padding-bottom: 12px; padding-left: 16px; }
.report-breakdown-items strong, .report-breakdown-items span { font-size: 14px; line-height: 20px; }
.report-results { border-top-left-radius: 16px; border-top-right-radius: 16px; border-bottom-right-radius: 16px; border-bottom-left-radius: 16px; }
.report-table th { font-size: 12px; line-height: 16px; }
.report-table :is(th, td) { padding-top: 16px; padding-bottom: 16px; }
.report-table td { font-size: 14px; line-height: 20px; }
.report-table small { font-size: 12px; line-height: 16px; margin-top: 8px; }
.report-table summary { font-size: 14px; line-height: 20px; }
.report-detail { margin-top: 12px; }
.report-empty { font-size: 14px; line-height: 20px; padding-top: 32px; padding-bottom: 32px; }
.report-pagination { font-size: 14px; line-height: 20px; padding-top: 16px; }
@media (max-width: 700px) {
  .reports-mode .app-header h1 { font-size: 16px; line-height: 24px; }
  .report-filters { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
  .portal-report :is(input, select) { font-size: 16px; line-height: 24px; }
  .report-metric { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
  .report-metric strong { font-size: 24px; line-height: 32px; }
  .report-table tr { padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; margin-bottom: 16px; }
  .report-table td { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .report-table td::before { font-size: 12px; line-height: 16px; margin-bottom: 4px; }
}
.live-stamp { font-size: 12px; line-height: 16px; }
.live-skeleton .inbox-unit strong, .live-skeleton .inbox-unit small, .live-skeleton .inbox-reason strong, .live-skeleton .inbox-reason small, .live-skeleton .inbox-unit-id { border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.live-bar { margin-top: 4px; margin-bottom: 4px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.pa-fab { font-size: 14px; line-height: 20px; padding-right: 16px; padding-left: 16px; row-gap: 8px; column-gap: 8px; }
.pa-panel { font-size: 14px; line-height: 20px; }
.pa-head { padding-right: 16px; padding-left: 16px; }
.pa-mark { font-size: 12px; line-height: 16px; font-weight: 700; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-title strong { font-size: 14px; line-height: 20px; }
.pa-title span { font-size: 12px; line-height: 16px; margin-top: 4px; }
.pa-iconbtn { font-size: 14px; line-height: 20px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-status { padding-right: 16px; padding-left: 16px; row-gap: 8px; column-gap: 8px; }
.pa-pill { font-size: 12px; line-height: 16px; padding-top: 4px; padding-right: 8px; padding-bottom: 4px; padding-left: 8px; }
.pa-context { font-size: 12px; line-height: 16px; padding-right: 16px; padding-left: 16px; }
.pa-history { padding-top: 8px; padding-right: 8px; padding-bottom: 8px; padding-left: 8px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.pa-hrow { row-gap: 8px; column-gap: 8px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-hopen { padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.pa-hdel { font-size: 16px; line-height: 24px; padding-top: 8px; padding-right: 12px; padding-bottom: 8px; padding-left: 12px; }
.pa-body { padding-top: 16px; padding-right: 16px; padding-bottom: 16px; padding-left: 16px; }
.pa-msg { row-gap: 8px; column-gap: 8px; }
.pa-bubble { padding-top: 12px; padding-bottom: 12px; }
.pa-msg.user .pa-bubble { border-bottom-right-radius: 6px; }
.pa-msg.assistant .pa-bubble { border-bottom-left-radius: 6px; }
.pa-bubble ul { padding-left: 16px; }
.pa-bubble li { margin-top: 4px; margin-bottom: 4px; }
.pa-bubble code { font-size: 12px; line-height: 16px; padding-top: 0px; padding-right: 4px; padding-bottom: 0px; padding-left: 4px; border-top-left-radius: 6px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; border-bottom-left-radius: 6px; }
.pa-notice { font-size: 12px; line-height: 16px; }
.pa-sources { font-size: 12px; line-height: 16px; row-gap: 4px; column-gap: 4px; }
.pa-src { padding-top: 4px; padding-bottom: 4px; }
.pa-link { font-size: 12px; line-height: 16px; padding-top: 4px; padding-bottom: 4px; }
.pa-welcome { row-gap: 12px; column-gap: 12px; }
.pa-welcome h3 { font-size: 16px; line-height: 24px; }
.pa-chips { row-gap: 8px; column-gap: 8px; }
.pa-chip { padding-top: 8px; padding-bottom: 8px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.pa-card-head { padding-top: 8px; padding-bottom: 8px; row-gap: 12px; column-gap: 12px; }
.pa-card-head strong { font-size: 14px; line-height: 20px; }
.pa-card-head span { font-size: 12px; line-height: 16px; }
.pa-card-body { padding-top: 12px; padding-bottom: 12px; row-gap: 8px; column-gap: 8px; }
.pa-unit { font-size: 12px; line-height: 16px; }
.pa-field { font-size: 12px; line-height: 16px; font-weight: 700; }
.pa-old, .pa-new { font-size: 14px; line-height: 20px; padding-top: 8px; padding-bottom: 8px; }
.pa-checks { font-size: 12px; line-height: 16px; row-gap: 4px; column-gap: 4px; }
.pa-checks li { padding-left: 16px; }
.pa-checks li::before { font-weight: 700; }
.pa-banner { font-size: 12px; line-height: 16px; padding-right: 12px; padding-left: 12px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-btn { border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-readback { font-size: 12px; line-height: 16px; }
.pa-readback th, .pa-readback td { padding-right: 8px; padding-left: 8px; }
.pa-diff { font-size: 12px; line-height: 16px; border-top-left-radius: 8px; border-top-right-radius: 8px; border-bottom-right-radius: 8px; border-bottom-left-radius: 8px; }
.pa-diff li { padding-top: 0px; padding-bottom: 0px; }
.pa-diff li::before { font-weight: 700; }
.pa-versions { row-gap: 8px; column-gap: 8px; }
.pa-versions li { font-size: 12px; line-height: 16px; padding-right: 12px; padding-left: 12px; }
.pa-compose { padding-top: 12px; row-gap: 8px; column-gap: 8px; }
.pa-input { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.pa-send { border-top-left-radius: 10px; border-top-right-radius: 10px; border-bottom-right-radius: 10px; border-bottom-left-radius: 10px; }
.pa-foot { font-size: 12px; line-height: 16px; }
@media (max-width: 480px) {
  .pa-head { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .pa-body { padding-top: 12px; padding-right: 12px; padding-bottom: 12px; padding-left: 12px; }
  .pa-input { font-size: 16px; line-height: 24px; }
}
/* <<< GENERATED SCALE */

/* ===== 3. components ===== */
/* Written inside body:not(#pl) so every rule below outranks the older page rules without !important. */
body:not(#pl) .workspace-mode { --card-radius: 12px; --control-radius: 10px; }
body:not(#pl) {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: var(--pl-fs-14);
  line-height: var(--pl-lh-14);
  font-weight: var(--pl-fw-4);

  & :is(h1, h2, h3, h4, h5, p, ul, ol, dl, figure, blockquote) { margin-top: 0; margin-bottom: 0; }
  & small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & :is(button, input, select, textarea) { font-family: inherit; }
  & :is(strong, b) { font-weight: var(--pl-fw-7); }
  & :is(h1, h2) { font-size: var(--pl-fs-20); line-height: var(--pl-lh-20); font-weight: var(--pl-fw-7); }
  & h3 { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-6); }
  & :is(h4, h5) { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6); }
  & ::placeholder { color: #6b7380; opacity: 1; }

  /* ----- page shell ----- */
  & .dashboard-main { max-width: 1280px; padding: var(--pl-s-32); }
  & .dashboard-main:has(.workspace-mode) { max-width: 1680px; padding: var(--pl-s-24); }
  & .app-header { padding: 0 var(--pl-s-24); gap: var(--pl-s-16); }
  & .app-header h1 { font-size: var(--pl-fs-20); line-height: var(--pl-lh-20); font-weight: var(--pl-fw-7); letter-spacing: 0; min-width: 0; flex: 0 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .ai-banner { top: var(--pl-header-h); padding: var(--pl-s-8) var(--pl-s-24); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); gap: var(--pl-s-8) var(--pl-s-12); }
  & .ai-banner button { height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); font-size: var(--pl-fs-14); }
  & .test-mode-tag { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); padding: var(--pl-s-4) var(--pl-s-12); color: #5c4200; }
  & .logout-button { height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-16); font-size: var(--pl-fs-14); font-weight: var(--pl-fw-6); }
  & .menu-toggle { display: none; width: var(--pl-h); height: var(--pl-h); min-height: var(--pl-h); padding: 0; font-size: var(--pl-fs-20); line-height: 1; border-radius: var(--pl-r-ctl); }
  & .unit-switcher { grid-template-columns: minmax(0, 1fr) var(--pl-h); gap: var(--pl-s-8); }
  & .unit-switcher :is(input, button) { height: var(--pl-h); min-height: var(--pl-h); }
  & .unit-switcher button { width: var(--pl-h); font-size: var(--pl-fs-20); line-height: 1; }
  & .workflow-panel { border-radius: var(--pl-r-panel); box-shadow: var(--pl-shadow-panel); }
  & .workflow-head { min-height: 72px; padding: var(--pl-s-16) var(--pl-s-24); gap: var(--pl-s-16); }
  & .workflow-icon { width: 40px; height: 40px; flex-basis: 40px; border-radius: var(--pl-r-ctl); font-size: var(--pl-fs-16); line-height: 1; }
  & .workflow-icon.aed { font-size: var(--pl-fs-12); }
  & .workflow-title h2 { font-size: var(--pl-fs-20); line-height: var(--pl-lh-20); font-weight: var(--pl-fw-7); letter-spacing: 0; }
  & .workflow-title p { margin-top: var(--pl-s-4); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & .workflow-body { padding: var(--pl-s-24); gap: var(--pl-s-24); }
  & .workflow-panel.workspace-mode .workflow-body { padding: var(--pl-s-24); }

  /* ----- sidebar ----- */
  & .sidebar { padding: var(--pl-s-24) var(--pl-s-16); }
  & .sidebar-brand { padding: 0 var(--pl-s-8) var(--pl-s-16); gap: var(--pl-s-12); }
  & .sidebar .brand-copy strong { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-7); }
  & .sidebar .brand-copy span { margin-top: 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: rgba(255, 255, 255, .72); }
  & .sidebar-nav { gap: var(--pl-s-4); padding: var(--pl-s-16) 0; }
  & .nav-label { padding: var(--pl-s-12) var(--pl-s-12) var(--pl-s-4); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); letter-spacing: .08em; color: rgba(255, 255, 255, .66); }
  & .nav-label:first-child { padding-top: 0; }
  & .nav-link { height: auto; min-height: var(--pl-h); padding: var(--pl-s-4) var(--pl-s-8); gap: var(--pl-s-12); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6); color: rgba(255, 255, 255, .84); transform: none; }
  & .nav-link > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  & .nav-icon { width: 32px; height: 32px; font-size: var(--pl-fs-14); line-height: 1; }
  & .sidebar-foot { padding: var(--pl-s-16) var(--pl-s-8) 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: rgba(255, 255, 255, .72); }
  & .sidebar-collapse { font-size: var(--pl-fs-14); line-height: 1; }
  & .sidebar-tooltip { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); padding: var(--pl-s-4) var(--pl-s-8); }

  /* ----- controls: one standard height (44) and one compact height (36) ----- */
  & :is(input, select):where(:not([type=checkbox], [type=radio], [type=hidden], [type=file], [type=range])) {
    height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-12);
    font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); border-radius: var(--pl-r-ctl);
  }
  & input[type=file] {
    height: var(--pl-h); min-height: var(--pl-h); padding: var(--pl-s-4); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14);
    border-radius: var(--pl-r-ctl); display: flex; align-items: center;
  }
  & input[type=file]::file-selector-button { height: 34px; min-height: 0; margin: 0 var(--pl-s-12) 0 0; padding: 0 var(--pl-s-12); border: 0; border-radius: 8px; color: var(--blue-dark); background: var(--gold-soft); font: inherit; font-weight: var(--pl-fw-6); cursor: pointer; }
  & input[type=file]:hover::file-selector-button { background: #eadcbe; }
  & input[type=file] { border: 1px solid #d6c9ae; background: #fff; color: var(--pl-ink-2); cursor: pointer; width: 100%; }
  & select {
    appearance: none; padding-right: 32px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236f5123' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-color: #fff;
  }
  & textarea { min-height: 120px; padding: var(--pl-s-12); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); border-radius: var(--pl-r-ctl); }
  & :is(input, textarea)[readonly], & :is(input, select, textarea)[disabled] { background-color: #f7f6f2; color: #4f5763; }
  & :is(input[type=checkbox], input[type=radio]) { width: 18px; height: 18px; min-height: 0; padding: 0; }

  & :is(button, .download-link):where(:not(.nav-link, .workspace-operation, .unit-link, .maptab-link, .sidebar-collapse, .menu-toggle, .maptab-search-results button)) {
    height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-16);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--pl-s-8);
    font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6);
    white-space: nowrap; border-radius: var(--pl-r-ctl); max-width: 100%;
  }
  & button.is-busy { display: inline-flex; }
  /* compact: bars, tables, pagers, pills */
  & :is(.command-bar, .inbox-item-actions, .report-exports, .report-pagination, .pl-pager, .inbox-pagination, .maptab-card-head, .maptab-suggestion, .maptab-fix, .map-fix-table, .operations-table, .records-table, .field-table, .workspace-panel-head .command-bar, .ai-banner, .copy-all) :is(button, .download-link),
  & :is(.mini-btn, .copy-all, .quality-confirm, .copy-btn) {
    height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12);
  }
  & .copy-btn { width: var(--pl-h-sm); padding: 0; font-size: var(--pl-fs-14); }
  & .row-label .copy-btn { width: 28px; height: 28px; min-height: 28px; font-size: var(--pl-fs-12); }
  & .copy-input { grid-template-columns: minmax(0, 1fr) var(--pl-h); gap: var(--pl-s-8); align-items: end; }
  & .copy-input .copy-btn { width: var(--pl-h); height: var(--pl-h); min-height: var(--pl-h); }
  & .close { width: var(--pl-h-sm); height: var(--pl-h-sm); min-width: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0; font-size: var(--pl-fs-20); line-height: 1; }
  & :is(.inbox-filter, .recent-unit, .workspace-tool, .quality-filter) {
    height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); border-radius: 999px;
  }
  & .workspace-mode .workspace-tool { height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .primary-action { min-width: 0; height: var(--pl-h); min-height: var(--pl-h); font-size: var(--pl-fs-14); }
  & .workspace-mode :is(.actions, .command-bar, .workspace-card-heading) > button, & .workspace-mode .primary-action { height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); white-space: nowrap; }
  & .workspace-mode .command-bar > button, & .workspace-mode .workspace-panel-head .command-bar > button { height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); }
  & .command-bar { gap: var(--pl-s-8); align-items: center; }
  & .actions { gap: var(--pl-s-12); align-items: center; }
  & .statusline { min-height: var(--pl-lh-14); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }

  /* ----- labels and field cells: one line, one height, so a long label never pushes its control ----- */
  & label {
    display: block; margin: 0 0 var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12);
    font-weight: var(--pl-fw-6); color: var(--pl-ink-2); text-transform: none; letter-spacing: 0;
  }
  & :is(label:has(+ :is(input, select, textarea, .copy-input)), .filebox > label, .report-filters > label > span, .records-tools label, .maptab-search label) {
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
  }
  & .sr-only { margin: -1px; }
  & .workspace-mode label { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); }
  & .form-grid { gap: var(--pl-s-16); align-items: start; }
  & .form-grid > * { min-width: 0; }
  & .field-hint { margin: var(--pl-s-8) 0 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .workspace-mode .field-hint { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .filebox { padding: var(--pl-s-16); border-radius: var(--pl-r-card); }
  & .media-prep-option label, & .maptab-offer-list label { margin: 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); white-space: normal; }
  & .inbox-control-row, & .records-tools { align-items: end; gap: var(--pl-s-12); }
  & .inbox-search, & .records-tools input { height: var(--pl-h); min-height: var(--pl-h); }
  & .inline-search { gap: var(--pl-s-8); align-items: end; }
  & .unit-link { height: auto; min-height: 0; padding: 0; display: inline; font: inherit; font-weight: var(--pl-fw-7); }
  & .maptab-link { height: auto; min-height: 0; padding: 0; display: inline; }
  & .statusline { align-self: center; }
}

body:not(#pl) {
  /* ----- headings: 20 page, 16 section, 14 body, 12 captions ----- */
  & .page-toolbar { gap: var(--pl-s-16); }
  & :is(.page-toolbar h3, .unit-command h3, .workspace-hero h2, .workspace-mode .workspace-hero h2) { font-size: var(--pl-fs-20); line-height: var(--pl-lh-20); font-weight: var(--pl-fw-7); letter-spacing: 0; }
  & :is(.page-toolbar p, .unit-command p, .workspace-hero p, .workspace-mode .workspace-hero p, .workspace-panel-head p, .workspace-mode .workspace-panel-head p, .workspace-card-heading p, .issue-summary p, .quality-readiness p) { margin: var(--pl-s-4) 0 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & :is(.workspace-panel-head h3, .workspace-mode .workspace-panel-head h3, .workspace-card-heading h4, .section-block h4, .workspace-subsection h4, .media-step h4, .workspace-mode .media-step h4, .report-breakdown h3, .issue-summary h3, .field-table-title, .maptab-card h4, .maptab-offer-head strong, .workspace-history-title) {
    margin: 0; font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-6); letter-spacing: 0; color: var(--ink);
  }
  & .section-block h4, & .media-step h4, & .workspace-subsection h4 { margin-bottom: var(--pl-s-12); }
  & .media-step p, & .workspace-mode .media-step p { margin: 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & .workspace-panel-head { gap: var(--pl-s-12) var(--pl-s-24); margin-bottom: var(--pl-s-24); }
  & .workspace-mode .workspace-panel-head { gap: var(--pl-s-12) var(--pl-s-24); margin-bottom: var(--pl-s-24); }
  & .workspace-identity { gap: var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); text-transform: none; color: var(--muted); }
  & .workspace-hero { gap: var(--pl-s-24); padding-bottom: var(--pl-s-16); }
  & .workspace-mode .workspace-hero { padding-bottom: var(--pl-s-16); }
  & .workspace-hero h2 { margin: var(--pl-s-4) 0; }

  /* ----- cards: one border, one radius, one shadow ----- */
  & :is(.workspace-card, .maptab-card, .maptab-current, .maptab-offer, .workspace-record-card, .workspace-activity, .workspace-mode .workspace-activity, .workspace-mode .workspace-card, .map-pin, .workspace-mode .media-step) {
    border: 1px solid var(--line); border-radius: var(--pl-r-card); box-shadow: none;
  }
  & :is(.workspace-card, .workspace-mode .workspace-card) { padding: var(--pl-s-24); }
  & :is(.maptab-card, .maptab-current, .maptab-offer, .map-pin) { padding: var(--pl-s-16); gap: var(--pl-s-12); }
  & :is(.workspace-record-card, .workspace-activity, .workspace-mode .workspace-activity) { padding: var(--pl-s-16) var(--pl-s-24); }
  & .workspace-mode .media-step { padding: var(--pl-s-24); margin-top: var(--pl-s-16); }
  & .workspace-mode .workspace-tool-content { padding: var(--pl-s-24); border-radius: var(--pl-r-card); }
  & .workspace-mode .workspace-tool-content[data-workspace-view="permit"] { padding: 0; }
  & .workspace-card-heading { gap: var(--pl-s-12); margin-bottom: var(--pl-s-16); }
  & .workspace-step-number { flex-basis: 32px; height: 32px; font-size: var(--pl-fs-12); line-height: 1; border-radius: var(--pl-r-ctl); }
  & .workspace-prepare-prompt { margin: var(--pl-s-12) 0 0 44px; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .workspace-mode .workspace-permit-grid { gap: var(--pl-s-24); }
  & .workspace-mode .actions { margin-top: var(--pl-s-16); gap: var(--pl-s-12); }
  & .workspace-action-panel { min-height: 480px; } /* the block under the tools keeps its place when a shorter tool opens */
  & .workspace-record-facts { gap: var(--pl-s-16); }
  & .workspace-record-facts .activity-row { gap: var(--pl-s-4); font-size: var(--pl-fs-14); }
  & .workspace-record-card summary, & .workspace-activity summary, & .maptab-fixes summary, & .workspace-mode .workspace-activity summary { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6); }
  & .workspace-record-card summary span { font-size: var(--pl-fs-12); margin-left: var(--pl-s-8); }
  & .workspace-continuation { gap: var(--pl-s-16); padding: var(--pl-s-12) var(--pl-s-16); border-radius: var(--pl-r-card); }
  & .workspace-continuation strong { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .workspace-continuation span { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .workspace-progress { gap: var(--pl-s-8); }
  & .workspace-progress-step { padding: var(--pl-s-12) var(--pl-s-12) var(--pl-s-12) 40px; border-radius: var(--pl-r-card); }
  & .workspace-progress-step::before { top: 12px; left: 12px; width: 20px; height: 20px; font-size: var(--pl-fs-12); }
  & .workspace-progress-step strong { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .workspace-progress-step small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }

  /* ----- metric and fact strips: fixed height so counters never jump ----- */
  & :is(.metrics-strip, .facts-strip, .quality-scorecards, .quality-evidence, .lifecycle-strip) { border-radius: var(--pl-r-card); }
  & :is(.metric, .fact) { padding: var(--pl-s-16); min-height: 88px; }
  & :is(.metric span, .fact span, .quality-mini-card span, .quality-evidence span, .report-metric span) { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); text-transform: none; letter-spacing: 0; color: var(--muted); margin-bottom: 0; }
  & .metric strong { margin-top: var(--pl-s-4); font-size: var(--pl-fs-24); line-height: var(--pl-lh-24); font-weight: var(--pl-fw-7); }
  & .fact strong, & .workspace-mode .workspace-facts strong { margin-top: var(--pl-s-4); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6); }
  & :is(.workspace-facts .fact small, .workspace-mode .workspace-facts small) { margin-top: var(--pl-s-4); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .workspace-mode .workspace-facts .fact { padding: var(--pl-s-16); }
  & .quality-mini-card { padding: var(--pl-s-12) var(--pl-s-16); }
  & .quality-mini-card strong { margin-top: var(--pl-s-4); font-size: var(--pl-fs-20); line-height: var(--pl-lh-20); }
  & .quality-mini-card small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .quality-evidence div { padding: var(--pl-s-12) var(--pl-s-16); }
  & .quality-evidence strong { margin-top: var(--pl-s-4); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .lifecycle-step { padding: var(--pl-s-12) var(--pl-s-16) var(--pl-s-12) 44px; }
  & .lifecycle-step::before { left: 12px; top: 12px; font-size: var(--pl-fs-12); }
  & .lifecycle-step strong { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .lifecycle-step span { margin-top: 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }

  /* ----- operation tabs and tool switchers ----- */
  & .workspace-operation-tabs { gap: var(--pl-s-12); margin-bottom: var(--pl-s-24); }
  & .workspace-operation-tabs .workspace-operation { height: auto; min-height: 72px; padding: var(--pl-s-12) var(--pl-s-16); gap: var(--pl-s-12); border-radius: var(--pl-r-card); white-space: normal; display: grid; justify-content: stretch; }
  & .workspace-operation-tabs .workspace-operation-icon { color: var(--pl-gold-text); width: 36px; height: 36px; font-size: var(--pl-fs-14); border-radius: var(--pl-r-ctl); }
  & .workspace-operation-tabs .workspace-operation.active .workspace-operation-icon { background: var(--pl-gold-text); color: #fff; }
  & .workspace-operation-tabs .workspace-operation strong { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-7); }
  & .workspace-operation-tabs .workspace-operation small { margin-top: 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-4); color: #4f5763; }
  & .workspace-tool-switcher, & .workspace-mode .workspace-tool-switcher { gap: var(--pl-s-8); margin: 0 0 var(--pl-s-24); padding: 0 0 var(--pl-s-16); }

  /* ----- status chips, notices, empty states ----- */
  & .badge { padding: var(--pl-s-4) var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); }
  & .badge.amber { color: #7a4a00; }
  & .badge.green { color: #0f6a3f; }
  & .badge.red { color: #a3281f; }
  & .notice { padding: var(--pl-s-12) var(--pl-s-16); border-radius: var(--pl-r-ctl); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .workspace-mode .notice { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); border-radius: var(--pl-r-ctl); }
  & .test-mode-banner { margin: 0 0 var(--pl-s-16); padding: var(--pl-s-12) var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .test-mode-banner strong { font-size: var(--pl-fs-14); }
  & :is(.empty-state, .loading-state, .inbox-empty, .report-empty) {
    display: grid; place-content: center; justify-items: center; gap: var(--pl-s-8); min-height: 120px; padding: var(--pl-s-24);
    border: 1px dashed #c9c2b3; border-radius: var(--pl-r-card); background: var(--pl-surface); color: var(--muted); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); text-align: center;
  }
  & .report-empty { border-style: solid; border-color: var(--line); }
  & .report-empty strong { margin: 0; font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); color: var(--ink); }
  & .report-empty p { margin: 0; line-height: var(--pl-lh-14); }
  & .result { border-radius: var(--pl-r-card); }
  & .result-head { padding: var(--pl-s-12) var(--pl-s-16); }
  & .result-head h3 { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-6); }
  & .row { padding: var(--pl-s-12) var(--pl-s-16); gap: var(--pl-s-12); }
  & .row-label { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .row-value { font-weight: var(--pl-fw-6); }
  & .copybox, & .report-copy { font-size: var(--pl-fs-12); line-height: 18px; }
  & .ai-tag { margin-left: var(--pl-s-8); padding: var(--pl-s-4) var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); border-radius: 6px; }
  & .activity-row, & .workspace-activity-row { gap: var(--pl-s-12); padding: var(--pl-s-12) 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .activity-row small, & .workspace-activity-row small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-4); color: var(--muted); }
  & .workspace-activity-row { font-size: var(--pl-fs-14); }
  & .section-block, & .workspace-subsection { padding-top: var(--pl-s-24); }
  & .missing-list { gap: var(--pl-s-8) var(--pl-s-16); font-size: var(--pl-fs-14); }
  & .issue-evidence { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .issue-mobile-label, & .quality-source, & .quality-mode-note, & .issue-approval-note { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .media-step p { margin-top: 0; }
  & .media-step { gap: var(--pl-s-16); }

  /* ----- tables: same header, same cell, same scroll box ----- */
  & :is(.operations-wrap, .records-table-wrap, .field-table-wrap, .report-results) { border: 1px solid var(--line); border-radius: var(--pl-r-card); overflow-x: auto; max-width: 100%; background: #fff; }
  & :is(.operations-table, .records-table, .field-table, .report-table) { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & :is(.operations-table, .records-table, .field-table, .report-table) th {
    padding: var(--pl-s-12) var(--pl-s-16); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); text-transform: none; letter-spacing: 0; color: #4f5763; background: var(--pl-surface-2); white-space: nowrap;
  }
  & :is(.operations-table, .records-table, .field-table, .report-table) td { padding: var(--pl-s-12) var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .report-table th { white-space: normal; }
  & .report-table small { margin-top: var(--pl-s-4); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .report-table summary, & .report-table td a { font-size: var(--pl-fs-14); }
  & .permit-queue-table .queue-status-select, & .queue-status-select { height: var(--pl-h-sm); min-height: var(--pl-h-sm); margin: var(--pl-s-8) 0; padding: 0 32px 0 var(--pl-s-12); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); }
  & .permit-queue-table .command-bar, & .permit-queue-table .command-bar button, & .map-fix-table button { font-size: var(--pl-fs-14); }
  & .permit-queue-table .command-bar { gap: var(--pl-s-8); }
  & .permit-queue-table .command-bar button { height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); }
  & .field-value { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .records-table-wrap, & .field-table-wrap { max-height: none; }
  & .records-table-wrap { max-height: 360px; }

  /* ----- pagers: reports, inbox and every list share one bar ----- */
  & :is(.pl-pager, .report-pagination, .inbox-pagination) {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--pl-s-12) var(--pl-s-16);
    min-height: var(--pl-h-sm); padding: var(--pl-s-12) 0 0; margin: 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted);
  }
  & :is(.pl-pager-count, .report-pagination > span, .inbox-pagination .pl-pager-count) { margin-right: auto; font-weight: var(--pl-fw-6); color: var(--pl-ink-2); }
  & :is(.pl-pager-nav, .report-pagination > div, .inbox-pagination .pl-pager-nav) { display: flex; align-items: center; justify-content: flex-end; gap: var(--pl-s-8); width: auto; }
  & .pl-pager-page, & .report-pagination > div > span, & .inbox-pagination span { min-width: 0; padding: 0 var(--pl-s-4); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); white-space: nowrap; color: var(--muted); }
  & .pl-pager-size { display: inline-flex; flex-direction: row; align-items: center; gap: var(--pl-s-8); margin: 0; font-size: var(--pl-fs-12); white-space: nowrap; overflow: visible; }
  & .pl-pager-size select, & .report-pagination select { width: auto; height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 32px 0 var(--pl-s-12); font-size: var(--pl-fs-14); }
  & :is(.pl-pager, .report-pagination, .inbox-pagination) button { min-width: 0; height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); }
  & .inbox-pagination { justify-content: space-between; margin-top: 0; }

  /* ----- reports: filters, toolbar, metrics ----- */
  & .report-toolbar { margin-bottom: var(--pl-s-16); gap: var(--pl-s-12); min-height: var(--pl-h-sm); }
  & .report-toolbar p { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .report-exports { gap: var(--pl-s-8); }
  & .report-filters {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: var(--pl-s-16); align-items: end;
    padding: var(--pl-s-16); border-radius: var(--pl-r-card); background: var(--pl-surface-2);
  }
  & .report-filters > label { display: flex; flex-direction: column; gap: var(--pl-s-8); margin: 0; min-width: 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); }
  & .report-filters > label > span { display: block; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .report-filters > .report-search { grid-column: span 2; }
  & .report-filters > button { align-self: end; width: 100%; }
  & .portal-report :is(input, select) { font-size: var(--pl-fs-14); }
  & .portal-report button { font-size: var(--pl-fs-14); }
  & .report-exports button, & .report-pagination button { min-height: var(--pl-h-sm); }
  & .report-message, & .report-message:empty { display: block; margin: var(--pl-s-12) 0 0; min-height: var(--pl-lh-14); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .report-message.error { padding: var(--pl-s-12) var(--pl-s-16); }
  & .report-metrics { gap: var(--pl-s-12); margin: var(--pl-s-12) 0 var(--pl-s-16); min-height: 96px; align-items: stretch; }
  & .report-metric { padding: var(--pl-s-16); border-radius: var(--pl-r-card); min-height: 96px; }
  & .report-metric span { margin-bottom: var(--pl-s-4); color: var(--muted); }
  & .report-metric.is-skeleton { background: var(--pl-surface); }
  & .report-metric strong { font-size: var(--pl-fs-24); line-height: var(--pl-lh-24); font-weight: var(--pl-fw-7); }
  & .report-source, & .report-import { padding: var(--pl-s-12) var(--pl-s-16); margin: var(--pl-s-12) 0; border-radius: var(--pl-r-card); }
  & .report-source p, & .report-import p { margin: var(--pl-s-8) 0 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & .portal-report summary { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); font-weight: var(--pl-fw-6); }
  & .report-import a { margin: var(--pl-s-12) 0; font-size: var(--pl-fs-14); }
  & .report-import form { gap: var(--pl-s-12); align-items: end; }
  & .report-file { padding: var(--pl-s-12); border-radius: var(--pl-r-card); }
  & .report-file input { height: auto; min-height: 0; padding: 0; }
  & #reportImportResult { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); margin-top: var(--pl-s-12); }
  & .report-breakdown { margin: var(--pl-s-16) 0; min-height: 104px; }
  & .report-breakdown h3 { margin-bottom: var(--pl-s-12); }
  & .report-breakdown-items { gap: var(--pl-s-8); flex-wrap: nowrap; overflow-x: auto; padding-bottom: var(--pl-s-4); }
  & .report-breakdown-items > div { flex: 0 0 auto; }
  & .report-breakdown-items > div { padding: var(--pl-s-8) var(--pl-s-12); border-radius: var(--pl-r-ctl); }
  & .report-breakdown-items strong, & .report-breakdown-items span { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .report-breakdown-items span { margin-top: var(--pl-s-4); color: var(--muted); }
  & .report-breakdown-empty { margin: 0; font-size: var(--pl-fs-14); color: var(--muted); }
  & .report-results { min-height: 160px; }

  /* ----- inbox ----- */
  & .inbox-filters, & .recent-units { gap: var(--pl-s-8); }
  & .inbox-list { gap: var(--pl-s-12); min-height: 120px; }
  & .inbox-item { gap: var(--pl-s-16) var(--pl-s-24); padding: var(--pl-s-16); border-radius: var(--pl-r-card); }
  & .inbox-unit { gap: var(--pl-s-12); }
  & .inbox-unit-id { padding: var(--pl-s-4) var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-7); border-radius: 6px; }
  & :is(.inbox-unit strong, .inbox-reason strong) { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & :is(.inbox-unit small, .inbox-reason small) { margin-top: var(--pl-s-4); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & :is(.inbox-filter.active, .inbox-filter.active:hover) { background: var(--charcoal); border-color: var(--charcoal); color: #fff; }
  & .inbox-urgency { color: #a3281f; font-weight: var(--pl-fw-6); }
  & .inbox-item-actions { gap: var(--pl-s-8); }
  & .inbox-item-actions :is(button, .mini-btn, .secondary) { height: var(--pl-h-sm); min-height: var(--pl-h-sm); padding: 0 var(--pl-s-12); font-size: var(--pl-fs-14); width: auto; }
  & #operationsInboxSummary { min-height: var(--pl-lh-14); margin: 0; font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & .muted { color: var(--muted); }

  /* ----- map tab and map locations ----- */
  & .maptab { gap: var(--pl-s-16); }
  & .maptab-grid { gap: var(--pl-s-24); }
  & .maptab-main, & .maptab-side { gap: var(--pl-s-16); }
  & .maptab-toolbar { gap: var(--pl-s-12); }
  & .maptab-current-row > span:first-child { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); letter-spacing: 0; text-transform: none; }
  & .maptab-current-row strong { font-size: var(--pl-fs-16); }
  & :is(.maptab-current-meta, .maptab-checked, .maptab-card p, .maptab-offer-head span, .maptab-early-note, .maptab-readout) { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .maptab-suggestion { gap: var(--pl-s-12); padding: var(--pl-s-12); }
  & .maptab-suggestion strong { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .maptab-suggestion small, & .maptab-search-results small, & .maptab-offer-list small, & .maptab-units small, & .maptab-fix small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); }
  & .maptab-layers button { height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-16); }
  & .maptab-search-results button { height: auto; min-height: 0; padding: var(--pl-s-8) var(--pl-s-12); font-size: var(--pl-fs-14); white-space: normal; justify-content: flex-start; }
  & .maptab-tag, & .maptab-live { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); padding: var(--pl-s-4) var(--pl-s-8); }
  & .maptab-tag { color: #7a4a00; }
  & .maptab-result { padding: var(--pl-s-12) var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .maptab-result small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .maptab-fix.current strong::after { color: var(--pl-gold-text); }
  & .maptab-fix { gap: var(--pl-s-12); padding: var(--pl-s-12) 0; }
  & .maptab-fix strong, & .maptab-units li { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .maptab-units li { padding: var(--pl-s-8) 0; gap: var(--pl-s-8); }
  & .maptab-paste { gap: var(--pl-s-8); }
  & .map-pin-manual { gap: var(--pl-s-8); }
  & .map-pin-head h4, & .map-pin-text, & .map-pin-meta, & .map-pin-warn { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .map-fix-table td { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .map-fix-table td small { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  & .media-step { padding-top: var(--pl-s-16); padding-bottom: var(--pl-s-16); }
  & .image-preview-grid { gap: var(--pl-s-12); }
  & .image-preview-meta { padding: var(--pl-s-12); gap: var(--pl-s-4); }
  & .image-preview-delete { width: 32px; height: 32px; min-height: 32px; padding: 0; font-size: var(--pl-fs-20); }
}

body:not(#pl) {
  /* ----- grids that must never push the page wider than the screen ----- */
  & .workspace-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: var(--pl-s-24); }
  & .workspace-grid > *, & .workspace-layout > *, & .maptab-grid > * { min-width: 0; }
  & .activity-row { grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(0, 1fr) minmax(0, auto); }
  & .activity-row > * { min-width: 0; overflow-wrap: anywhere; }
  & .permit-queue-table { min-width: 900px; }
  & .permit-queue-table :is(th, td) { padding: var(--pl-s-12); }
  & .permit-queue-table th { white-space: normal; }
  & .permit-queue-table th:nth-child(1) { width: 12%; }
  & .permit-queue-table th:nth-child(2) { width: 20%; }
  & .permit-queue-table th:nth-child(3) { width: 9%; }
  & .permit-queue-table th:nth-child(4) { width: 17%; }
  & .permit-queue-table th:nth-child(5) { width: 10%; }
  & .permit-queue-table th:nth-child(6) { width: 16%; }
  & .permit-queue-table th:nth-child(7) { width: 17%; }
  & .permit-queue-table td[data-label="Unit"], & .permit-queue-table td[data-label="Application"] { overflow-wrap: anywhere; }
  & .permit-queue-table .unit-link { white-space: nowrap; text-align: left; }
}

/* ===== responsive: tablets and phones ===== */
@media (max-width: 1100px) {
  body:not(#pl) {
    & .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  }
}
@media (max-width: 900px) {
  body:not(#pl) {
    & .app-header { padding: 0 var(--pl-s-16); }
    & .dashboard-main, & .dashboard-main:has(.workspace-mode) { padding: var(--pl-s-24) var(--pl-s-16); }
    & .ai-banner { padding: var(--pl-s-8) var(--pl-s-16); }
    & .menu-toggle { display: grid; place-items: center; }
    & .workspace-activity-row { grid-template-columns: minmax(0, 1fr); }
  }
}
@media (max-width: 620px) {
  body:not(#pl) {
    & .app-header { height: auto; min-height: var(--pl-header-h-min, 76px); padding: var(--pl-s-12) var(--pl-s-16); flex-wrap: wrap; gap: var(--pl-s-8) var(--pl-s-12); }
    & .app-header h1 { flex: 1 1 0; }
    & .unit-switcher { width: 100%; order: 3; }
    & .dashboard-main, & .dashboard-main:has(.workspace-mode) { padding: var(--pl-s-12) var(--pl-s-8) var(--pl-s-24); }
    & .workflow-panel { border-radius: var(--pl-r-card); }
    & .workflow-head { padding: var(--pl-s-16); }
    & .workflow-body, & .workflow-panel.workspace-mode .workflow-body, & .workspace-mode .workflow-body { padding: var(--pl-s-16) var(--pl-s-12); gap: var(--pl-s-16); }
    & :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file])) { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); }
    & :is(.dashboard-main, .app-header) :is(input, select, textarea):where(:not([type=checkbox], [type=radio], [type=file])) { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); }
    & .workspace-mode :is(input, select, textarea) { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); }
    & .workspace-mode .workspace-tool-content { padding: var(--pl-s-16); }
    & .workspace-mode .workspace-tool-content[data-workspace-view="permit"], & .workspace-mode .workspace-tool-content[data-workspace-view="map"] { padding: 0; }
    & :is(.workspace-card, .workspace-mode .workspace-card) { padding: var(--pl-s-16); }
    & .workspace-mode .media-step { padding: var(--pl-s-16); }
    & .report-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: var(--pl-s-12); gap: var(--pl-s-12); }
    & .report-filters > .report-search { grid-column: 1 / -1; }
    & .report-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
    & .report-metric { min-height: 88px; padding: var(--pl-s-12); }
    & .report-results { overflow: visible; border: 0; background: transparent; }
    & .report-table tr { padding: var(--pl-s-8); gap: 0; }
    & .report-table td { padding: var(--pl-s-8); font-size: var(--pl-fs-14); }
    & .report-table td::before { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); margin-bottom: var(--pl-s-4); font-weight: var(--pl-fw-6); }
    & .report-pagination, & .pl-pager, & .inbox-pagination { justify-content: space-between; }
    & :is(.pl-pager-nav, .report-pagination > div) { width: auto; justify-content: flex-end; }
    & .page-toolbar h3, & .unit-command h3 { font-size: var(--pl-fs-20); }
    & .inbox-item { grid-template-columns: minmax(0, 1fr); padding: var(--pl-s-12); gap: var(--pl-s-12); }
    & .inbox-item .inbox-reason { grid-column: auto; grid-row: auto; }
    & .inbox-item-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
    & .inbox-item-actions > button { flex: 1 1 auto; }
    & .modal-wrap { padding: var(--pl-s-16) var(--pl-s-8); }
    & .modal-body { padding: var(--pl-s-16); }
  }
}
@media (max-width: 380px) {
  body:not(#pl) {
    & .report-filters { grid-template-columns: minmax(0, 1fr); }
    & .report-filters > .report-search { grid-column: auto; }
    & :is(.pl-pager-size span) { display: none; }
  }
}
@container unit-workspace (max-width: 540px) {
  body:not(#pl) {
    & .workspace-mode :is(.workspace-card, .maptab-current, .maptab-card, .maptab-offer) { padding: var(--pl-s-16); }
    & .workspace-mode .workspace-tool-content { padding: var(--pl-s-16); }
    & .workspace-mode .workspace-tool-content[data-workspace-view="permit"], & .workspace-mode .workspace-tool-content[data-workspace-view="map"] { padding: 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  body:not(#pl) * { transition: none !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* rows outside the current page of a paged list */
body:not(#pl) [data-pl-off] { display: none !important; }

body:not(#pl) {
  /* reserved space: counters and strips keep their size while data arrives */
  & #permitSelected { min-height: 90px; }
  & #permitQueueMetrics, & #operationsInboxMetrics, & #mapFixMetrics { min-height: 90px; }
}
@media (max-width: 900px) {
  body:not(#pl) {
    & #permitSelected { min-height: 266px; }
    & #permitQueueMetrics, & #operationsInboxMetrics, & #mapFixMetrics { min-height: 178px; }
  }
}
@media (max-width: 620px) {
  body:not(#pl) {
    & #permitSelected { min-height: 442px; }
    & #permitQueueMetrics { min-height: 266px; }
    & #operationsInboxMetrics, & #mapFixMetrics { min-height: 178px; }
  }
}

/* ===== sign in page ===== */
body:not(#pl) {
  & main.shell { padding: 0; }
  & .shell { border-radius: var(--pl-r-panel); box-shadow: var(--pl-shadow-panel); min-height: 520px; }
  & .shell .brand-panel { padding: var(--pl-s-48); }
  & .shell .brand { gap: var(--pl-s-12); }
  & .shell .brand-mark { width: 48px; height: 48px; border-radius: var(--pl-r-card); font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-7); letter-spacing: .06em; }
  & .shell .brand strong { font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); font-weight: var(--pl-fw-7); letter-spacing: 0; }
  & .shell .brand span { margin-top: 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: rgba(255, 255, 255, .78); }
  & .shell .brand-copy h1 { max-width: 360px; margin: 0 0 var(--pl-s-16); font-size: var(--pl-fs-32); line-height: var(--pl-lh-32); letter-spacing: 0; font-weight: var(--pl-fw-7); }
  & .shell .brand-copy h1 em { font-family: inherit; font-style: normal; font-weight: var(--pl-fw-7); }
  & .shell .brand-copy p { font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: rgba(255, 255, 255, .8); }
  & .shell .secure-note { gap: var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: rgba(255, 255, 255, .78); }
  & .shell .form-panel { padding: var(--pl-s-48); }
  & .shell .eyebrow { margin: 0 0 var(--pl-s-8); font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); font-weight: var(--pl-fw-6); letter-spacing: .08em; color: var(--pl-gold-text); }
  & .shell h2 { font-size: var(--pl-fs-24); line-height: var(--pl-lh-24); letter-spacing: 0; font-weight: var(--pl-fw-7); }
  & .shell .intro { margin: var(--pl-s-8) 0 var(--pl-s-24); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); color: var(--muted); }
  & .shell .alert { margin: 0 0 var(--pl-s-16); padding: var(--pl-s-12) var(--pl-s-16); font-size: var(--pl-fs-14); line-height: var(--pl-lh-14); }
  & .shell .field { margin-bottom: var(--pl-s-16); }
  & .shell label { font-weight: var(--pl-fw-6); }
  & .shell input { height: var(--pl-h); min-height: var(--pl-h); padding: 0 var(--pl-s-12); font-size: var(--pl-fs-16); line-height: var(--pl-lh-16); }
  & .shell button { width: 100%; height: var(--pl-h); min-height: var(--pl-h); margin-top: var(--pl-s-8); font-size: var(--pl-fs-14); font-weight: var(--pl-fw-6); }
  & .shell .help { margin: var(--pl-s-16) 0 0; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
}
@media (max-width: 760px) {
  body:not(#pl) {
    & .shell .brand-panel { padding: var(--pl-s-24); min-height: 0; gap: var(--pl-s-24); }
    & .shell .brand-copy h1 { font-size: var(--pl-fs-24); line-height: var(--pl-lh-24); margin-bottom: 0; }
    & .shell .form-panel { padding: var(--pl-s-32) var(--pl-s-24); }
  }
}

@media (max-width: 1100px) {
  body:not(#pl) {
    /* stacked layouts: the list that loads first holds its space so the block under it does not jump */
    & .operations-wrap:has(#permitRecords) { min-height: 70vh; }
  }
}
body:not(#pl) {
  & #mapFixSummary { min-height: var(--pl-lh-14); }

  & .maptab-side { min-height: 820px; align-content: start; }
}
@container unit-workspace (max-width: 980px) {
  body:not(#pl) { & .maptab-side { min-height: 820px; } }
}

/* ===== card mode tables (phones and small tablets), tablet header, one-row metric strips ===== */
@media (max-width: 820px) {
  body:not(#pl) {
    & :is(.permit-queue-wrap, .map-fix-wrap, .pf-verification-wrap) { overflow: visible; border: 0; background: transparent; }
    & :is(.permit-queue-table, .map-fix-table, .pf-verification-table) { min-width: 0; }
    & :is(.permit-queue-table, .map-fix-table, .pf-verification-table) tr { border: 1px solid var(--line); border-radius: var(--pl-r-card); background: #fff; margin-bottom: var(--pl-s-12); padding: var(--pl-s-8); }
    & :is(.permit-queue-table, .map-fix-table, .pf-verification-table) td { padding: var(--pl-s-8); }
    & :is(.permit-queue-table, .pf-verification-table) .command-bar { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
    & :is(.permit-queue-table, .pf-verification-table) .command-bar button, & .map-fix-table button { width: 100%; white-space: normal; height: auto; min-height: var(--pl-h-sm); padding: var(--pl-s-8) var(--pl-s-12); }
    & :is(.permit-queue-table, .pf-verification-table) td[data-label]::before, & .map-fix-table td[data-label]::before { font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); color: var(--muted); font-weight: var(--pl-fw-6); text-transform: none; margin-bottom: var(--pl-s-4); }
  }
}
@media (max-width: 700px) {
  body:not(#pl) {
    & .report-results { overflow: visible; border: 0; background: transparent; }
  }
}
@media (max-width: 900px) {
  body:not(#pl) {
    & .unit-switcher { width: 220px; flex: 0 0 220px; }
    & .app-header h1 { flex: 1 1 auto; }
    & .test-mode-tag { font-size: 0; padding: var(--pl-s-4) var(--pl-s-12); }
    & .test-mode-tag::before { content: "Test mode"; font-size: var(--pl-fs-12); line-height: var(--pl-lh-12); }
  }
}
@media (min-width: 621px) and (max-width: 900px) {
  body:not(#pl) {
    & #permitQueueMetrics { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 90px; }
    & :is(#operationsInboxMetrics, #mapFixMetrics) { grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 90px; }
    & :is(#permitQueueMetrics, #operationsInboxMetrics, #mapFixMetrics) .metric { border-right: 1px solid var(--line); border-bottom: 0; }
    & :is(#permitQueueMetrics, #operationsInboxMetrics, #mapFixMetrics) .metric:last-child { border-right: 0; }
  }
}
@media (max-width: 620px) {
  body:not(#pl) {
    & .unit-switcher { width: 100%; flex: 1 1 100%; }
    & .test-mode-tag { display: none; }
  }
}

body:not(#pl) {
  /* spacing between a form and the actions or table that follow it, where the parent is a plain block */
  & :is(section, .section-block, .filebox, form) > .actions { margin-top: var(--pl-s-16); }
  & :is(.records-tools, .inline-search) + :is(.operations-wrap, .records-table-wrap) { margin-top: var(--pl-s-16); }
  & .form-grid + :is(.filebox, .field-hint, .notice, .result) { margin-top: var(--pl-s-16); }
}

/* ===== inbox cards follow the width of their own list (the assistant panel can narrow the page) ===== */
body:not(#pl) .inbox-list { container: pl-inbox / inline-size; }
@container pl-inbox (max-width: 720px) {
  body:not(#pl) {
    & .inbox-item { grid-template-columns: minmax(0, 1fr); padding: var(--pl-s-12); gap: var(--pl-s-12); }
    & .inbox-item .inbox-reason { grid-column: auto; grid-row: auto; }
    & .inbox-item-actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
    & .inbox-item-actions > button { flex: 1 1 auto; }
  }
}

/* ===== pages added on other branches (assistant panel, Property Finder verification): same system, inert until they exist ===== */
body:not(#pl) {
  & .pf-coverage-actions { align-items: flex-end; }
  & .command-bar input[type=file] { height: var(--pl-h-sm); min-height: var(--pl-h-sm); width: auto; max-width: 100%; padding: 1px var(--pl-s-4); }
  & .command-bar input[type=file]::file-selector-button { height: 28px; }
  & .row-value .download-link { height: auto; min-height: var(--pl-h-sm); padding: var(--pl-s-8) var(--pl-s-12); white-space: normal; text-align: left; overflow-wrap: anywhere; justify-content: flex-start; }
  & label:has(> span.muted) { display: flex; gap: var(--pl-s-4); align-items: baseline; }
  & label > span.muted { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--pl-fw-4); }
  & .pa-send { background: var(--pl-gold-text); color: #fff; }
}

body:not(#pl) {
  /* Property Finder verification page (added on another branch): same table system as the Daily Permit Check */
  & .pf-verification-table :is(th, td) { padding: var(--pl-s-12); }
  & .pf-verification-table th { white-space: normal; }
  & .pf-verification-table td[data-label] { overflow-wrap: anywhere; }
  & .pf-verification-table .command-bar button { white-space: normal; height: auto; min-height: var(--pl-h-sm); padding: var(--pl-s-8) var(--pl-s-12); }
  & .pf-coverage-actions :is(label, .pf-export-label) { margin: 0; }
  & #pfVerificationMetrics { min-height: 90px; }
  & #pfVerificationNotice { min-height: 66px; } /* its status line (up to three lines) arrives with every load: the space is held */
  & #pfVerificationNotice:not(.show) { display: block; visibility: hidden; }
  & .row-value .download-link { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; max-width: 100%; }
}
@media (min-width: 821px) {
  body:not(#pl) {
    & .pf-verification-table th:nth-child(1) { width: 10%; }
    & .pf-verification-table th:nth-child(3) { width: 10%; }
    & .pf-verification-table th:nth-child(4) { width: 12%; }
    & .pf-verification-table th:nth-child(5) { width: 12%; }
    & .pf-verification-table th:nth-child(6) { width: 10%; }
    & .pf-verification-table th:nth-child(7) { width: 13%; }
    & .pf-verification-table th:nth-child(8) { width: 18%; }
  }
}
@media (max-width: 820px) { body:not(#pl) { & #pfVerificationMetrics { min-height: 266px; } } }
@media (max-width: 520px) { body:not(#pl) { & #pfVerificationMetrics { min-height: 530px; } } }
@media (max-width: 1439px) { body:not(#pl) { & #pfVerificationNotice { min-height: 86px; } } }
@media (max-width: 1100px) { body:not(#pl) { & #pfVerificationNotice { min-height: 106px; } } }

/* PL1 with PI1: placeholder rows have the height of the real rows in this layout (measured: queue 129, 109 on very wide screens; Property Finder 180), so the swap to real data barely changes the table. */
@media (min-width: 821px) {
  body:not(#pl) {
    & .permit-queue-table .live-skeleton td { height: 129px; }
    & .pf-verification-table .live-skeleton td { height: 180px; }
  }
}
@media (min-width: 1440px) {
  body:not(#pl) { & .permit-queue-table .live-skeleton td { height: 109px; } }
}

/* Notices that arrive above a list (CRM warnings, "summary copied") float over the page instead of pushing the list down.
   A click on one hides it until its text changes. */
body:not(#pl) {
  & :is(#permitQueueNotice, #operationsInboxNotice, #mapFixNotice).show {
    position: fixed; z-index: 30; left: 50%; bottom: var(--pl-s-16); transform: translateX(-50%);
    width: min(560px, calc(100vw - 32px)); max-height: 40vh; overflow: auto; box-shadow: var(--pl-shadow-panel); cursor: pointer;
  }
  & :is(#permitQueueNotice, #operationsInboxNotice, #mapFixNotice)[data-pl-dismissed] { display: none; }
}
@media (max-width: 620px) {
  body:not(#pl) { & :is(#permitQueueNotice, #operationsInboxNotice, #mapFixNotice).show { bottom: 72px; } }
}

/* PL1 with PI1: the "Updated ..." stamp has one fixed width, so its text changing ("refreshing", "CRM not reachable")
   can never wrap the toolbar and push the page. */
@media (min-width: 821px) {
  body:not(#pl) { & .live-stamp { flex: 0 0 260px; width: 260px; min-width: 260px; } }
}
