/* What the app adds on top of the prototype's stylesheet: forms, the modal,
   toasts, and the cleaner's phone-first screens. */
.modalwrap{position:fixed;inset:0;z-index:120;display:none;align-items:flex-start;justify-content:center;padding:8vh 14px 14px;
  background:rgba(4,5,8,.6);backdrop-filter:blur(3px);overflow:auto}
body[data-modal="on"] .modalwrap{display:flex}
.modal{width:min(520px,100%);border:1px solid var(--line-2);border-radius:16px;background:var(--s1);box-shadow:var(--el-3)}
.modal-h{padding:16px 18px 4px}
.modal-h h2{margin:0;font-family:var(--display);font-size:18px;letter-spacing:-.03em}
.modal-h p{margin:4px 0 0;font-size:12.5px;color:var(--ink-3);line-height:1.5}
.modal form{padding:12px 18px 16px;display:flex;flex-direction:column;gap:11px}
.fld{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:600;color:var(--ink-3)}
.fld small{font-weight:400;color:var(--ink-3)}
.fld input,.fld select,.fld textarea,.inp{font:inherit;font-size:13.5px;font-weight:400;padding:8px 10px;border-radius:9px;border:1px solid var(--line-2);
  background:var(--s2);color:var(--ink);min-width:0;width:100%}
.fld textarea{min-height:96px;resize:vertical;line-height:1.5}
.fld input:focus,.fld select:focus,.fld textarea:focus,.inp:focus{outline:2px solid var(--accent);outline-offset:1px}
.frow{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:10px}
.fchk{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink-2)}
.fchk input{width:auto}
.ferr{font-size:12.5px;color:var(--crit);background:var(--crit-soft);border-radius:9px;padding:9px 11px;display:none}
.ferr.on{display:block}
.modal .acts{margin-top:4px}
.toast{position:fixed;left:50%;bottom:22px;translate:-50% 20px;z-index:240;padding:10px 16px;border-radius:999px;font-size:12.5px;font-weight:600;
  background:var(--s3);border:1px solid var(--line-2);box-shadow:var(--el-3);opacity:0;pointer-events:none;transition:opacity .2s,translate .2s;max-width:min(560px,92vw)}
.toast.on{opacity:1;translate:-50% 0}
.toast.bad{border-color:color-mix(in srgb,var(--crit) 55%,transparent);color:var(--crit)}
.viewas{display:none;align-items:center;justify-content:center;gap:12px;padding:7px 14px;font-size:12.5px;font-weight:600;
  background:var(--warn-soft);border-bottom:1px solid color-mix(in srgb,var(--warn) 35%,transparent);color:var(--ink);flex:none}
body[data-viewas="on"] .viewas{display:flex}
.secret{font-family:var(--mono);font-size:12.5px;padding:10px 12px;border-radius:10px;background:var(--s2);border:1px dashed var(--line-2);
  overflow-wrap:anywhere;user-select:all;line-height:1.5}
.wkbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:var(--gap)}
.wkbar b{font-size:13px;min-width:170px;text-align:center}
.obcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:var(--gap);margin-bottom:var(--gap)}
.obcard{padding:14px 15px;text-align:left;display:flex;flex-direction:column;gap:7px}
.obcard .pb{height:6px;border-radius:3px;background:var(--s3);overflow:hidden}
.obcard .pb i{display:block;height:100%;background:var(--accent);border-radius:3px}
.obcard ul{margin:0;padding-left:16px;font-size:12px;color:var(--ink-2);line-height:1.5}
.steps li .who{font-size:10px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-3);margin-left:8px}
.steps li .sx small{display:block;font-size:11px;color:var(--ink-3)}
.steps li[data-on="w"] button{background:var(--warn-soft)}
.jobs{display:flex;flex-direction:column;gap:var(--gap);max-width:640px}
.job{padding:15px 16px}
.job h3{margin:0;font-family:var(--display);font-size:17px;letter-spacing:-.02em}
.job .jm{font-size:12.5px;color:var(--ink-2);margin:3px 0 10px;line-height:1.5}
.job .chk{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.job .chk button{display:flex;gap:10px;align-items:center;width:100%;text-align:left;padding:9px 6px;border-radius:9px;font-size:13.5px}
.job .chk button:hover{background:var(--s2)}
.job .chk i{flex:none;width:20px;height:20px;border-radius:6px;border:1.5px solid var(--line-2);display:grid;place-items:center;font-style:normal;font-size:12px}
.job .chk button[aria-pressed="true"] i{background:var(--ok);border-color:var(--ok);color:#fff}
.job .big{width:100%;padding:13px;font-size:15px;border-radius:12px;margin-top:10px}
.sopbody{white-space:pre-wrap;font-size:14px;line-height:1.65;color:var(--ink)}
.bars2{display:flex;align-items:flex-end;gap:5px;height:170px;padding:14px 14px 0}
.bars2 div{flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px;min-width:0;height:100%}
.bars2 i{display:block;width:100%;border-radius:5px 5px 0 0;background:var(--accent);min-height:2px;position:relative}
.bars2 i u{position:absolute;left:0;right:0;bottom:0;background:color-mix(in srgb,var(--ink) 26%,transparent);border-radius:0;text-decoration:none}
.bars2 span{font-size:9.5px;color:var(--ink-3);white-space:nowrap}
.bars2 b{font-size:9.5px;font-family:var(--mono);color:var(--ink-2);font-weight:600}
.loading{padding:40px 18px;text-align:center;color:var(--ink-3);font-size:12.5px}
.authc label{display:flex;flex-direction:column;gap:4px;font-size:11.5px;font-weight:600;color:var(--ink-3);margin-bottom:10px}
.authc input{font:inherit;font-size:14px;padding:10px 12px;border-radius:10px;border:1px solid var(--line-2);background:var(--s2);color:var(--ink)}
.authc .btn{width:100%;padding:11px;font-size:14px;margin-top:4px}
td .btn.sm{white-space:nowrap}
@media(max-width:980px){.org span{display:none}}
/* fixes found by looking at it in a browser */
.strip>div{display:flex;flex-direction:column;gap:3px;flex:1;min-width:150px;padding:13px 15px}
.strip{flex-wrap:wrap}
.lanes{align-items:start}
.ov-body>*{flex:none}
.steps li[data-on="1"] .sx{text-decoration:none;color:var(--ink-2)}
.steps li .sx small{margin-top:2px}
.steps li .who{display:inline-block}
/* a label and the sentence under it are two lines, never run together */
.li .lb,.li .de{display:block}
.li>span:first-child{min-width:0}
.kv2 .k,.score .k{display:block}
.obcard b,.obcard .hint{display:block}
.lead .ln,.lead .lw{display:block}
.tile .k,.tile .n,.tile .s{display:block}
/* pages open to the public sit in the same frame as sign-in */
body[data-auth="public"] .auth{display:flex;align-items:flex-start}
body[data-auth="public"] .shell,body[data-auth="public"] .bar,body[data-auth="public"] .tabbar{display:none}
.pubwrap{width:min(760px,100%);margin:0 auto;padding:18px 0 60px}
/* sidebar sections that collapse, and pins that keep them open */
.side .navtop{display:flex;justify-content:flex-end;flex:none}
.side .navall{font-size:10.5px;font-weight:500;color:var(--ink-3);padding:4px 8px;min-height:24px;border-radius:7px}
.side .navall:hover:not(:disabled){background:var(--s2);color:var(--ink)}
.side .navall:disabled{opacity:.5;cursor:default}
.sgrp,.sbody{display:flex;flex-direction:column;gap:2px;flex:none}
.sbody[hidden]{display:none}
.shead{display:flex;align-items:flex-end;gap:2px}
.shead .sect{flex:1;min-width:0;min-height:24px;display:flex;align-items:center;gap:5px;border-radius:7px}
.shead .sect:hover{color:var(--ink-2)}
.sect .chev{flex:none;opacity:.8}
.sect[aria-expanded="false"] .chev{transform:rotate(-90deg)}
.sgrp[data-pin] .sect{cursor:default}
.sgrp[data-pin] .sect:hover{color:var(--ink-3)}
.sgrp[data-pin] .chev{visibility:hidden}
.shead .sect[data-here]{color:var(--accent)}
.sect .b{margin-left:auto;font-size:10px;font-weight:700;font-family:var(--mono);letter-spacing:0;line-height:1.5;
  background:var(--crit);color:#fff;border-radius:999px;padding:0 5px;min-width:17px;text-align:center}
.spin{flex:none;width:26px;height:26px;display:grid;place-items:center;border-radius:7px;color:var(--ink-3);opacity:0}
.shead:hover .spin,.shead:focus-within .spin{opacity:.85}
.spin:hover{background:var(--s2);color:var(--ink)}
.spin[aria-pressed="true"]{opacity:1;color:var(--accent)}
.spin[aria-pressed="true"] .pinh{fill:currentColor}
@media (hover:none){.spin{opacity:.6}}
.side .sect:focus-visible,.side .spin:focus-visible,.side .navall:focus-visible{outline-offset:-2px}
/* read aloud, not shown */
.vh{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
/* phone: the bottom bar never scrolls sideways. It shows what fits, and More opens every screen. */
.moresheet{display:none}
@media (max-width:980px){
  .tabbar{overflow-x:hidden;gap:2px}
  .tabbar button{flex:1 1 0;min-width:0;font-size:10px;min-height:44px;justify-content:center}
  .tabbar .tl{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0 2px}
  .tabbar button[data-here],.tabbar button[aria-expanded="true"]{color:var(--accent)}
  .tabbar .bdot{right:calc(50% - 16px)}
  body[data-more="on"] .moresheet{display:flex;flex-direction:column;position:fixed;inset:0;z-index:60;background:var(--bg);
    padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
  .more-h{display:flex;align-items:center;gap:10px;flex:none;padding:12px 16px;border-bottom:1px solid var(--line)}
  .more-h h2{margin:0;font-family:var(--display);font-size:18px;letter-spacing:-.03em}
  .more-h .iconbtn{width:40px;height:40px}
  .more-b{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:6px 12px 24px}
  .mgrp h3{margin:14px 4px 6px;font-size:10.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--ink-3)}
  .mgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px}
  .mrow{display:flex;align-items:center;gap:10px;min-height:46px;padding:8px 12px;border-radius:11px;border:1px solid var(--line);background:var(--s1);
    font-size:13.5px;color:var(--ink);text-align:left;min-width:0}
  .mrow svg{flex:none;color:var(--ink-3)}
  .mrow .ml{flex:1;min-width:0;overflow-wrap:anywhere;line-height:1.25}
  .mrow[aria-current="page"]{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 40%,transparent);font-weight:600}
  .mrow[aria-current="page"] svg{color:var(--accent)}
  .mrow .b{flex:none;font-size:10px;font-weight:700;font-family:var(--mono);line-height:1.6;background:var(--crit);color:#fff;border-radius:999px;padding:0 6px;min-width:18px;text-align:center}
}
/* pay run: the list of runs beside the run; on a phone the run sits under the list */
.payg{display:grid;grid-template-columns:minmax(230px,300px) minmax(0,1fr);gap:var(--gap);align-items:start}
.payg>*{min-width:0}
.payg .payrel{margin-top:6px}
@media (max-width:760px){
  .payg{grid-template-columns:minmax(0,1fr)}
  .payg .banner{flex-wrap:wrap}
  .payg .runs-wrap{max-height:230px;overflow-y:auto}
  /* each pay line reads top to bottom: who and how much, the work, the state, then why and what can be done about it */
  .paytbl{min-width:0;display:block}
  .paytbl thead{display:none}
  .paytbl tbody{display:block}
  .paytbl tr{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:center;padding:12px 14px;border-bottom:1px solid var(--line)}
  .paytbl td{display:block;padding:0;border:0;min-width:0}
  .paytbl td:first-child{grid-column:1;grid-row:1}
  .paytbl .pay-amt{grid-column:2;grid-row:1;font-weight:600}
  .paytbl td[data-l]{grid-column:1;text-align:left;font-size:12px;color:var(--ink-2)}
  .paytbl td[data-l="Jobs"]{grid-row:2}
  .paytbl td[data-l="Hours"]{grid-row:3}
  .paytbl td[data-l]::before{content:attr(data-l) ": ";color:var(--ink-3)}
  .paytbl .pay-st{grid-column:2;grid-row:2 / span 2;justify-self:end}
  .paytbl .pay-why{grid-column:1 / -1;max-width:none!important}
  .paytbl .pay-why:empty{display:none}
  .paytbl td[colspan]{grid-column:1 / -1}
  .paytbl .payrel{min-height:36px}
}
.rules-say{margin:0;padding:12px 16px 0;font-size:12.5px;color:var(--ink-2);line-height:1.5}

/* Today: only the cards with something in them are drawn, so one or two share the row */
@media(min-width:901px){.lanes[data-n="1"]{grid-template-columns:minmax(0,1fr)}.lanes[data-n="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* a page for an address that does not exist or may not be opened uses the ordinary heading; nothing extra needed */
.lifekey{padding:9px 14px 11px;margin:0;line-height:1.7}.lifekey .life{display:inline-flex;vertical-align:middle;margin:0 2px 0 8px}
/* on a phone "Viewing as" is opened from the account menu (and the amber bar), so the top bar is not squeezed */
@media(max-width:620px){#asbox{display:none}}
/* polish sweep (17 Nov): shared rules for patterns repeated across screens */
/* a section heading written as h3 looks like every other section heading (it fell back to the browser's 19px) */
.pane-h h3{margin:0;font-family:var(--display);font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--ink-3);font-weight:600}
/* a link styled as a button is never underlined, and a plain link in the text is the app's colour, not the browser's purple */
a.btn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
#main a:not([class]),#ov a:not([class]),.modal a:not([class]){color:var(--accent);text-underline-offset:2px}
/* tab bars wrap onto a second line on a phone instead of running off the edge */
.tabs2{flex-wrap:wrap}
/* cards, notices and tiles stacked straight in the page always have the usual gap between them (margins collapse, so screens that already set one are unchanged) */
#main:not(.twopane)>.card+.card,#main:not(.twopane)>.banner+.card,#main:not(.twopane)>.card+.banner,#main:not(.twopane)>.banner+.banner,
#main:not(.twopane)>.banner+.tiles,#main:not(.twopane)>.card+.tiles,#main:not(.twopane)>.tiles+.card{margin-top:var(--gap)}

/* booking and other pop-out panels take about three quarters of the screen on a computer (owner, 17 Nov) */
.ov{width:min(100vw,max(620px,75vw))}
body[data-ovwide="on"] .ov{width:min(100vw,max(880px,75vw))}
:root[data-d="present"] .ov{width:min(100vw,max(760px,75vw))}
@media (max-width:700px){ .ov{width:100vw} }
