/* logbooks.css : the plant logbooks (wave 11). One sheet, three blocks, appended in this order (CONTRACTS-INDEX c.7):
   L1 (item 01, the Logbooks tab: this block), then L3 (item 03, the book view), then L2 (item 02, the entry form). Each item
   appends its own block between its own BEGIN and END markers and edits no other. No new token: every colour, size and space
   is a declared token of app.css. */

/* ===== L1 BEGIN (item 01, the Logbooks tab) ===== */
/* logbooks.css : L1, the Logbooks tab (wave 11, dw11-006). The rules are 01-logbooks-tab/DESIGN.md section 5, copied; every colour is a declared token
   of ../.impeccable.md; no new token. Shared with 03-book-view (it links this sheet). */
/* RENDER FIX 1 (dw11-006, the first render loop): the built sheet's global [data-mark] rules (app.css l.538 and l.541 at BASE; lines 532 and 535 in the studio's copy) draw a full 2 px box and a
   weight on any element that carries data-mark; the DESIGN's rules set only the top rule, so the other three sides and the weight are reset here first.
   Carried to the contract writer: the face's own rules must reset border before the per-state border-top. */
.log-state, .log-stamp, #log-list-state { border: 0; }
/* RENDER FIX 2 (dw11-006): base.css line 488 (.cards li { padding: 0 }) outranks .card's --s-3 padding, so a bare li.card has none (the built cards put the
   padding on the button inside); the DESIGN's card is "the built .card, --s-3 padding", so the padding is stated on the log card. */
