/* The look of Process Documents: a quiet grey desk, white sheets, one typeface.
   Color carries meaning and nothing else: blue is something you can act on, green is done,
   red is waiting or needs attention, grey is settled or has nothing to do.
   Layout: you pick one property address; its numbered steps run down the left, the document for the chosen step lies beside it,
   and what the client sees sits in its own column on the right. */
:root {
  --canvas: #f5f5f7;
  --surface: #ffffff;
  --panel: #f5f5f7;
  --ink: #1d1d1f;
  --soft: #6a6a6f;
  --faint: #86868b;
  --rule: rgba(60, 60, 67, .14);
  --rule-strong: rgba(60, 60, 67, .3);
  --fill: rgba(118, 118, 128, .12);
  --fill-strong: rgba(118, 118, 128, .2);
  --fill-faint: rgba(118, 118, 128, .06);
  --thumb: #ffffff;
  --thumb-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px rgba(0, 0, 0, .05);
  --blue: #0066cc;
  --blue-solid: #0071e3;
  --blue-soft: rgba(0, 113, 227, .1);
  --blue-ring: rgba(0, 113, 227, .42);
  --green: #1a7a34;
  --green-soft: rgba(52, 199, 89, .16);
  --red: #d70015;
  --red-solid: #d70015;
  --red-soft: rgba(255, 59, 48, .1);
  --on-solid: #ffffff;
  --focus: rgba(0, 113, 227, .5);
  --veil: rgba(0, 0, 0, .4);
  --shadow: 0 0 0 1px rgba(0, 0, 0, .03), 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
  --shadow-lift: 0 0 0 1px rgba(60, 60, 67, .12), 0 6px 22px rgba(0, 0, 0, .08);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #000000; --surface: #1c1c1e; --panel: #2c2c2e; --ink: #f5f5f7; --soft: #a1a1a6; --faint: #6e6e73;
    --rule: rgba(120, 120, 128, .3); --rule-strong: rgba(120, 120, 128, .55);
    --fill: rgba(118, 118, 128, .24); --fill-strong: rgba(118, 118, 128, .36); --fill-faint: rgba(118, 118, 128, .12);
    --thumb: #636366; --thumb-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    --blue: #40a0ff; --blue-solid: #0071e3; --blue-soft: rgba(10, 132, 255, .2); --blue-ring: rgba(64, 160, 255, .6);
    --green: #30d158; --green-soft: rgba(48, 209, 88, .18);
    --red: #ff6961; --red-solid: #d70015; --red-soft: rgba(255, 69, 58, .18);
    --on-solid: #ffffff; --focus: rgba(64, 160, 255, .65); --veil: rgba(0, 0, 0, .55);
    --shadow: 0 0 0 1px rgba(255, 255, 255, .07); --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 22px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #000000; --surface: #1c1c1e; --panel: #2c2c2e; --ink: #f5f5f7; --soft: #a1a1a6; --faint: #6e6e73;
  --rule: rgba(120, 120, 128, .3); --rule-strong: rgba(120, 120, 128, .55);
  --fill: rgba(118, 118, 128, .24); --fill-strong: rgba(118, 118, 128, .36); --fill-faint: rgba(118, 118, 128, .12);
  --thumb: #636366; --thumb-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  --blue: #40a0ff; --blue-solid: #0071e3; --blue-soft: rgba(10, 132, 255, .2); --blue-ring: rgba(64, 160, 255, .6);
  --green: #30d158; --green-soft: rgba(48, 209, 88, .18);
  --red: #ff6961; --red-solid: #d70015; --red-soft: rgba(255, 69, 58, .18);
  --on-solid: #ffffff; --focus: rgba(64, 160, 255, .65); --veil: rgba(0, 0, 0, .55);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .07); --shadow-lift: 0 0 0 1px rgba(255, 255, 255, .12), 0 6px 22px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font: 400 15px/1.45 var(--font);
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-block: 20px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
::selection { background: var(--blue-ring) }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit }
::placeholder { color: var(--faint); opacity: 1 }
a { color: var(--blue); text-decoration: none }
a:not([class]):hover { text-decoration: underline }
b, strong { font-weight: 600 }

/* three columns: the A&P view, the document, the Client view */
.app { max-width: 1880px; margin: 0 auto; display: grid; grid-template-columns: 320px minmax(0, 1fr) 300px; grid-template-areas: "rail main crail"; gap: 24px; align-items: start }
#rail { grid-area: rail }
#main { grid-area: main }
#crail { grid-area: crail }

