/* Layout refinement (owner direction, Apple-Health-like simplicity): compact grouped content, one small type
   scale, aligned rows, soft borders, minimal whitespace. SAME brand tokens (cream #F6E6C9, brown #38261B, gold),
   same wordmark. Structure and spacing only — not a new theme. Loaded last. */
:root{--r:14px;--r-sm:10px;--hair:rgba(56,38,27,.12);--surface:rgba(255,255,255,.42)}
html,body{font-size:15px;line-height:1.5}
body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
body.anon{padding-bottom:16px}
.wrap{max-width:640px}

/* header */
.top{padding:12px 0 6px}
.mark-img{height:22px!important}
.top h1{font-size:13px;margin-top:3px}
.date{font-size:12.5px}
.userbar{padding:6px 0;margin-bottom:0;font-size:13.5px;border-color:var(--hair)}
.ub-who b{font-size:14px}
.ub-branch select{min-height:32px!important;padding:2px 12px!important;font-size:13px!important}

/* type scale: 20 / 15 / 14.5 / 13 / 12 */
.sec-title{font-size:20px;line-height:1.3;margin:6px 0 2px}
.vhead{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px}
.vhead .sec-title{margin:0}
.lead{font-size:13.5px;margin:2px 0 12px;color:var(--mute)}
.catbar{margin:16px 0 6px}
.catbar h3,.fs-group>h3{font-size:15px}
h4{font-size:13.5px}
.ghead{font-family:var(--f-body);font-size:13px;font-weight:600;color:var(--mute);margin:16px 4px 6px}
.ghead.bad{color:var(--bad)}
.foot,.hint{font-size:12.5px;color:var(--mute);margin-top:6px}
.small{font-size:12.5px}

/* small pills and badges */
.pill{font-size:11.5px;line-height:20px;padding:0 8px;font-weight:600}
.pill.draft{font-size:11px;line-height:18px;padding:0 7px;border-width:1px;white-space:nowrap}
.bdg{min-width:18px;height:18px;font-size:11px;padding:0 5px}
.st{font-weight:600}
.st.ok,.rv.ok{color:var(--ok)} .st.bad,.rv.bad{color:var(--bad)} .st.warn,.rv.warn{color:var(--warn)}
.ico{width:14px;height:14px;vertical-align:-2px}

/* sub navigation */
.subnav{padding:8px 0}
.subnav .row{gap:6px}
.sub{min-height:32px;padding:0 12px;font-size:13.5px;border-width:1px;gap:6px}

/* controls */
.btn{min-height:42px;padding:0 16px;font-size:14.5px}
.btn.sm{min-height:32px;padding:0 12px;font-size:13px}
.field{gap:4px;margin-bottom:10px}
.field>label,.lab{font-size:13px}
input[type=text],input[type=number],input[type=email],input[type=password],input[type=date],input[type=time],select{min-height:42px!important;padding:8px 14px!important;font-size:16px;border-width:1px!important}
input[type=time]{width:100%;border-radius:999px;background:var(--white);border:1px solid var(--line2);font:inherit;font-size:16px}
textarea{min-height:76px;padding:10px 14px;border-width:1px}
.filebtn{min-height:42px;border-width:1px}
.chips{gap:6px;margin-bottom:10px}
.chip{min-height:32px;padding:0 12px;font-size:13px;border-width:1px}
.toolbar{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0}
.datef{margin-bottom:10px}
.datef input{max-width:200px}
.notice{font-size:13px;padding:8px 12px;margin-bottom:10px;border-radius:var(--r-sm)}
.inline{gap:6px}

/* flat cards */
.card{padding:12px 14px;border-radius:var(--r);border:1px solid var(--hair);background:var(--surface);margin-bottom:12px}
.card h3{font-size:15px}
.empty{padding:14px;font-size:13.5px;border-radius:var(--r)}
.empty.ok{color:var(--ok);border-style:solid;border-color:var(--hair);background:var(--surface)}

