/* UB Inspections — built for phones and iPads on a store floor.
   System font (San Francisco on Apple devices), no outside files.
   Color carries meaning only: amber = still to do, green = done, red = needs fixing. */
:root {
  --paper: #F2F2F0;
  --card: #FFFFFF;
  --ink: #1C1C1E;
  --ink-2: #55555C;
  --ink-3: #8A8A92;
  --line: #DADADF;
  --line-2: #ECECEF;
  --todo: #C98A00;
  --todo-bg: #FFF6DD;
  --done: #2E7D4F;
  --done-bg: #E6F4EC;
  --bad: #C62828;
  --bad-bg: #FDECEC;
  --mid: #B26B00;
  --mid-bg: #FFF0D6;
  --btn: #1C1C1E;
  --btn-ink: #FFFFFF;
  --focus: #2F6FEB;
  --white-band: #F7F7F8;
  --radius-lg: 18px;
  --radius: 12px;
  --radius-sm: 8px;
  --pad: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --paper: #121214; --card: #1D1D20; --ink: #F2F2F4; --ink-2: #B4B4BC; --ink-3: #85858E;
    --line: #34343A; --line-2: #2A2A2F; --todo: #E8B23A; --todo-bg: #3A2E10; --done: #5CC08A;
    --done-bg: #15301F; --bad: #FF6B6B; --bad-bg: #3A1717; --mid: #F0A53A; --mid-bg: #3A2A10;
    --btn: #F2F2F4; --btn-ink: #121214; --white-band: #26262A; color-scheme: dark;
  }
}
:root[data-scheme="dark"] {
  --paper: #121214; --card: #1D1D20; --ink: #F2F2F4; --ink-2: #B4B4BC; --ink-3: #85858E;
  --line: #34343A; --line-2: #2A2A2F; --todo: #E8B23A; --todo-bg: #3A2E10; --done: #5CC08A;
  --done-bg: #15301F; --bad: #FF6B6B; --bad-bg: #3A1717; --mid: #F0A53A; --mid-bg: #3A2A10;
  --btn: #F2F2F4; --btn-ink: #121214; --white-band: #26262A; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 21px; line-height: 1.25; font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line-2);
  padding: calc(env(safe-area-inset-top) + 10px) var(--pad) 10px;
}
.topbar-in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand span { color: var(--ink-3); font-weight: 500; }
@media (max-width: 440px) { .brand span { display: none; } }
@media (max-width: 700px) { .brand span.long { display: none; } }
.topnav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.topnav a, .topnav button {
  font: inherit; font-size: 15px; text-decoration: none; padding: 7px 11px; border-radius: 999px;
  color: var(--ink-2); background: none; border: 0; cursor: pointer;
}
.topnav a.on { background: var(--card); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }

.wrap { max-width: 760px; margin: 0 auto; padding: 20px var(--pad) calc(env(safe-area-inset-bottom) + 96px); }
.wrap.wide { max-width: 1100px; }
.page-head { margin: 8px 0 20px; }
.page-head p { margin-top: 6px; }

/* ---------- blocks */
.panel { background: var(--card); border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px;
  box-shadow: 0 0 0 1px var(--line-2); }
