:root {
  --bg: #f6f6f4;
  --card: #ffffff;
  --text: #1c1c1a;
  --muted: #6b6b66;
  --line: #e4e4df;
  --accent: #2f5bea;
  --accent-soft: #e8eefe;
  --accent-text: #ffffff;
  --danger: #b42318;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --card: #1b1b1a;
    --text: #ededea;
    --muted: #9b9b95;
    --line: #2c2c2a;
    --accent: #6e8eff;
    --accent-soft: #1f2843;
    --accent-text: #0b0b0a;
    --danger: #f97066;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.shell { max-width: 960px; margin: 0 auto; padding: 48px 16px; }
.muted { color: var(--muted); }

.brand {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 24px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em;
}
.brand img { display: block; }
h1 { font-size: 26px; line-height: 1.2; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 17px; margin: 0 0 12px; }
a { color: var(--accent); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

/* Index: meeting types */
.types { display: grid; gap: 12px; margin-top: 24px; }
.type-link {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; transition: border-color .15s;
}
.type-link:hover, .type-link:focus-visible { border-color: var(--accent); outline: none; }
.type-link strong { display: block; font-size: 16px; }
.pill { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* Booking layout */
.booker { display: grid; grid-template-columns: 260px 1fr; gap: 0; padding: 0; overflow: hidden; }
.booker > section { padding: 24px; min-width: 0; }
.booker .about { border-right: 1px solid var(--line); }
.meta { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; color: var(--muted); font-size: 14px; }
.picker { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 24px; }

.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-head button { background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; width: 32px; height: 32px; cursor: pointer; }
.month-head button:disabled { opacity: .35; cursor: default; }
.grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.grid .dow { font-size: 12px; color: var(--muted); padding: 4px 0; }
.day {
  aspect-ratio: 1; border: 0; border-radius: 999px; background: none;
  color: var(--muted); font: inherit; cursor: default;
}
.day.open { background: var(--accent-soft); color: var(--accent); font-weight: 600; cursor: pointer; }
.day.open:hover { outline: 2px solid var(--accent); }
.day.selected { background: var(--accent); color: var(--accent-text); }

.times { display: grid; gap: 8px; align-content: start; max-height: 420px; overflow-y: auto; }
.times h3 { font-size: 14px; margin: 0 0 4px; font-weight: 600; }
.time {
  border: 1px solid var(--accent); color: var(--accent); background: none;
  border-radius: 8px; padding: 10px; font: inherit; font-weight: 600; cursor: pointer;
}
.time:hover, .time.selected { background: var(--accent); color: var(--accent-text); }
.tz { margin-top: 16px; font-size: 13px; color: var(--muted); }

/* Form */
form { display: grid; gap: 14px; max-width: 420px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input, textarea {
  font: inherit; color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
textarea { min-height: 90px; resize: vertical; }
.choices { display: flex; gap: 8px; flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span {
  display: inline-block; border: 1px solid var(--line); border-radius: 8px;
  padding: 9px 14px; font-weight: 500; cursor: pointer;
}
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.primary {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 8px;
  padding: 12px 18px; font: inherit; font-weight: 600; cursor: pointer; justify-self: start;
}
.primary:disabled { opacity: .6; cursor: default; }
.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.error { color: var(--danger); font-size: 14px; margin: 0; }

.done { max-width: 520px; margin: 0 auto; text-align: center; }
.done .when { font-size: 18px; font-weight: 600; margin: 12px 0 4px; }

@media (max-width: 760px) {
  .shell { padding: 24px 16px; }
  .brand { margin-bottom: 20px; }
  .booker { grid-template-columns: 1fr; }
  .booker .about { border-right: 0; border-bottom: 1px solid var(--line); }
  .picker { grid-template-columns: minmax(0, 1fr); }
  .times { max-height: none; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .times h3 { grid-column: 1 / -1; }
}