/* grouped list (the core pattern) */
.list{border:1px solid var(--hair);border-radius:var(--r);background:var(--surface);overflow:hidden;margin-bottom:12px}
.list>*{margin:0!important;border:0!important;border-radius:0!important}
.list>*+*{border-top:1px solid var(--hair)!important}
.row{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;padding:9px 14px;text-align:start;font:inherit;color:inherit;background:none;border:0;cursor:pointer}
.row.static{cursor:default}
.row .rt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-size:14.5px;line-height:1.45}
.row .meta,.ci .meta{display:block;font-size:12.5px;color:var(--mute);font-weight:400}
.row .rv{display:flex;flex-direction:column;align-items:flex-end;font-weight:600;font-size:14.5px;white-space:nowrap}
.row .rv small{font-weight:400;font-size:11.5px;color:var(--mute)}
.row .go{color:var(--mute);font-size:18px;line-height:1}
.row.cur{background:rgba(251,217,150,.35)}
.row.flag,.cirow.st-overdue{box-shadow:inset -3px 0 0 var(--bad)}
button.row:hover{background:rgba(251,217,150,.25)}

/* checklist rows */
.cirow{display:flex;align-items:stretch}
.cirow .ci{flex:1;min-height:48px;margin:0;padding:8px 12px;gap:10px;border:0;border-radius:0;background:transparent}
.ci .box{width:22px;height:22px;border-radius:6px}
.ci .box svg{width:13px;height:13px}
.ci .tx{font-size:14.5px;line-height:1.45}
.ci[aria-checked="true"]{background:rgba(46,107,69,.06)}
.cirow.st-due .ci{background:rgba(251,217,150,.35)}
.cirow .side{flex:none;border:0;border-inline-start:1px solid var(--hair);background:none;color:var(--accent-ink);font:inherit;font-size:12.5px;font-weight:600;padding:0 12px;cursor:pointer}
.cirow .side:hover{background:rgba(251,217,150,.3)}
.prog{margin:4px 0 10px;gap:10px}
.track{height:6px}
.prog .cnt{min-width:44px;font-size:14px}
.done-note{padding:8px 12px;font-size:13.5px;margin-bottom:10px;border-radius:var(--r-sm)}
.addrow{margin:-4px 0 10px}
.li-set{display:flex;flex-direction:column;gap:8px;padding:10px 12px}
.grid4{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.grid4 label,.grid3 label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:var(--mute);font-weight:600}
.pair{display:flex;gap:6px}
.grid2,.grid3{gap:8px}

/* accordions */
details{border-radius:var(--r);border-color:var(--hair);background:var(--surface);margin-bottom:8px}
summary{min-height:48px;padding:10px 14px;gap:10px}
summary .t{font-size:15px}
summary .t small{font-size:12px}
.stepno{width:26px;height:26px;font-size:13px}
.panel{padding:4px 14px 12px}
.panel h4{margin:10px 0 4px}
.say{padding:8px 12px;font-size:14px}
.rule{padding:10px 12px;gap:10px}
.rule .n{width:26px;height:26px;font-size:13px}
.week{padding:10px 14px}
.week .wh b{font-size:15px}
.goal{padding:8px 12px;font-size:13.5px}
.settings{margin-top:18px}
.pform{padding-top:10px;margin-top:10px;border-top:1px solid var(--hair)}
.li-edit{gap:6px;margin-top:8px}

/* brew values */
.vals{display:flex;flex-wrap:wrap;gap:4px 12px;margin:2px 0}
.val{display:inline-flex;align-items:baseline;gap:3px;font-weight:600}
.val small{font-weight:400;color:var(--mute);font-size:11.5px}
.val em{font-style:normal;font-size:11px;font-weight:600;padding:0 6px;border-radius:999px;background:var(--bad-bg);color:var(--bad)}
.val.ok em{background:var(--ok-bg);color:var(--ok)}
.val.bad{color:var(--bad)}

/* temperature grid */
.tgrid .trow{display:grid;grid-template-columns:1.7fr repeat(3,1fr);align-items:center;gap:6px;padding:8px 12px;font-size:13.5px}
.trow.th{font-size:12px;color:var(--mute);font-weight:600}
.trow.th span:not(:first-child),.tcell{text-align:center}
.trow small{display:block;color:var(--mute);font-size:11.5px;font-weight:400}
.tcell{font-weight:600;color:var(--mute)}
.tcell.ok{color:var(--ok)} .tcell.bad{color:var(--bad)} .tcell.warn{color:var(--warn)}
.actrow .inline{margin-top:6px}
.actrow input{flex:1}
.preview{min-height:22px;margin-top:4px;font-size:13px}