/* a view: its name, its two tabs, and the steps down one line */
.rail { box-sizing: border-box; background: var(--surface); color: var(--ink); border-radius: 20px; padding: 20px 16px 18px; box-shadow: var(--shadow); position: sticky; top: calc(12px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 24px); overflow-y: auto }
.rail.client { box-shadow: var(--shadow), inset 0 0 0 1.5px var(--blue-ring) }
.rail .more { margin: 14px 0 0; font-size: 13px }
.rail h1 { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em }
.rail .who { margin: 2px 0 14px; font-size: 13px; color: var(--soft) }
.tabs { display: flex; gap: 2px; margin: 0 0 16px; padding: 2px; border-radius: 10px; background: var(--fill) }
.tab { flex: 1 1 0; padding: 5px 8px; border-radius: 8px; color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: center; text-decoration: none }
.tab:hover { background: var(--fill) }
.tab.on { background: var(--thumb); font-weight: 600; box-shadow: var(--thumb-shadow) }
.tab.pair { box-shadow: inset 0 0 0 1.5px var(--blue-ring) }
.tab.on.pair { box-shadow: var(--thumb-shadow), inset 0 0 0 1.5px var(--blue-ring) }
.steps { list-style: none; margin: 0; padding: 0; position: relative }
.steps li { position: relative }
.steps li.s::after, .steps li.mid::after { content: ""; position: absolute; left: 16px; top: 24px; bottom: -24px; width: 2px; border-radius: 1px; background: var(--rule-strong) }
.steps li.mid::after { top: 0 }
.steps li.end::after { content: none }
.steps .ctl { padding: 4px 0 8px 44px }
.steps .ctl + .ctl, .steps li + .ctl { margin-top: 8px }
.steps .ctl.sec { margin-top: 14px; padding-bottom: 2px }
.steps .ctl.sec h2 { margin: 0 }
.steps .prop { margin: 0; font-weight: 600 }
.ctl h2 { margin: 0 0 6px; font-size: 12.5px; line-height: 1.3; font-weight: 600; color: var(--soft) }
.ctl .row { display: flex; gap: 6px; align-items: center }
.ctl .wk { flex: 1 1 auto; min-width: 0; text-align: center; font-weight: 600 }
.ctl .now { display: block; margin-top: 5px; font-size: 12.5px }
.ctl span.now { color: var(--soft) }
.ctl .btn.sm { margin-top: 6px }
.step { position: relative; z-index: 1; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; align-items: start; margin: 0 -8px; padding: 7px 8px; border-radius: 12px; color: inherit; text-decoration: none }
a.step:hover { background: var(--fill) }
.step .n { box-sizing: border-box; width: 30px; height: 30px; margin: 0 2px; border: 1.5px solid var(--red); border-radius: 50%; background: var(--surface); color: var(--red); font-size: 14px; font-weight: 600; line-height: 27px; text-align: center; font-variant-numeric: tabular-nums }
.step .n.sm { font-size: 11.5px; letter-spacing: -.03em }
.step .t { display: block; padding-top: 5px; font-size: 14.5px; line-height: 1.25; font-weight: 600; letter-spacing: -.012em }
.step .s { display: block; margin-top: 1px; font-size: 12.5px; line-height: 1.32; color: var(--soft) }
.step.tr .t { padding-right: 52px }
.step.on, a.step.on:hover { background: var(--blue-soft) }
.step.on .t { color: var(--blue) }
.step.pair { box-shadow: inset 0 0 0 1.5px var(--blue-ring) }
.step.done .n { border-color: var(--green); background: linear-gradient(var(--green-soft), var(--green-soft)), var(--surface); color: var(--green) }
.step.done .s { color: var(--green) }
.step.late .s { color: var(--red); font-weight: 600 }
.step.off .t, .step.off .s { opacity: .5 }
.step.off .n { border-color: color-mix(in srgb, var(--red) 38%, var(--surface)); color: color-mix(in srgb, var(--red) 38%, var(--surface)) }
.step.none .n { border-style: dashed }
.step.none .t { font-weight: 500; color: var(--soft) }
/* a step the client has no page for is quiet: grey, not waiting-red */
.rail.client .step.none .n { border-color: var(--faint); color: var(--soft) }
/* the inbox: a small square, and the count beside each seat */
.step .n.ic { display: grid; place-items: center; border: 0; border-radius: 9px; background: linear-gradient(var(--blue-soft), var(--blue-soft)), var(--surface); color: var(--blue); line-height: 0 }
.step.wait .n.ic { background: linear-gradient(var(--red-soft), var(--red-soft)), var(--surface); color: var(--red) }
.step.none .n.ic, .step.off .n.ic { background: linear-gradient(var(--fill), var(--fill)), var(--surface); color: var(--faint) }
/* what sits beside a step and is not a step of its own (the Scheduling Lead, beside step 4): a smaller row under that step */
.step.side { padding-top: 4px; padding-bottom: 5px }
.step.side .n.ic { width: 22px; height: 22px; margin: 2px 6px 0; border-radius: 7px }
.step.side .n.ic svg { width: 13px; height: 11px }
.step.side .t { padding-top: 2px; font-size: 13.5px }
.tray { position: absolute; top: 8px; right: 0; z-index: 2; display: inline-flex; align-items: center; gap: 4px; box-sizing: border-box; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--fill); color: var(--soft); font-size: 12px; line-height: 1; text-decoration: none }
.tray:hover { background: var(--fill-strong) }
.tray svg, .step .n.ic svg { display: block }
.tray b { font-weight: 600; font-variant-numeric: tabular-nums }
.tray.has { color: var(--ink) }
.tray.has b { box-sizing: border-box; min-width: 16px; padding: 2px 4px; border-radius: 999px; background: var(--red-solid); color: var(--on-solid); font-size: 11px; text-align: center }
.tray.on { background: var(--blue-soft); color: var(--blue) }

/* buttons: the filled blue one moves the document on; the tinted one adds or saves; the grey one is everything else */
.btn { box-sizing: border-box; min-height: 34px; padding: 6px 16px; border: 0; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 14px; line-height: 1.2; font-weight: 600; cursor: pointer; transition: background-color .15s ease, filter .15s ease }
.btn:hover { filter: brightness(.95) }
.btn.go { background: var(--blue-solid); color: var(--on-solid) }
.btn.quiet { background: var(--fill); color: var(--ink); font-weight: 500 }
.btn.warn { background: var(--red-solid); color: var(--on-solid) }
.btn.sq { min-width: 34px; padding: 0; font-size: 17px; line-height: 1 }
.btn.sm, .pick .line .btn, .ppl .btn, .fb > .act .btn, .tasks .btn, .tpl tr.req .btn { min-height: 26px; padding: 3px 11px; font-size: 12.5px }
.btn:disabled { background: var(--fill); color: var(--faint); filter: none; cursor: not-allowed }
a.btn, label.btn { display: inline-flex; align-items: center; text-decoration: none }
label.btn { cursor: pointer }
.btn:focus-visible, .step:focus-visible, .tab:focus-visible, .tray:focus-visible, a:focus-visible, .parts button:focus-visible, .part > h3 button:focus-visible, .lnk:focus-visible, .seg input:focus-visible + span, input[type="checkbox"]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }

/* the desk beside the steps */
.desk { min-width: 0; container: desk / inline-size }
.tools { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; min-height: 34px; margin: 0 0 12px }
.tools .ctx { margin: 0 auto 0 0; font-size: 15px; font-weight: 600; letter-spacing: -.012em }
.save { font-size: 13px; color: var(--soft) }
.save.bad { color: var(--red); font-weight: 600 }
/* something typed on this page that only its button keeps */
.save.wait { color: var(--red) }
.note { margin: 0 0 12px; max-width: 70ch }