#log-cards > li.log-card { padding: var(--s-3); }
#page-logbooks #log-list > h2:first-child { margin-top: var(--s-2); }
#log-asat { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); margin: 0 0 var(--s-3); }
#log-asat button { min-height: 48px; }
#log-cards { margin-top: 0; }
.log-card-open { display: flex; align-items: center; gap: var(--s-2); min-height: 48px; color: var(--ink); text-decoration: none; }
.log-card-open:hover .log-card-name { text-decoration: underline; }
.log-card-name { flex: 1 1 auto; min-width: 0; font-size: var(--step-1); font-weight: 700; line-height: 1.25; }
.log-yours { flex: 0 0 auto; }
.log-chev { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.log-state { margin: var(--s-2) 0 0; padding-top: var(--s-2); font-size: var(--step-0); line-height: 1.45; }
.log-state[data-state="signed"] { border-top: 3px solid var(--ink); color: var(--ink); }
.log-state[data-state="due"], .log-state[data-state="none"] { border-top: 2px dashed var(--pencil); color: var(--pencil); font-weight: 500; }
:lang(hi) .log-state[data-state="due"], :lang(pa) .log-state[data-state="due"], :lang(hi) .log-state[data-state="none"], :lang(pa) .log-state[data-state="none"] { font-weight: 400; }
.log-state[data-state="overdue"] { border-top: 2px solid var(--late); color: var(--late-ink); font-weight: 700; }
/* D-W11-01-20 (refine dw11-010): in hi-IN and pa-IN the overdue sentence is one weight, 400, as the due and none lines already are (the Indic runs had no 700 face and the Latin times read as a second emphasis) */
:lang(hi) .log-state[data-state="overdue"], :lang(pa) .log-state[data-state="overdue"] { font-weight: 400; }
.log-state[data-state="off"] { border-top: 1px solid var(--rule); color: var(--ink-2); font-weight: 400; }
.log-stamp { color: var(--ink); font-weight: 400; }
.log-stamp-name { font-weight: 700; }
.log-time { white-space: nowrap; }
.log-blank-name { display: inline-block; width: 7rem; height: 1.45em; margin-left: var(--s-2); vertical-align: middle; border: 2px dashed var(--pencil); border-radius: var(--radius-s); }
.log-card-assign { margin: var(--s-1) 0 0; }
.log-assign { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 600; text-decoration: underline; }
.log-key { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: var(--s-3); row-gap: 2px; margin: var(--s-2) 0 0; align-items: baseline; }
.log-key > div { display: contents; }
.log-key dt { color: var(--muted); font-size: var(--step-0); font-weight: 400; }
.log-key dd { margin: 0; text-align: right; }
.log-fig { white-space: nowrap; font-variant-numeric: tabular-nums; }
.log-key .log-num { font-size: var(--step-1); font-weight: 700; color: var(--ink); }
.log-unit { font-size: var(--step-0); font-weight: 400; color: var(--ink); }
/* D-W11-01-17 (refine dw11-010, supersedes the ink 700 line of D-W11-01-07): the no-operation key reads "Last entry: {moment}" (muted 400), then on its own line the flag "No operation / Sunday" (ink 600) */
.log-key-noop { margin: var(--s-2) 0 0; }
.log-noop-flag { display: block; color: var(--ink); font-weight: 600; }
.log-key-when, .log-key-none { margin: var(--s-1) 0 0; }
.log-card-who { margin: var(--s-1) 0 0; }
.log-card-act { margin: var(--s-3) 0 0; }
.log-card-act .key-link { margin: 0; }
#log-list-state[data-mark="pencil"] { padding-top: var(--s-2); border-top: 2px dashed var(--pencil); color: var(--pencil); font-weight: 500; }
#log-list-state button { display: block; min-height: 48px; margin-top: var(--s-2); }
/* D-W11-01-19 (refine dw11-010): the overdue summary under the as-at line, for a reader who holds none of the overdue books */
.log-overdue { margin: 0 0 var(--s-3); padding-top: var(--s-1); border-top: 2px solid var(--late); color: var(--late-ink); font-weight: 600; }
.log-overdue-link { display: inline-flex; align-items: center; min-height: 48px; color: var(--late-ink); font-weight: 700; text-decoration: underline; }
:lang(hi) .log-overdue, :lang(pa) .log-overdue, :lang(hi) .log-overdue-link, :lang(pa) .log-overdue-link { font-weight: 400; }
/* ===== L1 END ===== */

/* ===== L3 BEGIN (item 03, the book view: appended by its builder) ===== */
/* book.css : L3, the book view (wave 11, dw11-006). The rules are 03-book-view/DESIGN.md section 5, copied; it sits beside the L1 block above
   (the shared rules). Every colour is a declared token of ../.impeccable.md; no new token. */
/* RENDER FIX 1 (RF-03-1): the built global [data-mark] rules draw a box on any element with data-mark; the message line resets its border before the pencil rule. */
#log-book-msg { border: 0; }
/* RENDER FIX 2 (RF-03-2): the message line's button is the block 48 px form L1's #log-list-state button has. */
#log-book-msg button { display: block; min-height: 48px; margin-top: var(--s-2); }
#log-book .back { display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-1); color: var(--ink); font-weight: 600; text-decoration: none; }
#log-book .back:hover { text-decoration: underline; }
.log-book-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-2); }
.log-book-head h2 { margin: var(--s-2) 0 0; }
/* D-W11-03-15: the read's moment under the title, L1's as-at words without Refresh */
#log-book-asat { margin: var(--s-1) 0 0; }
#log-book-who { margin: var(--s-1) 0 0; }
#log-book-act { margin: var(--s-3) 0 0; }
#log-book-act .key-link { margin: 0; }
#log-rows { list-style: none; margin: var(--s-4) 0 0; padding: 0; }
.log-day-rows { list-style: none; margin: 0; padding: 0; }
.log-day-head { margin: var(--s-5) 0 var(--s-1); padding: var(--s-1) var(--s-2); background: var(--surface); border-radius: var(--radius-s); color: var(--ink); font-size: var(--step-0); font-weight: 700; }
.log-day:first-child .log-day-head { margin-top: var(--s-2); }
.log-row { padding: var(--s-3) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--s-6); }
.log-row:last-child { border-bottom: 0; }
.log-row:focus { outline: 3px solid var(--ink); outline-offset: 2px; }
.log-figs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-2) var(--s-3); margin: 0; }
.log-cell { min-width: 0; }
.log-cell dt { color: var(--muted); font-size: var(--step-0); font-weight: 400; line-height: 1.3; }
.log-cell dd { margin: 0; }
.log-cell .log-num { font-size: var(--step-1); font-weight: 700; color: var(--ink); }
.log-cell .log-time { font-size: var(--step-1); font-weight: 700; color: var(--ink); }
.log-cell.log-wide { grid-column: 1 / -1; }
.log-fig[data-blank], .log-first { color: var(--pencil); font-weight: 500; font-size: var(--step-0); }
.log-since { display: block; color: var(--pencil); font-weight: 500; font-size: var(--step-0); }
.log-group { grid-column: 1 / -1; }
.log-group + .log-group, .log-group + .log-cell { margin-top: var(--s-1); }
.log-group-name { margin: 0 0 var(--s-1); color: var(--ink-2); font-size: var(--step-0); font-weight: 600; }
.log-row-noop { margin: 0; color: var(--ink); font-weight: 700; }
.log-row-remarks, .log-row-flag, .log-row-corr, .log-row-replaced, .log-row-stamp { margin: var(--s-2) 0 0; }
.log-row-flag { font-weight: 700; }
.log-row-replaced { color: var(--pencil); font-weight: 500; }
.log-row[data-replaced="true"] .log-num, .log-row[data-replaced="true"] .log-unit { color: var(--pencil); font-weight: 500; text-decoration: line-through; text-decoration-thickness: 2px; text-decoration-color: var(--pencil); }
.log-row-link { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 600; text-decoration: underline; }
.log-row-act { margin: var(--s-3) 0 0; }
.log-row-act .key-link { margin: 0; }
.log-correct-until { margin: var(--s-1) 0 0; }
.log-gap { margin: var(--s-3) 0; }
.log-gap .stub { margin: 0; color: var(--pencil); font-weight: 500; }
#log-older { margin: var(--s-5) 0 0; }
#log-older button { min-height: 48px; }
#log-csv { margin: var(--s-5) 0 0; padding-top: var(--s-3); border-top: 1px solid var(--rule); }
#log-csv .export-link { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 700; text-decoration: underline; }
#log-book-msg[data-mark="pencil"] { padding-top: var(--s-2); border-top: 2px dashed var(--pencil); color: var(--pencil); font-weight: 500; }
@media (min-width: 600px) { .log-figs { grid-template-columns: repeat(4, minmax(0, 1fr)); } .log-group .log-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .log-group { grid-column: span 2; } }
@media (prefers-reduced-motion: reduce) { #page-logbooks * { scroll-behavior: auto; } }
/* D-W11-03-18: the link stands on its own line under its sentence, with no separator to dangle */
.log-row-linkwrap { display: block; }
/* ===== L3 END ===== */

/* ===== L2 BEGIN (item 02, the entry form: appended by its builder) ===== */
/* entry.css : L2, the logbook entry form (wave 11, item 02; dw11-002). The rules the builder adds to logbooks.css
   (D-W11-00-11) for the view #/logbooks/<book>/new. Tokens only (D-W11-00-01: no new token); every colour is a
   var() of the built table; the new layout literals are listed in .impeccable.md. Scoped to #page-logbooks .log-new so
   L1 and L3's rules (dw11-001) and the built faces are never touched. */

/* ---------------------------------------------------------------- the head: what, who signs, today's state, the last row */
#page-logbooks .log-new-kind { margin: 0 0 var(--s-1); color: var(--muted); font-size: var(--step-0); font-weight: 600; }
#page-logbooks .log-new > h2 { margin: 0 0 var(--s-2); font-size: var(--step-2); font-weight: 800; line-height: 1.2; }
#page-logbooks .log-new-signer { margin: 0 0 var(--s-2); color: var(--ink); line-height: 1.4; }
#page-logbooks .log-signer-name { font-weight: 700; }

/* today's state, the foundation's component (D-W11-00-06), transcribed for the form's head */
#page-logbooks .log-state { margin: var(--s-2) 0; padding: var(--s-1) 0 0; font-size: var(--step-0); line-height: 1.4; }
#page-logbooks .log-state[data-mark] { border: 0; }
/* the L1/L2 border conflict, resolved as L1's (charter ceo-3108; CONTRACTS-INDEX c.7 missed it): the reset above stands for every
   state; signed and none take back L1's own top rule (L1 section 3), on the tab's cards and on the book view's head line alike */
#page-logbooks .log-state[data-mark][data-state="signed"] { border-top: 3px solid var(--ink); }
#page-logbooks .log-state[data-mark][data-state="none"] { border-top: 2px dashed var(--pencil); }
#page-logbooks .log-state[data-state="due"] { color: var(--pencil); font-weight: 500; border-top: 2px dashed var(--pencil); }
#page-logbooks .log-state[data-state="overdue"] { color: var(--late-ink); font-weight: 700; border-top: 2px solid var(--late); }
#page-logbooks .log-state[data-state="off"] { color: var(--ink-2); font-weight: 400; border-top: 1px solid var(--rule); }

/* the last signed row: the record's own (ink-2 on the surface band), never a control */
#page-logbooks .log-last { margin: var(--s-3) 0 0; padding: var(--s-2) var(--s-3); background: var(--surface); border-radius: var(--radius); }
#page-logbooks .log-last-head { margin: 0; color: var(--ink-2); font-weight: 600; }
#page-logbooks .log-last-stamp { margin: 2px 0 0; color: var(--ink-2); }
#page-logbooks .log-last-flag { margin: 2px 0 0; color: var(--ink); font-weight: 700; }
#page-logbooks .log-fixof-lines { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px var(--s-3); margin: var(--s-2) 0 0; }
#page-logbooks .log-fixof-lines > div { display: contents; }
#page-logbooks .log-fixof-lines dt { margin: 0; color: var(--ink-2); }
#page-logbooks .log-fixof-lines dd { margin: 0; color: var(--ink); text-align: right; }
#page-logbooks .log-fix-hint { margin: var(--s-3) 0 0; color: var(--ink); font-weight: 600; }

/* the stamp line, the foundation's component (D-W11-00-04): ink by the record; the pencil twin before it */
#page-logbooks .log-stamp[data-mark] { border: 0; font-weight: 400; }
#page-logbooks .log-stamp-name { font-weight: 700; }
#page-logbooks .log-last .log-stamp, #page-logbooks .log-last .log-stamp-name { color: var(--ink-2); }
#page-logbooks .log-stamp[data-mark="pencil"] { color: var(--pencil); }
#page-logbooks .log-stamp-slot { display: inline-block; width: 9em; height: 1.5em; vertical-align: middle;
  border: 2px dashed var(--pencil); border-radius: var(--radius-s); }
