/* Peg's own additions to peg.css. peg.css is the design handover (Peg-design-handover.zip, 13 Oct 2026)
   kept as it came, so a revised handover drops straight in; what it did not draw lives here, on its tokens. */

/* The design's components set display, which would beat the hidden attribute; hidden always wins. */
[hidden] { display: none !important; }

/* The icon sprite: CSP allows no style attributes, so it is hidden by class. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Tablet pages are two .screen panes in a .split; on a phone they stack, so the second loses its top gap. */
.split > .screen + .screen { padding-top: 0; }
.split > .screen:first-child { padding-bottom: var(--s4); }
@container app (min-width: 768px) { .split > .screen:first-child { padding-bottom: 0; } }

/* The appbar: a sign out at the right of the jobs screen. */
.appbar .btn--quiet { color: var(--on-brand); min-height: 44px; }
.appbar__end { margin-left: auto; padding-right: var(--s2); display: flex; align-items: center; gap: var(--s2); }

/* A stack with the tight gap the markup used inline. */
.stack--tight { gap: var(--s1); }

/* Take photo is a label around a file input, so it can open the camera without script. */
label.btn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.btn { position: relative; }
.prompt__actions > :only-child { grid-column: 1 / -1; }

/* A photo held on the record but not shown (no coverage, or not signed yet). */
.thumb--off { display: grid; place-items: center; font: var(--t-label); color: var(--muted); }


/* The quote form: the price book's job-sheet inputs, in a card that opens. */
details.card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--s3); padding: var(--s4); min-height: 64px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary .card__title { flex: 1; }
details.card > summary .ic { transition: transform .15s; }
details.card[open] > summary .ic { transform: rotate(90deg); }
.form-section + .question { border-top: 0; padding-top: var(--s2); }
.card__body > .form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-section { font: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }

/* Requests to the PC worker. */
.asks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s2); }
.asks .btn { width: 100%; }
.work > li { display: flex; flex-direction: column; gap: var(--s1); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.work > li:first-child { border-top: 0; }
.work__top { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; justify-content: space-between; }

/* The desk study's source line under each overlay. */
.overlays .cond__detail { grid-column: 1 / -1; }

/* An error under a form. */
.err { margin-top: var(--s2); }

/* Step 4: the land report import beside the PC's buttons, the study map, the quote's notes. */
.inline-ask { display: grid; grid-template-columns: 1fr auto; gap: var(--s2); margin-top: var(--s2); }
@media (max-width: 420px) { .inline-ask { grid-template-columns: 1fr; } }
.studymap { display: block; width: 100%; height: auto; border-radius: var(--r-sm, 6px); margin-bottom: var(--s2); }
.quote__notes summary { cursor: pointer; }
.quote__notes ul { margin: var(--s2) 0 0; padding-left: 1.2em; }

/* Signing on the spot: the pad takes a finger without scrolling the page. */
.sigpad { display: block; width: 100%; background: #fff; border: 1.5px solid var(--line-strong); border-radius: var(--r); touch-action: none; }
label.consent { display: flex; gap: var(--s2); align-items: flex-start; font: var(--t-body); }
label.consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; }

/* Billing (15 Oct 2026): the tracker's figures, small tables, the invoice builder's pick lists. */
.figs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s2); margin-bottom: var(--s3); }
.fig { display: flex; flex-direction: column; gap: 2px; padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r, 8px); }
.fig__label { font: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.fig__value { font: var(--t-title, 600 18px/1.2 var(--font-display, sans-serif)); }
.fig__value small { font: var(--t-label); color: var(--muted); margin-left: var(--s1); }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font: var(--t-body); }
.tbl th, .tbl td { text-align: left; padding: var(--s1) var(--s2); border-top: 1px solid var(--line); vertical-align: top; }
.tbl thead th { font: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); border-top: 0; }
.tbl tfoot th, .tbl tfoot td { font-weight: 600; border-top: 2px solid var(--line-strong, var(--line)); }
.tbl .num { text-align: right; white-space: nowrap; }
.picks { display: flex; flex-direction: column; gap: var(--s1); }
.pick { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s2); align-items: start; padding: var(--s2); border: 1px solid var(--line); border-radius: var(--r, 8px); font: var(--t-body); }
.pick input { width: 22px; height: 22px; margin-top: 2px; }
.pick span { display: flex; flex-direction: column; }
.pick small { color: var(--muted); }

/* The mark goes home (5 Nov 2026): the wordmark on the jobs screen, the mark alone elsewhere. */
a.wordmark { color: inherit; text-decoration: none; }
.appbar__home { display: inline-flex; align-items: center; justify-content: center; width: var(--tap); height: var(--tap); color: inherit; border-radius: var(--r); margin-left: auto; }
.appbar__home svg { width: 26px; height: 26px; }
#sync + .appbar__home, .appbar__end + .appbar__home { margin-left: 0; }