/* a document: one white sheet */
.paper { position: relative; box-sizing: border-box; max-width: 1180px; background: var(--surface); color: var(--ink); border-radius: 20px; padding: 30px 32px 32px; box-shadow: var(--shadow) }
.paper h2 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.024em; text-wrap: balance }
.paper .route { margin: 7px 0 14px; font-size: 13.5px; color: var(--soft) }
.paper h3 { margin: 24px 0 6px; font-size: 19px; line-height: 1.25; font-weight: 600; letter-spacing: -.016em }
.paper h3 small { margin-left: 6px; font-size: 13px; font-weight: 400; letter-spacing: -.006em; color: var(--soft) }
.paper p { margin: 6px 0 }
.paper .fine { margin-top: -1px; font-size: 13.5px; color: var(--soft) }
.stamp { display: inline-block; margin: 0 0 8px; padding: 5px 12px; border-radius: 10px; background: var(--fill); font-size: 14px; font-weight: 600 }
.stamp.ok { background: var(--green-soft); color: var(--green) }
.stamp.late { background: var(--red-soft); color: var(--red) }
.stamp.lock { color: var(--soft) }
.q { color: var(--red); font-weight: 600 }
.gate { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--red) }
.foot { margin-top: 4px; font-size: 13.5px; color: var(--soft) }
.need { color: var(--red); font-weight: 600 }
.soft { color: var(--soft) }
.okt { color: var(--green) }
.when { margin-left: 4px; font-size: 12.5px; font-weight: 400; color: var(--soft); white-space: nowrap }
.act { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 18px }
.act .fine { margin: 0; color: var(--ink) }
.lnk { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; font-weight: 500; cursor: pointer }
.lnk:hover { text-decoration: underline }
.lnk.sm { font-size: 12.5px }
.pl { white-space: nowrap }
.refs b { color: var(--ink) }

/* blanks you type in, and boxes you tick */
.f { box-sizing: border-box; width: 10.5em; max-width: 100%; height: 30px; padding: 0 9px; border: 0; border-radius: 8px; background: var(--fill); color: var(--ink); transition: background-color .12s ease, box-shadow .12s ease }
.f:hover { background-color: var(--fill-strong) }
.f:focus, .ta:focus { outline: none; background-color: var(--surface); box-shadow: 0 0 0 1.5px var(--blue-solid), 0 0 0 4.5px var(--focus) }
.f:disabled { opacity: 1; background-color: var(--fill-faint); color: var(--ink); -webkit-text-fill-color: var(--ink) }
.f.w1 { width: 3.6em }
.f.w2 { width: 5.2em }
.f.w3 { width: 8.2em }
.f.w4 { width: 13em }
.f.w5 { width: 17em }
.f.w6 { width: 30em }
.f.wf { width: 100% }
.f.bad { background-color: var(--red-soft); color: var(--red); box-shadow: inset 0 0 0 1px var(--red) }
.f.bad:focus { box-shadow: 0 0 0 1.5px var(--red), 0 0 0 4.5px var(--red-soft) }
select.f, .ctl select, .pickr { -webkit-appearance: none; appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 14'%3E%3Cpath d='M2 5.2l3-3 3 3M2 8.8l3 3 3-3' fill='none' stroke='%2386868b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 9px 13px; cursor: pointer }
select.f:disabled { background-image: none; cursor: default }
.ctl select { flex: 1 1 auto; min-width: 0; height: 34px; padding-left: 11px; border: 0; border-radius: 10px; background-color: var(--fill); color: var(--ink); font-weight: 500 }
.pickr { height: 36px; max-width: 100%; padding-left: 12px; border: 0; border-radius: 10px; background-color: var(--fill); color: var(--ink); font-weight: 600 }
/* a long choice is shown whole: it wraps inside its box and the box grows, so nothing is ever cut off. A short choice looks as it always did */
select.f, .ctl select, .pickr { height: auto; white-space: normal; overflow-wrap: anywhere; text-overflow: clip }
select.f { min-height: 30px; padding-top: 4px; padding-bottom: 4px }
.ctl select { min-height: 34px; padding-top: 6px; padding-bottom: 6px }
.pickr { min-height: 36px; padding-top: 7px; padding-bottom: 7px }
.ctl select:hover, .pickr:hover { background-color: var(--fill-strong) }
.ctl select:focus-visible, .pickr:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }
.ctl select:disabled { color: var(--faint); cursor: default }
input[type="checkbox"] { -webkit-appearance: none; appearance: none; flex: none; box-sizing: border-box; width: 18px; height: 18px; margin: 0; border: 1.5px solid var(--rule-strong); border-radius: 5.5px; background: var(--surface) no-repeat center / 12px 12px; vertical-align: -3px; cursor: pointer; transition: background-color .12s ease, border-color .12s ease }
input[type="checkbox"]:checked { border-color: var(--blue-solid); background-color: var(--blue-solid); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.5l2.3 2.3 4.5-5.3' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") }
input[type="checkbox"]:disabled { opacity: .6; cursor: default }
.ck { display: inline-flex; gap: 8px; align-items: flex-start; cursor: pointer }
.ck input { margin-top: 2px }
td .ck input { margin-top: 0 }
.checks { display: flex; flex-wrap: wrap; gap: 6px 22px }
.cols { columns: 2 250px; column-gap: 26px }
.cols .ck { display: flex; break-inside: avoid; padding: 2px 0 }
.pairs { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline }
.pairs label { min-width: 0; max-width: 100%; white-space: nowrap }
.ta { display: block; box-sizing: border-box; width: 100%; max-width: 560px; min-height: 76px; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--fill); font: inherit; letter-spacing: inherit; color: inherit; resize: vertical; transition: background-color .12s ease, box-shadow .12s ease }
.ta.sm { min-height: 48px; max-width: none }
.part .in .ta.sm { max-width: 640px }
.ask { margin: 12px 0 4px }
.notes { max-width: 560px; white-space: pre-wrap }
.notes.wide { max-width: 780px }