#page-logbooks .log-time { white-space: nowrap; }

/* ---------------------------------------------------------------- the form */
#page-logbooks .log-form { margin: var(--s-4) 0 0; }
#page-logbooks .log-field { margin: var(--s-5) 0 0; padding: 0; border: 0; min-width: 0; }
#page-logbooks .log-form > .log-field:first-child { margin-top: 0; }
#page-logbooks .log-field > label, #page-logbooks .log-field > legend, #page-logbooks .log-derived-label,
#page-logbooks .log-day-label {
  display: block; margin: 0 0 var(--s-1); padding: 0; color: var(--ink); font-size: var(--step-0); font-weight: 700; line-height: 1.3;
}
#page-logbooks .log-opt { color: var(--muted); font-weight: 500; }
#page-logbooks .log-hint { margin: var(--s-1) 0 0; color: var(--muted); font-size: var(--step-0); line-height: 1.4; }
#page-logbooks .log-hint .log-fig { color: var(--ink-2); font-weight: 600; }
#page-logbooks .log-hint .log-unit { font-weight: 400; }

/* a number box: the figure big, the unit inside the box at its right (shown, never typed), the decimal keypad */
#page-logbooks .log-box { position: relative; }
#page-logbooks .log-input {
  display: block; width: 100%; min-height: var(--target-key); margin: 0; padding: var(--s-2) var(--s-3);
  font-size: var(--step-2); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2;
}
#page-logbooks .log-box .log-input { padding-right: 4.75rem; }
#page-logbooks .log-box > .log-unit {
  position: absolute; right: var(--s-3); top: 50%; transform: translateY(-50%);
  color: var(--ink-2); font-size: var(--step-0); font-weight: 600; pointer-events: none;
}
#page-logbooks .log-input[aria-invalid="true"], #page-logbooks select[aria-invalid="true"],
#page-logbooks .log-date[aria-invalid="true"] { border-width: 4px; }
#page-logbooks .log-err-box { margin: var(--s-2) 0 0; }
#page-logbooks .log-warn { margin: var(--s-2) 0 0; }

