:root {
  --bg: #f6f7f9;
  --panel: #ffffff;
  --ink: #1b1f24;
  --ink-soft: #5c6773;
  --ink-faint: #8b96a3;
  --line: #e2e6eb;
  --line-strong: #cdd4dd;
  --accent: #3a5bd9;
  --accent-soft: #eef1fd;
  --yes: #2f8f5b;
  --yes-bg: #e6f4ec;
  --if: #b4791b;
  --if-bg: #fbf1de;
  --no: #b2423c;
  --no-bg: #fbeceb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171c;
    --panel: #1c2027;
    --ink: #e8ecf1;
    --ink-soft: #a2adba;
    --ink-faint: #78838f;
    --line: #2b313a;
    --line-strong: #3a424d;
    --accent: #7b95ff;
    --accent-soft: #222a41;
    --yes: #6bcf95;
    --yes-bg: #1b3128;
    --if: #e0ab54;
    --if-bg: #332a19;
    --no: #f08a84;
    --no-bg: #35211f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }

/* Any `display` we set beats the UA stylesheet's `[hidden] { display: none }`,
   so a flex element with the hidden attribute stays visible. Bit the Caps Lock
   warning and the signed-in badge; make `hidden` mean hidden, always. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1040px; margin: 0 auto; padding: 32px 20px 80px; }
.narrow { max-width: 680px; }

header.masthead { display: flex; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.logo { font-size: 20px; font-weight: 680; letter-spacing: -.02em; }
.logo a { color: inherit; text-decoration: none; }
.logo .agenda { color: var(--accent); }
.tagline { color: var(--ink-faint); font-size: 13px; }

h1 { font-size: 26px; line-height: 1.25; letter-spacing: -.02em; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 640; margin: 0 0 12px; letter-spacing: -.01em; }
p.lede { color: var(--ink-soft); margin: 0 0 26px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}

label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.hint { font-size: 12.5px; color: var(--ink-faint); margin: 6px 0 0; }

/* Every text-ish input, by exclusion rather than by listing types — an
   omitted type used to silently fall back to browser defaults (Arial on white,
   153px wide), which is exactly how the password field shipped unstyled. */
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=file]):not([type=submit]):not([type=button]),
select, textarea {
  width: 100%;
  padding: 9px 11px;
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  transition: border-color .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* Chrome paints autofilled fields a fixed pale yellow, which is unreadable on a
   dark ground. There is no way to set the background directly — the inset
   shadow trick is the only lever, and the transition delay outruns the repaint. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 100px var(--bg) inset;
  box-shadow: 0 0 0 100px var(--bg) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out 0s;
}
textarea { resize: vertical; min-height: 64px; }