/* Yes or No: one switch, the chosen side lifted */
.yn { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--rule) }
.yn:last-child { border-bottom: 0 }
.yn > span:first-child { flex: 1 1 260px; min-width: 0 }
.seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--fill) }
.seg label { position: relative; cursor: pointer }
.seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer }
.seg span { display: block; min-width: 44px; padding: 3px 12px; border-radius: 7px; color: var(--soft); font-size: 13.5px; font-weight: 500; text-align: center }
.seg input:checked + span { background: var(--thumb); color: var(--ink); font-weight: 600; box-shadow: var(--thumb-shadow) }
/* a Yes or No that can no longer be changed */
.seg.ro { background: var(--fill-faint) }
.seg.ro label, .seg.ro input { cursor: default }
.seg.ro span { color: var(--faint) }
.seg.ro input:checked + span { background: var(--fill-strong); color: var(--ink); box-shadow: none }

/* tables: quiet column names, one hairline under each row */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 0 36px; align-items: start }
.reg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; align-items: start }
.scroll { overflow-x: auto; margin: -5px; padding: 5px }
table { width: 100%; border-collapse: collapse; font: inherit; color: inherit }
th { padding: 4px 14px 6px 0; border-bottom: 1px solid var(--rule-strong); font-size: 12.5px; line-height: 1.25; font-weight: 600; color: var(--soft); text-align: left; vertical-align: bottom }
td { padding: 5px 14px 5px 0; border-bottom: 1px solid var(--rule); vertical-align: baseline }
th:last-child, td:last-child { padding-right: 0 }
td.nw { white-space: nowrap }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums }
td .stamp { margin: 2px 0; padding: 3px 9px; border-radius: 8px; font-size: 12.5px; white-space: nowrap }
td.wh { white-space: nowrap }
td.wh small { display: block; font-size: 12.5px; color: var(--soft) }
.scroll table.w5 { min-width: 540px }
.scroll table.w6 { min-width: 660px }
.scroll table.w7 { min-width: 780px }
tr.moot td { color: var(--soft) }
tr.sum td { border-bottom: 0; border-top: 1px solid var(--rule-strong); font-weight: 600 }
.items { margin: 0; padding: 0; list-style: none; font-size: 14px }
.props td, .tasks td { vertical-align: top }
.tpl td.lk { width: 46% }
.tpl td.lk a { overflow-wrap: anywhere }
.tpl > tbody > tr:not(.req) > td:nth-child(2) { font-weight: 600 }
table.codes { max-width: 560px; margin: 2px 0 10px }
table.codes th:first-child, table.codes td:first-child { width: 58% }
table.codes.wide { max-width: 780px }
table.codes.wide th:first-child, table.codes.wide td:first-child { width: 38% }
table.codes.wide th:nth-child(2), table.codes.wide td:nth-child(2) { width: 27% }
/* while it is being filled in, each blank is its own shape, so the row rules step back */
table.codes.edit td { padding-top: 5px; border-bottom: 0 }
/* a short list written line by line: what it is, and how many */
table.codes.two { max-width: 560px }
table.codes.two th:first-child, table.codes.two td:first-child { width: 76% }
/* the reports with nothing to schedule: a quiet list under the boxes */
table.cond { max-width: 760px }
table.cond td { color: var(--soft) }
table.cond td:first-child { width: 44%; color: var(--ink) }
/* the valuables: where each is kept needs the room of a sentence */
#list-valuables th:first-child, #list-valuables td:first-child { width: 30% }
#list-valuables th:nth-child(2), #list-valuables td:nth-child(2) { width: 44% }
.hist { max-width: 660px }
.hist table.codes { margin: 0 0 4px }
.hist .notes { margin: 0 0 10px }

/* lists you pick from */
.pick { list-style: none; margin: 8px 0 10px; padding: 0 }
.pick li { border-bottom: 1px solid var(--rule) }
.pick a { display: block; margin: 0 -10px; padding: 10px; border-radius: 10px; font-size: 16px; font-weight: 600; letter-spacing: -.012em; text-decoration: none }
.pick a:hover { background: var(--fill) }
.pick small { margin-left: 8px; font-size: 13px; font-weight: 400; letter-spacing: -.006em; color: var(--soft) }
.pick .line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: space-between; padding: 9px 0; font-size: 16px; font-weight: 600; letter-spacing: -.012em }

/* a quiet inset inside a sheet: something to add, a line of blanks, what is already on file */
.add { margin: 12px 0 14px; padding: 14px 16px 16px; border-radius: 14px; background: var(--panel) }
.add h3 { margin-top: 0 }
.pform { align-items: flex-end; margin: 10px 0 6px; padding: 12px 14px; border-radius: 14px; background: var(--panel) }
.pform label { white-space: normal }
.add .f, .add .ta, .pform .f, .pform .ta { background-color: var(--surface) }
.add .f:hover, .pform .f:hover { background-color: var(--surface); box-shadow: inset 0 0 0 1px var(--rule-strong) }
.add .f:focus, .pform .f:focus { box-shadow: 0 0 0 1.5px var(--blue-solid), 0 0 0 4.5px var(--focus) }
.kept { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px 18px; margin: 6px 0 8px; padding: 12px 14px; border-radius: 12px; background: var(--panel) }
.kept div { min-width: 0; overflow-wrap: anywhere }
.kept span { display: block; font-size: 12.5px; color: var(--soft) }
.kept b.soft { font-weight: 400 }
/* a long answer takes the whole row, so it reads as a sentence and not as a narrow column */
.kept .wide { grid-column: 1 / -1 }
.goes { margin: 0 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--panel); font-size: 13.5px; color: var(--soft) }
.ppl td.acts { text-align: right }
.ppl td.acts .btn + .btn { margin-left: 6px }