/* carried from the last row: the record's figure brought forward, greyed until he changes it */
#page-logbooks .log-carry[data-touched="false"] .log-input { background: var(--surface); color: var(--ink-2); border-color: var(--muted); }
#page-logbooks .log-carry[data-touched="true"] .log-hint { color: var(--ink); font-weight: 600; }
#page-logbooks .log-undo {
  margin: var(--s-2) 0 0; min-height: var(--target-min); padding: var(--s-1) var(--s-3); font-size: var(--step-0);
}

/* the record's figure (derived): no edge, no caret, the surface band; words until signed, a pencil preview at the
   read-back, ink from the answer */
#page-logbooks .log-derived-box {
  display: flex; align-items: center; min-height: var(--target-row); padding: var(--s-2) var(--s-3);
  background: var(--surface); border-radius: var(--radius); color: var(--pencil); font-weight: 500; line-height: 1.3;
}

/* the day: the native date control, today by default, max = today */
#page-logbooks .log-date { display: block; width: 100%; max-width: 15rem; margin: 0; font-size: var(--step-1); font-weight: 700; }
#page-logbooks .log-day-hint { color: var(--ink); font-weight: 600; }
#page-logbooks .log-day-fixed { margin: 0; color: var(--ink); font-weight: 700; }

/* the time picker: hour 1 to 12 · minute · second as three native selects, then AM and PM as two keys */
#page-logbooks .log-hms, #page-logbooks .log-hm {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: 0 var(--s-1);
}
#page-logbooks .log-hm { grid-template-columns: minmax(0, 2fr) auto minmax(0, 1fr); }
#page-logbooks .log-hms-part, #page-logbooks .log-hm-part { display: block; min-width: 0; }
#page-logbooks .log-hms-word { display: block; margin: 0 0 2px; color: var(--ink-2); font-size: var(--step-0); font-weight: 600; }
#page-logbooks .log-hms select {
  width: 100%; min-height: var(--target-row); margin: 0; padding: var(--s-1) var(--s-2);
  font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums;
}
#page-logbooks .log-colon { padding: 0 0 0.6rem; color: var(--ink); font-size: var(--step-1); font-weight: 700; }
#page-logbooks .log-ampm { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin: var(--s-2) 0 0; }
#page-logbooks .log-ampm-key {
  display: flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: var(--target-row);
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font-size: var(--step-1); font-weight: 700; cursor: pointer;
}
#page-logbooks .log-ampm-key input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--ink); }
#page-logbooks .log-ampm-key:has(input:checked) { background: var(--ink); color: var(--bg); }
#page-logbooks .log-ampm-key:has(input:checked) input { accent-color: var(--bg); }
#page-logbooks .log-ampm-key:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }

/* the hour meter: hours and minutes, two boxes, as the meter reads */
#page-logbooks .log-hm .log-input { padding: var(--s-2); text-align: right; }
#page-logbooks .log-hm-part:last-child .log-input { text-align: left; }

/* the STP's groups, the paper's own headings */
#page-logbooks .log-group { margin: var(--s-6) 0 0; padding: 0; border: 0; min-width: 0; }
#page-logbooks .log-group-name {
  float: left; width: 100%; margin: 0 0 var(--s-1); padding: var(--s-2) 0 0; border-top: 2px solid var(--ink);
  font-size: var(--step-1); font-weight: 800; line-height: 1.25;
}
#page-logbooks .log-group-name + * { clear: both; }
#page-logbooks .log-group .log-field { margin-top: var(--s-3); }
#page-logbooks .log-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--s-3); align-items: start; }
#page-logbooks .log-pair .log-input { font-size: var(--step-1); min-height: var(--target-row); }
#page-logbooks .log-pair .log-box .log-input { padding-right: 2.75rem; }
#page-logbooks .log-pair .log-box > .log-unit { right: var(--s-2); }
#page-logbooks .log-pair > .log-derived { grid-column: 1 / -1; }

/* the flag key (No operation / Sunday) and the meter-reset key: a 56 px line with its box */
#page-logbooks .log-flag-key, #page-logbooks .log-field > label.log-flag-key {
  display: flex; align-items: center; gap: var(--s-3); min-height: var(--target-row); padding: var(--s-2) var(--s-3);
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--bg); color: var(--ink);
  font-weight: 700; cursor: pointer;
}
#page-logbooks .log-flag-key input { flex: none; width: 1.5rem; height: 1.5rem; margin: 0; accent-color: var(--ink); }
#page-logbooks .log-flag-key:has(input:checked) { border-width: 3px; background: var(--surface); }
#page-logbooks .log-reset { margin: var(--s-3) 0 0; }