.field { margin-bottom: 16px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

button {
  font: inherit;
  font-weight: 560;
  padding: 9px 16px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .06s;
}
button:hover { border-color: var(--ink-faint); }
button:active { transform: translateY(1px); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { filter: brightness(1.07); }
button.ghost { border-color: transparent; background: transparent; color: var(--ink-soft); padding: 6px 8px; }
button.ghost:hover { background: var(--bg); color: var(--ink); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.danger { color: var(--no); }

.stack { display: flex; flex-direction: column; gap: 10px; }
.actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; }
.spacer { flex: 1; }

.list-row {
  display: flex; gap: 10px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg);
}
.list-row .idx { color: var(--ink-faint); font-size: 12px; width: 18px; text-align: right; flex: none; }
.list-row button.ghost { flex: none; }

.error {
  background: var(--no-bg); border: 1px solid var(--no); color: var(--no);
  padding: 10px 13px; border-radius: 7px; margin-bottom: 16px; font-size: 14px;
}
.notice {
  background: var(--accent-soft); border: 1px solid var(--accent);
  padding: 12px 14px; border-radius: 7px; margin-bottom: 16px; font-size: 14px;
}

/* ---------------------------------------------------------------- the board */

.board-scroll { overflow-x: auto; margin: 0 -22px; padding: 0 22px; }

table.board { border-collapse: separate; border-spacing: 0; width: 100%; }
table.board th, table.board td { padding: 0; }

table.board th.who {
  text-align: left; font-weight: 600; font-size: 13px; color: var(--ink-soft);
  padding: 8px 14px 8px 4px; white-space: nowrap;
  position: sticky; left: 0; background: var(--panel); z-index: 2;
}
table.board td.who {
  padding: 4px 14px 4px 4px; white-space: nowrap; font-size: 14px;
  position: sticky; left: 0; background: var(--panel); z-index: 2;
  border-right: 1px solid var(--line);
}
td.who .pending { color: var(--ink-faint); font-size: 12px; font-style: italic; margin-left: 6px; }
tr.me td.who { font-weight: 650; }
tr.me td.who::before { content: "▸"; color: var(--accent); margin-right: 5px; }

th.slot {
  vertical-align: bottom; padding: 8px 6px 10px; min-width: 116px;
  border-bottom: 1px solid var(--line);
}
th.slot .day { font-size: 12px; color: var(--ink-faint); font-weight: 500; }
th.slot .time { font-size: 14px; font-weight: 620; letter-spacing: -.01em; }
th.slot .zone { font-size: 11px; color: var(--ink-faint); font-weight: 500; }
th.slot.clear { background: var(--yes-bg); border-radius: 8px 8px 0 0; }
th.slot.locked { background: var(--accent-soft); border-radius: 8px 8px 0 0; }

td.cell { text-align: center; padding: 3px; }
.mark {
  display: block; width: 100%; min-width: 92px; padding: 7px 0;
  border-radius: 6px; font-size: 13px; font-weight: 600;
  border: 1px solid transparent; background: var(--bg); color: var(--ink-faint);
}
.mark.yes { background: var(--yes-bg); color: var(--yes); }
.mark.if  { background: var(--if-bg);  color: var(--if); }
.mark.no  { background: var(--no-bg);  color: var(--no); }
.mark.unset { color: var(--ink-faint); }
button.mark { cursor: pointer; }
button.mark:hover { border-color: var(--line-strong); }

tfoot td.tally { text-align: center; padding: 10px 3px 4px; font-size: 12.5px; color: var(--ink-soft); }
tfoot td.tally .count { display: block; font-size: 17px; font-weight: 680; color: var(--ink); letter-spacing: -.02em; }
tfoot td.tally.clear .count { color: var(--yes); }
tfoot td.tally.blocked .count { color: var(--ink-faint); }
tfoot td.lockcell { padding: 8px 3px; text-align: center; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-soft); margin-top: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.verdict { display: flex; gap: 14px; align-items: flex-start; }
.verdict .big { font-size: 30px; line-height: 1; }
.meet-link {
  display: inline-block; margin-top: 10px; padding: 9px 16px; background: var(--accent);
  color: #fff; text-decoration: none; border-radius: 7px; font-weight: 560;
}
.share {
  display: flex; gap: 8px; align-items: center; background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px; padding: 7px 7px 7px 12px;
}
.share code { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); }

.who-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.who-picker button.pill { border-radius: 999px; padding: 7px 14px; font-size: 14px; }
.who-picker button.pill.done { color: var(--ink-faint); }
.who-picker button.pill.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.muted { color: var(--ink-faint); font-size: 13px; }

/* ------------------------------------------------------------- the stepper */

.stepper {
  display: flex; gap: 10px; list-style: none; margin: 0 0 22px; padding: 0;
  font-size: 13.5px; color: var(--ink-faint);
}
.stepper li {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel);
}
.stepper li .dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line-strong);
  font-size: 12px; font-weight: 640;
}
.stepper li.current { color: var(--ink); border-color: var(--accent); }
.stepper li.current .dot { background: var(--accent); border-color: var(--accent); color: #fff; }
.stepper li.done .dot { background: var(--yes-bg); border-color: var(--yes); color: var(--yes); }

.whoami { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); }

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

.auth-shell {
  min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 20px;
}
.auth-box { width: 100%; max-width: 390px; }

