/* PDT Tracker
   This first part is the frame every look shares, dressed as "Classic light": ink navy frame, cool paper page,
   white grid. Barlow for the interface, Barlow Semi Condensed inside tables. "Pixel dark" is the second part. */

@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/barlow-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/barlow-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/barlow-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Barlow Semi Condensed'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/barlow-semi-condensed-latin-600-normal.woff2') format('woff2'); }

:root {
  --ink: #16172a;
  --paper: #f3f4f1;
  --surface: #ffffff;
  --line: #d9dcd5;
  --grid: #e6e8e2;
  --head: #f6f7f4;
  --text: #1b1c22;
  --muted: #5f626a;
  --faint: #8a8d94;
  --green: #2e9e57;
  --green-deep: #1f7a41;
  --orange: #e8780c;
  --blue: #6e9ce8;
  --hyp: #d6e4f9;
  --red: #b3261e;
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --cond: 'Barlow Semi Condensed', 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --top: 46px;
  --row: 32px;
  --r: 6px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 400 14px/1.45 var(--font); color: var(--text); background: var(--paper); -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-deep); }
:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 2px; }
.icon { flex: none; display: block; }
.boot { padding: 40px 20px; color: var(--muted); }

/* ---------------------------------------------------------------- frame */

#app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: calc(var(--top) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(8px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); background: var(--ink); color: #fff; }
.top :focus-visible { outline-color: #8fe0aa; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .01em; }
.brand img { display: block; border-radius: 6px; }
.top-left { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; }
.brand { flex: none; }
.where { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #fff; font: 600 15px var(--font); }
.top-right { flex: none; display: flex; align-items: center; gap: 2px; }
.save-state { font: 500 12.5px var(--cond); color: #aeb1c4; margin-right: 6px; }
.save-state.saving { color: #f3d27a; }
.save-state.offline { color: #ffab9e; }
.topbtn { height: 34px; min-width: 34px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: var(--r);
  background: none; color: #dfe1ee; font: 500 13px var(--font); }
.topbtn:hover:not(:disabled) { background: rgba(255, 255, 255, .1); color: #fff; }
.topbtn:disabled { opacity: .35; cursor: default; }
/* the back button sits in the top left corner once there is a page to go back to */
.back-btn { flex: none; margin: 0 -4px 0 -6px; }

.view { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom); }
.view-leads, .view-clients { overflow: hidden; }

/* the menu button's list of pages */
.nav-menu { display: grid; gap: 2px; padding: 5px; min-width: 216px; }
.pop.nav-pop { max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px); }      /* every page in view: the list is never cut short to scroll */
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 5px; color: var(--text); font-weight: 500; text-decoration: none; }
.nav-item .icon { color: var(--muted); }
.nav-item:hover, .nav-item:focus-visible { background: #eef0ea; }
.nav-item:focus-visible { outline-offset: -2px; }
.nav-item.on { background: var(--ink); color: #fff; font-weight: 600; }
.nav-item.on .icon { color: #8fe0aa; }

/* ---------------------------------------------------------------- controls */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--text); font: 500 14px var(--font); white-space: nowrap; text-decoration: none; }
.btn:hover:not(:disabled) { border-color: #b9bdb3; }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.btn.primary:hover:not(:disabled) { background: #186636; border-color: #186636; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { background: none; border-color: transparent; }
.btn.ghost:hover:not(:disabled) { background: #e8eae4; border-color: transparent; }
.btn.danger-ghost { background: none; border-color: transparent; color: var(--red); }
.btn.danger-ghost:hover { background: #fbe9e7; border-color: transparent; }
.btn.soft { border-color: #b7d9c3; color: var(--green-deep); font-weight: 600; }
.btn.soft:hover:not(:disabled) { background: #eef8f1; border-color: #8cc7a1; }
.btn.small { height: 28px; padding: 0 9px; font-size: 13px; }
.btn.big { height: 42px; font-size: 15px; font-weight: 600; }
.btn.toggle.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.iconbtn { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: var(--r); background: none; color: var(--muted); }
.iconbtn:hover { background: #e8eae4; color: var(--text); }

.toolbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 9px 12px; }
.toolbar.flat { padding: 0 0 14px; }
.spacer { flex: 1 1 0; }
.stepper { display: inline-flex; align-items: center; height: 34px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stepper .iconbtn { height: 32px; }
.stepper-label { min-width: 128px; height: 100%; padding: 0 6px; border: 0; background: none; font-weight: 600; white-space: nowrap; }
.search { width: 210px; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.search::placeholder { color: var(--faint); }

.stats { flex: none; display: flex; align-items: baseline; gap: 14px; padding: 0 12px 9px; overflow-x: auto; white-space: nowrap; color: var(--muted); font-size: 13px; scrollbar-width: none; }
.stats::-webkit-scrollbar { display: none; }
.stat b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.stat.lead b { font-size: 15px; }
.stat-gap { flex: none; align-self: stretch; width: 1px; background: var(--line); }

.chips { display: flex; gap: 6px; overflow-x: auto; max-width: 100%; scrollbar-width: none; padding: 1px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }
.chipbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  font: 500 13px var(--font); white-space: nowrap; }
.chipbtn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chipbtn-n { font: 600 12px var(--cond); color: var(--muted); font-variant-numeric: tabular-nums; }
.chipbtn.on .chipbtn-n { color: #c2c5d6; }

.segctl { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.segctl-btn { height: 32px; padding: 0 13px; border: 0; border-right: 1px solid var(--line); background: none; font-weight: 500; }
.segctl-btn:last-child { border-right: 0; }
.segctl-btn.on { background: var(--ink); color: #fff; }

.chip { display: inline-block; max-width: 100%; padding: 2px 9px; border-radius: 999px; background: var(--chip-bg, #e6e8e2); color: var(--chip-fg, #3a3d38); font: 600 12.5px/1.4 var(--cond);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* ---------------------------------------------------------------- the grid */

/* A box holds the scrolling sheet and its zoom button. Two fingers zoom the sheet: every size in it multiplies by --z. */
.grid-box { position: relative; max-width: 100%; }
.grid-box.fill { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.grid-box:not(.fill) { width: fit-content; }
.grid-box.table-box { width: auto; }
.grid-box.table-box.narrow { max-width: 380px; }
.zooms { touch-action: pan-x pan-y; }
.zoom-chip { position: sticky; top: 6px; z-index: 8; flex: none; display: block; width: max-content; height: 26px; margin: 4px 6px -30px auto; padding: 0 10px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; font: 600 12.5px/26px var(--cond); font-variant-numeric: tabular-nums; box-shadow: 0 2px 8px rgba(22, 23, 42, .3); }
.grid-wrap { position: relative; overflow: auto; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
.grid-wrap.fill { flex: 1 1 auto; min-height: 0; border-bottom: 0; }
.grid-wrap:not(.fill) { width: fit-content; max-width: 100%; border: 1px solid var(--line); }
.grid-wrap:focus { outline: none; }
.grid-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--green-deep); }
.grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; font: 400 calc(13.5px * var(--z, 1))/1.3 var(--cond); font-variant-numeric: tabular-nums; }
.grid th, .grid td { height: calc(var(--row) * var(--z, 1)); padding: 0 calc(8px * var(--z, 1)); border-right: 1px solid var(--grid); border-bottom: 1px solid var(--grid); background: var(--surface);
  text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid thead th { position: sticky; top: 0; z-index: 3; background: var(--head); color: #45484f; font-weight: 600; border-bottom: 1px solid var(--line); }
.grid .right { text-align: right; }
.grid .center { text-align: center; }
.grid .gut { position: sticky; left: 0; z-index: 2; width: calc(30px * var(--z, 1)); padding: 0; background: var(--head); text-align: center; }
.grid .stick { position: sticky; z-index: 2; border-right: 1px solid var(--line); font-weight: 500; }
.grid thead .gut, .grid thead .stick { z-index: 5; }
.grid tfoot td { position: sticky; bottom: 0; z-index: 3; background: var(--head); border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; color: #45484f; }
.grid tfoot .gut, .grid tfoot .stick { z-index: 5; }
.grid-wrap:not(.fill) .grid tfoot td { position: static; }
.grid-wrap:not(.fill) .grid tfoot .stick, .grid-wrap:not(.fill) .grid tfoot .gut { position: sticky; }
.grid td.ro { background: #fafbf8; }
.grid td.stick { background: var(--surface); }
.grid tr.cur td.gut, .grid tr.cur td.stick { background: #edf6f0; }
.grid td.sel { box-shadow: inset 0 0 0 2px var(--green); }
.grid td.editing { overflow: visible; padding: 0; z-index: 6; }
.grid td.editing:not(.stick) { position: relative; }
.cellinput { position: absolute; left: 0; top: 0; height: 100%; min-width: 100%; padding: 0 8px; border: 0; border-radius: 0; background: #fff; outline: 2px solid var(--green); outline-offset: -2px;
  box-shadow: 0 3px 10px rgba(22, 23, 42, .2); font: inherit; }
.cellinput[type=date] { width: 138px; }
.rowbtn { width: 100%; height: 100%; min-height: calc(var(--row) * var(--z, 1)); display: flex; align-items: center; justify-content: center; border: 0; background: none; color: #a3a69d; padding: 0; }
.rowbtn:hover, .grid tr.cur .rowbtn { color: var(--text); }
.celllink { max-width: 100%; padding: 0; border: 0; background: none; color: var(--text); font: inherit; font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  text-decoration: underline; text-decoration-color: #c5c9bf; text-underline-offset: 3px; }
.celllink:hover { text-decoration-color: var(--green-deep); color: var(--green-deep); }
.grid .chip { padding: calc(2px * var(--z, 1)) calc(9px * var(--z, 1)); font-size: calc(12.5px * var(--z, 1)); }
.grid .icon { width: calc(16px * var(--z, 1)); height: calc(16px * var(--z, 1)); }
.grid td .chip { cursor: default; }
.grid td:not(.ro) .chip { cursor: pointer; }
.ph { color: #a2a59c; }
.box { display: inline-flex; align-items: center; justify-content: center; width: calc(17px * var(--z, 1)); height: calc(17px * var(--z, 1)); border: 1.5px solid #a9ada3; border-radius: 4px; background: #fff; color: #fff; vertical-align: middle; cursor: pointer; }
.box.on { background: var(--green-deep); border-color: var(--green-deep); }
.grid .box .icon { width: calc(14px * var(--z, 1)); height: calc(14px * var(--z, 1)); }
.grid tr.group td { height: calc(30px * var(--z, 1)); background: #eceee8; border-right: 0; color: #3d4046; font: 600 calc(13px * var(--z, 1)) var(--font); }
.grid tr.empty td { height: 76px; border-right: 0; color: var(--muted); font: 400 14px var(--font); }
.group-label, .group-note { position: sticky; left: 12px; }
.group-note { margin-left: 10px; font-weight: 400; color: var(--muted); }
.grid tr.faded td { color: var(--faint); }
.grid td.inc-g { background: #e2f4e7; }
.grid td.inc-p { background: #dce8fb; }
.grid td.inc-h { background: #f0f4fc; color: #47597a; }
.grid td.inc-x { color: var(--faint); }
.grid td.muted { color: var(--faint); }
.grid td.warn { color: #a25100; font-weight: 600; }
.grid td.moved { color: #a25100; font-style: italic; }

/* ---------------------------------------------------------------- pages */

.page { width: 100%; max-width: 860px; padding: 18px 16px 40px; }
.page.wide { max-width: 1320px; }
.page-head { margin-bottom: 14px; }
.biz { color: var(--muted); font-weight: 500; margin-bottom: 2px; }
.day { font: 700 26px/1.15 var(--font); letter-spacing: -.01em; }
.block { margin: 0 0 24px; }
.block-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; min-height: 30px; margin-bottom: 8px; }
.block-head h2 { font: 600 16px/1.2 var(--font); margin-right: auto; }
.block-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.block-meta { color: var(--muted); font-size: 13px; }
.count { min-width: 22px; height: 22px; padding: 0 6px; margin-right: auto; margin-left: -4px; border-radius: 11px; background: var(--ink); color: #fff; font: 600 12.5px/22px var(--cond); text-align: center; }
.count:empty { display: none; }
.block-head h2:has(+ .count:not(:empty)) { margin-right: 0; }
.more { font-size: 13px; font-weight: 500; }
.quiet { color: var(--muted); }
.items > .quiet { padding: 12px 14px; }

.items { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.item { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px; border-top: 1px solid var(--grid); }
.item:first-child { border-top: 0; }
.item-kind { flex: none; width: 70px; font: 600 12.5px var(--cond); color: var(--muted); }
.k-lesson { color: #2347a8; }
.k-standard { color: #7a5c00; }
.k-book { color: #8a4b00; }
.k-consult { color: #1c6aa8; }
.k-payment { color: #7a5600; }
.k-followup { color: #5a35a8; }
.k-start { color: #0e5c54; }
.k-gohome { color: #a25100; }
.item-main { flex: 1 1 200px; min-width: 0; }
.item-title { font-weight: 600; }
.item-detail { color: var(--muted); font-size: 13px; }
.item-acts { flex: none; display: flex; gap: 6px; margin-left: auto; }
.item-day { padding: 7px 12px 5px; border-top: 1px solid var(--grid); background: var(--head); color: #45484f; font: 600 12.5px var(--cond); }
.item-day:first-child { border-top: 0; }

/* home: one small bar for the month, then a button for every page */
.page.home { max-width: 720px; }
.home-meter { margin-bottom: 14px; }
.home-meter:empty { display: none; }
.hm-link { display: block; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; text-decoration: none; }
.hm-link:hover { border-color: #b9bdb3; }
.hm-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; }
.hm-label { font-weight: 600; }
.hm-num { color: var(--muted); font-size: 13px; }
.hm-num b { color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; }
.bar.slim { display: block; height: 8px; margin: 8px 0 0; }
.home-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile-nav { display: flex; flex-direction: column; min-width: 0; min-height: 108px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
  color: var(--text); text-decoration: none; }
.tile-nav:hover { border-color: #b9bdb3; }
.tile-nav.half { padding: 12px 10px; }
.home-tiles > .tile-nav:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 84px; }
.tile-nav-top { display: flex; align-items: flex-start; justify-content: space-between; min-height: 24px; margin-bottom: auto; color: var(--green-deep); }
.tile-nav-badge { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--ink); color: #fff; font: 600 12.5px/22px var(--cond); text-align: center; }
.tile-nav-label { margin-top: 10px; font: 600 17px/1.2 var(--font); }
.tile-nav.half .tile-nav-label { font-size: 15.5px; }
.tile-nav-line { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* goal bars */
.gauge { display: grid; gap: 16px; padding: 14px 16px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.gauge-top { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; }
.gauge-label { font-weight: 600; }
.gauge-goal { color: var(--muted); font-size: 13px; }
.bar { position: relative; height: 16px; margin: 7px 0; border-radius: 3px; background: #eceee9; }
.seg { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.seg.hyp { background: var(--hyp); }
.seg.proj { background: var(--blue); }
.seg.guar { background: var(--green); }
.goal-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); }
.gauge-nums { display: flex; flex-wrap: wrap; gap: 2px 16px; color: var(--muted); font-size: 13px; }
.gnum b { color: var(--text); font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; }
.gnum.guar .dot { background: var(--green); }
.gnum.proj .dot { background: var(--blue); }
.gnum.hyp .dot { background: var(--hyp); box-shadow: inset 0 0 0 1px #b4c9ea; }
.split { margin: -4px 0 14px; color: var(--muted); font-size: 13px; }
.split b { color: var(--text); }

/* slot boards: one box for every client or dog holding a slot, then the open ones */
.board { padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.board-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; margin-bottom: 10px; }
.board-head:last-child { margin-bottom: 0; }
.board-head h3 { font: 600 15px/1.2 var(--font); }
.board-meta { color: var(--muted); font-size: 13px; }
.board-stats { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-bottom: 12px; color: var(--muted); font-size: 13.5px; }
.board-stats .stat b { font-size: 18px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 8px; }
.slot { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; min-height: 66px; padding: 7px 9px; border: 0; border-radius: 6px;
  color: var(--ink); font: inherit; text-align: left; }
button.slot { cursor: pointer; }
/* The client's whole name and the dog's whole name, on as many lines as they need. */
.slot-name { font: 600 14px/1.25 var(--font); overflow-wrap: anywhere; }
.slot-dog { font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.slot-dog + .slot-line { margin-top: 2px; }
.slot-line { font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-line:empty { display: none; }
.slot.paid { background: var(--green); }
.slot.unpaid { background: #f2b84b; }
.slot.projected { background: var(--blue); }
.slot.held { background: #c9cdd6; }
.slot.open { min-height: 34px; border: 1.5px dashed #c2c6bc; background: none; }
button.slot:hover { filter: brightness(1.06); }
.slot.mini { display: inline-block; width: 16px; height: 12px; min-height: 0; padding: 0; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.lesson-slots .legend { margin-top: 12px; }
/* Board & Train waves: a block a month, with its own waitlist under the slots */
.waves-wrap { display: grid; gap: 12px; }
.waves { display: grid; gap: 12px; }
.wave.past { background: var(--head); }
.wave.past .slot { opacity: .78; }
.wave.now { border-color: var(--green-deep); box-shadow: inset 0 0 0 1px var(--green-deep); }
.wave-now { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--t-paid-bg); color: var(--t-paid-fg); font: 600 12px/1.5 var(--cond); vertical-align: 1px; }
.wave-wait { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 13px; }
.wave-wait:first-child, .board-head + .wave-wait { margin-top: 0; padding-top: 0; border-top: 0; }
.wave-wait-label { font: 600 12.5px var(--cond); color: var(--muted); }
.wave-wait-list { display: flex; flex-wrap: wrap; gap: 0 14px; margin: 0; padding: 0 0 0 20px; }
.wave-wait-list li { color: var(--muted); }
.wait-item { padding: 3px 0; border: 0; background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer; }
.wait-item b { color: var(--text); font-weight: 600; }
.wait-item:hover b, .wait-item:focus-visible b { text-decoration: underline; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 13px; }
.board-note, .board-more { color: var(--muted); font-size: 13px; }
.board-more { margin-top: 10px; }
.taginfo { display: grid; gap: 6px; padding: 12px 14px; min-width: 210px; }
.taginfo p { color: var(--muted); font-size: 13px; }
.taginfo .btn { justify-self: start; }
.taginfo .btn-row { gap: 6px; }

/* analysis */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; margin-bottom: 12px; }
.tile { padding: 11px 13px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.tile-label { color: var(--muted); font-size: 13px; }
.tile-value { font: 700 24px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.tile-note { color: var(--muted); font-size: 12.5px; }
.tile.guar { box-shadow: inset 3px 0 0 var(--green); }
.tile.proj { box-shadow: inset 3px 0 0 var(--blue); }
.tile.hyp { box-shadow: inset 3px 0 0 #b4c9ea; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.table-scroll.narrow { max-width: 380px; }
.plain { width: 100%; border-collapse: collapse; font: 400 calc(13.5px * var(--z, 1)) var(--cond); font-variant-numeric: tabular-nums; }
.plain th, .plain td { padding: calc(7px * var(--z, 1)) calc(10px * var(--z, 1)); border-bottom: 1px solid var(--grid); text-align: left; white-space: nowrap; font-weight: 400; }
.plain thead th { background: var(--head); color: #45484f; font-weight: 600; border-bottom: 1px solid var(--line); }
.plain tbody th { font-weight: 500; }
.plain .right { text-align: right; }
.plain tr.total th, .plain tr.total td { font-weight: 600; background: var(--head); border-bottom: 0; }
.minibar { position: relative; display: inline-block; width: calc(110px * var(--z, 1)); height: calc(10px * var(--z, 1)); border-radius: 2px; background: #eceee9; vertical-align: middle; }
.minibar .seg { border-radius: 2px; }

/* ---------------------------------------------------------------- forms */

.form { display: grid; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: grid; gap: 4px; min-width: 0; }
.field.end { align-self: end; }
.field-label { font-weight: 500; font-size: 13px; color: #3d4046; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-hint { color: var(--muted); font-size: 12.5px; }
.field-hint.under { margin: -14px 0 24px; }
.field-hint.grow { align-self: center; }
.field-hint.below { margin-top: 10px; max-width: 92ch; }
.field input, .field select, .field textarea, .modal textarea { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #c6cac0; border-radius: var(--r); background: #fff; }
.field textarea, .modal textarea { display: block; line-height: 1.45; resize: vertical; }
.field input:disabled { background: #f0f1ed; color: var(--muted); }
.form-msg { color: var(--red); font-size: 13px; min-height: 0; }
.form-msg:empty { display: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.trainers { display: grid; gap: 10px; margin-bottom: 10px; }
.trainer { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr) auto; gap: 10px; align-items: end; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.logins { display: grid; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 4px 12px; border-top: 1px solid var(--grid); }
.login-row:first-child { border-top: 0; }
.about { color: var(--faint); font-size: 12.5px; }
.card-h { margin: 8px 0 -2px; font: 600 14px var(--font); }

/* ---------------------------------------------------------------- layers */

.pop-back { position: fixed; inset: 0; z-index: 60; }
.pop { position: fixed; max-width: min(440px, calc(100vw - 16px)); max-height: min(460px, calc(100vh - 16px)); overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  box-shadow: 0 10px 30px rgba(22, 23, 42, .2); }
.pop-back.sheet { display: flex; align-items: flex-end; background: rgba(22, 23, 42, .4); }
.pop.sheet { position: static; width: 100%; max-width: none; max-height: 78vh; max-height: 78dvh; border: 0; border-radius: 14px 14px 0 0; padding-bottom: env(safe-area-inset-bottom); animation: rise .16s ease-out; }
.menu { display: grid; padding: 5px; min-width: 210px; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 34px; padding: 6px 10px; border: 0; border-radius: 5px; background: none; text-align: left; }
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: #eef0ea; }
.menu-item:disabled { color: var(--faint); cursor: default; }
.menu-item.danger { color: var(--red); }
.menu-sep { height: 1px; margin: 4px 6px; background: var(--grid); }
.pick { display: flex; flex-direction: column; min-width: 220px; max-height: inherit; }
.pick:focus { outline: none; }
.pick-title { padding: 9px 12px 2px; color: var(--muted); font: 600 12.5px var(--cond); }
.pick-filter { margin: 8px 8px 2px; height: 34px; padding: 0 10px; border: 1px solid #c6cac0; border-radius: var(--r); }
.pick-list { overflow: auto; padding: 5px; }
.pick-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 32px; padding: 5px 8px; border: 0; border-radius: 5px; background: none; text-align: left; }
.pick-item:hover, .pick-item.active { background: #eef0ea; }
.pick-item.current { box-shadow: inset 2px 0 0 var(--green-deep); }
.pick-clear { color: var(--muted); }
.pick-hint { color: var(--muted); font: 400 12.5px var(--cond); font-variant-numeric: tabular-nums; }
.pick-group { padding: 8px 8px 3px; color: var(--muted); font: 600 12.5px var(--cond); }
.pick-none { padding: 10px; color: var(--muted); }
.longbox { display: grid; width: min(430px, calc(100vw - 18px)); }
.pop.sheet .longbox { width: 100%; }
.longedit { display: block; width: calc(100% - 20px); margin: 6px 10px 0; padding: 8px 10px; border: 1px solid #c6cac0; border-radius: var(--r); line-height: 1.45; resize: vertical; }
.longbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 10px; }
.hint { margin-right: auto; color: var(--faint); font-size: 12.5px; }

.modal-back, .drawer-back { position: fixed; inset: 0; z-index: 50; background: rgba(22, 23, 42, .45); }
.modal-back { display: flex; align-items: flex-start; justify-content: center; padding: 8vh 12px 12px; overflow: auto; }
.modal { width: 100%; max-width: 440px; border-radius: 10px; background: #fff; box-shadow: 0 16px 48px rgba(22, 23, 42, .3); }
.modal.wide { max-width: 620px; }
.modal-head, .drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 10px 10px 16px; }
.modal-head h2, .drawer-head h2 { font: 600 17px/1.25 var(--font); }
.modal-body { padding: 4px 16px 14px; }
.modal-text { color: #3d4046; }
.modal-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 0 16px 16px; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(540px, 100vw); display: flex; flex-direction: column; background: var(--paper); box-shadow: -10px 0 36px rgba(22, 23, 42, .25);
  animation: slide .18s ease-out; }
.drawer-head { flex: none; padding-top: calc(12px + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.drawer-body { flex: 1 1 auto; overflow: auto; padding: 14px 16px calc(28px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.card-top { display: grid; gap: 10px; margin-bottom: 14px; }
.card-stage { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.card-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.card-rows { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-rows > .quiet { padding: 10px 12px; }
.card-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 1px solid var(--grid); }
.card-row:first-child { border-top: 0; }
.card-row-main { flex: 1 1 auto; min-width: 0; }
.card-row-title { font-weight: 600; }
.card-row-sub { color: var(--muted); font-size: 13px; }
.card-danger { margin-top: 6px; }

.toasts { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 80; display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 24px); transform: translateX(-50%); }
.toast { display: flex; align-items: center; gap: 14px; padding: 9px 14px; border-radius: 8px; background: var(--ink); color: #fff; box-shadow: 0 8px 24px rgba(22, 23, 42, .3); animation: rise .16s ease-out; }
.toast.error { background: #8f1d17; }
.toast-act { flex: none; padding: 3px 4px; border: 0; background: none; color: #8fe0aa; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.toast.error .toast-act { color: #fff; }
/* a note with two buttons: the words on top, the buttons under them */
.toast.two { flex-wrap: wrap; gap: 4px 18px; max-width: 460px; }
.toast.two .toast-text { flex: 1 1 100%; }

/* ---------------------------------------------------------------- sign-in */

body.auth { background: var(--ink); }
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { display: grid; gap: 14px; width: 100%; max-width: 372px; padding: 26px 24px 24px; border-radius: 12px; background: #fff; }
.auth-card h1 { font: 700 23px/1.2 var(--font); }
.auth-mark { display: block; border-radius: 9px; }
.auth-lead { color: var(--muted); margin-top: -8px; }
.auth-msg { color: var(--red); font-size: 13px; }
.auth-msg:empty { display: none; }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide { from { transform: translateX(28px); opacity: .5; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- roles, payments, team, trash, activity */

.role-tag { flex: none; margin-right: 4px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: #e7e9f4; font: 600 12px/1.5 var(--cond); white-space: nowrap; }
.scope-note { margin: -4px 0 16px; max-width: 76ch; color: var(--muted); }
.grid tr.assigned td { color: #5d6068; }
.grid td.owed .celllink { color: #7a5600; font-weight: 600; text-decoration-color: #e2cf8f; }
.grid td.owed.late .celllink { color: var(--red); text-decoration-color: #e6b3ae; }
.grid td.settled .celllink { display: block; width: 100%; min-height: 18px; color: var(--muted); font-weight: 400; text-align: right; text-decoration: none; }
.board-none { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }

.pay { display: grid; gap: 14px; }
.pay .block { margin: 0; }
.pay .block-head { min-height: 0; margin-bottom: 6px; }
.pay .block-head h2 { font-size: 14px; }
.pay-sum { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--head); }
.pay-line { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.pay-line b { font-weight: 600; }
.pay-line.total { margin-top: 2px; padding-top: 6px; border-top: 1px solid var(--line); font-weight: 600; }
.pay-line.owed b { color: #7a5600; }
.pay-state { margin-top: 4px; color: var(--muted); font-size: 13px; }
.pay-list { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.pay-list > .quiet { padding: 10px 12px; }
.pay-row { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 2px 6px 2px 12px; border-top: 1px solid var(--grid); }
.pay-row:first-child { border-top: 0; }
.pay-date { flex: none; width: 104px; font-weight: 500; }
.pay-note { flex: 1 1 auto; min-width: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-amt { flex: none; margin-left: auto; font-variant-numeric: tabular-nums; }
.form-row.pay-new { grid-template-columns: 150px 110px minmax(0, 1fr) minmax(0, 1fr); }
.btn-row > input { width: 130px; height: 28px; padding: 0 8px; border: 1px solid #c6cac0; border-radius: var(--r); background: #fff; }

.login-row { justify-content: flex-start; flex-wrap: wrap; }
.login-name { min-width: 110px; font-weight: 600; }
.login-role, .level { padding: 2px 9px; border-radius: 999px; background: #e6e8e2; color: #3a3d38; font: 600 12.5px/1.4 var(--cond); white-space: nowrap; }
.login-role.r-owner, .level.l-owner { background: var(--ink); color: #fff; }
.login-role.r-head_admin, .login-role.r-admin { background: #dbe9fd; color: #1b4c8c; }
.login-role.r-head_trainer, .login-role.r-trainer { background: #c9ecd2; color: #17642f; }
.level.l-head { background: #fbe9a9; color: #6a4b00; }
.login-trainer { color: var(--muted); font-size: 13px; }
.role-key { display: grid; gap: 4px; max-width: 92ch; color: var(--muted); font-size: 13px; }
.role-key b { color: var(--text); font-weight: 600; }

.trash, .activity { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.trash > .quiet, .activity > .quiet { padding: 12px 14px; }
.trash-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 9px 12px; border-top: 1px solid var(--grid); }
.trash-row:first-child { border-top: 0; }
.trash-row .item-kind { width: 84px; }
.act-row { display: grid; grid-template-columns: 128px 96px minmax(0, 1fr); gap: 2px 10px; padding: 7px 12px; border-top: 1px solid var(--grid); font-size: 13.5px; }
.act-row:first-child { border-top: 0; }
.act-when { color: var(--muted); font: 400 13px var(--cond); font-variant-numeric: tabular-nums; white-space: nowrap; }
.act-who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-head { font-weight: 500; }
.act-change { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.act-more { margin-top: 8px; }
.block-acts select { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }

.team { display: grid; gap: 14px; }
.member { margin: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.member .block-head { margin-bottom: 12px; }
.member-body { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 16px 28px; align-items: start; }
.member-slots, .member-prefs { display: grid; gap: 10px; justify-items: start; }
.meter { display: grid; }
.meter-label { color: var(--muted); font-size: 13px; }
.meter b { font: 700 20px/1.25 var(--font); font-variant-numeric: tabular-nums; }
.meter-note { color: var(--muted); font-size: 12.5px; }
.prefs { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 5px 14px; margin: 0; }
.prefs dt { color: var(--muted); font-size: 13px; padding-top: 1px; }
.prefs dd { margin: 0; white-space: pre-line; }
.dayrow { display: flex; flex-wrap: wrap; gap: 6px; }
.daybox { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; }
.field .daybox input { width: auto; min-height: 0; padding: 0; }
.offs { display: grid; gap: 6px; }
.offs > .quiet { font-size: 13px; }
.off-row { display: grid; grid-template-columns: 150px auto 150px minmax(0, 1fr) auto; gap: 6px; align-items: center; }

/* ---------------------------------------------------------------- sizes */

@media (min-width: 900px) {
  .waves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page { padding: 22px 24px 48px; }
  .toolbar { padding: 10px 14px; }
  .stats { padding: 0 14px 10px; }
}

@media (min-width: 701px) {
  .where::before { content: '/'; margin-right: 10px; color: #7f83a3; font-weight: 400; }
}

@media (max-width: 700px) {
  .brand-name { display: none; }
  .save-state.saved { display: none; }      /* on a phone the corner only speaks up while saving or offline */
  .top-left { gap: 8px; }
  .search { flex: 1 1 140px; width: auto; }
  .toolbar .spacer { display: none; }
  .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); }
  .trainer { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .day { font-size: 23px; }
  .slots { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .item { padding: 10px 12px; }
  .item-main { flex-basis: 100%; order: 1; }
  .item-acts { order: 2; margin-left: 0; }
  .item-kind { order: 3; width: auto; margin-left: auto; }
  .btn.collapse { width: 34px; padding: 0; }
  .btn.collapse span { display: none; }
  .toolbar { gap: 6px; padding: 8px 10px; }
  .stepper-label { min-width: 118px; }
  .modal-back { padding-top: 12px; }
  .member-body { grid-template-columns: minmax(0, 1fr); }
  .form-row.pay-new { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .act-row { grid-template-columns: minmax(0, 1fr) auto; }
  .act-what { grid-column: 1 / -1; }
  .off-row { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; }
  .off-row input[type=text] { grid-column: 1 / 4; grid-row: 2; }
  .role-tag { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
}

/* a phone's top bar has room for the page name, the trainer filter and three buttons, and nothing more.
   The role is still named in the menu under the login button. */
@media (max-width: 480px) {
  .top.long .wide-only { display: none; }                  /* a long page name, like Board & Train, takes the room "trainers" had */
  .top.long .back-btn:not([hidden]) + .brand { display: none; }
  .role-tag { display: none; }
}
@media (max-width: 359px) {
  .back-btn:not([hidden]) + .brand { display: none; }      /* the narrowest phones: the arrow takes the dog tag's place */
  .wide-only { display: none; }
}

/* the narrowest phones: the two half buttons on Home need every pixel */
@media (max-width: 350px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .home-tiles { gap: 10px; }
  .tile-split { gap: 6px; }
  .tile-nav { padding: 12px; }
  .tile-nav.half { padding: 10px 7px; }
  .tile-nav.half .tile-nav-label { font-size: 14.5px; }
  .tile-nav-line { font-size: 12.5px; }
  .hm-link { padding: 10px 12px 12px; }
}

/* fingers need bigger targets, and iOS zooms into any field under 16px */
@media (pointer: coarse) {
  :root { --row: 38px; }
  .grid { font-size: calc(14.5px * var(--z, 1)); }
  input, select, textarea, .cellinput, .longedit, .search { font-size: 16px !important; }
  .cellinput { min-height: 34px; }
  .pick-item, .menu-item { min-height: 42px; }
  .nav-item { min-height: 46px; }
  .btn.small { height: 32px; }
  .rowbtn { min-width: calc(30px * var(--z, 1)); }
  .zoom-chip { height: 30px; line-height: 30px; margin-bottom: -34px; padding: 0 12px; font-size: 13.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top, .toolbar, .toasts, .zoom-chip { display: none !important; }
  #app, .view, .grid-wrap, .grid-box { height: auto; overflow: visible; display: block; }
}

/* ---------------------------------------------------------------- tasks, two-step login (1.2) */

.task { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--grid); }
.task:first-child { border-top: 0; }
.task-check { flex: none; width: 26px; height: 26px; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 2px solid #9aa094; border-radius: 50%; background: #fff; color: transparent; }
.task-check:hover:not(:disabled) { border-color: var(--green-deep); color: #b7d9c3; }
.task-check.on { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
.task-check.on:hover:not(:disabled) { color: #fff; }
.task-check:disabled { opacity: .5; cursor: default; }
.task-main { flex: 1 1 auto; min-width: 0; }
.task-title { font-weight: 600; overflow-wrap: anywhere; }
.task.done .task-title { color: var(--muted); font-weight: 500; text-decoration: line-through; }
.task-notes { margin-top: 1px; color: #3d4046; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.task-meta:empty { display: none; }
.task-meta .late { color: var(--red); font-weight: 600; }
.task-meta .soon { color: #8a4b00; font-weight: 600; }
.task-meta button { padding: 0; border: 0; background: none; color: var(--green-deep); font-size: 13px; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.task-acts { flex: none; }
.task-more { padding: 9px 12px; border-top: 1px solid var(--grid); font-size: 13px; }
.seg-row { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg-row button { height: 32px; padding: 0 12px; border: 0; border-left: 1px solid var(--line); background: none; font-weight: 500; white-space: nowrap; }
.seg-row button:first-child { border-left: 0; }
.seg-row button.on { background: var(--ink); color: #fff; }
.view-tasks .toolbar .btn.small { height: 32px; }
.view-tasks .page-head .scope-note, .view-prices .page-head .scope-note { margin: 6px 0 0; }

.two-state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.two-state p { flex: 1 1 260px; max-width: 76ch; }
.two-state b { font-weight: 600; }
.two-steps { display: grid; gap: 14px; }
.two-steps h3 { margin: 0 0 4px; font: 600 14px/1.3 var(--font); }
.two-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.two-key a.btn { text-decoration: none; }
.two-key code, .codes code { font: 600 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .03em; }
.two-key code { padding: 4px 10px; border: 1px dashed #b9bdb3; border-radius: var(--r); background: var(--head); overflow-wrap: anywhere; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; margin: 0; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--head); list-style: none; }
.login-2step { padding: 2px 9px; border-radius: 999px; background: #fff1d6; color: #6b4300; font: 600 12.5px/1.4 var(--cond); white-space: nowrap; }

@media (max-width: 700px) {
  .view-tasks .toolbar .spacer { display: none; }
  .view-tasks .toolbar .btn.primary { margin-left: auto; }
  .task-acts .btn { padding: 0 8px; }
}

/* ---------------------------------------------------------------- the leads and sales tools */

/* the Sheet or Board switch, the look-alikes button, and a button that is the current pick */
.segctl.small .segctl-btn { height: 32px; padding: 0 11px; }
.btn.warn { border-color: #e2c77a; background: #fff8e3; color: #6b4e00; font-weight: 600; }
.btn.warn:hover:not(:disabled) { border-color: #cfae4f; }
.btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.block-head > select { height: 30px; padding: 0 8px; border: 1px solid #c6cac0; border-radius: var(--r); background: #fff; font: 500 13px var(--font); }

/* a lead gone quiet: a small red mark on its status */
.grid td.quiet .chip::after { content: ''; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--red); vertical-align: 1px; }

/* the board: a column for each status. The board scrolls sideways; each column scrolls up and down on its own. */
.lanes { flex: 1 1 auto; min-height: 0; display: flex; align-items: stretch; gap: 10px; padding: 0 12px 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-left: 12px; -webkit-overflow-scrolling: touch; }
.lane { flex: none; width: 268px; min-height: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 8px; background: var(--head); scroll-snap-align: start; }
.lane.over { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.lane-head { flex: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.lane-n { font: 600 13px var(--cond); color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-sum { margin-left: auto; font: 500 13px var(--cond); color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-list { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 8px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lane-none { margin: 2px; color: var(--faint); font-size: 13px; }
.lane-card { flex: none; border: 1px solid var(--line); border-radius: 7px; background: var(--surface); }
.lane-card.quiet { box-shadow: inset 3px 0 0 var(--red); }
.lane-card.assigned { background: var(--head); }
.lane-card.dragging { opacity: .45; }
.lane-card.found { outline: 2px solid var(--green); outline-offset: 1px; }
.lane-card[draggable=true] { cursor: grab; }
.lane-open { display: grid; gap: 5px; justify-items: start; width: 100%; padding: 9px 10px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lane-open:hover { background: #f4f5f1; }
.lane-open .chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.lane-top { display: flex; align-items: baseline; gap: 8px; width: 100%; }
.lane-who { flex: 1 1 auto; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.lane-money { flex: none; font: 500 13px var(--cond); color: var(--muted); font-variant-numeric: tabular-nums; }
.lane-line { color: var(--muted); font-size: 13px; }
.lane-foot { display: flex; align-items: flex-end; gap: 6px; padding: 0 8px 8px 10px; }
.lane-flags { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.flag { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; font: 500 12px/1.5 var(--cond); color: var(--muted); white-space: nowrap; }
.flag.quiet { border-color: #e6b3ae; background: #fdeeec; color: var(--red); }
.lane-move { flex: none; display: inline-flex; align-items: center; gap: 3px; height: 30px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
  color: var(--muted); font: 500 13px var(--font); cursor: pointer; }
.lane-move:hover { color: var(--text); border-color: #b9bdb3; }

/* the details on one lead, the reason picker, look-alikes and the merge box */
.lead-more .block { margin-bottom: 20px; }
.lead-more .block:last-child { margin-bottom: 0; }
.form-note { color: var(--muted); font-size: 13px; }
.form-note.warn { color: #8a4b00; }
.form-note .btn { margin-left: 4px; }
.with-list { display: block; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }
.twins { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.twins > .quiet, .twins > .form-note { margin: 0; padding: 12px 14px; }
.twin { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 11px 14px; border-top: 1px solid var(--grid); }
.twin:first-child { border-top: 0; }
.twin-main { flex: 1 1 260px; min-width: 0; }
.twin-title { font-weight: 600; }
.twin-sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.twin-sub .celllink { display: inline; white-space: normal; }
.twin-acts { flex: none; display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.radio-list { display: grid; gap: 8px; }
.radio { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.radio input { flex: none; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--green-deep); }
.radio-main { display: grid; gap: 2px; min-width: 0; }
.radio-sub { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.radio.off { opacity: .6; cursor: default; }
.k-stale { color: var(--red); }
.k-quote { color: #7a5600; }

/* a box to type in inside a report table (the month's ad spend), and the website key */
.cell-in { width: calc(84px * var(--z, 1)); height: calc(26px * var(--z, 1)); padding: 0 calc(7px * var(--z, 1)); border: 1px solid #c6cac0; border-radius: 4px; background: #fff;
  font: inherit; text-align: right; font-variant-numeric: tabular-nums; }
.keybox { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--head); }
.keybox .btn-row { margin: 0; align-items: center; flex-wrap: nowrap; }
.keybox .btn-row > input { flex: 1 1 auto; min-width: 0; width: auto; height: 34px; font: 500 13px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

@media (max-width: 700px) {
  .lanes { gap: 8px; padding: 0 10px 10px; scroll-padding-left: 10px; }
  .lane { width: min(82vw, 300px); }
  .twin-acts { margin-left: 0; }
}

/* ---------- the calendar: a mark for each kind of thing, the week on Home, the month, the list for a day ---------- */
/* 1.7: the colors he chose. Consults light blue, in-home lessons blue, standard lessons yellow, Board & Train pickups
   and drop-offs orange, Board & Train check-ins burnt orange, phone calls lavender, team meetings purple. Time off,
   tasks and "other" keep the colors they had. Each mark is checked against every other one for telling apart. */
:root { --k-consult: #4aa8e8; --k-lesson: #3465d8; --k-standard: #dcab00; --k-call: #9a82e2; --k-bt: #ea7614; --k-checkin: #a8430f; --k-meeting: #6332b0; --k-off: #9a9da4; }
.pip { flex: none; display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--k-off); }
.pip.ck-consult { background: var(--k-consult); }
.pip.ck-lesson { background: var(--k-lesson); }
.pip.ck-standard { background: var(--k-standard); }
.pip.ck-call { background: var(--k-call); }
.pip.ck-bt { background: var(--k-bt); }
.pip.ck-checkin { background: var(--k-checkin); }
.pip.ck-meeting { background: var(--k-meeting); }
.pips { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; min-height: 7px; max-width: 100%; }

.week { margin-bottom: 14px; padding: 6px 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.week-head { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; }
.week-title { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 0 8px; min-height: 34px; padding: 0 4px; border: 0;
  background: none; color: inherit; font: inherit; cursor: pointer; }
.week-title b { font: 600 15px/1.3 var(--font); }
.week-title span { color: var(--muted); font-size: 13px; }
.week-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week-day { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 68px; padding: 6px 0 4px; border: 1px solid transparent; border-radius: 6px;
  background: var(--head); color: inherit; font: inherit; cursor: pointer; }
.week-day:hover { border-color: #b9bdb3; }
.week-day.past { opacity: .62; }
.week-day.today .week-num { min-width: 26px; padding: 3px 0; border-radius: 13px; background: var(--green-deep); color: #fff; text-align: center; }
.week-day.sel { background: var(--surface); border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.week-dow { font: 600 11.5px/1 var(--cond); color: var(--muted); }
.week-num { font: 600 16px/1.1 var(--font); }
.week-n { min-height: 12px; font: 600 11.5px/1 var(--cond); color: var(--muted); }
/* "Your Calendar" on top opens the Calendar page; the picked day is listed under the week, in place */
.week-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 40px; margin-bottom: 4px; padding: 4px 6px 6px;
  border: 0; border-bottom: 1px solid var(--grid); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.week-open b { font: 600 16px/1.3 var(--font); }
.week-open svg { flex: none; color: var(--muted); }
.week-open:hover b, .week-open:focus-visible b { text-decoration: underline; }
.week-list { margin-top: 10px; border-top: 1px solid var(--grid); }
.week-date { padding: 9px 6px 3px; font: 600 13.5px/1.3 var(--font); }
.week-list .cal-entry { padding: 8px 6px; }
.week-list .week-date + .cal-entry { border-top: 0; }
.week-list .cal-none { padding: 4px 6px 2px; }
.week-more { display: block; width: 100%; margin-top: 2px; padding: 8px 6px 2px; border: 0; border-top: 1px solid var(--grid); background: none; color: var(--muted);
  font: 500 13px var(--font); text-align: left; cursor: pointer; }
.week-more:hover { color: var(--text); text-decoration: underline; }

.calendar .chips { margin-bottom: 12px; }
.cal-chip .pip { width: 8px; height: 8px; }
.cal-chip:not(.on) .pip { opacity: .45; }
/* a chip that is switched on is dark, so its mark wears the lighter color the dark look uses */
.cal-chip.on { --k-consult: #93cff8; --k-lesson: #5f8ff2; --k-standard: #f0d250; --k-call: #b9a6f2; --k-bt: #f2944a; --k-checkin: #cf622a; --k-meeting: #9361dc; --k-other: #6fc3cf; --k-task: #cdbb6a; }
.cal-flag { margin: 0 0 12px; padding: 8px 12px; border: 1px solid #e9c9a0; border-radius: 6px; background: #fff6e9; color: #8a4b00; font-size: 13.5px; }
.cal-box { margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.cal-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dows { background: var(--head); border-bottom: 1px solid var(--grid); }
.cal-dows span { padding: 5px 0; text-align: center; font: 600 12px var(--cond); color: var(--muted); }
.cal-day { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; min-height: 60px; padding: 5px 0 4px; border: 0; border-top: 1px solid var(--grid);
  border-left: 1px solid var(--grid); background: none; color: inherit; font: inherit; cursor: pointer; }
.cal-row > .cal-day:first-child { border-left: 0; }
.cal-dows + .cal-row > .cal-day { border-top: 0; }
.cal-day.out { background: var(--head); color: var(--faint); }
.cal-day.off { background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, .055) 0 5px, transparent 5px 10px); }
.cal-num { min-width: 24px; height: 24px; border-radius: 12px; font: 600 14px/24px var(--font); text-align: center; }
.cal-day.today .cal-num { background: var(--green-deep); color: #fff; }
.cal-day.sel { box-shadow: inset 0 0 0 2px var(--ink); }
.cal-n { min-height: 12px; font: 600 11.5px/1 var(--cond); color: var(--muted); }
.cal-day.clash .cal-n { color: var(--red); }
.cal-list { margin-bottom: 24px; }
.cal-none { margin: 0; padding: 9px 12px; color: var(--muted); font-size: 13.5px; }
.cal-entry { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 9px 12px; border: 0; border-top: 1px solid var(--grid); background: none; color: inherit;
  font: inherit; text-align: left; cursor: pointer; }
.item-day + .cal-entry { border-top: 0; }
.cal-entry:hover { background: var(--head); }
.cal-time { flex: none; width: 60px; font: 600 13px/1.55 var(--cond); color: var(--muted); }
.cal-entry .pip { width: 9px; height: 9px; margin-top: 6px; }
.cal-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-title { font-weight: 600; overflow-wrap: anywhere; }
.cal-detail { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.cal-clash { margin-top: 2px; color: var(--red); font-size: 13px; font-weight: 500; }
.cal-note { margin-top: -8px; }
.who-list, .day-ticks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.daybox.wide { height: auto; min-height: 34px; padding: 6px 10px; line-height: 1.3; }
.plain-list { margin: 10px 0 0; padding-left: 18px; }
.plain-list li { margin: 2px 0; }
.item-kind.live { color: var(--green-deep); }

/* ---------- money: the pace lines on Income, and its views ---------- */
.income-views { padding-bottom: 12px; }
.pace-box { margin: -2px 0 12px; }
.pace-box:empty { display: none; }
.pace { margin: 0 0 6px; max-width: 96ch; color: var(--muted); font-size: 13.5px; }
.pace b { color: var(--text); }
.pace.behind b { color: #8a4b00; }
.pay-sum-list { margin-top: 12px; }
@media (max-width: 480px) {
  .week { padding: 4px 6px 8px; }
  .week-days { gap: 3px; }
  .week-day { min-height: 64px; }
  .cal-day { min-height: 54px; }
  .cal-time { width: 54px; }
}

/* ---------- 1.6: the calendar's toolbar, a day drawn hour by hour, how far a change reaches, notices ---------- */
:root { --k-other: #2f8f9d; --k-task: #8a7a2f;
  --kt-consult: #e2f2fd; --kt-lesson: #d6e1fb; --kt-standard: #fdf1b8; --kt-call: #eeeafc; --kt-bt: #fde3c8; --kt-checkin: #f2d3c1; --kt-meeting: #e0d1f5; --kt-other: #dff0f2; --kt-task: #f1eedc; --kt-off: #ececea;
  --ev-fg: #1d2027; }
.pip.ck-other { background: var(--k-other); }
.pip.ck-task { background: var(--k-task); border-radius: 50%; }
.cal-bar { row-gap: 8px; }
.cal-bar .btn.small { height: 34px; }
.cal-view { height: 34px; padding: 0 8px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; font: inherit; font-weight: 500; }
.cal-search { width: 200px; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; font: inherit; }
.cal-search::placeholder { color: var(--faint); }
.goto-box { min-width: 230px; padding: 12px; }
.goto-box .btn-row { margin: 10px 0 0; }
.cal-keys { margin: 4px 0 0; }

/* a row in a list: when it ends sits under when it starts */
.cal-time { display: flex; flex-direction: column; width: 70px; }
.cal-until { font: 500 11.5px/1.3 var(--cond); color: var(--faint); }
.cal-found { margin-bottom: 20px; }
.cal-jump { display: block; width: 100%; padding: 7px 12px 5px; border: 0; border-top: 1px solid var(--grid); background: var(--head); color: #45484f; font: 600 12.5px var(--cond);
  text-align: left; cursor: pointer; }
.cal-jump:hover, .cal-jump:focus-visible { text-decoration: underline; }

/* the month: a few lines of what is on each day on a wide screen, marks alone on a phone */
.cal-lines { display: none; }
@media (min-width: 900px) {
  .calv-month .cal-day { align-items: stretch; min-height: 108px; padding: 4px 5px 5px; text-align: left; }
  .calv-month .cal-day .cal-num { align-self: flex-start; }
  .calv-month .cal-day .pips, .calv-month .cal-day .cal-n { display: none; }
  .cal-lines { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .cal-line { padding: 1px 5px; border-left: 3px solid var(--k-off); border-radius: 3px; background: var(--kt-off); color: var(--ev-fg); font-size: 12px; line-height: 1.35;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .cal-line.more { border-left-color: transparent; background: none; color: var(--muted); }
}

/* a day, three days or a week, hour by hour */
.tg { --gut: 46px; }
.tg-head, .tg-all, .tg-body { display: grid; grid-template-columns: var(--gut) repeat(7, minmax(0, 1fr)); }
.tg-1 .tg-head, .tg-1 .tg-all, .tg-1 .tg-body { grid-template-columns: var(--gut) minmax(0, 1fr); }
.tg-3 .tg-head, .tg-3 .tg-all, .tg-3 .tg-body { grid-template-columns: var(--gut) repeat(3, minmax(0, 1fr)); }
.tg-head { border-bottom: 1px solid var(--grid); background: var(--head); }
.tg-gutter { padding: 7px 5px 4px 2px; font: 600 11px/1.2 var(--cond); color: var(--muted); text-align: right; }
.tg-dayhead { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 5px 0; border: 0; border-left: 1px solid var(--grid); background: none; color: inherit;
  font: inherit; cursor: pointer; }
.tg-dayhead:hover .tg-num { box-shadow: inset 0 0 0 1px var(--ink); }
.tg-dow { font: 600 11.5px/1 var(--cond); color: var(--muted); }
.tg-num { min-width: 26px; height: 26px; border-radius: 13px; font: 600 15px/26px var(--font); text-align: center; }
.tg-dayhead.today .tg-num { background: var(--green-deep); color: #fff; }
.tg-dayhead.off { background-image: repeating-linear-gradient(135deg, rgba(0, 0, 0, .055) 0 5px, transparent 5px 10px); }
.tg-all { border-bottom: 1px solid var(--grid); }
.tg-allcol { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 3px 2px; border-left: 1px solid var(--grid); }
.tg-chip { display: block; width: 100%; min-width: 0; padding: 2px 5px; border: 0; border-left: 3px solid var(--k-off); border-radius: 3px; background: var(--kt-off); color: var(--ev-fg);
  font: 500 12px/1.4 var(--font); text-align: left; cursor: pointer; }
.tg-chip span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-pre { font-style: normal; }
.form-row.every-row { grid-template-columns: 96px minmax(0, 1fr); align-items: end; }       /* "Every 2 weeks" reads as one line, on a phone too */
.tg-chip.clash, .tg-ev.clash { outline: 2px solid var(--red); outline-offset: -2px; }
.tg-scroll { max-height: min(64vh, 660px); overflow-y: auto; overscroll-behavior: contain; }
.tg-body { position: relative; }
.tg-hours { position: relative; }
.tg-hour { position: absolute; right: 5px; transform: translateY(-50%); font: 500 11px/1 var(--cond); color: var(--muted); }
.tg-col { position: relative; min-width: 0; border-left: 1px solid var(--grid); background-image: linear-gradient(to bottom, var(--grid) 1px, transparent 1px); background-size: 100% 44px; cursor: cell; }
.tg-col.today { background-color: rgba(46, 158, 87, .05); }
.tg-ev { position: absolute; display: flex; flex-direction: column; min-width: 0; padding: 2px 5px 2px 6px; border: 0; border-left: 3px solid var(--k-off); border-radius: 4px;
  background: var(--kt-off); color: var(--ev-fg); font: inherit; text-align: left; overflow: hidden; cursor: pointer; box-shadow: 0 0 0 1px var(--surface); }
.tg-ev:hover { filter: brightness(.97); }
.tg-ev-time { flex: none; font: 600 11px/1.35 var(--cond); opacity: .8; white-space: nowrap; }
.tg-ev-title { font: 600 12.5px/1.25 var(--font); overflow: hidden; overflow-wrap: anywhere; }
.tg-ev-detail { font-size: 11.5px; line-height: 1.25; opacity: .8; overflow: hidden; overflow-wrap: anywhere; }
.tg-ev.short { flex-direction: row; align-items: baseline; gap: 5px; }
.tg-ev.short .tg-ev-title, .tg-ev.snug .tg-ev-title { white-space: nowrap; text-overflow: ellipsis; }
.tg-ev.dragging { z-index: 6; opacity: .9; box-shadow: 0 6px 16px rgba(0, 0, 0, .28); }
.tg-grip { position: absolute; left: 0; right: 0; bottom: 0; height: 7px; }
.tg-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--red); pointer-events: none; z-index: 3; }
.tg-now::before { content: ''; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.tg-ghost { position: absolute; left: 2px; right: 2px; padding: 2px 6px; border: 1.5px dashed var(--ink); border-radius: 4px; color: var(--muted); font: 600 11px/1.4 var(--cond); pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .tg-ev.may { cursor: grab; }
  .tg-ev.dragging { cursor: grabbing; }
  .tg-grip { cursor: ns-resize; }
}
.tg-ev.ck-consult, .tg-chip.ck-consult, .cal-line.ck-consult { border-left-color: var(--k-consult); background: var(--kt-consult); }
.tg-ev.ck-lesson, .tg-chip.ck-lesson, .cal-line.ck-lesson { border-left-color: var(--k-lesson); background: var(--kt-lesson); }
.tg-ev.ck-standard, .tg-chip.ck-standard, .cal-line.ck-standard { border-left-color: var(--k-standard); background: var(--kt-standard); }
.tg-ev.ck-call, .tg-chip.ck-call, .cal-line.ck-call { border-left-color: var(--k-call); background: var(--kt-call); }
.tg-ev.ck-bt, .tg-chip.ck-bt, .cal-line.ck-bt { border-left-color: var(--k-bt); background: var(--kt-bt); }
.tg-ev.ck-checkin, .tg-chip.ck-checkin, .cal-line.ck-checkin { border-left-color: var(--k-checkin); background: var(--kt-checkin); }
.tg-ev.ck-meeting, .tg-chip.ck-meeting, .cal-line.ck-meeting { border-left-color: var(--k-meeting); background: var(--kt-meeting); }
.tg-ev.ck-other, .tg-chip.ck-other, .cal-line.ck-other { border-left-color: var(--k-other); background: var(--kt-other); }
.tg-chip.ck-task, .cal-line.ck-task { border-left-color: var(--k-task); background: var(--kt-task); }

/* the boxes: how far a change reaches, how something repeats, a pack's lessons */
.scope-box { display: grid; gap: 8px; }
.scope-btn { display: flex; flex-direction: column; gap: 2px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit;
  font: inherit; text-align: left; cursor: pointer; }
.scope-btn:hover, .scope-btn:focus-visible { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.scope-btn b { font-weight: 600; }
.scope-btn span { color: var(--muted); font-size: 13px; }
.more-fields { padding-top: 8px; border-top: 1px dashed var(--line); }
.more-fields summary { margin-bottom: 8px; color: var(--muted); font-size: 13.5px; cursor: pointer; }
.repeat-custom { display: grid; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.repeat-custom[hidden] { display: none; }
.repeat-custom .field[hidden] { display: none; }
.pack-usual { margin: 0 0 10px; }
.pack-list .item-kind { width: 76px; }
.pack-reset { margin: 0; padding: 10px 12px; border-top: 1px solid var(--grid); }
/* the Skipped pop-up: reschedule on top, and under a line the one-tap way to push every lesson a week */
.skip-or { display: grid; gap: 8px; margin-top: 4px; padding-top: 12px; border-top: 1px solid var(--grid); }
.skip-or .field-hint { margin: 0; }
/* a pop-up opened by a date typed on another page says the day is kept however it is closed */
.keep-note { margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); }

/* notices: on top of Home, a mark on the menu button, a row under the pages in the menu */
.notices { margin-bottom: 14px; padding: 8px; border: 1px solid #e9c9a0; border-radius: 8px; background: #fff6e9; }
.notices[hidden] { display: none; }
.notices-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 8px; color: #8a4b00; }
.notices .items { border-color: #e9c9a0; }
.notices .week-more { border-top: 0; }
.notice.read .item-title { color: var(--muted); font-weight: 500; }
.nav-btn { position: relative; }
.nav-dot { display: none; position: absolute; top: 5px; right: 4px; width: 9px; height: 9px; border-radius: 50%; background: #f0655a; box-shadow: 0 0 0 2px var(--ink); }
.nav-btn.has-note .nav-dot { display: block; }
.nav-note { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; margin-top: 3px; padding: 0 12px; border: 0; border-top: 1px solid var(--line); background: none;
  color: var(--text); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.nav-note .icon { color: var(--muted); }
.nav-note:hover, .nav-note:focus-visible { background: #eef0ea; }
.nav-note-n { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 10px; background: #f0655a; color: #fff; font: 600 12px/20px var(--cond); text-align: center; }
.cal-lengths .form-note { margin: 0 0 4px; }

@media (max-width: 640px) {
  .cal-bar .stepper { flex: 1 1 100%; }
  .cal-bar .stepper-label { flex: 1; min-width: 0; }
  .cal-view { flex: 1 1 96px; }
  .cal-search { flex: 1 1 100%; order: 5; width: auto; }
  .cal-bar .btn.primary { margin-left: auto; }
  .cal-time { width: 66px; }
  .calendar .chips.wrap { flex-wrap: nowrap; overflow-x: auto; margin-right: -14px; padding-right: 14px; }      /* one row to swipe, to leave the calendar the room */
  .tg { --gut: 36px; }
  .tg-scroll { max-height: 60vh; }
  .tg-hour { right: 3px; font-size: 10.5px; }
  .tg-gutter { padding-right: 3px; font-size: 10px; }
  .tg-7 .tg-ev { padding: 1px 2px 1px 3px; border-left-width: 2px; }
  .tg-7 .tg-ev-time, .tg-7 .tg-ev-detail { display: none; }
  .tg-7 .tg-ev-title { font-size: 10.5px; line-height: 1.15; }
  .tg-7 .tg-ev.short .tg-ev-title, .tg-7 .tg-ev.snug .tg-ev-title { white-space: normal; }
  .tg-7 .tg-chip { padding: 2px 3px; border-left-width: 2px; font-size: 10.5px; }
  .tg-7 .tg-num { min-width: 24px; height: 24px; border-radius: 12px; font-size: 13.5px; line-height: 24px; }
  .tg-3 .tg-ev-detail { display: none; }
  .tg-7 .tg-pre { display: none; }                 /* seven columns on a phone: the grey chip says "off", the name is what there is room for */
  .scope-btn { padding: 12px; }
  .pack-list .item-kind { order: 0; flex-basis: 100%; width: auto; margin-left: 0; }      /* the lesson's number on top, its day and time under it, Change beside them */
  .pack-list .item-main { order: 1; flex: 1 1 0; }
  .pack-list .item-acts { order: 2; }
}

/* ---------------------------------------------------------------- 1.8: this device, with or without a connection */

/* The mark at the top is a button now. Saved and Saving are the tracker's; Offline, "3 to send" and "1 needs a look"
   are this device's own, and the box behind the button lists them. */
button.save-state { border: 0; background: none; padding: 5px 7px; margin-right: 2px; border-radius: var(--r); white-space: nowrap; cursor: pointer; }
button.save-state:hover { background: rgba(255, 255, 255, .09); }
.save-state.has-queue { color: #f3d27a; }
.save-state.offline.has-queue { color: #ffab9e; }
.save-state.look { padding: 5px 9px; background: #c0392f; color: #fff; }
button.save-state.look:hover { background: #a93027; }

.outbox { display: grid; gap: 8px; min-width: 0; }
.ob-state { margin: 0; color: #3d4046; }
.ob-state.off b { color: var(--red); }
.ob-title { margin: 8px 0 0; font: 600 14px var(--font); }
.outbox .field-hint { margin: 0; }
.ob-row { display: grid; gap: 4px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-width: 0; }
.ob-row.look { border-color: #e4b5b0; background: #fdf4f3; }
.ob-what { display: grid; gap: 1px; min-width: 0; }
.ob-what b { font-weight: 600; overflow-wrap: anywhere; }
.ob-fields, .ob-when, .ob-tail { color: var(--muted); font-size: 12.5px; }
.ob-why { margin: 2px 0 0; color: #8a1c1c; font-size: 13.5px; }
.ob-pair { display: grid; gap: 2px; margin: 4px 0 0; font-size: 13.5px; }
.ob-pair dt { font-weight: 600; }
.ob-pair dd { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; margin: 0; }
.ob-pair dd span { color: var(--muted); }
.ob-pair dd b { font-weight: 500; overflow-wrap: anywhere; white-space: pre-wrap; }
.ob-tail { margin: 0; }
.ob-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; margin-top: 4px; }

.dev-row { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 4px 14px; padding: 10px 12px; border-top: 1px solid var(--grid); }
.dev-row:first-child { border-top: 0; }
.dev-k { color: var(--muted); font-size: 13.5px; }
.dev-v { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.dev-v b { font-weight: 600; }
.dev-v > span { max-width: 68ch; color: var(--muted); font-size: 13px; }
.auth-card .auth-lead + .auth-msg { color: var(--muted); }

@media (max-width: 700px) {
  .save-state .wide-only { display: none; }      /* a phone has room for "3 to send", not for "Offline, 3 to send" */
}
@media (max-width: 640px) {
  .dev-row { grid-template-columns: minmax(0, 1fr); }
}

/* ==== 1.8.2 ==== */

/* ---------------------------------------------------------------- 1.8.2: two-step login for everyone, and its QR code */

/* The code a phone's camera reads. Always dark squares on white with a blank border, in either look: cameras need it. */
.two-qr { display: flex; justify-content: center; margin: 10px 0 2px; }
.two-qr .qr { display: block; width: 184px; height: 184px; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.two-hint { margin: 8px 0 0; }
/* the card a login lands on when the owner requires two-step login and it has none yet */
.auth-card.two-card { max-width: 430px; }
.auth-card.two-card > .btn.ghost { justify-self: center; }
/* the owner's switch, above the list of logins: the same box as the one under Two-step login */
.must-two { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.must-two p { flex: 1 1 260px; max-width: 76ch; }
.must-two b { font-weight: 600; }

/* ---------------------------------------------------------------- 1.8.2: a layout for computers */

/* The pages as a row of tabs under the top bar. The row is in the page on every device and shown from 1000px wide. */
.tabs { display: none; }

@media (min-width: 1000px) {
  .tabs { flex: none; display: flex; align-items: stretch; gap: 2px; height: 40px; padding: 0 18px; overflow-x: auto; scrollbar-width: none;
    border-bottom: 1px solid var(--line); background: var(--surface); }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); font: 500 14px/1 var(--font);
    text-decoration: none; white-space: nowrap; }
  .tab .icon { color: var(--faint); }
  .tab:hover { background: var(--head); color: var(--text); }
  .tab:focus-visible { outline-offset: -2px; }
  .tab.on { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--green-deep); }
  .tab.on .icon { color: var(--green-deep); }
  .tab-n { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--ink); color: #fff; font: 600 11.5px/18px var(--cond); text-align: center; }
  .tab-n:empty { display: none; }

  /* every page takes the whole width of the window */
  .page, .page.wide, .page.home { max-width: none; padding: 20px 28px 48px; }
  .toolbar { padding-left: 18px; padding-right: 18px; }
  .toolbar.flat { padding-left: 0; padding-right: 0; }
  .stats { padding-left: 18px; padding-right: 18px; }

  /* Home: the week on the left, the month's bar and the pages on the right */
  .page.home { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 22px; align-items: start; }
  .page.home > .notices { grid-column: 1 / -1; grid-row: 1; }
  .page.home > .week { grid-column: 1; grid-row: 2 / span 3; margin-bottom: 0; }
  .page.home > .home-meter { grid-column: 2; grid-row: 2; }
  .page.home > .home-tiles { grid-column: 2; grid-row: 3; }
  .page.home .tile-split { display: contents; }
  .page.home .tile-nav.half { padding: 12px 14px; }
  .page.home .tile-nav.half .tile-nav-label { font-size: 17px; }
  .page.home .home-tiles > .tile-nav:last-child:nth-child(odd) { grid-column: auto; min-height: 108px; }

  /* Tasks: what needs doing on the left, the next two weeks on the right */
  .view-tasks .page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 32px; align-items: start; }
  .view-tasks .page > .page-head { grid-column: 1 / -1; grid-row: 1; }
  .view-tasks .page > section:nth-of-type(1) { grid-column: 1; grid-row: 2; }
  .view-tasks .page > section:nth-of-type(2) { grid-column: 1; grid-row: 3; }
  .view-tasks .page > section:nth-of-type(3) { grid-column: 2; grid-row: 2 / span 3; }

  /* Team: people side by side */
  .team { grid-template-columns: repeat(auto-fit, minmax(540px, 1fr)); align-items: start; }

  /* Calendar: the month on the left and the day that is picked on the right, where a map of the day can go next */
  .page.calendar { max-width: none; padding: 20px 28px 48px; }
  .page.calendar:has(> .calv-month:not([hidden])) { display: grid; grid-template-columns: minmax(0, 1fr) clamp(330px, 27%, 480px); column-gap: 22px; align-items: start; }
  .page.calendar:has(> .calv-month:not([hidden])) > * { grid-column: 1 / -1; min-width: 0; }
  .page.calendar:has(> .calv-month:not([hidden])) > .cal-box { grid-column: 1; }
  .page.calendar:has(> .calv-month:not([hidden])) > .cal-box + div { grid-column: 2; position: sticky; top: 0; }
  .calv-month .cal-day { min-height: clamp(108px, calc((100vh - 330px) / 6), 190px); }
  .tg-scroll { max-height: max(420px, calc(100vh - 300px)); }

  /* Account: the business's settings, the team's logins, your own login and the records, side by side */
  .page.acct { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto 1fr auto; column-gap: 36px; align-items: start; }
  .page.acct > .page-head { grid-column: 1 / -1; grid-row: 1; }
  .page.acct > .acct-a { grid-column: 1; grid-row: 2 / span 4; min-width: 0; }
  .page.acct > .acct-b { grid-column: 2; grid-row: 2; min-width: 0; }
  .page.acct > .acct-c { grid-column: 2; grid-row: 3; min-width: 0; }
  .page.acct > .acct-d { grid-column: 2; grid-row: 4; min-width: 0; }
  .page.acct > .about { grid-column: 1 / -1; grid-row: 6; }
  .page.acct-me { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 36px; align-items: start; }
  .page.acct-me > .page-head, .page.acct-me > .scope-note, .page.acct-me > .about { grid-column: 1 / -1; }
  .page.acct-me > div { min-width: 0; }

  /* Board & Train: more waves across */
  .waves { grid-template-columns: repeat(auto-fill, minmax(430px, 1fr)); }
}

/* a narrow computer window: the tabs keep their words and drop their pictures */
@media (min-width: 1000px) and (max-width: 1159px) {
  .tab { padding: 0 9px; }
  .tab .icon { display: none; }
}

/* a big monitor: Account gets a third column, and Home's week stays readable */
@media (min-width: 1700px) {
  .page.acct { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .9fr); grid-template-rows: auto auto auto 1fr auto; }
  .page.acct > .acct-a { grid-row: 2 / span 3; }
  .page.acct > .acct-b { grid-column: 2; grid-row: 2; }
  .page.acct > .acct-d { grid-column: 2; grid-row: 3; }
  .page.acct > .acct-c { grid-column: 3; grid-row: 2 / span 3; }
  .page.acct > .about { grid-row: 5; }
  .page.home > .home-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==== 1.9.0 ==== */

/* ---------------------------------------------------------------- 1.9.0: addresses, and the day on a map */

/* a small action inside a line of words */
.linklike { padding: 0; border: 0; background: none; color: var(--green-deep); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike:hover { color: var(--text); }

/* The address of a calendar entry, on its own line under it. It is a button of its own: the entry above opens the
   entry, the address opens a maps app. Its empty first cell is the time column, so the address sits under the name. */
.cal-where { display: flex; align-items: flex-start; gap: 10px; width: 100%; margin-top: -5px; padding: 0 12px 9px; border: 0; background: none;
  color: var(--muted); font: inherit; font-size: 13px; line-height: 1.4; text-align: left; cursor: pointer; }
.cal-where .cal-time { height: 1px; }
.cal-where .icon { flex: none; margin: 2px -2.5px 0; }
.cal-where-text { flex: 1; min-width: 0; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.cal-where:hover .cal-where-text, .cal-where:focus-visible .cal-where-text { color: var(--text); text-decoration-color: currentColor; }
.week-list .cal-where { padding: 0 6px 8px; }

/* "Map my day": one button on the Calendar page. On a computer the panel is beside the calendar instead. */
.cal-mapbar { display: flex; margin: 0 0 12px; }
.cal-mapbar .btn { flex: 1; height: 38px; }
.cal-side { display: none; }

/* The panel: whose day, the drawn map, the button for the whole day, and the stops in order. */
.myday { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.myday-head { display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--grid); }
.myday-head h3 { margin: 0 6px 0 0; font: 600 15px/1.2 var(--font); }
.myday-date { color: var(--muted); font: 600 13px/1.2 var(--cond); }
.myday-head .spacer { flex: 1; }
.myday-frame { display: block; width: 100%; height: 300px; border: 0; background: var(--head); }
.myday-nomap { margin: 0; padding: 12px; background: var(--head); color: var(--muted); font-size: 13px; line-height: 1.45; }
.myday-mapnote { margin: 0; padding: 6px 12px; }
.myday-none { margin: 0; padding: 14px 12px; color: var(--muted); }
.myday-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 12px 4px; }
.myday-acts .btn { height: 38px; padding: 0 14px; font-weight: 600; }
.myday-list { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: stop; }
.myday-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 8px; padding: 9px 12px; border-top: 1px solid var(--grid); }
.myday-list li > * { grid-column: 2; min-width: 0; }
.myday-stop { counter-increment: stop; }
.myday-stop::before { content: counter(stop); grid-column: 1; grid-row: 1 / span 3; align-self: start; width: 22px; height: 22px; border-radius: 50%;
  background: var(--head); color: var(--text); font: 600 12.5px/22px var(--cond); text-align: center; }
.myday-stop.unplaced::before { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.myday-when { display: flex; align-items: center; gap: 6px; color: var(--muted); font: 600 12.5px/1.5 var(--cond); }
.myday-what { display: flex; flex-direction: column; }
.myday-what b { font-weight: 600; overflow-wrap: anywhere; }
.myday-what span { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.myday-where { display: flex; align-items: flex-start; gap: 6px; margin-top: 3px; padding: 5px 0; border: 0; background: none; color: var(--green-deep);
  font: inherit; font-size: 13.5px; line-height: 1.4; text-align: left; cursor: pointer; }
.myday-where .icon { flex: none; margin-top: 2px; }
.myday-where span { overflow-wrap: anywhere; text-decoration: underline; text-underline-offset: 3px; }
.myday-nowhere { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; color: var(--muted); font-size: 13px; }
.myday-home > .icon { grid-column: 1; grid-row: 1 / span 2; align-self: start; margin: 2px 0 0 3px; color: var(--muted); }
.myday-home .linklike { justify-self: start; font-size: 13px; }
.myday-home .daybox { justify-self: start; height: auto; padding: 0; border: 0; background: none; }
.myday-foot { margin: 0; padding: 10px 12px 12px; border-top: 1px solid var(--grid); }

/* On a phone the panel fills the sheet: no frame of its own, and a map tall enough to read. */
.drawer-body.myday-sheet { padding: 0 0 calc(20px + env(safe-area-inset-bottom)); }
.myday.in-sheet { border: 0; border-radius: 0; background: none; }
.myday.in-sheet .myday-frame { height: min(38vh, 320px); }

/* Under Account: a login's Home, and the owner's key for the drawn map. */
.home-box p, .mapkey-box p { max-width: 76ch; }
.home-box b { font-weight: 600; overflow-wrap: anywhere; }
.mapkey-box .field { max-width: 460px; margin: 10px 0; }
.mapkey-box code { font: 600 13px var(--cond); }

@media (min-width: 1000px) {
  /* The calendar and, beside it, the picked day and its map. The column stays in view while a long page scrolls. */
  .page.calendar.has-map { display: grid; grid-template-columns: minmax(0, 1fr) clamp(330px, 27%, 480px); column-gap: 22px; align-items: start; grid-auto-flow: row dense; }
  .page.calendar.has-map > * { grid-column: 1 / -1; min-width: 0; }
  .page.calendar.has-map > .cal-mapbar { display: none; }
  .page.calendar.has-map > .cal-box, .page.calendar.has-map > .cal-box + div { grid-column: 1; }
  .page.calendar.has-map > .cal-box + div:empty { display: none; }
  .page.calendar.has-map > .cal-side { display: flex; flex-direction: column; gap: 14px; grid-column: 2; grid-row: span 2; position: sticky; top: 0;
    max-height: calc(100vh - 118px); overflow-y: auto; scrollbar-width: thin; }
  .cal-side-day:empty { display: none; }
  .cal-side-day .cal-list { margin-bottom: 0; }
  .cal-mapbar .btn { flex: none; }
  .myday-frame { height: clamp(240px, 34vh, 380px); }
}

/* ==== 1.10.0 ==== */

/* ---------------------------------------------------------------- 1.10.0 */

/* words that say why something can't be done, inside a hint */
.warn-text { color: #8a4b00; font-weight: 500; }

/* The calendar's keyboard keys, as key caps, on a screen wide enough to have a keyboard. A phone keeps the small line of
   words it always had (.cal-keys-text), so nothing on it moves. */
.cal-keys-text { margin: 4px 0 0; }
.cal-keys { display: none; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); font-size: 13.5px; color: var(--text); }
.cal-keys-title { font-weight: 600; margin-right: 2px; }
.cal-key { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cal-key kbd { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; border: 1px solid #b9bdb4; border-bottom-width: 2px;
  border-radius: 5px; background: #fff; color: var(--ink); font: 600 13px/1 var(--font); }

@media (min-width: 721px) { .cal-keys { display: flex; } .cal-keys-text { display: none; } }      /* a phone keeps its one small line */

/* The conflict box: what a booking runs into, one block for each. */
.clash-box { display: grid; gap: 10px; }
.clash-box .modal-text, .clash-box .field-hint { margin: 0; }
.clash-item { display: grid; gap: 3px; padding: 10px 12px; border: 1px solid #e6b8b3; border-left: 4px solid var(--red); border-radius: 8px; background: #fdf3f2; }
.clash-who { font-weight: 600; }
.clash-note, .clash-what { color: #3d4046; font-size: 13.5px; }
.ob-clash { margin: 2px 0 0; font-size: 13.5px; }

/* A lesson already given stays on the calendar, drawn quieter, with a tick. So does what a Lost or Cold lead left. */
.cal-entry.done .cal-title, .cal-entry.gone .cal-title { color: var(--muted); font-weight: 500; }
.cal-entry.done .cal-title::before { content: '\2713\00a0'; }
.cal-entry.done .pip, .cal-entry.gone .pip { opacity: .45; }
.cal-entry.gone .cal-title { text-decoration: line-through; text-decoration-color: var(--line); }
.tg-ev.done, .tg-chip.done, .tg-ev.gone, .tg-chip.gone { opacity: .55; }
.tg-ev.done .tg-ev-title::before { content: '\2713\00a0'; }

/* The six colors a task's title can be written in. */
.task-tone-blue { color: #2a5fc9; }
.task-tone-yellow { color: #8a6a00; }
.task-tone-orange { color: #c25e00; }
.task-tone-red { color: #b3261e; }
.task-tone-green { color: #1f7a41; }
.task-tone-lavender { color: #6b4fc4; }
.task-bg-blue { background: #2a5fc9; }
.task-bg-yellow { background: #d9a400; }
.task-bg-orange { background: #e8780c; }
.task-bg-red { background: #b3261e; }
.task-bg-green { background: #2e9e57; }
.task-bg-lavender { background: #8a6fe0; }
input.task-tone-blue, input.task-tone-yellow, input.task-tone-orange, input.task-tone-red, input.task-tone-green, input.task-tone-lavender { font-weight: 600; }

/* The task box: titles to tap under "What needs doing", and the color for the title. */
.task-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.task-preset { height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 13px var(--font); cursor: pointer; }
.task-preset:hover, .task-preset:focus-visible { border-color: currentColor; }
.task-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.task-color { width: 30px; height: 30px; padding: 0; border: 2px solid transparent; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.task-color.auto { width: auto; padding: 0 11px; border-radius: 999px; background: var(--surface); color: var(--text); font: 500 13px var(--font); }
.task-color.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--ink); }
.task-color.auto.on { border-color: transparent; background: var(--ink); color: #fff; box-shadow: none; }

/* A client's card: the trainer button, the dog boxes, and the status, package and dates of each lead. */
.card-trainer { margin-left: auto; }
.card-trainer b { font-weight: 600; }
.card-dogs { display: grid; gap: 6px; }
.card-work { display: grid; gap: 10px; }
.card-work > .quiet { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-work > .card-row { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-lead { display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-lead-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.card-lead-head .quiet { font-size: 13px; }
.card-lead-acts { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.card-lead .form-note, .card-lead .form-msg { margin: 0; }
.card-new { border-style: dashed; }
.addr { display: grid; gap: 12px; }

/* the three explanations under the months ahead: one to a line */
.ahead-what { display: grid; gap: 4px; margin-top: 10px; }
.ahead-what .field-hint.below { margin-top: 0; }

/* ==== 1.11.0 ==== */

/* ---------------------------------------------------------------- 1.11.0 */

/* a client's card: its two tabs, the dog cards, and what the client has bought */
.card-tabs { margin: 0 0 12px; }
.card-dogcards, .card-history { display: grid; gap: 8px; }
.card-dogcards > .card-row, .card-history > .card-row { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-dogcards > .quiet, .card-history > .quiet { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.card-dogadd { display: flex; flex-wrap: wrap; gap: 8px; }
/* a dog the tracker knows of whose card nobody has filled in yet */
.card-dogcards > .card-row.empty { border-style: dashed; background: transparent; }
.dog-shots { display: grid; gap: 8px; }
.dog-shot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.dog-shot .field { margin: 0; }
@media (max-width: 560px) {
  .dog-shot { grid-template-columns: 1fr 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--grid); }
  .dog-shot > .field:first-child { grid-column: 1 / -1; }
  .dog-shot > .btn { grid-column: 1 / -1; justify-self: end; }
}

/* Home: the rows of buttons he laid out (Leads and Clients; the services; Tasks, Income and Team; Account and Settings) */
.page.home > .home-tiles { grid-template-columns: minmax(0, 1fr); }
.tile-row { display: grid; gap: 12px; }
.tile-row.n1 { grid-template-columns: minmax(0, 1fr); }
.tile-row.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile-row.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tile-row.n4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile-row.n3 .tile-nav, .tile-row.n4 .tile-nav { padding-left: 10px; padding-right: 10px; }
/* three or four to a row are narrow on a phone: the line under the name wraps onto a second line, never cut short */
.tile-row .tile-nav-line { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
@media (max-width: 720px) { .tile-row { gap: 10px; } }

/* goals for every month: the months that were changed by hand, each with a tick box */
.every-own label { display: flex; align-items: center; gap: 8px; padding: 5px 0; }
.every-own input[type=checkbox] { width: 18px; height: 18px; flex: 0 0 auto; }

/* employee cards, under the trainers on the Team page */
.staff-cards { margin-top: 18px; }

/* changes made with no connection, looked over before they are sent */
.review-box { display: grid; gap: 10px; }
.rv-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.rv-row > input { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; }
.rv-main { flex: 1 1 auto; min-width: 0; }
.rv-line { margin-top: 3px; font-size: 13.5px; color: var(--muted); overflow-wrap: anywhere; }
.rv-line b, .rv-now { color: var(--text); }
.rv-now { font-weight: 600; }

/* ---- Account and Settings (1.11): on a computer one column in the middle, each section in a box of its own, and a list
   of the sections at the left that stays put while the page scrolls. On a phone the list is hidden and nothing else
   here applies: the page is the one column it always was. */
.set-nav { display: none; }
.set-col > div:empty { display: none; }
@media (min-width: 1000px) {
  .set-wrap { display: grid; grid-template-columns: 196px minmax(0, 760px); column-gap: 40px; justify-content: center; align-items: start; }
  .set-main { min-width: 0; }
  .set-nav { display: block; position: sticky; top: 0; max-height: calc(100vh - 150px); overflow-y: auto; padding: 58px 0 8px; }
  .set-nav-group { margin: 16px 0 4px; padding: 0 12px; color: var(--muted); font: 600 12.5px/1.3 var(--font); }
  .set-nav-group:first-child { margin-top: 0; }
  .set-nav-item { display: block; width: 100%; padding: 7px 12px; border: 0; border-left: 2px solid var(--line); border-radius: 0; background: none; color: var(--text);
    font: 500 14px/1.3 var(--font); text-align: left; cursor: pointer; }
  .set-nav-item:hover { background: var(--surface); }
  .set-nav-item.on { border-left-color: var(--green-deep); background: var(--surface); font-weight: 600; }
  .set-nav-item:focus-visible { outline: 2px solid var(--green-deep); outline-offset: -2px; }
  .set-col section.block { margin: 0 0 20px; padding: 0 18px 18px; border: 1px solid var(--line); border-radius: 10px; scroll-margin-top: 12px; }
  .set-col section.block:focus { outline: none; }
  .set-col section.block > .block-head { margin: 0 -18px 16px; padding: 11px 18px; min-height: 0; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; background: var(--surface); }
  .set-col section.block > .block-head h2 { font-size: 17px; }
}

/* ---- "Add a lesson client" and "Add a Board & Train client" (1.11): pick the lead who bought, then what they bought */
.sell-find { display: grid; gap: 6px; }
.sell-list { max-height: min(46vh, 330px); overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sell-lead { display: grid; gap: 3px; width: 100%; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--grid); border-radius: 0; background: none; color: var(--text);
  font: inherit; text-align: left; cursor: pointer; }
.sell-lead:last-child { border-bottom: 0; }
.sell-lead:hover { background: var(--head); }
.sell-lead:focus-visible { outline: 2px solid var(--green-deep); outline-offset: -2px; background: var(--head); }
.sell-name { font-weight: 600; overflow-wrap: anywhere; }
.sell-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--muted); font-size: 13px; }
.sell-none { margin: 0; padding: 12px; color: var(--muted); font-size: 13.5px; }
.sell-picked { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.sell-who { display: grid; gap: 3px; min-width: 0; }
.sell-picked > .btn { flex: 0 0 auto; }
.sell-pay { justify-self: start; }
.sell-pay .segctl-btn { min-width: 92px; height: 36px; }
.sell-day { display: flex; gap: 8px; align-items: center; min-width: 0; }
.field .sell-day input { flex: 1 1 0; width: 0; min-width: 0; }
.sell-day > .btn { flex: 0 0 auto; }

/* ==== 1.11.1 ==== */

/* ---------------------------------------------------------------- 1.11.1: task types */
/* pink, the seventh title color (Reviews) */
.task-tone-pink { color: #b0307a; }
.task-bg-pink { background: #d6498f; }
input.task-tone-pink { font-weight: 600; }
/* the Type row in the task box: one pill for each type, written in its own color */
.task-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.task-kind { height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: 600 13px var(--font); cursor: pointer; }
.task-kind.auto { color: var(--text); font-weight: 500; }
.task-kind:hover, .task-kind:focus-visible { border-color: currentColor; }
.task-kind.on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.task-kind.auto.on { border-color: var(--ink); background: var(--ink); color: #fff; box-shadow: none; }
/* the tabs on the Tasks page: All, then each type, with how many open tasks each holds */
.task-tabs { margin: 0 0 12px; }
.task-tab-name { font-weight: 600; }
.task-tab.on .task-tab-name { color: inherit; }
/* on a task's own line: the type it is filed under, when its title does not already say so */
.task-meta .task-type { font-weight: 600; }

/* ==== 1.12.0 ==== */

/* ---------------------------------------------------------------- 1.12: Home's row of four */
/* Group Classes, Private Lessons, Board & Train and Dog Boarding share one row. On a phone each is a narrow tile: the
   name wraps onto two lines and the line under it stays small. */
@media (max-width: 720px) {
  .tile-row.n4 { gap: 8px; }
  .tile-row.n4 .tile-nav { min-height: 112px; padding: 10px 7px; }
  .tile-row.n4 .tile-nav-top { margin-bottom: 0; }            /* the four names start on one line, whatever is written under each */
  .tile-row.n4 .tile-nav-label { margin-top: 8px; font-size: 13.5px; line-height: 1.2; overflow-wrap: anywhere; }
  .tile-row.n4 .tile-nav-line { font-size: 11.5px; line-height: 1.25; }
}

/* fourteen pages now: on a laptop the row of tabs keeps every name in reach by giving up a little room around each,
   and below 1400px its small pictures (a wide screen keeps them) */
@media (min-width: 1400px) and (max-width: 1559px) { .tab { gap: 5px; padding: 0 8px; } .tab .icon { width: 15px; height: 15px; } }
@media (min-width: 1160px) and (max-width: 1399px) { .tab { padding: 0 10px; } .tab .icon { display: none; } }
@media (min-width: 1000px) and (max-width: 1159px) { .tab { padding: 0 7px; font-size: 13.5px; } }

/* ---------------------------------------------------------------- 1.12: the calendar's two sides, and two new kinds on it */
:root { --k-class: #1e9a7a; --kt-class: #d5f1e8; --k-bdrop: #2e9e57; --kt-bdrop: #d9f0e0; --k-bpick: #e8780c; --kt-bpick: #fde3c8;
  --k-bstay: #3465d8; --kt-bstay: #d6e1fb; --k-bblock: #9a9da4; --kt-bblock: #ececea; }
.pip.ck-class { background: var(--k-class); }
.pip.ck-bdrop { background: var(--k-bdrop); }
.pip.ck-bpick { background: var(--k-bpick); }
.pip.ck-bstay { background: var(--k-bstay); }
.pip.ck-bblock { background: var(--k-bblock); }
.tg-ev.ck-class, .tg-chip.ck-class, .cal-line.ck-class { border-left-color: var(--k-class); background: var(--kt-class); }
.tg-ev.ck-bdrop, .tg-chip.ck-bdrop, .cal-line.ck-bdrop { border-left-color: var(--k-bdrop); background: var(--kt-bdrop); }
.tg-ev.ck-bpick, .tg-chip.ck-bpick, .cal-line.ck-bpick { border-left-color: var(--k-bpick); background: var(--kt-bpick); }
.tg-chip.ck-bstay, .cal-line.ck-bstay { border-left-color: var(--k-bstay); background: var(--kt-bstay); }
.tg-chip.ck-bblock, .cal-line.ck-bblock { border-left-color: var(--k-bblock); background: var(--kt-bblock); }
.cal-modebar { margin: 0 0 12px; }
.cal-mode .segctl-btn { min-width: 92px; }
.week > .cal-mode { display: flex; margin: 2px 0 8px; }
.week > .cal-mode .segctl-btn { flex: 1 1 0; }

/* ---------------------------------------------------------------- 1.12: Dog Boarding */
.board-tabs, .class-tabs { margin: 0 0 16px; }
.board-tabs button, .class-tabs button { min-width: 84px; }
.kennel-group + .kennel-group { margin-top: 14px; }
.kennel-h { margin: 0 0 6px; font: 600 12.5px var(--cond); letter-spacing: .01em; color: var(--muted); }
.kennels .legend { margin-top: 12px; }
/* a boarding dog's box: blue while it is here, green while it is on the way, orange on the day it goes home */
.slot.b-here, .sb-bar.b-here { background: var(--blue); }
.slot.b-in, .sb-bar.b-in { background: #58bd7d; }
.slot.b-out, .sb-bar.b-out { background: #f2a24b; }
.slot.b-past, .sb-bar.b-past { background: #c9cdd6; }
.slot.b-open { min-height: 66px; align-items: center; color: var(--muted); cursor: pointer; }
.slot.b-open:hover, .slot.b-open:focus-visible { border-color: var(--green-deep); color: var(--green-deep); }
.slot.b-open .slot-line:first-child { font: 600 13px var(--font); }
.stay-price { margin: -2px 0 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--head); font-weight: 600; }
.stay-price.bad { border-color: #e2b7b3; background: #fdf0ef; color: var(--red); font-weight: 500; }
.check-field { gap: 4px; }
/* the stay box picks its client from the boarding leads and everyone on the Clients list, in groups (his Dec 5 side note) */
.sell-group { margin: 0; padding: 8px 12px 5px; border-bottom: 1px solid var(--grid); background: var(--head); color: var(--muted); font-size: 12.5px; font-weight: 600; }
.sell-lead.dead { opacity: .62; }
.stay-box .sell-list { max-height: min(36vh, 262px); }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.check-line input { width: 18px; height: 18px; }
.board-income td, .board-income th { white-space: nowrap; }

/* the boarding calendar: each stay is a bar from its drop-off to its pick-up. A row is a run of days; each day is two
   columns wide, so a bar starts and ends in the middle of its day. */
.sb-acts { align-items: center; }
.sb-row { display: grid; grid-template-rows: 40px; grid-auto-rows: 22px; row-gap: 2px; padding-bottom: 4px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); overflow: hidden; }
.sb-day { display: flex; flex-wrap: wrap; align-content: flex-start; align-items: baseline; gap: 0 5px; min-width: 0; padding: 4px 5px; border: 0; border-left: 1px solid var(--grid);
  border-radius: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.sb-day:first-child { border-left: 0; }
.sb-day:hover { background: var(--head); }
.sb-day:focus-visible { outline: 2px solid var(--green-deep); outline-offset: -2px; }
.sb-dow { color: var(--muted); font: 600 12px var(--cond); }
.sb-num { font: 600 13.5px var(--font); }
.sb-day.today .sb-num { padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; }
.sb-n { margin-left: auto; color: var(--muted); font: 500 11.5px var(--cond); font-variant-numeric: tabular-nums; }
.sb-day.full .sb-n { color: #8a4b00; font-weight: 700; }
.sb-day.over .sb-n { color: var(--red); font-weight: 700; }
.sb-day.out { opacity: .45; }
.sb-day.closed { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(22, 23, 42, .07) 6px 12px); }
.sb-closed { flex-basis: 100%; color: #8a4b00; font: 600 11px var(--cond); }
.sb-bar { z-index: 1; display: flex; align-items: center; gap: 6px; min-width: 0; height: 22px; margin: 0; padding: 0 7px; border: 0; border-radius: 0; color: var(--ink);
  font: 600 12px/22px var(--font); text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; }
.sb-bar.starts { margin-left: 1px; border-top-left-radius: 11px; border-bottom-left-radius: 11px; }
.sb-bar.ends { margin-right: 1px; border-top-right-radius: 11px; border-bottom-right-radius: 11px; }
.sb-bar.unpaid { box-shadow: inset 0 -3px 0 #b3261e; }
.sb-bar:hover, .sb-bar:focus-visible { filter: brightness(.94); outline: 0; }
.sb-bar-name { overflow: hidden; text-overflow: ellipsis; }
.sb-bar-dog { flex: none; font-weight: 500; opacity: .85; }
.sb-more { z-index: 1; justify-self: start; height: 20px; margin: 0 4px; padding: 0 8px; border: 0; border-radius: 10px; background: var(--head); color: var(--muted);
  font: 600 11.5px/20px var(--cond); cursor: pointer; }
.sb-month { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.sb-month-h { margin: 0; padding: 9px 12px 7px; font: 600 15px/1.2 var(--font); }
.sb-dows, .gc-dows { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0 0 3px; color: var(--muted); font: 600 12px var(--cond); }
.sb-dows > span, .gc-dows > span { padding: 0 5px; }
.sb-month .sb-row { border: 0; border-top: 1px solid var(--line); border-radius: 0; grid-template-rows: 22px; }
.sb-row.small .sb-dow { display: none; }
.sb-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.sb-daylist .item-kind { width: 64px; }
@media (max-width: 720px) {
  .sb-two { grid-template-columns: minmax(0, 1fr); }              /* a phone has room for one month across: the second sits under the first */
  .sb-acts { width: 100%; }
  .sb-acts .stepper { flex: 1 1 100%; }
  .sb-acts .stepper-label { flex: 1; min-width: 0; }
  .sb-acts .cal-view { flex: 1 1 96px; }
  .sb-day { padding: 3px 2px; gap: 0 3px; }
  .sb-n { flex-basis: 100%; margin-left: 0; font-size: 10.5px; }
  .sb-row { grid-template-rows: 46px; }
  .sb-month .sb-row { grid-template-rows: 34px; }
  .sb-bar { padding: 0 4px; font-size: 11px; }
  .sb-bar-dog { display: none; }
  .board-tabs, .class-tabs { display: flex; }
  .board-tabs button, .class-tabs button { flex: 1 1 0; min-width: 0; padding: 0 6px; }
  .slot.b-open { min-height: 44px; }                               /* fifteen open slots are a long way to scroll at full height */
  .class-top .class-tabs { flex: 1 1 100%; }
}

/* ---------------------------------------------------------------- 1.12: Group Classes */
.class-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; }
.class-top .class-tabs { margin: 0; }
.gc-waves { grid-template-columns: minmax(0, 1fr); }
.gc-wave-open { padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.gc-wave-open:hover { text-decoration-color: currentColor; }
.gc-day + .gc-day { margin-top: 12px; }
.gc-day-h { margin: 0 0 6px; font: 600 12.5px var(--cond); color: var(--muted); }
.gc-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
.gc-class { display: flex; flex-direction: column; gap: 1px; min-width: 0; min-height: 84px; padding: 8px 10px; border: 0; border-left: 4px solid var(--k-class); border-radius: 6px;
  background: var(--kt-class); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.gc-class:hover, .gc-class:focus-visible { filter: brightness(.96); }
.gc-class.full { border-left-color: var(--orange); }
.gc-class-name { font: 600 14px/1.25 var(--font); overflow-wrap: anywhere; }
.gc-class-line { font-size: 12.5px; line-height: 1.3; }
.gc-class-seats { margin-top: auto; padding-top: 3px; font: 700 14px var(--cond); font-variant-numeric: tabular-nums; }
.gc-none p, .gc-loose .items { margin: 0 0 8px; }
.gc-loose { margin-bottom: 16px; }
.gc-loose .items { border: 0; }
/* the class calendar */
.gc-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.gc-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 120px; padding: 0 3px 6px; border-left: 1px solid var(--grid); }
.gc-col:first-child { border-left: 0; }
.gc-col-head { display: flex; align-items: baseline; gap: 5px; padding: 5px 3px 3px; }
.gc-dow { color: var(--muted); font: 600 12px var(--cond); }
.gc-num { font: 600 13.5px var(--font); }
.gc-col.today .gc-num, .gc-cell.today .gc-cell-num { padding: 0 6px; border-radius: 999px; background: var(--ink); color: #fff; }
.gc-meet { display: flex; flex-direction: column; min-width: 0; width: 100%; padding: 3px 5px; border: 0; border-left: 3px solid var(--k-class); border-radius: 3px; background: var(--kt-class);
  color: var(--ev-fg, var(--ink)); font: inherit; font-size: 12px; line-height: 1.3; text-align: left; cursor: pointer; }
.gc-meet.moved { border-left-style: dashed; box-shadow: inset 0 0 0 1px var(--k-class); }
.gc-meet.done { opacity: .6; }
.gc-meet-time { font: 600 11.5px var(--cond); }
.gc-meet-name { font-weight: 600; overflow-wrap: anywhere; }
.gc-meet-sub { color: var(--muted); font-size: 11.5px; }
.gc-month { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.gc-mrow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.gc-mrow.gc-dows { border-top: 0; }
.gc-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; min-height: 64px; padding: 3px; border-left: 1px solid var(--grid); }
.gc-cell:first-child { border-left: 0; }
.gc-cell.out { background: var(--head); }
.gc-cell.out .gc-cell-num { opacity: .45; }
.gc-cell-num { align-self: flex-start; font: 600 12.5px var(--font); }
.gc-cell .gc-meet { flex-direction: row; flex-wrap: wrap; gap: 0 4px; padding: 2px 4px; }
.gc-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
/* a wave's roster */
.gc-roster-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin: 0 0 6px; }
.gc-roster-h { margin: 0 0 2px; font: 600 19px/1.2 var(--font); }
.gc-roster-day { margin: 18px 0 8px; font: 600 15px var(--font); }
.gc-card { margin: 0 0 12px; padding: 12px 14px 14px; border: 1px solid var(--line); border-left: 4px solid var(--k-class); border-radius: 8px; background: var(--surface); }
.gc-card.full { border-left-color: var(--orange); }
.gc-card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 6px 14px; margin-bottom: 8px; }
.gc-card-h { margin: 0 0 1px; font: 600 16px/1.25 var(--font); }
.gc-card-side { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.gc-seats { padding: 2px 10px; border-radius: 999px; background: var(--kt-class); color: var(--ink); font: 700 14px/1.5 var(--cond); font-variant-numeric: tabular-nums; }
.gc-weeks { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 10px; }
.gc-weekbtn { display: inline-flex; align-items: baseline; gap: 5px; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--muted); font: 500 12px var(--cond); cursor: pointer; }
.gc-weekbtn b { color: var(--text); font-weight: 700; }
.gc-weekbtn.moved { border-color: var(--k-class); border-style: dashed; color: var(--text); }
.gc-weekbtn.done { opacity: .55; }
textarea.gc-notes { display: block; width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid #c6cac0; border-radius: var(--r); background: #fff; color: inherit;
  font: inherit; line-height: 1.45; resize: vertical; }
textarea.gc-notes:disabled { background: var(--head); color: var(--muted); }
.gc-students-head, .gc-student { display: grid; grid-template-columns: minmax(120px, 1.1fr) minmax(96px, .7fr) minmax(160px, 2.2fr) 34px; gap: 8px 10px; align-items: start; }
.gc-students-head { margin-top: 12px; padding: 0 0 4px; border-bottom: 1px solid var(--line); color: var(--muted); font: 600 12px var(--cond); }
.gc-student { padding: 8px 0; border-bottom: 1px solid var(--grid); }
.gc-student:last-child { border-bottom: 0; }
.gc-student-who { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.gc-student-who span { color: var(--muted); font-size: 13px; }
.gc-student-pay { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13px; }
.gc-students > .quiet { margin: 0; padding: 10px 0 0; }
@media (max-width: 720px) {
  .gc-week { grid-template-columns: minmax(0, 1fr); }
  .gc-col { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: 0; padding: 4px 8px 6px; border-left: 0; border-top: 1px solid var(--grid); }
  .gc-col:first-child { border-top: 0; }
  .gc-col-head { flex: 0 0 58px; padding: 0; }
  .gc-col .gc-meet { flex: 1 1 100%; }
  .gc-empty { flex: 1; }
  .gc-cell { min-height: 52px; padding: 2px 1px; }
  .gc-cell .gc-meet { padding: 1px 2px; font-size: 10.5px; }
  .gc-cell .gc-meet-name { display: none; }                         /* a phone's month has room for the time; the week and the roster have the names */
  .gc-students-head { display: none; }
  .gc-student { grid-template-columns: minmax(0, 1fr) auto 34px; }
  .gc-student .gc-notes { grid-column: 1 / -1; grid-row: 2; }
  .gc-card { padding: 10px 11px 12px; }
}
@media (min-width: 1000px) {
  .gc-waves { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------------------------------------------------------- the two looks (1.3)

   "Classic light" is every rule above this line.
   "Pixel dark" is the default: js/theme.js puts the class `dark` on <html>, and everything below hangs off it.

   Pixel dark is a calm dark screen first and pixel art second. The type is Barlow, as in Classic light. The colors
   are soft, the outlines one pixel thin. The pixel art is kept to small touches: the dog tag, a small picture for
   each page (on Home and in the menu), the dog on an empty list, the page's name in the top bar, a colored square
   on a package label, and boxes whose outline leaves the corner pixel out. */

@font-face { font-family: 'Jersey 10'; font-style: normal; font-weight: 100 900; font-display: swap; src: url('../fonts/jersey-10-latin-400-normal.woff2') format('woff2'); }

/* Chip colors by name. The screens ask for these; each look gives its own. First, Classic light. */
:root {
  --t-gray-bg: #e6e8e2; --t-gray-fg: #3a3d38;
  --t-new-bg: #e7dcfb; --t-new-fg: #47268a;
  --t-pre-bg: #e4e5e1; --t-pre-fg: #3a3d38;
  --t-post-bg: #d3e4fb; --t-post-fg: #1b4c8c;
  --t-unpaid-bg: #fbe9a9; --t-unpaid-fg: #6a4b00;
  --t-paid-bg: #c9ecd2; --t-paid-fg: #17642f;
  --t-lost-bg: #f8cdcd; --t-lost-fg: #8a1c1c;
  --t-cold-bg: #fbd8b3; --t-cold-fg: #7a3c00;
  --t-ads-bg: #f6d5ee; --t-ads-fg: #7a1a63;
  --t-organic-bg: #c6ece7; --t-organic-fg: #0e5c54;
  --t-referral-bg: #dbe9fd; --t-referral-fg: #1b4c8c;
  --t-archive-bg: #dcdfe6; --t-archive-fg: #3b4252;
  --t-assigned-bg: #e9e6dc; --t-assigned-fg: #4b4636;
  --t-guar-bg: #bfe8cb; --t-guar-fg: #125227;
  --t-proj-bg: #c4d8f8; --t-proj-fg: #173f7a;
  --t-hyp-bg: #e7effc; --t-hyp-fg: #3d5a8a;
}

/* the look picker, in both looks */
.look-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-width: 640px; }
.look-pick { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); text-align: left; }
.look-pick.on { border-color: var(--green-deep); box-shadow: inset 0 0 0 1px var(--green-deep); }
.look-text { display: grid; gap: 1px; min-width: 0; }
.look-text b { font-weight: 600; }
.look-text span { color: var(--muted); font-size: 13px; }
.look-swatch { flex: none; display: grid; grid-template-columns: repeat(3, 10px); gap: 3px; align-content: center; justify-content: center; width: 52px; height: 40px; border: 1px solid var(--line); }
.look-swatch i { height: 14px; }
.look-swatch i:nth-child(1) { background: #2e9e57; }
.look-swatch i:nth-child(2) { background: #6e9ce8; }
.look-swatch i:nth-child(3) { background: #e8780c; }
.look-swatch.light { background: #f3f4f1; border-radius: 6px; }
.look-swatch.light i { border-radius: 3px; }
.look-swatch.dark { background: #151729; border-color: #30355a; }
.look-swatch.dark i:nth-child(1) { background: #5ec795; }
.look-swatch.dark i:nth-child(2) { background: #7ea6f2; }
.look-swatch.dark i:nth-child(3) { background: #e9a15f; }

/* ================================================================ Pixel dark */

html.dark {
  color-scheme: dark;
  --ink: #0f1120;
  --paper: #151729;
  --surface: #1c1f35;
  --head: #232742;
  --raise: #2c3154;
  --line: #30355a;
  --grid: #272b48;
  --text: #e8e7e1;
  --muted: #a4a8c4;
  --faint: #8186aa;
  --green: #5ec795;
  --green-deep: #5ec795;
  --go: #3fae7c;
  --orange: #e9a15f;
  --blue: #7ea6f2;
  --hyp: #3a4275;
  --red: #f08080;
  --yellow: #e6c36a;
  --cream: #e8e7e1;
  --well: #121426;
  --r: 0px;
  /* the one place pixel lettering is used: the page's name beside the dog tag. Jersey 10 is drawn 56 squares to
     every 3 em, so this size puts exactly one screen pixel under each square. */
  --pixel: 'Jersey 10', 'Barlow', system-ui, sans-serif;
  --px: 18.667px;
  /* a one-pixel outline that leaves the corner pixel out: four hard shadows, one per side */
  --bd: -1px 0 0 0 var(--line), 1px 0 0 0 var(--line), 0 -1px 0 0 var(--line), 0 1px 0 0 var(--line);
  --bd-hi: -1px 0 0 0 #4b5285, 1px 0 0 0 #4b5285, 0 -1px 0 0 #4b5285, 0 1px 0 0 #4b5285;
  --bd-green: -1px 0 0 0 var(--go), 1px 0 0 0 var(--go), 0 -1px 0 0 var(--go), 0 1px 0 0 var(--go);
  --bd-red: -1px 0 0 0 #c96060, 1px 0 0 0 #c96060, 0 -1px 0 0 #c96060, 0 1px 0 0 #c96060;
  --float: 0 14px 34px rgba(4, 5, 14, .55);

  /* status colors as soft tints: a dark wash of the color, with the color itself for the words */
  --t-gray-bg: #2b2f4c; --t-gray-fg: #c9cbe0;
  --t-new-bg: #2d2952; --t-new-fg: #c7b8ff;
  --t-pre-bg: #2a2e49; --t-pre-fg: #c0c4dc;
  --t-post-bg: #1f3157; --t-post-fg: #a8c6ff;
  --t-unpaid-bg: #3a3320; --t-unpaid-fg: #ecc978;
  --t-paid-bg: #1c3a2e; --t-paid-fg: #86dcb0;
  --t-lost-bg: #442428; --t-lost-fg: #ffaaaa;
  --t-cold-bg: #432f1e; --t-cold-fg: #f5b983;
  --t-ads-bg: #44243c; --t-ads-fg: #ffa9de;
  --t-organic-bg: #1a3b3a; --t-organic-fg: #7fded1;
  --t-referral-bg: #223457; --t-referral-fg: #b3ceff;
  --t-archive-bg: #2a2d44; --t-archive-fg: #a9adc6;
  --t-assigned-bg: #38352a; --t-assigned-fg: #d8cfae;
  --t-guar-bg: #1c3a2e; --t-guar-fg: #86dcb0;
  --t-proj-bg: #1f3157; --t-proj-fg: #a8c6ff;
  --t-hyp-bg: #272c50; --t-hyp-fg: #b7c0ee;
}

html.dark body { background: var(--paper); color: var(--text); }
html.dark ::selection { background: #3d4a8a; color: #fff; }
html.dark :focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
html.dark a { color: var(--green); }
/* the page pictures are sixteen squares a side: one screen pixel to the square in the menu, two on Home */
html.dark .icon.px { width: 16px; height: 16px; image-rendering: pixelated; }
html.dark .boot { color: var(--muted); }

/* frame */
html.dark .top { background: var(--ink); border-bottom: 1px solid var(--line); height: calc(var(--top) + 1px + env(safe-area-inset-top)); }
html.dark .brand { font: 400 var(--px)/20px var(--pixel); letter-spacing: 0; color: var(--faint); }
html.dark .brand img { border-radius: 0; image-rendering: pixelated; }
html.dark .where { font: 400 var(--px)/20px var(--pixel); color: var(--text); }
html.dark .where::before { color: var(--line); }
html.dark .save-state { color: var(--faint); }
html.dark .save-state.saving { color: var(--yellow); }
html.dark .save-state.offline { color: var(--red); }
html.dark .topbtn { border-radius: 3px; color: var(--muted); }
html.dark .topbtn:hover:not(:disabled) { background: var(--surface); color: var(--text); }
html.dark .nav-btn { color: var(--text); }
html.dark .nav-btn[aria-expanded=true] { background: var(--raise); color: var(--text); }
html.dark .role-tag { border-radius: 3px; background: var(--head); color: var(--muted); }

/* the menu: every page, with its small picture. The page you are on gets a green bar. */
html.dark .nav-item { border-radius: 0; color: var(--text); }
html.dark .nav-item .icon { color: var(--faint); }
html.dark .nav-item:hover, html.dark .nav-item:focus-visible { background: var(--head); }
html.dark .nav-item.on { background: var(--raise); color: #fff; box-shadow: inset 2px 0 0 var(--green); }
html.dark .nav-item.on .icon { color: var(--green); }

/* buttons: flat, with the thin outline */
html.dark .btn { border: 0; background: var(--head); color: var(--text); box-shadow: var(--bd); }
html.dark .btn:hover:not(:disabled) { background: var(--raise); box-shadow: var(--bd-hi); }
html.dark .btn.primary { background: var(--go); color: #0c1a13; font-weight: 600; box-shadow: var(--bd-green); }
html.dark .btn.primary:hover:not(:disabled) { background: #4dbd8a; box-shadow: var(--bd-green); }
html.dark .btn.danger { background: #c96060; color: #1a0b0b; font-weight: 600; box-shadow: var(--bd-red); }
html.dark .btn.ghost { background: none; box-shadow: none; color: var(--muted); }
html.dark .btn.ghost:hover:not(:disabled) { background: var(--surface); box-shadow: none; color: var(--text); }
html.dark .btn.danger-ghost { background: none; box-shadow: none; color: var(--red); }
html.dark .btn.danger-ghost:hover { background: #3a2028; box-shadow: none; }
html.dark .btn.soft { background: #1c3a2e; color: #86dcb0; box-shadow: -1px 0 0 0 #2f6b50, 1px 0 0 0 #2f6b50, 0 -1px 0 0 #2f6b50, 0 1px 0 0 #2f6b50; }
html.dark .btn.soft:hover:not(:disabled) { background: #224737; }
html.dark .btn.toggle.on { background: var(--raise); color: #fff; box-shadow: var(--bd-green); }
html.dark a.btn { color: var(--text); }
html.dark a.btn.primary { color: #0c1a13; }
html.dark .iconbtn { border-radius: 3px; }
html.dark .iconbtn:hover { background: var(--head); color: var(--text); }
html.dark .modal-foot { gap: 10px; }
html.dark .btn-row { gap: 10px; }
html.dark .item-acts, html.dark .block-acts { gap: 8px; }

html.dark .toolbar { gap: 10px; }
html.dark .stepper { border: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .stepper-label { color: var(--text); }
html.dark .search, html.dark .pick-filter, html.dark .longedit, html.dark .btn-row > input, html.dark .block-acts select {
  border: 1px solid var(--line); background: var(--well); color: var(--text); }
html.dark .search:focus, html.dark .pick-filter:focus, html.dark .longedit:focus { outline: 0; border-color: var(--green); }
html.dark .chips { gap: 8px; padding: 2px; }
html.dark .chipbtn { border: 0; border-radius: 0; background: var(--head); color: var(--text); box-shadow: var(--bd); }
html.dark .chipbtn.on { background: var(--raise); color: #fff; box-shadow: var(--bd-green); }
html.dark .chipbtn.on .chipbtn-n { color: var(--muted); }
html.dark .segctl, html.dark .seg-row { border: 0; background: var(--head); overflow: visible; box-shadow: var(--bd); }
html.dark .segctl-btn, html.dark .seg-row button { border-color: var(--line); color: var(--muted); }
html.dark .segctl-btn.on, html.dark .seg-row button.on { background: var(--raise); color: #fff; box-shadow: inset 0 -2px 0 var(--green); }

/* labels: a status is a soft tint. A package keeps the color you gave it, as one small square beside its name. */
html.dark .chip { border-radius: 3px; background: var(--chip-bg, var(--t-gray-bg)); color: var(--chip-fg, var(--t-gray-fg)); }
html.dark .chip.raw { background: var(--head); color: var(--text); }
html.dark .chip.raw::before { content: ''; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.5em; background: var(--chip-bg); vertical-align: 0.02em; }

/* the sheet */
html.dark .grid thead th, html.dark .grid tfoot td { color: var(--muted); }
html.dark .grid td.ro { background: #191c30; }
html.dark .grid td.stick { background: var(--surface); }
html.dark .grid tr.cur td.gut, html.dark .grid tr.cur td.stick { background: #262b49; }
html.dark .grid td.sel { box-shadow: inset 0 0 0 2px var(--green); }
html.dark .grid-wrap:focus-visible { box-shadow: inset 0 0 0 2px var(--green); }
html.dark .cellinput { background: var(--well); color: var(--text); outline-color: var(--green); box-shadow: 0 6px 18px rgba(4, 5, 14, .6); }
html.dark .rowbtn { color: var(--faint); }
html.dark .celllink { text-decoration-color: #4b5285; }
html.dark .celllink:hover { color: var(--green); text-decoration-color: var(--green); }
html.dark .ph { color: var(--faint); }
html.dark .box { border: 1px solid var(--faint); border-radius: 2px; background: var(--well); color: var(--well); }
html.dark .box.on { background: var(--go); border-color: var(--go); color: #0c1a13; }
html.dark .grid tr.group td { background: var(--head); color: var(--text); }
html.dark .grid td.inc-g { background: #1a3229; }
html.dark .grid td.inc-p { background: #1c2a4d; }
html.dark .grid td.inc-h { background: #212545; color: #b7c0ee; }
html.dark .grid td.warn, html.dark .grid td.moved { color: var(--orange); }
html.dark .grid tr.assigned td { color: var(--muted); }
html.dark .grid td.owed .celllink { color: var(--yellow); text-decoration-color: #6f5f33; }
html.dark .grid td.owed.late .celllink { color: var(--red); text-decoration-color: #7a4040; }
html.dark .zoom-chip { border-radius: 3px; background: var(--raise); color: var(--text); box-shadow: var(--bd-hi), 0 4px 12px rgba(4, 5, 14, .5); }

/* pages */
html.dark .biz { color: var(--green); }
html.dark .count { border-radius: 3px; background: #353122; color: var(--yellow); }
html.dark .items, html.dark .gauge, html.dark .board, html.dark .tile, html.dark .trainer, html.dark .logins, html.dark .card-rows,
html.dark .pay-list, html.dark .trash, html.dark .activity, html.dark .member, html.dark .two-state, html.dark .look-pick {
  border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .pay-sum { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .items > .quiet, html.dark .trash > .quiet, html.dark .activity > .quiet { display: flex; align-items: center; gap: 12px; }
html.dark .items > .quiet::before, html.dark .trash > .quiet::before, html.dark .activity > .quiet::before {
  content: ''; flex: none; width: 32px; height: 32px; background: url('../img/dog.svg') center / contain no-repeat; image-rendering: pixelated; }
html.dark .k-lesson { color: #9bb8fa; }
html.dark .k-standard { color: #ecd06a; }
html.dark .k-book { color: var(--orange); }
html.dark .k-consult { color: #a5d6fa; }
html.dark .k-payment { color: #ecc978; }
html.dark .k-followup { color: #c7b8ff; }
html.dark .k-start { color: #7fded1; }
html.dark .k-gohome { color: #f5b983; }
html.dark .item-day { background: var(--head); color: var(--muted); }

/* home: the month in one thin bar, then a quiet block for every page with its small picture */
html.dark .hm-link { border: 0; border-radius: 0; background: var(--surface); color: var(--text); box-shadow: var(--bd); }
html.dark .hm-link:hover, html.dark .hm-link:focus-visible { box-shadow: var(--bd-hi); }
html.dark .bar.slim { height: 6px; }
html.dark .tile-nav { border: 0; border-radius: 0; background: var(--surface); color: var(--text); box-shadow: var(--bd); }
html.dark .tile-nav:hover, html.dark .tile-nav:focus-visible { background: var(--head); box-shadow: var(--bd-hi); }
html.dark .tile-nav:active { background: var(--raise); }
html.dark .tile-nav-top { min-height: 32px; color: var(--green); }
html.dark .tile-nav .icon.px { width: 32px; height: 32px; }
html.dark .tile-nav-badge { border-radius: 3px; background: #353122; color: var(--yellow); }

/* goal bars */
html.dark .bar { border-radius: 0; background: var(--well); box-shadow: var(--bd); }
html.dark .seg { border-radius: 0; }
html.dark .goal-mark { background: var(--text); }
html.dark .dot { border-radius: 0; }
html.dark .gnum.hyp .dot { box-shadow: none; }
html.dark .minibar { border-radius: 0; background: var(--well); }
html.dark .minibar .seg { border-radius: 0; }

/* slot boards: boxes as soft tints with a one-pixel edge */
html.dark .slot { border-radius: 0; }
html.dark .slot.paid { background: #1f3d30; color: #8fe0b5; box-shadow: -1px 0 0 0 #2f6b50, 1px 0 0 0 #2f6b50, 0 -1px 0 0 #2f6b50, 0 1px 0 0 #2f6b50; }
html.dark .slot.unpaid { background: #3b3420; color: #ecd07a; box-shadow: -1px 0 0 0 #7a6a30, 1px 0 0 0 #7a6a30, 0 -1px 0 0 #7a6a30, 0 1px 0 0 #7a6a30; }
html.dark .slot.projected { background: #23304f; color: #a9c4fa; box-shadow: -1px 0 0 0 #3d5590, 1px 0 0 0 #3d5590, 0 -1px 0 0 #3d5590, 0 1px 0 0 #3d5590; }
html.dark .slot.held { background: #2b2f4c; color: #c9cbe0; box-shadow: -1px 0 0 0 #4a4f7a, 1px 0 0 0 #4a4f7a, 0 -1px 0 0 #4a4f7a, 0 1px 0 0 #4a4f7a; }
html.dark .slot.open { border: 1px dashed #3d4370; background: none; box-shadow: none; }
html.dark .slot.mini { box-shadow: none; }
html.dark .slot.mini.paid { background: #3f9b72; }
html.dark .slot.mini.unpaid { background: #c9a84f; }
html.dark .slot.mini.projected { background: #5f86d6; }
html.dark .slot.mini.held { background: #6a7096; }
html.dark .slot.mini.open { border: 1px dashed #5a6196; background: none; }
html.dark button.slot:hover { filter: brightness(1.15); }
html.dark .wave.past { background: var(--ink); }
html.dark .wave.now { box-shadow: -1px 0 0 0 #2f6b50, 1px 0 0 0 #2f6b50, 0 -1px 0 0 #2f6b50, 0 1px 0 0 #2f6b50; }
html.dark .wave-now { border-radius: 3px; }
html.dark .tile.hyp { box-shadow: var(--bd), inset 3px 0 0 #5a66a8; }
html.dark .tile.guar { box-shadow: var(--bd), inset 3px 0 0 var(--green); }
html.dark .tile.proj { box-shadow: var(--bd), inset 3px 0 0 var(--blue); }
html.dark .table-scroll { border-color: var(--line); }
html.dark .plain thead th, html.dark .plain tr.total th, html.dark .plain tr.total td { color: var(--muted); }

/* forms */
html.dark .field-label { color: var(--muted); }
html.dark .field input, html.dark .field select, html.dark .field textarea, html.dark .modal textarea {
  border: 1px solid var(--line); border-radius: 0; background: var(--well); color: var(--text); }
html.dark .field input:focus, html.dark .field select:focus, html.dark .field textarea:focus, html.dark .modal textarea:focus { outline: 0; border-color: var(--green); }
html.dark .field input:disabled, html.dark .field select:disabled { background: var(--head); color: var(--faint); }
html.dark .field input::placeholder, html.dark .field textarea::placeholder { color: var(--faint); }
html.dark .form-msg, html.dark .auth-msg { color: var(--red); }
html.dark .daybox { border: 1px solid var(--line); background: var(--well); }

/* things that float: menus, boxes, the card drawer, toasts */
html.dark .pop { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd-hi), var(--float); }
html.dark .pop-back.sheet, html.dark .modal-back, html.dark .drawer-back { background: rgba(6, 7, 16, .66); }
html.dark .pop.sheet { border-radius: 0; box-shadow: 0 -1px 0 0 #4b5285; }
html.dark .menu-item, html.dark .pick-item { border-radius: 0; color: var(--text); }
html.dark .menu-item:hover:not(:disabled), html.dark .menu-item:focus-visible, html.dark .pick-item:hover, html.dark .pick-item.active { background: var(--head); }
html.dark .menu-item.danger { color: var(--red); }
html.dark .pick-item.current { box-shadow: inset 2px 0 0 var(--green); }
html.dark .modal { border-radius: 0; background: var(--surface); box-shadow: var(--bd-hi), var(--float); }
html.dark .modal-text { color: var(--text); }
html.dark .drawer { background: var(--paper); box-shadow: -1px 0 0 0 #4b5285, -14px 0 34px rgba(4, 5, 14, .5); }
html.dark .drawer-head { background: var(--ink); border-bottom: 1px solid var(--line); }
html.dark .toast { border-radius: 0; background: var(--raise); color: var(--text); box-shadow: var(--bd-hi), var(--float); }
html.dark .toast.error { background: #4a2228; box-shadow: var(--bd-red), var(--float); }
html.dark .toast-act { color: var(--green); }
html.dark .toast.error .toast-act { color: #fff; }

/* signing in */
html.dark body.auth { background: var(--ink); }
html.dark .auth-card { border-radius: 0; background: var(--surface); box-shadow: var(--bd-hi); }
html.dark .auth-mark { border-radius: 0; image-rendering: pixelated; }

/* people, payments, the log */
html.dark .pay-line.owed b { color: var(--yellow); }
html.dark .login-role, html.dark .level, html.dark .login-2step { border-radius: 3px; }
html.dark .login-role, html.dark .level { background: var(--t-gray-bg); color: var(--t-gray-fg); }
html.dark .login-role.r-owner, html.dark .level.l-owner { background: #3a3d5c; color: #fff; }
html.dark .login-role.r-head_admin, html.dark .login-role.r-admin { background: var(--t-post-bg); color: var(--t-post-fg); }
html.dark .login-role.r-head_trainer, html.dark .login-role.r-trainer { background: var(--t-paid-bg); color: var(--t-paid-fg); }
html.dark .level.l-head { background: var(--t-unpaid-bg); color: var(--t-unpaid-fg); }
html.dark .login-2step { background: var(--t-unpaid-bg); color: var(--t-unpaid-fg); }
html.dark .role-key b { color: var(--text); }

/* tasks and two-step login */
html.dark .task-check { border: 1px solid var(--faint); border-radius: 2px; background: var(--well); color: transparent; }
html.dark .task-check:hover:not(:disabled) { border-color: var(--green); color: #2f6b50; }
html.dark .task-check.on { background: var(--go); border-color: var(--go); color: #0c1a13; }
html.dark .task-check.on:hover:not(:disabled) { color: #0c1a13; }
html.dark .task.done .task-title { color: var(--faint); }
html.dark .task-notes { color: var(--muted); }
html.dark .task-meta .late { color: var(--red); }
html.dark .task-meta .soon { color: var(--yellow); }
html.dark .task-meta button { color: var(--green); }
html.dark .two-key code { border: 1px dashed #4b5285; background: var(--well); color: var(--yellow); }
html.dark .codes { border: 0; border-radius: 0; background: var(--well); box-shadow: var(--bd); color: var(--yellow); }
html.dark .look-pick.on { box-shadow: var(--bd-green); }
html.dark .scope-note, html.dark .field-hint, html.dark .about, html.dark .modal-text { color: var(--muted); }
html.dark .modal-text { color: var(--text); }

@media print {
  html.dark { color-scheme: light; }
}

/* the leads and sales tools: the same flat blocks and thin outlines as the rest */
html.dark .btn.warn { background: #353122; color: var(--yellow); box-shadow: -1px 0 0 0 #6f5f33, 1px 0 0 0 #6f5f33, 0 -1px 0 0 #6f5f33, 0 1px 0 0 #6f5f33; }
html.dark .btn.warn:hover:not(:disabled) { background: #3f3a27; box-shadow: -1px 0 0 0 #8a7740, 1px 0 0 0 #8a7740, 0 -1px 0 0 #8a7740, 0 1px 0 0 #8a7740; }
html.dark .btn.on { background: var(--raise); color: #fff; box-shadow: var(--bd-green); }
html.dark .block-head > select { border: 1px solid var(--line); border-radius: 0; background: var(--well); color: var(--text); }
html.dark .grid td.quiet .chip::after { border-radius: 0; background: var(--red); }
html.dark .lane { border: 0; border-radius: 0; background: var(--well); box-shadow: var(--bd); }
html.dark .lane.over { box-shadow: var(--bd-green); }
html.dark .lane-head { border-color: var(--line); }
html.dark .lane-card { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .lane-card.quiet { box-shadow: var(--bd), inset 2px 0 0 var(--red); }
html.dark .lane-card.assigned { background: #191c30; }
html.dark .lane-open { border-radius: 0; }
html.dark .lane-open:hover { background: var(--head); }
html.dark .flag { border: 0; border-radius: 3px; background: var(--head); color: var(--muted); }
html.dark .flag.quiet { background: #442428; color: #ffaaaa; }
html.dark .lane-move { border: 0; border-radius: 3px; background: var(--head); color: var(--muted); box-shadow: var(--bd); }
html.dark .lane-move:hover { color: var(--text); box-shadow: var(--bd-hi); }
html.dark .form-note.warn { color: var(--orange); }
html.dark .twins { border: 0; border-radius: 0; background: var(--well); box-shadow: var(--bd); }
html.dark .twin { border-color: var(--grid); }
html.dark .radio { border: 0; border-radius: 0; background: var(--well); box-shadow: var(--bd); }
html.dark .radio:has(input:checked) { box-shadow: var(--bd-green); }
html.dark .radio input { accent-color: var(--go); }
html.dark .k-stale { color: #ffaaaa; }
html.dark .k-quote { color: #ecc978; }
html.dark .cell-in { border: 1px solid var(--line); border-radius: 0; background: var(--well); color: var(--text); }
html.dark .cell-in:focus { outline: 0; border-color: var(--green); }
html.dark .cell-in::placeholder { color: var(--faint); }
html.dark .keybox { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }

/* the calendar and the money lines */
html.dark { --k-consult: #93cff8; --k-lesson: #5f8ff2; --k-standard: #f0d250; --k-call: #b9a6f2; --k-bt: #f2944a; --k-checkin: #cf622a; --k-meeting: #9361dc; --k-off: #7d82a6; }
html.dark .pip { border-radius: 0; }
html.dark .week { border: 0; border-radius: 0; box-shadow: var(--bd); }
html.dark .week-day { border: 0; border-radius: 0; background: var(--head); }
html.dark .week-day:hover, html.dark .week-day:focus-visible { box-shadow: var(--bd-hi); }
html.dark .week-day.today .week-num { border-radius: 0; background: var(--go); color: #0f1120; }
html.dark .week-day.sel { background: var(--raise); box-shadow: var(--bd-green); }
html.dark .week-open { border-bottom-color: var(--grid); }
html.dark .cal-flag { border: 0; border-radius: 0; background: #2f2a1c; color: var(--yellow); box-shadow: -1px 0 0 0 #6a5a2a, 1px 0 0 0 #6a5a2a, 0 -1px 0 0 #6a5a2a, 0 1px 0 0 #6a5a2a; }
html.dark .cal-box { border: 0; border-radius: 0; box-shadow: var(--bd); overflow: visible; }
html.dark .cal-day.out { background: var(--well); color: var(--faint); }
html.dark .cal-day.off { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .055) 0 5px, transparent 5px 10px); }
html.dark .cal-num { border-radius: 0; }
html.dark .cal-day.today .cal-num { background: var(--go); color: #0f1120; }
html.dark .cal-day.sel { box-shadow: inset 0 0 0 2px var(--green); }
html.dark .cal-entry:hover, html.dark .cal-entry:focus-visible { background: var(--head); }
html.dark .item-kind.live { color: var(--green); }
html.dark .pace.behind b { color: var(--yellow); }

/* ---------- 1.6 in Pixel dark: the calendar's toolbar, a day hour by hour, the boxes, notices ---------- */
html.dark { --k-other: #6fc3cf; --k-task: #cdbb6a;
  --kt-consult: #1f4560; --kt-lesson: #1e2b5c; --kt-standard: #403817; --kt-call: #35304f; --kt-bt: #4a3418; --kt-checkin: #4f2319; --kt-meeting: #35204f; --kt-other: #1f373c; --kt-task: #37331f; --kt-off: #2a2c42;
  --ev-fg: #e7e8f2; }
html.dark .pip.ck-task { border-radius: 0; }
html.dark .cal-view, html.dark .cal-search { border: 0; border-radius: 0; background: var(--raise); color: var(--text); box-shadow: var(--bd); }
html.dark .cal-view:focus-visible, html.dark .cal-search:focus-visible { box-shadow: var(--bd-hi); }
html.dark .cal-jump { background: var(--head); color: var(--muted); }
html.dark .tg-num { border-radius: 0; }
html.dark .tg-dayhead.today .tg-num { background: var(--go); color: #0f1120; }
html.dark .tg-dayhead:hover .tg-num { box-shadow: inset 0 0 0 1px var(--green); }
html.dark .tg-dayhead.off { background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, .055) 0 5px, transparent 5px 10px); }
html.dark .tg-col.today { background-color: rgba(94, 199, 149, .05); }
html.dark .tg-ev, html.dark .tg-chip, html.dark .cal-line { border-radius: 0; }
html.dark .tg-ev { box-shadow: 0 0 0 1px var(--surface); }
html.dark .tg-ev:hover { filter: brightness(1.12); }
html.dark .tg-ghost { border-radius: 0; border-color: var(--green); color: var(--text); }
html.dark .tg-now::before { border-radius: 0; }
html.dark .scope-btn { border: 0; border-radius: 0; background: var(--raise); box-shadow: var(--bd); }
html.dark .scope-btn:hover, html.dark .scope-btn:focus-visible { box-shadow: var(--bd-green); }
html.dark .repeat-custom { border: 0; border-radius: 0; box-shadow: var(--bd); }
html.dark .notices { border: 0; border-radius: 0; background: #2f2a1c; box-shadow: -1px 0 0 0 #6a5a2a, 1px 0 0 0 #6a5a2a, 0 -1px 0 0 #6a5a2a, 0 1px 0 0 #6a5a2a; }
html.dark .notices-head { color: var(--yellow); }
html.dark .nav-dot { border-radius: 0; background: var(--yellow); box-shadow: 0 0 0 2px var(--ink); }
html.dark .nav-note { border-top-color: var(--grid); color: var(--text); }
html.dark .nav-note .icon { color: var(--faint); }
html.dark .nav-note:hover, html.dark .nav-note:focus-visible { background: var(--head); }
html.dark .nav-note-n { border-radius: 0; background: var(--yellow); color: #1b1a10; }

/* 1.8: this device, with or without a connection */
html.dark button.save-state { border-radius: 0; }
html.dark button.save-state:hover { background: var(--surface); }
html.dark .save-state.has-queue { color: var(--yellow); }
html.dark .save-state.offline.has-queue { color: var(--red); }
html.dark .save-state.look { background: #4a2228; color: #ffd6d0; box-shadow: var(--bd-red); }
html.dark button.save-state.look:hover { background: #5a2a31; }
html.dark .ob-state { color: var(--text); }
html.dark .ob-row { border: 0; border-radius: 0; background: var(--raise); box-shadow: var(--bd); }
html.dark .ob-row.look { background: #33222a; box-shadow: var(--bd-red); }
html.dark .ob-why { color: #ffb3aa; }
html.dark .auth-card .auth-lead + .auth-msg { color: var(--muted); }

/* ==== 1.8.2 ==== */

/* ---------------------------------------------------------------- 1.8.2 */
html.dark .two-qr .qr { border-radius: 0; box-shadow: 0 0 0 1px var(--line); }
html.dark .must-two { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .tabs { background: var(--ink); border-bottom-color: var(--line); }
html.dark .tab { color: var(--muted); }
html.dark .tab .icon { color: var(--faint); }
html.dark .tab:hover { background: var(--surface); color: var(--text); }
html.dark .tab.on { background: var(--head); color: #fff; box-shadow: inset 0 -2px 0 var(--green); }
html.dark .tab.on .icon { color: var(--green); }
html.dark .tab-n { border-radius: 3px; background: #353122; color: var(--yellow); }

/* ==== 1.9.0 ==== */

/* ---------------------------------------------------------------- 1.9.0, Pixel dark: addresses, and the day on a map */
html.dark .linklike { color: var(--green); }
html.dark .linklike:hover { color: var(--text); }
html.dark .myday { border: 0; border-radius: 0; box-shadow: var(--bd); overflow: visible; }
html.dark .myday.in-sheet { box-shadow: none; }
html.dark .myday-where { color: var(--green); }
html.dark .myday-stop::before { border-radius: 0; }
html.dark .myday-frame { filter: none; }

/* ==== 1.10.0 ==== */

/* ---------------------------------------------------------------- 1.10.0, pixel dark */
html.dark .warn-text { color: var(--orange); }
html.dark .cal-keys { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); color: var(--text); }
html.dark .cal-key kbd { border: 0; border-radius: 0; background: var(--raise); color: var(--cream); box-shadow: var(--bd-hi); }
html.dark .clash-item { border: 0; border-left: 4px solid var(--red); border-radius: 0; background: #2c1f2b; box-shadow: var(--bd-red); }
html.dark .clash-note, html.dark .clash-what { color: var(--muted); }
html.dark .task-tone-blue { color: #7ea6f2; }
html.dark .task-tone-yellow { color: #f1d264; }
html.dark .task-tone-orange { color: #e9a15f; }
html.dark .task-tone-red { color: #f08a80; }
html.dark .task-tone-green { color: #5ec795; }
html.dark .task-tone-lavender { color: #b9a6f5; }
html.dark .task-bg-blue { background: #7ea6f2; }
html.dark .task-bg-yellow { background: #f1d264; }
html.dark .task-bg-orange { background: #e9a15f; }
html.dark .task-bg-red { background: #f08a80; }
html.dark .task-bg-green { background: #5ec795; }
html.dark .task-bg-lavender { background: #b9a6f5; }
html.dark .task-preset { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .task-preset:hover, html.dark .task-preset:focus-visible { box-shadow: var(--bd-hi); }
html.dark .task-color { border-radius: 0; box-shadow: var(--bd); }
html.dark .task-color.auto { border-radius: 0; background: var(--head); color: var(--text); }
html.dark .task-color.on { border-color: var(--surface); box-shadow: 0 0 0 2px var(--cream); }
html.dark .task-color.auto.on { background: var(--go); color: #0f1120; box-shadow: none; }
html.dark .card-lead, html.dark .card-work > .quiet, html.dark .card-work > .card-row { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .card-new { box-shadow: var(--bd-hi); }

/* ==== 1.11.0 ==== */

/* ---------------------------------------------------------------- 1.11.0 */

/* ==== 1.11.1 ==== */

/* ---------------------------------------------------------------- 1.11.1: task types */
html.dark .task-tone-pink { color: #f29ac6; }
html.dark .task-bg-pink { background: #f29ac6; }
html.dark .task-kind { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .task-kind.auto { color: var(--text); }
html.dark .task-kind:hover, html.dark .task-kind:focus-visible { box-shadow: var(--bd-hi); }
html.dark .task-kind.on { background: var(--raise); box-shadow: inset 0 -2px 0 currentColor, var(--bd-hi); }
html.dark .task-kind.auto.on { background: var(--go); color: #0f1120; box-shadow: none; }
html.dark .task-tab.on .task-tab-name { color: inherit; }
/* the title in the task box is written in its color in this look too: the rule for every box used to win over it */
html.dark .field input.task-tone-blue { color: #7ea6f2; }
html.dark .field input.task-tone-yellow { color: #f1d264; }
html.dark .field input.task-tone-orange { color: #e9a15f; }
html.dark .field input.task-tone-red { color: #f08a80; }
html.dark .field input.task-tone-green { color: #5ec795; }
html.dark .field input.task-tone-lavender { color: #b9a6f5; }
html.dark .field input.task-tone-pink { color: #f29ac6; }

/* ==== 1.12.0 ==== */

/* ---------------------------------------------------------------- 1.12: Dog Boarding and Group Classes, Pixel dark */
html.dark { --k-class: #5fd0b0; --kt-class: #1b3d38; --k-bdrop: #5ec795; --kt-bdrop: #1f3d30; --k-bpick: #f2944a; --kt-bpick: #4a3418;
  --k-bstay: #5f8ff2; --kt-bstay: #1e2b5c; --k-bblock: #7d82a6; --kt-bblock: #2a2c42; }
html.dark .slot.b-here, html.dark .sb-bar.b-here { background: #23304f; color: #a9c4fa; box-shadow: -1px 0 0 0 #3d5590, 1px 0 0 0 #3d5590, 0 -1px 0 0 #3d5590, 0 1px 0 0 #3d5590; }
html.dark .slot.b-in, html.dark .sb-bar.b-in { background: #1f3d30; color: #8fe0b5; box-shadow: -1px 0 0 0 #2f6b50, 1px 0 0 0 #2f6b50, 0 -1px 0 0 #2f6b50, 0 1px 0 0 #2f6b50; }
html.dark .slot.b-out, html.dark .sb-bar.b-out { background: #4a3418; color: #f6c79b; box-shadow: -1px 0 0 0 #8a5a2a, 1px 0 0 0 #8a5a2a, 0 -1px 0 0 #8a5a2a, 0 1px 0 0 #8a5a2a; }
html.dark .slot.b-past, html.dark .sb-bar.b-past { background: #2b2f4c; color: #c9cbe0; box-shadow: -1px 0 0 0 #4a4f7a, 1px 0 0 0 #4a4f7a, 0 -1px 0 0 #4a4f7a, 0 1px 0 0 #4a4f7a; }
html.dark .slot.mini.b-here { background: #5f86d6; box-shadow: none; }
html.dark .slot.mini.b-in { background: #3f9b72; box-shadow: none; }
html.dark .slot.mini.b-out { background: #d98a4a; box-shadow: none; }
html.dark .slot.b-open { border: 1px dashed #3d4370; color: var(--muted); }
html.dark .slot.b-open:hover, html.dark .slot.b-open:focus-visible { border-color: var(--green); color: var(--green); }
html.dark .stay-price { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .stay-price.bad { background: #3a2226; color: var(--red); box-shadow: -1px 0 0 0 #7a3b3b, 1px 0 0 0 #7a3b3b, 0 -1px 0 0 #7a3b3b, 0 1px 0 0 #7a3b3b; }
html.dark .sb-row, html.dark .sb-month, html.dark .gc-week, html.dark .gc-month { border: 0; border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .sb-month .sb-row { box-shadow: none; border-top: 1px solid var(--line); }
html.dark .sb-day:hover { background: var(--head); }
html.dark .sb-day.today .sb-num, html.dark .gc-col.today .gc-num, html.dark .gc-cell.today .gc-cell-num { border-radius: 3px; background: var(--green); color: #10231a; }
html.dark .sb-day.full .sb-n, html.dark .sb-closed { color: var(--yellow); }
html.dark .sb-day.closed { background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, .05) 6px 12px); }
html.dark .sb-bar { border-radius: 0; }
html.dark .sb-bar.starts { margin-left: 3px; border-radius: 0; }
html.dark .sb-bar.ends { margin-right: 3px; border-radius: 0; }
html.dark .sb-bar.unpaid { box-shadow: inset 0 -3px 0 #f08080; }
html.dark .sb-more { border-radius: 0; background: var(--head); }
html.dark .gc-class { border-radius: 0; color: var(--text); }
html.dark .gc-meet { border-radius: 0; color: var(--text); }
html.dark .gc-cell.out { background: var(--ink); }
html.dark .gc-card { border: 0; border-left: 4px solid var(--k-class); border-radius: 0; background: var(--surface); box-shadow: var(--bd); }
html.dark .gc-card.full { border-left-color: var(--orange); }
html.dark .gc-seats { border-radius: 3px; color: var(--text); }
html.dark .gc-weekbtn { border: 0; border-radius: 0; background: var(--head); box-shadow: var(--bd); }
html.dark .gc-weekbtn.moved { box-shadow: -1px 0 0 0 var(--k-class), 1px 0 0 0 var(--k-class), 0 -1px 0 0 var(--k-class), 0 1px 0 0 var(--k-class); }
html.dark .gc-loose .items { box-shadow: none; }
html.dark textarea.gc-notes { border: 1px solid var(--line); border-radius: 0; background: var(--well); color: var(--text); }
html.dark textarea.gc-notes:focus { outline: 0; border-color: var(--green); }
html.dark textarea.gc-notes:disabled { background: var(--head); color: var(--faint); }
html.dark textarea.gc-notes::placeholder { color: var(--faint); }