/* a new agreement: the sentence that it supersedes the ones before it, the day it takes effect, and what it changes */
.sup { max-width: 780px; margin: 6px 0 12px; padding: 12px 16px; border-radius: 14px; background: var(--panel) }
.sup p { margin: 3px 0 }
.sup .pairs { gap: 6px 22px }
.sup .f { background-color: var(--surface) }
.diffs { max-width: 780px; margin: 0 0 8px }
.diffs h3 { margin-top: 14px }
.diff { margin: 2px 0 0; padding: 0; list-style: none }
.diff li { display: flex; flex-wrap: wrap; gap: 1px 14px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--rule) }
.diff li > b { flex: 0 1 19em; min-width: 0; font-weight: 600 }
.diff li span { flex: 1 1 14em; min-width: 0; color: var(--soft); overflow-wrap: anywhere }
.diff li span b { color: var(--ink); font-weight: 600 }
/* the agreements on file: one shown at a time, the rest behind Show */
.hist.ags { max-width: none }
.ags .line small.okt { color: var(--green) }
.ags .line small.q { color: var(--red); font-weight: 400 }
.ags .agv { padding: 4px 0 14px }
td small.ag { display: block; font-size: 12.5px; color: var(--soft) }
td.wh small.q { color: var(--red); font-weight: 600 }

/* the money of a closed week: the Stripe invoice link, each payment, and the three sums */
.lkrow .f { max-width: 100% }
p.lk a, td.lk a { overflow-wrap: anywhere }
.pays td.st small { display: block; font-size: 12.5px; color: var(--soft) }
.pays td.acts { text-align: right; white-space: nowrap }
.pays td.acts .btn { min-height: 26px; padding: 3px 11px; font-size: 12.5px }
.pays td.acts .btn + .btn { margin-left: 6px }
.kept.sums { max-width: 560px; grid-template-columns: repeat(3, minmax(0, 1fr)) }
.kept.sums b { font-size: 17px; font-variant-numeric: tabular-nums }
.kept.sums b.q { font-weight: 600 }

/* photos */
.drop { box-sizing: border-box; max-width: 780px; margin: 6px 0 10px; padding: 16px; border: 1.5px dashed var(--rule-strong); border-radius: 14px; background: var(--panel); text-align: center }
.drop.over { border-color: var(--blue-solid); background: var(--blue-soft) }
.drop p { margin: 3px 0 }
.drop:focus-within { outline: 3px solid var(--focus); outline-offset: 2px }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.shots { list-style: none; max-width: 780px; margin: 6px 0; padding: 0 }
.shots li { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule) }
.shots .th { flex: none; display: grid; place-items: center; width: 64px; height: 48px; overflow: hidden; border-radius: 8px; background: var(--fill); box-shadow: inset 0 0 0 1px var(--rule); color: var(--soft); font-size: 11.5px; line-height: 1.15; font-weight: 600; text-align: center; text-decoration: none }
.shots .th img { display: block; width: 100%; height: 100%; object-fit: cover }
.shots .nm { flex: 1 1 150px; min-width: 0; overflow-wrap: anywhere }
.shots .btn + .btn { margin-left: 0 }

/* the signature, and the white box the client signs in */
.sig { display: block; width: 270px; max-width: 100%; height: auto; margin: 2px 0 4px; border-bottom: 1px solid var(--rule-strong) }
.sig path { fill: none; stroke: var(--ink); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round }
html.popped { overflow: hidden }
.pop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--veil); -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%) }
.pop[hidden] { display: none }
.pop .card { box-sizing: border-box; width: min(700px, 100%); max-height: 100%; overflow: auto; background: var(--surface); color: var(--ink); border-radius: 22px; padding: 18px 22px 20px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35) }
.pop .card:focus { outline: none }
.pop h2 { margin: 0 0 2px; font-size: 24px; line-height: 1.15; font-weight: 700; letter-spacing: -.022em }
.pop p { margin: 4px 0 }
.pop .fine { font-size: 13.5px; color: var(--soft) }
/* the box keeps its shape; on a short screen it narrows so the whole card still fits */
.pad { position: relative; width: min(100%, max(240px, calc((100vh - 240px) * 3))); margin: 10px auto 6px }
.pad canvas { display: block; box-sizing: border-box; width: 100%; aspect-ratio: 3 / 1; background: #fff; border: 1px solid rgba(60, 60, 67, .3); border-radius: 12px; touch-action: none; cursor: crosshair }
.pad .x { position: absolute; left: 14px; bottom: 15%; font-size: 22px; line-height: 1; font-weight: 600; color: rgba(29, 29, 31, .45); pointer-events: none }
.pad::after { content: ""; position: absolute; left: 36px; right: 16px; bottom: 15%; border-bottom: 1px solid rgba(29, 29, 31, .25); pointer-events: none }
.turn { display: none }

/* client feedback: each submission is a card, what the client wrote is a bubble, and its tasks sit under it */
.fb { box-sizing: border-box; max-width: 840px; margin: 10px 0 16px; padding: 14px 16px 16px; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule-strong) }
.fb .fbh { margin: 0 0 6px }
.fb .notes { max-width: none; margin: 0 0 8px; padding: 9px 14px; border-radius: 14px; background: var(--panel) }
.fb .pform { margin-bottom: 0 }
.fb .pform p { margin: 0 0 4px }
.fb .pform .act { margin-top: 8px }
.fb .pform .pairs { margin-top: 8px }
.fb > .act { margin-top: 8px }
.tasks td.tk { white-space: pre-wrap; min-width: 13em }
.tasks td.st { min-width: 10.5em }
.tasks td[data-h="Property"] { min-width: 7.5em }
.tasks td.st small { display: block; font-size: 12.5px; color: var(--soft) }
.tasks .btn { margin: 4px 6px 0 0 }
/* the General Manager's inbox: one line for each message, what the client wrote under it in full; the one that is shown becomes the card
   it was, with its requests and blanks inside */
.gmi { list-style: none; max-width: 880px; margin: 4px 0 10px; padding: 0 }
.gmi > li { padding: 11px 0; border-bottom: 1px solid var(--rule) }
.gmi > li.open { margin: 8px 0; padding: 12px 16px 16px; border-bottom: 0; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--rule-strong) }
.gmi .line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start }
.gmi .line p, .gmi > li > p { margin: 0 }
.gmi .hd { font-weight: 600 }
.gmi .hd .tag { margin-left: 6px }
.gmi .meta { margin-top: 1px; font-size: 13px; color: var(--soft) }
.gmi > li > .words { margin-top: 5px; max-width: 70ch; white-space: pre-wrap; overflow-wrap: anywhere }
.gmi .acts { padding-top: 1px; text-align: right }
.gmi .acts small { font-size: 12.5px; white-space: nowrap }
.gmi .in { margin-top: 12px }
.gmi .in > .notes { max-width: none; margin: 0 0 8px; padding: 9px 14px; border-radius: 14px; background: var(--panel) }
.gmi .in .pform { margin-bottom: 0 }
.gmi .in .pform p { margin: 0 0 4px }
.gmi .in .pform .act { margin-top: 8px }
.gmi .in .pform .pairs { margin-top: 8px }
.gmi .in > .act { margin-top: 8px }

