/* The alteration record: header, tabs, documents, file page, log. Tokens live in style.css. */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.button .icon, button .icon { margin-right: 6px; }
.secondary-button, .button.secondary-button { background: #fff; color: var(--text); border: 1px solid #cfd6dc; }
.secondary-button:hover, .button.secondary-button:hover { background: var(--surface); color: var(--text); }
/* Private uploads are rare, so their button and panel are marked red (Charles, 2026-09-30). */
.upload-panel.is-private { border-color: #e2b4b4; background: #fffafa; }
.upload-panel.is-private h2, .upload-panel.is-private .private-upload { color: var(--danger); }
.danger-button { background: var(--danger); }
.danger-button:hover { background: #8a2424; }
/* Destructive actions read as red text. The menu selectors outrank .menu > summary and its hover and open states. */
.danger-text, .menu > summary.danger-text { min-height: 40px; padding: 6px; border: 0; background: transparent; color: var(--danger); font-weight: 600; }
.danger-text:hover, .menu > summary.danger-text:hover, .menu[open] > summary.danger-text { background: transparent; color: #8a2424; text-decoration: underline; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.quiet-line, .panel-note, .empty-note { color: var(--secondary); font-size: 13px; }
.quiet-line { display: flex; align-items: center; gap: 6px; margin: 12px 0; }
.section-label, .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--secondary); margin: 0 0 6px; }
.app-nav { display: flex; align-self: stretch; }
.app-nav a { display: inline-flex; align-items: center; padding: 0 12px; color: #dbe5ec; font-weight: 600; border-bottom: 2px solid transparent; }
.app-nav a:hover { color: #fff; text-decoration: none; }
.app-nav a[aria-current] { color: #fff; border-bottom-color: #e3bd68; }
.menu { position: relative; display: inline-block; }
.menu > summary { display: inline-flex; align-items: center; gap: 6px; width: auto; min-height: 36px; padding: 6px 10px; margin: 0; border: 0; border-radius: 8px; background: transparent; color: var(--secondary); font-weight: 600; }
.menu > summary::after { content: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--surface); }
.menu[open] > summary { margin-bottom: 0; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: max-content; min-width: 220px; max-width: min(380px, calc(100vw - 32px)); padding: 8px; background: #fff; color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px #19283424; font-weight: 400; }
.menu-panel > a, .menu-item { display: flex; width: 100%; min-height: 36px; align-items: center; justify-content: flex-start; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: var(--text); font-weight: 500; text-align: left; }
.menu-panel > a:hover, .menu-item:hover { background: var(--surface); color: var(--text); text-decoration: none; }
.menu-panel form { margin: 0; }
.menu-title { font-weight: 600; }
.menu-note { color: var(--secondary); font-size: 13px; margin: 4px 0 10px; }
.account-menu { margin-left: auto; }
.account-menu > summary { color: #fff; }
.account-menu > summary:hover, .account-menu[open] > summary { background: #ffffff1a; }
.breadcrumb { display: flex; gap: 6px; font-size: 13px; color: var(--secondary); margin-bottom: 6px; }
.breadcrumb a { color: var(--secondary); }
.case-header { padding-bottom: 16px; }
.case-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.case-title-row h1 { font-size: 26px; line-height: 1.2; }
/* The owner, the representative and the address, shown only; they are set in Settings (2026-10-22). */
.case-record-line { margin: 2px 0 0; color: var(--secondary); overflow-wrap: anywhere; }
/* The actions keep their width and the title wraps instead, so "Public link" never folds letter by letter
   in a narrow window or beside the Ask AI panel. */
.case-actions { display: flex; flex: none; gap: 8px; align-items: center; }
.case-actions .menu > summary { border: 1px solid #cfd6dc; background: #fff; color: var(--text); padding: 8px 14px; min-height: 40px; white-space: nowrap; }
.share-panel { width: 380px; }
.share-panel .share-row { margin: 8px 0; }
/* The link, its code and the owner's page first; the rarer actions as quiet folded rows (Maxi, October 20). */
.share-panel .menu-note { margin-bottom: 0; }
.share-actions a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.share-actions .icon { width: 14px; height: 14px; }
.share-more { border-top: 1px solid var(--border); }
.share-more:first-of-type { margin-top: 6px; }
.share-more > summary { position: relative; display: block; padding: 10px 20px 10px 0; cursor: pointer; color: var(--secondary); font-size: 13px; font-weight: 500; list-style: none; }
.share-more > summary::-webkit-details-marker { display: none; }
/* The portal's own chevron (style.css summary::after) marks each folded row, placed at the row's right edge. */
.share-panel .share-more > summary::after { right: 2px; }
.share-more > summary:hover { color: var(--text); }
.replace-link { display: grid; gap: 8px; padding-bottom: 12px; }
.share-panel .replace-link .check-label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 400; }
.share-panel .replace-link .check-label input { margin: 0; }
.replace-link .danger-text { justify-self: start; }
.stage-block { margin-top: 16px; }
.stage-block-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.stage-block-head .field-label { margin: 0; }
.stage-menu > summary { color: var(--blue); font-size: 13px; min-height: 30px; padding: 4px 8px; }
.stage-menu .menu-panel { width: 300px; }
.stage-steps { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0; padding: 0; }
.stage-steps li { font-size: 13px; color: var(--muted); line-height: 1.3; }
.step-bar { display: block; height: 5px; border-radius: 3px; background: #dfe4e8; margin-bottom: 6px; }
.stage-steps .is-past { color: var(--secondary); }
.stage-steps .is-past .step-bar { background: #b9cbd9; }
.stage-steps .is-current { color: var(--text); font-weight: 600; }
.stage-steps .is-current .step-bar { background: var(--blue); }
.stage-compact { display: none; }
.case-status { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); }
.case-status .field-label { font-size: 13px; margin: 0; }
.status-next { flex: 1; min-width: 200px; }
.ball-pill { display: inline-block; margin-top: 2px; padding: 1px 10px; border-radius: 999px; background: var(--info-bg); color: var(--info); font-weight: 600; font-size: 13px; }
.ball-pill.is-empty { background: var(--surface); color: var(--secondary); }
.status-edit { font-size: 13px; font-weight: 600; }
/* Management's typed Waiting on or Next action (SOL-143): a quiet tag, and Clear beside Edit. */
.status-by-hand { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--secondary); font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.status-clear { display: inline; margin: 0; }
.status-clear .text-button { font-size: 13px; font-weight: 600; }
.visibility { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.visibility[data-visibility="shared"] { color: var(--success); }
.visibility[data-visibility="internal"] { color: var(--secondary); }
.visibility[data-visibility="restricted"] { color: var(--danger); }
.visibility[data-visibility="private"] { color: var(--secondary); }
.case-tabs { position: sticky; top: var(--header-height); z-index: 20; display: flex; align-items: center; gap: 24px; margin: 0 calc(-1 * var(--gutter, 16px)) 20px; padding: 0 var(--gutter, 16px); background: #fff; border-bottom: 1px solid var(--border); overflow-x: auto; }
.case-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 12px 0; color: var(--secondary); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.case-tabs a:hover { color: var(--text); text-decoration: none; }
.case-tabs a[aria-current] { color: var(--text); border-bottom-color: var(--blue); }
.tab-count { background: var(--surface); color: var(--secondary); border-radius: 6px; padding: 0 6px; font-size: 13px; }
.tabs-context { display: none; color: var(--secondary); font-size: 13px; white-space: nowrap; }
.case-tabs.is-stuck .tabs-context { display: inline; }
/* Access and uploads first, then the notes and decisions (Zoe, 2026-11-09). */
.log-notes .log-entries p { max-width: 90ch; }
.log-tab .access-log { margin: 0 0 32px; }
.composer > summary { min-height: 42px; padding: 9px 12px; border: 1px solid #cfd6dc; border-radius: var(--radius); background: #fff; color: var(--muted); font-weight: 400; }
.composer > summary::after { content: none; }
.composer[open] > summary { display: none; }
.composer > form { margin-top: 0; padding: 14px; border: 1px solid #cfd6dc; border-radius: var(--radius); }
.log-pinned { display: flex; gap: 10px; align-items: center; margin: 16px 0 6px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); }
.log-pinned span { flex: 1; }
.log-change { position: relative; }
.log-change > summary { min-height: 0; padding: 0 2px; color: var(--blue); font-size: 13px; font-weight: 600; }
.log-change .menu-panel { right: 0; left: auto; width: 320px; white-space: normal; }
.log-meta abbr { text-decoration: none; cursor: help; }
.log-pinned time, .log-meta { color: var(--muted); font-size: 13px; white-space: nowrap; }
.log-pinned time { color: var(--secondary); } /* on the pinned line's grey, muted text is 4.40:1, under AA */
.log-entries { list-style: none; margin: 0; padding: 0; }
.log-entries li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 12px 0; border-top: 1px solid var(--border); }
.log-entries .icon { color: var(--muted); margin-top: 2px; }
.log-sub { color: var(--secondary); font-size: 13px; margin-top: 2px; }
/* Documents: a filter bar, then one table whose row groups are the submissions. It uses the full content width. */
.documents-toolbar { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 12px; }
.documents-toolbar > .menu { margin-left: auto; }
.documents-filters { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; margin: 0; }
.documents-filters label { margin: 0; font-weight: 400; }
.documents-filters input, .documents-filters select { margin: 0; min-height: 36px; padding-top: 6px; padding-bottom: 6px; font-size: 14px; }
/* A select is as wide as its longest option, and some submission labels are long. */
.documents-filters select { width: auto; max-width: 220px; }
.documents-filters button { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.documents-search { position: relative; flex: 1 1 220px; min-width: 180px; }
.documents-search .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.documents-search input { padding-left: 34px; }
.documents-search input::placeholder { color: var(--muted); } /* it stands in for the hidden label, so it meets 4.5:1 */
.documents-summary { margin: -4px 0 12px; font-size: 13px; color: var(--secondary); }
/* Fixed layout: the name column takes what the other three leave, and long names end in an ellipsis. */
.doc-table { table-layout: fixed; }
/* Wide enough for "alteration agreement" with its AI label on one line (Maxi's review, 2026-11-16). */
.doc-col-type { width: 212px; }
/* Wide enough for "RRA project team · Architect" and "Oct 16, 2025, 10:00 AM" without cutting them. */
.doc-col-from { width: 250px; }
.doc-col-received { width: 190px; }
.doc-col-date { width: 150px; }
.doc-table th, .doc-table td { padding: 8px 12px; }
.doc-table thead th { font-size: 13px; color: var(--secondary); }
.doc-table thead th:first-child, .doc-table .doc-name { padding-left: 24px; }
/* The type opens its own small menu to change it. */
/* Saving a type returns to its row, clear of the sticky header and its tabs. */
.doc-file { scroll-margin-top: calc(var(--header-height, 64px) + 64px); }
/* Inline, so a two-word type wraps like text and the pencil follows its last word. */
.type-menu > summary { display: inline; min-height: 0; padding: 2px 4px; margin-left: -4px; color: var(--text); font-weight: 400; line-height: 1.5; }
.type-menu > summary .icon { width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; color: var(--muted); }
.type-menu .menu-panel { left: 0; right: auto; width: 280px; }
.menu-list { max-height: 240px; overflow: auto; margin: 6px 0; padding-left: 18px; font-size: 13px; overflow-wrap: anywhere; }
.doc-file > td { height: 44px; color: var(--secondary); overflow-wrap: anywhere; }
/* One line each on wide screens; on phones the muted line under the name shows them in full. */
.doc-from, .doc-received { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-name { font-size: 15px; }
.doc-name-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.doc-name-line .icon { color: var(--muted); }
.doc-name-line a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.new-pill { flex: none; padding: 0 7px; border-radius: 999px; background: var(--info); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.6; }
.reader-banner { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--info-bg); color: var(--info); font-size: 13px; }
.reader-banner.is-failed { background: var(--danger-bg); color: var(--danger); }
.reader-banner > .text-button, .reader-banner > a { margin-left: auto; }
.upload-panel { margin: 8px 0 16px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); }
.upload-panel h2 { font-size: 15px; }
.file-page-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.file-stepper { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--secondary); }
.file-stepper a { display: inline-flex; padding: 4px; border-radius: 6px; color: var(--secondary); }
.file-stepper a:hover { background: var(--surface); }
.file-title-row { display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 14px; }
.file-title { flex: 1; min-width: 0; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.icon-button { display: inline-flex; padding: 6px; border-radius: 8px; color: var(--secondary); }
.icon-button:hover { background: var(--surface); color: var(--text); }
.file-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.file-preview .pdf-page { width: 100%; border: 1px solid var(--border); border-radius: 6px; }
.file-panel { position: sticky; top: calc(var(--header-height) + 60px); display: grid; gap: 16px; padding-left: 20px; border-left: 1px solid var(--border); }
.file-visibility { display: grid; gap: 8px; justify-items: start; }
.share-confirm { width: 100%; }
.share-confirm > summary { display: flex; width: 100%; justify-content: center; border: 0; }
.share-confirm > summary::after { content: none; }
.share-confirm[open] > summary { display: none; }
.file-facts { display: grid; gap: 10px; margin: 0; }
.file-facts dt { font-size: 12px; color: var(--muted); }
.file-facts dd { margin: 0; }
.from-details > summary { display: inline; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 500; }
.from-details > summary::after { content: none; }
.from-details p { font-size: 13px; color: var(--secondary); margin-top: 4px; }
.file-ai h3 { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.is-clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-label { display: inline-block; padding: 0 6px; border-radius: 999px; background: var(--warning-bg); color: var(--warning); font-size: 12px; font-weight: 600; }
.counts-label { font-size: 12px; color: var(--muted); margin-top: 10px; }
.counts-list { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }
.checklist-state { flex: 1; color: var(--secondary); }
.checklist-ai-line { margin: 0 0 12px; }
.owner-list-line { display: flex; gap: 10px; align-items: center; margin-top: 16px; padding: 10px 12px; border-radius: var(--radius); background: var(--surface); }
.owner-list-line span { flex: 1; min-width: 0; }
/* Overview: the work on the left, the alteration's details and date of commencement in a side panel (2026-10-01). */
.overview-tab { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 8px 48px; align-items: start; }
.overview-main { grid-column: 1; grid-row: 1; min-width: 0; }
.overview-aside { grid-column: 2; grid-row: 1; min-width: 0; display: grid; gap: 16px; }
.overview-aside .case-details { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.overview-aside .details-grid { grid-template-columns: 1fr; gap: 10px; }
.overview-aside .wd-card { margin: 0; padding: 16px; background: var(--surface); }
@media (max-width: 960px) {
  .overview-tab { grid-template-columns: minmax(0, 1fr); }
  .overview-main, .overview-aside { grid-column: 1; grid-row: auto; }
  .overview-aside .details-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
.needs, .activity, .owner-sees { margin-bottom: 24px; }
.needs-list, .activity-list { list-style: none; margin: 0; padding: 0; }
.needs-list { border: 1px solid var(--border); border-radius: var(--radius); }
.needs-list li + li { border-top: 1px solid var(--border); }
.needs-list a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: var(--text); }
.needs-list a:hover { background: var(--surface); text-decoration: none; }
.needs-list a > span { flex: 1; min-width: 0; }
/* Recent activity in larger type (Zoe, 2026-11-09: "about 9", she wants "about 12", read as Word points). */
.activity-list { font-size: 16px; }
.needs-list time, .activity-list time { color: var(--muted); font-size: 14px; white-space: nowrap; }
.activity-list li, .activity-list li > a { display: flex; align-items: center; gap: 10px; }
.activity-list li { padding: 6px 0; }
.activity-list li > a { flex: 1; min-width: 0; color: var(--text); }
.activity-list li > a:hover > span { text-decoration: underline; }
.activity-list li > a:hover { text-decoration: none; }
.activity-list li > span, .activity-list li > a > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-list .icon { color: var(--muted); }
/* The note the owner's side wrote for Management, under its submission's line, three lines at most. */
.activity-list .activity-note { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  margin-top: 2px; color: var(--secondary); font-size: 14px; white-space: normal; overflow-wrap: anywhere; }
/* The Action required box (Maxi's review, 2026-11-05), where the Now card was: the one place Management acts, first on
   the Overview (Zoe, 2026-11-04, 53:57: "it should be the most obvious thing on the page"; 58:19: "a little box").
   Since Maxi's review of 2026-11-09 it uses the page's own styles: the label (.section-label, in blue), a title the
   size of a Settings card's, one line, then compact checkboxes and the button. */
.action-box { margin: 0 0 24px; padding: 16px 18px; border: 1px solid #c9dcec; border-left: 4px solid var(--blue); border-radius: var(--radius); background: var(--info-bg); }
.action-label { margin: 0 0 2px; color: var(--info); }
.action-title { margin: 0 0 4px; font-size: 16px; line-height: 1.4; }
.action-text { max-width: 100ch; margin: 0 0 12px; color: var(--secondary); font-size: 14px; }
.action-form { margin: 0; }
.action-reviewers { display: grid; justify-items: start; gap: 4px; min-width: 0; margin: 0 0 14px; padding: 0; border: 0; }
.action-reviewers > legend { margin-bottom: 4px; padding: 0; }
.action-check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 400; cursor: pointer; }
.action-check input { flex: none; width: 16px; height: 16px; min-height: 0; margin: 3px 0 0; padding: 0; }
.action-check-text { display: flex; flex-wrap: wrap; column-gap: 8px; min-width: 0; }
.action-check-role { font-weight: 600; }
.action-check-detail { color: var(--secondary); overflow-wrap: anywhere; }
.action-add { font-size: 14px; }
/* As the upload button: off while no reviewer is checked (intake.js). */
.action-form button:disabled { background: #edf1f4; color: #6e7b86; border-color: #dbe0e5; cursor: not-allowed; }
/* The header's time waiting, beside Waiting on and Next action (SOL-182). */
.status-time { display: grid; }
@media (max-width: 768px) {
  /* The staff header only: the owner page keeps its header, with "Alterations Portal", as it was. */
  .staff-header { gap: 12px; padding: 8px 16px; min-height: 52px; }
  .staff-header .brand span { display: none; }
  .case-title-row { flex-direction: column; }
  /* Two per row: Public link and Upload private, then Upload files across the width. */
  .case-actions { width: 100%; flex-wrap: wrap; }
  .case-actions > * { flex: 1 1 140px; }
  .case-actions .menu > summary { width: 100%; justify-content: center; }
  .share-panel { width: calc(100vw - 32px); }
  /* These panels open from a control on the left, so they open rightwards to stay on screen. */
  .share-panel, .file-visibility .menu-panel { left: 0; right: auto; }
  /* The stage reads "Professional Review · 2 of 7" above the seven steps as one thin segmented bar; the step names stay for screen readers. */
  .stage-steps { gap: 3px; margin-top: 6px; }
  .step-bar { margin-bottom: 0; }
  .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .stage-compact { display: block; font-size: 14px; font-weight: 600; margin: 0; }
  .case-tabs { gap: 18px; }
  .case-tabs.is-stuck .tabs-context { display: none; }
  /* The search with the "…" menu at its right, then the selects two per row. The menu stays after the
     form in the page, so it keeps its place in the tab order; it only sits beside the search. */
  .documents-toolbar { position: relative; }
  .documents-filters { flex: 1 1 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .documents-filters .documents-search { grid-column: 1 / -1; min-width: 0; margin-right: 48px; } /* outranks .documents-filters label { margin: 0 } */
  .documents-filters + .menu { position: absolute; top: 0; right: 0; }
  .documents-filters select { width: 100%; max-width: none; }
  .documents-filters input, .documents-filters select, .documents-filters button { min-height: 40px; }
  .documents-filters button { justify-self: start; }
  /* Each file becomes a few lines: its name, then when it was uploaded, its type and who sent it on one muted line, then
     the date on the document, labeled. The column names stay in the table for screen readers. */
  .doc-table, .doc-table tbody { display: block; }
  .doc-table colgroup { display: none; }
  .doc-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc-file { display: block; min-height: 44px; padding: 10px 12px 10px 24px; border-bottom: 1px solid var(--border); }
  .doc-file:last-child { border-bottom: 0; }
  .doc-file > td { display: inline; height: auto; padding: 0; border: 0; font-size: 13px; white-space: normal; overflow: visible; }
  .doc-file > .doc-name { display: block; padding: 0; margin-bottom: 2px; font-size: 15px; }
  .doc-file > .doc-type-cell::before, .doc-file > .doc-from::before { content: " · "; }
  .doc-file > .doc-type-cell .type-menu { display: inline-block; }
  .doc-file .doc-date-label { display: inline; }
  .doc-file > .doc-date:not(:empty) { display: block; margin-top: 2px; }  /* its own line, labeled */
  .details-grid { grid-template-columns: 1fr; }
  .file-layout { grid-template-columns: 1fr; }
  .file-panel { position: static; padding-left: 0; border-left: 0; }  /* after the document, which leads (2026-10-15) */
  .log-entries li { grid-template-columns: 22px minmax(0, 1fr); }
  .log-meta { grid-column: 2; }
  /* Touch targets of at least 40px: the file stepper arrows, the download icon, the menu triggers
     ("…", "Change stage", the shareholder pencil) and the menu items. The icons keep their size. */
  .file-stepper a, .icon-button { min-width: 40px; min-height: 40px; align-items: center; justify-content: center; }
  .menu > summary, .stage-menu > summary, .menu-panel > a, .menu-item { min-height: 40px; }
}
@media (max-width: 480px) {
  .owner-sep { display: none; }
}

/* Zoe's walkthrough, 2026-09-30: identity, details, scope, types, versions, notes, visibility, access log. */
.header-case { margin-left: 0; min-width: 0; color: #fff; font-size: 15px; white-space: normal; }
.header-case .header-building { color: #fff; font-weight: 600; }
.header-case .header-apartment { color: #dbe5ec; font-weight: 600; }
.case-building-name { color: var(--secondary); font-weight: 400; font-size: 0.7em; }
.compact-fieldset { display: grid; gap: 8px; margin: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.compact-fieldset legend { padding: 0 4px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.case-details, .scope { margin-bottom: 20px; }
.details-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 20px; margin: 0; }
.details-grid dt { font-size: 13px; color: var(--secondary); }
.details-grid dd { margin: 0; overflow-wrap: anywhere; }
.details-edit { margin: 8px 0 0; font-size: 13px; }
/* The people on the project, under their role in Alteration details (SOL-90). */
#details-heading { scroll-margin-top: calc(var(--header-height, 64px) + 64px); }
.person-line { margin-top: 6px; }
.person-line .person-role { color: var(--secondary); }
.details-grid dd > .person-line:first-child { margin-top: 0; }
.person-head, .person-merged { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.person-merged { margin-top: 0; }
.person-contact { display: block; color: var(--secondary); font-size: 13px; overflow-wrap: anywhere; }
.person-contact a { color: inherit; }
.person-status { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.person-status form { margin: 0; }
.person-status .text-button { min-height: 22px; padding: 0 6px; }
.status-tag { display: inline-block; padding: 0 8px; border-radius: 999px; background: #fff4d6; color: #7a5b00; font-size: 12px; font-weight: 600; line-height: 1.7; }
.person-menu { flex: none; }
.person-menu > summary { min-height: 0; padding: 0 4px; color: var(--muted); }
.person-menu .menu-panel { width: 240px; }
.person-menu .menu-note { margin: 2px 6px 6px; }
.person-menu .danger-text { color: #a33a3a; }
/* The "…" shows when the pointer is on the person, or the menu is focused or open; always on touch screens. */
@media (hover: hover) {
  .person-menu > summary { opacity: 0; transition: opacity .12s; }
  .person-line:hover .person-menu > summary, .person-menu > summary:focus-visible, .person-menu[open] > summary { opacity: 1; }
}
.people-add > summary { display: inline; min-height: 0; padding: 0; color: var(--blue); font-weight: 400; background: none; cursor: pointer; }
.people-add > summary:hover, .people-add[open] > summary { background: none; text-decoration: underline; }
.people-add .menu-panel { width: 290px; padding: 12px; }
.people-add .stacked-form { margin: 0; gap: 10px; font-size: 14px; }
/* Alteration details, quieter (Maxi's review, 2026-10-15: "still too chaotic"): labels recede, values carry the
   reading, every second line is the same light grey, items sit further apart than their own lines, and the
   actions share one weight below a thin rule. Type and spacing only; the content is unchanged. */
.overview-aside .case-details .details-grid { gap: 14px; }
.overview-aside .case-details dt { margin-bottom: 1px; color: var(--muted); font-size: 12px; }
.overview-aside .case-details dd { font-size: 14px; line-height: 1.45; }
.overview-aside .case-details dd .muted, .overview-aside .person-contact { color: var(--muted); font-size: 12.5px; }
.overview-aside .status-tag { padding: 0; background: none; color: #8a6d1a; font-size: 12.5px; font-weight: 500; }
.overview-aside .person-status .text-button { font-size: 12.5px; font-weight: 500; }
.overview-aside .details-edit { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
.scope-text { margin: 0 0 4px; max-width: 90ch; white-space: pre-line; overflow-wrap: anywhere; }
/* About four lines until "Show more" (Maxi, 2026-11-16), on desktop and phone alike. */
.scope-text.is-folded { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.scope-source { margin: 4px 0 0; color: var(--secondary); font-size: 13px; overflow-wrap: anywhere; }
/* One quiet row under the text: the sources and Edit, each opening its panel below the row (Maxi's review, 2026-11-16). */
/* Text buttons (DESIGN.md); the row steps left by their padding so the words line up with the text above. */
.scope-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; margin: 6px 0 0 -9px; }
.scope-toggle { gap: 5px; font-size: 13px; }
.scope-toggle .icon { width: 14px; height: 14px; vertical-align: 0; }
.scope-toggle[aria-expanded="true"] .icon:has([href="#i-chevron-down"]) { transform: rotate(180deg); }
.scope-sources { margin: 2px 0 0; padding-left: 18px; font-size: 13px; }
.scope-sources li + li { margin-top: 4px; }
.scope-edit { margin-top: 6px; max-width: 90ch; }
/* The box grows to show the whole text where the browser can size it to its content. */
.scope-edit textarea { field-sizing: content; min-height: 6lh; max-height: 70vh; }
.scope-reread { margin: 6px 0 0; }
/* The little button on an AI text (templates/ai_edit.html): a quiet "Confirm or edit". */
.ai-text { margin: 0 0 4px; max-width: 90ch; overflow-wrap: anywhere; }
.ai-source { margin: 4px 0 0; color: var(--secondary); font-size: 13px; overflow-wrap: anywhere; }
.ai-edit, .ai-history, .ai-dismissed { margin-top: 8px; font-size: 13px; }
.ai-edit > summary, .ai-history > summary, .ai-dismissed > summary { display: inline-flex; width: auto; min-height: 0; padding: 2px 18px 2px 0; color: var(--blue); font-weight: 600; }
.ai-edit > summary::after, .ai-history > summary::after, .ai-dismissed > summary::after { right: 4px; width: 5px; height: 5px; transform: translateY(-60%) rotate(45deg); }
.ai-edit[open] > summary::after, .ai-history[open] > summary::after, .ai-dismissed[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
.ai-edit form { margin-top: 8px; }
.ai-history ul { margin: 6px 0 0; padding-left: 18px; color: var(--secondary); }
.ai-dismissed > summary { color: var(--secondary); font-weight: 500; }
.ai-reread { margin: 4px 0 0; font-size: 13px; }
.ai-observations .counts-list > li + li { margin-top: 8px; }
.needs-list li.is-long span { white-space: normal; overflow-wrap: anywhere; }
.ai-tag { display: inline-block; flex: none; white-space: nowrap; padding: 0 5px; border-radius: 4px; background: var(--info-bg); color: var(--info); font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
/* Management's own value where the AI's would be (a confirmed document date): the same shape, not the AI's color. */
.confirmed-tag { display: inline-block; flex: none; white-space: nowrap; padding: 0 5px; border-radius: 4px; background: var(--success-bg); color: var(--success); font-size: 11px; font-weight: 700; line-height: 1.6; vertical-align: 1px; }
.doc-type { font-size: 14px; }
.doc-date { font-size: 13px; color: var(--secondary); }
/* On a phone the columns have no headers, so the date says what it is. */
.doc-date-label { display: none; }
.version-pill { flex: none; padding: 0 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--secondary); font-size: 12px; line-height: 1.6; }
.doc-file.is-replaced a { color: var(--secondary); }
.suggest-private { display: block; margin-top: 2px; color: var(--warning); font-size: 12px; font-weight: 600; }
.suggest-private-note { margin: 6px 0 0; font-size: 13px; color: var(--warning); }
.file-category { display: grid; gap: 6px; }
.file-category select { max-width: 100%; }
.file-category button { justify-self: start; }
.version-list { margin: 0; padding-left: 18px; }
/* Required fields carry a red asterisk after the label (Zoe, 2026-11-09); optional ones carry no mark. The control's
   `required` is what a screen reader announces. ".optional" stays only for the forms other work is changing. */
.required-mark { margin-left: 2px; color: var(--danger); font-weight: 700; }
.optional { float: right; margin-left: 8px; color: #8a96a3; font-size: 12px; font-weight: 400; line-height: inherit; }
label .optional ~ input, label .optional ~ textarea, label .optional ~ select { clear: both; }
.private-upload { display: inline-flex; align-items: center; gap: 6px; }
.access-log { margin-top: 28px; }
.access-entries { list-style: none; margin: 0; padding: 0; }
.access-entries li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.access-entries .icon { color: var(--muted); margin-top: 2px; }
.access-entries p { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 768px) {
  .header-case { font-size: 13px; line-height: 1.3; }
  .access-entries li { grid-template-columns: 22px minmax(0, 1fr); }
  .access-entries .log-meta { grid-column: 2; }
}
/* A long building name in the band must not squeeze the account menu. */
.account-menu { flex: none; }
.account-name { white-space: nowrap; }
/* Professional review rounds and document review states (SOL-89); the S drive confirmation (SOL-77). */
.review-rounds, .closing { margin-bottom: 24px; }
.review-closed, .closing-saved { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--success-bg); }
.review-closed .icon, .closing-saved .icon { flex: none; margin-top: 3px; color: var(--success); }
.round-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); }
.round { padding: 10px 12px; }
.round + .round { border-top: 1px solid var(--border); }
.round-title { margin: 0; font-size: 15px; }
.round-items { list-style: none; margin: 6px 0 0; padding: 0; }
.round-items li, .round-board { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; }
.round-items li + li { margin-top: 4px; }
.round-meta { color: var(--secondary); font-size: 13px; white-space: nowrap; }
.round-pending { color: var(--secondary); }
.round-board { margin: 10px 0 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.round-board.round-submission { margin: 0 0 10px; }
.round-candidate .round-meta { color: var(--warning, var(--secondary)); font-weight: 600; }
.state-pill { flex: none; padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.6; background: var(--info-bg); color: var(--info); }
.state-pill[data-state="final"] { background: var(--success-bg); color: var(--success); }
.state-pill[data-state="superseded"] { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
/* Reopen review sits at the foot of the record while the review is complete. */
.review-reopen { margin-top: 10px; }
.review-reopen > summary { min-height: 30px; padding: 4px 8px 4px 0; color: var(--blue); font-size: 13px; }
.review-reopen .menu-panel { left: 0; right: auto; width: 300px; white-space: normal; }
.closing-downloads { margin: 0 0 10px; font-size: 14px; }
.closing-downloads a { display: inline-flex; align-items: center; gap: 4px; }
.closing-form { max-width: 520px; font-size: 14px; }
.closing-form .check-label input { min-height: 0; }
.file-review-state { display: grid; gap: 6px; margin-top: 16px; }
.file-review-state button { justify-self: start; }
.review-state-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Documents is one list, as in File Explorer (2026-10-15): every header sorts, with a quiet icon, and the sorted one
   shows its arrow. A lock and a note icon sit beside the file name instead of their own columns. */
.doc-table th.sortable a { display: inline-flex; align-items: center; gap: 2px; color: inherit; text-decoration: none; white-space: nowrap; }
.doc-table th.sortable a:hover, .doc-table th.sortable a:focus-visible { color: var(--text); }
.doc-table th.sortable .sort-arrow .icon { width: 14px; height: 14px; opacity: .35; }
.doc-table th.sortable a:hover .sort-arrow .icon, .doc-table th.sortable a:focus-visible .sort-arrow .icon { opacity: .8; }
.doc-table th.is-sorted { color: var(--text); }
.doc-table th.is-sorted .sort-arrow .icon { opacity: 1; }
.doc-private { position: relative; display: inline-flex; margin-left: 6px; color: var(--muted); cursor: help; }
.doc-private .icon { width: 15px; height: 15px; }
/* The lock explains itself at once on hover or keyboard focus, not after the browser's title delay. */
.doc-private:hover::after, .doc-private:focus-visible::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 6px);
  transform: translateX(-50%); z-index: 30; width: max-content; max-width: 240px; padding: 4px 8px; border-radius: 6px;
  background: var(--navy); color: #fff; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: normal; pointer-events: none; }

/* The file page leads with the document, like a preview in Finder (2026-10-15): back to Documents, the stepper, then the
   name with Download and one "…" menu for the less frequent actions. */
.file-page .back-link { display: inline-flex; align-items: center; gap: 2px; margin: 0; font-size: 14px; font-weight: 600; }
.file-page .back-link .icon { width: 16px; height: 16px; }
.file-title-actions { display: flex; align-items: center; gap: 4px; }
.file-actions .menu-panel { display: grid; gap: 12px; width: 300px; }
.file-actions .file-review-state { margin-top: 0; padding-top: 12px; border-top: 1px solid var(--border); }
.suggest-private-box { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius); background: var(--warning-bg); }
.suggest-private-box .suggest-private-note { margin: 0; }
.suggest-private-box .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.file-facts .visibility { margin: 0; }
.file-facts .panel-note { margin: 2px 0 0; }
.pdf-controls { gap: 6px; }
/* A reviewer someone named when uploading, saved for the building with one small button (2026-10-15). */
.case-details .inline-form { display: block; margin: 2px 0 0; }
.case-details .inline-form .text-button { padding-left: 0; }
/* Page arrows read as quiet controls beside the page number, not as filled buttons. */
.pdf-controls .icon-button { min-height: 32px; padding: 4px; border: 1px solid var(--border); background: #fff; color: var(--secondary); }
.pdf-controls .icon-button:hover { background: var(--surface); color: var(--text); }
.pdf-controls .icon-button .icon { margin: 0; }
.round-board { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.file-facts .note-text.is-clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.file-facts .note-text { margin: 0; overflow-wrap: anywhere; }
/* Management adds or changes the building's reviewer from the alteration's details (2026-10-15). */
/* The owner's page code (SOL-120, 2026-10-15): shown under the link, changed at the bottom of the panel. */
.share-code { margin: 0 0 8px; font-size: 13px; color: var(--secondary); }
.share-code strong { margin-left: 4px; color: var(--text); font-size: 14px; letter-spacing: .02em; }
.code-edit form { margin: 0 0 12px; }
.owner-code-card input[name=code] { font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
/* The AI findings report (SOL-75, 2026-10-16): Management's marks and the AI's findings side by side (2026-10-21). */
.findings-head .quiet-line { max-width: 90ch; }
.findings .page-columns > * > .finding-group:first-child { margin-top: 8px; }
.findings-head h2 { display: flex; align-items: center; gap: 10px; margin: 6px 0 4px; font-size: 22px; }
.findings-counts { margin: 14px 0 6px; font-weight: 600; color: var(--secondary); }
.finding-group { margin-top: 22px; }
.finding-list { list-style: none; margin: 8px 0 0; padding: 0; }
.finding-list > li { padding: 10px 0; border-top: 1px solid var(--border); }
.finding-title { margin: 0 0 4px; font-weight: 600; }
.finding-file { margin: 4px 0 0 14px; font-size: 14px; }
.finding-evidence { margin: 2px 0 0; font-size: 13px; color: var(--secondary); }
.finding-evidence q { font-style: italic; }
.finding-mentions { margin: 4px 0 0 14px; font-size: 13px; }
.finding-flags { margin: 4px 0 0 18px; padding: 0; font-size: 14px; color: var(--warning); }
.finding-later { margin-top: 18px; }
.finding-later > summary { cursor: pointer; font-weight: 600; color: var(--secondary); }
/* Internal documents (SOL-122, 2026-10-16). */
.internal-documents { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); }
.internal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.internal-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; }
.internal-list { list-style: none; margin: 10px 0 0; padding: 0; }
.internal-list li { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
/* The lock and the type's pencil sit at a fixed place in their columns, not where the text ends (Maxi, 2026-10-16). */
@media (min-width: 769px) {
  .doc-name-line a { flex: 0 1 auto; }
  .doc-name-line .doc-private { order: 1; margin-left: auto; }
  .doc-table .doc-type-cell .type-menu { display: block; }
  .doc-table .type-menu > summary { display: flex; align-items: center; gap: 4px; margin-left: 0; padding-left: 0; }
  .doc-table .type-menu > summary .icon { flex: none; margin-left: auto; }
}
.finding-more { margin: 4px 0 0 14px; }
.finding-more > summary { cursor: pointer; font-size: 13px; color: var(--blue); }
.finding-more .finding-file { margin-left: 0; }
/* The Checklist tab, layout A (SOL-124, 2026-10-19): one list by stage. The mark alone says the status; the text
   beside it adds only something new. Marks and menus are <details>, so the tab works without JavaScript. */
.ck-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.ck-title { margin: 0; font-size: 17px; }
.ck-sum { flex: 1; margin: 0; color: var(--secondary); font-size: 13px; }
.ck-start p { max-width: 75ch; margin: 8px 0 14px; color: var(--secondary); }
/* The owner's team sees the whole list (Maxi's review, 2026-11-05): one line says so; a converted list or the AI's
   draft (SOL-130) waits in a box with its one button until Management shares it. The menu's choice of file follows. */
.ck-shared { margin: 14px 0 0; color: var(--secondary); font-size: 14px; }
.ck-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 14px 0 0; padding: 12px 14px; border: 1px solid #c9dcec; border-left: 4px solid var(--blue); border-radius: var(--radius); background: var(--info-bg); font-size: 14px; }
.ck-share p { flex: 1; min-width: 240px; margin: 0; }
.ck-share form { margin: 0; }
.ck-draft-pick { padding: 4px 10px; font-size: 13px; }
.ck-draft-pick select { min-height: 32px; margin-top: 4px; padding: 4px 8px; font-size: 13px; }
.ck-stage { margin-top: 24px; }
.ck-stage-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding-bottom: 6px; border-bottom: 1px solid var(--border); font-size: 12px; }
.ck-stage-h { margin: 0; color: var(--secondary); font-size: 13px; font-weight: 600; }
.ck-stage-head .ck-count { margin-left: auto; }
.ck-count { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
.ck-rows { list-style: none; margin: 0; padding: 0; }
.ck-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.1fr) auto; gap: 10px; align-items: center; padding: 3px 0; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-height) + 56px); }
.ck-row:last-child { border-bottom: 0; }
/* Zoe's rules and instructions (SOL-192): her words, no mark, a menu to edit or remove. */
.ck-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 0 6px 74px; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--header-height) + 56px); }
.ck-note:last-child { border-bottom: 0; }
.ck-note-text { margin: 0; color: var(--secondary); font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.ck-name { color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
.ck-name:hover { color: var(--blue); }
.ck-det { color: var(--secondary); font-size: 14px; overflow-wrap: anywhere; }
/* The file on the left, the two buttons together on the right: the buttons line up from row to row. */
.ck-suggestion { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; margin: 0; }
.ck-sug-file { display: block; min-width: 0; }
.ck-sug-actions { display: flex; gap: 6px; }
.ck-btn { min-height: 30px; padding: 2px 12px; border: 1px solid #cfd6dc; border-radius: 6px; background: #fff; color: var(--text); font-size: 13px; }
.ck-btn:hover { background: var(--surface); color: var(--text); }
.ck-btn.is-primary { border-color: var(--blue); background: var(--blue); color: #fff; }
.ck-btn.is-primary:hover { background: var(--blue-hover); color: #fff; }
/* The mark is a circle; selecting it opens the three marks. The selectors outrank .menu > summary and its states. */
.ck .ck-mark { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; min-height: 24px; padding: 0; border-radius: 50%; font-size: 13px; font-weight: 700; line-height: 1; }
.ck .ck-mark.is-provided { background: var(--success-bg); color: var(--success); }
.ck .ck-mark.is-not-yet { background: var(--danger-bg); color: var(--danger); }
.ck .ck-mark.is-na { background: var(--surface); color: var(--secondary); box-shadow: inset 0 0 0 1px var(--border); font-size: 9px; }
/* The AI thinks a row was received (SOL-134): the green check with a small "AI" badge beside it, until a person answers.
   The badge hangs off the circle, so the circle stays where every other row's mark is. */
.ck .ck-mark.has-ai { position: relative; }
.ck .ai-badge { display: inline-block; padding: 0 4px; border-radius: 4px; background: var(--info-bg); color: var(--info); box-shadow: inset 0 0 0 1px #c4d9ea; font-size: 10px; font-weight: 700; line-height: 1.6; letter-spacing: .02em; white-space: nowrap; }
.ck .ck-mark.has-ai .ai-badge { position: absolute; top: 50%; left: calc(100% + 4px); transform: translateY(-50%); }
/* Ask the AI again on one item (SOL-142): running, when it was asked, and a failure. */
.ck-asking { color: var(--info); font-weight: 500; }
.ck-ask-when { color: var(--muted); }
.ck-ask-note, .ck-ask-failed { color: var(--danger); }
.ck-ask-note { display: block; margin-top: 2px; font-size: 13px; }
/* The help's three lines: each mark as it looks on the list, then what it means. */
.ck-help-line { display: flex; align-items: center; gap: 6px; }
.ck-help-line .ck-mark { width: 20px; height: 20px; min-height: 20px; font-size: 11px; }
.ck-mark-menu > summary.ck-mark { margin: 0 8px; }
.ck-mark-menu > summary.ck-mark:hover, .ck-mark-menu[open] > summary.ck-mark { outline: 2px solid var(--border); outline-offset: 2px; }
.ck-mark-menu .menu-panel { left: 0; right: auto; }
.ck-mark-panel .menu-title { margin: 2px 10px 6px; font-size: 13px; overflow-wrap: anywhere; }
.ck-mark-panel .menu-item { gap: 10px; }
.ck-choose { display: block; padding: 0 10px 8px 44px; font-size: 13px; }
.ck-na label { margin: 0 10px 6px 44px; font-size: 13px; }
.ck-na input { min-height: 32px; margin-top: 4px; padding: 4px 8px; }
.ck-files { max-height: 280px; overflow: auto; margin: 0 0 8px; padding: 6px 10px 8px; border: 1px solid var(--border); border-radius: 8px; }
.ck-files legend { padding: 0 4px; font-size: 13px; font-weight: 600; }
.ck-files .check-label { padding: 3px 0; font-size: 13px; overflow-wrap: anywhere; }
.ck-files .check-label input { min-height: 0; margin-top: 3px; }
.ck-row-panel .danger-text { color: var(--danger); }
.ck-edit > summary { min-height: 36px; padding: 7px 28px 7px 10px; border-radius: 6px; font-weight: 500; }
.ck-edit > summary:hover { background: var(--surface); color: var(--text); }
.ck-edit[open] > summary { margin-bottom: 0; }
.ck-edit .stacked-form { gap: 10px; margin: 4px 10px 10px; }
.ck-add { margin: 4px 0 0 74px; }
.ck-add > summary { width: fit-content; min-height: 32px; padding: 4px 0; color: var(--blue); font-size: 13px; }
.ck-add > summary::after { content: none; }
/* The add button names its section ("Add to Requirements Prior to Commencement of Work"): it wraps on a phone. */
.ck-add .form-actions { flex-wrap: wrap; }
.ck-add .form-actions > button { white-space: normal; text-align: center; }
.ck-add .stacked-form { max-width: 520px; gap: 10px; margin: 0 0 12px; }
.ck-none { margin: 8px 0 0 74px; color: var(--muted); font-size: 13px; }
.ck-removed { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--border); }
.ck-removed > summary { width: fit-content; color: var(--secondary); font-size: 13px; }
.ck-removed-list { list-style: none; margin: 0; padding: 0; }
.ck-removed-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 4px 0; border-top: 1px solid var(--border); font-size: 14px; }
.ck-removed-list form { margin-left: auto; }
.ck-history h2 { margin: 6px 0 8px; font-size: 22px; }
.ck-history-table { margin-top: 12px; }
.ck-history-table th, .ck-history-table td { padding: 9px 12px; vertical-align: top; }
.ck-history-table th:first-child, .ck-history-table td:first-child { padding-left: 0; }
.ck-history-table thead th { font-size: 13px; color: var(--secondary); }
.ck-history-table td { overflow-wrap: anywhere; }
.ck-history-detail { color: var(--secondary); }
.ck-history-by, .ck-history-when { color: var(--secondary); white-space: nowrap; }
/* The item page (SOL-124): the mark, what is needed, where it came from, the linked files, the AI's evidence. */
.it { max-width: none; }
/* What's needed and its source beside the linked files and the AI's suggestion: the whole width on a wide screen
   (Maxi, October 20), one column on a narrow one. */
.it-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px); gap: 0 40px; align-items: start; }
.it-side > .it-block:first-child { margin-top: 22px; }
@media (max-width: 900px) { .it-body { grid-template-columns: minmax(0, 1fr); } }
.it .eyebrow { margin: 10px 0 4px; }
.it-title { margin: 0; font-size: 22px; overflow-wrap: anywhere; }
.it-state { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 10px 0 0; }
.it-mark { padding: 1px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.it-mark.is-provided { background: var(--success-bg); color: var(--success); }
.it-mark.is-not-yet { background: var(--danger-bg); color: var(--danger); }
.it-mark.is-na { background: var(--surface); color: var(--secondary); box-shadow: inset 0 0 0 1px var(--border); }
.it-detail { color: var(--secondary); font-size: 14px; overflow-wrap: anywhere; }
.it-block { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--border); }
.it-block h3 { margin: 0 0 8px; color: var(--secondary); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.it-block p { margin: 0 0 6px; overflow-wrap: anywhere; }
.it-block .it-needed { white-space: pre-line; }
.it-files { list-style: none; margin: 0; padding: 0; }
.it-files li { padding: 3px 0; overflow-wrap: anywhere; }
.it-ai { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.it-ai h3 { display: flex; align-items: center; gap: 6px; }
@media (max-width: 700px) {
  .ck-row { grid-template-columns: 64px minmax(0, 1fr) auto; row-gap: 0; padding: 4px 0; }
  .ck-note { padding-left: 0; }
  .ck-row > .ck-det { grid-column: 2 / -1; grid-row: 2; }
  .ck-row > .ck-det:empty { display: none; }
  /* On a phone the buttons go under the file name, so the name keeps the row's width. */
  .ck-suggestion { grid-template-columns: minmax(0, 1fr); }
  .ck-add, .ck-none { margin-left: 0; }
  /* Each change as short lines: what and the item, the detail, then who and when. */
  .ck-history-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .ck-history-table, .ck-history-table tbody, .ck-history-table tr { display: block; }
  .ck-history-table tr { padding: 10px 0; border-top: 1px solid var(--border); }
  .ck-history-table td { display: block; padding: 0; border: 0; }
  .ck-history-table .ck-history-by, .ck-history-table .ck-history-when { display: inline; font-size: 13px; }
  .ck-history-table .ck-history-by:not(:empty) + .ck-history-when:not(:empty)::before { content: " · "; }
  .ck-history-table td:empty { display: none; }
}

/* A file opened from an Ask AI source card: one quiet line naming what was cited, above the document. */
.ask-ai-cited { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid #ecd98a; border-radius: 6px; background: #fffbea; font-size: 14px; color: var(--text); }
.ask-ai-cited p { margin: 0; flex: 1 1 240px; }

/* The Settings tab (SOL-130; Maxi, 2026-10-21): the Details section, then the Working days section, each across the
   page. Each reads as text with one Edit at its top right; Edit swaps the text for the form (the form comes first in
   the section), and Cancel brings the text back. */
.settings-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; align-items: start; }
.settings-section { position: relative; min-width: 0; padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
.settings-section > h3 { margin: 0 0 12px; padding-right: 72px; font-size: 16px; color: var(--text); }
.settings-section .panel-note { max-width: 75ch; }
.settings-columns + .settings-columns { margin-top: 20px; }
.settings-columns.is-single { grid-template-columns: minmax(0, 1fr); }
.settings-list { display: grid; gap: 10px; margin: 0 0 12px; }
.settings-list > div { display: grid; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); gap: 2px 16px; }
.settings-list dt { color: var(--secondary); font-size: 14px; }
.settings-list dd { margin: 0; overflow-wrap: anywhere; }
.settings-hint { display: block; margin-top: 2px; color: var(--secondary); font-size: 13px; }
.settings-empty { max-width: 75ch; margin: 0 0 12px; }
.settings-hint form { display: inline; margin: 0; }
.settings-edit > summary { position: absolute; top: 12px; right: 12px; width: auto; min-height: 32px; padding: 4px 12px; border-radius: 6px; color: var(--blue); font-size: 14px; }
.settings-edit > summary::after { content: none; }
.settings-edit > summary:hover { background: #f2f6f9; }
.settings-edit[open] > summary { display: none; }
.settings-edit[open] ~ .settings-read { display: none; }
.settings-edit .stacked-form { margin-top: 0; }
.settings-edit .compact-fieldset { grid-template-columns: repeat(3, minmax(0, 1fr)); background: #fff; }
.settings-edit .compact-fieldset.is-pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* The Details section (Maxi, 2026-11-09): the owner, the Solstice team, the building and the emails as four columns
   that read like the Overview's Alteration details (a grey label above each value), two below 1000px and one on a
   phone. Its form holds the four as groups, two beside each other on a wide screen, with one Save. */
.settings-details { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 24px; align-items: start; }
.settings-column { min-width: 0; }
.settings-column .details-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.settings-column > p { margin: 0 0 6px; }
.settings-column .share-more > summary { padding: 6px 20px 6px 0; min-height: 0; }
.settings-edit .settings-details-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 32px; align-items: start; }
.settings-details-form > .form-actions { grid-column: 1 / -1; margin-top: 0; }
/* A link to a reviewer's email lands with the reviewer's name and the field's label in view, below the tabs. */
.settings-details-form input[id] { scroll-margin-top: 56px; }
/* The rules form reads as a sentence: Allowed [90] working days; Then $[150] a day for the next [50] working days,
   $[250] a day until the work finishes. The last rate's days field is hidden and never kept. */
.settings-rules { display: grid; gap: 14px; }
.settings-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 6px 12px; align-items: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.settings-label { padding-top: 8px; color: var(--secondary); font-size: 14px; font-weight: 600; }
fieldset.settings-row > legend { float: left; padding: 8px 0 0; }
.settings-row small { display: block; margin-top: 4px; }
.settings-row textarea { margin: 0; }
.rate-line, .rate-days { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.rate-days { flex-wrap: nowrap; white-space: nowrap; }
.rate-line input { width: 84px; min-height: 36px; margin: 0; padding: 6px 8px; }
.rate-list { display: grid; gap: 8px; justify-items: start; }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.rate-row .rate-last { display: none; }
.rate-row:last-of-type .rate-days { display: none; }
.rate-row:last-of-type .rate-last { display: inline; }
.rate-row:only-of-type [data-rate-remove] { display: none; }
/* Days off are toggles, pressed when the day is not worked (checkboxes underneath, so they read as such). */
.day-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.day-toggle { position: relative; display: inline-flex; }
.day-toggle input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.day-toggle span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 36px; padding: 0 10px; border: 1px solid #cfd6dc; border-radius: 8px; background: #fff; color: var(--text); font-size: 14px; font-weight: 600; }
.day-toggle input:checked + span { border-color: #42617d; background: #42617d; color: #fff; }
.day-toggle input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }
.day-toggle:hover input:not(:checked) + span { background: #f2f6f9; }
/* Notes wait behind "Add a note" until there are some. */
.settings-notes > summary { width: fit-content; min-height: 0; padding: 8px 0 0; color: var(--blue); font-weight: 500; font-size: 14px; }
.settings-notes > summary::after { content: none; }
.settings-notes[open] > summary { display: none; }
.settings-notes textarea { margin: 0; }
/* The Working days section's parts (SOL-145): each is positioned so its Edit sits at its own top right. */
.settings-part { position: relative; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.settings-part > h4, .hd-head h4 { margin: 0 0 12px; padding-right: 72px; font-size: 15px; color: var(--text); }
.settings-part > .settings-edit > summary { top: 10px; right: -8px; }
/* The Holidays block: a year switch, then the year as a list. Every change is saved at once. */
.hd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 6px; }
.hd-head h4 { margin: 0; padding: 0; }
.hd-years { display: flex; flex-wrap: wrap; gap: 6px; }
.hd-year { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--secondary); font-size: 13px; font-weight: 600; }
.hd-year[aria-current] { border-color: #42617d; background: #42617d; color: #fff; }
.hd-year:hover { text-decoration: none; }
.hd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.hd-tools > details > summary { width: auto; min-height: 36px; padding: 6px 14px; border: 1px solid #cfd6dc; border-radius: 8px; background: #fff; font-size: 14px; }
.hd-tools > details > summary::after { content: none; }
.hd-tools .menu-panel { right: 0; left: auto; width: 340px; }
.hd-preview { list-style: none; margin: 6px 0 10px; padding: 0; }
.hd-preview li, .hd-preview label { display: flex; align-items: center; gap: 8px; }
.hd-preview li { min-height: 34px; padding: 2px 0; border-top: 1px solid var(--border); font-size: 14px; }
.hd-preview label { flex: 1; min-width: 0; margin: 0; font-weight: 400; cursor: pointer; }
.hd-preview li > span:nth-child(2), .hd-preview label > span:last-child { flex: 1; min-width: 0; }
.hd-preview li.is-listed { padding-left: 26px; color: var(--secondary); }
.hd-preview input[type="checkbox"] { flex: none; width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; }
.hd-date { min-width: 84px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.hd-sub { margin: 0 0 14px; color: var(--secondary); font-size: 14px; }
.hd-list ul { list-style: none; margin: 0; padding: 0; max-width: 720px; }
.hd-list li { display: grid; grid-template-columns: 108px auto minmax(0, 1fr) auto; align-items: baseline; column-gap: 6px; min-height: 36px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 15px; }
.hd-list .hd-sep { color: var(--muted); }
.hd-list .hd-name { overflow-wrap: anywhere; }
.hd-list li form { margin: 0; }
@media (max-width: 1000px) {
  .settings-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settings-edit .settings-details-form { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .settings-columns { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .settings-details { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .hd-tools { margin-left: 0; }
  .hd-tools .menu-panel { left: 0; right: auto; width: min(340px, calc(100vw - 48px)); }
}
@media (max-width: 480px) {
  .settings-section { padding: 16px; }
  .settings-list > div, .settings-row, .settings-edit .compact-fieldset { grid-template-columns: minmax(0, 1fr); }
  fieldset.settings-row > legend { float: none; }
  .settings-label { padding-top: 0; }
}

/* Links the owner's side sent instead of files (SOL-138): Management downloads and files them. */
.links-received { margin: 16px 0 20px; }
.links-received .section-label { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; }
.link-receipts { list-style: none; margin: 0; padding: 0; }
.link-receipt { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; font-size: 14px; }
.link-receipt.is-waiting { border-color: #e7d58f; background: var(--warning-bg); }
.link-receipt p { margin: 2px 0; }
.link-receipt-url { overflow-wrap: anywhere; }
.link-receipt-full { display: block; }
.link-receipt-note { white-space: pre-line; }
.link-receipt-actions { margin-top: 6px; }

/* The emails page (SOL-121): one folded message per row, its text as sent. */
.email-list { list-style: none; margin: 16px 0; padding: 0; }
.email-list > li { border-top: 1px solid #e5e5e5; padding: 10px 0; }
.email-message summary { cursor: pointer; }
.email-subject { font-weight: 600; }
.email-text { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; background: #f7f7f5; border-radius: 6px; padding: 12px; margin: 12px 0; }
.email-history { margin: 4px 0 12px; padding-left: 20px; font-size: 13px; }
/* Management re-files an upload (SOL-195, 5.6): "Submission: 1st Response · Change". */
.refile-details { display: inline; }
.refile-details > summary { display: inline; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 500; cursor: pointer; }
.refile-details > summary::after { content: none; }
.refile-details[open] .refile-form { margin-top: 8px; }
.refile-form select { max-width: 100%; }
/* Management's confirmation that completed the review stays said at Final/Board Review (SOL-195, 5.5). */
.review-complete { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; padding: 10px 14px; border: 1px solid #c8e3cf; border-radius: var(--radius); background: #ebf7ee; color: #246237; font-size: 14px; }
.review-complete .icon { flex: none; margin-top: 2px; }
.action-box .action-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.round-items .mark-final { display: inline; }
.round-items .mark-final > summary { display: inline; width: auto; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 400; cursor: pointer; list-style: none; }
.round-items .mark-final > summary::after, .round-items .mark-final > summary::before { content: none; }
.round-items .mark-final > summary::-webkit-details-marker { display: none; }
.round-items .mark-final[open] form { display: block; margin-top: 8px; max-width: 46ch; white-space: normal; text-align: left; color: var(--text); font-weight: 400; }
/* The AI's words where a letter says it has no further objection (SOL-195, 5.7). */
.action-quote { max-width: 80ch; margin: 0 0 12px; padding: 4px 0 4px 12px; border-left: 3px solid #c9dcec; color: var(--text); font-size: 14px; }
.round-meta .ai-note { color: var(--info); font-weight: 600; }
