:root {
  color-scheme: light;
  --ink: #0b0b0d;
  --red: #c1121f;
  --red-dark: #941019;
  --warm: #f7f3ee;
  --bone: #efe8df;
  --paper: #fffdf9;
  --grey: #68666a;
  --line: #d8d0c7;
  --success: #226744;
  --focus: #2f67c8;
  --radius: 12px;
  --shadow: 0 18px 50px rgba(11, 11, 13, 0.08);
  font-family: Inter, "Noto Sans", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: var(--warm); color: var(--ink); }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--warm); }
button, input, textarea { font: inherit; }
a { color: inherit; }

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.96);
}
.identity { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.identity img { flex: 0 0 auto; }
.identity span { display: grid; gap: 2px; }
.identity strong { font-size: 15px; letter-spacing: 0.01em; }
.identity small { color: var(--grey); font-size: 12px; }
.text-link { font-size: 14px; text-underline-offset: 4px; }

.page-shell { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 76px 0 96px; }
.intro { max-width: 760px; margin-bottom: 52px; }
.intro.compact { margin-bottom: 38px; }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 12px; font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
h1 { max-width: 820px; margin-bottom: 18px; font-size: clamp(38px, 7vw, 74px); line-height: 0.98; letter-spacing: -0.055em; }
.intro.compact h1 { font-size: clamp(36px, 5vw, 58px); }
.intro > p:not(.eyebrow) { max-width: 700px; overflow-wrap: anywhere; color: var(--grey); font-size: clamp(17px, 2vw, 20px); line-height: 1.55; }
.timezone-line { margin-top: 20px !important; font-size: 14px !important; }

.notice { padding: 18px 20px; border-left: 4px solid var(--red); background: var(--bone); line-height: 1.5; }
.booking-flow, .settings-form { border-top: 1px solid var(--ink); }
.flow-section, .admin-section { display: grid; grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.5fr); gap: clamp(28px, 6vw, 84px); padding: 46px 0; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: 42px 1fr; gap: 14px; align-content: start; }
.section-heading h2 { margin-bottom: 8px; font-size: 24px; letter-spacing: -0.03em; }
.section-heading p { color: var(--grey); line-height: 1.5; }
.step-index { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: 50%; font-size: 11px; font-weight: 800; }

.type-list { display: grid; gap: 12px; }
.type-button { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 20px; text-align: left; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); cursor: pointer; }
.type-button:hover, .type-button[aria-pressed="true"] { border-color: var(--ink); box-shadow: var(--shadow); }
.type-button[aria-pressed="true"] { outline: 3px solid rgba(193, 18, 31, 0.16); }
.type-button strong { display: block; margin-bottom: 6px; font-size: 17px; }
.type-button span { color: var(--grey); line-height: 1.45; }
.type-button time { color: var(--red); font-size: 14px; font-weight: 800; white-space: nowrap; }

.slot-groups { display: grid; gap: 26px; }
.slot-day h3 { margin: 0 0 12px; font-size: 15px; text-transform: capitalize; }
.slot-list { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-button { min-width: 92px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; font-variant-numeric: tabular-nums; font-weight: 700; }
.slot-button:hover, .slot-button[aria-pressed="true"] { color: var(--paper); border-color: var(--red); background: var(--red); }
.muted, .field-help, .optional, .form-status { color: var(--grey); }

.booking-form, .settings-form label { display: grid; gap: 8px; }
.booking-form { gap: 20px; }
.booking-form label, .settings-form label { font-size: 14px; font-weight: 700; }
input, textarea { width: 100%; padding: 12px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(47, 103, 200, 0.35); outline-offset: 2px; }
.two-columns, .four-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field-help { margin: -10px 0 0; font-size: 12px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.consent { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 400 !important; line-height: 1.45; }
.consent input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--red); }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 11px 18px; border: 1px solid var(--ink); border-radius: 9px; text-decoration: none; cursor: pointer; font-weight: 800; }
.button.primary { color: white; border-color: var(--red); background: var(--red); }
.button.primary:hover { background: var(--red-dark); }
.button.secondary { margin-top: 24px; background: transparent; }
.button.danger { color: var(--red); border-color: var(--red); background: transparent; }
.button:disabled { opacity: 0.55; cursor: wait; }

.site-footer { display: flex; justify-content: space-between; gap: 30px; padding: 28px clamp(20px, 5vw, 72px); color: var(--grey); border-top: 1px solid var(--line); font-size: 12px; line-height: 1.5; }
.site-footer > span { min-width: 0; max-width: 100%; overflow-wrap: anywhere; text-wrap: pretty; }
.admin-shell { max-width: 1120px; }
.settings-form { display: block; }
.admin-section > :last-child { min-width: 0; }
.toggle { grid-template-columns: auto 1fr !important; align-items: start; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); }
.toggle input { width: 20px; height: 20px; accent-color: var(--red); }
.toggle span { display: grid; gap: 5px; }
.toggle small { color: var(--grey); font-weight: 400; }
.weekly-schedule { display: grid; gap: 10px; }
.weekday-row { display: grid; grid-template-columns: 100px 1fr 1fr; gap: 10px; align-items: center; }
.weekday-row strong { font-size: 14px; }
.weekday-heading { margin-bottom: -2px; color: var(--grey); font-size: 12px; }
.clock-input { min-width: 0; font-variant-numeric: tabular-nums; }
.meeting-type-editor { display: grid; gap: 14px; }
.meeting-type-row { display: grid; grid-template-columns: minmax(120px, 0.8fr) minmax(160px, 1.3fr) 110px auto; gap: 10px; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.meeting-type-row .description { grid-column: 1 / -1; }
.icon-button { min-height: 44px; padding: 8px 12px; color: var(--red); border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
.sticky-actions { position: sticky; bottom: 0; display: flex; align-items: center; gap: 16px; padding: 16px 0 max(16px, env(safe-area-inset-bottom)); background: rgba(247, 243, 238, 0.96); }

.manage-shell { min-height: calc(100vh - 78px); display: grid; place-items: center; }
.confirmation { width: min(680px, 100%); padding: clamp(28px, 6vw, 56px); border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.confirmation h1 { font-size: clamp(34px, 6vw, 56px); }
.confirmation-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 28px; color: white; border-radius: 50%; background: var(--success); font-size: 26px; }
.manage-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.alert-dialog { width: min(520px, calc(100% - 28px)); padding: 28px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); }
.alert-dialog::backdrop { background: rgba(11, 11, 13, 0.58); }
.alert-dialog h2 { margin-bottom: 10px; }
.alert-dialog p { color: var(--grey); line-height: 1.55; }

@media (max-width: 760px) {
  .page-shell { width: calc(100vw - 28px); max-width: calc(100vw - 28px); margin-inline: 14px; padding: 48px 0 72px; }
  .intro, .booking-flow, .flow-section, .type-list, .type-button { min-width: 0; max-width: 100%; }
  .site-header { min-height: 68px; padding: 12px 16px; }
  .identity img { width: 36px; height: 36px; }
  h1 { font-size: clamp(38px, 13vw, 58px); }
  .intro { margin-bottom: 36px; }
  .flow-section, .admin-section { grid-template-columns: 1fr; gap: 24px; padding: 34px 0; }
  .two-columns, .four-columns { grid-template-columns: 1fr; }
  .weekday-row { grid-template-columns: 88px minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .meeting-type-row { grid-template-columns: 1fr 100px; }
  .meeting-type-row label:first-child, .meeting-type-row .description { grid-column: 1 / -1; }
  .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: no-preference) {
  .type-button, .slot-button, .button { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease; }
}
