:root {
  --page: #f6f7f9; --card: #ffffff; --line: #e3e5e8; --line-2: #eef0f2;
  --ink: #1d2126; --ink-2: #474c53; --muted: #6f747b; --faint: #9a9fa6;
  --accent: #1f4fd6; --accent-hi: #183fb0; --accent-bg: #eaf0fe;
  --green: #22844a; --green-hi: #1b6c3c; --green-bg: #e7f4ec;
  --red: #c9352f; --red-hi: #a82b26; --red-bg: #fcecea;
  --amber: #9a6200; --amber-bg: #fdf3df;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --r: 8px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #121417; --card: #1b1e22; --line: #2c3036; --line-2: #24282d;
    --ink: #eceef1; --ink-2: #c4c8ce; --muted: #9298a0; --faint: #6c727a;
    --accent: #6d93ff; --accent-hi: #8eacff; --accent-bg: #1d2740;
    --green: #3fb36b; --green-hi: #57c47f; --green-bg: #17301f;
    --red: #ef6b63; --red-hi: #f4867f; --red-bg: #3a1d1b;
    --amber: #e3a640; --amber-bg: #3a2c12;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --page: #121417; --card: #1b1e22; --line: #2c3036; --line-2: #24282d;
  --ink: #eceef1; --ink-2: #c4c8ce; --muted: #9298a0; --faint: #6c727a;
  --accent: #6d93ff; --accent-hi: #8eacff; --accent-bg: #1d2740;
  --green: #3fb36b; --green-hi: #57c47f; --green-bg: #17301f;
  --red: #ef6b63; --red-hi: #f4867f; --red-bg: #3a1d1b;
  --amber: #e3a640; --amber-bg: #3a2c12;
  --shadow: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--page); color: var(--ink); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--accent); }
