:root { --ink: #1b1f2a; --head: #3b2a14; --muted: #54503f; --bg: #f3f4f1; --card: #fff; --line: #dad6c8; --rule: #e8e4d6; --accent: #7a3e0a; --soft: #efe8d8; --input: #b9b39c; font: 16px/1.55 system-ui, sans-serif; color: var(--ink); background: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) { --ink: #e9e6dc; --head: #f3e3c4; --muted: #b8b19b; --bg: #17150f; --card: #221f17; --line: #3d382a; --rule: #332f23; --accent: #e8a45f; --soft: #3a3121; --input: #5c5540; }
}
  :root:where([data-theme="dark"]) { --ink: #e9e6dc; --head: #f3e3c4; --muted: #b8b19b; --bg: #17150f; --card: #221f17; --line: #3d382a; --rule: #332f23; --accent: #e8a45f; --soft: #3a3121; --input: #5c5540; }

body { max-width: 1040px; margin: auto; padding: 28px; background: var(--bg); }
a { color: var(--accent); }
h1 { font-size: clamp(1.8rem, 4.8vw, 2.6rem); line-height: 1.1; margin: 0 0 14px; color: var(--head); }
h2 { font-size: 1.2rem; margin: 26px 0 10px; color: var(--head); }
.card h2:first-child { margin-top: 0; }
h3 { font-size: 1rem; margin: 18px 0 4px; }
.kicker, .note, footer { font-size: .86rem; color: var(--muted); }
.kicker { letter-spacing: .05em; text-transform: uppercase; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 22px; margin: 18px 0; }
nav.guides { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .92rem; margin: 6px 0 18px; }
label { display: block; font-weight: 600; margin: 10px 0 4px; }
input { width: 100%; box-sizing: border-box; padding: 8px 9px; border: 1px solid var(--input); border-radius: 7px; font: 15px system-ui, sans-serif; background: var(--card); color: var(--ink); }
table.sov-input { table-layout: fixed; min-width: 820px; }
table.sov-input td input { width: 100%; min-width: 0; padding: 6px 7px; font-size: 14px; }
table.sov-input th { white-space: normal; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
button { border: 0; border-radius: 8px; padding: 10px 14px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; margin: 12px 8px 0 0; font: 700 15px system-ui, sans-serif; }
@media (prefers-color-scheme: dark) { :where(:root:not([data-theme="light"])) button { color: #17150f; } } :where(:root[data-theme="dark"]) button { color: #17150f; } 
button.secondary { background: var(--soft); color: var(--head); }
button.x { background: transparent; color: var(--muted); margin: 0; padding: 4px 8px; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 8px 7px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--head); }
.scroll { overflow-x: auto; position: relative; } /* contains .vh labels inside it, or they widen the page */
.due { font-size: 1.7rem; font-weight: 800; color: var(--head); }
.finding { padding: 6px 0; }
.pill { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; margin-right: 8px; background: var(--soft); color: var(--head); }
.pill.high { background: #fde8e8; color: #9a3412; }
pre.sum { white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.5 ui-monospace, monospace; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 14px; overflow-x: auto; }
.cta { border: 2px solid var(--accent); }
.cta h2 { margin-top: 0; }
/* Every page: the generated block from nav.mjs, grouped, above the footer. */
nav.all-guides { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 24px; margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
nav.all-guides h2 { font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
nav.all-guides ul { list-style: none; margin: 0 0 14px; padding: 0; }
nav.all-guides li { margin: 0; }
nav.all-guides a { display: inline-block; padding: 5px 0; font-size: .95rem; }
nav.all-guides a[aria-current="page"] { color: var(--head); font-weight: 700; text-decoration: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
footer { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 720px) { body { padding: 16px; } }
/* Guide tables on a phone: one card per row, the first cell as its title and the rest as
   label / value pairs (data-label is the column header). Same pattern as the site's
   STACK_TABLE_CSS (platform/pages/site-nav.mjs). At 390 px the retainage caps table was 457 px
   wide in a 312 px scroller, with Notes off screen. Since 2026-11-25 pf-chrome.css carries a
   zero-specificity copy of that layout (label beside value); the rules below win where they set
   a property, and the td / ::before sizing is pinned so the label stays above its value. */
@media (max-width: 600px) {
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td, table.stack th[scope="row"] { display: block; }
  table.stack { margin-top: 12px; }
  table.stack tr { border: 1px solid var(--line); border-radius: 10px; padding: 2px 12px; margin: 0 0 10px; background: var(--card); }
  /* Label above value, not a two-column grid: a grid makes every inline child (<strong>, <a>)
     its own grid item, which split the lien-waiver cells into fragments. */
  table.stack td { border: 0; border-top: 1px solid var(--rule); padding: 7px 0; text-align: left; white-space: normal; width: auto; table-layout: auto; overflow-wrap: normal; }
  table.stack td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.5; width: auto; min-width: 0; padding-right: 0; vertical-align: baseline; }
  table.stack td:first-child, table.stack th[scope="row"] { display: block; border: 0; font-weight: 700; color: var(--head); padding: 9px 0 7px; font-size: 1rem; text-transform: none; letter-spacing: 0; }
  table.stack td:first-child::before { content: none; }
  table.stack.compact td:not(:first-child) { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  table.stack.compact td::before { display: inline; }
  table.stack td:empty, table.stack.compact td:empty { display: none; }
}
/* Summaries on a phone: sumview.mjs draws each padded "label ..... amount" line of a
   generated <pre class="sum"> as a row, since the monospace lines wrap at 390 px and the
   amounts lose their column. The <pre> stays the copy source and shows from 601 px up. */
.sum-view { display: none; }
@media (max-width: 600px) {
  pre.sum.has-view { display: none; }
  .sum-view:not([hidden]) { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: .9rem; }
  .sum-view .sv-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 5px 0; border-top: 1px solid var(--rule); }
  .sum-view .sv-row:first-child, .sum-view .sv-gap + .sv-row, .sum-view .sv-text + .sv-row { border-top: 0; }
  .sum-view .sv-v { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; color: var(--head); }
  .sum-view .sv-v span { display: block; white-space: nowrap; }
  .sum-view .sv-text { padding: 6px 0 4px; }
  .sum-view .sv-head { font-weight: 700; color: var(--head); }
  .sum-view .sv-item { position: relative; padding: 4px 0 4px 1em; }
  .sum-view .sv-item::before { content: "•"; position: absolute; left: 0; color: var(--muted); }
  .sum-view .sv-gap { height: 8px; }
}
/* The calculator's schedule-of-values entry on a phone: each line a card, item and
   description on top, the four amounts two by two, each with its column name. The fixed
   820 px table it replaces hid every amount column behind a sideways scroll at 390 px. */
@media (max-width: 600px) {
  table.sov-input { min-width: 0; table-layout: auto; }
  table.sov-input thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.sov-input, table.sov-input tbody { display: block; }
  table.sov-input tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 10px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; margin: 0 0 10px; background: var(--card); }
  table.sov-input td { display: block; padding: 0; border: 0; min-width: 0; }
  table.sov-input td::before { content: attr(data-label); display: block; color: var(--muted); font-size: .78rem; font-weight: 600; line-height: 1.5; margin-bottom: 2px; }
  table.sov-input td:nth-child(2) { grid-column: span 3; }
  table.sov-input td:nth-child(n+3):nth-child(-n+6) { grid-column: span 2; }
  table.sov-input td:last-child { grid-column: 1 / -1; display: flex; justify-content: end; }
  table.sov-input td:last-child::before { content: none; }
  table.sov-input button.x::after { content: " Remove line"; font-size: .85rem; font-weight: 600; }
  table.sov-input td input { font-size: 16px; padding: 8px 9px; } /* under 16 px, iOS zooms the page on focus */
  /* Result cards: "1 Mobilization and general conditions" as one title line. */
  table.stack.compact.sov-out tr { padding-top: 10px; }
  table.stack.compact.sov-out td:first-child { display: inline; margin-right: .45em; padding: 0; font-size: inherit; }
  table.stack.compact.sov-out td:nth-child(3) { margin-top: 7px; }
  table.stack.compact.sov-out td:nth-child(2) { display: inline; border: 0; padding: 0; font-weight: 700; color: var(--head); }
  table.stack.compact.sov-out td:nth-child(2)::before { content: none; }
}
@media print { body { background: #fff; color: #000; padding: 0; } .card { border: 0; } button, nav, footer, .cta, #inputs { display: none; } }

/* Closeout checklist on retainage-release.html */
.checks { border: 1px solid var(--line); border-radius: 8px; margin: 14px 0; padding: 8px 14px; }
.checks label { font-weight: 400; margin: 6px 0; display: flex; gap: 8px; align-items: baseline; }
.checks input { width: auto; flex: none; margin: 0; }
/* The calculator's header keeps four picks; the full list is the all-guides block at the bottom. */
nav.guides a.all { font-weight: 700; }
#all-guides { display: block; scroll-margin-top: 12px; }
/* Statutory waiver forms (state-forms.mjs): the form as a printed page, each blank a rule with its caption under it. */
.statutory-form { background: #fff; color: #000; border: 1px solid var(--line); border-radius: 8px; padding: 22px 26px; font: 15px/1.9 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.statutory-form .form-title { text-align: center; font-size: 1.05em; margin: 0 0 12px; color: #000; }
.statutory-form p { margin: 0 0 10px; }
.statutory-form .form-notice { font-weight: 700; border: 1px solid #000; padding: 8px 10px; }
.statutory-form .form-space { height: 10px; }
.statutory-form .form-sign p { margin: 0 0 6px; }
.blank { display: inline-flex; flex-direction: column; vertical-align: top; min-width: 9em; margin: 0 2px; }
.blank .line { display: block; border-bottom: 1px solid #000; height: 1.35em; }
.blank .line.filled { height: auto; min-height: 1.35em; white-space: pre-wrap; }
.blank .cap { font: 10px/1.2 system-ui, sans-serif; color: #666; text-transform: none; }
@media print {
  body[data-print] main > *, body[data-print] header, body[data-print] nav.all-guides, body[data-print] footer { display: none !important; }
  body[data-print] main > section.printing { display: block !important; }
  body[data-print] main > section.printing > h2, body[data-print] main > section.printing > .note { display: none; }
  .statutory-form { border: 0; padding: 0; }
  .statutory-form ~ button, .statutory-form + button { display: none; }
}
