@font-face {
  font-family: "Work Sans";
  src: url("brand/WorkSans_Variable_AI.woff") format("woff");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --page: #f7f8fb;
  --white: #ffffff;
  --ink: #232d60;
  --heading: #393939;
  --muted: #596172;
  --line: #d5dbea;
  --brand: #232d60;
  --brand-dark: #1b234b;
  --brand-soft: #edf1fa;
  --input: #fff3dc;
  --accent: #e84e0e;
  --nav: #232d60;
  --focus: #e84e0e;
  --danger: #982d28;
  --warning: #725011;
  --radius: 10px;
  font-family: "Work Sans", "Segoe UI", Arial, sans-serif;
  font-weight: 400;
  background: var(--page);
  color: var(--ink);
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, label:focus-within.file-button { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.8rem,3vw,2.55rem); line-height: 1.12; letter-spacing: -.03em; font-weight: 400; }
h2 { font-size: 1.08rem; font-weight: 400; letter-spacing: -.015em; }
h3 { font-size: .94rem; font-weight: 400; }
p { line-height: 1.5; }
.topbar { display: flex; gap: 16px; align-items: center; justify-content: space-between; min-height: 84px; padding: 14px 26px; color: var(--ink); background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-name { font-size: 1.18rem; font-weight: 400; line-height: 1.05; letter-spacing: -.03em; }
.brand-sub { margin-top: 4px; font-size: .73rem; color: var(--muted); }
.top-right, .role-picker { display: flex; align-items: center; gap: 12px; }
.role-picker { color: var(--muted); font-size: .83rem; }
.role-picker select { max-width: 220px; padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--white); }
.test-pill { color: var(--ink); background: var(--brand-soft); border-radius: 100px; padding: 5px 9px; font-size: .75rem; white-space: nowrap; }
.frame { display: grid; grid-template-columns: 192px minmax(0, 1fr); min-height: calc(100vh - 84px); }
.sidebar { display: flex; flex-direction: column; gap: 18px; justify-content: space-between; padding: 25px 13px 18px; background: var(--white); border-right: 1px solid var(--line); }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; align-items: center; gap: 10px; min-height: 42px; width: 100%; padding: 7px 10px; text-align: left; color: var(--muted); background: transparent; border: 0; border-radius: 8px; white-space: nowrap; }
.nav-item:hover, .nav-item.active { color: var(--brand-dark); background: var(--brand-soft); }
.nav-item.active { font-weight: 400; }
.nav-mark { width: 19px; text-align: center; font-size: 1rem; }
.side-foot { display: flex; align-items: flex-start; gap: 7px; padding: 10px 4px; color: var(--muted); font-size: .78rem; }
.side-foot small { display: block; font-size: .72rem; padding-top: 4px; }
.connection-dot { background: var(--brand); width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; flex-shrink: 0; }
main { width: min(100%,1540px); margin-inline: auto; padding: 32px clamp(16px,3vw,46px) 50px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.eyebrow { color: var(--brand-dark); font-size: .77rem; margin-bottom: 7px; font-weight: 400; }
.page-heading p:not(.eyebrow), .phase-summary p:not(.eyebrow) { color: var(--muted); margin-top: 8px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-weight: 400; font-size: .88rem; text-decoration: none; line-height: 1.3; white-space: nowrap; }
.button:hover { border-color: var(--brand); background: var(--brand-soft); }
.button.primary { color: #fff; background: var(--brand); border-color: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.selected { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-dark); }
.button.danger { color: var(--danger); }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 20px; }
.stat { display: grid; text-align: left; gap: 7px; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: var(--white); color: var(--ink); }
.stat:hover { border-color: var(--brand); }
.stat>span:first-child { color: var(--muted); font-size: .87rem; }
.stat-number { font-size: 2rem; line-height: 1.05; letter-spacing: -.04em; font-weight: 400; }
small { color: var(--muted); }
.panel { padding: 17px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel > h2 { margin-bottom: 14px; }
.list-panel { padding: 0; overflow: hidden; }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters input { min-width: 165px; }
.filters input,.filters select,.field input,.field select,.field textarea { max-width: 100%; padding: 9px 10px; min-height: 39px; border: 1px solid var(--line); border-radius: 7px; background: var(--white); color: var(--ink); font-size: .88rem; }
.field input:not([type="checkbox"]),.field select,.field textarea { background: var(--input); }
.field input:disabled,.field input[readonly],.field select:disabled,.field textarea:disabled,.field textarea[readonly] { color: var(--muted); background: var(--brand-soft); }
.field textarea { resize: vertical; min-height: 75px; }
.project-table-head, .project-row { display: grid; grid-template-columns: minmax(130px,1.6fr) minmax(105px,1fr) minmax(98px,.8fr) 18px; gap: 13px; align-items: center; padding: 12px 18px; }
.project-table-head { color: var(--white); font-size: .79rem; background: var(--brand); border-block: 1px solid var(--line); }
.project-row { color: var(--ink); text-align: left; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--white); min-height: 68px; }
.project-row:last-child { border-bottom: 0; }
.project-row:hover { background: var(--brand-soft); }
.project-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.project-cell>span:nth-child(2) { min-width: 0; }
.row-title { display: block; overflow-wrap: anywhere; font-weight: 400; }
.project-cell small { display: block; margin-top: 4px; font-size: .75rem; }
.folder-icon { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 7px; background: var(--brand-soft); color: var(--brand-dark); }
.client-cell { color: var(--muted); overflow-wrap: anywhere; font-size: .87rem; }
.row-arrow { text-align: right; color: var(--muted); font-size: 1.2rem; }
.pill { display: inline-flex; width: fit-content; min-height: 24px; align-items: center; padding: 3px 9px; border-radius: 100px; color: var(--brand); background: var(--brand-soft); font-size: .75rem; line-height: 1.2; }
.pill.ok { color: var(--brand); background: var(--brand-soft); }
.pill.wait { color: var(--warning); background: var(--input); }
.empty { padding: 22px 17px; text-align: center; color: var(--muted); }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: .81rem; color: var(--muted); margin-bottom: 14px; }
.link-button { color: var(--brand-dark); text-align: left; padding: 0; border: 0; background: none; font-size: .85rem; overflow-wrap: anywhere; }
.link-button:hover { text-decoration: underline; }
.detail-heading { margin-bottom: 16px; }
.steps { display: flex; overflow-x: auto; border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 6px; gap: 4px; }
.step { display: flex; align-items: center; flex: 1 0 auto; justify-content: center; gap: 7px; padding: 8px 6px; min-height: 45px; border: 0; border-radius: 7px; color: var(--muted); background: none; white-space: nowrap; font-size: .79rem; }
.step:hover,.step.selected { background: var(--brand-soft); color: var(--brand-dark); }
.step-number { display: grid; place-items: center; min-width: 22px; min-height: 22px; border-radius: 50%; background: var(--brand-soft); font-size: .75rem; }
.step.complete .step-number { background: var(--brand-soft); color: var(--brand); }
.step.selected .step-number { background: var(--brand); color: #fff; }
.phase-summary { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 0 13px; }
.phase-summary h2 { font-size: 1.42rem; }
.owner-chip { color: var(--muted); font-size: .8rem; border: 1px solid var(--line); border-radius: 100px; padding: 5px 8px; background: var(--white); }
.tabs { display: flex; gap: 8px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs button { min-height: 42px; padding: 8px 10px; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.selected { color: var(--brand); border-bottom-color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px, 240px); gap: 12px; align-items: start; }
.detail-grid.single { grid-template-columns: minmax(0,1fr); }
.detail-content { display: grid; gap: 12px; min-width: 0; }
.fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; align-items: start; }
.field { display:grid; grid-template-columns:minmax(0,1fr); gap:6px; min-width:0; }
.fields > *, .field > *, .audit-label { min-inline-size:0; }
.field input:not([type="checkbox"]),.field select,.field textarea { box-sizing:border-box; width:100%; min-width:0; }
.field label { overflow-wrap:anywhere; }
.chapter > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; background:var(--brand-soft); border-radius:6px; cursor:pointer; list-style:none; }
.chapter > summary h2 { margin:0; font-size:1rem; }
.chapter > summary::-webkit-details-marker { display:none; }
.chapter > summary::after { content:""; width:8px; height:8px; border:solid currentColor; border-width:0 1.5px 1.5px 0; transform:rotate(-45deg); margin-right:4px; }
.chapter[open] > summary { margin-bottom:14px; }
.chapter[open] > summary::after { transform:rotate(45deg); }
.chapter > summary:focus-visible { outline:2px solid var(--brand); outline-offset:3px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: .83rem; color: var(--ink); }
.field-required { color: var(--danger); }
.check-field { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; line-height: 1.45; min-height: 35px; padding: 5px 0; }
.check-field input { accent-color: var(--brand); width: 17px; height: 17px; flex-shrink: 0; margin: 2px 0 0; }
.handoff { position: sticky; top: 13px; }
.handoff .button { width: 100%; margin-top: 9px; }
.next-phase { margin: 3px 0 8px; font-size: .95rem; }
.muted { color: var(--muted); font-size: .84rem; }
.requirements { color: var(--muted); margin: 8px 0; padding-left: 17px; font-size: .82rem; }
.requirements li { margin: 4px 0; overflow-wrap: anywhere; }
.ok-text { color: var(--brand); font-size: .85rem; }
.error-text { color: var(--danger); font-size: .84rem; margin: 7px 0; }
.tasks, .asset-list, .history, .signature-list { display: grid; }
.task, .history>div, .signature-list>div { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.task:last-child,.history>div:last-child,.signature-list>div:last-child { border-bottom: 0; }
.task small { display: block; margin-top: 4px; }
.asset-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.asset-heading { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; margin-bottom: 8px; }
.attachment-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.attachment { border: 1px solid var(--line); border-radius: 9px; padding: 12px; min-width: 0; }
.attached-files { margin: 8px 0; }
.file-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.upload-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.file-button { position: relative; cursor: pointer; overflow: hidden; }
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); max-width: min(690px,calc(100vw - 24px)); width: 100%; max-height: calc(100vh - 32px); padding: 18px; color: var(--ink); box-shadow: 0 12px 48px #232d6026; }
dialog::backdrop { background: #232d6080; }
.modal-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 15px; }
.modal-heading h2 { font-size: 1.25rem; }
.icon-button { border: 1px solid var(--line); background: var(--brand-soft); border-radius: 8px; width: 38px; height: 38px; font-size: 1.25rem; }
.toast { position: fixed; bottom: 16px; right: 16px; z-index: 5; background: var(--nav); color: #fff; border-radius: 8px; padding: 12px 15px; max-width: min(460px,calc(100vw - 32px)); box-shadow: 0 6px 20px #232d6026; }
.report dl { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.report dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.report dt { color: var(--muted); }
.login-page { width: min(100%, 530px); margin: 7vh auto 0; padding: 18px; }
.login-panel { padding: clamp(18px, 5vw, 30px); }
.login-panel .brand { margin-bottom: 24px; align-items: flex-start; flex-direction: column; gap: 24px; }
.login-panel form { margin-block: 13px; }
.login-links { display: flex; flex-wrap: wrap; gap: 9px 16px; margin-top: 18px; }
.login-links a, .log-link { color: var(--brand-dark); }
.log-link { text-decoration: none; }
.password-login { padding-top: 11px; }
.password-login summary { cursor: pointer; color: var(--brand-dark); }
.top-action { min-height: 36px; background: var(--white); color: var(--ink); border-color: var(--line); }
.top-action:hover { background: var(--brand-soft); border-color: var(--brand); }
.account-role { font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.signature-list small, .access-row small { display: block; overflow-wrap: anywhere; }
.side-foot span { overflow-wrap: anywhere; }
@media (max-width: 950px) {
  .frame { grid-template-columns: 147px minmax(0,1fr); }
  .detail-grid { grid-template-columns: minmax(0,1fr); }
  .handoff { position: static; }
  .handoff .button { width: auto; }
  .stats { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 620px) {
  .topbar { padding: 9px 12px; gap: 8px; flex-wrap: wrap; }
  .top-right { gap: 5px; flex-wrap: wrap; }
  .role-picker span, .brand-sub { display: none; }
  .role-picker select { max-width: 145px; font-size: .75rem; }
  .test-pill { font-size: .68rem; padding: 4px 6px; }
  .frame { display: block; }
  .sidebar { padding: 4px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-nav { display: flex; gap: 2px; flex-wrap: wrap; }
  .nav-item { width: auto; padding-inline: 8px; gap: 5px; font-size: .81rem; }
  .nav-mark { width: 14px; }
  .side-foot { display: none; }
  main { padding: 18px 11px 32px; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 15px; gap: 8px; }
  .page-heading p:not(.eyebrow) { margin-top: 5px; }
  .stats { gap: 7px; margin-bottom: 11px; }
  .stat { padding: 10px; }
  .stat-number { font-size: 1.55rem; }
  .list-bar { align-items: flex-start; flex-direction: column; gap: 8px; padding: 11px; }
  .filters { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
  .filters input { min-width: 0; }
  .project-table-head,.project-row { grid-template-columns: minmax(105px,1fr) auto 9px; gap: 6px; padding-inline: 9px; }
  .project-table-head>span:nth-child(2),.client-cell { display: none; }
  .folder-icon { display: none; }
  .phase-summary { align-items: flex-start; flex-direction: column; }
  .fields,.attachment-grid { grid-template-columns: minmax(0,1fr); }
  .field,.field input,.field select,.field textarea { min-inline-size: 0; max-inline-size: 100%; }
  .field input,.field select,.field textarea,.filters input,.filters select,.role-picker select { font-size: 16px; }
  .steps,.tabs { flex-wrap: wrap; }
  .step { flex: 0 1 auto; white-space: normal; }
  .access-row { align-items: flex-start; flex-wrap: wrap; }
  .panel:not(.list-panel) { padding: 12px; }
  .asset-heading { flex-wrap: wrap; }
  .button,.nav-item,.tabs button,.role-picker select { min-height: 44px; }
}
.save-bar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:0 0 16px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius); background:#fff; }
.save-bar p { margin:0 0 5px; color:var(--brand-dark); font-size:.9rem; }
.save-bar small { display:block; color:var(--muted); max-width:60ch; }
.save-bar .button-row { margin:0; }
[hidden] { display:none !important; }
dialog.status-dialog { max-width:min(1100px,calc(100vw - 24px)); }
.status-toolbar { position:sticky; top:-18px; z-index:1; background:#fff; padding:10px 0; }
.status-table { width:100%; border-collapse:collapse; table-layout:fixed; margin:12px 0 20px; font-size:.82rem; }
.status-table th,.status-table td { padding:9px; border:1px solid var(--line); text-align:left; vertical-align:top; overflow-wrap:anywhere; white-space:pre-wrap; }
.status-table th { background:var(--brand); color:var(--white); }
.status-table th:last-child { width:25%; }
.status-table .state-missing td:last-child { color:var(--danger); }
.status-table .state-present td:last-child { color:var(--brand); }
.status-section { margin-top:24px; }
.status-section h3 { margin-bottom:10px; }
.dossier-status h4 { margin:18px 0 8px; }
.status-note { padding:10px; border-left:3px solid var(--brand); background:var(--brand-soft); }
.conflict-item { padding:14px 0; border-top:1px solid var(--line); }
.conflict-item pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:220px; overflow:auto; background:var(--brand-soft); padding:10px; }
@media (max-width:620px) {
  .save-bar { padding:12px; }
  .save-bar .button-row { width:100%; }
  .status-table { font-size:.76rem; }
  .status-table th,.status-table td { padding:6px; }
}
@media print {
  @page { size:A4; margin:14mm; }
  html,body { height:auto!important; overflow:visible!important; background:#fff; }
  #app, #feedback, dialog .modal-heading, dialog .button-row { display: none !important; }
  dialog[open],dialog.status-dialog { position: static; display: block; max-width: none; max-height: none; height:auto; overflow:visible; border: 0; box-shadow: none; width: auto; margin:0; padding:0; }
  dialog:not([open]) { display:none!important; }
  dialog::backdrop { background: #fff; }
  .report { color: #000; }
  .status-table { font-size:9pt; }
  .status-table th,.status-table td { padding:5px; color:#000!important; }
  .status-table th { background:var(--brand-soft); }
  .status-table thead { display:table-header-group; }
  .status-table tr { break-inside:avoid; }
  .dossier-status h2,.dossier-status h3,.dossier-status h4 { break-after:avoid; }
  .status-note { background:#fff; }
}
/* R0.4 private attachment previews */
.project-list-item { border-bottom:1px solid var(--line); }
.project-list-item .project-row { border-bottom:0; }
.media-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(145px,1fr)); gap:12px; margin:10px 0; }
.media-card { min-width:0; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; break-inside:avoid; }
.media-open { display:block; width:100%; border:0; background:#fff; padding:0 0 10px; text-align:left; cursor:pointer; color:var(--ink); }
.media-open:hover { background:var(--brand-soft); }
.media-open:focus-visible { outline:3px solid var(--brand); outline-offset:-3px; }
.media-thumb { display:flex; align-items:center; justify-content:center; aspect-ratio:1.48; background:var(--brand-soft); border-bottom:1px solid var(--line); overflow:hidden; }
.thumbnail-image { display:block; width:100%; height:100%; object-fit:contain; }
.media-placeholder { display:flex; flex-direction:column; gap:8px; align-items:center; color:var(--muted); font-size:1rem; }
.media-placeholder small { font-size:.7rem; }
.media-name { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; margin:9px 10px 4px; line-height:1.35; font-size:.84rem; }
.media-kind { display:block; margin:0 10px; color:var(--muted); font-size:.72rem; }
.media-remove { margin:0 10px 8px; min-height:36px; font-size:.78rem; }
.media-compact { display:flex; overflow-x:auto; padding:0 2px 8px; gap:9px; }
.media-compact .media-card { flex:0 0 124px; }
.media-compact .media-name { font-size:.72rem; }
.project-list-item>.media-compact { margin:0 16px 12px 54px; }
.file-viewer[open] { display:flex; flex-direction:column; width:1100px; max-width:calc(100vw - 24px); height:calc(100dvh - 32px); max-height:1000px; padding:18px; overflow:hidden; }
.viewer-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.viewer-heading>div { min-width:0; }
.viewer-heading h2 { font-size:1.05rem; margin:0 0 4px; overflow-wrap:anywhere; }
.viewer-heading p { font-size:.78rem; margin:0; }
.viewer-heading .button { flex-shrink:0; }
.viewer-status { font-size:.83rem; margin:8px 0; }
.viewer-status:empty { display:none; }
.viewer-toolbar,.viewer-zoom,.viewer-pages { display:flex; flex-wrap:wrap; align-items:center; gap:6px; }
.viewer-toolbar { margin:12px 0; justify-content:space-between; }
.viewer-toolbar .button,.viewer-heading .button { min-width:44px; min-height:44px; padding:7px 11px; font-size:.8rem; }
.viewer-scale,.viewer-page-label { font-size:.8rem; min-width:45px; text-align:center; }
.viewer-stage { flex:1; min-height:180px; overflow:auto; background:var(--brand-soft); border:1px solid var(--line); border-radius:8px; padding:16px; text-align:center; overscroll-behavior:contain; }
.viewer-stage>img,.viewer-stage>canvas { display:block; max-width:none; margin:auto; background:#fff; box-shadow:0 2px 10px #0002; }
.viewer-hint { font-size:.76rem; line-height:1.4; margin:10px 0 0; }
.document-preview { background:#fff; min-height:100%; padding:24px; text-align:left; font-size:.9rem; }
.document-preview p { white-space:pre-wrap; overflow-wrap:anywhere; }
.document-preview table { border-collapse:collapse; font-size:.8rem; }
.document-preview td { border:1px solid var(--line); padding:6px; min-width:70px; white-space:pre-wrap; }
@media(max-width:620px) {
  .project-list-item>.media-compact { margin-left:9px; margin-right:9px; }
  .file-viewer[open] { max-width:100vw; width:100%; height:100dvh; max-height:100dvh; margin:0; border-radius:0; padding:12px; }
  .viewer-heading h2 { font-size:.9rem; }
  .viewer-toolbar { gap:10px; margin:10px 0; }
  .viewer-hint { font-size:.7rem; }
  .document-preview { padding:12px; }
}
@media print {
  #file-viewer { display:none!important; }
  .media-grid { grid-template-columns:repeat(4,1fr); }
  .media-card { break-inside:avoid; }
  .media-kind,.media-remove { display:none; }
  .media-name { display:block; font-size:8pt; }
}

/* R0.5 Insaver identity. The supplied logo is displayed without alteration. */
h1,h2,h3,h4 { color:var(--heading); }
b,strong,th,h4 { font-weight:400; }
a:focus-visible,summary:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
.insaver-logo { display:block; width:168px; height:auto; flex-shrink:0; }
.brand-wordmark { padding-left:16px; border-left:1px solid var(--line); }
.page-heading h1::after,.login-panel h1::after { content:""; display:block; width:64px; height:2px; background:var(--accent); margin-top:12px; }
.login-panel .insaver-logo { width:184px; }
.login-panel .brand p { margin-top:10px; line-height:1.6; }
.login-panel .button.primary { min-width:132px; }
.login-page > .panel + .panel { margin-top:16px; }
.logbook-page { width:min(100%,800px); }
.logbook-page .insaver-logo { margin-bottom:26px; }
.logbook-page li { margin:10px 0; line-height:1.55; }
.panel > h2 { padding:10px 12px; background:var(--brand-soft); border-radius:6px; }
.login-panel > h2 { padding:0; background:none; }
.report-logo { width:156px; margin-bottom:20px; }
.report h2,.dossier-status > h2 { margin-bottom:10px; }
.status-section > h3 { padding:10px 12px; background:var(--brand-soft); border-left:2px solid var(--accent); }
@media(max-width:620px) {
  .topbar { min-height:78px; padding:14px 12px; gap:14px; }
  .topbar .insaver-logo { width:132px; }
  .brand { gap:14px; }
  .brand-wordmark { padding-left:14px; }
  .top-right { width:100%; gap:8px; }
  .account-role { flex:1 1 auto; }
  .login-page { margin-top:3vh; }
  .login-panel .insaver-logo { width:170px; }
  .login-panel .brand { gap:22px; }
  .login-panel.panel { padding:24px 20px; }
  .login-links { gap:14px; }
  .login-links a { padding-block:4px; }
}
@media print {
  .report-logo { width:42mm; margin-bottom:6mm; }
  .status-section > h3 { padding:5px 8px; }
  .status-table th { background:var(--brand-soft); }
}

.dossier-group { min-width:0; margin:16px 0; padding:12px 14px 16px; border:1px solid var(--line); border-radius:var(--radius); }
.dossier-group legend { padding:0 6px; color:var(--brand-dark); font-weight:600; }
.dossier-group > p { margin:0 0 12px; }
.dossier-group small { color:var(--muted); }
.dossier-details { margin:0 0 16px; padding:12px 16px; background:white; border:1px solid var(--line); border-radius:var(--radius); }
.dossier-details summary { cursor:pointer; font-weight:600; }
.dossier-details .fields { margin-top:12px; }
.dossier-details section { min-width:0; }
.dossier-details dl { margin:0; }
.dossier-details dl div { padding:4px 0; }
.dossier-details dt { color:var(--muted); font-size:.85em; }
.dossier-details dd { margin:0; overflow-wrap:anywhere; }

#member-form [hidden] { display: none; }

.audit-label { display:flex; align-items:baseline; gap:.4rem; min-width:0; }
.audit-label > label, .audit-label > h3, .audit-label > dt { min-width:0; }
.audit-trigger { width:1.35rem; height:1.35rem; padding:0; border:1px solid #b6c1d8; border-radius:50%; background:#fff; color:#354675; font:inherit; font-size:.78rem; line-height:1; cursor:pointer; flex:none; }
.audit-trigger:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
.audit-info { max-height:13rem; overflow:auto; padding:.45rem .6rem; background:var(--pale,#edf1fa); border-radius:5px; font-size:.78rem; overflow-wrap:anywhere; }
.audit-info p { margin:.2em 0; }
@media print { .audit-trigger, .audit-info { display:none!important; } }

.phase-rights{margin:1rem 0;border:1px solid var(--line);border-radius:7px;padding:.75rem 1rem}.phase-rights legend{padding:0 .4rem}.phase-rights div{display:grid;grid-template-columns:minmax(7em,1fr) minmax(6em,1fr);align-items:center;gap:.75rem;padding:.25rem 0}.phase-rights input{width:auto}.phase-rights label{display:flex;gap:.5rem;align-items:center}

.menu-toggle{background:var(--white);color:var(--navy,#232d60);border:1px solid var(--line);border-radius:6px;padding:.45rem .6rem;font-size:1rem;cursor:pointer}.frame.menu-collapsed{grid-template-columns:minmax(0,1fr)}.sidebar[hidden]{display:none}@media print{.menu-toggle{display:none}}

.account-access{min-width:0;margin:0;padding:0;border:0}