/* issues */
.issue2 .ih{font-size:12.5px;color:var(--mute)}
.issue2 .itx{white-space:pre-wrap;word-break:break-word;font-size:14.5px}
.issue2 .inline{margin-top:8px;flex-wrap:wrap}
.issue2 .inline input{flex:1;min-width:160px}
.meta.act{color:#1f4d32!important}
.dphoto{max-height:160px;margin-top:8px}

/* display cards */
.dcard{padding:12px 14px;border-radius:var(--r);margin-bottom:10px}
.dcard h3{font-size:15.5px}
.d-time{margin:4px 0}
.tm{font-size:24px}
.rem{font-size:13px}
.verdict{font-size:13px;padding:8px 12px;margin-bottom:8px}
.verdict .mnote{display:block;margin-top:4px;font-weight:400;color:var(--ink2)}

/* manager / audit / users */
.audit .entry,.entry{padding:8px 12px;font-size:13.5px;border-radius:var(--r-sm);margin-bottom:6px}
.mc{min-height:0;padding:12px}
.mc .mv{font-size:20px}

/* bottom nav */
.nb{min-height:56px;font-size:11.5px;gap:2px}
.nb svg{width:22px;height:22px}

/* login */
.login{max-width:420px}
.login .card{margin-bottom:10px}
.demo-acct{padding:8px 12px;border-width:1px;border-radius:var(--r-sm)}
#demoList{gap:6px}

/* SOP sheet (opened from inside a task) */
#sheet{border:0;padding:0;width:100%;max-width:640px;max-height:82vh;margin:auto auto 0;border-radius:18px 18px 0 0;background:var(--base);color:var(--brown)}
#sheet::backdrop{background:rgba(30,20,14,.45)}
.sheet-h{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;background:var(--base);border-bottom:1px solid var(--hair)}
.sheet-h h2{font-size:17px}
#sheetBody{padding:12px 16px 20px}

/* food safety: source + placeholder labelling */
.srcbox{display:grid;gap:4px;padding:10px 14px;margin-bottom:12px;font-size:13px;border:1px solid var(--hair);border-radius:var(--r);background:var(--surface)}
.phtag{grid-column:1 / -1;font-size:11.5px;font-weight:600;color:var(--warn)}
.fs{padding:10px 12px;border-radius:var(--r);border-color:var(--hair)}
.fs .val{font-size:16px;min-width:80px;padding:6px}
.fs p{font-size:13.5px}
.src{font-size:11.5px}

@media (max-width:480px){
  .grid4{grid-template-columns:1fr 1fr}
  .tgrid .trow{grid-template-columns:1.4fr repeat(3,1fr);padding:8px 10px;font-size:13px}
  .vhead{flex-wrap:wrap}
}
.nb{white-space:nowrap;font-size:11px}
@media (max-width:360px){.nb{font-size:10px}}
.li-set input,.li-set select,.pform input,.pform select{min-height:36px!important;padding:4px 12px!important}
.li-set .grid4 label,.pform label{font-size:11.5px}
.li-set{gap:6px;padding:8px 12px}
/* row text flows inline; only the meta/sub-parts start new lines */
.row .rt{display:block}
.row .rt>.meta,.row .rt>.ih,.row .rt>.itx{display:block;margin-top:2px}
.row .rt>.vals,.row .rt>.inline{display:flex;margin-top:4px}
.row .rt>.grid3{display:grid;margin-top:6px}
.row .rt>img{display:block}
/* numbers/temperatures/ranges are isolated and laid out LTR (same fix as the 0/11 counter): 9°, 0–4°, -18° */
bdi.num{direction:ltr;unicode-bidi:isolate}
/* core workflow: assignment, rejection, photo review */
.ci .rej{display:block;margin-top:3px;font-size:12.5px;font-weight:600;color:var(--bad)}
.fl{display:flex;flex-direction:column;gap:3px;font-size:12px;font-weight:600;color:var(--mute);margin-bottom:8px}
.fl input[type=checkbox]{width:18px;height:18px;vertical-align:-4px;margin-inline-end:6px;accent-color:var(--brown)}
.assign{margin:0 0 10px}
.review{align-items:flex-start}
.review .thumb{width:64px;height:64px;object-fit:cover;border-radius:10px;border:1px solid var(--hair);cursor:zoom-in;flex:none}
.review .inline input{flex:1;min-width:110px;min-height:32px!important;padding:2px 12px!important}
.review .btn{white-space:nowrap}