#page-logbooks .log-text textarea { margin: 0; min-height: 72px; }

/* ---------------------------------------------------------------- the read-back and the result */
#page-logbooks .log-new .readback, #page-logbooks .log-new .result { margin-top: var(--s-3); }
#page-logbooks .log-new .readback > h2, #page-logbooks .log-new .result > h2 {
  margin: 0 0 var(--s-2); font-size: var(--step-2); font-weight: 800; line-height: 1.2; color: inherit;
}
#page-logbooks .log-rb-lines { margin: var(--s-2) 0 0; }
#page-logbooks .log-rb-line {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 var(--s-3);
  padding: var(--s-2) 0; border-bottom: 1px solid var(--rule);
}
#page-logbooks .log-rb-line dt { margin: 0; color: inherit; font-weight: 600; }
#page-logbooks .log-rb-line dd { margin: 0; font-size: var(--step-1); font-weight: 700; text-align: right; }
#page-logbooks .readback .log-rb-line dd { font-weight: 600; }
#page-logbooks .log-rb-line .log-num { font-size: var(--step-2); }
#page-logbooks .log-rb-line .log-unit { font-size: var(--step-0); font-weight: 400; }
#page-logbooks .log-fig { white-space: nowrap; font-variant-numeric: tabular-nums; }
#page-logbooks .log-blank { font-weight: 500; color: var(--pencil); }
#page-logbooks .log-pre { display: block; }
#page-logbooks .log-pre .log-num { font-weight: 500; }
#page-logbooks .log-pre-note { display: block; margin: 2px 0 0; font-size: var(--step-0); font-weight: 500; text-align: right; }
#page-logbooks .log-rb-line .amend-mark { display: block; }
#page-logbooks .log-rb-line .amend-was { display: block; margin: 2px 0 0; font-size: var(--step-0); }
#page-logbooks .log-rb-line .amend-orig .log-num { font-size: var(--step-0); }
#page-logbooks .log-was { margin: var(--s-1) 0 0; }
#page-logbooks .log-rb-sig { margin: var(--s-3) 0 0; }
#page-logbooks .log-rb-note { margin: var(--s-1) 0 0; }
#page-logbooks .log-rb-err { margin: 0 0 var(--s-3); padding: 0 0 var(--s-3); border-bottom: 2px solid var(--ink); color: var(--ink); }
#page-logbooks .readback[aria-busy="true"] .mark-word::after { content: "\2026"; }
#page-logbooks .log-res-stamp { margin: 0 0 var(--s-2); }
#page-logbooks .result .mark-word { font-size: var(--step-1); }
#page-logbooks .log-res-window, #page-logbooks .log-res-fix { margin: var(--s-3) 0 0; color: var(--ink-2); font-weight: 400; }
#page-logbooks .log-res-keys, #page-logbooks .log-refused-keys { display: grid; gap: var(--gap); margin: var(--s-3) 0 0; }
#page-logbooks .log-refused { margin: var(--s-3) 0 0; }
#page-logbooks .log-refused-who { color: var(--ink); }
#page-logbooks .log-err-sum { margin: var(--s-3) 0 0; }
#page-logbooks .log-err-sum a { color: inherit; }

