/* Specter Scheduler (book.specterlabs.co.uk): the app's look (src/ui/tokens.css). San Francisco, the serif wordmark, Apple's greys, one
   centred card with three panes (event, month, times) that stack on a phone; light and dark with the Mac or phone. Black is the one action. */
:root {
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wordmark: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --bg: #f5f5f7; --card: #ffffff; --inset: #f5f5f7; --hover: rgba(0, 0, 0, .04);
  --label: #1d1d1f; --label-2: #6e6e73; --label-3: #aeaeb2; --sep: rgba(0, 0, 0, .09);
  --avail: rgba(0, 0, 0, .055); --ink: #1d1d1f; --on-ink: #ffffff; --red: #d70015;
  --shadow: 0 1px 1px rgba(0, 0, 0, .03), 0 8px 28px rgba(0, 0, 0, .07);
  --focus: rgba(0, 113, 227, .45);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000; --card: #1c1c1e; --inset: #2c2c2e; --hover: rgba(255, 255, 255, .06);
    --label: #f5f5f7; --label-2: #98989d; --label-3: #545458; --sep: rgba(255, 255, 255, .1);
    --avail: rgba(255, 255, 255, .09); --ink: #f5f5f7; --on-ink: #000000; --red: #ff453a;
    --shadow: 0 0 0 1px rgba(255, 255, 255, .06); --focus: rgba(10, 132, 255, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; align-items: center; background: var(--bg); color: var(--label);
  font-family: var(--sf); font-size: 15px; line-height: 1.47; letter-spacing: -.012em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  padding: max(28px, env(safe-area-inset-top)) 16px max(28px, env(safe-area-inset-bottom)); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* the brand line */
.top { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 1040px; margin: 4px 0 36px; }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 1.4px solid var(--label); font-family: var(--wordmark); font-size: 17px; line-height: 1; padding-top: 1px; }
.wordmark { font-family: var(--wordmark); font-size: 19px; letter-spacing: .01em; }
.product { font-size: 15px; font-weight: 500; color: var(--label-2); letter-spacing: -.01em; padding-left: 2px; }

/* the card */
.sched { position: relative; width: 100%; max-width: 1040px; display: grid; grid-template-columns: 320px minmax(0, 1fr) 236px; background: var(--card);
  border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; min-height: 520px; animation: rise .45s var(--ease) both; }
.sched[data-view="form"] { grid-template-columns: 320px minmax(0, 1fr); }
.sched[data-view="done"] { grid-template-columns: minmax(0, 1fr); min-height: 420px; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sched { animation: none; } }
.pane { padding: 32px; min-width: 0; }
.pane + .pane { border-left: 1px solid var(--sep); }
.sched[data-view="done"] .event { display: none; }

/* left: the event */
.host { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: var(--label-2); font-weight: 500; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); font-family: var(--wordmark); font-size: 17px; }
h1 { margin: 0 0 14px; font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: -.028em; line-height: 1.12; }
.facts { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 9px; color: var(--label-2); font-weight: 500; }
.facts li { display: flex; align-items: center; gap: 10px; }
.facts .chosen { color: var(--label); }
.nopressure { margin: 0 0 12px; font-size: 16px; font-weight: 600; letter-spacing: -.016em; }
.desc { margin: 0 0 26px; color: var(--label-2); }
.tz { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.select { position: relative; display: block; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border: solid var(--label-2); border-width: 0 1.6px 1.6px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
select { width: 100%; appearance: none; -webkit-appearance: none; border: 1px solid var(--sep); border-radius: 11px; background: var(--inset); padding: 10px 36px 10px 12px; font-size: 14px; font-weight: 500; }

/* middle: the month */
.cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
h2 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.arrows { display: flex; gap: 6px; }
.arrows button { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--avail); color: var(--label); transition: background .15s var(--ease); }
.arrows button:disabled { background: transparent; color: var(--label-3); cursor: default; }
.dow, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.dow { margin-bottom: 6px; }
.dow span { text-align: center; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--label-2); }
.grid { row-gap: 6px; }
.day { justify-self: center; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--label-3); font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums; position: relative; cursor: default; }
.day.avail { background: var(--avail); color: var(--label); font-weight: 650; cursor: pointer; transition: background .15s var(--ease), transform .12s var(--ease); }
.day.avail:hover { background: var(--hover); box-shadow: inset 0 0 0 1.5px var(--label); }
.day[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); box-shadow: none; }
.day.today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.day.pad { visibility: hidden; }

