/* Records: files, checklists, to-dos, site details and reports. Loaded after app.css.
   Site Ledger rules hold: square corners, Switzer, and yellow only for the one next step. */

/* selection is one grammar app-wide: the 1.5px outline from app.css, never a fill (D8, D2-9) */
.ck-scroll .chip:disabled, .ck-scroll .ans:disabled { opacity: .55; }

/* custom checklists */
.ck-assigned { color: var(--fg-2); }
.ck-assigned .ic { width: 14px; height: 14px; }
.ck-head .icon-btn { margin-left: auto; flex: none; }
.ckx-edit { flex: 1; min-width: 0; background: var(--bg); border: 1px solid var(--line-2); color: var(--fg); font: 400 16px/1.35 var(--sans); padding: 8px 10px; border-radius: 0; outline: none; }
.ckx-edit:focus { border-color: var(--fg); }
.ck-item .ck-g { margin-left: 50px; }
.ck-edit-note { margin-left: 50px; }
.ck-scroll .signed { margin-top: 10px; }

/* to-dos collapsed into one row */
.row.todo-more { gap: 12px; }
.row.todo-more small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; display: block; }
.row.todo-more .grow { min-width: 0; }

/* site notes: a real placeholder, not text */
.nb-text:empty::before { content: attr(data-ph); color: #8a8984; pointer-events: none; }
.nb-text { min-height: 1.55em; }

/* PDF pages: Draft and Void watermarks, void stamp */
.pdf-page { overflow: hidden; }
.pdf-water { position: absolute; inset: 0; display: grid; place-items: center; font: 300 54px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: rgba(25, 25, 25, .09); transform: rotate(-28deg); pointer-events: none; }
.pdf-stamp.void { box-shadow: inset 0 0 0 1.5px #191919; font-weight: 600; }
.doc-meta .void-line { color: #191919; font-weight: 500; }
.paper .btn.rb-open { width: 100%; margin: 0 0 12px; background: #191919; color: #f5f5f5; }

/* icons in sheet heads and the share item */
.sh-head .doc-ic, .is-item .doc-ic { width: 40px; height: 40px; display: grid; place-items: center; box-shadow: inset 0 0 0 1px var(--line-2); flex: none; }
.sh-head .doc-ic .ic, .is-item .doc-ic .ic { width: 18px; height: 18px; }
.is-item { display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter) 14px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.is-item b { display: block; font-size: 15px; }
.is-item small { color: var(--muted); font-size: 12.5px; }
.sheet .hold { margin: 0 var(--gutter) 8px; }

/* scan review */
.scan-pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 4px var(--gutter) 6px; }
.scan-page { position: relative; margin: 0; }
.sp-paper { display: grid; align-content: start; gap: 5px; aspect-ratio: 1 / 1.35; background: #fbfaf6; padding: 12px 10px; }
.sp-paper i { display: block; height: 4px; background: #d6d3cb; }
.scan-page figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
.sp-del { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; display: grid; place-items: center; background: rgba(25, 25, 25, .88); color: #f5f5f5; }
.sp-del .ic { width: 16px; height: 16px; }

/* Say it */
.say { display: flex; align-items: center; gap: 10px; padding: 6px var(--gutter); font: 400 15px/1 var(--sans); font-variant-numeric: tabular-nums; }
.say-dot { width: 10px; height: 10px; background: var(--fg); animation: pulse 1.6s ease-in-out infinite; }
.say-tr { margin: 8px var(--gutter) 0; min-height: 110px; font-size: 19px; line-height: 1.45; color: var(--fg); }
.say-tr:empty::before { content: 'Start speaking.'; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .say-dot { animation: none; } }

/* archive warning */
.arch-warn ul { margin: 6px 0 8px; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.arch-warn p { margin: 0; }
.sheet .warnblock { margin: 0 var(--gutter) 8px; }

/* thread attach pickers */
.sheet-attach .sh-head .icon-btn { margin-left: -10px; }
.sheet-attach .row .ck-id { flex: none; }
.sheet-attach .row:disabled { opacity: .5; }
.sheet .pickgrid, .sheet .grid { margin: 0 var(--gutter); }

/* report builder and preview */
.records .field small { font-size: 12px; }
.paper-doc .ce { outline: none; border-radius: 0; }
.paper-doc .ce:hover { background: rgba(0, 0, 0, .035); }
.paper-doc .ce:focus { box-shadow: inset 0 0 0 1px #191919; background: transparent; }
.paper-doc table + .pd-note { margin-top: 6px !important; }
.paper-doc h2 + table { margin-top: 4px; }
.rb-bar { flex-wrap: wrap; }
.rb-bar .btn.grow { flex: 1 1 100%; }
.rb-bar .btn:not(.grow) { flex: 1 1 0; min-height: 44px; font-size: 14px; }
.tail.xtall { height: 260px; }
.bottom-bar .btn:disabled { opacity: .45; }
.pd-grid figcaption .ce { font-family: var(--sans); font-size: 10.5px; color: inherit; }
.paper .rb-bar .btn.primary { background: #191919; color: #f5f5f5; }
.paper .rb-bar .btn.primary:disabled { opacity: .4; }

/* ---------- round 5 (Bundle D) ---------- */
/* file rows: Offline badge; doc view: saved-offline line */
.off-badge { flex: none; font-size: 11px; line-height: 1; padding: 5px 6px; color: var(--fg-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.doc-meta .off-line { display: inline-flex; align-items: center; gap: 5px; }
.doc-meta .off-line .ic { width: 13px; height: 13px; }

/* a reference that opens a file (detail D-07, SYS-01): one tap, underlined, never a bare id */
.doc-ref { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
.doc-ref:active { opacity: .6; }

/* records on paper: basis table, build-up, deviations, signatures */
.paper-doc .pd-kv th { width: 34%; vertical-align: top; color: #6a6964; font-weight: 400; border-bottom: 1px solid rgba(0,0,0,.08); padding: 6px 8px 6px 0; }
.paper-doc .pd-kv td { vertical-align: top; }
.paper-doc .pd-bu td:first-child { font-weight: 500; white-space: nowrap; }
.paper-doc td i { color: #6a6964; }
.paper-doc td small { display: block; color: #6a6964; font-size: 10.5px; }
.pd-dev { padding: 10px 12px; margin: 4px 0 10px; box-shadow: inset 2px 0 0 #191919; background: rgba(0,0,0,.025); }
.pd-dev p { margin: 0 0 4px !important; }
.pd-dev .pd-await { font-weight: 600; }
.pd-list { margin: 0 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.55; color: #2b2b2a; }
.pd-list li { margin-bottom: 4px; }
.pd-sigs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin: 6px 0 10px; }
.pd-sigs div { display: grid; gap: 2px; padding-top: 22px; border-top: 1px solid #191919; font-size: 12px; }
.pd-sigs span { color: #6a6964; font-size: 10.5px; }
.pd-sigs i { color: #6a6964; font-size: 10.5px; }
.pd-grid.l2 { margin-top: 10px; }

/* PDF pages set in real text (spec, records, data sheets) */
.pdf-page.real { gap: 6px; align-content: start; color: #191919; aspect-ratio: auto; min-height: 440px; overflow: visible; }
.pdf-page.real i { height: auto; background: none; display: inline; }
.pg-head { display: flex; justify-content: space-between; align-items: center; font-size: 10px; color: #6a6964; padding-bottom: 8px; border-bottom: 1px solid rgba(0,0,0,.18); margin-bottom: 6px; }
.pg-head span:first-child { display: inline-flex; align-items: center; gap: 6px; color: #191919; font-weight: 500; letter-spacing: .04em; }
.pg-head .mark { width: 22px; height: 17px; color: #191919; }
.pg-eyebrow { margin: 4px 0 0; font: 500 9px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6a6964; }
.pg-h { margin: 2px 0 2px; font: 300 17px/1.2 var(--sans); color: #191919; }
.pg-meta { margin: 0 0 6px; font-size: 10.5px; line-height: 1.45; color: #6a6964; }
.pg-s { margin: 8px 0 2px; font-size: 11.5px; font-weight: 600; color: #191919; }
.pg-p { margin: 0; font-size: 11px; line-height: 1.5; color: #2b2b2a; }
.pg-ol { margin: 0; padding-left: 16px; font-size: 11px; line-height: 1.5; color: #2b2b2a; display: grid; gap: 4px; }
.pg-t { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.pg-t th { text-align: left; font-weight: 500; color: #6a6964; border-bottom: 1px solid rgba(0,0,0,.2); padding: 4px 6px 4px 0; }
.pg-t td { border-bottom: 1px solid rgba(0,0,0,.08); padding: 5px 6px 5px 0; vertical-align: top; }

/* report builder: an open-snag photo is marked for client reports */
.pick-flag { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font: 500 11px/1.2 var(--sans); font-style: normal; background: rgba(14,14,14,.82); color: #f5f5f5; }

/* to-dos: the tick is a 48px target; the site line when opened from a site */
.todo-tick { flex: none; width: 48px; height: 48px; margin: -8px 0 -8px -12px; display: grid; place-items: center; }
.todo-tick:disabled { opacity: .5; }
.row.todo .todo-t { min-height: 44px; display: grid; align-content: center; text-align: left; }
.todo-site .chip { flex: none; }

/* site details: remove chip and compliance groups */
.sd-remove { flex: none; }
.sd-grp { margin-top: 20px !important; font-size: 14px !important; font-weight: 500; color: var(--fg) !important; }

/* hold-point checklists (B29) and readings */
.hold-tag { flex: none; font-size: 11px; font-weight: 600; padding: 5px 6px; color: var(--fg); box-shadow: inset 0 0 0 1.5px var(--fg); }
.hold-pick { margin: 0 0 6px; padding: 12px 0 4px; border-bottom: 1px solid var(--line); }
.hp-h { display: flex; align-items: center; gap: 8px; margin: 0 var(--gutter); font-size: 15px; }
.hp-h .ic { width: 18px; height: 18px; }
.hp-p { margin: 4px var(--gutter) 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.ck-scroll .hold { margin-top: 10px; }
.ck-rdg { margin: 8px 0 0 50px; display: grid; gap: 4px; }
.ck-rdg b { font-size: 20px; font-weight: 400; }
.ck-rdg.flag b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ck-rdg span { font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.ck-item > .btn.sm { margin-left: 50px; }
.rdg-row { display: flex; align-items: center; gap: 10px; }
.rdg-row input { flex: 1; font-size: 28px !important; font-variant-numeric: tabular-nums; }
.rdg-row b { font-size: 17px; font-weight: 400; color: var(--fg-2); min-width: 44px; }
.bb-note { margin: 0; padding: 12px 0; font-size: 14px; color: var(--fg-2); }
.doc-meta .rel-line { color: #191919; font-weight: 500; }

/* hold lists on every site: blockers in words, the fix photo and Chris's decision (decision 8, B2-1) */
.hold-blk { margin: 8px 0 0; padding: 0 0 0 16px; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
.hold-blk li + li { margin-top: 4px; }
.ck-fix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 0 50px; }
.ck-fix .ck-by { margin: 0; flex-basis: 100%; }
.ck-fix .ck-edit-note { margin-left: 0; min-height: 44px; }
.ck-fix .ic, .ck-by .ic { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.signed .btn.sm { margin-top: 10px; }

/* ---------- round 8 (Bundle D) ---------- */
/* decision 14: the earlier result under a re-read or re-answer, kept and shown */
.ck-hist { margin: 6px 0 0 50px; font-size: 13px; line-height: 1.4; color: var(--fg-2); }
/* decision 15: a voided hold list, answers kept */
.signed.void { box-shadow: inset 2px 0 0 var(--fg); }
/* B3-17: an issued hold record, frozen at sign-off, with its stamp */
.fd-snap { padding: 0 0 8px; }
.fd-stamp { display: inline-block; margin: 0 0 6px; padding: 6px 10px; font: 600 12px/1.2 var(--sans); letter-spacing: .04em; text-transform: uppercase; color: #191919; background: #f7f6f2; box-shadow: inset 0 0 0 1.5px #191919; }
.fd-rel { margin: 0 0 6px; font-size: 12px; line-height: 1.45; color: #2b2b2a; }
.fd-snap .paper-doc { margin-top: 8px; }
.paper-doc .pd-h3 { margin: 14px 0 4px; font-size: 12px; font-weight: 600; color: #191919; }
/* F3-5, J7: a drawing or document reference in the specification is a 44pt chip, not a 13pt link */
.doc-ref.ref-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; margin: 3px 4px 3px 0; text-decoration: none; font-weight: 500; color: #191919; box-shadow: inset 0 0 0 1px #191919; background: #fbfaf6; vertical-align: middle; }
.doc-ref.ref-chip:active { background: #ebe9e2; }
.pg-refs { display: flex; flex-wrap: wrap; align-items: center; margin: 2px 0 4px; }
/* J25: All records filters */
.rec-filters .chip .ic { width: 14px; height: 14px; margin-left: 2px; }
.doc-ref.ref-chip .ic { width: 16px; height: 16px; flex: none; }
.paper-doc .pd-bu td small { white-space: normal; }
.pdf-page .doc-ref.ref-chip { font-size: 13px; line-height: 1.2; }
.pg-refs .pg-meta { margin: 0 8px 0 0; }

/* ---------- round 10 (Bundle D) ---------- */
/* D4-1: the stamp is the header's status, in flow, never laid over the header's own text */
.pdf-page .pdf-stamp, .pdf-page.real .pdf-stamp, .paper-doc .pd-head .pdf-stamp { position: static; display: inline-block; flex: none; max-width: 62%; margin: 0 0 0 auto; padding: 3px 6px; font: 500 10px/1.3 var(--sans); letter-spacing: .02em; color: #191919; background: #fbfaf6; box-shadow: inset 0 0 0 1px #191919; text-align: right; white-space: normal; overflow-wrap: anywhere; }
.pdf-page .pdf-stamp.void, .paper-doc .pd-head .pdf-stamp.void { box-shadow: inset 0 0 0 1.5px #191919; font-weight: 600; }
.pdf-page .pg-head { gap: 10px; }
.pdf-rel { position: static; margin: 0; font-size: 11px; line-height: 1.45; color: #2b2b2a; }
.fd-snap { position: relative; overflow: hidden; }
.fd-snap .fd-water { inset: auto; top: 180px; left: 0; right: 0; height: 220px; z-index: 3; font-size: 72px; color: rgba(25, 25, 25, .12); }
.paper-doc .pd-head + .fd-rel { margin-top: 8px; }
/* D4-11: a disabled button on a paper surface reads at AA in either theme, and the bar says what is missing */
.paper .rb-bar .btn:disabled, .paper .rb-bar .btn.primary:disabled, .paper .btn:disabled { background: transparent !important; color: #5c5a55 !important; box-shadow: inset 0 0 0 1px #c9c6bd !important; opacity: 1 !important; }
.rb-bar .rb-need { flex: 1 1 100%; margin: 0 0 2px; font-size: 13px; line-height: 1.4; color: #3d3c39; }
/* D4-20: the chosen filter value */
.rec-on { display: inline-flex; color: var(--fg); }
.rec-on .ic { width: 18px; height: 18px; }
/* B4-13: the layer sheet; the unit sits inside the field (D4-24) */
.fd-suffix .fd-in { position: relative; display: block; }
.fd-suffix .fd-in input { width: 100%; padding-right: 48px; }
.fd-suffix .fd-in em { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--fg-2); pointer-events: none; }
