:root {
  --bg: #080808;
  --bg-soft: #0f0f10;
  --panel: #111111;
  --panel-strong: #151515;
  --panel-muted: #0d0d0d;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #f3f3f3;
  --text-soft: #9b9b9f;
  --success: #d6d6d6;
  --error: #ff9a9a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 220px),
    linear-gradient(180deg, #0d0d0d 0%, #080808 100%);
  color: var(--text);
  font-family: "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  overflow-x: clip;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.24;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  width: min(820px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 56px;
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero {
  padding: 16px 2px 24px;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 14px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

h1,
h2 {
  margin: 0;
  font-weight: 700;
}

h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1rem;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.intro,
.panel p,
.status,
.steps {
  color: var(--text-soft);
  line-height: 1.7;
}

.intro {
  max-width: 62ch;
  font-size: 0.95rem;
}

.panel {
  position: relative;
  margin-top: 16px;
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  min-width: 0;
}

.panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.28), transparent 38%);
}

.panel-muted {
  background: var(--panel-muted);
}

.panel-accent {
  background: var(--panel-strong);
  border-color: var(--line-strong);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-header > div {
  min-width: 0;
}

.panel-header.tight {
  margin-bottom: 12px;
}

.text-link {
  display: inline-block;
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}

.resource-links {
  display: grid;
  gap: 10px;
}

.resource-link {
  display: block;
  padding: 12px 14px;
  border: 1px solid var(--line);
  background: #0b0b0b;
  color: var(--text);
  text-decoration: none;
}

.resource-link::before {
  content: "> ";
  color: var(--text-soft);
}

.resource-link:hover {
  border-color: var(--line-strong);
  background: #121212;
}

.calendar-shell {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #ffffff;
  width: 100%;
  max-width: 100%;
}

#calendar-embed {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 680px;
  border: 0;
  filter: grayscale(1) contrast(1.02);
}

.setup-note {
  padding: 14px 16px;
  border: 1px dashed var(--line);
  background: #0e0e0f;
  color: var(--text-soft);
}

.setup-note code {
  padding: 1px 6px;
  background: #1a1a1b;
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.booking-form label {
  display: grid;
  gap: 8px;
  color: #f7f7f7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.input-shell {
  position: relative;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #121213;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.input-shell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 45%);
  pointer-events: none;
}

.booking-form input,
.booking-form select,
.booking-form textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border: 0;
  background: transparent;
  color: #ffffff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 0;
}

.booking-form input,
.booking-form select,
.booking-form textarea,
.button {
  font-size: 16px;
}

.booking-form select,
.booking-form input[type="date"],
.booking-form input[type="time"] {
  min-height: 50px;
}

.booking-form select {
  padding-right: 54px;
}

.booking-form input[type="date"],
.booking-form input[type="time"] {
  color-scheme: dark;
  position: relative;
  min-width: 0;
}

.input-shell-select::after,
.input-shell-date::after,
.input-shell-time::after {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
  font-size: 0.9rem;
}

.input-shell-select::after {
  content: "[v]";
}

.input-shell-date::after {
  content: "[cal]";
}

.input-shell-time::after {
  content: "[24h]";
}

.booking-form input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 48px;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.booking-form input[type="time"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 52px;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.booking-form input[type="date"]::-webkit-datetime-edit,
.booking-form input[type="date"]::-webkit-datetime-edit-fields-wrapper,
.booking-form input[type="date"]::-webkit-datetime-edit-text,
.booking-form input[type="date"]::-webkit-datetime-edit-month-field,
.booking-form input[type="date"]::-webkit-datetime-edit-day-field,
.booking-form input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text);
}

.booking-form input[type="time"]::-webkit-datetime-edit,
.booking-form input[type="time"]::-webkit-datetime-edit-fields-wrapper,
.booking-form input[type="time"]::-webkit-datetime-edit-text,
.booking-form input[type="time"]::-webkit-datetime-edit-hour-field,
.booking-form input[type="time"]::-webkit-datetime-edit-minute-field {
  color: var(--text);
}