.auth-mark {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 21px; font-weight: 680; letter-spacing: -.02em;
  margin-bottom: 22px;
}
.auth-mark a { color: inherit; text-decoration: none; }
.auth-mark .glyph {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 15px;
}

.auth-box h1 { font-size: 23px; margin-bottom: 6px; }
.auth-box .lede { font-size: 14px; margin-bottom: 22px; }

.auth-box .panel { padding: 20px; margin-bottom: 14px; }
.auth-box .field { margin-bottom: 14px; }

/* password + reveal button share one bordered box, so the control reads as one field */
.pw-wrap { position: relative; display: flex; }
.pw-wrap input { padding-right: 62px; }
.pw-wrap .reveal {
  position: absolute; right: 4px; top: 4px; bottom: 4px;
  border: none; background: transparent; color: var(--ink-faint);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  padding: 0 10px; border-radius: 5px; cursor: pointer;
}
.pw-wrap .reveal:hover { color: var(--accent); background: var(--accent-soft); }

button.block { width: 100%; padding: 11px 16px; justify-content: center; }

.capslock {
  display: flex; align-items: center; gap: 7px;
  margin-top: 9px; font-size: 12.5px;
  color: var(--if); background: var(--if-bg);
  border: 1px solid var(--if); border-radius: 6px; padding: 7px 10px;
}

.auth-foot { margin-top: 20px; font-size: 12px; color: var(--ink-faint); text-align: center; }

/* --------------------------------------------------------------- dashboard */

.dash-head {
  display: flex; align-items: flex-start; gap: 16px;
  margin-bottom: 26px; flex-wrap: wrap;
}
.dash-head > div:first-child { flex: 1; min-width: 220px; }
.dash-head .lede { margin-bottom: 0; }

.newbtn {
  flex: none; display: inline-block; padding: 10px 18px; border-radius: 8px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-weight: 580; font-size: 14px; white-space: nowrap;
}
.newbtn:hover { filter: brightness(1.08); }

.sectionhead {
  font-size: 12px; font-weight: 680; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-faint); margin: 28px 0 10px;
}
.sectionnote { margin: -6px 0 12px; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); }

.card {
  display: flex; flex-direction: column; gap: 9px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 16px 12px;
  text-decoration: none; color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color .12s, transform .08s;
}
.card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.card-ready { border-left: 3px solid var(--yes); }
.card-settled { border-left: 3px solid var(--accent); }
.card-done { opacity: .68; }

.card-head { display: flex; align-items: flex-start; gap: 10px; }
.card-title { flex: 1; font-weight: 640; font-size: 15.5px; letter-spacing: -.01em; line-height: 1.3; }

.pill-status {
  flex: none; font-size: 10.5px; font-weight: 660; letter-spacing: .04em;
  text-transform: uppercase; padding: 3px 8px; border-radius: 999px;
  background: var(--bg); color: var(--ink-faint); border: 1px solid var(--line);
}
.pill-status.s-ready { background: var(--yes-bg); color: var(--yes); border-color: var(--yes); }
.pill-status.s-settled { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }

.card-when { display: flex; gap: 7px; align-items: baseline; font-size: 13.5px; }
.card-when .ico { color: var(--yes); font-weight: 700; }
.card-when.muted-when { color: var(--ink-soft); }
.card-when.muted-when .ico { color: var(--ink-faint); }

