/*
  Cognitive Fab booking page.

  The palette, type stack and component shapes are lifted from the main site
  (index.html, tools/*.html) so /book does not read as a third-party widget.
  The site is dark-only — there is deliberately no prefers-color-scheme block,
  because a light variant here would not match anything else on the domain.

  Class and id names are load-bearing: app.js drives .duration[aria-checked],
  .slot[aria-pressed], .day-name, .slot-row, .empty and the #success panel.
  Rename nothing here without changing app.js too.
*/

:root {
  --bg: #0b1220;
  --bg-alt: #0f172a;
  --surface: #131c30;
  --surface-2: #0e1526;
  --border: #1e293b;
  --border-soft: #172032;
  --ink: #e2e8f0;
  --muted: #94a3b8;
  --faint: #64748b;
  --accent: #22d3ee;
  --accent-2: #818cf8;
  --accent-ink: #0b1220;
  --ok: #34d399;
  --err: #f87171;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* ---------------------------------------------------------------- site nav */

.site-nav {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(11, 18, 32, .82);
  backdrop-filter: blur(10px);
  z-index: 20;
}
.site-nav-in {
  max-width: 48rem; /* matches .shell so the brand aligns with the content column */
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 10px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { display: block; flex: none; }
.navlinks { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; }
.navlinks a {
  color: var(--muted);
  text-decoration: none;
  font-size: .92rem;
  transition: color .15s;
}
.navlinks a:hover { color: var(--accent); }
@media (max-width: 860px) { .navlinks { gap: 14px; font-size: .86rem; } }
@media (max-width: 620px) { .navlinks { display: none; } }

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

.shell { max-width: 48rem; margin: 0 auto; padding: 48px 24px 64px; }

.head { margin-bottom: 2rem; }
.eyebrow {
  display: inline-block;
  margin: 0 0 1rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, .4);
  background: rgba(34, 211, 238, .06);
  border-radius: 999px;
  padding: 6px 14px;
}
h1 {
  margin: 0 0 .5rem;
  font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -.02em;
}
.sub, .hint { margin: 0; color: var(--muted); font-size: .95rem; }
.hint { font-size: .86rem; }
/* the hint sits between the panel label and the day list — keep it off the first heading */
#tz-hint { margin-bottom: 1.25rem; }

/* ------------------------------------------------------------------ panels */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.label {
  margin: 0 0 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  font-family: var(--mono);
}

/* --------------------------------------------------------------- durations */

.durations { display: flex; flex-wrap: wrap; gap: 10px; }
.duration {
  flex: 1 1 8rem;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: .92rem;
  cursor: pointer;
  transition: border-color .16s, transform .16s, background .16s;
}
.duration:hover { border-color: var(--accent); transform: translateY(-1px); }
.duration[aria-checked="true"] {
  border-color: rgba(34, 211, 238, .45);
  background: linear-gradient(92deg, rgba(34, 211, 238, .18), rgba(129, 140, 248, .18));
  font-weight: 600;
}

/* ------------------------------------------------------------------- slots */

.days { display: grid; gap: 1.25rem; max-height: 28rem; overflow-y: auto; }
.day-name {
  margin: 0 0 .6rem;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
}
.slot-row { display: flex; flex-wrap: wrap; gap: 8px; }
.slot {
  padding: .55rem .85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}
.slot:hover { border-color: var(--accent); }
.slot[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

/* -------------------------------------------------------------------- form */

.field { margin-bottom: 1rem; }
label { display: block; margin-bottom: .4rem; font-size: .88rem; font-weight: 600; }
.optional { color: var(--faint); font-weight: 400; }
input, textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: .95rem;
  resize: vertical;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.primary {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid rgba(34, 211, 238, .45);
  border-radius: 10px;
  background: linear-gradient(92deg, rgba(34, 211, 238, .18), rgba(129, 140, 248, .18));
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .16s, transform .16s;
}
.primary:hover { border-color: var(--accent); transform: translateY(-1px); }
.primary[disabled] { opacity: .55; cursor: progress; transform: none; }

.chosen {
  margin: 0 0 1.25rem;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--accent);
  font-weight: 600;
  color: var(--ink);
}
.error { margin: 0 0 .85rem; color: var(--err); font-size: .9rem; }
.empty { color: var(--muted); font-size: .92rem; }

/* ----------------------------------------------------------------- success */

.success { border-color: rgba(52, 211, 153, .35); background: rgba(52, 211, 153, .06); }
.success h2 { margin: 0 0 .6rem; font-size: 1.25rem; color: var(--ok); }
.success p { margin: .3rem 0; color: var(--muted); }

a { color: var(--accent); }

/* ------------------------------------------------------------------ footer */

.site-foot {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
}
.site-foot-in {
  max-width: 48rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
}
.site-foot-in a { color: inherit; }