/* the Template Information Form: its parts, one open at a time, under a strip that says how far each one is */
.parts { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 8px; margin: 12px 0 14px; padding: 0; list-style: none }
.parts button { display: block; box-sizing: border-box; width: 100%; height: 100%; min-height: 60px; padding: 9px 12px; border: 0; border-radius: 12px; background: var(--panel); color: var(--ink); font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; transition: background-color .15s ease }
.parts button:hover { background: var(--fill-strong) }
.parts b { display: block; font-size: 13.5px; line-height: 1.22; font-weight: 600 }
.parts small { display: block; margin-top: 3px; font-size: 12.5px; font-weight: 600; color: var(--red) }
.parts .ok small { color: var(--green) }
.parts .on, .parts .on:hover { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue-solid) }
.part { margin: 0 0 8px; border-radius: 14px; background: var(--panel) }
.part.open { background: var(--surface); box-shadow: var(--shadow-lift) }
.paper .part > h3 { margin: 0 }
.part > h3 button { position: relative; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; box-sizing: border-box; width: 100%; padding: 12px 40px 12px 16px; border: 0; border-radius: 14px; background: transparent; color: var(--ink); font: inherit; letter-spacing: inherit; text-align: left; cursor: pointer }
.part > h3 button::after { content: ""; position: absolute; right: 18px; top: 17px; width: 7px; height: 7px; border-right: 1.75px solid var(--faint); border-bottom: 1.75px solid var(--faint); transform: rotate(-45deg); transition: transform .18s ease }
.part.open > h3 button::after { top: 15px; transform: rotate(45deg) }
.part:not(.open) > h3 button:hover { background: var(--fill) }
.part > h3 .nm { font-size: 16px; font-weight: 600; letter-spacing: -.014em }
.part > h3 .sum { flex: 1 1 220px; min-width: 0; font-size: 13px; font-weight: 400; letter-spacing: -.006em; color: var(--soft); overflow-wrap: anywhere }
.part > h3 .stt { font-size: 12.5px; font-weight: 600; letter-spacing: -.006em; color: var(--red) }
.part.ok > h3 .stt { color: var(--green) }
.part .in { padding: 0 16px 16px }
/* a part with nothing to ask for this house is quiet */
.parts .quiet small, .part.quiet > h3 .stt { color: var(--soft) }
.parts .quiet:not(.on) b, .part.quiet:not(.open) > h3 .nm { color: var(--soft) }
.paper .grp { margin: 18px 0 6px; font-size: 14px; font-weight: 600 }
.paper .grp small { margin-left: 6px; font-size: 13px; font-weight: 400; color: var(--soft) }
.paper .grp.sub { margin-top: 12px; font-size: 13px; color: var(--soft) }
/* what is already confirmed comes into the form greyed out: it is shown, and there is nothing to do with it */
.carry { margin: 2px 0 6px; gap: 6px 16px }
.carry .cf { min-width: 0; color: var(--soft) }
.carry .cf b { display: inline-block; min-width: 1.4em; max-width: 100%; box-sizing: border-box; padding: 3px 9px; border-radius: 8px; background: var(--fill-faint); color: var(--soft); font-weight: 500; overflow-wrap: anywhere; cursor: default }
.savebar { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule-strong) }
.savebar .act { margin-top: 8px }
.todo { margin: 8px 0 0; padding: 0; list-style: none; font-size: 13.5px }
.todo li { padding: 2px 0 }
/* where a part of the form goes, and the requirements it becomes under a report on the Template Completion Sheet */
.tpl tr.hasreq > td { border-bottom: 0 }
.tpl tr.req > td { padding: 0 0 12px }
.tpl tr.req .grp { margin-top: 0 }

/* Report Review: the days of the week, the clock, the four blocks, and the tasks of the block that is open.
   A tag says one thing about a task: late is the loudest (red, filled), needing attention is red, done is green, settled is grey */