.booking-form input::placeholder,
.booking-form textarea::placeholder {
  color: #a4a4aa;
}

.booking-form input:not([type="date"]):not([type="hidden"]) {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #121213;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus,
.input-shell:focus-within {
  outline: none;
  border-color: rgba(255, 255, 255, 0.58);
}

.input-shell:focus-within {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.08);
}

.booking-form textarea {
  min-height: 120px;
  resize: vertical;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #121213;
}

.booking-form option {
  background: #111111;
  color: var(--text);
}

.full-width {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  margin-top: 16px;
}

.callout {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: #0c0c0d;
}

.callout strong {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.callout p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: #f2f2f2;
  color: #070707;
  cursor: pointer;
  font-weight: 700;
  text-transform: lowercase;
  max-width: 100%;
}

.button:hover {
  background: #dcdcdc;
}

.status[data-state="success"] {
  color: var(--success);
}

.status[data-state="error"] {
  color: var(--error);
}

.steps {
  margin: 12px 0 0;
  padding-left: 18px;
}

.steps li + li {
  margin-top: 8px;
}

.flow-chart {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  min-width: 0;
}

.flow-step {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  background: #0b0b0b;
  min-width: 0;
  justify-items: center;
  text-align: center;
}

.flow-step strong {
  font-size: 0.96rem;
  letter-spacing: 0.06em;
}

.flow-step span:last-child {
  color: var(--text-soft);
  line-height: 1.6;
}

.flow-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  margin-bottom: 4px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  background: #161616;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
}

.flow-connector {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.flow-line {
  width: 2px;
  height: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.56));
}

.flow-arrow {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 700;
}

.flow-arrow-right {
  display: none;
}

.flow-arrow-down {
  display: inline;
}

.hidden-frame {
  width: 0;
  height: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page {
    width: min(820px, calc(100% - 20px));
    padding-top: 16px;
    padding-bottom: 36px;
  }

  .panel {
    padding: 18px;
    margin-top: 14px;
  }

  .panel-header {
    flex-direction: column;
    gap: 12px;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(1.65rem, 9vw, 2.2rem);
    line-height: 1.08;
  }

   h2 {
    font-size: 0.95rem;
  }

  .hero {
    padding: 10px 2px 18px;
  }

  .eyebrow {
    margin-bottom: 10px;
    padding: 6px 8px;
    font-size: 0.7rem;
  }

  .intro,
  .panel p,
  .status,
  .steps,
  .flow-step span:last-child {
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .text-link {
    font-size: 0.82rem;
  }

  .calendar-shell {
    margin-inline: -1px;
  }

  .booking-form {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  #calendar-embed {
    min-height: 440px;
  }

  .booking-form label {
    gap: 7px;
    font-size: 0.76rem;
  }

  .booking-form input,
  .booking-form select,
  .booking-form textarea {
    padding: 14px 13px;
  }

  .booking-form select {
    padding-right: 48px;
  }

  .button {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
  }

  .actions {
    align-items: stretch;
  }

  .steps {
    padding-left: 26px;
  }

  .flow-chart {
    gap: 10px;
  }

  .flow-step {
    padding: 16px;
  }

  .flow-step strong {
    font-size: 0.9rem;
  }

  .flow-number {
    min-width: 24px;
    height: 24px;
    font-size: 0.78rem;
  }

  .flow-arrow {
    font-size: 0.86rem;
  }

  .callout {
    margin-top: 18px;
    padding: 16px;
  }

  .resource-link {
    padding: 14px 15px;
  }

  .setup-note {
    padding: 16px;
  }
}

@media (min-width: 760px) {
  .flow-chart {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
  }

  .flow-step {
    height: 100%;
    align-content: start;
  }

  .flow-connector {
    grid-auto-flow: column;
    align-items: center;
    gap: 8px;
  }

  .flow-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.56));
  }

  .flow-arrow-right {
    display: inline;
  }

  .flow-arrow-down {
    display: none;
  }
}