/* ---------------------------------------------------------------- the dock (the built fixed row, S01 D-05 · D-08) */
#page-logbooks .log-dock {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--gap-panel); align-items: end;
  margin: var(--s-5) 0 0; padding: var(--s-3) 0 0; border-top: 2px solid var(--ink);
}
#page-logbooks .log-dock .key-back { grid-column: 1; min-height: var(--target-key); padding: var(--s-2); font-size: var(--step-0); }
#page-logbooks .log-dock .key-next { grid-column: 2; min-height: var(--target-key); padding: var(--s-2) var(--s-3); font-size: var(--step-1); line-height: 1.2; }
#page-logbooks .log-dock .key-record { grid-column: 2; min-height: var(--target-record); padding: var(--s-2) var(--s-3); font-size: var(--step-2); line-height: 1.2; }
#page-logbooks .log-dock .key-record:disabled { background: var(--bg); color: var(--muted); border-color: var(--muted); border-style: dashed; }
@media (max-width: 899.98px) {
  body.in-flow #page-logbooks .log-dock {
    position: sticky; bottom: 0; z-index: 5; padding: var(--s-3) 0; padding-bottom: max(var(--s-3), var(--sa-bottom)); background: var(--bg);
  }
  body.in-flow #page-logbooks .log-field, body.in-flow #page-logbooks .err { scroll-margin-bottom: calc(var(--target-record) + 2rem); }
}
@media (min-width: 900px) {
  #page-logbooks .log-new { max-width: 40rem; }
}
@media (prefers-reduced-motion: reduce) {
  #page-logbooks .log-new * { transition: none; }
}

/* render loop 1 (LOOK.md): the built input rule gives every input 48 px and padding; a box or a radio takes neither;
   a native select never sets the column's width */
#page-logbooks .log-flag-key input, #page-logbooks .log-ampm-key input { min-height: 0; padding: 0; border: 0; }
#page-logbooks .log-hms select { min-width: 0; max-width: 100%; }
#page-logbooks .log-form, #page-logbooks .log-field, #page-logbooks .log-group { max-width: 100%; }

/* resume (dw11-004): the loading line and the read refusal before the form exists (D-W11-02-14) */
#page-logbooks .log-load { margin: var(--s-3) 0 0; padding: var(--s-2) 0 0; border-top: 2px dashed var(--pencil); color: var(--pencil); font-weight: 500; }
:lang(hi) #page-logbooks .log-load, :lang(pa) #page-logbooks .log-load { font-weight: 400; }
#page-logbooks .log-retry { display: block; min-height: var(--target-min); margin: var(--s-3) 0 0; padding: var(--s-2) var(--s-4); font-size: var(--step-0); }
#page-logbooks .log-count:not([hidden]) { color: var(--ink); font-weight: 600; }

/* resume (dw11-004), render loop 1 (LOOK.md): the day on one line (label beside the control) so the first box rises
   on the first screen; a refusal and a warning told apart by more than words: a refusal sits under a 4 px ink rule (the
   box's own 4 px edge repeats it), a warning under a 2 px dashed pencil rule (the state line's own form, D-W11-00-06) (the box keeps its 2 px edge: you may sign) */
#page-logbooks .log-day { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-3); align-items: center; }
#page-logbooks .log-day > label, #page-logbooks .log-day > .log-day-label { grid-column: 1; margin: 0; }
#page-logbooks .log-day > .log-date, #page-logbooks .log-day > .log-day-fixed { grid-column: 2; max-width: none; }
#page-logbooks .log-day > .log-hint, #page-logbooks .log-day > .log-err-box { grid-column: 1 / -1; }
#page-logbooks .log-err-box { padding-top: var(--s-1); border-top: 4px solid var(--ink); }
#page-logbooks .log-warn { padding-top: var(--s-1); border-top: 2px dashed var(--pencil); font-weight: 600; }
/* render loop 2 (LOOK.md): at 360 px a paired box hid its last digit under the unit ("1886.955" read "1886.95");
   the pair's figure starts nearer the edge and the unit takes less room, so eight characters and a unit fit */
#page-logbooks .log-pair .log-box .log-input { padding-left: var(--s-2); padding-right: 2.25rem; }
#page-logbooks .log-pair .log-box > .log-unit { right: var(--s-1); font-size: var(--step--1); }