/* right: the times */
.times-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 18px; }
h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.012em; }
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--avail); }
.seg button { border: 0; background: transparent; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 600; color: var(--label); }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--label); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.overlay { display: flex; justify-content: space-between; align-items: center; margin: -6px 0 14px; font-size: 13px; color: var(--label-2); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.slot { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--sep); background: transparent; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.slot:hover { border-color: var(--label); }
.slot:active { background: var(--ink); color: var(--on-ink); }
.none { margin: 0; color: var(--label-2); }

/* the form, in the card */
.form-pane h2 { margin: 6px 0 22px; font-size: 22px; }
.back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; margin: 0 0 4px -4px; color: var(--label-2); font-size: 14px; font-weight: 500; }
form { display: grid; gap: 16px; max-width: 560px; }
label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; color: var(--label-2); }
.opt { font-weight: 400; color: var(--label-2); }
input, textarea { width: 100%; border: 1px solid var(--sep); border-radius: 11px; background: var(--inset); padding: 11px 13px; font-size: 16px; font-weight: 400; color: var(--label); outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease); }
input:focus, textarea:focus { border-color: var(--label); background: var(--card); }
textarea { resize: vertical; min-height: 84px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ts:empty { display: none; }
.error { margin: 0; font-size: 14px; color: var(--red); }
.error:empty { display: none; }
.primary { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 26px; border-radius: 980px; border: 0; background: var(--ink); color: var(--on-ink);
  font-size: 16px; font-weight: 600; letter-spacing: -.012em; transition: transform .12s var(--ease), opacity .15s var(--ease); justify-self: start; min-width: 200px; }
.primary:active { transform: scale(.98); }
.primary[disabled] { opacity: .5; cursor: default; }

/* done, in the card */
.done-pane { display: grid; place-content: center; justify-items: center; text-align: center; padding: 64px 32px; }
.tick { width: 60px; height: 60px; margin-bottom: 22px; border-radius: 50%; background: var(--ink); position: relative; }
.tick::after { content: ""; position: absolute; left: 22px; top: 16px; width: 13px; height: 24px; border: solid var(--on-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.done-pane h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; margin-bottom: 10px; }
.when { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -.018em; }
.muted { margin: 0; color: var(--label-2); max-width: 420px; }

.loading, .empty { position: absolute; inset: auto 0 18px 0; margin: 0; text-align: center; color: var(--label-2); font-size: 14px; }
.sched:not([aria-busy="true"]) .loading { display: none; }

/* under the button */
.fine { margin: 0; max-width: 520px; font-size: 13px; line-height: 1.45; color: var(--label-2); }
.fine a, .doc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.fine a:hover, .doc a:hover { color: var(--label); }
.vh { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* the legal row */
.legal { width: 100%; max-width: 1040px; margin-top: 22px; display: grid; gap: 6px; justify-items: center; text-align: center; font-size: 12px; line-height: 1.5; color: var(--label-2); }
.legal nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 0; }
.legal a { display: inline-block; padding: 4px 0; color: inherit; text-decoration: none; }
.legal a:hover { color: var(--label); text-decoration: underline; }
.legal nav a + a::before { content: "·"; display: inline-block; padding: 0 8px; }
.legal p { margin: 0; }

/* the legal pages: one plain card, no script */
.home { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.doc { width: 100%; max-width: 720px; padding: 36px 40px 40px; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); }
.doc h1 { margin: 12px 0 16px; }
.doc h2 { margin: 28px 0 8px; font-size: 18px; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 4px; }
.doc .draft { display: inline-block; margin: 0; padding: 4px 11px; border-radius: 980px; background: var(--avail); font-size: 13px; font-weight: 600; }
.doc .updated { color: var(--label-2); font-size: 13px; }
.doc .stop { padding: 12px 14px; border-radius: 12px; background: var(--inset); }
.doc code { font-size: 13px; }
.doc table { width: 100%; margin: 4px 0 14px; border-collapse: collapse; font-size: 14px; }
.doc th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 0 10px 6px 0; }
.doc td { vertical-align: top; padding: 8px 10px 8px 0; border-top: 1px solid var(--sep); overflow-wrap: anywhere; }
.doc th:last-child, .doc td:last-child { padding-right: 0; }

/* a phone: the panes stack (event, calendar, times), nothing sideways */
@media (max-width: 860px) {
  body { padding-top: max(18px, env(safe-area-inset-top)); }
  .top { margin-bottom: 20px; }
  .sched, .sched[data-view="form"] { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .pane { padding: 24px 20px; }
  .pane + .pane { border-left: 0; border-top: 1px solid var(--sep); }
  .sched[data-view="form"] .event { padding-bottom: 18px; }
  .sched[data-view="form"] .event .nopressure, .sched[data-view="form"] .event .desc, .sched[data-view="form"] .event .tz { display: none; }
  h1 { font-size: 26px; }
  .day { width: 40px; height: 40px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .primary { justify-self: stretch; }
  .loading, .empty { position: static; padding: 18px; }
  .doc { padding: 24px 20px 28px; }
  .legal nav { gap: 2px 16px; } /* on a phone the links wrap: no dot left hanging at the start of a line */
  .legal nav a + a::before { content: none; }
}
@media (max-width: 360px) { .day { width: 36px; height: 36px; } }