.panel > h2 { margin-bottom: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line-2); }
.list > li:first-child { border-top: 0; }
.row-link { display: flex; align-items: center; gap: 12px; padding: 13px 2px; text-decoration: none; min-height: 56px; }
.row-link .grow { flex: 1; min-width: 0; }
.row-link .t { font-weight: 600; display: block; }
.row-link .s { display: block; font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--ink-3); font-size: 20px; }
.storeno { font-variant-numeric: tabular-nums; font-weight: 700; min-width: 46px; color: var(--ink-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill.todo { background: var(--todo-bg); color: var(--todo); }
.pill.done { background: var(--done-bg); color: var(--done); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.plain { background: var(--line-2); color: var(--ink-2); }

.score { font-variant-numeric: tabular-nums; font-weight: 700; padding: 3px 9px; border-radius: 8px; }
.band-green { background: var(--done-bg); color: var(--done); }
.band-white { background: var(--white-band); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.band-yellow { background: var(--todo-bg); color: var(--todo); }
.band-red { background: var(--bad-bg); color: var(--bad); }
.band-none { color: var(--ink-3); }

.flash { background: var(--card); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px;
  box-shadow: 0 0 0 1px var(--line); }
.error-box { background: var(--bad-bg); color: var(--bad); border-radius: var(--radius); padding: 12px 14px;
  margin-bottom: 14px; font-weight: 500; }

/* ---------- forms */
label.f { display: block; font-size: 15px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=search],
input[type=number], input:not([type]), select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
textarea { resize: none; line-height: 1.4; min-height: 48px; overflow: hidden; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit;
  font-weight: 600; font-size: 17px; min-height: 50px; padding: 0 22px; border-radius: 14px;
  border: 0; cursor: pointer; text-decoration: none; background: var(--btn); color: var(--btn-ink); }
.btn.block { width: 100%; }
.btn.ghost { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.danger { background: var(--card); color: var(--bad); box-shadow: inset 0 0 0 1px var(--line); }
.btn.sm { min-height: 38px; font-size: 15px; padding: 0 14px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: default; }
.btnrow { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--focus); cursor: pointer; }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice.choice3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) { .choice.choice3 { grid-template-columns: 1fr; } }
.choice label { display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span { display: block; padding: 14px; border-radius: var(--radius); background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; }
.choice small { display: block; font-weight: 400; color: var(--ink-2); font-size: 13.5px; margin-top: 2px; }
.choice input:checked + span { box-shadow: inset 0 0 0 2px var(--ink); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.auth { max-width: 420px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 48px) var(--pad) 48px; }
.auth h1 { margin-bottom: 6px; }
.auth .panel { margin-top: 22px; }

/* switch */
.switch { display: flex; align-items: center; gap: 12px; padding: 12px 0; cursor: pointer; }
.switch input { appearance: none; -webkit-appearance: none; width: 51px; height: 31px; border-radius: 999px;
  background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0;
  box-shadow: inset 0 0 0 1px rgba(128,128,128,.28); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked { background: var(--todo); }
.switch input:checked::after { transform: translateX(20px); }
.switch .txt { flex: 1; }

/* search */
.search { position: sticky; top: calc(env(safe-area-inset-top) + 58px); z-index: 5; padding: 6px 0 12px;
  background: var(--paper); }

/* ---------- inspection form */
.progress {
  position: sticky; top: calc(env(safe-area-inset-top) + 57px); z-index: 15;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  padding: 10px var(--pad) 10px; border-bottom: 1px solid var(--line-2);
}
.progress-in { max-width: 760px; margin: 0 auto; }
.progress-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 14px; margin-bottom: 8px; }
.progress-top b { font-variant-numeric: tabular-nums; }
.segs { display: flex; gap: 3px; }
.seg { flex: var(--n, 1) 1 0; height: 30px; border: 0; padding: 0; border-radius: 6px; cursor: pointer;
  background: var(--todo-bg); position: relative; overflow: hidden; }
.seg i { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--done);
  transition: width .25s ease; }
.seg.has-bad { box-shadow: inset 0 0 0 2px var(--bad); }
.seg em { position: relative; font-style: normal; font-size: 10.5px; font-weight: 700; color: var(--ink);
  mix-blend-mode: normal; display: block; line-height: 30px; text-align: center; white-space: nowrap;
  overflow: hidden; padding: 0 2px; }
.seg.full em { color: #fff; }
@media (max-width: 560px) { .seg em { display: none; } .seg { height: 10px; } }

.sec { margin-top: 30px; scroll-margin-top: 140px; }
.sec-head { padding: 0 2px 12px; }
.sec-head h2 { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }
.sec-head p { color: var(--ink-2); margin: 4px 0 0; }
.sec-intro { background: var(--line-2); border-radius: var(--radius); padding: 12px 14px; font-size: 15px;
  color: var(--ink-2); margin-bottom: 12px; }

.qb { background: var(--card); border-radius: var(--radius-lg); margin-bottom: 12px; padding: 16px 16px 14px 20px;
  position: relative; scroll-margin-top: 150px; box-shadow: 0 0 0 1px var(--line-2); }
.qb::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 5px;
  border-radius: 0 4px 4px 0; background: var(--todo); }
.qb[data-state="done"]::before { background: var(--done); }
.qb[data-state="bad"]::before { background: var(--bad); }
.qb[data-state="bad"] { box-shadow: 0 0 0 2px var(--bad); }
.qb-head { display: flex; align-items: flex-start; gap: 10px; }
.qb-head h3 { flex: 1; font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.qmark { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 14px; font-weight: 800; background: var(--todo-bg); color: var(--todo); }
.qb[data-state="done"] .qmark { background: var(--done-bg); color: var(--done); }
.qb[data-state="bad"] .qmark { background: var(--bad-bg); color: var(--bad); }
.qmark svg { width: 15px; height: 15px; }
.bul { margin: 8px 0 12px; padding-left: 20px; color: var(--ink-2); font-size: 15.5px; }
.bul li { margin: 3px 0; }
.bul li.sub { list-style: none; margin: 10px 0 2px -20px; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.req { font-size: 13.5px; font-weight: 600; color: var(--todo); margin: -4px 0 10px; }
.problem { font-size: 14px; font-weight: 600; color: var(--bad); margin: 10px 0 0; display: none; }
.qb[data-state="bad"] .problem { display: block; }

.rate { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--line-2);
  padding: 4px; border-radius: 14px; }
.rate button { font: inherit; font-weight: 650; font-size: 17px; min-height: 52px; border: 0; border-radius: 11px;
  background: transparent; color: var(--ink-2); cursor: pointer; transition: background .12s, color .12s; }
.rate button[aria-pressed="true"][data-v="pass"] { background: var(--done); color: #fff; }
.rate button[aria-pressed="true"][data-v="mid"] { background: var(--mid); color: #fff; }
.rate button[aria-pressed="true"][data-v="fail"] { background: var(--bad); color: #fff; }
.rate button[aria-pressed="true"][data-v="na"], .rate button[aria-pressed="true"][data-shift] { background: var(--ink); color: var(--card); }

.qtools { margin-top: 12px; display: grid; gap: 10px; }
.qtools textarea { font-size: 16px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.photo-add { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 15px; font-weight: 600;
  min-height: 44px; padding: 0 14px; border-radius: 12px; background: var(--card); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; border: 0; }
.photo-add svg { width: 20px; height: 20px; }
.thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--line-2); }
.thumb img { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }   /* whole photo, never cropped */
.thumb button { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; border: 0;
  background: rgba(0,0,0,.6); color: #fff; font-size: 15px; line-height: 24px; padding: 0; cursor: pointer; }
.thumb.up::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.55); }

.catnote { margin-top: 4px; }
.catnote summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--ink-2); padding: 10px 2px; list-style: none; }
.catnote summary::-webkit-details-marker { display: none; }
.catnote summary::before { content: "+ "; }
.catnote[open] summary::before { content: "− "; }

.checkpoint { border-radius: var(--radius-lg); padding: 18px; margin: 30px 0 0; background: var(--ink); color: var(--card); }
.checkpoint h2 { color: var(--card); margin-bottom: 6px; }
.checkpoint p { color: color-mix(in srgb, var(--card) 80%, transparent); }
.checkpoint .btn { background: var(--card); color: var(--ink); }
.checkpoint.ok { background: var(--done-bg); color: var(--done); }
.checkpoint.ok h2, .checkpoint.ok p { color: var(--done); }

.opsteps { margin: 0; padding-left: 22px; }
.opsteps li { margin: 6px 0; }

.submitbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: color-mix(in srgb, var(--paper) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line-2); padding: 10px var(--pad) calc(env(safe-area-inset-bottom) + 10px); }
.submitbar-in { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; align-items: center; }
.submitbar .saved { font-size: 13px; color: var(--ink-3); flex: 1; }
.practice-flag { background: var(--todo); color: #1C1C1E; text-align: center; font-weight: 700; font-size: 14px;
  padding: 6px; }

/* review sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 40; display: none; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-height: 88vh; overflow: auto;
  background: var(--paper); border-radius: 22px 22px 0 0; padding: 10px var(--pad) calc(env(safe-area-inset-bottom) + 18px);
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.sheet.open { transform: none; }
.sheet-bg.open { display: block; }
.sheet-in { max-width: 680px; margin: 0 auto; }
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 4px auto 14px; }
.rv-cat { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.rv-cat:first-child { border-top: 0; }
.rv-cat .grow { flex: 1; }
.rv-count { font-size: 13.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.rv-fails { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; color: var(--ink-2); }
@media (prefers-reduced-motion: reduce) { .sheet, .seg i, .switch input, .switch input::after { transition: none; } }

/* ---------- report */
.rep-hero { display: flex; gap: 16px; align-items: center; }
.rep-big { font-size: 56px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; padding: 12px 16px;
  border-radius: 18px; font-variant-numeric: tabular-nums; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cat-cell { border-radius: var(--radius); padding: 10px 12px; text-decoration: none; display: block; }
.cat-cell b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.cat-cell span { font-size: 13.5px; font-weight: 600; }
.rep-q { padding: 12px 0; border-top: 1px solid var(--line-2); }
.rep-q:first-of-type { border-top: 0; }
.rep-q .top { display: flex; gap: 10px; align-items: baseline; }
.rep-q .top .grow { flex: 1; font-weight: 600; }
.rep-q .note { margin: 6px 0 0; white-space: pre-wrap; font-size: 15px; color: var(--ink-2); }
.rep-photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rep-photos img { width: 96px; height: 96px; object-fit: contain; border-radius: 10px; background: #111; display: block; }
.r-pass { color: var(--done); font-weight: 700; }
.r-mid { color: var(--mid); font-weight: 700; }
.r-fail { color: var(--bad); font-weight: 700; }

/* ---------- admin */
.tabs { display: flex; gap: 4px; background: var(--line-2); padding: 4px; border-radius: 12px; margin-bottom: 16px;
  overflow-x: auto; }
.tabs a { flex: 1; text-align: center; text-decoration: none; font-weight: 600; font-size: 15px; padding: 9px 12px;
  border-radius: 9px; color: var(--ink-2); white-space: nowrap; }
.tabs a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 0 0 1px var(--line-2); }
.stat b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat span { font-size: 14px; color: var(--ink-2); }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 13px; font-weight: 600; color: var(--ink-3); padding: 8px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tick { display: inline-flex; align-items: center; gap: 6px; margin: 3px 6px 3px 0; padding: 5px 10px;
  border-radius: 999px; font-size: 14px; font-weight: 600; text-decoration: none; }
.tick.yes { background: var(--done-bg); color: var(--done); }
.tick.no { background: var(--todo-bg); color: var(--todo); }
.bar { height: 8px; border-radius: 4px; background: var(--todo-bg); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; background: var(--done); }
.spark { display: inline-flex; gap: 2px; align-items: flex-end; height: 22px; vertical-align: middle; }
.spark i { width: 7px; border-radius: 2px; background: var(--ink-3); }
.spark i.band-green { background: var(--done); } .spark i.band-yellow { background: var(--todo); } .spark i.band-red { background: var(--bad); }
.inline-form { display: inline; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
/* our own chevron, sitting right after the text (the built-in desktop arrow floated far away) */
select { appearance: none; -webkit-appearance: none; padding-right: 38px; background-repeat: no-repeat;
  background-position: right 12px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238A8A92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.toolbar select { width: auto; min-height: 40px; padding: 6px 34px 6px 12px; field-sizing: content; }
.mono-key { font: 600 20px/1.4 ui-monospace, Menlo, monospace; letter-spacing: .04em; word-break: break-all;
  background: var(--line-2); padding: 12px; border-radius: var(--radius); }
.qr svg { width: 200px; height: 200px; background: #fff; padding: 8px; border-radius: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.grid-in input[type=number] { width: 54px; padding: 6px 4px; text-align: center; }
.grid-in td .tiny { display: block; margin-top: 2px; }
.acc-box { border-left: 3px solid var(--done, #2E7D4F); background: var(--line-2); padding: 10px 12px; border-radius: 0 10px 10px 0; }
.acc-box.warn { border-left-color: var(--todo, #C77700); }
.ho-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.ho-grid label { display: flex; flex-direction: column; gap: 4px; }
.ho-grid select, .ho-grid input { width: 100%; }
.ho-grid input[type=date] { min-height: 46px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card, transparent); color: inherit; font: inherit; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } h1 { font-size: 26px; } }

@media print {
  .topbar, .submitbar, .noprint { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
body:has(main.wide) .progress-in { max-width: 1100px; }

/* batch 2 additions */
.sec + .sec, .checkpoint + .sec, #sec-finish { border-top: 3px solid var(--line); padding-top: 26px; margin-top: 34px; }
.catnote { background: var(--card); border-radius: var(--radius-lg); padding: 16px; margin-top: 12px;
  box-shadow: 0 0 0 1px var(--line-2); }
.catnote h3 { font-size: 17px; }
.catnote textarea { min-height: 96px; font-size: 16px; }
.repeat { display: inline-block; margin: 6px 0 2px; font-size: 13.5px; font-weight: 700; color: var(--bad);
  background: var(--bad-bg); padding: 4px 10px; border-radius: 999px; }
.rate:has(button:nth-child(3)) button { font-size: 16px; }

/* charts (svgcharts.py) */
.chart { display: block; overflow: visible; }
.chart text { font-family: inherit; }
.c-grid { stroke: var(--line-2); stroke-width: 1; }
.c-axis { fill: var(--ink-3); font-size: 11px; }
.c-label { fill: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.c-val { fill: var(--ink); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.c-ref { fill: var(--ink-3); font-size: 10.5px; font-weight: 600; }
.c-goal { stroke: var(--done); stroke-width: 1.5; stroke-dasharray: 5 4; }
.c-fail { stroke: var(--todo); stroke-width: 1.5; stroke-dasharray: 5 4; }
.c-avg { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 1.5 3.5; stroke-linecap: round; }
.c-line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.c-dot { stroke: var(--card); stroke-width: 2; }
.spark { display: inline-block; vertical-align: middle; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin: 4px 0 8px; }
.chart-legend i { display: inline-block; width: 16px; border-top: 2px dashed; vertical-align: middle; margin-right: 5px; }
.multiples { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.multiples > div { background: var(--card); border-radius: var(--radius); padding: 8px 10px; box-shadow: 0 0 0 1px var(--line-2); }
.multiples b { font-size: 13px; display: block; }
.multiples .spark { width: 100%; height: auto; }

/* bright = this inspection, light = last (like the original BSR); category colors from the original BSR */
/* bright score colors for charts (bars, rings, trend lines and dots): the same as the tiles' Now boxes */
:root { --bar-green: #30D158; --bar-yellow: #FFD60A; --bar-red: #FF453A; --bar-white: #8E8E93; }
:root { --viz-green: #34C759; --viz-yellow: #F5BE00; --viz-red: #FF3B30; --viz-white: #8E8E93; }
:root { --now-green: #34C759; --now-green-ink: #08301A; --now-yellow: #FFD60A; --now-yellow-ink: #3A2C00;
  --now-red: #FF3B30; --now-red-ink: #fff; --cat-yellow: #FFF2CC; --cat-blue: #DCE9F8; --cat-green: #DCEFD8; --cat-pink: #F9D9D9; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) {
  --cat-yellow: #3A3218; --cat-blue: #1E2A3A; --cat-green: #1E3222; --cat-pink: #3A2224; } }
:root[data-scheme="dark"] { --cat-yellow: #3A3218; --cat-blue: #1E2A3A; --cat-green: #1E3222; --cat-pink: #3A2224; }
.now-green { background: var(--now-green); color: var(--now-green-ink); }
.now-white { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink-3); }
.now-yellow { background: var(--now-yellow); color: var(--now-yellow-ink); }
.now-red { background: var(--now-red); color: var(--now-red-ink); }
.now-none { color: var(--ink-3); }
.cat-Food, .cat-Kitchen { background: var(--cat-yellow); }
.cat-Cleanliness, .cat-KitchenCleanliness, .cat-DrinkStation, .cat-Exterior, .cat-Bathroom { background: var(--cat-blue); }
.cat-Operations { background: var(--cat-green); }
.cat-Service, .cat-Uniform, .cat-EmployeeExp { background: var(--cat-pink); }
.cat-cell { color: var(--ink); }
.cat-cell > span { font-size: 15px; font-weight: 700; display: block; }
.cat-scores { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.pill-now, .pill-last { font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; border-radius: 8px; }
.pill-now { font-size: 20px; padding: 2px 9px; }
.pill-last { font-size: 13px; padding: 2px 7px; opacity: .95; }
.rep-sec { padding: 0; overflow: hidden; }
.rep-sec-head { display: flex; align-items: center; gap: 8px; padding: 14px 18px; }
.rep-sec-head h2 { flex: 1; font-size: 24px; font-weight: 750; }
.rep-sec .rep-q, .rep-sec > p, .rep-sec > .rep-photos { margin-left: 18px; margin-right: 18px; }
.rep-sec > p.tiny { margin-top: 10px; }
.rep-q .top .grow { font-size: 17px; }
.rep-q .note { font-size: 16px; }
.rep-q .top .r-pass, .rep-q .top .r-mid, .rep-q .top .r-fail { font-size: 16px; }
.rep-big.now-white { box-shadow: inset 0 0 0 2px var(--ink-3); }

.rep-hero { flex-wrap: wrap; }
.rep-hero > div:last-child { flex: 1; min-width: 200px; }
.rep-sec > .rep-q:last-child { margin-bottom: 8px; }

.now-yellow { box-shadow: inset 0 0 0 1.5px #A88600; }
.cat-scores { background: var(--card); border-radius: 12px; padding: 5px; display: inline-flex; }
.rep-sec-head .pill-last, .rep-sec-head .pill-now { background-clip: padding-box; }
.rep-sec-head .chips { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border-radius: 12px; padding: 4px; }

/* ---------- group inspection day-picking */
.gp-set { box-shadow: 0 0 0 2px var(--done); }
.gp-warn { box-shadow: 0 0 0 2px var(--todo); }
.gp-people { list-style: none; margin: 0; padding: 0; }
.gp-people li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.gp-people li:first-child { border-top: 0; }
.gp-people .pill { margin-left: auto; }
.gp-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { font-size: 12px; color: var(--ink-3); text-align: center; padding: 2px 0 4px; }
.cal-d { position: relative; min-height: 58px; border-radius: 10px; background: var(--line-2); padding: 4px 5px;
  display: flex; flex-direction: column; gap: 3px; cursor: pointer; overflow: hidden; }
.cal-d.out { background: transparent; cursor: default; }
.cal-d.past { opacity: .35; cursor: default; }
.cal-d input { position: absolute; opacity: 0; pointer-events: none; }
.cal-d.mine { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.cal-d.common { box-shadow: inset 0 0 0 3px var(--done); }
.cal-d.mine.common { box-shadow: inset 0 0 0 3px var(--done); background: var(--done-bg); }
.cal-d.chosen { background: var(--done); color: #fff; }
.cal-d:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.cal-n { font-weight: 600; font-size: 15px; }
.cal-who { display: flex; flex-wrap: wrap; gap: 3px; }
.cal-who i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.cal-names { display: flex; flex-direction: column; font-size: 10px; line-height: 1.15; }
.cal-names b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 640px) { .cal-d { min-height: 74px; } .cal-names { font-size: 12px; } }
.gp-msgs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gp-msgs li { background: var(--line-2); border-radius: 12px; padding: 8px 12px; max-width: 85%;
  display: flex; flex-direction: column; gap: 2px; }
.gp-msgs li.me { align-self: flex-end; background: var(--done-bg); }
.gp-from { font-weight: 600; font-size: 13px; }
.gp-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.gp-send { display: flex; gap: 8px; align-items: flex-end; }
.gp-send textarea { flex: 1; }
.bad-text { color: var(--bad); }
.nowrap { white-space: nowrap; }
.breakdown-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 14px 18px;
  text-align: left; justify-content: flex-start; }
.breakdown-btn .grow { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.breakdown-btn .s { font-weight: 400; font-size: 13px; opacity: .8; }
.breakdown-btn .chev { font-size: 22px; }

/* ---------- stores page */
.plainset { border: 0; padding: 0; margin: 0; min-width: 0; }
.plainset[disabled] input, .plainset[disabled] select { opacity: .75; }
.dot-missing { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--bad);
  vertical-align: middle; margin-right: 6px; }
.closed-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: 12px;
  font-weight: 700; background: var(--todo-bg); color: var(--todo); }
.missing-list { display: block; color: var(--bad); margin: 2px 0 0 15px; }
.store-del { margin-top: 10px; }
.group-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.group-box { background: var(--card); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line-2); }
.group-box.corp { box-shadow: 0 0 0 2px var(--line); }
.gb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.gb-stores { display: flex; flex-wrap: wrap; gap: 6px; }
.gb-chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: var(--line-2);
  color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.gb-chip .dot-missing { width: 7px; height: 7px; margin-right: 4px; }
.gb-chip.closed { background: var(--todo-bg); color: var(--todo); }

/* ---------- search a function + page info */
.search-link { display: inline-flex !important; align-items: center; gap: 6px; }
.search-link svg { flex: none; }
.search-txt { display: none; }
@media (min-width: 900px) { .search-txt { display: inline; } }
.fs-form input { font-size: 18px; padding: 14px 16px; border-radius: 14px; }
.fs-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fs-list a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; background: var(--card);
  border-radius: var(--radius); box-shadow: 0 0 0 1px var(--line-2); text-decoration: none; color: var(--ink); }
.fs-list a:hover { box-shadow: 0 0 0 2px var(--line); }
.fs-where { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.fs-desc { font-size: 14px; color: var(--ink-2); }
.page-info { margin-top: 28px; padding: 12px 16px; border-radius: var(--radius); background: var(--line-2); color: var(--ink-2); font-size: 14px; }
.page-info summary { cursor: pointer; font-weight: 600; display: flex; align-items: center; gap: 8px; list-style: none; }
.page-info summary::-webkit-details-marker { display: none; }
.page-info .i { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--ink-3); color: var(--card); font: italic 700 13px Georgia, serif; }
.page-info p { margin: 8px 0 0; line-height: 1.5; }

/* ---------- comparison chart series (validated categorical slots 1 & 2) */
:root { --series-1: #2a78d6; --series-2: #eb6834; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --series-1: #3987e5; --series-2: #d95926; } }
:root[data-scheme="dark"] { --series-1: #3987e5; --series-2: #d95926; }
.c-sline { fill: none; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.c-sline.s1 { stroke: var(--series-1); }
.c-sline.s2 { stroke: var(--series-2); stroke-dasharray: 7 4; }
.c-sdot { stroke: var(--card); stroke-width: 2; }
.c-sdot.s1 { fill: var(--series-1); }
.c-sdot.s2 { fill: var(--series-2); }
.c-slabel { font-size: 12px; }
.key { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-right: 14px; }
.key i { width: 18px; height: 0; border-top: 3px solid var(--series-1); display: inline-block; }
.key.s2 i { border-top: 3px dashed var(--series-2); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 640px) { .cmp-grid { grid-template-columns: 1fr; } }
.cmp-side h3 { display: flex; align-items: center; gap: 8px; }
.cmp-side h3 i { width: 12px; height: 12px; border-radius: 50%; background: var(--series-1); display: inline-block; }
.cmp-side.s2 h3 i { background: var(--series-2); }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.kpi { background: var(--line-2); border-radius: var(--radius); padding: 10px 12px; }
.kpi .l { font-size: 12px; color: var(--ink-3); font-weight: 600; display: block; }
.kpi .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kpi .v.sm { font-size: 15px; }
.gap-pos { color: var(--todo); font-weight: 700; }
.gap-neg { color: var(--ink-2); font-weight: 700; }
.brand { white-space: nowrap; }
.topnav { flex-wrap: nowrap; }
@media (max-width: 440px) {
  .topbar-in { gap: 6px; }
  .topnav { gap: 0; }
  .topnav a, .topnav button { padding: 7px 8px; font-size: 14.5px; }
  .topnav a.search-link { padding: 7px 6px; }
}

/* ---------- card rows: equal heights, one spacing everywhere */
.stats { gap: 16px; }
.stat { border-radius: var(--radius-lg); padding: 16px 18px; }
.grid2.cards { gap: 16px; margin-bottom: 16px; align-items: stretch; }
.grid2.cards > .panel { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.grid2.cards > .panel > .chart { margin: auto 0; }
@media (max-width: 760px) { .grid2.cards { grid-template-columns: 1fr; } }
.warn-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--todo-bg); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--todo) 40%, transparent); line-height: 1.5; }
.warn-box b { color: var(--todo); }
.code-input { font-size: 26px; letter-spacing: 6px; text-align: center; font-variant-numeric: tabular-nums; }
.kind-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.kind-pill.quarterly { background: color-mix(in srgb, var(--series-1) 16%, var(--card)); color: var(--series-1); }
.kind-pill.self { background: color-mix(in srgb, var(--series-2) 16%, var(--card)); color: var(--series-2); }
/* store breakdown button: same look as the other buttons, in light and dark */
.btn.breakdown-btn { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.breakdown-btn:hover { box-shadow: inset 0 0 0 2px var(--line); }
.btn.breakdown-btn .s { color: var(--ink-2); opacity: 1; }
.list > li.area-head { border-top: 0; padding: 12px 0 2px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.area-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0; padding: 4px 0; border-top: 1px solid var(--line-2); }
.area-row:first-child { border-top: 0; }
.area-label { flex: 0 0 150px; font-size: 12.5px; font-weight: 700; color: var(--ink-3); }
@media (max-width: 600px) { .area-label { flex-basis: 100%; } }

/* ---------- group inspection combined report */
.gpeople { margin-top: 14px; display: flex; flex-direction: column; }
.gperson { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.gperson i, .gdot, .gchip i, .gphotos figcaption i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.gdot { margin-right: 5px; }
.gsec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.gsec-head h2 { flex: 1; margin: 0; }
.gq { padding: 10px 0; border-top: 1px solid var(--line-2); }
.gq-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gchips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.gchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; }
.gchip.band-none { background: var(--line-2); color: var(--ink-2); }
.gnote { margin: 6px 0 0; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; }
.gcatnotes { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.gphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-top: 8px; }
.gphotos figure { margin: 0; }
.gphotos img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #111; border-radius: 10px; display: block; }
.gphotos figcaption { font-size: 12px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.tick.done-tick { background: var(--done-bg); color: var(--done); text-decoration: none; font-weight: 700; }
.nav-dot { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  margin-left: 6px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11px; font-weight: 700;
  line-height: 1; vertical-align: 1px; font-variant-numeric: tabular-nums; }
.role-tag { font-size: 13px; font-weight: 400; color: var(--ink-3); margin-left: 6px; letter-spacing: 0; }
.section-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 22px 0 10px; }
.section-title h2 { margin: 0; font-size: 22px; }
.timeline { margin: 0; padding-left: 20px; }
.timeline li { margin: 8px 0; line-height: 1.5; }
.nav-dot.inline { margin: 0 2px; vertical-align: 1px; }
.off-req { flex-basis: auto; }
.off-req summary { list-style: none; }
.off-req summary::-webkit-details-marker { display: none; }
.off-req[open] { flex-basis: 100%; }
.off-req[open] summary { display: none; }
.off-form { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.off-form .btn { align-self: flex-start; }
.who { padding: 8px 0; border-top: 1px solid var(--line-2); } .who summary { cursor: pointer; }

/* ---------- server dashboard */
.sv-head { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.sv-pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--done-bg); color: var(--done); }
.sv-pill.bad { background: var(--bad-bg); color: var(--bad); }
.sv-pill.warn { background: var(--todo-bg); color: var(--todo); }
.sv-test { background: var(--todo-bg); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 8px; font-size: 14px; }
.sv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
@media (max-width: 760px) { .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sv-card { background: var(--card); border-radius: var(--radius-lg); padding: 14px 16px; box-shadow: 0 0 0 1px var(--line-2); }
.sv-tile { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sv-tile.open { box-shadow: 0 0 0 2px var(--series-1); }
.sv-l { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.sv-v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: 2px; }
.sv-chev { font-size: 10px; }
.sv-bar { height: 5px; background: var(--line-2); border-radius: 3px; margin-top: 8px; }
.sv-bar i { display: block; height: 5px; border-radius: 3px; width: 0; background: var(--series-1); }
.sv-panel { grid-column: 1 / -1; }
.sv-ph { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; font-weight: 600; }
.sv-rb { font: inherit; font-size: 12.5px; background: var(--card); color: var(--ink-2); border: 1px solid var(--line); padding: 3px 10px; cursor: pointer; }
.sv-rb:first-child { border-radius: 8px 0 0 8px; } .sv-rb:last-child { border-radius: 0 8px 8px 0; border-left: 0; }
.sv-rb.on { background: var(--series-1); color: #fff; border-color: var(--series-1); }
.sv-svg { display: block; touch-action: pan-y; }
.sv-area { fill: var(--series-1); opacity: .12; } .sv-line { fill: none; stroke: var(--series-1); stroke-width: 1.8; stroke-linejoin: round; }
.sv-cur { stroke: var(--ink-3); stroke-width: .6; } .sv-dot { fill: var(--series-1); }
.sv-pad { padding: 18px 0; }
.sv-rows .sv-row, .sv-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.sv-rows .sv-row:first-child { border-top: 0; }
.sv-drive { margin-bottom: 10px; } .sv-drive .sv-row { border-top: 0; padding: 0; }

/* Role colors on People: a small dot + tinted tag. Inspector light blue, BSR Manager purple, Executive Command red,
   Executive gold, Owner/Admin dark red. */
:root {
  --r-insp: #4AA8E8; --r-insp-bg: #E7F3FC; --r-insp-ink: #1D6797;
  --r-bsr: #9466D4; --r-bsr-bg: #F2EBFB; --r-bsr-ink: #643A9F;
  --r-cmd: #E0453F; --r-cmd-bg: #FDECEB; --r-cmd-ink: #B0221D;
  --r-admin: #8A1C1C; --r-admin-bg: #F4E2E2; --r-admin-ink: #7A1515;
  --r-exec: #D4A017; --r-exec-bg: #FBF3DC; --r-exec-ink: #8A6400;
  --r-dm: #2E9E6B; --r-dm-bg: #E4F5EC; --r-dm-ink: #1C6B47;
  --r-office: #0E7C86; --r-office-bg: #E1F3F4; --r-office-ink: #0B5A61;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --r-insp: #6CBDF3; --r-insp-bg: #13283A; --r-insp-ink: #95CFF6;
    --r-bsr: #B08AE8; --r-bsr-bg: #261C38; --r-bsr-ink: #CDB1F3;
    --r-cmd: #FF6B66; --r-cmd-bg: #3A1717; --r-cmd-ink: #FF9D99;
    --r-admin: #B33A3A; --r-admin-bg: #2E1212; --r-admin-ink: #DE8484;
    --r-exec: #E5B93A; --r-exec-bg: #332810; --r-exec-ink: #F0CF6E;
    --r-dm: #4CC48D; --r-dm-bg: #11291E; --r-dm-ink: #8EDDB8;
  --r-office: #4CC3CC; --r-office-bg: #0E2628; --r-office-ink: #9BE0E5;
    --r-office: #4CC3CC; --r-office-bg: #0E2628; --r-office-ink: #9BE0E5;
  }
}
:root[data-scheme="dark"] {
  --r-insp: #6CBDF3; --r-insp-bg: #13283A; --r-insp-ink: #95CFF6;
  --r-bsr: #B08AE8; --r-bsr-bg: #261C38; --r-bsr-ink: #CDB1F3;
  --r-cmd: #FF6B66; --r-cmd-bg: #3A1717; --r-cmd-ink: #FF9D99;
  --r-admin: #B33A3A; --r-admin-bg: #2E1212; --r-admin-ink: #DE8484;
  --r-exec: #E5B93A; --r-exec-bg: #332810; --r-exec-ink: #F0CF6E;
  --r-dm: #4CC48D; --r-dm-bg: #11291E; --r-dm-ink: #8EDDB8;
}
.role-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; padding: 2px 9px 2px 7px;
  border-radius: 999px; white-space: nowrap; vertical-align: 1px; }
.role-chip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.role-chip.r-insp { background: var(--r-insp-bg); color: var(--r-insp-ink); } .role-chip.r-insp i { background: var(--r-insp); }
.role-chip.r-bsr { background: var(--r-bsr-bg); color: var(--r-bsr-ink); } .role-chip.r-bsr i { background: var(--r-bsr); }
.role-chip.r-cmd { background: var(--r-cmd-bg); color: var(--r-cmd-ink); } .role-chip.r-cmd i { background: var(--r-cmd); }
.role-chip.r-exec { background: var(--r-exec-bg); color: var(--r-exec-ink); } .role-chip.r-exec i { background: var(--r-exec); }
.role-chip.r-dm { background: var(--r-dm-bg); color: var(--r-dm-ink); } .role-chip.r-dm i { background: var(--r-dm); }
.role-chip.r-office { background: var(--r-office-bg); color: var(--r-office-ink); } .role-chip.r-office i { background: var(--r-office); }
.role-chip.r-admin { background: var(--r-admin-bg); color: var(--r-admin-ink); } .role-chip.r-admin i { background: var(--r-admin); }
.side-tag { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.role-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
@media (max-width: 640px) { .role-legend { display: none; } }   /* the role key: computer only */
.savebar { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.savebar [data-dirty-msg] { color: var(--todo); font-weight: 600; }
.setup-steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; padding: 0; list-style: none; }
.setup-steps li { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.setup-steps li.on { background: var(--btn); color: var(--btn-ink); font-weight: 650; }
.setup-steps li.done { background: var(--done-bg); color: var(--done); }
.setup-steps a { text-decoration: none; }
.tool-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin: 10px 0 4px; }
.tool-list > div { background: var(--white-band); border-radius: var(--radius); padding: 12px 14px; }
.tool-list b { display: block; margin-bottom: 2px; }

.site-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 8px 16px 28px; font-size: 13px; }
.site-foot a { color: var(--ink-3); text-decoration: none; }
.site-foot a:hover, .site-foot a:focus-visible { color: var(--ink-2); text-decoration: underline; }
.legal h2 { margin-top: 18px; font-size: 18px; }
.legal p, .legal li { color: var(--ink-2); }

/* small dropdown menu (no script needed) */
.dropdown { position: relative; display: inline-block; }
.dropdown > summary { list-style: none; cursor: pointer; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown > summary::after { content: ' ▾'; font-size: 11px; }
.dropdown-menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; min-width: 250px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 6px; }
.dropdown-menu a { display: block; padding: 9px 10px; border-radius: var(--radius-sm); text-decoration: none; }
.dropdown-menu a:hover, .dropdown-menu a:focus-visible { background: var(--line-2); }
.dropdown-menu a b { display: block; font-size: 15px; }
.dropdown-menu a span { display: block; font-size: 12.5px; color: var(--ink-3); }

.chg-tag { display: inline-block; font-size: 11.5px; font-weight: 650; padding: 1px 7px; border-radius: 999px; margin-left: 6px;
  background: var(--todo-bg); color: var(--todo); vertical-align: 1px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pool-tabs { align-items: stretch; }
.pool-tabs .pool-pick { flex: 1; display: flex; margin: 0; }
.pool-tabs .pool-pick select { flex: 1; min-height: 0; border: 0; background-color: transparent; font-weight: 600; font-size: 15px;
  color: var(--ink-2); padding: 7px 10px; border-radius: 9px; text-align: center; text-align-last: center; cursor: pointer; }
.pool-tabs .pool-pick.on select { background-color: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.scrollbox-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.scrollbox-head h2 { flex: 1; }
.scrollbox-body { max-height: 380px; overflow: auto; border-top: 1px solid var(--line-2); }
.scrollbox.open .scrollbox-body { max-height: none; }
.scrollbox-body thead th { position: sticky; top: 0; background: var(--card); z-index: 1; }
.notices { box-shadow: 0 0 0 2px var(--bad); }
.notice-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 0; }
.notice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--todo); flex: none; }
.notice-dot.k-temp, .notice-dot.k-security, .notice-dot.k-disk { background: var(--bad); }
.thread { display: flex; flex-direction: column; gap: 8px; max-height: 460px; overflow-y: auto; padding: 2px 0 10px; }
.bubble { max-width: 82%; padding: 9px 13px; border-radius: 16px; }
.bubble.theirs { align-self: flex-start; background: var(--line-2); border-bottom-left-radius: 6px; }
.bubble.mine { align-self: flex-end; background: var(--btn); color: var(--btn-ink); border-bottom-right-radius: 6px; }
.bubble-meta { font-size: 12px; opacity: .7; margin-bottom: 2px; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15.5px; }
.thread-form { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line-2); padding-top: 10px; }
.thread-form textarea { flex: 1; resize: vertical; }
.col-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.col-stack > .panel { margin-bottom: 0; }
.person-head { margin-top: 4px; }
.stores-pick > summary { list-style: none; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.stores-pick > summary::-webkit-details-marker { display: none; }
.stores-pick > summary .grow { flex: 1; }
.stores-pick[open] > summary .btn { visibility: hidden; }
.msg-row { display: flex; justify-content: flex-end; margin: -6px 0 10px; }
.msg-btn { display: inline-flex; align-items: center; gap: 7px; }
.sched-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.sched-bar > form { margin: 0; }
.sched-bar .msg-btn { margin-left: auto; }
@media (max-width: 620px) {      /* phone: Month and Messages on one line, Scheduling settings under them */
  .sched-bar > form { order: 1; } .sched-bar .msg-btn { order: 2; } .sched-bar .sched-settings { order: 3; }
}

.danger-zone { margin-top: 14px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.danger-zone > summary { cursor: pointer; color: var(--bad); }
@media (max-width: 620px) { .sched-bar select { max-width: 170px; } }
@media (max-width: 620px) {
  .sched-bar > form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sched-bar > form select { max-width: 160px; min-width: 0; font-size: 15px; padding: 6px 28px 6px 10px; background-position: right 9px center; }
  .sched-bar { gap: 8px; }
  .sched-bar > form { flex: 0 1 auto; min-width: 0; width: auto; }
}

/* ---- red ring spinner (drawn by ui.js): a ring draws itself clockwise from north, then un-draws while sliding a
   quarter turn, so it shrinks to a dot at east — then redraws from east, and so on: north, east, south, west ---- */
:root { --spin: #E0303E; }
.spin { width: 48px; height: 48px; flex: none; overflow: visible; color: var(--spin); }
.spin path { fill: none; stroke: currentColor; stroke-width: 10; stroke-linecap: round; stroke-linejoin: round; }
.spin circle { fill: currentColor; }
.busy { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: color-mix(in srgb, var(--paper) 55%, transparent); backdrop-filter: blur(2px); }
.busy[hidden] { display: none; }
.busy-card { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--card);
  padding: 24px 28px; border-radius: var(--radius-lg); box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 300px; text-align: center; }
.busy-card p { margin: 0; font-weight: 600; }
.busy-page { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 12px; }

.sus { margin-top: 6px; }
.sus > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.sus > summary::-webkit-details-marker { display: none; }
.sus > summary::after { content: '▾'; font-size: 12px; color: var(--bad); }
.sus[open] > summary::after { content: '▴'; }
.sus ul { margin: 6px 0 4px; padding-left: 18px; color: var(--ink-2); }

.sched-bar-box { padding: 12px 16px; }
.sched-bar-box .sched-bar { padding-bottom: 0; margin-bottom: 0; border-bottom: 0; }

/* "inspecting now" on This month: a soft rotating outline + a pulsing dot */
@property --live-ang { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.tick.live { border: 2px solid transparent; color: var(--ink); font-weight: 650;
  background: linear-gradient(var(--card), var(--card)) padding-box,
              conic-gradient(from var(--live-ang), var(--focus), color-mix(in srgb, var(--focus) 12%, transparent) 35%,
                             color-mix(in srgb, var(--focus) 12%, transparent) 65%, var(--focus)) border-box;
  animation: live-spin 2.4s linear infinite; }
.tick.live .live-txt { font-weight: 500; color: var(--ink-2); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--focus); margin-right: 6px;
  vertical-align: 1px; animation: live-pulse 1.6s ease-in-out infinite; }
.live-count { color: var(--ink); font-weight: 650; }
@keyframes live-spin { to { --live-ang: 360deg; } }
@keyframes live-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }
@media (prefers-reduced-motion: reduce) { .tick.live, .live-dot { animation: none; } }

.zip-st { display: inline-block; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px;
  background: var(--line-2); color: var(--ink-2); vertical-align: 1px; }

/* ---- skeletons: gray placeholder shapes while the Server page's numbers and charts load */
.skel { display: block; background: var(--line-2); border-radius: 6px; position: relative; overflow: hidden; }
.skel::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 70%, transparent), transparent);
  animation: skel 1.3s ease-in-out infinite; }
@keyframes skel { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .skel::after { animation: none; } }
.skel-v { width: 70%; height: 26px; margin: 4px 0; }
.skel-chart { height: 180px; margin: 6px 0; border-radius: var(--radius); }
.skel-lines { display: grid; gap: 10px; padding: 4px 0; }
.skel-lines i { display: block; height: 14px; border-radius: 6px; background: var(--line-2); position: relative; overflow: hidden; }
.skel-lines i:nth-child(2) { width: 82%; } .skel-lines i:nth-child(3) { width: 60%; }
.skel-lines i::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 70%, transparent), transparent);
  animation: skel 1.3s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .skel-lines i::after { animation: none; } }

/* line icons (app/icons.py) */
.ico { flex: none; vertical-align: -0.15em; }

/* ---- person page: sections (Account & access, Inspector settings). Computer: a list on the left, one section
   shown at a time. Phone: each section opens underneath its heading. Without scripts everything just shows. */
.psecs { margin-top: 4px; }
.psec-nav { display: none; }
.psec-head { display: none; }
.psecs.js .psec-head { display: flex; width: 100%; align-items: center; justify-content: space-between; font: inherit;
  font-weight: 650; font-size: 19px; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.psec-head i::after, .psec-nav i::after { content: '›'; display: inline-block; font-style: normal; font-size: 22px; line-height: 1;
  color: var(--ink-3); transition: transform .15s; }
.psecs.js .psec.open .psec-head i::after { transform: rotate(90deg); }
.psecs.js .psec-title { display: none; }
.psecs.js .psec:not(.open) .psec-body { display: none; }
.psecs.js .psec.open .psec-head { margin-bottom: 12px; }
@media (min-width: 820px) {
  .psecs.js { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
  .psecs.js .psec-nav { display: block; position: sticky; top: 80px; background: var(--card); border-radius: var(--radius-lg);
    box-shadow: 0 0 0 1px var(--line-2); overflow: hidden; }
  .psec-nav button { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; font: inherit;
    font-weight: 600; font-size: 16px; color: var(--ink-2); background: none; border: 0; border-top: 1px solid var(--line-2);
    padding: 15px 16px; cursor: pointer; text-align: left; }
  .psec-nav button:first-child { border-top: 0; }
  .psec-nav button[hidden] { display: none; }
  .psec-nav button.on { color: var(--ink); background: var(--line-2); }
  .psec-nav button.on i::after { transform: rotate(90deg); color: var(--ink); }
  .psecs.js .psec:not(.on) { display: none; }
  .psecs.js .psec .psec-head { display: none; }
  .psecs.js .psec-title { display: block; margin-bottom: 4px; }
  .psecs.js .psec .psec-body { display: block !important; }
}
.psec[hidden] { display: none !important; }
.insp-hint { margin: 4px 0 0; }
.kv { display: flex; gap: 10px; align-items: baseline; margin-top: 12px; }
.kv span { color: var(--ink-2); font-weight: 600; font-size: 15px; }
.scope-pick { border: 0; padding: 0; margin: 6px 0 0; }
.scope-pick[hidden] { display: none; }
.scope-pick legend { padding: 0; }
.scope-pick label { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-size: 16px; cursor: pointer; }
.scope-pick input { width: 20px; height: 20px; margin: 0; accent-color: var(--focus); }
.acct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.danger-row { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: flex-start; margin-top: 12px; }
.danger-row .danger-zone { margin: 0; padding: 0; border: 0; flex-basis: auto; }
.danger-row .danger-zone[open] { flex-basis: 100%; }
.textbtn { font: inherit; font-size: 15px; font-weight: 600; background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--ink-2); list-style: none; }
.textbtn::-webkit-details-marker { display: none; }
.textbtn:hover { text-decoration: underline; }
.textbtn.bad-text { color: var(--bad); }
.psec-nav button:disabled { opacity: .45; cursor: default; }
.avail-row { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; }
.comp-rate { font-size: 15px; }
.good-text { color: var(--done); }
.setup-note { box-shadow: 0 0 0 2px var(--focus); }
.setup-steps { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.link-hint { padding: 10px 16px; }
.link-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 4px 0; }
.link-row .grow { flex: 1; min-width: 200px; }
.link-other { margin: 6px 2px 0; }
/* small "Something ›" expanders (What each role can do, Theme info style) */
.mini-more { margin: 8px 0 2px; }
.mini-more > summary { list-style: none; cursor: pointer; display: inline-flex; font-size: 13.5px; }
.mini-more > summary::-webkit-details-marker { display: none; }
.mini-more > summary span { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-2); }
.mini-more > summary span::after { content: '›'; font-size: 16px; line-height: 1; transition: transform .15s; }
.mini-more[open] > summary span::after { transform: rotate(90deg); }
.mini-more > summary:hover span { color: var(--ink); }
.mini-more > ul { margin: 8px 0 0; padding: 4px 0 0 14px; border-left: 2px solid var(--line-2); list-style: none; font-size: 13px; color: var(--ink-2); }
.mini-more > ul li { padding: 3px 0; }
.invite-panel { padding: 12px 16px; }
.invite { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; }
.invite .grow { flex: 1; min-width: 220px; line-height: 1.35; }
.invite-box { display: inline; margin: 0 0 0 4px; }
.invite-box > summary { vertical-align: baseline; }
.invite-box[open] { display: block; margin: 6px 0 0; }
.invite-box input { display: block; width: 100%; max-width: 520px; font-size: 14px; min-height: 38px; padding: 7px 10px; margin: 6px 0 4px; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 6px; vertical-align: 2px; }
.status-dot.on { background: var(--done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 22%, transparent); }
.status-dot.off { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 22%, transparent); }

/* ---- inspection form additions (Oct 2026) ---- */
/* words that were bold on the Google Form: a subtle highlight so the key part catches the eye */
.bul b, .opsteps b, .checkpoint b { color: var(--ink); font-weight: 650; }
/* the review sheet: the form behind it stays put (iPhone needs the page pinned) */
body.scroll-lock { position: fixed; left: 0; right: 0; overflow: hidden; }
.sheet { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet-bg { touch-action: none; }
/* Uniform: "I can't take a photo" (only after a Fail with no photo) */
.switch.nophoto { margin-top: 6px; padding: 8px 0 0; border-top: 1px dashed var(--line); }
.switch.nophoto[hidden] { display: none; }
.switch.nophoto input { width: 44px; height: 27px; }
.switch.nophoto input::after { width: 23px; height: 23px; }
.switch.nophoto input:checked::after { transform: translateX(17px); }
/* Employee Experience: ask yourself, or hand the phone over */
.emp-choice { background: var(--card); border-radius: var(--radius-lg); padding: 16px; margin-bottom: 12px;
  box-shadow: 0 0 0 1px var(--line-2); scroll-margin-top: 150px; }
.emp-choice h3 { margin-bottom: 10px; }
.emp-modes button { font-size: 15px; line-height: 1.2; padding: 6px 8px; }
.emp-modes button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
.emp-choice [data-emp-problem] { margin-top: 10px; }
.emp-scores { display: flex; flex-wrap: wrap; gap: 6px; }
.emp-score { font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); }
.emp-score.r-pass { background: var(--done-bg); color: var(--done); }
.emp-score.r-mid { background: var(--mid-bg); color: var(--mid); }
.emp-score.r-fail { background: var(--bad-bg); color: var(--bad); }
.emp-mode { position: fixed; inset: 0; z-index: 60; background: var(--paper); overflow: auto; overscroll-behavior: contain;
  padding: calc(env(safe-area-inset-top) + 16px) var(--pad) calc(env(safe-area-inset-bottom) + 24px); }
.emp-mode[hidden] { display: none; }
.emp-in { max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; min-height: 100%; }
.emp-lang { align-self: flex-end; margin-bottom: 18px; }
.emp-lang select { width: auto; min-height: 40px; font-size: 15px; padding: 6px 34px 6px 12px; }
.emp-in h2 { font-size: 26px; line-height: 1.2; margin-bottom: 14px; }
.emp-private { background: var(--card); border-radius: var(--radius); padding: 14px 16px; font-size: 16px; color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line-2); }
.emp-private b { color: var(--ink); }
.emp-step { font-size: 14px; color: var(--ink-3); margin: 0 0 6px; }
.emp-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-bottom: 22px; }
.emp-bar i { display: block; height: 100%; background: var(--done); border-radius: 3px; transition: width .2s; }
.emp-opts { display: grid; gap: 10px; }
.emp-opts button, .emp-scale button { font: inherit; font-weight: 600; border: 0; cursor: pointer; background: var(--card);
  color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); border-radius: 14px; }
.emp-opts button { min-height: 58px; font-size: 18px; text-align: left; padding: 0 18px; }
.emp-opts button[aria-pressed="true"], .emp-scale button[aria-pressed="true"] { background: var(--ink); color: var(--card); box-shadow: none; }
.emp-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.emp-scale button { min-height: 52px; font-size: 19px; }
@media (min-width: 520px) { .emp-scale { grid-template-columns: repeat(11, 1fr); } .emp-scale button { min-height: 48px; font-size: 17px; } }
.emp-scale-ends { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-3); margin-top: 8px; }
.emp-in textarea { font-size: 17px; }
.emp-err { color: var(--bad); font-weight: 600; font-size: 15px; margin: 14px 0 0; }
.emp-nav { display: flex; gap: 10px; margin-top: auto; padding-top: 26px; }
.emp-nav .btn { flex: 1; min-height: 54px; }
.emp-nav .btn:last-child { flex: 2; }
.emp-done { text-align: center; margin: auto 0; padding: 30px 0; }
.emp-done p { font-size: 19px; color: var(--ink-2); margin-bottom: 26px; }
.emp-check { width: 76px; height: 76px; border-radius: 50%; background: var(--done-bg); color: var(--done); display: grid;
  place-items: center; margin: 0 auto 18px; }
.emp-check svg { width: 40px; height: 40px; }
.emp-private-panel h2 { display: flex; align-items: center; gap: 8px; }
.emp-answers { margin: 0; display: grid; gap: 2px 0; }
.emp-answers dt { font-size: 13.5px; color: var(--ink-3); margin-top: 10px; }
.emp-answers dd { margin: 0; font-weight: 600; white-space: pre-wrap; }
/* small hover / tap note (e.g. an inspection happening now: when it started, how long so far) */
.has-tip { position: relative; cursor: default; }
.has-tip .tip { position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translate(-50%, 4px); z-index: 20;
  background: var(--ink); color: var(--card); font-size: 13px; font-weight: 500; line-height: 1.35; white-space: nowrap;
  padding: 7px 10px; border-radius: 9px; box-shadow: 0 6px 18px rgba(0,0,0,.18); opacity: 0; pointer-events: none;
  transition: opacity .12s, transform .12s; }
.has-tip .tip::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent;
  border-top-color: var(--ink); }
.has-tip .tip .ico { vertical-align: -2px; }
.has-tip .tip-sub { opacity: .7; font-size: 12px; }
.has-tip:hover .tip, .has-tip:focus-visible .tip, .has-tip.tip-open .tip { opacity: 1; transform: translate(-50%, 0); }
.emp-resp { border-top: 1px solid var(--line-2); padding: 10px 0; }
.emp-resp summary { cursor: pointer; }
/* What's New pop-ups (app/whatsnew.py) */
html.wn-open, html.wn-open body { overflow: hidden; }
.wn-bg { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.42); display: none; }
.wn-bg.open { display: block; }
.wn-card { position: fixed; z-index: 71; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; flex-direction: column;
  background: var(--card); color: var(--ink); border-radius: 20px; padding: 22px 22px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3), 0 0 0 1px var(--line-2); }
.wn-card[hidden] { display: none; }
.wn-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; padding-right: 34px; }
.wn-head h2 { font-size: 22px; }
.wn-badge { align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--todo); background: var(--todo-bg); padding: 3px 9px; border-radius: 999px; }
.wn-body { overflow: auto; overscroll-behavior: contain; margin: 0 -4px; padding: 0 4px; }
.wn-list { margin: 0; padding-left: 20px; }
.wn-list li { margin: 0 0 10px; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.wn-list li b { color: var(--ink); }
.wn-sub { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin: 14px 0 8px; }
.wn-list.coming li::marker { content: "→  "; }
.wn-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.wn-foot .wn-ack { flex: 1; padding: 4px 0; }
.wn-foot .btn { min-width: 108px; }
.wn-foot-close { justify-content: flex-end; }
.wn-foot-close[hidden] { display: none; }
.wn-x { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: var(--line-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.wn-x:hover { background: var(--line); }
@media (max-width: 520px) {
  .wn-card { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: 20px 20px 0 0;
    max-height: calc(100dvh - 40px); padding-bottom: calc(env(safe-area-inset-bottom) + 16px); }
  .wn-foot { flex-wrap: wrap; } .wn-foot .wn-ack { flex: 1 1 100%; } .wn-foot .btn { flex: 1; }
}
.site-foot .ver { opacity: .6; font-size: 12px; font-variant-numeric: tabular-nums; }
.sub-switches { margin: 2px 0 0 18px; padding-left: 14px; border-left: 2px solid var(--line-2); }
.sub-switches.is-off .switch { opacity: .45; cursor: not-allowed; }
.sub-switches .sub-note { margin: 8px 0 0; }
/* Schedule: one subtle box holds the month and every inspector's stores */
.month-wrap { background: var(--line-2); border-radius: calc(var(--radius-lg) + 6px); padding: 10px; margin: 0 0 16px;
  box-shadow: inset 0 0 0 1px var(--line); }
.month-wrap > .panel { margin-bottom: 10px; }
.month-wrap > .panel:last-child { margin-bottom: 0; }
.month-head { box-shadow: 0 0 0 1px var(--line), 0 1px 3px rgba(0,0,0,.05); }
.mh-top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.mh-info { flex: 1; min-width: 220px; }
.mh-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mh-actions form { margin: 0; }
.dropdown-menu.right { left: auto; right: 0; }
.dropdown-menu form { margin: 0; }
.dropdown-menu button.mi { display: block; width: 100%; text-align: left; font: inherit; color: inherit; background: none;
  border: 0; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.dropdown-menu button.mi:hover, .dropdown-menu button.mi:focus-visible { background: var(--line-2); }
.dropdown-menu button.mi b { display: block; font-size: 15px; }
.dropdown-menu button.mi span { display: block; font-size: 12.5px; color: var(--ink-3); }
.dropdown-menu button.mi.danger b { color: var(--bad); }
.dropdown-menu a + form, .dropdown-menu form + form { border-top: 1px solid var(--line-2); margin-top: 4px; padding-top: 4px; }
@media (max-width: 640px) {
  .month-wrap { padding: 6px; margin-left: -6px; margin-right: -6px; }
  .mh-actions { width: 100%; } .mh-actions .dropdown { flex: 1; } .mh-actions .dropdown > summary { width: 100%; }
  .mh-actions > form { flex: 1; } .mh-actions > form .btn { width: 100%; }
}
/* Who's available: red = paused, yellow = a manager should look, green = available */
.avail { display: inline-flex; align-items: center; gap: 8px; }
.adot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; vertical-align: -1px; }
.adot.green { background: var(--done); box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 20%, transparent); }
.adot.yellow { background: #E5A800; box-shadow: 0 0 0 3px color-mix(in srgb, #E5A800 26%, transparent); }
.adot.red { background: var(--bad); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 20%, transparent); }
.avail-key { display: flex; gap: 14px; flex-wrap: wrap; margin: -4px 0 10px; }
.avail-key span { display: inline-flex; align-items: center; gap: 6px; }
.nav-dot.gold { min-width: 9px; width: 9px; height: 9px; padding: 0; background: #E0A100; vertical-align: 6px; margin-left: 4px;
  box-shadow: 0 0 0 2px color-mix(in srgb, #E0A100 25%, transparent); }
.fresh-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 0 0 14px; border-radius: var(--radius);
  background: var(--card); box-shadow: 0 0 0 2px #D9A21B; font-size: 15px; }
.fresh-note .ico { color: #B98400; flex: none; margin-top: 2px; }
/* Monthly Overview tiles: 3 across on a computer; on a phone 2 on top and the ring tile across the bottom */
.ov-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ov-stats .stat b { font-size: 30px; line-height: 1.15; }
.ov-avg.now-green { color: var(--now-green-ink) !important; } .ov-avg.now-yellow { color: var(--now-yellow-ink) !important; }
.ov-avg.now-red { color: var(--now-red-ink) !important; } .ov-avg.now-white { color: var(--ink) !important; }
.ov-avg { display: inline-block; font-size: 40px !important; line-height: 1.05; padding: 6px 16px; border-radius: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mini-bar { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.mini-bar i { display: block; height: 100%; border-radius: 3px; background: var(--done); }
.ov-ring-tile { display: flex; align-items: center; gap: 12px; }
.ov-ring-txt { flex: 1; min-width: 0; }
.ring-wrap { display: flex; align-items: center; gap: 12px; }
.ring-wrap .ring { width: 74px; height: 74px; flex: none; }
.ring-key { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; white-space: nowrap; }
.ring-key i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
@media (max-width: 760px) { .ov-ring-tile .ring-key { display: none; } }
@media (max-width: 640px) {
  .ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ov-ring-tile { grid-column: 1 / -1; }
  .ov-ring-tile .ring-key { display: block; }
}
/* ranked breakdown: bigger 6-month trends, with a small "what is this" */
.tbl.ranked .trend-td { min-width: 170px; }
.tbl.ranked .trend-td .spark { width: 160px; height: 40px; }
.info-pop { position: relative; display: inline-block; font-weight: inherit; }
.info-pop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.info-pop > summary::-webkit-details-marker { display: none; }
.info-pop .i { color: var(--ink-3); display: inline-flex; }
.info-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; background: var(--card);
  color: var(--ink-2); font-size: 13px; font-weight: 400; line-height: 1.45; white-space: normal; text-transform: none;
  letter-spacing: 0; padding: 10px 12px; border-radius: var(--radius-sm); box-shadow: 0 8px 24px rgba(0,0,0,.16), 0 0 0 1px var(--line); }
/* executives' first visit: a soft pulse around the Monthly Overview tab, until they open it once */
.tabs a.pulse { position: relative; }
.tabs a.pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--focus);
  animation: tabpulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes tabpulse { 0% { opacity: .9; transform: scale(.96); } 70% { opacity: 0; transform: scale(1.08); } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tabs a.pulse::after { animation: none; opacity: .8; } }
/* Line charts on the site: a soft fade under the line (svgcharts.CHART_FADE) and drag to read values */
.chart.fade .c-line { stroke: var(--focus); stroke-width: 2.25; }
.c-fade-top { stop-color: var(--focus); stop-opacity: .20; }
.c-fade-bottom { stop-color: var(--focus); stop-opacity: 0; }
.chart[data-scrub] { touch-action: pan-y; cursor: crosshair; -webkit-user-select: none; user-select: none; }
.c-scrub line { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 3 3; }
.c-scrub circle { fill: var(--card); stroke: var(--focus); stroke-width: 2.5; }
.c-scrub rect { fill: var(--ink); }
.c-scrub text { fill: var(--card); font-size: 12px; font-weight: 600; }
.ops-note { display: flex; gap: 10px; align-items: flex-start; background: var(--todo-bg); border-radius: var(--radius);
  padding: 10px 12px; margin: 8px 0 12px; font-size: 15px; color: var(--ink-2); }
.ops-note b { color: var(--ink); }
.ops-note .ico { color: var(--todo); flex: none; margin-top: 3px; }
.emp-choice.need { box-shadow: 0 0 0 3px var(--todo); }
.emp-choice.need h3::after { content: "  Pick one"; font-size: 13px; font-weight: 700; color: var(--todo); }
/* an open menu (Edit schedule, Open PDF…) always sits above the boxes after it, in every theme */
.panel:has(details[open]), .toolbar:has(details[open]), .stat:has(details[open]) { position: relative; z-index: 40; }
details.dropdown[open] { z-index: 41; }
/* Hover touches on the normal looks (Auto, Light, Soft, Dark, Darker). The More themes keep their own style.
   Only on devices with a real mouse, and off for anyone who asked their device to reduce motion. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .btn { transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .btn:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .btn:not(:disabled):active { transform: translateY(0); filter: brightness(.97); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .btn.ghost:not(:disabled):hover, :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .btn.danger:not(:disabled):hover { filter: none; box-shadow: inset 0 0 0 1px var(--ink-3); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .tabs a, :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .topnav a, :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .dropdown-menu a, :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .dropdown-menu button.mi { transition: color .15s ease, background-color .15s ease; }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .tabs a:not(.on):hover { color: var(--ink); background: color-mix(in srgb, var(--card) 55%, transparent); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .topnav a:not(.on):hover { color: var(--ink); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .row-link { transition: background-color .15s ease; border-radius: var(--radius-sm); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .row-link:hover { background: color-mix(in srgb, var(--line-2) 60%, transparent); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .rate button { transition: background-color .12s, color .12s; }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) .rate button[aria-pressed="false"]:hover { color: var(--ink); background: color-mix(in srgb, var(--card) 70%, transparent); }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) a.tick { transition: filter .15s ease; }
  :is(:root:not([data-theme]), :root[data-theme="light"], :root[data-theme="soft"], :root[data-theme="dark"], :root[data-theme="darker"]) a.tick:hover { filter: brightness(1.06); }
}
.site-foot a.ver { text-decoration: none; }
.site-foot a.ver:hover { opacity: 1; text-decoration: underline; }
.changelog .cl-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 12px 0 8px; }
/* the menu under "Urban Bird" (top left): tools, concepts, company (app/platform.py) */
.brand-menu > summary.brand { display: inline-flex; align-items: center; gap: 5px; }
.brand-menu > summary.brand::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: 4px; opacity: .6;
  transition: transform .15s; }
.brand-menu[open] > summary.brand::after { transform: rotate(225deg) translateY(-1px); }
.brand-pop { min-width: 260px; padding: 6px; }
.bm-h { margin: 8px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.bm-h:first-child { margin-top: 4px; }
.bm-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px;
  border-radius: var(--radius-sm); font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
a.bm-row:hover { background: var(--line-2); }
.dropdown-menu a.bm-row { display: flex; }
.dropdown-menu a.bm-row span { display: inline; font-size: inherit; color: inherit; }
.bm-row.on .ico { color: var(--done); }
.bm-row.off { color: var(--ink-3); cursor: default; }
.bm-row.off em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink-3); background: var(--line-2);
  padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.bm-concept > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.bm-concept > summary::-webkit-details-marker { display: none; }
.bm-concept > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-right: 4px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg) translateY(-2px);
  transition: transform .15s; }
.bm-concept[open] > summary::after { transform: rotate(225deg) translateY(-1px); }
.bm-concept > summary:hover { background: var(--line-2); }
.bm-name { display: flex; flex-direction: column; min-width: 0; }
.bm-name b { font-size: 15px; font-weight: 700; color: var(--ink); }
.bm-name small { font-size: 12px; font-weight: 500; color: var(--ink-3); opacity: .8; line-height: 1.3; }
.bm-concept.off .bm-name b { color: var(--ink-3); }
.bm-concept + .bm-concept { border-top: 1px solid var(--line-2); margin-top: 2px; padding-top: 2px; }
.bm-tools { padding: 2px 0 6px 10px; }
.bm-tools .bm-row { font-size: 14px; }
@media (max-width: 640px) {
  .brand-pop { position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 58px); min-width: 0; }
  .bm-row { padding: 12px 12px; font-size: 16px; }
}

/* Account page: a small icon in front of each row, so the page is easy to scan */
.acct-ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; color: var(--ink-2); }
.acct-ico .ico { width: 24px; height: 24px; stroke-width: 1.9; }
.acct-h { display: flex; align-items: center; gap: 12px; }
.acct-sec > summary { gap: 12px; }
html[data-theme="shuttle"] .acct-ico { color: var(--amber); }
html[data-theme="y2k"] .acct-ico { color: var(--ink); }