.card-progress { display: flex; align-items: center; gap: 9px; }
.card-progress .bar {
  flex: 1; height: 5px; border-radius: 3px; background: var(--bg);
  border: 1px solid var(--line); overflow: hidden;
}
.card-progress .bar i { display: block; height: 100%; background: var(--yes); }
.card-progress .count { font-size: 12px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

.card-foot { font-size: 12.5px; color: var(--ink-faint); }

.card-actions {
  display: flex; gap: 6px; margin-top: 2px;
  border-top: 1px solid var(--line); padding-top: 8px;
}
.card-actions .ghost {
  font: inherit; font-size: 12.5px; font-weight: 560; padding: 5px 9px;
  border-radius: 6px; border: none; background: transparent;
  color: var(--ink-soft); cursor: pointer; text-decoration: none;
}
.card-actions .ghost:hover { background: var(--bg); color: var(--ink); }
.card-actions .joinlink { color: var(--accent); }

.empty-state { text-align: center; padding: 44px 22px; }
.empty-state .empty-glyph { font-size: 34px; margin-bottom: 10px; }
.empty-state h2 { font-size: 17px; margin-bottom: 6px; }
.empty-state .hint { max-width: 380px; margin: 0 auto; }

.backlink { font-size: 13px; color: var(--ink-faint); text-decoration: none; }
.backlink:hover { color: var(--accent); }

/* --------------------------------------------------------------- shell nav */

.navlinks { display: flex; gap: 2px; margin-left: 14px; }
.navlinks a {
  font-size: 13.5px; font-weight: 540; color: var(--ink-soft);
  text-decoration: none; padding: 5px 10px; border-radius: 6px;
}
.navlinks a:hover { background: var(--panel); color: var(--ink); }
.navlinks a.on { color: var(--accent); background: var(--accent-soft); font-weight: 620; }

/* ------------------------------------------------------------ simple tables */

.rowlist { display: flex; flex-direction: column; }
.rowitem {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 2px; border-bottom: 1px solid var(--line);
}
.rowitem:last-child { border-bottom: none; }
.rowitem .grow { flex: 1; min-width: 0; }
.rowitem .rname { font-weight: 600; font-size: 14.5px; }
.rowitem .rmeta { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.rowitem .ractions { display: flex; gap: 4px; flex: none; }
.rowitem .ractions button {
  font-size: 12.5px; padding: 5px 9px; border-radius: 6px;
  border: 1px solid transparent; background: transparent; color: var(--ink-soft);
}
.rowitem .ractions button:hover { background: var(--bg); border-color: var(--line); color: var(--ink); }
.rowitem.is-archived { opacity: .55; }

.tag {
  font-size: 10.5px; font-weight: 660; letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink-faint); white-space: nowrap;
}
.tag.admin { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.tag.pending { background: var(--if-bg); color: var(--if); border-color: var(--if); }
.tag.off { background: var(--no-bg); color: var(--no); border-color: var(--no); }

.searchbar { margin-bottom: 14px; }

/* people-picker inside the create wizard */
.picker { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.picker button {
  font-size: 13px; padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg); color: var(--ink-soft);
}
.picker button:hover { border-color: var(--accent); color: var(--accent); }
.picker button.added { opacity: .45; cursor: default; }
.picker button.added:hover { border-color: var(--line-strong); color: var(--ink-soft); }
.picker .none { font-size: 12.5px; color: var(--ink-faint); }

.radioline {
  display: flex; gap: 9px; align-items: flex-start;
  font-weight: 400; font-size: 13.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.radioline:hover { border-color: var(--line-strong); }
.radioline input { width: auto; flex: none; margin-top: 2px; }
.radioline b { color: var(--ink); font-weight: 620; }
.radioline:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.card-actions .danger { color: var(--no); }
.card-actions .danger:hover { background: var(--no-bg); color: var(--no); border-color: var(--no); }
.archived-toggle { margin: 26px 0 0; }
.card.is-archived { opacity: .72; border-style: dashed; }

#recapBody { font-size: 14px; }
#recapBody .rtitle { font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
#recapBody .rnote { color: var(--ink-soft); margin-top: 4px; }
#recapBody .rpeople { color: var(--ink-soft); margin-top: 8px; }
#recapBody .rpeople b { color: var(--ink); font-weight: 600; }
#recapBody .nomail { color: var(--if); }
.skeleton { color: var(--ink-faint); padding: 40px 0; text-align: center; }

@media (max-width: 640px) {
  .wrap { padding: 20px 14px 60px; }
  .row { flex-direction: column; gap: 10px; }
  .board-scroll { margin: 0 -14px; padding: 0 14px; }
  /* The tagline is charm, not information — it costs a whole line on a phone. */
  .masthead .tagline { display: none; }
  .cards { grid-template-columns: 1fr; }
}
.whoami, .whoami button { white-space: nowrap; }
