:root {
  --paper: #edf7fb;
  --surface: #ffffffbd;
  --graphite: #203b4a;
  --muted: #506775;
  --brand: #079fc8;
  --ink: #126887;
  --ink-hover: #0d506b;
  --tint: #e0f2f8;
  --lavender: #eeedfa;
  --glass-edge: #ffffffdc;
  --shadow: 0 8px 32px #356d8610, inset 0 1px 0 #fff;
  --approved: #1e6b41;
  --approved-tint: #edf6ef;
  --warning: #8a4b00;
  --warning-tint: #fff5e7;
  --danger: #a42d35;
  --danger-tint: #fff0f0;
  --line: #cfdee7;
  --control: #8199a7;
  font-family: "Segoe UI Variable", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--graphite);
  background: var(--paper);
  font-synthesis: none;
  font-size: 15px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}
.generation-settings { display: grid; gap: 24px; }
.client-request-toolbar { padding: 20px 22px 0; justify-content: flex-start; }
.client-request-warning { color: var(--warning); border-left: 3px solid var(--warning); padding-left: 10px; }
.client-request-success { color: var(--approved); border-left: 3px solid var(--approved); padding-left: 10px; }
.client-link-result { padding: 24px; margin-bottom: 24px; border-top: 4px solid var(--ink); }
.client-link-result h2 { margin: 0 0 12px; font-size: 1.2rem; }
.client-link-result p { max-width: 76ch; }
.client-link-result input { width: 100%; min-width: 0; }
.client-request-items { padding: 8px 0 16px; }
.client-request-checklist { padding-left: 22px; line-height: 1.8; }
.generation-config, .generation-document { align-items: flex-start; }
.generation-note { color: var(--muted); font-size: .86rem; line-height: 1.6; max-width: 78ch; margin: 10px 0; }
.generation-signature { color: var(--warning); font-size: .84rem; max-width: 65ch; margin-top: 9px; }
.generation-ready { color: var(--approved); font-weight: 600; padding: 12px 0; }
.generation-paper { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: .95rem; line-height: 1.75; color: var(--graphite); background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--ink); padding: 30px; max-height: 65vh; overflow: auto; margin: 16px 0; }
.generation-text-editor { width: 100%; font: inherit; line-height: 1.7; min-height: 250px; }
.generation-version { padding: 20px 0; border-bottom: 1px solid var(--line); }
.generation-version:last-child { border-bottom: 0; }
.generation-facts { display: grid; grid-template-columns: minmax(110px,auto) minmax(0,1fr); gap: 6px 20px; font-size: .85rem; }
.generation-facts dt { color: var(--muted); }
.generation-facts dd { margin: 0; overflow-wrap: anywhere; }
.generation-evidence, .generation-variables { margin: 12px 0; padding: 14px 0; border-top: 1px solid var(--line); }
.generation-evidence summary, .generation-variables summary { color: var(--ink); font-weight: 600; cursor: pointer; margin-bottom: 8px; }
.generation-service-choices { border: 1px solid var(--line); border-radius: 4px; padding: 14px 18px; margin: 16px 0; }
.generation-service-choices legend { font-weight: 600; padding: 0 6px; }
.generation-dependencies { padding: 18px; background: var(--paper); border-left: 3px solid var(--ink); margin: 12px 0; }
.generation-parts { display: grid; gap: 10px; }
.generation-part { display: grid; grid-template-columns: minmax(0,1fr) 120px auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
@media (max-width: 640px) {
  .generation-part { grid-template-columns: minmax(0,1fr) 90px; }
  .generation-part .iam-check { grid-column: 1 / -1; margin-top: 0; }
  .generation-paper { padding: 20px 16px; }
  .generation-facts { grid-template-columns: 1fr; gap: 4px; }
  .generation-facts dd { margin-bottom: 10px; }
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 0; background: radial-gradient(ellipse at 8% 0%, #c4e8f6c9, transparent 48%), radial-gradient(ellipse at 92% 18%, #e3def7b3, transparent 45%), radial-gradient(ellipse at 60% 80%, #d8f0f799, transparent 48%), var(--paper); background-attachment: fixed; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
a { color: var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.65rem, 2.2vw, 2.15rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.22; overflow-wrap: anywhere; }
h2 { font-size: 1.16rem; line-height: 1.35; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: 1rem; font-weight: 650; }
small { font-size: .8rem; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; padding: 12px 20px; background: var(--surface); z-index: 20; }
.skip-link:focus { top: 12px; }
.startup { min-height: 100vh; display: flex; gap: 20px; justify-content: center; align-items: center; padding: 24px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid #d8e9ee; border-radius: 15px; background: #fff; box-shadow: 0 4px 14px #32637b0d; }
.brand-logo { display: block; width: 100%; height: 100%; object-fit: contain; }
.login-intro .brand-mark, .login-card > .brand-mark { width: 72px; height: 72px; border-radius: 19px; }
.brand { display: flex; align-items: center; gap: 16px; }
.brand-name { font-size: 1.3rem; font-weight: 750; letter-spacing: -.025em; }
.brand-subtitle { color: var(--muted); font-size: .75rem; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0,1fr); min-height: 100vh; padding: 18px; gap: 20px; }
.sidebar { background: #ffffff80; border: 1px solid var(--glass-edge); border-radius: 24px; color: var(--graphite); padding: 28px 16px 20px; display: flex; flex-direction: column; gap: 26px; min-height: 100vh; box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.sidebar nav { display: grid; gap: 8px; }
.button.nav-button { display: flex; justify-content: flex-start; gap: 12px; align-items: center; width: 100%; text-align: left; min-height: 46px; padding: 11px 14px; border: 0; border-radius: 4px; color: var(--ink); font-weight: 650; background: var(--tint); }
.nav-symbol { font-size: 1.25rem; font-weight: 400; }
.nav-icon { display: block; width: 20px; height: 20px; flex: 0 0 20px; object-fit: contain; }
.nav-icon > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.nav-label { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.nav-group-chevron { width: 7px; height: 7px; margin-left: auto; margin-right: 4px; flex: 0 0 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(-45deg); transition: transform .15s; }
.nav-group[open] > .nav-group-title .nav-group-chevron { transform: rotate(45deg); }
.sidebar-note { padding: 20px 2px; margin-top: auto; color: var(--muted); font-size: .8rem; }
.sidebar-note strong { display: block; color: var(--graphite); font-size: .85rem; margin-bottom: 6px; }
.account { border-top: 1px solid var(--line); padding-top: 20px; }
.account-head { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: 50%; color: var(--ink); font-weight: 650; }
.account-name { font-size: .85rem; font-weight: 600; }
.account-access { font-size: .73rem; color: var(--muted); }
.account-id { font-size: .72rem; color: var(--muted); overflow-wrap: anywhere; margin-top: 12px; }
.logout { margin: 12px 0 0 -8px; }
.workspace { min-width: 0; }
.topbar { min-height: 66px; border: 1px solid var(--glass-edge); border-radius: 18px; display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; gap: 16px; background: var(--surface); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.topbar-title { font-size: .85rem; color: var(--muted); }
.mode-label { font-size: .76rem; color: var(--ink); border: 1px solid #b9b5d4; border-radius: 3px; padding: 3px 9px; white-space: nowrap; }
.qa-banner { background: var(--warning-tint); border-bottom: 1px solid #ecdcc0; color: #72410b; padding: 10px 38px; font-size: .8rem; }
.qa-banner strong { margin-right: 8px; }
.content { max-width: 1512px; padding: 30px 4px 48px; margin: 0 auto; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-heading p { color: var(--muted); margin-top: 10px; max-width: 65ch; font-size: .9rem; }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; flex-shrink: 0; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; background: var(--surface); color: var(--graphite); border: 1px solid var(--control); border-radius: 11px; font-size: .87rem; font-weight: 600; line-height: 1.4; text-decoration: none; transition: background-color .15s, border-color .15s, box-shadow .15s; }
.button:hover { background: var(--paper); }
.button.primary { color: white; background: var(--ink); border-color: var(--ink); box-shadow: 0 4px 12px #12688720; }
.button.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.button.subtle { border-color: transparent; background: transparent; color: var(--ink); }
.button.subtle:hover { background: var(--tint); }
.button.danger { color: var(--danger); border-color: #bd7479; }
.button.small { min-height: 36px; padding: 6px 10px; font-size: .8rem; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.search { width: min(340px, 100%); }
.search input { width: 100%; min-height: 42px; }
input, select, textarea { background: #ffffffc9; color: var(--graphite); border: 1px solid var(--control); border-radius: 10px; padding: 10px 12px; max-width: 100%; accent-color: var(--ink); }
select option { background: #fff; color: var(--graphite); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
textarea { min-height: 105px; resize: vertical; }
.list-count { color: var(--muted); font-size: .82rem; }
.panel { background: var(--surface); border: 1px solid var(--glass-edge); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.project-table { width: 100%; border-collapse: collapse; text-align: left; }
.project-table th { color: var(--muted); font-weight: 600; font-size: .76rem; background: #eaf0ff70; padding: 13px 22px; border-bottom: 1px solid var(--line); }
.project-table td { padding: 20px 22px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.project-table tr:last-child td { border-bottom: 0; }
.project-table tbody tr:hover { background: #eaf0ff80; }
.project-name { font-size: .98rem; font-weight: 650; color: var(--graphite); display: block; background: transparent; border: 0; text-align: left; padding: 3px 0; overflow-wrap: anywhere; }
.project-name:hover { color: var(--ink); text-decoration: underline; }
.project-kind { display: block; color: var(--muted); font-size: .78rem; margin-top: 4px; }
.project-table .project-access { color: var(--muted); font-size: .83rem; }
.project-table .action-cell { text-align: right; width: 130px; }
.list-footer { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: .8rem; }
.empty-state { padding: 64px 24px; text-align: center; max-width: 540px; margin: 0 auto; }
.empty-mark { width: 56px; height: 62px; border: 1px solid #b9b5d4; border-top: 5px solid var(--ink); background: #f8f7fc; margin: 0 auto 24px; display: grid; place-items: center; color: var(--ink); font-size: 1.6rem; border-radius: 2px 6px 2px 2px; }
.empty-state h2 { margin-bottom: 10px; }
.empty-state p { color: var(--muted); font-size: .9rem; margin-bottom: 22px; }
.loading { padding: 50px 24px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.spinner { width: 17px; height: 17px; border: 2px solid var(--line); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-box { margin: 20px 0; padding: 18px 20px; border: 1px solid #dfb6b8; border-left: 3px solid var(--danger); border-radius: 3px; color: #7e2630; background: var(--danger-tint); font-size: .88rem; }
.error-box .button { margin-top: 12px; }
.back-button { padding-left: 0; margin-bottom: 14px; }
.dossier-layout { display: grid; grid-template-columns: 238px minmax(0,1fr); gap: 24px; align-items: start; }
.procedure-list { list-style: none; margin: 0; padding: 6px; }
.procedure-list li + li { border-top: 1px solid var(--line); }
.procedure-button { display: block; width: 100%; border: 0; background: transparent; text-align: left; padding: 17px 14px; border-radius: 3px; color: var(--graphite); }
.procedure-button:hover { background: var(--paper); }
.procedure-button.active { background: var(--tint); box-shadow: inset 3px 0 var(--ink); }
.procedure-title { display: block; font-weight: 650; }
.procedure-detail { display: block; margin-top: 5px; color: var(--muted); font-size: .78rem; }
.section-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-bottom: 20px; }
.procedure-panel-heading { padding: 18px 20px 12px; font-size: .85rem; color: var(--muted); }
.procedure-add { padding: 12px; border-top: 1px solid var(--line); }
.procedure-add .button { width: 100%; }
.tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tab { color: var(--muted); border: 0; border-bottom: 3px solid transparent; padding: 14px 0 12px; background: transparent; font-weight: 600; font-size: .9rem; }
.tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.detail-column { min-width: 0; }
.procedure-overview { padding: 24px; margin-bottom: 24px; border-top: 3px solid var(--ink); }
.procedure-overview h2 { font-size: 1.3rem; }
.procedure-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 9px; color: var(--muted); font-size: .78rem; }
.eligibility { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.eligibility-top { display: flex; align-items: center; gap: 9px; font-size: .94rem; font-weight: 650; }
.eligibility-icon { flex-shrink: 0; color: var(--warning); }
.eligibility.complete .eligibility-icon { color: var(--approved); }
.eligibility p { color: var(--muted); font-size: .85rem; margin-top: 8px; max-width: 66ch; }
.requirement-list { list-style: none; margin: 17px 0 0; padding: 0; display: grid; gap: 9px; }
.requirement-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; }
.requirement-dot { color: var(--warning); line-height: 1.5; }
.requirement-help { display: block; color: var(--muted); font-size: .77rem; }
.stamp { display: inline-flex; align-items: center; gap: 6px; border: 1px solid currentColor; padding: 3px 8px; border-radius: 2px; color: var(--approved); font-size: .73rem; font-weight: 650; white-space: nowrap; }
.stamp.pending { color: var(--warning); background: var(--warning-tint); }
.stamp.rejected { color: var(--danger); background: var(--danger-tint); }
.stamp.approved { background: var(--approved-tint); }
.document-list { list-style: none; margin: 0; padding: 0; }
.document-item { padding: 21px 22px; }
.document-item + .document-item { border-top: 1px solid var(--line); }
.document-top { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.document-name { font-weight: 650; font-size: .92rem; }
.document-meta { color: var(--muted); font-size: .78rem; margin-top: 7px; display: flex; flex-wrap: wrap; gap: 5px 18px; }
.document-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.document-reason { color: var(--muted); font-size: .82rem; margin-top: 12px; overflow-wrap: anywhere; }
.version-details { font-size: .8rem; margin-top: 14px; }
.version-details summary { color: var(--ink); cursor: pointer; padding: 4px 0; width: fit-content; }
.version-list { color: var(--muted); padding-left: 20px; margin-bottom: 0; }
.version-list li { padding: 6px 0; overflow-wrap: anywhere; }
.helper-note { color: var(--muted); font-size: .78rem; margin-top: 14px; max-width: 75ch; }
.reuse-provenance, .reuse-details { overflow-wrap: anywhere; }
#reuse-source { width: 100%; min-width: 0; }
.storage-panel { padding: 22px; margin-bottom: 26px; }
.storage-panel > .section-header { margin-bottom: 10px; }
.storage-description { font-size: .85rem; color: var(--muted); max-width: 72ch; }
.storage-folders { padding-left: 20px; }
.storage-folders li { padding: 5px 0; }
.storage-folders .helper-note { margin-left: 14px; }
.storage-policy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 16px; margin: 12px 0; }
.storage-policy dt { font-weight: 600; }
.storage-policy dd { margin: 0; color: var(--muted); }
.storage-uploads { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 17px; }
.storage-uploads > h3 { font-size: .88rem; }
.storage-upload-list { list-style: none; padding: 0; margin: 12px 0 0; }
.storage-upload-list > li { padding: 16px 0; }
.storage-upload-list > li + li { border-top: 1px solid var(--line); }
.storage-upload-list strong { font-size: .85rem; overflow-wrap: anywhere; }
.storage-upload-list .helper-note { margin: 8px 0 12px; }
.storage-format-group { min-width: 0; border: 1px solid var(--line); padding: 12px; margin: 0 0 16px; }
.storage-format-group legend { padding: 0 5px; font-size: .85rem; font-weight: 600; }
.storage-format-options { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.storage-format-options .check-confirmation { margin: 0; }
.download-action { display: inline-flex; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.version-list .download-action { display: flex; margin-top: 8px; }
@media (max-width: 560px) {
  .storage-panel { padding: 18px; }
  .storage-policy { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .storage-policy dd { margin-bottom: 8px; }
}
.history-list { list-style: none; margin: 0; padding: 0; }
.history-item { display: grid; grid-template-columns: 160px minmax(0,1fr); padding: 23px 24px; gap: 22px; }
.history-item + .history-item { border-top: 1px solid var(--line); }
.history-date { font-size: .8rem; color: var(--muted); }
.history-action { font-size: .9rem; font-weight: 600; }
.history-context { color: var(--muted); font-size: .8rem; margin-top: 5px; overflow-wrap: anywhere; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.1fr) minmax(360px, 1fr); padding: 24px; gap: 24px; }
.login-intro { background: linear-gradient(145deg, #ffffffa3, #d9eff699 55%, #eeedfa99); padding: clamp(38px, 7vw, 108px); display: flex; flex-direction: column; justify-content: space-between; gap: 64px; border: 1px solid var(--glass-edge); border-radius: 28px; }
.login-intro h1 { font-size: clamp(2rem, 3.7vw, 3.5rem); line-height: 1.12; max-width: 12ch; margin-bottom: 24px; }
.login-intro p { color: var(--muted); max-width: 44ch; font-size: 1rem; }
.login-footnote { font-size: .8rem !important; }
.login-form-area { display: grid; place-items: center; padding: 48px; }
.login-card { width: min(100%, 440px); padding: 32px; background: var(--surface); border: 1px solid var(--glass-edge); border-radius: 24px; box-shadow: var(--shadow); }
.login-card h2 { font-size: 1.6rem; letter-spacing: -.035em; margin: 20px 0 12px; }
.login-card > p { color: var(--muted); font-size: .9rem; margin-bottom: 28px; }
.login-card .button.primary { width: 100%; margin-top: 8px; }
.login-notice { border-left: 3px solid var(--warning); background: var(--warning-tint); padding: 16px 18px; color: #72410b; font-size: .83rem; margin-bottom: 20px; }
.login-notice strong { display: block; margin-bottom: 5px; }
.login-boundary { font-size: .78rem; color: var(--muted); margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
dialog { border: 1px solid var(--glass-edge); border-radius: 24px; padding: 0; width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 40px); color: var(--graphite); background: #f7f9ff; box-shadow: 0 24px 90px #28346c40; }
dialog::backdrop { background: #1926505c; backdrop-filter: blur(5px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; padding: 24px 26px 18px; gap: 16px; }
.dialog-heading h2 { font-size: 1.25rem; }
.close-button { padding: 1px 8px; font-size: 1.5rem; min-height: 32px; font-weight: 400; }
.dialog-body { padding: 0 26px 26px; }
.dialog-description { color: var(--muted); font-size: .87rem; margin-bottom: 22px; }
.field { display: grid; gap: 7px; margin-bottom: 20px; }
.field label { font-size: .85rem; font-weight: 600; }
.field small { color: var(--muted); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.dialog-notice { background: var(--paper); border-left: 3px solid #b9b5d4; padding: 12px 15px; color: var(--muted); font-size: .8rem; margin: 0 0 22px; }
.dialog-error { margin: 0 0 20px; }
.dialog-error p + p { margin-top: 8px; }
.form-status { color: var(--muted); font-size: .83rem; margin-top: 10px; }
.connection-notice { margin-top: 24px; font-size: .78rem; color: var(--muted); }
.button.nav-button:not([aria-current]) { background: transparent; color: var(--muted); }
.catalog-item { padding: 22px 24px; }
.catalog-item + .catalog-item { border-top: 1px solid var(--line); }
.catalog-item h2 { overflow-wrap: anywhere; }
.catalog-item .section-header { margin-bottom: 12px; }
.catalog-requirements { padding-left: 20px; margin: 12px 0; display: grid; gap: 10px; font-size: .87rem; }
.catalog-requirements strong { font-weight: 550; }
.catalog-requirements li { overflow-wrap: anywhere; }
.catalog-editor { display: grid; gap: 16px; margin-bottom: 16px; }
.requirement-editor { border: 1px solid var(--line); border-radius: 4px; padding: 14px; margin: 0; min-width: 0; }
.requirement-editor legend { padding: 0 5px; color: var(--ink); font-size: .85rem; font-weight: 600; }
.alternative-options { display: grid; gap: 10px; margin: 12px 0; }
.alternative-options label, .check-confirmation { display: flex; align-items: flex-start; gap: 9px; font-size: .84rem; }
.alternative-options input, .check-confirmation input { flex: 0 0 auto; margin-top: 4px; }
.catalog-comparison { border-left: 3px solid var(--ink); padding-left: 14px; margin: 18px 0; font-size: .85rem; overflow-wrap: anywhere; }
.catalog-comparison:empty { display: none; }
.catalog-comparison p + p { margin-top: 10px; }
.iam-tabs .button.tab { border-radius: 10px; border: 1px solid transparent; padding: 10px 14px; background: transparent; }
.iam-tabs .button.tab.active { border-color: #a7b9f2; background: #e0e8ff; color: #233fa9; }
.iam-introduction { color: var(--muted); font-size: .88rem; max-width: 76ch; margin: 0 0 22px; }
.iam-item { padding: 22px 24px; }
.sync-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin: 20px 0; }
.sync-count { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--line); background: var(--paper); }
.sync-count strong { font-size: 1.5rem; }
.sync-count span { color: var(--muted); font-size: .85rem; }
.iam-tabs { flex-wrap: wrap; }
.notification-preferences { max-width: 740px; }
.notification-form { padding: 24px; }
.notification-form h2 { margin-top: 0; }
.notification-form .iam-check { padding-block: 14px; }
.notification-filters { display: flex; flex-wrap: wrap; gap: 18px; margin: 18px 0; }
.notification-filters .field { flex: 1 1 220px; margin: 0; }
.iam-item + .iam-item { border-top: 1px solid var(--line); }
.iam-row-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.iam-row-heading > div { min-width: 0; }
.iam-row-heading h3 { overflow-wrap: anywhere; }
.iam-secondary { color: var(--muted); font-size: .82rem; margin: 5px 0 0; overflow-wrap: anywhere; }
.iam-details { margin: 14px 0; font-size: .85rem; }
.iam-details > summary { color: var(--ink); cursor: pointer; padding: 5px 0; }
.iam-permission-list { padding-left: 20px; margin: 12px 0; columns: 2 220px; column-gap: 28px; }
.iam-permission-list li { padding: 4px 0; overflow-wrap: anywhere; break-inside: avoid; }
.iam-fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 4px; padding: 16px 18px; margin: 18px 0 22px; }
.iam-fieldset legend { color: var(--ink); padding: 0 5px; font-size: .9rem; font-weight: 600; }
.iam-fieldset > .field:first-of-type { margin-top: 18px; }
.iam-fieldset > .field:last-child { margin-bottom: 0; }
.iam-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; font-size: .88rem; }
.iam-check input { flex: 0 0 auto; margin-top: 5px; }
.iam-check > span { min-width: 0; overflow-wrap: anywhere; }
.iam-check .requirement-help { margin-top: 3px; }
/* Platform assistant: a side panel with the guide of the current view and the meaning of each field. */
.assistant { position: fixed; top: 16px; right: 16px; bottom: 16px; z-index: 60; width: min(420px, calc(100vw - 32px)); display: grid; grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px; padding: 18px 18px 0; border: 1px solid var(--glass-edge); border-radius: 18px; background: #fbfdff; box-shadow: 0 24px 70px #28346c38; color: var(--graphite); }
.assistant[hidden] { display: none; }
.assistant-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assistant-head h2 { margin: 0; font-size: 1.05rem; }
.assistant-head h2:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.assistant-search { display: grid; gap: 4px; font-size: .85rem; color: var(--muted); }
.assistant-search input { width: 100%; }
.assistant-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 2px 18px; display: grid; gap: 14px; align-content: start;
  scrollbar-width: thin; scrollbar-color: #c2cbe9 transparent; }
.assistant-entry { display: grid; gap: 10px; }
.assistant-entry-title { margin: 0; font-size: 1.1rem; color: var(--ink); }
.assistant-summary { margin: 0; line-height: 1.55; }
.assistant-section { display: grid; gap: 6px; }
.assistant-section h3 { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.assistant-guide, .assistant-faq, .assistant-fields { border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; background: #fff; }
.assistant-guide summary, .assistant-faq summary, .assistant-fields summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.assistant-guide ol { margin: 8px 0 2px; padding-left: 4px; list-style: none; display: grid; gap: 6px; counter-reset: guide; }
.assistant-step { display: flex; gap: 8px; align-items: flex-start; line-height: 1.45; }
.assistant-step input { margin-top: 4px; flex: 0 0 auto; }
.assistant-step input:checked + span { color: var(--muted); text-decoration: line-through; }
.assistant-faq p { margin: 6px 0 2px; line-height: 1.5; }
.assistant-tips { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.assistant-fields dl { margin: 8px 0 2px; display: grid; gap: 2px; }
.assistant-fields dt { font-weight: 600; margin-top: 6px; }
.assistant-fields dd { margin: 0; color: var(--graphite); line-height: 1.5; }
.assistant-field { border-left: 4px solid var(--brand); background: var(--tint); border-radius: 10px; padding: 10px 14px; }
.assistant-field h3 { margin: 0 0 4px; font-size: .95rem; }
.assistant-field p { margin: 0; line-height: 1.55; }
.assistant-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.assistant-results li { display: grid; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.assistant-meta { color: var(--muted); font-size: .8rem; }
.assistant-link, .button.assistant-link { display: inline; background: none; border: 0; padding: 2px 0; min-height: 24px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; font: inherit; font-weight: 600; }
.assistant-chip { position: fixed; z-index: 61; min-height: 28px; padding: 3px 10px; border-radius: 999px; border: 1px solid #b9c7ef; background: #eef2ff; color: #2945b2; font-size: .8rem; font-weight: 600; box-shadow: 0 4px 14px #28346c26; cursor: pointer; }
.assistant-chip[hidden] { display: none; }
.assistant-glyph { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; font-weight: 700; font-size: .78rem; }
.dialog-tools { display: flex; align-items: center; gap: 6px; }
@media (max-width: 520px) { .assistant { top: auto; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 82vh; } }
/* Permission picker: areas with their functions in columns, instead of one long list. */
.iam-permission-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 6px 0 4px; }
.iam-permission-count { margin: 0 0 0 auto; color: var(--muted); font-size: .85rem; }
.iam-permission-group { padding: 12px 0 4px; border-top: 1px solid var(--line); }
.iam-permission-group:first-of-type { margin-top: 10px; }
.iam-permission-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.iam-permission-group-head h3 { margin: 0 auto 0 0; font-size: .92rem; color: var(--ink); }
.iam-permission-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 18px; }
.iam-permission-grid .iam-check { padding: 6px 0; }
.iam-permission-grid .field { margin: 6px 0; }
@media (max-width: 520px) { .iam-permission-count { margin-left: 0; flex-basis: 100%; } }
.iam-effective { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 22px 0; }
.iam-audit-reason { font-size: .88rem; margin-top: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.iam-audit-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.iam-audit-compare > section { min-width: 0; }
.iam-audit-compare h4 { font-size: .87rem; margin: 12px 0; }
.iam-snapshot { margin: 0; font-size: .8rem; }
.iam-snapshot dt { font-weight: 600; margin-top: 12px; }
.iam-snapshot dd { color: var(--muted); margin: 4px 0 0; overflow-wrap: anywhere; }
dialog.wide-dialog { width: min(960px, calc(100% - 32px)); }
@media (min-width: 1500px) { .content { padding-top: 42px; } .app-shell { grid-template-columns: 246px minmax(0,1fr); } .sidebar { padding-inline: 28px; } }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 192px minmax(0,1fr); } .sidebar { padding: 30px 16px 20px; } .content { padding: 28px 24px 44px; } .topbar, .qa-banner { padding-inline: 24px; } .dossier-layout { grid-template-columns: 190px minmax(0,1fr); gap: 18px; } .page-heading { flex-wrap: wrap; } .procedure-overview { padding: 20px; } }
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { min-height: auto; padding: 16px 22px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { gap: 12px; }
  .sidebar .brand-mark { width: 44px; height: 44px; border-radius: 12px; }
  .sidebar .brand-name { font-size: 1.1rem; }
  .sidebar .brand-subtitle, .sidebar-note, .account-id, .account-head { display: none; }
  .sidebar nav { margin-left: auto; }
  .nav-button { min-height: 40px; padding: 8px 12px; font-size: .85rem; }
  .account { border: 0; padding: 0; }
  .logout { margin: 0; font-size: .8rem; padding: 8px; min-height: 40px; }
  .topbar { min-height: 54px; }
  .dossier-layout { grid-template-columns: 1fr; }
  .procedure-list { display: flex; gap: 6px; overflow-x: auto; }
  .procedure-list li { flex: 1 0 160px; }
  .procedure-list li + li { border-top: 0; }
  .procedure-button { height: 100%; }
  .procedure-panel-heading { padding-bottom: 4px; }
  .procedure-add { padding: 10px 12px; }
  .procedure-add .button { width: auto; }
  .login-page { display: block; }
  .login-intro { padding: 32px; gap: 40px; border: 0; border-bottom: 1px solid var(--line); }
  .login-intro h1 { font-size: 2.1rem; max-width: 18ch; margin-bottom: 15px; }
  .login-footnote { display: none; }
  .login-form-area { padding: 32px; }
  .login-card { width: min(100%, 480px); }
}
@media (max-width: 520px) {
  .iam-item { padding: 20px 17px; }
  .iam-row-heading { flex-wrap: wrap; gap: 10px; }
  .iam-audit-compare { grid-template-columns: 1fr; gap: 12px; }
  .iam-tabs { justify-content: space-between; gap: 12px; }
  .iam-fieldset { padding: 14px 12px; }
  .sidebar { padding: 15px 16px; gap: 10px; }
  .sidebar .brand-subtitle, .nav-symbol { display: none; }
  .sidebar .brand-name { font-size: 1rem; }
  .nav-button { padding: 8px 10px; }
  .content { padding: 24px 16px 40px; }
  .topbar, .qa-banner { padding-inline: 16px; }
  .topbar-title { font-size: .76rem; }
  .qa-banner { font-size: .76rem; }
  .page-heading { gap: 18px; margin-bottom: 22px; }
  .page-heading p { font-size: .84rem; }
  .page-actions { width: 100%; }
  .page-actions .primary { flex: 1; }
  .toolbar { padding: 16px; }
  .search { width: 100%; }
  .project-table th, .project-table td { padding: 16px; }
  .project-table .access-column { display: none; }
  .project-table .action-cell { width: 80px; padding-left: 0; }
  .project-table .button { padding: 7px 9px; }
  .empty-state { padding: 42px 20px; }
  .section-header { gap: 12px; }
  .section-header .button { width: 100%; }
  .document-item { padding: 20px 17px; }
  .procedure-overview { padding: 20px 17px; }
  .history-item { grid-template-columns: 1fr; gap: 7px; padding: 19px; }
  .tabs { gap: 22px; margin-bottom: 22px; }
  .login-intro { padding: 28px 24px; gap: 30px; }
  .login-form-area { padding: 28px 24px 40px; }
  .dialog-heading { padding: 22px 20px 16px; }
  .dialog-body { padding: 0 20px 22px; }
  .dialog-actions { flex-wrap: wrap-reverse; }
  .dialog-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
/* A quiet glass navigation rail leaves the working records in the foreground. */
.sidebar .brand { gap: 12px; padding-inline: 6px; }
.sidebar .brand-subtitle, .sidebar .account-access { color: var(--muted); }
.sidebar .button.nav-button { color: var(--ink); background: linear-gradient(100deg, #bfe6f2b3, #eeedfab3); border: 1px solid transparent; border-radius: 13px; font-weight: 600; min-height: 46px; font-size: .85rem; }
.sidebar .button.nav-button:not([aria-current]) { color: var(--muted); background: transparent; }
.sidebar .button.nav-button:hover { background: #dceff6a6; }
.sidebar .button.nav-button[aria-current] { border-color: #ffffffb3; box-shadow: inset 3px 0 var(--brand), 0 3px 10px #39758d12; }
.sidebar .sidebar-note { color: var(--muted); font-size: .78rem; padding: 16px 10px; background: #eff0ff85; border-radius: 14px; }
.sidebar .sidebar-note strong { color: var(--graphite); }
.sidebar .account { border-color: var(--line); padding-inline: 6px; }
.sidebar .avatar { background: var(--tint); color: var(--ink); border-color: var(--line); }
.sidebar .button.logout { color: var(--muted); }
.sidebar .button.logout:hover { background: var(--tint); }
.topbar-title { font-weight: 600; color: var(--muted); }
.mode-label { border-color: var(--line); color: var(--muted); border-radius: 8px; background: #ffffff70; }
.qa-banner { padding: 8px 20px; margin: 12px 0 0; border: 1px solid #eadcbe; border-radius: 11px; background: #fff8e9c9; color: #715223; font-size: .76rem; }
.content { max-width: 1570px; }
.work-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 26px; }
.button.work-metric { display: flex; flex-direction: column; align-items: flex-start; border: 1px solid var(--glass-edge); border-radius: 22px; padding: 24px; background: var(--surface); text-align: left; gap: 6px; box-shadow: var(--shadow); }
.button.work-metric:nth-child(2) { background: #eef6ffbd; }
.button.work-metric:nth-child(3) { background: #f3efffbd; }
.button.work-metric:nth-child(4) { background: #eff2ffbd; }
.button.work-metric:hover { background: #fff; border-color: #a9baf1; box-shadow: 0 8px 24px #536caf16; }
.work-metric-value { font-size: 2.5rem; line-height: 1.2; letter-spacing: -.04em; color: var(--graphite); font-weight: 700; }
.work-metric-label { font-size: .9rem; color: var(--muted); }
.work-metric-detail { font-size: .74rem; color: var(--muted); font-weight: 400; margin-top: 5px; }
.work-metric.attention .work-metric-value { color: #855016; }
.work-home-layout { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(275px,1fr); gap: 24px; align-items: start; }
.work-home-rail { display: grid; gap: 22px; min-width: 0; }
.work-panel-heading { padding: 19px 22px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
h2.work-panel-heading { font-size: 1rem; }
.work-panel-heading h2 { font-size: 1rem; }
.work-panel-copy { padding: 18px 22px; color: var(--muted); font-size: .86rem; max-width: 80ch; }
.work-task-row { display: grid; grid-template-columns: minmax(0,1fr) auto; column-gap: 20px; row-gap: 8px; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.work-task-row:last-child { border-bottom: 0; }
.work-task-main { min-width: 0; }
.button.work-title-button { display: block; min-height: auto; border: 0; border-radius: 0; padding: 0; background: transparent; text-align: left; color: #20383f; font-size: .91rem; line-height: 1.5; overflow-wrap: anywhere; }
.button.work-title-button:hover { color: #286651; text-decoration: underline; }
.button.work-title-button:disabled { opacity: 1; cursor: default; text-decoration: none; }
.work-task-context { color: var(--muted); font-size: .79rem; margin-top: 5px; overflow-wrap: anywhere; }
.work-task-cause { color: #8c5127; font-size: .79rem; margin-top: 9px; overflow-wrap: anywhere; }
.work-task-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; max-width: 220px; }
.work-due { font-size: .75rem; color: var(--muted); }
.task-badges { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.work-badge { display: inline-flex; padding: 3px 8px; border-radius: 4px; background: #edf1f2; color: #4d6269; font-size: .71rem; font-weight: 600; }
.work-badge.in_progress { background: #e9f0f7; color: #315e85; }
.work-badge.blocked { background: #fff0df; color: #8c5127; }
.work-badge.completed { background: #e7f3e9; color: #28613a; }
.work-badge.overdue { background: #f9e8e8; color: #a13639; }
.work-priority { font-size: .7rem; color: #8c5127; }
.work-document-entry.button, .work-project-entry.button { width: 100%; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; border: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 15px 22px; text-align: left; font-weight: 400; }
.work-document-entry.button:last-child, .work-project-entry.button:last-child { border-bottom: 0; }
.work-document-entry strong, .work-project-entry strong { font-size: .84rem; overflow-wrap: anywhere; }
.work-document-entry span { font-size: .78rem; color: #4e696f; }
.work-document-entry small, .work-project-entry small { font-size: .73rem; color: var(--muted); }
.work-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; padding: 22px; border-bottom: 1px solid var(--line); }
.work-filters .field { margin: 0; min-width: 0; }
.work-filters input, .work-filters select { width: 100%; min-width: 0; }
.work-results-count { font-size: .78rem; color: var(--muted); padding: 13px 22px; background: #f8fafb; border-bottom: 1px solid var(--line); }
.work-project-grid { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr); gap: 24px; }
.work-section { margin-bottom: 24px; }
.work-project-facts { margin: 0; padding: 22px; }
.work-project-facts dt { font-size: .77rem; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.work-project-facts dd { margin: 0 0 24px; font-size: .92rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-project-facts dd:last-child { margin-bottom: 0; }
.work-progress-list { margin: 0; padding: 22px; display: grid; grid-template-columns: 1fr auto; gap: 16px; font-size: .85rem; }
.work-progress-list dt { color: var(--muted); }
.work-progress-list dd { margin: 0; color: #123f46; font-weight: 700; }
.work-contacts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); }
.work-contact { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
.work-contact h3, .work-contact p { overflow-wrap: anywhere; }
.work-contact h3 { font-size: .94rem; }
.work-contact p { font-size: .8rem; margin-top: 6px; }
.work-contact-role { color: #286651; font-weight: 600; }
.work-contact-detail { color: var(--muted); }
.work-contact .button { margin: 12px 0 0 -9px; }
.work-task-description, .work-task-assignee { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.work-task-description { color: #38565e; }
.work-form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.work-form-columns .field { min-width: 0; }
.work-form-columns select, .work-form-columns input { width: 100%; min-width: 0; }
.work-history-row { padding: 18px 22px; border-bottom: 1px solid var(--line); font-size: .86rem; overflow-wrap: anywhere; }
.work-history-row p { margin: 8px 0; white-space: pre-wrap; }
.work-history-row small { color: var(--muted); }
.tabs { overflow-x: auto; }
.tabs .tab { flex-shrink: 0; }
@media (min-width: 801px) { .sidebar { position: sticky; top: 18px; max-height: calc(100vh - 36px); min-height: calc(100vh - 36px); overflow-y: auto; scrollbar-width: thin; } }
@media (max-width: 1100px) {
  .work-home-layout { grid-template-columns: minmax(0,1.4fr) minmax(235px,1fr); gap: 18px; }
  .button.work-metric { padding: 18px; }
  .work-task-row { grid-template-columns: 1fr; }
  .work-task-meta { align-items: flex-start; max-width: none; flex-direction: row; flex-wrap: wrap; }
  .task-badges { justify-content: flex-start; }
  .work-contacts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .sidebar { display: grid; grid-template-columns: 1fr auto; padding: 18px 22px 0; gap: 18px 12px; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; display: flex; width: 100%; overflow-x: auto; margin: 0; gap: 4px; padding-bottom: 12px; }
  .sidebar .button.nav-button { width: auto; flex-shrink: 0; min-height: 40px; padding: 9px 14px; font-size: .82rem; }
  .sidebar .button.nav-button[aria-current] { box-shadow: inset 0 -2px var(--brand); }
  .sidebar .account { grid-column: 2; grid-row: 1; }
  .work-project-grid { grid-template-columns: 1fr; gap: 0; }
  .work-home-layout { grid-template-columns: 1fr; }
  .work-home-rail { grid-template-columns: 1fr 1fr; }
  .work-filters { grid-template-columns: 1fr 1fr; }
  .work-filters .field:first-child { grid-column: 1 / -1; }
  .work-task-row { grid-template-columns: minmax(0,1fr) auto; }
  .work-task-meta { flex-direction: column; align-items: flex-end; }
}
@media (max-width: 520px) {
  .sidebar { padding: 15px 16px 0; }
  .work-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 20px; }
  .button.work-metric { padding: 16px; }
  .work-metric-value { font-size: 1.8rem; }
  .work-metric-label { font-size: .8rem; }
  .work-metric-detail { font-size: .7rem; }
  .work-home-rail, .work-contacts { grid-template-columns: 1fr; }
  .work-panel-heading, .work-panel-copy, .work-task-row, .work-project-facts, .work-progress-list, .work-contact, .work-filters { padding: 17px; }
  .work-task-row { grid-template-columns: 1fr; }
  .work-task-meta { flex-direction: row; align-items: center; }
  .work-form-columns { grid-template-columns: 1fr; }
  .work-contact { border-right: 0; }
  .work-filters { gap: 12px; }
  .tabs { gap: 20px; }
  .tabs .tab { font-size: .82rem; }
}
.work-change-details { margin-top: 14px; }
.work-change-details > summary { color: var(--ink); font-weight: 600; cursor: pointer; }
.work-change-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.work-change-section h3 { font-size: .88rem; }
.work-change-record { margin: 14px 0; }
.work-change-record h4 { margin: 12px 0; font-size: .84rem; }
.work-change-row { margin-top: 12px; font-size: .8rem; }
.work-change-values { display: grid; grid-template-columns: 66px minmax(0,1fr); gap: 7px 14px; margin: 8px 0; }
.work-change-values dt { color: var(--muted); }
.work-change-values dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Business records keep amounts and actions aligned without turning data into dashboards. */
.business-list { display: grid; }
.business-record { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding: 22px; border-bottom: 1px solid var(--line); min-width: 0; }
.business-record:last-child { border-bottom: 0; }
.business-record > div:first-child { min-width: 0; flex: 1; }
.business-record h3 { font-size: 1rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.business-record p { font-size: .84rem; margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.business-record .work-badge { margin: 7px 6px 0 0; }
.business-muted { color: var(--muted); }
.business-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.business-record > .business-actions { flex: 0 1 290px; }
.crm-filters { display: grid; grid-template-columns: minmax(0,2fr) repeat(3,minmax(0,1fr)) auto; align-items: end; gap: 16px; padding: 22px; }
.crm-filters .field { min-width: 0; margin: 0; }
.crm-details { display: grid; gap: 12px; padding: 22px; }
.crm-multiline { white-space: pre-wrap; overflow-wrap: anywhere; }
.crm-identifiers { margin: 24px 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.crm-identifiers > legend { padding: 0 8px; font-weight: 650; }
.crm-identifier-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 16px; margin: 20px 0; padding: 16px; background: var(--paper); border-radius: 12px; }
.crm-identifier-row .field { min-width: 0; margin: 0; }
.crm-identifier-row > .button { justify-self: start; }
.crm-history-controls { padding: 0 22px 20px; }
.crm-history-item { grid-template-columns: minmax(0,1fr); gap: 12px; }
@media(max-width:1100px) { .crm-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:520px) { .crm-filters, .crm-identifier-row { grid-template-columns: minmax(0,1fr); } .crm-filters, .crm-details, .crm-identifiers { padding: 16px; } .crm-identifier-row { padding: 12px; } }
.business-catalog-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.business-catalog-grid .work-section { margin: 0; }
.business-catalog-status { padding: 0 22px 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.business-requirements { padding: 0 40px 20px; margin: 0; font-size: .85rem; line-height: 1.6; }
.business-requirements li { padding: 3px 0; overflow-wrap: anywhere; }
.business-rule-editor { margin: 22px 0; }
.business-rule-editor h3, .business-form-heading { margin: 18px 0; font-size: 1rem; }
.business-rule-row { padding: 18px 0; border-bottom: 1px solid var(--line); }
.business-rule-row .field { margin-top: 12px; }
.commerce-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.commerce-currency-summary { padding: 22px; border-right: 1px solid var(--line); }
.commerce-currency-summary h3 { font-size: .9rem; }
.commerce-currency-summary .work-progress-list { padding: 18px 0 0; }
.commerce-currency-summary dd { font-variant-numeric: tabular-nums; }
.commerce-rate { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); padding: 14px 22px; font-size: .85rem; }
.commerce-proposal { border-top: 1px solid var(--line); }
.commerce-proposal .business-record { border-bottom: 0; }
.commerce-lines { padding: 0 22px 20px; }
.commerce-line-summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; font-size: .84rem; border-top: 1px solid var(--line); }
.commerce-line-summary strong { font-weight: 500; flex: 1; min-width: 140px; overflow-wrap: anywhere; }
.commerce-line-summary span { font-variant-numeric: tabular-nums; }
.commerce-line-summary small { width: 100%; }
.commerce-line-editor { border: 1px solid var(--line); border-radius: 5px; padding: 18px; margin: 22px 0; min-width: 0; }
.commerce-line-editor legend { font-weight: 650; font-size: 1rem; padding: 0 8px; max-width: 100%; overflow-wrap: anywhere; }
.commerce-milestone-fields { border-top: 1px solid var(--line); padding: 18px 0 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.commerce-milestone-fields .field:first-child, .commerce-milestone-fields > label { grid-column: 1 / -1; }
.commerce-milestone-fields .field { min-width: 0; }
.commerce-allocation { margin: 20px 0; padding-top: 18px; border-top: 1px solid var(--line); }
.commerce-allocation p { margin: 8px 0; font-size: .84rem; }
.finance-blockers { padding: 18px 22px; font-size: .85rem; line-height: 1.6; border-bottom: 1px solid var(--line); }
.finance-blockers h3 { margin: 0 0 8px; font-size: .95rem; }
.finance-blockers ul { margin: 0; padding-left: 20px; }
.finance-blockers li { overflow-wrap: anywhere; }
.proposal-print { color: #20383f; overflow-wrap: anywhere; }
.proposal-print h1 { font-size: 1.5rem; margin: 0 0 18px; }
.proposal-print h2 { font-size: 1.2rem; margin-bottom: 18px; }
.proposal-print p { font-size: .88rem; margin: 10px 0; }
.proposal-print-line { margin: 28px 0; }
.proposal-print-line h3 { font-size: 1rem; }
.proposal-print .project-table td, .proposal-print .project-table th { padding: 12px; }
.proposal-print .proposal-print-total { text-align: right; font-size: 1.1rem; font-weight: 700; margin: 24px 0; }
#proposal-print-root { display: none; }
.financial-version { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.financial-version p { margin: 6px 0; }
.settlement-summary { margin: 12px 0; padding: 10px 12px; border-left: 3px solid var(--control); background: var(--paper); overflow-wrap: anywhere; }
.settlement-summary p { margin-top: 4px; }
.settlement-paid { border-color: var(--approved); background: var(--approved-tint); }
.settlement-partial, .settlement-review_required { border-color: var(--warning); background: var(--warning-tint); }
.settlement-history { margin: 12px 0; }
.settlement-history summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 6px 0; }
.bank-movement > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.bank-status { display: inline-block; margin-top: 10px; padding: 3px 8px; background: var(--paper); border-radius: 3px; font-size: .85rem; }
.bank-linked { background: var(--approved-tint); color: var(--approved); }
.bank-review_required { background: var(--warning-tint); color: var(--warning); }
#bank-import-csv { min-height: 180px; }
.accounting-filters, .accounting-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 20px; }
.accounting-filters > .field, .accounting-line > .field { min-width: 0; }
.accounting-filters input, .accounting-filters select, .accounting-line input, .accounting-line select { min-width: 0; max-width: 100%; }
.accounting-filters { margin: 20px 0; border: 1px solid var(--line); border-radius: 12px; }
.accounting-line { margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; }
.accounting-line legend { font-weight: 600; }
.accounting-report { padding: 18px; overflow-x: auto; }
.accounting-report h3 { font-size: 1rem; margin: 0 0 14px; }
@media (max-width: 900px) {
  .business-catalog-grid { grid-template-columns: 1fr; }
  .business-record { flex-direction: column; gap: 12px; }
  .business-record > .business-actions { flex: auto; width: 100%; justify-content: flex-start; }
}
@media (max-width: 520px) {
  .accounting-filters, .accounting-line { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .business-record, .commerce-currency-summary { padding: 17px; }
  .commerce-summary, .commerce-milestone-fields { grid-template-columns: 1fr; }
  .commerce-currency-summary { border-right: 0; border-bottom: 1px solid var(--line); }
  .commerce-milestone-fields .field { grid-column: 1; }
  .commerce-line-editor { padding: 14px; }
  .business-actions { justify-content: flex-start; }
}
@media print {
  body > * { display: none !important; }
  body > #proposal-print-root { display: block !important; }
  #proposal-print-root { color: black; background: white; padding: 12mm; }
  .proposal-print-line { break-inside: avoid; }
  .proposal-print .project-table { font-size: 10pt; }
}
.result-delivery-files{padding-left:20px;margin:12px 0;overflow-wrap:anywhere}.result-delivery-files li{margin:5px 0}.result-file-name{display:block}.result-delivery-record{align-items:start}.result-delivery-history{margin-top:24px;border-top:1px solid var(--line,#dce5e6);padding-top:16px}.result-delivery-history p{overflow-wrap:anywhere}
.tracking-section .business-record { display: block; overflow-wrap: anywhere; }
.tracking-section .business-actions { margin-top: 12px; justify-content: flex-start; }
.tracking-file { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.tracking-file span { min-width: 0; }
@media (max-width: 520px) { .tracking-file { flex-direction: column; align-items: flex-start; } }

/* Shared detail surfaces preserve the same hierarchy across all work areas. */
.procedure-button { border-radius: 12px; }
.procedure-overview { border-top-color: #8ca3f1; }
.stamp, .work-badge, .bank-status { border-radius: 7px; }
.work-badge { background: #e9edfa; color: #475776; }
.work-badge.in_progress { background: #e2ecff; color: #244fa3; }
.work-badge.completed { background: #e2f3ec; color: #246045; }
.work-badge.blocked { background: #fff0db; color: #805014; }
.work-badge.overdue { background: #fde9ee; color: #9a3045; }
.work-title-button.button { color: var(--graphite); }
.work-title-button.button:hover, .work-progress-list dd, .work-contact-role { color: var(--ink); }
.work-task-description, .work-document-entry span { color: var(--muted); }
.work-results-count { background: #eaf0ff70; }
.work-document-entry.button, .work-project-entry.button { background: transparent; }
.work-document-entry.button:hover, .work-project-entry.button:hover { background: #eaf0ff99; }
.sync-count, .iam-fieldset, .requirement-editor, .generation-service-choices,
.generation-dependencies, .storage-format-group, .commerce-line-editor,
.settlement-summary, .dialog-notice, .login-notice, .error-box { border-radius: 12px; }
.generation-paper { border-radius: 12px; background: #fff; }
.empty-mark { border-radius: 10px; border-color: #b6c5ed; border-top-color: #6b7fe2; background: #eef1ff; }
.tabs { gap: 20px; }
.tab { padding-inline: 4px; }
.skip-link { border-radius: 12px; background: #fff; box-shadow: 0 4px 20px #203b4a26; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); }
input[type="file"]::file-selector-button { font: inherit; padding: 8px 12px; margin-right: 12px; border: 1px solid var(--control); border-radius: 8px; color: var(--ink); background: #edf7fb; cursor: pointer; }
.topbar-search { display: flex; align-items: center; gap: 6px; flex: 1 1 320px; max-width: 520px; min-width: 120px; }
.topbar-search input { width: 100%; min-width: 0; background: #ffffff70; border-color: var(--control); }
.topbar-search .button { flex-shrink: 0; }
.topbar-search label { display: block; }
.dashboard-overview { margin-bottom: 24px; }
.dashboard-overview .work-panel-heading { border-bottom: 0; padding-bottom: 0; }
.dashboard-overview .work-panel-copy { padding-top: 6px; padding-bottom: 0; }
.dashboard-chart { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 32px; padding: 12px 22px 20px; }
.dashboard-bar-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 24px; align-items: center; gap: 8px; margin-block: 3px; font-size: .83rem; }
.dashboard-bar-row .button { justify-content: flex-start; padding-inline: 0; }
.dashboard-bar-row:nth-child(2) progress { accent-color: #599cce; }
.dashboard-bar-row:nth-child(3) progress { accent-color: #9875d9; }
.dashboard-bar-row:nth-child(4) progress { accent-color: #418b77; }
.dashboard-bar-row progress { width: 100%; height: 12px; border: 0; border-radius: 10px; overflow: hidden; accent-color: var(--ink); }
.dashboard-bar-row progress::-webkit-progress-bar { background: #dce4fa; border-radius: 10px; }
.dashboard-bar-row progress::-webkit-progress-value { background: var(--brand); border-radius: 10px; }
.dashboard-bar-row progress::-moz-progress-bar { background: var(--brand); border-radius: 10px; }
.dashboard-bar-row:nth-child(2) progress::-webkit-progress-value { background: #599cce; }
.dashboard-bar-row:nth-child(3) progress::-webkit-progress-value { background: #9875d9; }
.dashboard-bar-row:nth-child(4) progress::-webkit-progress-value { background: #418b77; }
.dashboard-bar-row:nth-child(2) progress::-moz-progress-bar { background: #599cce; }
.dashboard-bar-row:nth-child(3) progress::-moz-progress-bar { background: #9875d9; }
.dashboard-bar-row:nth-child(4) progress::-moz-progress-bar { background: #418b77; }
.dashboard-bar-row strong { text-align: right; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 205px minmax(0, 1fr); gap: 16px; padding: 16px; }
  .sidebar { padding-inline: 12px; }
  .content { padding: 28px 2px 40px; }
  .topbar { padding-inline: 20px; }
  .work-metrics { gap: 12px; }
}
@media (max-width: 800px) {
  .app-shell { display: block; padding: 12px; }
  .sidebar { border-radius: 20px; margin-bottom: 14px; min-height: auto; }
  .sidebar nav { scrollbar-width: thin; }
  .topbar { flex-wrap: wrap; gap: 10px; border-radius: 14px; padding: 12px 18px; }
  .topbar-search { order: 3; flex-basis: 100%; max-width: none; }
  .topbar-title { flex: 1; }
  .content { padding: 26px 4px 40px; }
  .login-page { padding: 16px; }
  .login-intro { border: 1px solid var(--glass-edge); }
  .login-form-area { padding: 24px 0 0; }
}
@media (max-width: 520px) {
  :root { font-size: 16px; }
  .app-shell { padding: 8px; }
  .sidebar { padding: 16px 12px 0; }
  .sidebar .button.nav-button { min-height: 44px; }
  .sidebar .brand { padding-inline: 0; }
  .content { padding: 24px 4px 36px; }
  .qa-banner { padding: 10px 14px; }
  .work-metrics { gap: 10px; }
  .button.work-metric { padding: 18px 15px; border-radius: 18px; }
  .work-metric-value { font-size: 2rem; }
  .work-metric-detail { font-size: .75rem; }
  .panel { border-radius: 18px; }
  .button.small { min-height: 44px; }
  .page-actions { gap: 8px; }
  .page-actions .button { flex: 1 1 auto; }
  .topbar { padding-inline: 14px; }
  .mode-label { white-space: normal; }
  .login-intro { padding: 28px 24px; }
  .login-card { padding: 24px; }
  .login-intro h1 { font-size: 2rem; }
  .dashboard-chart { grid-template-columns: minmax(0, 1fr); padding-inline: 18px; }
  .dashboard-bar-row { grid-template-columns: 95px minmax(0, 1fr) 28px; gap: 8px; }
  .project-table { table-layout: fixed; }
  .project-table td, .project-table th { overflow-wrap: anywhere; }
}
@media (prefers-reduced-transparency: reduce) {
  :root { --surface: #f8faff; }
  .sidebar, .topbar, .button.work-metric { background: #f8faff; backdrop-filter: none; }
}
@media (forced-colors: active) {
  .sidebar .button.nav-button[aria-current], .tab.active { border: 2px solid Highlight; }
  .panel, .button.work-metric { border: 1px solid CanvasText; }
}
@media print { body { background: white; } }

/* Shared spacing for the integrated workflow modules. */
.workflow-module { padding: clamp(18px, 3vw, 32px); margin-bottom: 24px; overflow-wrap: anywhere; }
.workflow-module h2 { font-size: 1.45rem; margin: 12px 0 16px; }
.workflow-module h3 { margin: 28px 0 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.workflow-module p { max-width: 78ch; margin: 9px 0; }
.workflow-module .button { max-width: 100%; }
.workflow-module form { display: grid; gap: 14px; margin-block: 22px; max-width: 850px; }
.workflow-module label { display: grid; gap: 8px; margin-block: 0; }
.workflow-module label:has(input[type="checkbox"]) { display: flex; align-items: flex-start; gap: 12px; }
.workflow-module input:not([type="checkbox"]), .workflow-module select, .workflow-module textarea { width: 100%; min-width: 0; }
.workflow-module input[type="checkbox"] { flex: 0 0 auto; margin-top: 5px; }
.workflow-module fieldset { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; }
.workflow-module legend { font-weight: 600; padding-inline: 6px; }
.workflow-module details { margin-block: 18px; }
.workflow-module summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.workflow-module pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); padding: 16px; border-radius: 12px; font-size: .85rem; }
.workflow-module .messaging-record { display: block; }
.workflow-module .messaging-record h3 { margin-top: 0; padding-top: 0; border-top: 0; }

/* Navigation and shared controls: one rhythm across desktop and mobile. */
.sidebar { gap: 18px; padding: 24px 16px 16px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar-note { display: none; }
.sidebar .account { margin-top: auto; }
.nav-group { min-width: 0; }
.nav-group-title { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--muted); font-weight: 650; font-size: .86rem; padding: 12px 10px; border-radius: 10px; list-style: none; }
.nav-group-title::-webkit-details-marker { display: none; }
.nav-group-title:hover { background: #e0f2f880; color: var(--graphite); }
.nav-group[open] > .nav-group-title { color: var(--ink); }
.nav-group-links { display: grid; gap: 4px; padding: 2px 0 10px 8px; }
.sidebar .button.nav-button { padding: 10px 12px; min-height: 44px; font-size: .85rem; border-radius: 12px; }
.menu-toggle { display: none; }
.sidebar { scrollbar-color: #a6b4da transparent; scrollbar-width: thin; }
select:not([multiple]) { appearance: none; padding-right: 42px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23506775' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
select, input:not([type="checkbox"]):not([type="radio"]), .topbar .button { min-height: 44px; }
.topbar-search { gap: 10px; }
.topbar .search-submit { background: #e7edff; border-color: #bdcbed; color: #2945b2; padding-inline: 18px; }
.notification-shortcut { border-color: #bdcbed; background: #f4f6ff; }
.topbar-title { max-width: 22ch; }
/* Title and search on the left, shortcuts on the right (space-between). */
.topbar-start { display: flex; align-items: center; gap: 18px; flex: 1 1 auto; min-width: 0; }
.topbar-start .topbar-title { flex: 0 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-start .topbar-search { flex: 1 1 320px; max-width: 520px; }
.topbar-end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex: 0 0 auto; margin-left: auto; }
@media (max-width: 800px) {
  .topbar-start { display: contents; }
  .topbar-start .topbar-title { order: 1; flex: 1 1 auto; max-width: none; }
  .topbar-end { order: 2; }
  .topbar-start .topbar-search { order: 3; flex: 1 1 100%; max-width: none; }
}
.tabs { flex-wrap: wrap; overflow: visible; gap: 8px; padding: 8px; border: 1px solid var(--glass-edge); border-radius: 16px; background: #ffffff60; }
.tabs .tab { min-height: 44px; padding: 10px 14px; border: 1px solid transparent; border-radius: 10px; }
.tabs .tab.active { background: #e0e8ff; border-color: #a7b9f2; color: #233fa9; }
.project-tab-menu { flex: 1 0 100%; min-width: 0; }
.project-tab-menu > summary { width: fit-content; cursor: pointer; color: var(--muted); border-color: transparent; background: transparent; }
.project-tab-menu > summary::before { content: "+"; font-size: 1.2rem; }
.project-tab-menu[open] > summary::before { content: "−"; }
.project-secondary-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px; padding: 10px 4px 4px; border-top: 1px solid var(--line); }
.project-secondary-tabs .button { justify-content: flex-start; text-align: left; }
.workflow-module > :first-child { margin-top: 0; }
.workflow-module > .work-panel-heading { padding: 0 0 18px; margin: 0 0 18px; }
.workflow-module > .work-panel-copy { padding: 0; }
.workflow-module > .toolbar { padding: 18px 0 0; }
.workflow-module > section + section, .workflow-module > .panel + .panel { margin-top: 24px; }
.workflow-module .panel, .workflow-module .card { padding: 22px; margin-block: 18px; min-width: 0; }
.workflow-module .card { border: 1px solid var(--line); border-radius: 16px; background: #ffffff60; }
.workflow-module .panel > h3:first-child, .workflow-module .card > h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.workflow-module .list-item { padding: 18px 0; border-top: 1px solid var(--line); }
.workflow-module h4 { margin: 10px 0; }
.workflow-module .notice { padding: 14px 18px; border-left: 3px solid var(--ink); background: var(--tint); border-radius: 10px; }
.workflow-module .business-actions { justify-content: flex-start; }
.workflow-module .business-record { border: 1px solid var(--line); border-radius: 14px; margin-block: 14px; background: #ffffff60; }
.workflow-module .business-record h3 { border: 0; padding: 0; margin: 0 0 12px; }
.workflow-module button:not(.button) { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 16px; border: 1px solid var(--control); border-radius: 11px; background: var(--surface); color: var(--graphite); font-weight: 600; }
.workflow-module table { width: 100%; border-collapse: collapse; text-align: left; }
.workflow-module th, .workflow-module td { padding: 14px 16px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.workflow-module th { font-size: .82rem; color: var(--muted); background: #eaf0ff70; }
.workflow-module form .button { justify-self: start; }
.source-history-list { display: grid; gap: 18px; margin-block: 24px; }
.source-history-list .source-history-record { margin: 0; }
.source-history-record > div { width: 100%; min-width: 0; overflow-wrap: anywhere; }
.source-history-record dl { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(0, 3fr); gap: 10px 20px; margin-block: 20px 0; }
.source-history-record dt { color: var(--muted); }
.source-history-record dd { margin: 0; white-space: pre-wrap; }
@media (max-width: 600px) {
  .source-history-record dl { grid-template-columns: 1fr; gap: 6px; }
  .source-history-record dd { margin-bottom: 12px; }
}
.workflow-module output { display: block; margin-block: 12px; }
@media (max-width: 800px) {
  .sidebar { display: grid; grid-template-columns: minmax(0,1fr) auto; padding: 16px; gap: 14px; }
  .menu-toggle { display: inline-flex; grid-column: 2; grid-row: 1; }
  .sidebar nav { display: none; grid-column: 1 / -1; grid-row: 2; overflow: visible; width: 100%; padding: 0; }
  .sidebar.menu-open nav { display: grid; }
  .sidebar .account { display: none; grid-column: 1 / -1; grid-row: 3; margin: 0; border-top: 1px solid var(--line); padding-top: 12px; }
  .sidebar.menu-open .account { display: block; }
  .sidebar .button.nav-button { width: 100%; }
  .sidebar .brand-subtitle { display: block; }
  .nav-group-title { min-height: 44px; }
  .topbar-title { max-width: none; }
  .project-secondary-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .project-tabs > .tab { flex: 1 1 calc(50% - 8px); font-size: .83rem; padding-inline: 8px; }
  .project-secondary-tabs { grid-template-columns: minmax(0,1fr); }
  .topbar-search { flex-wrap: nowrap; }
  .topbar .search-submit { padding-inline: 12px; }
  .workflow-module { padding: 20px 16px; }
  .workflow-module .business-record { padding: 16px; }
  .workflow-module .panel, .workflow-module .card { padding: 16px; }
  .workflow-module .button { white-space: normal; text-align: center; }
}

/* The project chronology keeps real, planned and estimated dates distinct. */
.timeline-heading p, .timeline-note { color: var(--muted); font-size: .88rem; }
.timeline-flow { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; list-style: none; padding: 0; margin: 24px 0; counter-reset: journey; }
.timeline-flow-step { padding: 16px; background: linear-gradient(145deg,#edf7fb,#f7f4ff); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.timeline-flow-step::before { counter-increment: journey; content: counter(journey,decimal-leading-zero); display: block; color: var(--ink); font-size: .8rem; font-weight: 700; margin-bottom: 10px; }
.timeline-flow-step strong, .timeline-flow-step span { display: block; }
.timeline-flow-step strong { font-size: .9rem; }
.timeline-flow-step span { font-size: .79rem; color: var(--muted); margin-top: 8px; }
.timeline-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; border-block: 1px solid var(--line); padding: 14px 0; margin-bottom: 24px; }
.timeline-summary > .timeline-note { flex-basis: 100%; }
.timeline-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.timeline-toolbar .button { margin: 0; }
.timeline-toolbar .button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.timeline-toolbar > select { flex: 1 1 240px; width: auto; }
.timeline-toolbar label { flex: 0 1 180px; margin: 0; font-size: .85rem; }
.timeline-toolbar label:has(input[type="checkbox"]) { flex: 1 1 220px; align-self: center; }
.timeline-legend { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .78rem; color: var(--muted); margin: 20px 0 14px; }
.timeline-legend span::before { content: ""; display: inline-block; width: 18px; height: 6px; border-radius: 2px; margin-right: 8px; vertical-align: middle; background: #265ca8; }
.timeline-legend .timeline-legend--target::before { background: #8380b9; opacity: .6; }
.timeline-legend .timeline-legend--estimate::before { background: #5297a5; }
.timeline-legend .timeline-legend--declared::before { background: #ad720b; }
.timeline-legend .timeline-legend--milestone::before { width: 8px; height: 8px; transform: rotate(45deg); border-radius: 0; background: #394367; }
.timeline-scroll { max-width: 100%; overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #ffffffb8; margin: 16px 0; scrollbar-width: thin; scrollbar-color: #a6b4da transparent; }
.timeline-chart, .timeline-dependency-chart { display: block; max-width: none; }
.timeline-table { min-width: 950px; font-size: .82rem; }
.timeline-table caption { padding: 18px; text-align: left; color: var(--muted); }
.timeline-table th[scope="row"] { min-width: 230px; color: var(--graphite); background: transparent; }
.timeline-empty { padding: 24px; background: #edf7fb; border-radius: 14px; }
.timeline-dependency-select { max-width: 650px; }
.timeline-service-stages details { border: 1px solid var(--line); border-radius: 14px; padding: 18px; background: #ffffff60; }
.timeline-service-stages summary { padding: 4px; }
.timeline-service-stages ol { display: grid; gap: 10px; padding-left: 24px; margin-block: 20px; }
.timeline-stage--current { color: var(--ink); font-weight: 650; }
@media (max-width: 1100px) { .timeline-flow { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 600px) {
  .timeline-flow { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .timeline-flow-step { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 0 12px; padding: 14px; }
  .timeline-flow-step::before { grid-row: 1 / 3; margin: 0; }
  .timeline-flow-step span { grid-column: 2; margin-top: 4px; }
  .timeline-toolbar > .button { flex: 1 1 130px; }
  .timeline-toolbar label { flex: 1 1 130px; }
}

/* Section composition: every action belongs to a heading, body or footer. */
.project-workspace, .section-stack, .business-workspace { display: grid; gap: 24px; min-width: 0; align-content: start; }
.project-workspace > .tabs, .project-workspace > .work-section, .project-workspace > .workflow-module,
.section-stack > .work-section, .business-workspace > .work-section { margin-bottom: 0; }
.project-workspace > div:not([class]) { display: grid; gap: 24px; min-width: 0; }
.project-workspace > div:not([class]) > .work-section { margin-bottom: 0; }
.project-workspace .work-project-grid > .work-section { margin-bottom: 0; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading > h2, .section-heading > h3 { margin: 0; padding: 0; border: 0; }
.section-actions, .business-section-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 18px 22px; border-top: 1px solid var(--line); }
.section-actions .button, .business-section-footer .button { margin: 0; }
.workflow-module .section-actions { padding: 16px 0 0; margin-top: 16px; }
.business-next-step { padding: 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 24px; }
.business-next-step > div { flex: 1 1 300px; min-width: 0; }
.business-next-step p { max-width: 72ch; color: var(--muted); margin: 8px 0 0; }
.business-next-step h3 { margin: 0; }
.work-section > p:not(.work-panel-copy):not(.loading) { margin: 0; padding: 18px 22px; max-width: none; }
.work-section > .dialog-notice { border-radius: 0; border-left-width: 4px; }
.work-section > .business-actions { justify-content: flex-start; padding: 18px 22px; border-top: 1px solid var(--line); }
.work-section > .button { margin: 16px 22px; }
.work-section > .generation-note, .work-section > .muted, .work-section > .business-muted { color: var(--muted); font-size: .9rem; }
.work-panel-heading { gap: 16px; padding: 20px 24px; }
.work-panel-heading h2 { font-size: 1.08rem; }
.work-panel-copy { font-size: .92rem; line-height: 1.65; padding: 20px 24px; }
.business-record { padding: 24px; gap: 24px; }
.business-record p { font-size: .9rem; line-height: 1.6; }
.business-actions { align-items: center; gap: 10px; }
.business-actions .button { white-space: normal; text-align: center; }
.button.small { min-height: 40px; padding: 9px 14px; font-size: .85rem; }
.work-badge { border-radius: 8px; font-size: .78rem; padding: 5px 10px; }
.work-panel-heading > .button { flex-shrink: 0; }
.workflow-module .toolbar, .workflow-module .business-actions { gap: 12px; }
.workflow-module > .button + .button, .workflow-module .list-item > .button + .button,
.workflow-module .panel > .button + .button, .workflow-module .card > .button + .button { margin-inline-start: 10px; }
.workflow-module > .button, .workflow-module .list-item > .button { margin-block: 8px; }
.workflow-module .panel > p, .workflow-module .card > p { line-height: 1.65; }
.workflow-module form > .button { margin: 4px 0; }
.workflow-module label:has(input[type="radio"]) { display: flex; align-items: center; gap: 10px; }
.workflow-module input[type="radio"] { width: auto; min-height: auto; flex: 0 0 auto; }
.plan-record-meta { display: grid; grid-template-columns: minmax(100px, auto) minmax(0, 1fr); gap: 8px 20px; font-size: .9rem; margin: 16px 0; }
.plan-record-meta dt { color: var(--muted); }
.plan-record-meta dd { margin: 0; overflow-wrap: anywhere; }
.plan-review-note { padding: 12px 16px; background: var(--warning-tint); color: var(--warning); border-radius: 10px; }
.plan-section-empty { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: #ffffff70; }
.plan-section-empty > summary { padding: 4px 0; }
.plan-section-empty > p { color: var(--muted); }
.dialog-actions { flex-wrap: wrap; align-items: center; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-heading { position: sticky; top: 0; z-index: 2; background: #f7f9ff; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.dialog-body input, .dialog-body select, .dialog-body textarea { min-width: 0; width: 100%; }
.dialog-body input[type="checkbox"], .dialog-body input[type="radio"] { width: auto; }
.dialog-description { font-size: .95rem; line-height: 1.65; }
.field label { font-size: .9rem; }
.content > .panel + .panel { margin-top: 24px; }
@media (max-width: 650px) {
  .business-record { flex-direction: column; padding: 20px; gap: 16px; }
  .business-record > .business-actions { flex: none; width: 100%; justify-content: flex-start; }
  .section-actions, .business-section-footer, .business-next-step { padding: 18px; }
  .section-actions > .button, .business-section-footer > .button, .business-next-step > .button { flex: 1 1 180px; }
  .work-panel-heading { padding: 18px; align-items: flex-start; }
  .work-panel-copy, .work-section > p:not(.work-panel-copy):not(.loading) { padding: 18px; }
  .dialog-heading { padding: 20px; }
  .dialog-body { padding: 0 20px 20px; }
  .dialog-actions .button { flex: 1 1 140px; }
  .plan-record-meta { grid-template-columns: 1fr; gap: 4px; }
  .plan-record-meta dd { margin-bottom: 10px; }
  .project-workspace, .section-stack, .business-workspace, .project-workspace > div:not([class]) { gap: 18px; }
}
.project-secondary-tabs { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; padding: 20px 12px 12px; }
.project-nav-group { display: grid; align-content: start; gap: 6px; min-width: 0; }
.project-nav-group h3 { font-size: .88rem; color: var(--muted); margin: 0 0 8px; padding-inline: 10px; }
.project-nav-group .button { width: 100%; white-space: normal; }
@media (max-width: 520px) { .project-secondary-tabs { grid-template-columns: 1fr; } }

.offline-field, .offline-search { display: grid; gap: 7px; margin: 18px 0; font-weight: 600; }
.offline-field input, .offline-field select, .offline-search input { width: 100%; min-width: 0; min-height: 44px; }
.offline-check { display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; margin: 20px 0; max-width: 70ch; font-weight: 500; }
.offline-check input { width: 20px; height: 20px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--ink); }
.offline-controls form { max-width: 42rem; }
.offline-controls form > p { margin: 18px 0; color: var(--muted); max-width: 75ch; line-height: 1.65; }
.offline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.offline-status { padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--tint); margin: 18px 0; }
.offline-status:empty { display: none; }
.offline-content { margin-top: 24px; }
.offline-content > p { margin-bottom: 16px; color: var(--muted); }
.offline-devices { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 24px; }
.offline-devices:empty { display: none; }
.offline-devices > p { margin: 10px 0 16px; color: var(--muted); }
.offline-device { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.offline-device:last-child { border-bottom: 0; }
.offline-results { margin-top: 20px; }
.offline-results details { border-top: 1px solid var(--line); padding: 12px 0; min-width: 0; }
.offline-results summary { font-weight: 650; cursor: pointer; min-height: 44px; padding: 8px 0; color: var(--ink); overflow-wrap: anywhere; }
.offline-results dl { padding: 12px 16px; margin: 12px 0; background: var(--paper); border-radius: 10px; overflow-wrap: anywhere; }
.offline-results dt { font-weight: 600; color: var(--muted); margin-top: 8px; }
.offline-results dd { margin: 4px 0 12px; }
@media (max-width: 640px) { .offline-actions { flex-direction: column; align-items: stretch; } .offline-device > .button { width: 100%; } }
.report-filter-options { padding: 20px 24px; }
.report-filter-options > summary { cursor: pointer; color: var(--ink); font-weight: 600; min-height: 44px; display: list-item; padding: 10px 0; }
.report-filter-options .accounting-filters { margin-bottom: 0; padding: 18px 0 0; border: 0; }
.accounting-filters > .field { margin-bottom: 4px; }
.accounting-filters > .button { justify-self: start; }
.page-heading h1:focus { outline: none; }
@media (min-width: 1100px) { .report-filter-options .accounting-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.notification-preferences { display: grid; gap: 24px; max-width: none; margin-bottom: 24px; min-width: 0; }
.notification-preferences > h2 { margin: 12px 0 0; }
.notification-channel-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.notification-form { padding: 26px; }
.notification-form h2, .notification-form h3 { margin-bottom: 12px; }
.notification-form .iam-introduction { max-width: 76ch; line-height: 1.65; font-size: .92rem; margin-bottom: 20px; }
.notification-form .iam-secondary, .notification-form .muted { max-width: 76ch; line-height: 1.6; margin-block: 10px; }
.notification-form .button { margin-top: 16px; }
.business-record h4 { margin: 0 0 8px; font-size: .95rem; }
@media (max-width: 800px) { .notification-channel-grid { grid-template-columns: 1fr; } .notification-form { padding: 20px; } }
.workflow-module .panel:empty, .workflow-module .card:empty, .workflow-module .toolbar:empty { display: none; }
.workflow-module .list-item > .section-actions { margin-bottom: 8px; }
body:has(dialog[open]) { overflow: hidden; }
dialog { overscroll-behavior: contain; }
/* Dialogs: the heading stays, only the content scrolls (thin scrollbar in the palette, inside the rounded edge),
   and the actions stay visible at the bottom. */
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog > .dialog-heading { flex: 0 0 auto; position: static; margin-bottom: 0; }
dialog > .dialog-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 22px; padding-bottom: 0; scroll-padding-bottom: 110px;
  scrollbar-width: thin; scrollbar-color: #c2cbe9 transparent; scrollbar-gutter: stable; }
dialog > .dialog-body::-webkit-scrollbar { width: 10px; }
dialog > .dialog-body::-webkit-scrollbar-track { background: transparent; }
dialog > .dialog-body::-webkit-scrollbar-thumb { background: #c2cbe9; border-radius: 10px; border: 3px solid #f7f9ff; }
dialog > .dialog-body > .dialog-actions { position: sticky; bottom: 0; z-index: 1; margin-top: 26px; padding: 16px 0 22px; background: #f7f9ff; }
.tracking-pending { border: 1px solid #dec99d; border-radius: 14px; background: #fffaf0; padding: 16px 20px; margin-block: 18px; }
.tracking-pending summary { cursor: pointer; font-weight: 650; color: #725218; }
.tracking-pending ul { padding-left: 22px; margin: 16px 0 0; }
.tracking-pending li { margin-block: 8px; line-height: 1.6; }
.tracking-section > .business-actions { margin-bottom: 22px; }

.workflow-stack { display: grid; gap: 20px; min-width: 0; }
.workflow-stack > .button { justify-self: start; }
.workflow-stack > ul { margin: 0; padding-left: 22px; }
.retention-section { display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--surface); min-width: 0; }
.retention-section h3, .retention-section h4, .retention-section p { margin: 0; }
.retention-danger { border-color: #e1bfc3; background: #fff7f7; }
.retention-danger .button { color: var(--danger); border-color: #bd7479; }
.messaging-form { display: grid; gap: 16px; padding: 20px; margin: 16px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); min-width: 0; max-width: 900px; }
.messaging-form > .field { margin: 0; }
.messaging-form > p { color: var(--muted); max-width: 75ch; margin: 0; }
.messaging-form > button { justify-self: start; }
.messaging-form label:has(input[type="checkbox"]) { display: flex; gap: 10px; align-items: flex-start; }
.messaging-form label input[type="checkbox"] { width: 20px; height: 20px; min-height: 20px; margin: 3px 0 0; flex: 0 0 auto; }
.messaging-record > p { margin: 10px 0; overflow-wrap: anywhere; }
.messaging-record > details { margin: 16px 0; padding: 14px 0; border-top: 1px solid var(--line); }
.messaging-record > details summary { cursor: pointer; min-height: 36px; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) { .messaging-form, .retention-section { padding: 16px; } .messaging-form > button { justify-self: stretch; } }

/* Contracts/designations and technical data reuse the workflow-module vocabulary. */
.workflow-module .section-actions .button[aria-pressed="true"] { background: var(--ink); color: white; border-color: var(--ink); }
.designation-assignments { border: 1px solid #dec99d; border-radius: 14px; background: #fffaf0; padding: 16px 20px; margin-block: 16px; }
.designation-assignments p { margin: 0 0 8px; color: #725218; font-weight: 600; }
.designation-assignments ul { margin: 0 0 12px; padding-left: 22px; }
.workflow-module .list-item > h4, .workflow-module .list-item > .section-heading h5 { overflow-wrap: anywhere; }

/* Written replies of an external collaborator (DOC-127). */
.client-request-reply { white-space: pre-wrap; overflow-wrap: anywhere; }
/* ADR-0056: process map. Each state carries a glyph and a word; colour only reinforces it. */
.process-map, .process-templates, .process-comparison { display: grid; gap: 16px; }
.pm-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.pm-header h2 { margin: 0; }
.pm-note { color: var(--muted); margin: 0; max-width: 78ch; }
.pm-warning { color: var(--warning); font-weight: 600; margin: 0; }
.pm-error { color: var(--danger); margin: 0; }
.pm-error:empty { display: none; }
.pm-field { display: grid; gap: 4px; font-size: .92rem; }
.pm-field > span { color: var(--muted); }
.pm-check { display: flex; gap: 8px; align-items: center; min-height: 28px; }
.pm-form { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.pm-form h4, .pm-plan h4 { margin: 0; }
.pm-form--inline { grid-auto-flow: column; align-items: end; justify-content: start; padding: 0; border: 0; background: none; }
.pm-fieldset { border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 2px; padding: 8px 12px; }
.pm-preview, .pm-empty { display: grid; gap: 10px; padding: 16px 18px; border-left: 4px solid var(--brand); background: var(--tint); border-radius: 10px; }
.pm-empty h3 { margin: 0; }
.pm-summary { display: grid; grid-template-columns: minmax(200px, 270px) minmax(0, 1fr); gap: 18px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.pm-health { display: grid; gap: 4px; align-content: start; padding-left: 14px; border-left: 6px solid var(--muted); color: var(--muted); }
.pm-health strong { font-size: 1.45rem; line-height: 1.15; }
.pm-health-glyph { font-size: 1.05rem; font-weight: 700; }
.pm-health--on_time .pm-health, .pm-health--finished .pm-health { border-color: var(--approved); color: var(--approved); }
.pm-health--at_risk .pm-health { border-color: var(--warning); color: var(--warning); }
.pm-health--late .pm-health, .pm-health--blocked .pm-health { border-color: var(--danger); color: var(--danger); }
.pm-health .pm-note { color: var(--muted); font-size: .88rem; }
.pm-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.pm-facts dt { color: var(--muted); }
.pm-facts dd { margin: 0; }
.pm-advice { grid-column: 1 / -1; }
.pm-advice summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.pm-advice ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.pm-link, .workflow-module button.pm-link { display: inline; background: none; border: 0; border-radius: 0; padding: 2px 0; min-height: 24px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; text-align: left; font: inherit; }
.pm-link:hover { color: var(--ink-hover); }
.pm-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.pm-segment { display: inline-flex; gap: 4px; align-items: center; }
.pm-segment [aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pm-zoom { min-width: 3.5em; text-align: center; color: var(--muted); }
.pm-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.pm-layout--open { grid-template-columns: minmax(0, 1fr) 380px; }
.pm-main { display: grid; gap: 10px; min-width: 0; }
.pm-subheading { margin: 8px 0 0; font-size: 1.05rem; }
.pm-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; display: grid; gap: 8px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pm-panel h3, .pm-panel h4 { margin: 0; }
.pm-panel ul { margin: 0; padding-left: 20px; }
.pm-kind { margin: 0; color: var(--muted); font-size: .85rem; }
.pm-badge { justify-self: start; margin: 0; padding: 2px 10px; border-radius: 999px; border: 1px solid currentColor; font-weight: 600; color: var(--muted); }
.pm-critical-note { margin: 0; font-weight: 600; border-left: 4px solid var(--graphite); padding-left: 8px; }
.pm-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-plan { display: grid; gap: 12px; }
.pm-edges { display: grid; gap: 6px; }
.pm-edges li { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.pm-panel ul.pm-evidence { display: grid; gap: 6px; padding-left: 0; list-style: none; }
.pm-evidence li { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.pm-evidence li > span { flex: 1 1 14rem; min-width: 0; overflow-wrap: anywhere; }
.pm-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--line); border-radius: 14px; background: #ffffffd9; cursor: grab; scrollbar-width: thin; }
.pm-scroll:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pm-diagram { display: block; max-width: none; }
.pm-diagram--fit { display: block; max-width: 100%; height: auto; }
.pm-card--add { fill: #ffffffb0; stroke: var(--brand); stroke-width: 1.5; stroke-dasharray: 6 5; }
.pm-node--add:hover .pm-card--add, .pm-node--add:focus-visible .pm-card--add { fill: var(--tint); stroke-width: 2.5; }
.pm-add-label { font-size: 13px; font-weight: 650; fill: var(--ink); }
.pm-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pm-inline-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.pm-inline-fields[hidden] { display: none; }
.process-map:fullscreen { overflow: auto; padding: 18px 22px; background: var(--paper, #f4f7fb); }
.process-map:fullscreen .pm-scroll { max-height: none; }
.pm-card { fill: #fff; stroke: var(--line); stroke-width: 1.5; }
.pm-rail { fill: var(--muted); }
.pm-node { cursor: pointer; }
.pm-node:focus { outline: none; }
.pm-node:focus-visible .pm-card, .pm-node--selected .pm-card { stroke: var(--brand); stroke-width: 3.5; }
.pm-node--critical .pm-card { stroke: var(--graphite); stroke-width: 3; }
.pm-node--critical.pm-node--selected .pm-card, .pm-node--critical:focus-visible .pm-card { stroke: var(--brand); stroke-width: 4; }
.pm-node--dim { opacity: .35; }
.pm-node--milestone .pm-card, .pm-node--decision .pm-card { fill: var(--lavender); }
.pm-node-status { font-size: 11px; font-weight: 600; fill: var(--muted); }
.pm-node-title { font-size: 13px; font-weight: 650; fill: var(--graphite); }
.pm-node-meta { font-size: 11px; fill: var(--muted); }
.pm-status--completed .pm-rail { fill: var(--approved); }
.pm-status--completed .pm-node-status, .pm-badge.pm-status--completed { fill: var(--approved); color: var(--approved); }
.pm-status--in_progress .pm-rail { fill: var(--ink); }
.pm-status--in_progress .pm-node-status, .pm-badge.pm-status--in_progress { fill: var(--ink); color: var(--ink); }
.pm-status--waiting .pm-rail { fill: var(--warning); }
.pm-status--waiting .pm-node-status, .pm-badge.pm-status--waiting { fill: var(--warning); color: var(--warning); }
.pm-status--blocked .pm-rail { fill: var(--danger); }
.pm-status--blocked .pm-node-status, .pm-badge.pm-status--blocked { fill: var(--danger); color: var(--danger); }
.pm-status--skipped .pm-card, .pm-status--not_applicable .pm-card { fill: #f3f5f7; stroke-dasharray: 5 4; }
.pm-edge { fill: none; stroke: var(--muted); stroke-width: 1.6; }
.pm-edge--optional { stroke-dasharray: 6 5; }
.pm-edge--critical { stroke: var(--graphite); stroke-width: 3; }
.pm-edge--closed { opacity: .35; }
.pm-arrow { fill: var(--muted); }
.pm-edge-label { font-size: 11px; fill: var(--graphite); paint-order: stroke; stroke: #fff; stroke-width: 4px; }
.pm-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; font-size: .85rem; color: var(--muted); }
.pm-legend span::before { content: ""; display: inline-block; width: 18px; height: 8px; margin-right: 6px; border-radius: 2px; vertical-align: middle; }
.pm-list { display: grid; gap: 8px; }
.pm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-step { display: grid; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-left: 6px solid var(--muted); border-radius: 10px; background: #fff; }
.pm-step.pm-status--completed { border-left-color: var(--approved); }
.pm-step.pm-status--in_progress { border-left-color: var(--ink); }
.pm-step.pm-status--waiting { border-left-color: var(--warning); }
.pm-step.pm-status--blocked { border-left-color: var(--danger); }
.pm-step--critical { box-shadow: inset 0 0 0 2px var(--graphite); }
.pm-step--selected { outline: 3px solid var(--brand); outline-offset: 1px; }
.pm-step-button, .workflow-module button.pm-step-button { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; justify-items: start; align-items: start; gap: 2px; width: 100%; min-height: 44px; text-align: left; background: none; border: 0; border-radius: 6px; padding: 4px 0; font: inherit; font-weight: 400; color: inherit; cursor: pointer; }
.pm-step-button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pm-step-status { font-size: .85rem; font-weight: 600; }
.pm-step-meta { font-size: .85rem; color: var(--muted); }
.pm-substeps { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 2px; }
.pm-map-history summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.pm-history ul, .pm-map-history ul { padding-left: 20px; display: grid; gap: 4px; }
.pm-table { width: 100%; border-collapse: collapse; }
.pm-table caption { text-align: left; color: var(--muted); padding-bottom: 6px; }
.pm-table th, .pm-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.pm-template-editor { display: grid; gap: 10px; }
.pm-template-node { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.pm-template-node[open] { display: grid; gap: 8px; }
.pm-template-node summary { cursor: pointer; font-weight: 600; min-height: 24px; }
.pm-edge-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 8px 0; border-bottom: 1px solid var(--line); }
/* ADR-0060: comparison between dossiers. Figures carry their words and glyphs; the bars only repeat the table. */
.process-comparison h2:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.pc-wrap { overflow-x: auto; max-width: 100%; }
.pc-wrap:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.pc-table { min-width: 640px; }
.pc-table .pc-num { text-align: right; font-variant-numeric: tabular-nums; }
.pc-table td, .pc-table th[scope="row"] { font-size: .92rem; }
.pc-element { display: grid; gap: 2px; min-width: 11rem; }
.pc-element-title { font-weight: 600; overflow-wrap: anywhere; }
.pc-element-meta { display: block; color: var(--muted); font-size: .82rem; }
.pc-duration { display: grid; gap: 4px; min-width: 9rem; }
.pc-row--long th[scope="row"] { box-shadow: inset 4px 0 0 var(--warning); padding-left: 14px; }
.pc-bar-track { fill: #e3eaf0; }
.pc-bar-real { fill: var(--graphite); }
.pc-bar-estimate { fill: var(--ink); }
.pm-legend .pc-legend--real::before { background: var(--graphite); }
.pm-legend .pc-legend--estimate::before { width: 3px; height: 14px; background: var(--ink); }
.pc-period-box { display: grid; gap: 6px; }
.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; margin: 0; padding: 14px 0; border-block: 1px solid var(--line); }
.pc-kpi { display: grid; gap: 4px; align-content: start; padding: 4px 18px; border-left: 1px solid var(--line); }
.pc-kpi:first-child { border-left: 0; padding-left: 0; }
.pc-kpi dt { color: var(--muted); font-size: .88rem; }
.pc-kpi dd { margin: 0; display: grid; gap: 2px; }
.pc-kpi strong { font-size: 1.3rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pc-kpi-note { color: var(--muted); font-size: .82rem; }
.pc-section { display: grid; gap: 8px; min-width: 0; }
.pc-section h3 { margin: 0; }
.pc-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; }
.pc-ranking { margin: 0; padding-left: 22px; display: grid; gap: 6px; }
@media (max-width: 760px) {
  .pc-pair { grid-template-columns: minmax(0, 1fr); }
  .pc-kpis { grid-template-columns: minmax(0, 1fr); padding: 6px 0; }
  .pc-kpi, .pc-kpi:first-child { border-left: 0; border-top: 1px solid var(--line); padding: 10px 0; }
  .pc-kpi:first-child { border-top: 0; }
}
@media (max-width: 1100px) { .pm-layout, .pm-layout--open { grid-template-columns: minmax(0, 1fr); } .pm-panel { position: static; max-height: none; } }
@media (max-width: 760px) { .pm-summary { grid-template-columns: minmax(0, 1fr); } .pm-form--inline { grid-auto-flow: row; } .pm-facts { grid-template-columns: minmax(0, 1fr); } .pm-facts dd { margin-bottom: 6px; } }

/* One height for every single-line control (fields, lists and buttons), so a row of mixed controls stays level.
   Date and search inputs no longer grow with their line height; the file picker matches the other fields. */
:root { --control-height: 44px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]), select:not([multiple]) {
  height: var(--control-height); min-height: var(--control-height); padding-top: 0; padding-bottom: 0; line-height: normal; }
.button.small, .workflow-module button.small { min-height: var(--control-height); }
input[type="file"] { height: var(--control-height); min-height: var(--control-height); padding: 5px 6px; line-height: normal; }
input[type="file"]::file-selector-button { height: calc(var(--control-height) - 12px); padding: 0 12px; }
.pm-panel-hint { border: 1px solid var(--line); border-radius: 12px; background: var(--tint); padding: 12px 14px; display: grid; gap: 8px; }
.pm-panel-hint p { margin: 0; }
.pm-action-group { display: grid; gap: 6px; }
.pm-action-title { margin: 0; font-size: .82rem; font-weight: 650; color: var(--muted); }
.pm-fact-edit { font-size: .85rem; white-space: nowrap; }

/* «Visualizar»: a PDF or an image over the page, as large as the screen allows (ADR-0063). */
dialog.preview-dialog { width: min(1100px, calc(100% - 32px)); height: calc(100dvh - 40px); }
dialog.preview-dialog > .dialog-heading { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
dialog.preview-dialog h2 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.preview-body { flex: 1 1 auto; min-height: 0; display: flex; background: #e9edf5; }
.preview-frame { flex: 1 1 auto; width: 100%; height: 100%; border: 0; }
.preview-image { margin: auto; max-width: 100%; max-height: 100%; object-fit: contain; }

/* Contracting clients: linked ones listed with «Quitar», others found by search. */
.contractor-chosen, .contractor-results { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 6px; }
.contractor-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name action" "detail action"; align-items: center; column-gap: 12px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #ffffffb3; }
.contractor-name { grid-area: name; font-weight: 600; overflow-wrap: anywhere; }
.contractor-detail { grid-area: detail; color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.contractor-item > .button { grid-area: action; }
.contractor-hint, .contractor-count { color: var(--muted); font-size: .9rem; margin: 0 0 6px; }
.contractor-heading { margin: 0 0 4px; font-size: .95rem; }

/* «Publicar versión de requisitos»: how blocks combine, what each one asks, and the resulting list. */
.catalog-guide, .catalog-summary { border: 1px solid var(--line); border-radius: 12px; background: var(--tint); padding: 12px 16px; margin: 10px 0 14px; }
.catalog-guide h3, .catalog-summary h3 { margin: 0 0 6px; font-size: .95rem; }
.catalog-guide p, .catalog-summary p { margin: 4px 0; line-height: 1.5; }
.catalog-summary { background: #ffffffb3; }
.alternative-options { border: 0; padding: 0; margin: 8px 0 0; }
.alternative-options > legend { font-weight: 600; font-size: .9rem; margin-bottom: 6px; padding: 0; }
.requirement-meaning { margin: 8px 0; font-weight: 600; color: var(--ink); }
.requirement-meaning--missing { color: var(--warning); }