kbd { font: 600 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 2px 5px; border-radius: 4px; border: 1px solid currentColor; opacity: .7; }
.boot { padding: 48px 16px; text-align: center; color: var(--muted); }
svg { width: 18px; height: 18px; flex: none; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; background: var(--card); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1180px; margin: 0 auto; padding: 0 16px; height: 56px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.brand i { width: 26px; height: 26px; border-radius: 7px; background: var(--accent); display: grid; place-items: center; color: #fff; }
.brand i svg { width: 15px; height: 15px; }
.brand span { color: var(--muted); font-weight: 500; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 6px; }
.nav a.on { background: var(--accent-bg); color: var(--accent); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 12px; min-width: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill.ok { background: var(--green-bg); color: var(--green); } .pill.ok i { background: var(--green); }
.pill.warn { background: var(--amber-bg); color: var(--amber); } .pill.warn i { background: var(--amber); }
.who { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lnk { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: 13px; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 20px 16px 64px; }
.banner { background: var(--amber-bg); color: var(--amber); border-radius: var(--r); padding: 10px 14px; font-size: 14px; margin-bottom: 16px; }
.banner b { color: inherit; }

/* today */
.today { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-bottom: 16px; }
.goal { flex: 1 1 320px; min-width: 0; }
.goal-t { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }
.goal-t b { color: var(--ink); }
.bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 999px; transition: width .4s; }
.counts { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.counts b { color: var(--ink); }

.grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .grid { grid-template-columns: minmax(0, 1fr); } }

/* the business card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 22px; min-width: 0; }
.head { display: flex; gap: 14px; align-items: flex-start; }
.av { width: 46px; height: 46px; border-radius: 12px; background: var(--accent-bg); color: var(--accent); font-weight: 700; display: grid; place-items: center; flex: none; font-size: 16px; }
.nm { min-width: 0; flex: 1; }
.nm h1 { font-size: 22px; line-height: 1.2; margin: 0 0 3px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.nm p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.nm p span { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip svg { width: 13px; height: 13px; }
.chip.a { background: var(--accent-bg); color: var(--accent); }
.chip.wait { background: var(--amber-bg); color: var(--amber); }
.chip.cb { background: var(--green-bg); color: var(--green); }
.why { margin: 16px 0 0; padding: 12px 14px; background: var(--page); border-radius: var(--r); font-size: 14px; color: var(--ink-2); }
.why b { color: var(--ink); }
.why .mut { color: var(--muted); font-size: 12.5px; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.facts a { font-weight: 600; text-decoration: none; }
.facts a:hover { text-decoration: underline; }
.hist { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line-2); }
.hist li { padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; color: var(--ink-2); }
.hist li span { color: var(--muted); }
.lbl { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }

.num { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.num .n { font-size: 20px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.num svg { color: var(--muted); }
.num input { height: 38px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; font: inherit; background: var(--card); color: var(--ink); min-width: 0; width: 180px; }
.btn { height: 38px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--faint); }

.go { margin-top: 16px; width: 100%; height: 56px; border: 0; border-radius: 10px; background: var(--green); color: #fff; font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.go:hover:not(:disabled) { background: var(--green-hi); }
.go svg { width: 20px; height: 20px; }
.go kbd { border-color: rgba(255, 255, 255, .7); color: #fff; opacity: .85; }
.sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); text-align: center; }
.sub .lnk { font-size: 13px; }

.live { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.st { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 17px; font-weight: 700; }
.st .tm { font-variant-numeric: tabular-nums; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse 1.4s infinite; }
.ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .dot, .ring { animation: none; } }
.ctl { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.cb { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 64px; }
.cb .c { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); }
.cb.on .c { background: var(--accent-bg); color: var(--accent); }
.cb.end .c { background: var(--red); color: #fff; }
.cb.end:hover .c { background: var(--red-hi); }
.pad { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; justify-content: center; margin-top: 14px; }
.pad .dt { grid-column: 1 / -1; text-align: center; font: 600 16px ui-monospace, Menlo, monospace; min-height: 22px; color: var(--ink-2); }
.pad button { height: 44px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); font-size: 17px; font-weight: 600; }

.wrapup { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.wh { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 12px; }
.wh b { font-size: 16px; }
.wh span { font-size: 13px; color: var(--muted); }
.outs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.out { display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 14px; }
.out kbd { opacity: .55; }
.out:hover { border-color: var(--faint); }
.out.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.out.green.on { border-color: var(--green); background: var(--green-bg); color: var(--green); }
.out.red.on { border-color: var(--red); background: var(--red-bg); color: var(--red); }
.extra { margin-top: 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 600; }
.preset.on { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.extra input[type="datetime-local"], .extra input[type="email"] { height: 36px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 10px; font: inherit; background: var(--card); color: var(--ink); margin-top: 8px; max-width: 100%; }
.extra input[type="email"] { width: 320px; }
.extra small { display: block; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.note { width: 100%; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical; background: var(--card); color: var(--ink); }
.nx { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.save { margin-top: 12px; width: 100%; height: 48px; border: 0; border-radius: 10px; background: var(--accent); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 10px; }
.save:hover:not(:disabled) { background: var(--accent-hi); }
.save kbd { border-color: rgba(255, 255, 255, .7); color: #fff; }
.upnext { margin: 12px 4px 0; font-size: 13.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.upnext b { color: var(--ink-2); }

.empty { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 40px 24px; text-align: center; }
.empty b { display: block; font-size: 18px; margin-bottom: 6px; }
.empty p { margin: 4px 0; color: var(--muted); }

/* the script */
.script { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; position: sticky; top: 76px; }
.script h2 { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.script ol { margin: 0; padding: 0 0 0 20px; }
.script li { margin: 0 0 8px; font-size: 14.5px; }
.script h3 { font-size: 13px; color: var(--muted); margin: 16px 0 6px; font-weight: 700; }
.ifs { margin: 0; padding: 0; list-style: none; }
.ifs li { padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.ifs b { display: block; color: var(--ink); }
.ifs span { color: var(--ink-2); }
.ifs em { display: block; color: var(--muted); font-style: normal; font-size: 12.5px; margin-top: 2px; }
.keys { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* sign in */
.login { max-width: 360px; margin: 10vh auto 0; padding: 0 16px; }
.login .card { padding: 28px; }
.login h1 { font-size: 20px; margin: 14px 0 4px; }
.login p { margin: 0 0 18px; color: var(--muted); font-size: 14px; }
.login label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--ink-2); }
.login input { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; font: inherit; background: var(--card); color: var(--ink); }
.login button[type="submit"] { margin-top: 18px; width: 100%; height: 44px; border: 0; border-radius: var(--r); background: var(--accent); color: #fff; font-weight: 700; font-size: 15px; }
.err { color: var(--red); font-size: 13.5px; margin-top: 10px; min-height: 18px; }

/* team page */
.team h2 { font-size: 15px; margin: 28px 0 10px; }
.team h2:first-child { margin-top: 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.tile b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tbl { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th.n { text-align: right; }
td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .mut { color: var(--muted); }
.none { padding: 18px; color: var(--muted); font-size: 14px; }
.mini { display: inline-block; height: 8px; background: var(--accent); border-radius: 4px; vertical-align: middle; margin-right: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--card); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: .2s; max-width: calc(100% - 32px); z-index: 50; }
#toast.on { opacity: 1; transform: translateX(-50%); }

/* the Emailed tab */
.em-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 14px; }
.em-head h1 { margin: 0; font-size: 22px; letter-spacing: -.015em; }
.em-head p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.em-q { height: 38px; width: 320px; max-width: 100%; border: 1px solid var(--line); border-radius: var(--r); padding: 0 12px; font: inherit; background: var(--card); color: var(--ink); }
.em-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.em-n { color: var(--muted); font-weight: 500; margin-left: 2px; }
.preset.on .em-n { color: inherit; opacity: .75; }
.em-list { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.em-t td { vertical-align: top; }
.em-mail { color: var(--ink-2); overflow-wrap: anywhere; }
.em-t a { text-decoration: none; font-weight: 600; }
.em-t a:hover { text-decoration: underline; }
.mut { color: var(--muted); font-size: 12.5px; }
.em-tag { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.em-tag.ok { background: var(--green-bg); color: var(--green); }
.em-tag.bad { background: var(--red-bg); color: var(--red); }
.em-tag.wait { background: transparent; color: var(--muted); padding-left: 0; }
.em-foot { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.nav { overflow-x: auto; scrollbar-width: none; }
.nav a { white-space: nowrap; }
@media (max-width: 760px) {
  .top-in { flex-wrap: wrap; height: auto; padding-block: 8px; row-gap: 6px; }
  .nav { order: 3; width: 100%; }
  .em-t thead { display: none; }
  .em-t, .em-t tbody, .em-t tr, .em-t td { display: block; width: 100%; }
  .em-t tr { padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
  .em-t td { padding: 2px 0; border: 0; }
  .em-t td[data-l]:not([data-l="Business"])::before { content: attr(data-l) ": "; color: var(--muted); font-size: 12.5px; }
}

@media (max-width: 640px) {
  .top-in { gap: 10px; }
  .brand span, .who { display: none; }
  .card { padding: 16px; }
  .nm h1 { font-size: 19px; }
  .num input { width: 100%; }
  .extra input[type="email"] { width: 100%; }
}