/* Log time on the fly, and the practice overview. */
.choice--hours { margin-bottom: var(--s2); }
.choice--hours span { min-width: 56px; justify-content: center; font-variant-numeric: tabular-nums; }
.screen--wide { max-width: 1120px; }
.figs--lead { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.fig__note { font: var(--t-small); color: var(--muted); }
.tbl__sub { display: block; font: var(--t-small); color: var(--muted); font-weight: 400; }
.tbl th a { color: inherit; }

/* The printable report (#/report): on screen a sheet inside the app; on paper an A4 document with
   none of the app around it. */
.report { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 8px); padding: var(--s4, 16px); margin-top: var(--s4, 16px); }
.report__kicker { margin: 0; font: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--muted); }
.report__title { margin: 4px 0; font: var(--t-title); }
.report__meta, .report__note { margin: 0 0 var(--s2, 8px); color: var(--muted); font: var(--t-small); }
.report__section { margin-top: var(--s5, 24px); }
.report__h { margin: 0 0 var(--s1, 4px); font: var(--t-h2); padding-bottom: 4px; border-bottom: 2px solid var(--ink); }
.report__job { margin: var(--s3, 12px) 0 var(--s1, 4px); font: var(--t-strong); }
.report__figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s2, 8px); }
.report__fig { display: flex; flex-direction: column; gap: 2px; padding: var(--s2, 8px); border: 1px solid var(--line); border-radius: 6px; }
.report__fig span { color: var(--muted); font: var(--t-small); }
.report__fig strong { font-variant-numeric: tabular-nums; font-size: 1.15em; }
.report .tbl { font-size: 14px; }
.report__tbl tbody th { font-weight: 500; }
.choice--multi { gap: 6px; }

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  /* Paper is always light, whatever the screen's theme: (0,3,0)+ beats every theme selector in the skins. */
  :root:root:root, :root:root:root[data-theme] {
    color-scheme: light; --bg: #fff; --surface: #fff; --surface-2: #f2f2f2; --ink: #000; --muted: #444;
    --line: #bbb; --line-strong: #666; --met: #000; --unmet: #000; --unknown: #000;
  }
  body { background: #fff !important; color: #000; }
  .appbar, #bar, .demo-banner, .no-print, .note--stale { display: none !important; }
  .screen { padding: 0 !important; max-width: none !important; }
  .report { border: 0; padding: 0; margin: 0; }
  .report__section { break-inside: auto; }
  .report__h, .report__job { break-after: avoid; }
  .report .tbl tr { break-inside: avoid; }
  .report .tbl thead { display: table-header-group; }
  .tbl-wrap { overflow: visible; }
  a { color: inherit; text-decoration: none; }
}

/* Budget alert sliders (item 3 of the 6 Nov billing entry). */
.slider { display: flex; align-items: center; gap: 12px; }
.slider input[type="range"] { flex: 1; min-width: 0; accent-color: var(--primary); height: 32px; }
.slider__out { min-width: 3.5em; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font: var(--t-small); }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.alert-row + .alert-row { border-top: 1px solid var(--line); padding-top: 8px; }

/* The timer on Log time, and the alerts (6 Nov). */
.timer__top { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.timer__clock { margin-left: auto; font: 600 22px/1 var(--font-text); font-variant-numeric: tabular-nums; }
/* The timer window (#/timer, 1 Dec): laid out for a window about 360 pixels wide, parked beside the work. */
.screen--timer { max-width: 480px; padding-top: var(--s3); gap: var(--s3); }
.timer-who { display: flex; align-items: center; gap: var(--s2); }
.timer-who .label { margin: 0; white-space: nowrap; }
.timer-who .select { flex: 1; min-width: 0; }
.timer__job { display: flex; flex-direction: column; gap: 2px; margin: 0; }
.timer__job small, .timer-recent__go small { color: var(--muted); font: var(--t-small); }
.timer__big { margin: 0; font: 600 44px/1.05 var(--font-text); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.timer--running { border-left: 4px solid var(--primary); }
.timer-recent { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.timer-recent form { margin: 0; }
.timer-recent__go { display: flex; align-items: center; gap: var(--s3); width: 100%; min-height: 52px; padding: 8px 12px; text-align: left;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r); font: inherit; cursor: pointer; }
.timer-recent__go:hover, .timer-recent__go:focus-visible { border-color: var(--line-strong); }
.timer-recent__go span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.timer-recent__go b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appbar__bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--on-brand); opacity: 0.75; }
.appbar__bell--on { opacity: 1; }
.appbar__count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px;
  background: var(--unmet); color: #fff; font: 700 11px/18px var(--font-text); text-align: center; }
.alerts { list-style: none; margin: 0; padding: 0; }
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; }
.alert__main { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.alert__main a { color: var(--ink); font-weight: 600; text-decoration: none; }
.alert--seen .alert__main a { font-weight: 400; color: var(--muted); }
.alert__kind { font: var(--t-label); letter-spacing: var(--track); text-transform: uppercase; color: var(--unmet); }
.alert--seen .alert__kind { color: var(--muted); }

/* A rule between the forms inside one card (settings.js). */
.divider { border-top: 1px solid var(--line); }