.tag { display: inline-block; margin: 0 0 0 2px; padding: 1px 8px; border-radius: 999px; background: var(--fill); color: var(--soft); font-size: 12px; line-height: 1.5; font-style: normal; font-weight: 600; white-space: nowrap; vertical-align: 1px }
.tag.late { background: var(--red-solid); color: var(--on-solid) }
.tag.q { background: var(--red-soft); color: var(--red) }
.tag.ok { background: var(--green-soft); color: var(--green) }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 640px; margin: 12px 0 10px; padding: 0; list-style: none }
.day { display: block; padding: 6px 2px 7px; border-radius: 12px; background: var(--panel); color: var(--ink); text-align: center; text-decoration: none; transition: background-color .15s ease }
.day:hover { background: var(--fill-strong) }
.day span { display: block; font-size: 12px; color: var(--soft) }
.day b { display: block; font-size: 18px; line-height: 1.2; font-weight: 600; font-variant-numeric: tabular-nums }
.day small { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap }
.day.none small { font-weight: 400; color: var(--faint) }
.day.ok small { color: var(--green) }
.day.late small { color: var(--red) }
.day.on, .day.on:hover { background: var(--surface); box-shadow: inset 0 0 0 2px var(--blue-solid) }
.day:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px }
.clock { font-size: 13.5px; color: var(--soft) }
.clock b { color: var(--ink) }
/* the strip that moves between the blocks: each says when it runs and how far it is; the one the clock is in is marked now */
.parts.blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 8px }
.parts.blocks button span:not(.tag) { display: block; margin-top: 2px; font-size: 12.5px; color: var(--soft) }
.parts.blocks button i { color: var(--ink); font-style: normal; font-weight: 600 }
.parts.blocks button small { display: inline-block }
.parts.blocks button .tag { margin-left: 6px }
.act.addmore { margin-top: 10px }
.paper .blk > h3 { margin-top: 16px }
.blk .out { margin-top: 10px }
/* the tasks of a block, one to a line: its name, then what is set on it, then what can be done with it */
.tl { list-style: none; margin: 4px 0 10px; padding: 0 }
.tl > li { padding: 9px 0; border-bottom: 1px solid var(--rule) }
.tl .line { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center }
.tl .nm { flex: 1 1 240px; min-width: 0 }
.tl .nm small { margin-left: 4px; font-size: 13px; color: var(--soft) }
.tl .acts { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto }
.tl .acts .btn { min-height: 26px; padding: 3px 11px; font-size: 12.5px }
.tl .acts small { max-width: 24em; font-size: 12.5px }
/* in block 1 the cleaner of each task sits in one column, whatever stands after it */
.tl.b1 .acts { min-width: 214px; justify-content: flex-end }
.tl .sub { margin: 8px 0 2px; padding: 8px 14px; border-radius: 12px; background: var(--panel) }
.tl .sub p { margin: 5px 0 }
.tl .sub .f { background-color: var(--surface) }
.tl .sub .f:hover { box-shadow: inset 0 0 0 1px var(--rule-strong) }
.tl .sub .f:focus { box-shadow: 0 0 0 1.5px var(--blue-solid), 0 0 0 4.5px var(--focus) }
.tl .sub .f:disabled { background-color: var(--fill-faint) }
.tl .tt { white-space: nowrap }
.tl > li > .fine { margin: 5px 0 0 }
.tl .ph4 { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap }
.tl .pform { margin: 8px 0 2px }
.tl.rec .items { margin-top: 2px; color: var(--soft); font-size: 13.5px }
.tl.rec .items li { padding: 1px 0 }
/* one Arrival Report and its checklist of four boxes; each box's number turns green once it is in order */
.ar { box-sizing: border-box; max-width: 960px; margin: 10px 0 14px; padding: 2px 16px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--rule-strong) }
.ar .act { margin-top: 12px }
.ar .kept { margin-top: 2px }
.chk { margin: 6px 0 0; padding: 0; list-style: none; counter-reset: chk }
.chk > li { position: relative; padding: 10px 0 10px 36px; border-top: 1px solid var(--rule); counter-increment: chk }
.chk > li::before { content: counter(chk); position: absolute; left: 0; top: 9px; box-sizing: border-box; width: 24px; height: 24px; border: 1.5px solid var(--red); border-radius: 50%; color: var(--red); font-size: 12.5px; font-weight: 600; line-height: 21px; text-align: center; font-variant-numeric: tabular-nums }
.chk > li.ok::before { border-color: var(--green); background: var(--green-soft); color: var(--green) }
.chk > li.opt:not(.ok)::before { border-color: var(--rule-strong); color: var(--soft) }
.chk .yn { padding: 0; border: 0 }
.paper .chk .grp { margin-top: 2px }
table.found td { vertical-align: middle }
table.found td.nm { width: 30%; font-weight: 600 }
table.found th:nth-child(4), table.found td:nth-child(4) { width: 34% }
table.found .seg span { white-space: nowrap }
table.found .ta.note { min-height: 52px; padding: 5px 9px; line-height: 1.35 }
table.found .ta.note.bad { background-color: var(--red-soft); box-shadow: inset 0 0 0 1px var(--red) }
.tl .ph4 .seg span, .chk .yn .seg span { white-space: nowrap }
/* the client's inbox: each notice is a card like a submission; one that a later notice corrected steps back */
.fb .diff { margin: 0 }
.fb > .fine { margin: 0 0 6px }
.fb.old { box-shadow: inset 0 0 0 1px var(--rule) }
.fb.old .fbh b, .fb.old .diff li > b, .fb.old .diff li span b { color: var(--soft) }
/* the Scheduling Lead's inbox: the new cleaner is chosen in the line of its request */
.tasks td.st .slp { display: block; font-size: 12.5px; color: var(--soft) }
.tasks td.st .f { display: block; min-width: 9.5em; margin: 2px 0 6px }
.tasks td.st small.q { color: var(--red); font-weight: 600 }
/* the reports billing has received, day by day */
table.recv { max-width: 780px }
tr.dayh td { padding-top: 12px; border-bottom-color: var(--rule-strong); font-weight: 600 }
tr.dayh small { margin-left: 6px; font-size: 12.5px; font-weight: 400; color: var(--soft) }
/* Report Review by day: the four blocks across every property, then each property with its tasks. It is only read, so nothing in it is
   blue but the address that opens a property. A task's four blocks are four small cells: green done, grey done late, outlined to do, red late */
.parts.look > li > div { box-sizing: border-box; height: 100%; min-height: 60px; padding: 9px 12px; border-radius: 12px; background: var(--panel) }
.parts.look span:not(.tag) { display: block; margin-top: 2px; font-size: 12.5px; color: var(--soft) }
.parts.look i { color: var(--ink); font-style: normal; font-weight: 600 }
.parts.look small { display: inline-block }
.parts.look .tag { margin-left: 6px }
.dp { margin-top: 20px }
.paper .dp > h3 { margin: 0 0 2px }
.dp > h3 small { margin-left: 6px }
.dt { list-style: none; margin: 0; padding: 0 }
.dt > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 18px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule) }
.dt .nm small { display: block; margin-top: 1px; font-size: 13px; color: var(--soft) }
.dt .nm .tag { margin-left: 4px }
.bcs { display: grid; grid-template-columns: repeat(4, 94px); gap: 5px }
.bc { box-sizing: border-box; padding: 3px 9px; border-radius: 8px; color: var(--ink); font-size: 12.5px; line-height: 1.5; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--rule-strong) }
.bc b { margin-right: 2px; font-weight: 600; font-variant-numeric: tabular-nums }
.bc.b-ok { background: var(--green-soft); color: var(--green); font-weight: 600; box-shadow: none }
.bc.b-dl { background: var(--fill); color: var(--soft); font-weight: 600; box-shadow: none }
.bc.b-late { background: var(--red-solid); color: var(--on-solid); font-weight: 600; box-shadow: none }
.bc.b-na { color: var(--faint); box-shadow: none }

