:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --brand: #1d4ed8;
  --brand-soft: #dbeafe;
  --ok: #16a34a;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --max: 1180px;
}

.theme-slate { --brand: #334155; --brand-soft: #e2e8f0; }
.theme-teal { --brand: #0f766e; --brand-soft: #ccfbf1; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--brand); }
img { max-width: 100%; height: auto; display: block; }

.site-header, .page, .site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 0 10px;
}
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark { color: var(--brand); display: grid; place-items: center; }
.brand-name { margin: 0; font-weight: 700; }
.brand-tag, .header-contact { margin: 0; color: var(--muted); font-size: 0.92rem; }
.header-contact a { color: inherit; text-decoration: none; }

.page { padding-bottom: 48px; }
.site-footer {
  padding: 8px 0 32px;
  color: var(--muted);
  font-size: 0.9rem;
}
.prototype-note { font-size: 0.8rem; }

.course-hero, .meeting-hero, .selector, .booking-intro {
  margin: 18px 0 28px;
}
.course-hero {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 28px;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.cover {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  background: var(--brand-soft);
}
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--brand);
}
.course-kicker {
  margin: 0 0 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--muted);
}
.course-hero h1, .selector h1, .booking-title, .meeting-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.03em;
}
.course-lead, .lead, .booking-intro p { margin: 0 0 10px; color: var(--muted); }
.course-module {
  display: inline-flex;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 999px;
  color: var(--muted);
}

.steps {
  list-style: none;
  display: flex;
  gap: 22px;
  padding: 16px 0 0;
  margin: 0;
  color: var(--muted);
}
.steps li { display: flex; align-items: center; gap: 8px; }
.steps span {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e2e8f0;
  color: #334155;
  font-size: 0.85rem;
}
.steps .is-done { color: var(--ink); font-weight: 600; }
.steps .is-done span { background: #3f8f5b; color: white; }
.steps .is-pending { color: var(--muted); }
.steps .is-pending span { background: #e8c4c4; color: #7a3b3b; }

.board {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.card.is-done {
  background: #f3faf5;
  border-color: #d7ebe0;
}
.card.is-pending {
  background: #fdf6f6;
  border-color: #f0dede;
}
.card h2 { margin: 0 0 14px; font-size: 1.05rem; }

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.calendar-nav p { margin: 0; font-weight: 600; }
.icon-btn {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-decoration: none;
}
.icon-btn.is-disabled { color: var(--muted); pointer-events: none; }
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-head, .cal-day {
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
}
.cal-day {
  min-height: 42px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: inherit;
}
.cal-day.is-out { opacity: 0.35; }
.cal-day.is-selected {
  background: var(--brand);
  color: white;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  display: inline-block;
}
.cal-day.is-selected .dot { background: white; }
.legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding: 12px 0 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}
.dot.is-empty { background: #cbd5e1; }
.dot.is-out { background: #e2e8f0; }

.timezone, .data-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  margin-bottom: 12px;
}
select, input, textarea {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #f8fafc;
}
.day-label { font-weight: 600; margin: 4px 0 10px; }
.hours { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.hours li {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
}
.hour-link {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
}
.hours .is-selected { background: var(--brand-soft); border-color: var(--brand); }
.hours .avail { color: var(--muted); font-size: 0.85rem; display: flex; gap: 6px; align-items: center; }
.radio {
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
}
.hours .is-selected .radio {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 4px var(--brand);
}

.optional { color: var(--muted); font-weight: 400; }
.review {
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
  margin: 8px 0 12px;
}
.review p { margin: 0 0 4px; }
.review-kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.notice {
  background: #eff6ff;
  border-radius: 12px;
  padding: 10px 12px;
  color: #1e3a8a;
  font-size: 0.9rem;
}
.primary {
  width: 100%;
  border: 0;
  background: var(--brand);
  color: white;
  padding: 13px 16px;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary:disabled { opacity: 0.55; cursor: not-allowed; }
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.empty-hours { color: var(--muted); }
.success-layout {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.success-visual {
  border-radius: 24px;
  overflow: hidden;
  background: #0f2744;
  box-shadow: var(--shadow);
}
.success-visual img {
  width: 100%;
  height: auto;
  display: block;
}
.success-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.success-card h1 { margin: 0 0 10px; }
.success-page {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
}
.success-layout { grid-column: 1 / -1; }
.success-notice {
  grid-column: 2;
  margin: 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.success-facts { display: grid; gap: 12px; margin: 20px 0 0; }
.success-facts div { margin: 0; }
.success-facts dt { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.success-facts dd { margin: 2px 0 0; font-weight: 600; }

.alert {
  background: #fef3c7;
  color: #92400e;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #f59e0b;
  font-weight: 600;
}
input.is-invalid, textarea.is-invalid, .is-invalid {
  border-color: #d97706;
  background: #fffbeb;
}
.course-grid {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.course-card {
  display: grid;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shadow);
}
.course-card h2 { margin: 0 0 4px; font-size: 1.15rem; }
.course-card p { margin: 0; color: var(--muted); }

@media (max-width: 960px) {
  .board { grid-template-columns: 1fr; }
  .course-hero { grid-template-columns: 140px 1fr; }
  .success-page,
  .success-layout { grid-template-columns: 140px 1fr; }
}
@media (max-width: 640px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .course-hero { grid-template-columns: 1fr; }
  .success-page,
  .success-layout { grid-template-columns: 1fr; }
  .success-notice { grid-column: 1; }
  .success-visual { max-width: 220px; }
  .cover { max-width: 220px; }
  .steps { flex-direction: column; gap: 8px; }
  .hour-link { grid-template-columns: 1fr auto; }
  .hours .avail { display: none; }
}