/* refine (dw11-011), critic P1-1 (D-W11-02-22): the head gives back about 100 px so the figure to type is on the first
   screen at 360 x 780. A new row draws no kind line (a correction keeps "Correction"); the signer is one short line; the
   last-row band is one sentence without its own heading, the moment first; the state line and the gaps tighten on a phone. */
#page-logbooks .log-new > h2 { margin-bottom: var(--s-1); }
#page-logbooks .log-new-signer { margin-bottom: 0; }
#page-logbooks .log-state { margin: var(--s-2) 0 var(--s-1); }
#page-logbooks .log-last { margin-top: var(--s-2); padding: var(--s-1) var(--s-3); }
#page-logbooks .log-last-stamp { margin: 0; }
#page-logbooks .log-fixof { padding: var(--s-2) var(--s-3); }
#page-logbooks .log-fixof .log-last-stamp { margin-top: 2px; }
@media (max-width: 899.98px) {
  #page-logbooks .log-form { margin-top: var(--s-3); }
  #page-logbooks .log-field { margin-top: var(--s-4); }
  #page-logbooks .log-form > .log-field:first-child { margin-top: 0; }
  #page-logbooks .log-group .log-field { margin-top: var(--s-3); }
}

/* refine (dw11-011), RUL R-9 (D-W11-02-23): the hour meter's unit after the pair of boxes, as every figure shows its unit;
   the two boxes take the pair's 56 px height (D-W11-02-22) */
#page-logbooks .log-hm { grid-template-columns: minmax(0, 2fr) auto minmax(0, 1fr) auto; }
#page-logbooks .log-hm .log-input { min-height: var(--target-row); }
#page-logbooks .log-hm > .log-hm-unit { padding: 0 0 1rem; color: var(--ink-2); font-size: var(--step-0); font-weight: 600; }

/* refine (dw11-011), critic P2-1 (D-W11-02-24): a pair's shared hint, one line under the group heading */
#page-logbooks .log-group-hint { margin: 0 0 var(--s-1); }

/* refine (dw11-011), critic P2-7 (D-W11-02-26): the read-back's question in ink at step 1, 700 (the pencil stays on the
   frame, "Not recorded yet" and the stamp slot), so it reads as a question, not as a disabled line */
#page-logbooks .log-new .readback > h2 { color: var(--ink); font-size: var(--step-1); font-weight: 700; }

/* refine (dw11-011), critic P2-8 (D-W11-02-29): the link back to the struck row */
#page-logbooks .log-res-fix-link { color: var(--ink); font-weight: 600; text-decoration: underline; }
/* CONTRACTS-INDEX c.3 / OPT-02-1 default (L1's E-01-6): the overdue sentence at 400 in hi-IN and pa-IN, 700 in en-IN, so the
   three faces read one sentence one way */
#page-logbooks .log-state[data-state="overdue"]:lang(hi), #page-logbooks .log-state[data-state="overdue"]:lang(pa) { font-weight: 400; }
/* ===== L2 END ===== */

/* ===== W11-FIX BEGIN (build-wave-11-fix, ceo-3108: the first-screen rows of the logbook faces) ===== */
/* T-L3-13, T-L3-14: the form's day field (#page-logbooks .log-day, a two-column grid, L2 section 3) shares its class with the
   book view's day group (li.log-day, L3 section 2.1); the day group stays a block, so its rows take the page's width */
#page-logbooks #log-rows .log-day { display: block; }
/* T-L3-14: below 420 px a figure wraps inside its cell rather than widen the page (the number and its unit stay joined by U+00A0) */
@media (max-width: 419.98px) {
  #page-logbooks .log-fig { white-space: normal; overflow-wrap: break-word; }
}
/* T-L3-13 at 360 x 780: below 390 px the book view gives back about 21 px above the newest row, so its stamp and its Correct key
   stand above the bar (the who line runs to three lines at that width): the title sits under the back link, the rows start
   one step nearer the act, and the Correct key one step nearer its stamp */
@media (max-width: 389.98px) {
  #page-logbooks .log-book-head h2 { margin-top: 0; }
  #page-logbooks #log-rows { margin-top: var(--s-2); }
  #page-logbooks #log-rows .log-row-act { margin-top: var(--s-2); }
}
/* ===== W11-FIX END ===== */