/* "Making the PDF": a page-shaped placeholder (ui.js) */
.pdf-load { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 24px 16px; background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pdf-load[hidden] { display: none; }
html.pdf-wait { overflow: hidden; }
.pdf-sheet { width: min(300px, 78vw); aspect-ratio: 8.5 / 11; background: var(--card); border-radius: 6px; padding: 22px 20px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 12px 32px rgba(0,0,0,.14); display: flex; flex-direction: column; gap: 12px; }
.sk { display: block; background: var(--line-2); border-radius: 4px; position: relative; overflow: hidden; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 70%, transparent), transparent);
  animation: sk-shine 1.4s ease-in-out infinite; }
@keyframes sk-shine { to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .sk::after { animation: none; } }
.sk-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sk-title { height: 16px; width: 55%; }
.sk-ring { width: 46px; height: 46px; border-radius: 50%; flex: none; }
.sk-sub { height: 9px; width: 38%; }
.sk-bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 4px 0 6px; }
.sk-bars .sk { height: 34px; border-radius: 6px; }
.sk-row { display: flex; align-items: center; gap: 8px; }
.sk-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sk-line { height: 9px; }
.pdf-msg { margin: 0; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.pdf-msg b { font-size: 16px; }
.pdf-msg span { font-size: 13.5px; color: var(--ink-3); }
html[data-theme="y2k"] .pdf-sheet, html[data-theme="shuttle"] .pdf-sheet { border-radius: 0; }
html[data-theme="y2k"] .pdf-sheet { box-shadow: 0 0 0 2px var(--y-edge), 5px 5px 0 var(--y-edge); }
html[data-theme="shuttle"] .pdf-sheet { background: #0F0D0A; box-shadow: inset 0 0 0 1px var(--amber); }

/* phones: long page descriptions fold to two lines with a small arrow (ui.js) */
.desc-clip:not(.desc-open), .desc-gone { display: none; }   /* phones: only the drop-down shows until it's opened */
.desc-more { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; margin: 2px 0 4px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.desc-more::after { content: ""; width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s; margin-left: 2px; }
.desc-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.desc-more:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.also-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 12px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-row h1 { margin: 0; }

/* flagged questions (app/flags.py): purple when a flagged question fails again */
:root { --purple: #6B2FB3; --purple-bg: #F4ECFC; --purple-ink: #4A1D8C; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) { --purple: #B98CF0; --purple-bg: #2A1F3D; --purple-ink: #D9C2F7; } }
:root[data-scheme="dark"] { --purple: #B98CF0; --purple-bg: #2A1F3D; --purple-ink: #D9C2F7; }
.pill.purple { background: var(--purple); color: #fff; }
:root[data-scheme="dark"] .pill.purple { color: #1A1027; }
.action-box { border: 2px solid var(--purple); background: var(--purple-bg); border-radius: var(--radius-sm); padding: 10px 12px; color: var(--purple-ink); }
.action-box .small { color: var(--purple-ink); opacity: .9; }
.action-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-q.unresolved { background: var(--purple-bg); border-left: 4px solid var(--purple); border-radius: 0 6px 6px 0; padding-left: 12px; }
.flag-tag { margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--purple); }
.flag-tag.ok { color: var(--done); }
.flag-notices { display: grid; gap: 10px; margin: 0 0 14px; }
.flag-notice { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); text-decoration: none;
  color: var(--ink); box-shadow: 0 0 0 2px #D9A21B, 0 2px 10px rgba(217,162,27,.15); }
.flag-notice:hover { box-shadow: 0 0 0 2px #D9A21B, 0 4px 16px rgba(217,162,27,.25); }
.fn-head { display: flex; flex-direction: column; gap: 2px; }
.fn-head b { font-size: 16.5px; }
.fn-sub { font-size: 13px; color: var(--ink-3); }
.fn-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.flag-pick { display: grid; gap: 8px; margin: 10px 0; }
.flag-pick label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--line-2); cursor: pointer; }
.flag-pick label input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.flag-pick .fp-t { display: flex; flex-direction: column; gap: 2px; }
.flag-pick .fp-t small { color: var(--ink-3); font-size: 13px; }
.flag-on { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.flag-on:first-of-type { border-top: 0; }
html[data-theme="y2k"] .flag-notice, html[data-theme="shuttle"] .flag-notice { border-radius: 0; }
.rec-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; color: inherit; text-decoration: none; }
.rec-link:hover b { text-decoration: underline; }
.repeat.often { color: var(--todo); background: var(--todo-bg); }

/* AI Overview (in development) */
.pill.dev { background: var(--line-2); color: var(--ink-2); font-size: 11.5px; font-weight: 700; letter-spacing: .03em; }
.ai-local { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--done-bg);
  color: var(--ink); margin: 0 0 8px; font-size: 14.5px; }
.ai-local .ico { flex: none; margin-top: 2px; color: var(--done); }
.ai-sec { margin: 0 0 14px; }
.ai-sec-head h2 { margin: 0; }
.ai-sec-head p { margin: 2px 0 8px; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-items: start; }
.ai-card { background: var(--card); border-radius: var(--radius); padding: 12px 14px; box-shadow: 0 0 0 1px var(--line); }
.ai-card { background: var(--paper); }
.ai-card.p1 { box-shadow: 0 0 0 2px var(--bad); background: var(--bad-bg); }
.ai-card.p1 .ai-title { color: var(--bad); }
.ai-key { display: inline-flex; align-items: center; gap: 5px; margin-left: 4px; }
.ai-key i.k1 { width: 12px; height: 12px; border-radius: 3px; background: var(--bad-bg); box-shadow: 0 0 0 1.5px var(--bad); display: inline-block; }
.ai-local { margin-top: 14px; }
.ai-card > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ai-card > summary::-webkit-details-marker { display: none; }
.ai-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ai-where { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.ai-title { font-size: 15.5px; }
.ai-line { font-size: 13.5px; color: var(--ink-2); }
.ai-more { font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-top: 2px; }
.ai-more::after { content: ' ▾'; }
.ai-card[open] .ai-more::after { content: ' ▴'; }
.ai-body { margin: 10px 0 0; font-size: 14px; }
.ai-src-h { margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; }
.ai-src { margin: 0; padding-left: 16px; font-size: 13px; color: var(--ink-2); }
.ai-src li span { font-weight: 600; color: var(--ink); }
.pill.ai-p1 { background: var(--bad-bg); color: var(--bad); }
.pill.ai-p2 { background: var(--todo-bg); color: var(--todo); }
.pill.ai-p3 { background: var(--line-2); color: var(--ink-2); }
.ai-bg { margin-top: 8px; }
.ai-bg > summary { cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.ai-box h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ai-example { max-width: 520px; }
html[data-theme="y2k"] .ai-card, html[data-theme="shuttle"] .ai-card, html[data-theme="y2k"] .ai-local, html[data-theme="shuttle"] .ai-local { border-radius: 0; }
.wn-headline { margin: 2px 0 0; font-weight: 600; color: var(--ink-2); }
.flag-box { background: var(--card); border-radius: var(--radius); box-shadow: 0 0 0 2px #D9A21B, 0 2px 10px rgba(217,162,27,.15);
  padding: 12px 14px 6px; margin: 0 0 14px; }
.fb-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
.fb-head b { font-size: 16.5px; }
.fb-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr auto; gap: 6px 12px; align-items: center; padding: 9px 0;
  border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.fb-store { font-weight: 650; }
.fb-row:hover .fb-store { text-decoration: underline; }
.fb-all { display: block; padding: 8px 0 6px; border-top: 1px solid var(--line-2); font-size: 14px; font-weight: 600; }
@media (max-width: 560px) { .fb-row { grid-template-columns: 1fr auto; } .fb-row .fn-pills { grid-column: 1; } .fb-row .chev { grid-row: 1; grid-column: 2; } }
html[data-theme="y2k"] .flag-box, html[data-theme="shuttle"] .flag-box { border-radius: 0; }

/* Recurring issues: one small button on This month, a box per store on its page */
.flag-btn { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px;
  border-radius: var(--radius); background: var(--card); text-decoration: none; color: var(--ink);
  box-shadow: 0 0 0 2px #D9A21B, 0 2px 10px rgba(217,162,27,.15); }
.flag-btn:hover { box-shadow: 0 0 0 2px #D9A21B, 0 4px 16px rgba(217,162,27,.28); }
.flag-btn .fb-t { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 180px; }
.flag-btn .fb-t b { font-size: 15.5px; }
.fb-go { font-weight: 650; font-size: 14px; }
.flag-store .fs-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.flag-store .fs-head h2 { margin: 0; }
.fs-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line-2); }
.fs-q { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 2px; }
.fs-acts { display: flex; gap: 8px; margin: 0; }
.btn.purple-btn { background: var(--purple); color: #fff; border-color: var(--purple); }
:root[data-scheme="dark"] .btn.purple-btn { color: #1A1027; }
.flag-help > summary { cursor: pointer; }
html[data-theme="y2k"] .flag-btn, html[data-theme="shuttle"] .flag-btn { border-radius: 0; }
.reports-row { display: flex; justify-content: flex-end; margin: 0 0 10px; }
/* AI cards: every closed card the same size; the title and line are cut to two lines until it's opened */
.ai-grid { align-items: start; }
.ai-card > summary { min-height: 150px; }
.ai-card .ai-title, .ai-card .ai-line { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ai-card[open] .ai-title, .ai-card[open] .ai-line { -webkit-line-clamp: unset; display: block; }
.ai-card .ai-more { margin-top: auto; padding-top: 4px; }
.ai-card .ai-top { min-height: 24px; }
.fs-dm { flex-basis: 100%; order: 3; margin-top: 2px; }
.flag-store .fs-head { flex-wrap: wrap; }
.chart-legend i.avg-key { border-top: 2px dotted var(--ink-2); }
.yoy { display: block; margin-top: 4px; font-size: 13px; color: var(--ink-3); }
.yoy b.up { color: var(--done); } .yoy b.down { color: var(--bad); }
/* store page: tap the store name to switch stores */
.store-switch > summary { display: inline-flex; align-items: center; gap: 8px; }
.store-switch > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.5px solid var(--ink-3); border-bottom: 2.5px solid var(--ink-3);
  transform: translateY(-3px) rotate(45deg); transition: transform .15s; margin-left: 4px; font-size: 0; }
.store-switch[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.store-switch > summary h1 { display: inline; margin: 0; }
.ss-menu { max-height: min(60vh, 440px); overflow-y: auto; min-width: 260px; padding: 6px; }
.ss-menu a { display: flex !important; gap: 8px; align-items: baseline; }
.ss-menu a span { display: inline !important; }
.ss-menu a.on { background: var(--line-2); font-weight: 650; }
.ss-h { margin: 4px 8px 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.list li > .rec-link { padding: 4px 0; }
.list li > .rec-link.imp-row { padding: 9px 0; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- Fix Proof (app/fixproof.py) */
.fix-list { margin: 0; }
.fix-row a { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: inherit; text-decoration: none; }
.fix-row a:hover b { text-decoration: underline; }
.fix-row .fr-main { flex: 1; min-width: 0; }
.fix-row .fr-main .tiny { display: block; margin-top: 2px; }
.fix-row .fr-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.fix-row.overdue .fr-main b { color: var(--bad); }
.fix-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fix-note { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--todo-bg); color: var(--ink); font-size: 14px; }
.fix-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fix-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--line-2); }
.fix-form textarea { width: 100%; }
.fix-form .savebar { display: flex; gap: 8px; margin-top: 12px; }
.fix-done summary { cursor: pointer; }
.fix-proof { margin-top: 6px; padding: 8px 10px; border-left: 3px solid var(--done); background: var(--done-bg); border-radius: 0 8px 8px 0; }
.fix-proof .tag { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--done); }
.fix-proof .fix-photos { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); margin-top: 6px; }
.dm-stores { margin-top: 10px; }
.dm-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; max-height: 320px; overflow: auto; padding: 4px 0; }
.dm-store-grid .chk { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 3px 0; }
.dm-store-grid .chk .tiny { display: block; }
/* recurring issue / DM / category pages: fails with the inspector's notes */
.rq-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rq-head h2 { margin: 0; flex: 1; min-width: 0; }
.fn-list { list-style: none; margin: 0; padding: 0; }
.fn-item { padding: 8px 0; border-top: 1px solid var(--line-2); }
.fn-item:first-child { border-top: 0; }
.fn-top { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fn-date { font-weight: 600; }
.fn-note { margin: 3px 0 0; font-size: 14.5px; white-space: pre-wrap; }
/* links that don't look like links until you point at them (lists of stores, DMs, categories) */
a.hover-link { text-decoration: none; color: inherit; }
a.hover-link:hover, a.hover-link:focus-visible { text-decoration: underline; }
.scope-tag { display: inline-block; margin-top: 3px; font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.scope-tag.sc-district { background: var(--todo-bg); color: var(--todo); }
.scope-tag.sc-company { background: var(--bad-bg); color: var(--bad); }
.fs-q .scope-tag { align-self: flex-start; }
.sub-actions { display: flex; justify-content: flex-end; gap: 8px; margin: -4px 0 12px; }
/* Top 10 issue and category pages on a computer: same store/question titles, smaller details, shorter boxes */
@media (min-width: 700px) {
  .rq-store.compact { padding-top: 14px; padding-bottom: 12px; }
  .rq-store.compact .rq-head { margin-bottom: 2px; }
  .rq-store.compact .fn-item { padding: 5px 0; }
  .rq-store.compact .fn-date { font-size: 13.5px; }
  .rq-store.compact .fn-top .tiny { font-size: 12px; }
  .rq-store.compact .fn-note { font-size: 13.5px; margin-top: 1px; }
  .rq-store.compact .rq-head .small { font-size: 13px; }
}
/* Fix Proof: which kind of task it is (flagged = purple, top 3 = blue, quarterly visit = teal) */
.kind-pill { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; margin-right: 4px; }
.kind-pill.k-flag { background: var(--purple); color: #fff; }
.kind-pill.k-monthly { background: #2F6FEB; color: #fff; }
.kind-pill.k-quarterly { background: #0F8A7E; color: #fff; }
.kind-note { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.kind-note.k-flag { background: var(--purple-bg, #F3ECFC); }
.kind-note.k-monthly { background: #EAF1FE; }
.kind-note.k-quarterly { background: #E4F4F2; }
.fix-to { padding-top: 14px; padding-bottom: 14px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .kind-note.k-monthly { background: #16243F; } :root:not([data-theme]) .kind-note.k-quarterly { background: #10302C; } }
:root[data-scheme="dark"] .kind-note.k-monthly { background: #16243F; }
:root[data-scheme="dark"] .kind-note.k-quarterly { background: #10302C; }
.fs-notes { margin-top: 4px; font-size: 13.5px; }
.fs-notes summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 13px; }
.fs-notes ul { list-style: none; margin: 4px 0 0; padding: 0 0 0 2px; }
.fs-notes li { padding: 3px 0; border-top: 1px solid var(--line-2); }
.fs-notes li:first-child { border-top: 0; }
.health-tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: 2px;
  background: var(--bad); color: #fff; }
/* Settings overview: every card the same height, lined up, buttons along the bottom */
.grid2.set-cards { gap: 16px; align-items: stretch; margin-bottom: 16px; }
.grid2.set-cards > .panel { margin: 0; display: flex; flex-direction: column; min-width: 0; }
.grid2.set-cards > .panel > h2 { margin-top: 0; }
.grid2.set-cards > .panel > p { margin: 0 0 12px; }
.set-cards .set-act { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.set-cards .set-act .toolbar { margin: 0; width: 100%; }
.set-cards .set-act .tiny { width: 100%; }
.ov-stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .ov-stats.two { grid-template-columns: 1fr; } .ov-stats.two .ov-ring-tile { grid-column: auto; } }
/* People: corporate and each franchise in their own box */
.people-legend { margin: 0 0 10px; }
.people-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 6px; font-size: 19px; }
.people-box.fr-box .people-head { display: inline-block; padding-bottom: 6px; border-bottom: 3px solid var(--series-2, #2F6FEB); }
.kind-pill + .health-tag { margin-right: 4px; vertical-align: 1px; }

/* Money Dashboard */
.chg { font-weight: 700; font-size: 13px; white-space: nowrap; } .chg.up { color: var(--done); } .chg.down { color: var(--bad); }
.mix { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.mix li { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; gap: 10px; align-items: center; font-size: 14px; }
.mix-bar { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.mix-bar i { display: block; height: 100%; background: var(--focus); border-radius: 999px; }
.mix-val { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mix-click > li { display: block; }
.ch-more > summary { display: grid; grid-template-columns: minmax(110px, 1.2fr) 2fr auto; gap: 10px; align-items: center; cursor: pointer; list-style: none; border-radius: 8px; padding: 2px 4px; margin: 0 -4px; }
.ch-more > summary::-webkit-details-marker { display: none; }
.ch-more > summary .mix-name::before { content: '▸'; display: inline-block; width: 14px; color: var(--ink-3); transition: transform .15s; }
.ch-more[open] > summary .mix-name::before { transform: rotate(90deg); }
.ch-more > summary:hover { background: var(--line-2); }
.ch-body { margin: 6px 0 10px 18px; padding: 8px 10px; border-left: 2px solid var(--line-2); }
.mix-sub li { font-size: 13px; }
.mix-sub .mix-bar { height: 7px; }
.chart-key span[class^="k-"] { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 4px 0 8px; }
.chart-key .k-ty { border-top: 3px solid var(--focus); margin-left: 0; }
.chart-key .k-ly { border-top: 2px dashed var(--ink-2); }
.c-ly { stroke: var(--ink-2); }
.money-tbl td, .money-tbl th { white-space: nowrap; }
.money-tbl.items td:first-child, .money-tbl.rest td { white-space: normal; }
.money-tbl tfoot td { border-top: 2px solid var(--line); }
.money-tbl td.num, .money-tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* Office: shirts */
.shirt-tbl select { min-width: 96px; }
.shirt-tbl .muted-row td { opacity: .55; }
.free-n { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; align-items: center; justify-content: center; background: var(--line-2); }
.free-n.f2 { background: var(--done-bg); color: var(--done); } .free-n.f1 { background: var(--todo-bg); color: var(--todo); }
.free-n.f0 { background: var(--bad-bg); color: var(--bad); }
.stock-tbl th.c, .stock-tbl td.c { text-align: center; }
.size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; margin-top: 10px; }
.size-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.size-grid input { width: 100%; }
/* Toast upload spots */
.up-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.up-grid > .panel { margin: 0; display: flex; flex-direction: column; }
.up-grid .savebar { margin-top: auto; }
.up-slot.done { box-shadow: 0 0 0 2px var(--done-bg), 0 0 0 1px var(--line-2); }
.up-head { display: flex; gap: 10px; align-items: flex-start; }
.up-head h2 { margin: 0; font-size: 17px; } .up-head .tiny { margin: 2px 0 0; }
.up-ok { display: inline-flex; width: 24px; height: 24px; flex: none; border-radius: 50%; align-items: center; justify-content: center; background: var(--done); color: #fff; }
.up-no { display: inline-block; width: 24px; height: 24px; flex: none; border-radius: 50%; border: 2px dashed var(--ink-3); }
.up-week th.c, .up-week td.c { text-align: center; }
.rough-tag { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 1px 6px; border-radius: 999px; background: var(--todo-bg); color: var(--todo); vertical-align: 1px; }
.dropdown-menu .bm-row .bm-ico { display: inline-flex; flex: none; color: var(--ink-3); }
.dropdown-menu .bm-row .bm-ico + span { flex: 1; }
.bm-row.on .bm-ico .ico { color: inherit; }
.fc-tbl td, .fc-tbl th { white-space: normal; }

/* Office: ready rows with a Picked up button; the stock forms fold up and line up */
.fix-row.ready-row { display: flex; align-items: center; gap: 10px; }
.fix-row.ready-row > a { flex: 1; min-width: 0; }
.fix-row.ready-row .rr-form { margin: 0; flex-shrink: 0; }
.stock-forms { align-items: start; }
.stock-forms .sf > summary h2 { font-size: 18px; }
.stock-forms .sf-form > p.tiny { min-height: 3.4em; }
.stock-forms .sf-bottom { margin-top: 10px; }
/* Money Dashboard store page on a phone: nothing wider than the screen */
.cards > .panel { min-width: 0; }
.mix li, .ch-more > summary { grid-template-columns: minmax(0, 1.2fr) minmax(40px, 2fr) auto; }
.mix-name { overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .money-tbl td, .money-tbl th { padding-left: 6px; padding-right: 6px; }
  .mix li, .ch-more > summary { grid-template-columns: minmax(0, 1fr) 60px auto; gap: 8px; font-size: 13px; }
  .ch-body { margin-left: 6px; }
}

.tabs.sub-tabs { margin-top: -6px; max-width: 360px; }
.tabs.sub-tabs a { font-size: 14px; padding-top: 7px; padding-bottom: 7px; }
.inprog-box { display: flex; gap: 10px; align-items: center; padding: 12px 16px; }
.live-box { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; }
.nav-dot.low { background: var(--todo); }
.free-pill { font-size: 14px; }

/* toolbars: a search box, a select and a button all the same height */
.toolbar input:not([type=checkbox]):not([type=radio]):not([type=file]), .toolbar select, .toolbar .btn { min-height: 40px; height: 40px; box-sizing: border-box; }
.toolbar input:not([type=checkbox]):not([type=radio]):not([type=file]) { padding-top: 6px; padding-bottom: 6px; }
/* Office stock forms on a phone: one column, normal spacing */
.stock-forms > .panel { margin: 0; }
.stock-forms { margin-bottom: 14px; }
@media (max-width: 760px) { .stock-forms { gap: 10px; margin-bottom: 10px; } .stock-forms .sf > summary h2 { font-size: 17px; } .stock-forms .sf { padding-top: 14px; padding-bottom: 14px; } }

.cal-box { border: 1px solid var(--line-2); border-radius: 14px; padding: 14px; }
.cal-months li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; font-size: 13px; }
.cal-months form { margin: 0; }

/* Money Dashboard: ticket time colors (under 5 green, 5-8 yellow, 8-15 red, 15+ dark red) and clickable numbers */
.tk { display: inline-block; padding: 1px 8px; border-radius: 999px; font-weight: 650; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.tk.big { font-size: inherit; padding: 2px 12px; }
.tk-g { background: var(--done-bg); color: var(--done); }
.tk-y { background: var(--todo-bg); color: var(--todo); }
.tk-r { background: var(--bad-bg, #FBE4E4); color: var(--bad); }
.tk-dr { background: #7A0E0E; color: #FFE9E9; }
a.mlink { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--ink-3); }
a.mlink:hover { border-bottom-style: solid; }
.metric-pick { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.metric-pick a { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); text-decoration: none; }
.metric-pick a.on { background: var(--focus); color: #fff; }

/* ---------------------------------------------------------------- Office 0.2.3: two offices, fold-ups per item */
.tabs.office-switch { max-width: 420px; margin-bottom: 10px; }
.tabs.office-switch a { font-size: 14px; padding-top: 7px; padding-bottom: 7px; }
.order-store { font-size: 20px; margin: 18px 0 10px; }
.order-sec > summary, .stock-sec > summary { flex-wrap: wrap; row-gap: 2px; }
.order-sec .sec-hint, .stock-sec .sec-hint { flex-basis: 100%; order: 3; }
.stock-sec > summary .pill { flex: none; }
.grid-down { max-width: 420px; }
.grid-down td:first-child { white-space: nowrap; }
.grid-down input[type=number] { width: 96px; }
.size-grid.flavor-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.stock-sec .stock-forms { margin-top: 12px; }
.dm-person { padding: 8px 0; border-top: 1px solid var(--line-2); }
.dm-person:first-child { border-top: 0; }
@media (max-width: 640px) {
  .tabs.office-switch { max-width: none; }
  .order-sec .shirt-tbl select { max-width: 120px; }
}
.sec-ico { display: inline-flex; width: 34px; height: 34px; border-radius: 10px; align-items: center; justify-content: center;
  background: var(--white-band, rgba(127,127,127,.12)); color: var(--ink-2); flex: none; }
.row-icos { display: inline-flex; gap: 3px; vertical-align: -2px; color: var(--ink-3); }
.dm-store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.dm-store-grid label { display: flex; gap: 6px; align-items: baseline; }
.now-dm { display: block; }

/* a fold-up that looks like a drop-down (Stores they manage) */
.pick-box { max-width: 340px; }
.pick-box > summary { list-style: none; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); padding: 12px 38px 12px 14px; min-height: 48px; box-sizing: border-box; display: flex;
  align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background-repeat: no-repeat;
  background-position: right 12px center; background-size: 12px 8px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238A8A92' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pick-box > summary::-webkit-details-marker { display: none; }
.pick-box[open] { max-width: none; }
.pick-box[open] > summary { max-width: 340px; border-color: var(--focus); }
.pick-box .pick-body { margin-top: 8px; border: 1px solid var(--line-2); border-radius: var(--radius); padding: 12px 14px; }

.dm-fold > summary { list-style: none; cursor: pointer; display: flex; gap: 6px 16px; align-items: center; flex-wrap: wrap; padding: 4px 0; }
.dm-fold > summary::-webkit-details-marker { display: none; }
.dm-fold > summary::after { content: '›'; font-size: 20px; line-height: 1; color: var(--ink-3); margin-left: auto; transition: transform .15s; }
.dm-fold[open] > summary::after { transform: rotate(90deg); }
.dm-who { display: flex; flex-direction: column; min-width: 200px; }
.dm-what { flex: 1; }
.pick-box > summary { display: block; line-height: 22px; }

/* Fix Proof task: everything in one box */
.fix-head { margin-top: 4px; }
.fix-card { padding: 0; overflow: hidden; }
.fix-card .fix-part { padding: 18px 20px; }
.fix-card .fix-part + .fix-part { border-top: 1px solid var(--line-2); }
.fix-card .fix-part > h2 { margin-top: 0; }
.fix-card .fix-review { background: var(--white-band, transparent); }
.send-back { flex-basis: 100%; }
.btnrow .send-back { flex-basis: auto; }
.send-back > summary { list-style: none; display: inline-flex; }
.send-back > summary::-webkit-details-marker { display: none; }
.send-back[open] { flex-basis: 100%; }
.send-back[open] > summary { display: none; }
.kind-note.small { font-size: 12.5px; padding: 6px 9px; }

/* LearningZen Reports */
.lz-acc.a-g { color: var(--done); } .lz-acc.a-y { color: var(--todo); } .lz-acc.a-r { color: var(--bad); }
.lz-warn { box-shadow: 0 0 0 2px var(--todo); padding: 12px 16px; font-size: 14px; }
.lz-note { border-left: 4px solid var(--line); padding: 12px 16px; }
.lz-act { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.lz-act.act-add { background: var(--done-bg); color: var(--done); }
.lz-act.act-delete { background: var(--bad-bg, #FDECEC); color: var(--bad); }
.lz-act.act-check-store { background: var(--todo-bg); color: var(--todo); }
.lz-act.act-ok { background: var(--line-2); color: var(--ink-2); }
.lz-list { margin: 6px 0 0; padding-left: 18px; columns: 2 280px; }
.lz-list li { break-inside: avoid; padding: 2px 0; }
.lz-sec > summary { flex-wrap: wrap; row-gap: 2px; }
.stat .lz-chg { font-size: 11.5px; font-weight: 500; margin-top: 3px; opacity: .9; }
.stat .lz-chg.good-text { color: var(--done); }
.stat .lz-chg.bad-text { color: var(--bad); }
.lz-fold { border-top: 1px solid var(--line); padding: 10px 0; margin: 0; }
.lz-fold:first-of-type { border-top: 0; padding-top: 0; }
.lz-fold > summary { font-size: 16px; }
.lz-fold > summary b { font-weight: 700; }
.range-pick { margin-top: -4px; }
.range-pick a { font-size: 12px; padding: 4px 10px; }
.under-tabs { margin: 4px 0 14px; }
.under-tabs h2 { font-size: 22px; margin: 0 0 4px; }
.under-tabs p { margin: 0; }
.mb-fix-web { display: inline-block; background: #1A5FD0; color: #fff; font-weight: 800; border-radius: 6px; padding: 0 6px; font-size: 13px; }
.ai-done { margin: 2px 0 6px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.bias-row { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line-2); }
.bias-row:first-of-type { border-top: 0; }
.req-dm { padding: 8px 0; border-top: 1px solid var(--line-2); }
.req-stores { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 6px; }
.req-stores .chk { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.kind-pill.k-request { background: #E3EDFD; color: #1A5FD0; }
.req-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid var(--line-2); }
.req-row:first-child { border-top: 0; }
/* Office -> Stores: List / Sheet */
.view-switch { display: flex; justify-content: flex-end; gap: 4px; margin: -4px 0 10px; }
.view-switch a { font-size: 13px; padding: 5px 12px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); text-decoration: none; font-weight: 600; }
.view-switch a.on { background: var(--focus); color: #fff; }
.st-fold > summary { cursor: pointer; padding: 10px 0; list-style: none; }
.st-fold > summary::-webkit-details-marker { display: none; }
.st-form { padding: 4px 0 14px; align-items: end; }
.st-info { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; font-size: 14px; }
.st-info dt { color: var(--ink-3); }
.st-info dd { margin: 0; }
.ssheet-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 10px; }
.ssheet { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 1400px; }
.ssheet th, .ssheet td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); white-space: nowrap; text-align: left; background: var(--card); }
.ssheet thead th { position: sticky; top: 0; background: var(--line-2); font-size: 12px; z-index: 1; }
.ssheet .sticky { position: sticky; left: 0; z-index: 2; background: var(--line-2); font-variant-numeric: tabular-nums; }
.ssheet thead .sticky { z-index: 3; }
.ssheet input, .ssheet select { font-size: 13px; padding: 4px 6px; min-height: 0; border-radius: 6px; width: 100%; min-width: 90px; }
.ssheet .c-name input { min-width: 150px; } .ssheet .c-address input, .ssheet .c-hours input { min-width: 260px; }
.ssheet .c-dm_email input { min-width: 180px; } .ssheet .c-sq_ft input { min-width: 70px; }
.ssheet th.only-sheet { color: var(--focus); }
.ssheet tr.closed td { opacity: .6; }
.guide-toc { margin: 8px 0 0; line-height: 1.7; }
/* top bar: icons, and the name only on the page you're on */
.icon-nav a { display: inline-flex; align-items: center; gap: 4px; }
.icon-nav a .nav-ico { display: inline-flex; line-height: 0; }
.icon-nav a:not(.on) { padding-left: 9px; padding-right: 9px; }
.choice label { display: flex; }   /* every box the same size, whatever its text */
.choice label > span { flex: 1; }
.req-box { padding: 12px 16px; }
.req-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.req-hist { display: inline-block; margin: 0 0 0 6px; vertical-align: baseline; }
.req-hist > summary { font-size: 12.5px; }
.req-hist[open] { display: block; margin: 8px 0 0; }
.req-head:has(.req-hist[open]) > .btn { align-self: flex-start; }
.chart-picks { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 10px; }
.chart-picks select { font-size: 13px; padding: 5px 30px 5px 10px; min-height: 0; width: auto; border-radius: 999px; }
/* a white "selected" switch (gray track, white pill), like the tab bars */
.seg-pick { display: inline-flex; width: fit-content; max-width: 100%; align-self: flex-start; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--line-2); margin: -4px 0 10px; }
.seg-pick a { font-size: 13px; padding: 4px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; }
.seg-pick a.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.tag-bad { display: inline-block; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 999px; vertical-align: 1px; margin-left: 4px; }
.dropdown-menu a .tag-bad { display: inline-block; color: #fff; font-size: 10.5px; }
.new-order { margin: 0 0 12px; }
.new-order > summary { list-style: none; display: inline-flex; cursor: pointer; }
.new-order > summary::-webkit-details-marker { display: none; }
.new-order[open] > summary { margin-bottom: 8px; }
.new-order-pick { align-items: center; }
.office-has .has-n { display: inline-block; min-width: 28px; padding: 1px 8px; border-radius: 999px; background: var(--done-bg, #DCF0E3); color: var(--done); font-weight: 700; font-size: 13px; }
.office-has .has-n.out { background: var(--bad-bg, #FADCDC); color: var(--bad); }
.office-has .has-n.low { background: var(--todo-bg); color: var(--todo); }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; margin: 4px 0 10px; position: relative; }
.order-actions .oa-main { margin: 0; }
.cd-fold > summary { list-style: none; }
.cd-fold > summary::-webkit-details-marker { display: none; }
.btn.btn-red { background: var(--bad); color: #fff; box-shadow: none; }
/* Cancel or delay opens a panel under the buttons and pushes the page down: the buttons never move */
.cd-panel { max-width: 560px; margin: 0 0 12px; box-shadow: 0 0 0 2px var(--bad); }
.btn-red[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 30%, transparent); }
.cd-hr { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }
.view-btn { display: inline-flex; align-items: center; padding: 7px 14px; border-radius: 8px; background: var(--card); color: var(--ink);
  font-size: 13.5px; font-weight: 700; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(0,0,0,.06); }
.view-btn:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.req-head > div:first-child { flex: 1; min-width: 220px; }

/* AI card: flags and Fix Proof as extra proof (not a section of its own) */
.ai-proof { margin: 8px 0 0; padding: 8px 10px; border-left: 3px solid var(--todo); background: var(--todo-bg); border-radius: 0 8px 8px 0; font-size: 13.5px; }

/* Inspect home: phone = full-width buttons; computer = normal-size buttons */
.home-acts > *, .home-acts > form { flex: 1; display: flex; margin: 0; }
.home-acts > form > .btn, .home-acts > .btn { flex: 1; }
@media (min-width: 700px) {
  .home-acts > *, .home-acts > form { flex: 0 0 auto; }
  .home-acts .btn { padding-left: 22px; padding-right: 22px; }
}
.pick-days { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 640px) { .pick-days { display: flex; justify-content: center; } }
/* Inspect home: About this page and the links at the bottom sit lower */
.foot-gap { height: 56px; }
@media (max-width: 640px) { .foot-gap { height: 40px; } }
@media (max-width: 640px) { body:has(main .page-info) .page-head > p.muted:not(.keep) { display: none; } }
/* Appearance: on a computer the brightness slider is shorter, so the stops are closer together */
@media (min-width: 700px) { .bright { max-width: 420px; } }

/* Admin Office -> People: the picker, color-coded like the role tags; one sideways row on phones */
.tool-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.tool-pick a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; font-size: 14px;
  font-weight: 600; text-decoration: none; white-space: nowrap; border: 2px solid transparent; opacity: .82; }
.tool-pick a i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.tool-pick a b { font-weight: 700; opacity: .7; }
.tool-pick a.on { opacity: 1; border-color: currentColor; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tool-pick a:hover { opacity: 1; }
.tool-pick .r-bsr { background: var(--r-bsr-bg); color: var(--r-bsr-ink); } .tool-pick .r-bsr i { background: var(--r-bsr); }
.tool-pick .r-office { background: var(--r-office-bg); color: var(--r-office-ink); } .tool-pick .r-office i { background: var(--r-office); }
.tool-pick .r-dm { background: var(--r-dm-bg); color: var(--r-dm-ink); } .tool-pick .r-dm i { background: var(--r-dm); }
.tool-pick .r-exec { background: var(--r-exec-bg); color: var(--r-exec-ink); } .tool-pick .r-exec i { background: var(--r-exec); }
.tool-pick .r-admin { background: var(--r-admin-bg); color: var(--r-admin-ink); } .tool-pick .r-admin i { background: var(--r-admin); }
.tool-pick .tp-all { background: var(--panel); color: var(--ink); box-shadow: 0 0 0 1px var(--line); } .tool-pick .tp-all i { background: var(--ink-3); }
.tool-pick .tp-fr { background: color-mix(in srgb, var(--series-2, #2F6FEB) 16%, transparent); color: var(--series-2, #2F6FEB); } .tool-pick .tp-fr i { background: var(--series-2, #2F6FEB); }
@media (max-width: 640px) {
  .tool-pick { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px; }
  .tool-pick::-webkit-scrollbar { display: none; }
}
/* the Admin Office note: the label above the words on phones, not squeezed side by side */
.inprog-box { flex-wrap: wrap; }
.inprog-box > .small { flex: 1 1 240px; }
@media (max-width: 640px) { .inprog-box { gap: 6px; padding: 10px 14px; } .inprog-box > .pill { align-self: flex-start; } }

/* People tables on phones: one card per person. Name with a status dot (green active, yellow paused, gray off,
   red locked), email, then the role and Corporate or the franchise. Last active, the status tag and the completion %
   are on their profile. On a computer the table is unchanged. */
.ptable .p-lab, .ptable .p-dot { display: none; }
.ptable.has-group .p-role .side-tag { display: none; }   /* the Group column says it on a computer */
@media (max-width: 640px) {
  .ptable thead { display: none; }
  .ptable, .ptable tbody { display: block; }
  .ptable tr { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 10px; row-gap: 6px;
    padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .ptable td { display: block; padding: 0; border: 0; }
  .ptable .p-name { grid-column: 1; grid-row: 1; min-width: 0; overflow-wrap: anywhere; }
  .ptable .p-role { grid-column: 1; grid-row: 2; }
  .ptable .p-go { grid-column: 2; grid-row: 1 / 3; }
  .ptable .p-status, .ptable .p-rate, .ptable .p-group, .ptable .p-last, .ptable .p-la { display: none; }
  .ptable .p-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 7px 1px 0; vertical-align: middle; }
  .p-dot.d-active { background: var(--done); } .p-dot.d-paused { background: var(--todo); }
  .p-dot.d-off { background: var(--ink-3); } .p-dot.d-locked { background: var(--bad); }
  .p-dot.d-idle { background: #E8C21A; } .p-dot.d-paused { background: #E07B00; }
  .ptable.has-group .p-role .side-tag { display: inline; }   /* no Group column on a phone: it shows after the role */
  .people-box.tbl-wrap, .panel.tbl-wrap:has(.ptable) { overflow-x: visible; }
}
.ssheet td.ro { color: var(--ink-2); background: var(--line-2); }
[hidden] { display: none !important; }
/* Recurring issues: "Failed 4 of the last 6 inspections" stands out a little */
mark.fail-hl { background: var(--todo-bg); color: var(--todo); font-weight: 700; padding: 0 4px; border-radius: 4px; }
/* Order: where you order sits in its own shaded box (like Schedule), above Your orders */
.order-zone { background: var(--line-2); border-radius: 18px; padding: 14px; margin: 0 0 16px; }
.order-zone > :last-child { margin-bottom: 0; }
.order-zone .new-order { margin-bottom: 10px; }
.order-zone .new-order:not([open]) { margin-bottom: 0; }
@media (max-width: 640px) { .order-zone { margin-left: -6px; margin-right: -6px; padding: 10px; } }

/* Order on a phone: one card per person, no sideways scrolling.
   Line 1: name and job, free left on the right. Line 2: the shirt (or tag) and the size. Line 3: how many. */
.shirt-tbl .sh-lab { display: none; }
@media (max-width: 640px) {
  .order-sec .tbl-wrap:has(.shirt-tbl) { overflow-x: visible; }
  .shirt-tbl thead { display: none; }
  .shirt-tbl, .shirt-tbl tbody { display: block; }
  .shirt-tbl tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; align-items: center; padding: 12px 0;
    border-bottom: 1px solid var(--line-2); }
  .shirt-tbl td { display: block; padding: 0; border: 0; min-width: 0; }
  .shirt-tbl .sh-name { grid-column: 1 / -1; grid-row: 1; padding-right: 64px; }
  .shirt-tbl .sh-free { grid-column: 1 / -1; grid-row: 1; justify-self: end; align-self: start; text-align: right; }
  .shirt-tbl .sh-free .tiny { display: block; max-width: 120px; }
  .shirt-tbl .sh-type { grid-column: 1; grid-row: 2; }
  .shirt-tbl .sh-size { grid-column: 2; grid-row: 2; }
  .shirt-tbl tr:not(:has(.sh-size)) .sh-type { grid-column: 1 / -1; }
  .shirt-tbl .sh-type select, .shirt-tbl .sh-size select { width: 100% !important; max-width: none !important; min-width: 0; }
  .shirt-tbl .sh-qty { grid-column: 1; grid-row: 3; display: flex; align-items: center; gap: 8px; }
  .shirt-tbl .sh-qty input { width: 80px !important; }
  .shirt-tbl .sh-has { grid-column: 2; grid-row: 3; text-align: right; }
  .shirt-tbl .sh-lab { display: inline; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
  .shirt-tbl .sh-free .sh-lab { font-size: 12px; }
}
/* Office profile -> History */
.hist-list li { display: flex; gap: 12px; align-items: baseline; padding: 6px 0; }
.hist-list .hist-when { flex: 0 0 120px; }
/* a row that opens its page: looks exactly the same, the whole row is the button */
.hist-list a.hist-go { display: flex; gap: 12px; align-items: baseline; flex: 1; min-width: 0; color: inherit; text-decoration: none; cursor: pointer; border-radius: 6px; }
.hist-list a.hist-go:hover, .hist-list a.hist-go:focus-visible { text-decoration: none; }
.hist-list a.hist-go:focus-visible { outline: 2px solid var(--accent, #C8102E); outline-offset: 2px; }
@media (max-width: 640px) { .hist-list li, .hist-list a.hist-go { flex-direction: column; gap: 0; } .hist-list .hist-when { flex: none; } }

/* People: never logged in, or not in 6 months */
.pill.idle { background: #FFF3C4; color: #7A5B00; }
@media (prefers-color-scheme: dark) { .pill.idle { background: #4A3D0A; color: #F5D76E; } }

/* a small round icon at the start of a row (Message your manager, the schedule) */
.row-ico { flex: none; width: 38px; height: 38px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--paper); color: var(--ink-2); margin-right: 4px; }

/* score changes everywhere: green up 0.1 or more, red for any drop, normal for a small rise */
.chg-up { color: var(--done) !important; } .chg-down { color: var(--bad) !important; } .chg-flat { color: inherit; }

/* an inspection's category tiles (0.2.5a): name and trend, a big Now, then Last and Change */
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 14px; border-radius: 18px; color: var(--ink); text-decoration: none; min-width: 0; }
.cat-tile:hover { text-decoration: none; filter: brightness(.985); }
.cat-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ct-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; }
.ct-name { font-size: 19px; font-weight: 800; line-height: 1.15; min-width: 0; }
.ct-trend { flex: none; display: flex; }
.ct-trend .mini-trend { display: block; width: 116px; height: 40px; }
.mini-trend { color: var(--ink-3); }
.mini-trend .mt-line { fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linejoin: round; stroke-linecap: round; }
.mini-trend .mt-fade-top { stop-color: currentColor; stop-opacity: .28; } .mini-trend .mt-fade-bottom { stop-color: currentColor; stop-opacity: 0; }
/* the line and its halo take the color of the category's 6-month average */
.mini-trend.mt-band-green { color: var(--done); } .mini-trend.mt-band-yellow { color: #C99A00; }
.mini-trend.mt-band-red { color: var(--bad); } .mini-trend.mt-band-white { color: var(--ink-3); }
.ct-now { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 9px 14px; border-radius: 13px; box-shadow: 0 0 0 3px var(--card) !important; }
.ct-now b { font-size: 32px; line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; }
.ct-lab { font-size: 13px; font-weight: 700; opacity: .85; text-transform: none; }
.ct-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px; }
.ct-small { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 6px 10px 7px; border-radius: 10px; background: var(--card); min-width: 0; }
.ct-small .ct-lab { font-size: 11.5px; white-space: nowrap; }
.ct-small b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ct-chg { color: var(--ink); }
.ct-chg.chg-up { background: var(--done-bg); } .ct-chg.chg-down { background: var(--bad-bg); }
.ct-empty { background: var(--card); color: var(--ink-3); opacity: .8; }
@media (max-width: 560px) {
  .tile-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .cat-tile { padding: 11px; gap: 8px; border-radius: 15px; }
  .ct-top { flex-direction: column; align-items: flex-start; min-height: 0; gap: 4px; }
  .ct-name { font-size: 16px; }
  .ct-trend .mini-trend { width: 100%; max-width: 140px; height: 32px; }
  .ct-now { padding: 7px 10px; } .ct-now b { font-size: 26px; }
  .ct-row { grid-template-columns: 1fr; gap: 5px; }
  .ct-small { flex-direction: row; align-items: baseline; justify-content: space-between; padding: 5px 9px; } .ct-small b { font-size: 15px; }
}

/* Activity, Accounts to review: plain sections split by lines */
.rv-list h2 { margin-bottom: 6px; }
.rv-item { border-top: 1px solid var(--line); padding: 14px 0; } .rv-item:last-child { padding-bottom: 2px; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.rv-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.rv-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rv-reasons { list-style: none; margin: 10px 0 0; padding: 0; }
.rv-reasons li { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.rv-reasons li:first-child { border-top: 0; }
.rv-events { margin-top: 6px; } .rv-events summary { cursor: pointer; }

/* the store / district / companywide tag opens why */
.scope-why { display: inline-block; position: relative; margin-top: 4px; }
.scope-why > summary { list-style: none; cursor: pointer; } .scope-why > summary::-webkit-details-marker { display: none; }
/* the same small arrow as the other drop-downs, turned up while open */
.scope-why > summary::after, .sw-notes > summary::after { content: '▾'; display: inline-block; margin-left: 5px; font-size: 11px; transition: transform .15s; }
.scope-why[open] > summary::after, .sw-notes[open] > summary::after { transform: rotate(180deg); }
/* opens over the page, like the Edit schedule menu */
.sw-body { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: max-content; max-width: min(420px, calc(100vw - 72px));
  max-height: 60vh; overflow-y: auto; padding: 14px 16px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 14px; color: var(--ink); text-align: left; }
.sw-body p { margin: 0 0 6px; } .sw-body ul { list-style: none; margin: 0; padding: 0; }
.sw-body li { display: block; margin: 0; padding: 6px 0; border-top: 1px solid var(--line); } .sw-body li:first-child { border-top: 0; }
.sw-body .sw-date { display: inline; color: var(--ink-3); font-size: 13px; margin-left: 4px; }
.fix-row .fr-scope { margin: -6px 0 8px; }
.insp-by { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 17px; color: var(--ink-2); } .insp-by b { color: var(--ink); }

.sw-notes { margin-top: 2px; } .sw-notes > summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 4px 0; }
.sw-notes > summary::-webkit-details-marker { display: none; } .sw-notes ul { margin-top: 4px; }

/* 0.2.5c: the PDF buttons on an inspection (corner of the score panel, and the bottom). Both open Open / Download */
.rep-panel { position: relative; }
.pdf-corner { position: absolute; top: 16px; right: 16px; z-index: 6; }
.pdf-dl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px 0 11px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 700; line-height: 1;
  background: transparent; transition: background .15s, color .15s; }
.pdf-dl:hover, .pdf-corner[open] .pdf-dl, .pdf-dl:focus-visible { background: var(--line-2); color: var(--ink); }
.dropdown.pdf-menu > summary::after { content: none; }
.pdf-menu > summary svg { display: block; flex: none; }
.pdf-menu > summary span { display: block; line-height: 1; }
.dropdown-menu.up { top: auto; bottom: calc(100% + 6px); min-width: 230px; }
.pdf-corner .dropdown-menu { min-width: 230px; }
@media (min-width: 561px) { .rep-panel .rep-hero { padding-right: 104px; } }
@media (max-width: 560px) { .pdf-corner { top: 12px; right: 12px; } }

/* 0.2.5c: the slim Store page button on an inspection. The outline thickens on hover */
.store-link { display: flex; align-items: center; justify-content: space-between; height: 48px; margin-top: 12px; padding: 0 16px 0 18px;
  border-radius: 14px; color: var(--ink); font-weight: 700; font-size: 17px; text-decoration: none; background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .18s ease; }
.store-link:hover, .store-link:focus-visible { text-decoration: none; box-shadow: inset 0 0 0 2.5px var(--ink-3); }
.store-link .chev { font-size: 22px; line-height: 1; transition: transform .18s ease; }
.store-link:hover .chev { transform: translateX(2px); }
/* 0.2.5c: the DM 12-month lines (Monthly Overview, opened from the arrow next to District managers) */
.dm-graph > summary { list-style: none; cursor: pointer; display: inline-block; }
.dm-graph > summary::-webkit-details-marker { display: none; }
.dm-graph > summary h2 { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.dm-arrow { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border-radius: 999px;
  font-size: 13px; color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); transition: transform .2s, color .15s, background .15s; }
.dm-graph > summary:hover .dm-arrow { color: var(--ink); background: var(--line-2); }
.dm-graph[open] .dm-arrow { transform: rotate(180deg); }
.dm-graph .ml-wrap { margin: 2px 0 16px; }
.chart.ml .ml-s { transition: opacity .15s; cursor: default; }
.chart.ml .ml-s .ml-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; transition: stroke-width .15s; }
.chart.ml .ml-s .ml-hit { fill: none; stroke: transparent; stroke-width: 14; }
.chart.ml .ml-s .ml-area { pointer-events: none; opacity: .55; transition: opacity .15s; }
.chart.ml .ml-name { font-size: 12px; font-weight: 700; fill: var(--ink-2); }
.chart.ml:hover .ml-s { opacity: .22; }
.chart.ml .ml-s:hover { opacity: 1; }
.chart.ml .ml-s:hover .ml-line { stroke-width: 3.6; }
.chart.ml .ml-s:hover .ml-area { opacity: 1; }
.chart.ml .ml-s:hover .ml-name { fill: var(--ink); }
.ml-narrow { display: none; }
@media (max-width: 760px) { .ml-wide { display: none; } .ml-narrow { display: block; } }
/* the DM picker above the lines: looks like the Last 3 months / This month switch, opens a list */
.ml-pick { display: inline-block; }
.ml-pick-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 16px; border-radius: 999px;
  background: var(--line-2); font-size: 15px; font-weight: 700; color: var(--ink); }
.dropdown.ml-pick > summary.ml-pick-btn::after { content: '▾'; font-size: 11px; color: var(--ink-3); transition: transform .15s; }
.dropdown.ml-pick[open] > summary.ml-pick-btn::after { transform: rotate(180deg); }
.ml-menu { min-width: 220px; max-height: 60vh; overflow: auto; padding: 6px; }
.ml-opt { display: block; width: 100%; text-align: left; background: none; border: 0; font: inherit; color: var(--ink);
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.ml-opt:hover, .ml-opt:focus-visible { background: var(--line-2); }
.ml-head { margin: 8px 10px 4px; font-size: 12px; font-weight: 700; color: var(--ink-3); }
.ml-check { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); cursor: pointer; }
.ml-check:hover { background: var(--line-2); }
.ml-check input { width: 18px; height: 18px; }
.chart.ml .ml-s[hidden] { display: none; }
.chart.ml.has-on .ml-s { opacity: .22; }
.chart.ml.has-on .ml-s.on { opacity: 1; }
.chart.ml .ml-s.on .ml-line { stroke-width: 3.6; } .chart.ml .ml-s.on .ml-area { opacity: 1; } .chart.ml .ml-s.on .ml-name { fill: var(--ink); }
.chart.ml .ml-hitname { cursor: pointer; }
.ml-sub > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
.ml-sub > summary::-webkit-details-marker { display: none; }
.ml-sub > summary::after { content: '▾'; font-size: 11px; color: var(--ink-3); transition: transform .15s; }
.ml-sub[open] > summary::after { transform: rotate(180deg); }
.ml-in { padding-left: 22px; }
/* What's changed: a version and its a, b, c follow-ups in one box, a clear line between each */
.cl-group .cl-ver + .cl-ver { margin-top: 20px; padding-top: 20px; border-top: 1.5px solid var(--line); }
.insp-time { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }

/* 0.2.5d: Opening / Closing come from the time. Sun and moon pills with the times on hover, and Best time to go */
.shift-pill { position: relative; gap: 5px; }
.shift-pill svg { flex: none; }
.shift-pill[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); right: 0; white-space: nowrap;
  background: var(--ink); color: var(--card); font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 8px;
  opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; }
@media (hover: hover) { .shift-pill:hover::after, a:hover > .shift-pill::after { opacity: 1; transform: none; } }
.best-time { display: flex; gap: 14px; align-items: flex-start; }
.best-time h2 { margin: 0 0 4px; font-size: 19px; }
.best-time p { margin: 0; }
.bt-ico { display: inline-flex; width: 44px; height: 44px; flex: none; align-items: center; justify-content: center; border-radius: 12px;
  background: var(--line-2); color: var(--ink-2); }
.bt-opening .bt-ico { background: var(--todo-bg); color: var(--todo); }
.bt-closing .bt-ico { background: color-mix(in srgb, #5E5CE6 18%, transparent); color: #7D7AFF; }
.bt-opening h2 { color: var(--todo); }
.shift-auto { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 14.5px; color: var(--ink-2); }
.shift-auto svg { flex: none; margin-top: 2px; }
/* opening: warm sunrise; closing: night blue */
:root { --rise: #E8590C; --rise-bg: #FFF0E3; --rise-bg2: #FFE3C9; --night: #2F6FE0; --night-bg: #E8F0FF; --night-bg2: #D9E6FF; }
@media (prefers-color-scheme: dark) { :root { --rise: #FF9F45; --rise-bg: #3A2412; --rise-bg2: #4A2C14; --night: #6FA4FF; --night-bg: #13233F; --night-bg2: #182D52; } }
:root[data-scheme="dark"] { --rise: #FF9F45; --rise-bg: #3A2412; --rise-bg2: #4A2C14; --night: #6FA4FF; --night-bg: #13233F; --night-bg2: #182D52; }
:root[data-scheme="light"] { --rise: #E8590C; --rise-bg: #FFF0E3; --rise-bg2: #FFE3C9; --night: #2F6FE0; --night-bg: #E8F0FF; --night-bg2: #D9E6FF; }
.sp-opening { background: var(--rise-bg); color: var(--rise); }
.sp-closing { background: var(--night-bg); color: var(--night); }
.best-time.bt-opening { background: linear-gradient(135deg, var(--rise-bg), var(--card) 70%); box-shadow: inset 0 0 0 1px var(--rise-bg2); }
.best-time.bt-closing { background: linear-gradient(135deg, var(--night-bg), var(--card) 70%); box-shadow: inset 0 0 0 1px var(--night-bg2); }
.bt-opening h2 { color: var(--rise); } .bt-closing h2 { color: var(--night); }
.bt-opening .bt-ico { background: var(--rise-bg2); color: var(--rise); }
.bt-closing .bt-ico { background: var(--night-bg2); color: var(--night); }
.best-time p { color: var(--ink-2); }

/* 0.2.5d Fix Proof: the store as the title, What the inspector saw, the approved "win", the photo viewer */
.fix-head .fix-store { margin: 0; font-size: 34px; letter-spacing: -.02em; }
.fix-dm { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: 16px; color: var(--ink-2); }
.fix-q { margin: 10px 0 0; font-size: 17px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.insp-saw { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.insp-saw > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.insp-saw > summary::-webkit-details-marker { display: none; }
.insp-saw > summary::before { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2);
  transform: rotate(-45deg); transition: transform .15s; margin: 0 2px; }
.insp-saw[open] > summary::before { transform: rotate(45deg); }
.is-t { font-weight: 700; }
.is-meta { font-size: 13.5px; color: var(--ink-3); }
.is-one { margin: 12px 0 0 19px; }
.is-one + .is-one { padding-top: 12px; border-top: 1px solid var(--line-2); }
.is-date { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink-3); }
.is-note { margin: 4px 0 0; font-size: 15.5px; }
.is-one .fix-photos { margin-top: 8px; }
.fix-photos a[data-lb] { cursor: zoom-in; }
/* the green win: shown once, for a few seconds */
.win-banner { display: flex; align-items: center; gap: 14px; background: var(--done-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--done) 30%, transparent);
  animation: win-in .45s ease both, win-out .6s ease 4.4s forwards; overflow: hidden; }
.win-banner a { color: inherit; font-weight: 600; }
.win-ico { position: relative; display: inline-flex; width: 52px; height: 52px; flex: none; align-items: center; justify-content: center; color: var(--done); }
.win-ico > svg:not(.win-ring) { stroke-width: 3.2; animation: win-pop .45s .75s cubic-bezier(.3,1.6,.5,1) both; }
.win-ring { position: absolute; inset: 0; width: 52px; height: 52px; transform: rotate(-90deg); }
.win-ring circle { fill: none; stroke: var(--done); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 145; stroke-dashoffset: 145;
  animation: win-draw .8s .1s ease-out forwards; }
@keyframes win-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes win-pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes win-draw { to { stroke-dashoffset: 0; } }
@keyframes win-out { to { opacity: 0; transform: translateY(-6px); } }
.win-banner.gone { display: none; }
@media (prefers-reduced-motion: reduce) { .win-banner, .win-ico > svg, .win-ring circle { animation: none; stroke-dashoffset: 0; } .win-banner { animation: win-out .01s 5s forwards; } }
.fs-text { font-weight: 700; color: var(--ink-2); }
.win-pill { display: inline-flex; align-items: center; gap: 4px; }
.fix-row.fix-win { background: var(--done-bg); border-radius: 12px; }
.nav-dot.win { background: var(--done); color: #fff; }
.nav-dot.win svg { stroke-width: 3.5; }
/* photo viewer */
.lb { position: fixed; inset: 0; z-index: 1000; background: #000; display: flex; align-items: center; justify-content: center; touch-action: none; }
.lb[hidden] { display: none; }
.lb img { max-width: min(94vw, 1400px); max-height: 84vh; border-radius: 10px; user-select: none; -webkit-user-drag: none; }
.lb-btn { all: unset; position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.14); color: #fff; font-size: 28px; cursor: pointer; }
.lb-btn:hover, .lb-btn:focus-visible { background: rgba(255,255,255,.26); }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-x { all: unset; position: absolute; top: 14px; right: 16px; width: 44px; height: 44px; border-radius: 999px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 26px; cursor: pointer; background: rgba(255,255,255,.14); }
.lb-n { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; font-weight: 700;
  background: rgba(255,255,255,.14); padding: 6px 12px; border-radius: 999px; }
@media (max-width: 640px) { .lb img { max-width: 100vw; border-radius: 0; } .fix-head .fix-store { font-size: 28px; } }
.mini-photos { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.mini-photos img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.mini-photos a { cursor: zoom-in; }
.review-box { box-shadow: 0 0 0 2px #D9A21B, 0 2px 10px rgba(217,162,27,.15); }
.lb-cap { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: min(720px, calc(100vw - 120px)); padding: 12px 16px;
  border-radius: 14px; background: rgba(28,28,30,.86); color: #fff; backdrop-filter: blur(8px); }
.lb-cap[hidden] { display: none; }
.lb-cap-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.lb-q { font-size: 16px; }
.lb-r { font-weight: 800; font-size: 14px; white-space: nowrap; }
.lb-r.r-pass { color: #4CD964; } .lb-r.r-mid { color: #FFD60A; } .lb-r.r-fail { color: #FF6B6B; }
.lb-note { margin: 4px 0 0; font-size: 14.5px; color: rgba(255,255,255,.85); }
.lb-note[hidden] { display: none; }
.lb:has(.lb-cap:not([hidden])) img { max-height: 70vh; margin-top: 60px; }
@media (max-width: 640px) { .lb-cap { top: 66px; width: calc(100vw - 24px); } .lb:has(.lb-cap:not([hidden])) img { margin-top: 90px; } }
/* the Flagged / Top 3 / Quarterly pills sit centered on the text next to them */
.kind-pill[class*="k-"] { margin-bottom: 0; vertical-align: middle; line-height: 1.45; position: relative; top: -1px; }
.fix-q .kind-pill { top: 0; }
/* 0.2.5e viewer: a loading bar, and small arrows on phones */
.lb-load { position: absolute; top: 0; left: 0; right: 0; height: 4px; overflow: hidden; z-index: 3; }
.lb-load i { display: block; height: 100%; width: 0; background: #fff; opacity: .9; border-radius: 0 2px 2px 0; }
.lb-load.half i { width: 55%; transition: width .35s ease-out; }
.lb-load.done i { width: 100%; opacity: 0; transition: width .2s ease-out, opacity .3s ease .25s; }
.lb img { transition: filter .15s; }
.lb img.lb-dim { filter: brightness(.4); }
@media (max-width: 640px) {
  .lb-btn { width: 34px; height: 56px; background: none; font-size: 34px; color: rgba(255,255,255,.75); }
  .lb-btn:hover, .lb-btn:focus-visible { background: none; color: #fff; }
  .lb-prev { left: 2px; } .lb-next { right: 2px; }
}
.kind-pill.k-ai { background: var(--purple); color: #fff; } .kind-note.k-ai { background: var(--purple-bg, #F3ECFC); }
/* 0.2.5e AI flags on Recurring issues (only while the AI computer is on) */
.af-why { display: block; margin-top: 4px; color: var(--ink-2); }
.af-proof { display: block; margin-top: 6px; }
.af-q { display: block; font-size: 14.5px; font-style: italic; color: var(--ink); }
.af-acts { align-items: center; }
.af-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-right: 6px; }
.af-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.af-switch .sw { width: 38px; height: 22px; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.af-switch .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.af-switch input:checked + .sw { background: var(--done); }
.af-switch input:checked + .sw::after { transform: translateX(16px); }
.af-switch input:focus-visible + .sw { outline: 2px solid var(--focus); outline-offset: 2px; }
.af-switch.off { opacity: .55; cursor: not-allowed; }
.lb img { transform-origin: center center; will-change: transform; }
.lb.zoomed .lb-cap, .lb.zoomed .lb-btn, .lb.zoomed .lb-n { opacity: 0; pointer-events: none; }
@media (max-width: 640px) { .lb-x { width: 34px; height: 34px; font-size: 20px; top: 12px; right: 12px; } }
/* 0.2.5e Schedule: the month is the drop-down; Settings and Availability sit at the right of a full-width box */
.sched-bar-box { width: auto; }
.sched-bar { flex-wrap: nowrap; justify-content: flex-end; }
.sched-bar .msg-btn { margin-left: 0; order: 2; }
.sched-bar .sched-settings { order: 1; display: inline-flex; align-items: center; gap: 7px; }
.sched-bar .btn { white-space: nowrap; }
@media (max-width: 640px) { .sched-bar { justify-content: center; } .sched-bar .btn { flex: 1; justify-content: center; } }
.month-pick { display: inline-block; }
.dropdown.month-pick > summary::after { content: none; }
.mp-btn { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; border-radius: 12px;
  padding: 2px 8px 2px 0; transition: background .15s; }
.mp-btn h2 { margin: 0; }
.mp-arrow { width: 10px; height: 10px; border-right: 2.6px solid var(--ink-2); border-bottom: 2.6px solid var(--ink-2); transform: translateY(-3px) rotate(45deg);
  transition: transform .2s ease; }
.mp-btn:hover .mp-arrow { animation: mp-nudge .6s ease; }
@keyframes mp-nudge { 0%, 100% { transform: translateY(-3px) rotate(45deg); } 50% { transform: translateY(2px) rotate(45deg); } }
.month-pick[open] .mp-arrow { transform: translateY(2px) rotate(225deg); animation: none; }
.mp-btn[data-tip]::before { content: attr(data-tip); position: absolute; left: 0; top: calc(100% + 6px); white-space: nowrap; background: var(--ink);
  color: var(--card); font-size: 12.5px; font-weight: 600; padding: 5px 9px; border-radius: 8px; opacity: 0; pointer-events: none;
  transform: translateY(-3px); transition: opacity .15s, transform .15s; z-index: 6; }
@media (hover: hover) { .mp-btn:hover::before { opacity: 1; transform: none; } }
.month-pick[open] .mp-btn::before { opacity: 0 !important; }
.mp-menu { min-width: 220px; max-height: 60vh; overflow: auto; }
.mp-menu a { display: flex; align-items: center; justify-content: space-between; }
.mp-menu a.on { font-weight: 700; }
.edit-menu > summary::after { font-size: 15px !important; margin-left: 8px; }
.bad-t { color: var(--bad); }
.af-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.af-title .kind-pill { top: 0; }
.mp-btn[data-tip]::before { left: calc(100% + 8px); top: 50%; transform: translate(-3px, -50%); }
@media (hover: hover) { .mp-btn:hover::before { transform: translate(0, -50%); } }
.edit-menu > summary::after { font-size: 13px !important; }
/* 0.2.5e: the "Likely a … issue" tag sits on the status line on computers; phones keep it below */
.fix-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.st-scope { margin-left: 6px; }
.st-scope-phone { display: none; }
@media (max-width: 640px) { .st-scope { display: none; } .st-scope-phone { display: block; } }
/* What the inspector saw: the arrow in a circle so it reads as a button */
.insp-saw > summary::before { content: ''; width: 28px; height: 28px; margin: 0; border: 0; border-radius: 999px; transform: none;
  background: var(--line-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 6l6 6-6 6'/%3E%3C/svg%3E") center/16px no-repeat;
  box-shadow: inset 0 0 0 1px var(--line); transition: transform .18s, background-color .15s; flex: none; }
.insp-saw > summary:hover::before { background-color: var(--line); }
.insp-saw[open] > summary::before { transform: rotate(90deg); }
.is-one { margin-left: 38px; }
@media (max-width: 640px) { .sched-bar-box { margin-left: -6px; margin-right: -6px; } }
/* 0.2.5e: the month box is back on the left of the Schedule bar; Settings and Availability stay at the right.
   Phones: the month box gets its own row on top, the two buttons share the row under it. */
.sched-bar > form { margin-right: auto !important; order: 0; }
.sched-bar > form select { min-width: 0; }
@media (max-width: 640px) {
  .sched-bar { flex-wrap: wrap; }
  .sched-bar > form { flex: 1 0 100%; width: 100%; order: 0; }
  .sched-bar > form select { max-width: none; width: 100%; }
  .sched-bar .sched-settings { order: 1; } .sched-bar .msg-btn { order: 2; }
}
/* the Likely pill sits level with the status text */
.st-scope { display: inline-flex; align-items: center; }
.st-scope .scope-why { margin-top: 0; vertical-align: middle; }
.st-scope .scope-tag { margin-top: 0; line-height: 1.5; }
.st-scope { position: relative; top: -3px; }
/* 0.2.5f group inspection check-in */
.ck { max-width: 520px; }
.ck-kicker { margin: 0; font-size: 13px; }
.ck-title { margin: 2px 0 14px; }
.ck-box { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border-radius: 12px; font-weight: 600; margin: 0 0 14px; }
.ck-box svg { flex: none; }
.ck-wait { background: var(--todo-bg); color: var(--todo); }
.ck-ok { background: var(--done-bg); color: var(--done); }
.ck-nudge { animation: ckNudge .4s; }
@keyframes ckNudge { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.ck-list { list-style: none; padding: 0; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 12px; }
.ck-list li { display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-top: 1px solid var(--line); }
.ck-list li:first-child { border-top: 0; }
.ck-s { font-weight: 600; font-size: 14px; color: var(--faint, #8a8a8e); }
.ck-list li[data-state="here"] .ck-s, .ck-list li[data-state="submitted"] .ck-s { color: var(--done); }
.ck-list li[data-state="away"] .ck-s { color: var(--todo); }
.ck-main { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.ck-main[aria-disabled="true"] { opacity: .45; filter: grayscale(1); cursor: not-allowed; box-shadow: none; }
.ck-help { text-align: center; margin: 10px 0 8px; font-size: 14px; }
.ck-asked { display: flex; gap: 6px; align-items: center; justify-content: center; color: var(--todo); font-weight: 600; margin: 6px 0; }
.gv-ask { padding: 12px 0; border-top: 1px solid var(--line); }
.gv-ask:first-of-type { border-top: 0; }
.gv-ms { list-style: none; padding: 0; margin: 0 0 10px; }
.gv-ms li { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.gv-st { font-weight: 600; color: var(--faint, #8a8a8e); }
.gv-submitted { color: var(--done); }
.ck-asked.ck-no { color: var(--bad); }
/* 0.2.5f: making a group inspection by hand */
.grp-cell { display: flex; flex-direction: column; gap: 2px; }
.grp-dlg { border: 0; border-radius: 18px; padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 0 24px 60px #0005; }
.grp-dlg::backdrop { background: #0006; }
.grp-in { padding: 22px 22px 18px; display: block; }
.grp-l { font-weight: 700; font-size: 14px; margin: 14px 0 8px; }
.grp-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; max-height: 240px; overflow: auto; }
.grp-p { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.grp-p:has(input:checked) { border-color: var(--ink); background: var(--line); }
.grp-r { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 0 0 8px; cursor: pointer; }
.grp-r > span { display: flex; flex-direction: column; gap: 2px; }
.grp-r:has(input:checked) { border-color: var(--ink); }
.grp-r input { margin-top: 3px; }
#grp-day { width: 100%; margin: 2px 0 6px; }
.grp-err { color: var(--bad); font-weight: 600; margin: 8px 0 0; }
.grp-btns { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.gp-cancel { text-align: center; margin: 26px 0 6px; }
.linkbtn.danger-text { color: var(--bad); font-size: 14px; font-weight: 600; }
.linkbtn.danger-text:hover { text-decoration: underline; }
.gv-who { margin: 0; }
.gv-when { margin: 2px 0 12px; }
.gv-opts { display: flex; flex-direction: column; gap: 10px; }
.gv-opt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.gv-opt-t { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.gv-opt-t input { width: 100%; margin: 2px 0 0; }
.gv-opt .btn, .gv-no .btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; margin: 0; }
.gv-opt .btn { min-width: 150px; }
.gv-no { margin: 0; display: flex; justify-content: flex-end; }
@media (max-width: 640px) {
  .gv-opt { grid-template-columns: 1fr; }
  .gv-opt .btn { width: 100%; }
}
.gv-opt-reason { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; row-gap: 8px; }
.gv-opt-reason .gv-opt-h { grid-column: 1 / -1; }
.gv-opt-reason input { margin: 0; height: 44px; box-sizing: border-box; }
.gv-opt-reason .btn { height: 44px; }
.opt-group { font-weight: 700; }
@media (max-width: 640px) { .gv-opt-reason { grid-template-columns: 1fr; } }
/* 0.2.5f: a group visit shown as one report */
.gp-who { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; }
.gp-who i, .gp-ans i, .gp-note i, .gp-ph figcaption i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.flag-tag.differ { background: var(--todo-bg); color: var(--todo); }
.gp-each { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.gp-ans { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--line); }
.gp-note { display: flex; align-items: baseline; gap: 6px; }
.gp-note i { transform: translateY(-1px); }
.gp-ph { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.gp-ph figcaption { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-3); }
.gp-list h2 { margin-top: 0; }
.gp-tbl td:last-child, .gp-tbl th:last-child { text-align: right; }
.gp-tbl .score { text-decoration: none; }
@media (max-width: 640px) { .gp-tbl th:nth-child(2), .gp-tbl td:nth-child(2) { display: none; } }
.flag-tag.differ { display: inline-flex; width: auto; text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin: 0 0 6px; }
#ck-confirm .grp-btns { flex-direction: column-reverse; align-items: stretch; }
#ck-confirm .grp-btns .btn { width: 100%; justify-content: center; text-align: center; white-space: nowrap; }

/* 0.2.6: name and email (person page), and asking for a change (Account) */
.id-form { margin: 0 0 18px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); }
.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.id-grid input { width: 100%; }
@media (max-width: 640px) { .id-grid { grid-template-columns: 1fr; } }
.id-req { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; box-shadow: 0 0 0 2px var(--todo); }
.id-ask { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.linkish { background: none; border: 0; padding: 0; color: inherit; opacity: .8; text-decoration: underline; cursor: pointer; font: inherit; }
.linkish.tiny { font-size: 13px; }
#id-ask-dlg input { width: 100%; }
.ap-div { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }
.ask-dlg .ask-msg { margin: 0; font-size: 17px; line-height: 1.45; }
.tf-opt { align-self: center; }
.linkish.muted { font-size: inherit; }
/* This month: Monthly Overview button beside the month box */
.month-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.month-row > .toolbar { flex: 0 1 auto; margin-bottom: 0 !important; }
.month-row > .btn { min-height: 40px; height: 40px; }
@media (max-width: 640px) {            /* phone: no "Month" word, so the button fits beside the month box */
  .month-row { flex-wrap: nowrap; gap: 8px; }
  .month-row > .toolbar label[for=month] { display: none; }
  .month-row > .toolbar select { max-width: 100%; }
  .month-row > .btn { white-space: nowrap; padding: 0 12px; }
}