/* the wide screen has three columns; below it the two views stack on the left; on a phone everything is one column */
@media (max-width: 1700px) {
  .app { max-width: none; grid-template-columns: 320px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "rail main" "crail main" }
  .rail { position: static; max-height: none }
}
/* the agreement: when the document column is narrow, the house and the client go under the services, in two columns of their own */
@container desk (max-width: 1100px) {
  .split { grid-template-columns: minmax(0, 1fr) }
  .split > section + section { columns: 2 300px; column-gap: 40px; margin-top: 26px }
  .split > section + section > h3 { break-after: avoid }
  /* the small line under a heading stays with the heading and with what follows it, so a heading is never left alone at the foot of a column */
  .split > section + section > h3 + p.fine { break-before: avoid; break-after: avoid }
  .split > section + section > h3:first-child { margin-top: 0 }
  .split > section + section > p, .split > section + section > .yn, .split .sig { break-inside: avoid }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "rail" "crail" "main"; gap: 16px }
  .paper { padding: 20px 16px 22px; border-radius: 18px }
  .paper h2 { font-size: 25px }
}
@media (max-width: 700px) {
  .reg { grid-template-columns: minmax(0, 1fr) }
  /* a label and its blank may part: the blank goes under its label when the two do not fit on one line */
  .pairs label { white-space: normal }
  .kept { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 9px 14px }
  /* on a phone each task stacks: what to do, then each moment under its own name */
  .scroll table.tasks, .tasks > tbody { display: block; min-width: 0 }
  .tasks > tbody > tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule) }
  .tasks > tbody > tr:first-child { display: none }
  .tasks > tbody > tr > td { display: block; padding: 1px 0; border-bottom: 0 }
  .tasks td.tk { min-width: 0; font-weight: 600 }
  .tasks td[data-h]::before { content: attr(data-h); display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--soft) }
  /* and each payment stacks the same way: the day and the amount, then its proof and who recorded it */
  .scroll table.pays, .pays > tbody { display: block; min-width: 0 }
  .pays > tbody > tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; padding: 8px 0; border-bottom: 1px solid var(--rule) }
  .pays > tbody > tr:first-child { display: none }
  .pays > tbody > tr > td { display: block; padding: 1px 0; border-bottom: 0; text-align: left }
  .pays > tbody > tr > td.lk { grid-column: 1 / -1 }
  .pays td[data-h]::before { content: attr(data-h); display: block; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--soft) }
  .pays td.acts { align-self: end; text-align: right }
  .kept.sums { grid-template-columns: repeat(3, minmax(0, 1fr)) }
  /* each line of the Template Automation Schedule stacks: its box and report, then when it runs and its time stamp */
  .scroll table.w6.aut, .aut > tbody { display: block; min-width: 0 }
  .aut > tbody > tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule) }
  .aut > tbody > tr:first-child { display: none }
  .aut > tbody > tr > td { padding: 0; border-bottom: 0 }
  .aut > tbody > tr > td:nth-child(3) { grid-area: 1 / 1 }
  .aut > tbody > tr > td:nth-child(1) { grid-area: 1 / 2 / 2 / 4; font-weight: 600 }
  .aut > tbody > tr > td:nth-child(2) { grid-area: 2 / 2; font-size: 13.5px }
  .aut > tbody > tr > td:nth-child(4) { grid-area: 2 / 3; max-width: 9.5em; font-size: 12.5px; color: var(--soft); white-space: normal; text-align: right }
  /* and each template line stacks: its box and name, then its link and time stamp; the requirements under it keep their own tables */
  .scroll table.w7.tpl, .tpl > tbody { display: block; min-width: 0 }
  .tpl > tbody > tr { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; column-gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule) }
  .tpl > tbody > tr:first-child { display: none }
  .tpl > tbody > tr > td { padding: 0; border-bottom: 0 }
  .tpl > tbody > tr > td:nth-child(1) { grid-area: 1 / 1 }
  .tpl > tbody > tr > td:nth-child(2) { grid-area: 1 / 2 / 2 / 4; white-space: normal }
  .tpl > tbody > tr > td.lk { grid-area: 2 / 2; width: auto; min-width: 0 }
  .tpl > tbody > tr > td:nth-child(4) { grid-area: 2 / 3; align-self: center; font-size: 12.5px; color: var(--soft) }
  /* Report Review on a phone: the days stay one row of seven, the four blocks go two by two, and each task stacks */
  .days { gap: 4px }
  .day b { font-size: 16px }
  .day small { font-size: 11px }
  .parts.blocks { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .tl .acts { margin-left: 0 }
  .tl.b1 .acts { min-width: 0; justify-content: flex-start }
  .ar { padding: 2px 12px 12px }
  .chk > li { padding-left: 32px }
  /* and each requirement of the checklist stacks: its name, what is on file, what was found, and the note */
  .scroll table.found, .found > tbody { display: block; min-width: 0 }
  .found > tbody > tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--rule) }
  .found > tbody > tr:first-child { display: none }
  .found > tbody > tr:last-child { border-bottom: 0 }
  .found > tbody > tr > td, .found > tbody > tr > td.nm, .found > tbody > tr > td:nth-child(4) { display: block; width: auto; padding: 2px 0; border-bottom: 0 }
  .found td[data-h]::before { content: attr(data-h); display: inline-block; min-width: 4.6em; margin-right: 6px; font-size: 12px; font-weight: 600; color: var(--soft) }
  .found td[data-h="Note for the client"]::before { display: block }
  /* and on the day screen each task stacks: its name, then its four blocks in one row */
  .dt > li { grid-template-columns: minmax(0, 1fr) }
  .bcs { grid-template-columns: repeat(4, minmax(0, 1fr)) }
  .bc { padding: 3px 6px; font-size: 12px }
}
@media (max-width: 520px) and (orientation: portrait) { .turn { display: inline } }
@media (max-height: 480px) { .pop { padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px)) } .pop .card { padding: 10px 16px 12px } .pop h2 { font-size: 21px } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important } }
