:root { --brand: #1d4e89; --ink: #0f172a; --muted: #64748b; --line: #e5e7eb; --bg: #f5f6f8; --card: #fff; --soft: #f8fafc;
  --ok: #15803d; --okbg: #dcfce7; --warn: #b45309; --warnbg: #fef3c7; --bad: #b91c1c; --star: #ca8a04;
  --tint: color-mix(in srgb, var(--brand) 9%, #fff); --ring: color-mix(in srgb, var(--brand) 28%, transparent);
  --shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px rgba(15,23,42,.05); }
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
code { background: var(--soft); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; font-size: 13px; }

/* top bar + tabs */
header { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 20px; display: flex; gap: 14px; align-items: center;
  flex-wrap: wrap; position: sticky; top: 0; z-index: 1000; }
header h1 { font-size: 17px; margin: 0; flex: 1; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
header h1::before { content: ""; width: 12px; height: 12px; border-radius: 4px; background: var(--brand); flex: none; }
header img + h1::before { display: none; }
header .who { font-size: 13px; color: var(--muted); }
header button { background: transparent; color: var(--muted); border: 1px solid var(--line); padding: 5px 12px; font-size: 13px; }
header button:hover { color: var(--ink); background: var(--soft); }
nav.tabs { display: flex; gap: 4px; padding: 10px 16px 2px; max-width: 1200px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; }
nav.tabs button { background: transparent; color: var(--muted); border-radius: 99px; padding: 7px 14px; white-space: nowrap; font-weight: 500; }
nav.tabs button:hover { background: #fff; color: var(--ink); }
nav.tabs button.on { background: var(--brand); color: #fff; }

main { max-width: 1200px; margin: 0 auto; padding: 14px 16px 48px; }
.narrow { max-width: 560px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-bottom: 14px; box-shadow: var(--shadow); }
h2 { font-size: 17px; margin: 0 0 10px; letter-spacing: -.01em; }
h2.big { font-size: 22px; margin-bottom: 6px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 26px 0 4px; padding-top: 18px;
  border-top: 1px solid var(--line); }
.muted { color: var(--muted); font-size: 13px; }

/* tables */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
tbody tr:hover { background: var(--soft); }
tbody tr:last-child td { border-bottom: 0; }

/* forms */
input, select, textarea { font: inherit; padding: 10px 12px; border: 1px solid #d6dae1; border-radius: 9px; width: 100%; background: #fff;
  color: var(--ink); transition: border-color .15s, box-shadow .15s; }
input[type=color] { width: 64px; height: 42px; padding: 4px; cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--ring); }
textarea { min-height: 110px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
label { display: block; font-size: 13px; font-weight: 500; color: #334155; margin: 14px 0 5px; }
button { font: inherit; font-weight: 600; padding: 10px 18px; border: 0; border-radius: 9px; background: var(--brand); color: #fff;
  cursor: pointer; transition: filter .15s, background .15s; }
button:hover { filter: brightness(1.08); }
button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); }
button.ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
button.ghost:hover { background: var(--tint); filter: none; }
button.small { padding: 5px 12px; font-size: 13px; }
button.wide { width: 100%; padding: 13px; font-size: 16px; }
button:disabled { opacity: .5; cursor: default; filter: none; }
.link { background: none; color: var(--muted); padding: 6px 0; font-weight: 500; }
.link:hover { color: var(--ink); filter: none; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row > .grow { flex: 1 1 200px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* big choice tiles and segmented choices (the client pages) */
.choices { display: grid; gap: 10px; margin-top: 16px; }
.choice { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: #fff; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 16px; font-weight: 400; }
.choice:hover { border-color: var(--brand); background: var(--tint); filter: none; }
.choice .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--tint); color: var(--brand); display: grid; place-items: center;
  font-size: 20px; flex: none; }
.choice b { display: block; font-size: 16px; }
.choice span.muted { display: block; }
.choice::after { content: "›"; margin-left: auto; font-size: 24px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg label { margin: 0; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 12px; cursor: pointer; color: var(--ink);
  font-weight: 500; background: #fff; transition: border-color .15s, background .15s; }
.seg label small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--tint); box-shadow: inset 0 0 0 1px var(--brand); }
.seg label:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--ring); }
.brandmark { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
.brandmark img { max-height: 40px; max-width: 180px; }
.lede { color: var(--muted); margin: 0; }

/* pills and bits */
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: #e0e7ff; color: #3730a3;
  white-space: nowrap; }
.pill.warn { background: var(--warnbg); color: var(--warn); }
.pill.ok { background: var(--okbg); color: var(--ok); }
.star { color: var(--star); font-weight: 700; }
.pick { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; margin-top: 12px; border-radius: 10px; background: var(--soft); }
.pick .what { flex: 1 1 260px; }
details { margin-top: 10px; }
details summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details summary:hover { color: var(--ink); }
.hide { display: none !important; }
.err { color: var(--bad); }
.err:empty { display: none; }
.chk { display: flex; gap: 8px; flex-wrap: wrap; }
.chk label { display: flex; gap: 6px; align-items: center; margin: 0; color: var(--ink); font-weight: 400; border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; background: #fff; cursor: pointer; }
.chk input { width: auto; accent-color: var(--brand); }
#map { height: 400px; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 14px; box-shadow: var(--shadow); }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.bar { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 8px 0; }
.bar > div { height: 100%; background: var(--ok); }
.done-mark { width: 56px; height: 56px; border-radius: 50%; background: var(--okbg); color: var(--ok); display: grid; place-items: center;
  font-size: 28px; margin-bottom: 12px; }

/* the client's day picker */
.daygrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; align-items: start; }
.day { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; cursor: pointer; margin: 0; color: var(--ink);
  transition: border-color .15s, background .15s; }
.day:hover { border-color: #b8c2d0; }
.day input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.day small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.day b { display: block; font-size: 17px; }
.day select { margin-top: 8px; padding: 6px 8px; font-size: 13px; display: none; }
.day.on { border-color: var(--brand); background: var(--tint); box-shadow: inset 0 0 0 1px var(--brand); }
.day.on select { display: block; }
.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg) 30%); padding: 18px 0 6px; }

@media (max-width: 600px) {
  th:nth-child(n+4), td:nth-child(n+4) { display: none; }
  .card { padding: 16px; border-radius: 12px; }
  header { padding: 10px 14px; }
  header .who { display: none; }
}
