:root {
  /* Tokens taken from homeinvest.com (navy, gold, Inter body, pill buttons). */
  --navy-black: #1d1d25;
  --navy-dark: #303149;
  --navy-light: #455085;
  --navy-sky: #c9d2ff;
  --navy-cloud: #f0f4fa;
  --gold-soft: #d3ab64;
  --gold-punch: #eab65c;
  --sunshine: #f4e4b0;
  --clay: #f6f6f2;
  --paper: #fbfbfa;
  --white: #fff;
  --muted: #6b6c7e;
  --line: #e4e4de;
  --navy: var(--navy-black);
  --sky: var(--navy-sky);
  --cloud: var(--navy-cloud);
  --gold: var(--gold-soft);
  --danger: #455085;
  --ok: #1f6b45;
  --shadow: 0 24px 60px rgba(29, 29, 37, 0.08);
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", system-ui, sans-serif;
  --font: var(--font-body);
  --radius-card: 0px;
  --radius-control: 0px;
  --radius-button: 999px;
  --button-height: 48px;
  --meta: 280px;
  --slots: 250px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--navy);
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(244, 228, 176, 0.7), transparent 60%),
    radial-gradient(800px 400px at 100% 0%, rgba(201, 210, 255, 0.55), transparent 55%),
    var(--clay);
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--navy-light); outline-offset: 2px; }

.app { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
body[data-embed="true"] { background: transparent; }
body[data-embed="true"] .app { max-width: none; width: 100%; padding: 0; }
body[data-embed="true"] .booker { width: 100%; max-width: none; }
.banner {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--sunshine); color: var(--navy);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
  font-size: 14px; line-height: 1.45;
}
.banner strong { font-weight: 650; }
.banner code { font-size: 12px; }

body[data-surface="internal"] { box-shadow: inset 0 6px 0 var(--gold); }
.booker {
  background: var(--white);
  border: 1px solid var(--navy-sky);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: var(--meta) minmax(0, 1fr);
  min-height: 640px;
  overflow: hidden;
  position: relative;
}
.sticker {
  display: inline-flex;
  align-self: flex-start;
  background: var(--gold);
  color: var(--navy);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--navy);
  transform: rotate(-2deg);
}
.booker.show-slots { grid-template-columns: var(--meta) minmax(0, 1fr) var(--slots); }
.meta {
  padding: 28px 24px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--paper), var(--white));
  display: flex; flex-direction: column; gap: 14px;
}
.logo { width: auto; height: 44px; display: block; }
.kicker { margin: 8px 0 0; color: var(--navy-light); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.meta h1 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; margin: 0; font-weight: 500; letter-spacing: -0.03em; color: var(--navy-dark); }
.meta p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.meta .welcome-hello { color: var(--navy-dark); font-size: 26px; line-height: 1.2; }
.meta .your-advisor-kicker { color: var(--navy-light); font-size: 14px; }
.meta .your-advisor-name { color: var(--navy-black); font-size: 20px; line-height: 1.3; }
.meta .your-advisor-note { color: var(--muted); font-size: 15px; line-height: 1.55; }
.fact { display: flex; gap: 8px; align-items: center; font-size: 14px; font-weight: 550; }
.dot { width: 8px; height: 8px; border-radius: 99px; background: var(--gold); display: inline-block; }
.selection {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 14px; display: grid; gap: 4px;
}
.selection strong { font-size: 15px; }
.advisor-field {
  display: grid; gap: 8px; margin-top: 8px;
  font-size: 13px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--navy-light);
}
.advisor-field select {
  width: 100%; height: 48px; padding: 0 12px;
  border: 1px solid var(--navy-sky); border-radius: 0; background: var(--white); color: var(--navy-black); font-size: 16px;
}
.advisor-field select:hover { border-color: var(--gold-soft); }
.advisor-note { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

.main { padding: 18px 18px 22px; min-width: 0; display: flex; flex-direction: column; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav h2 { margin: 0; font-size: 18px; min-width: 11ch; letter-spacing: -0.02em; }
.next-available { padding: 6px 10px; font-size: 13px; }
.zone-note { flex: 1 0 100%; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.icon-btn, .seg button, .slot, .day, .primary, .ghost {
  border: 1px solid var(--line); background: var(--white); border-radius: 10px;
}
.icon-btn { width: 34px; height: 34px; }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.advisors { display: none; }
.linkish { padding: 0; border: 0; background: transparent; text-decoration: underline; border-radius: 0; }
.edit-details { align-self: flex-start; margin-top: 8px; }
.seg { display: flex; padding: 3px; gap: 2px; background: var(--clay); border-radius: 12px; }
.seg button { border: 0; background: transparent; padding: 7px 10px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--white); color: var(--navy); box-shadow: 0 1px 2px rgba(29, 29, 37, 0.08); }
.controls { display: flex; gap: 8px; align-items: center; }
select, .hour-toggle {
  border: 1px solid var(--line); background: var(--white); border-radius: 10px; padding: 8px 10px; font-size: 13px;
}
.hour-toggle { font-weight: 650; }

.month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; align-items: stretch; }
.dow, .day { text-align: center; }
.dow { font-size: 12px; color: var(--muted); padding: 6px 0 8px; font-weight: 600; }
.day {
  height: 72px; min-height: 72px; width: 100%; box-sizing: border-box;
  border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
}
.day.pad { border: 0; background: transparent; height: auto; min-height: 0; padding: 0; align-self: stretch; }
.day.skel {
  border: 0; height: 72px; min-height: 72px; color: transparent;
  background: linear-gradient(90deg, var(--navy-cloud) 25%, var(--paper) 50%, var(--navy-cloud) 75%);
  background-size: 200% 100%;
  animation: skel 1.1s ease-in-out infinite;
}
@keyframes skel { to { background-position: -200% 0; } }
.day:disabled { cursor: default; }
.day.open {
  background: var(--white);
  border-color: #ead9b0;
  height: 72px; min-height: 72px;
}
.day.open:hover { border-color: var(--gold-punch); background: #fffaf0; }
.day.open .day-num { font-size: 16px; font-weight: 750; }
.day.is-past, .day.is-unavailable {
  opacity: 0.38;
  height: 72px; min-height: 72px;
  border-color: transparent;
  background: transparent;
  color: #9a9bab;
}
.day.is-unavailable.today {
  opacity: 1;
  border: 1px solid var(--navy-light);
  box-shadow: none;
  background: var(--paper);
}
.day.is-past .day-num, .day.is-unavailable .day-num { font-size: 12px; font-weight: 500; }
.day.open[aria-pressed="true"] {
  background: var(--navy); color: white; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold);
}
.day.open[aria-pressed="true"].today { box-shadow: 0 0 0 3px var(--gold); }
.day small { width: 6px; height: 6px; border-radius: 99px; background: var(--gold-punch); }
.day.open[aria-pressed="true"] small { background: var(--sunshine); }
.day-num { font-weight: 600; font-size: 14px; }

.slots { border-left: 1px solid var(--line); padding: 18px 14px; overflow: auto; max-height: 720px; }
.slots h3 { margin: 0 0 10px; font-size: 14px; }
.slot-list { display: grid; gap: 8px; }
.slot {
  width: 100%; text-align: left; padding: 10px 12px; display: flex; justify-content: space-between; align-items: center; font-weight: 600;
}
.slot:hover { border-color: var(--navy-light); }
.slot.is-selected, .slot[aria-pressed="true"] {
  background: var(--navy); color: white; border-color: var(--navy); box-shadow: 0 0 0 3px var(--gold);
}
.slot span { font-weight: 500; color: var(--muted); font-size: 12px; }
.slot.is-selected span, .slot[aria-pressed="true"] span { color: var(--sky); }
.empty { color: var(--muted); font-size: 14px; line-height: 1.45; }

.week-scroll, .column-scroll { overflow-x: auto; max-width: 100%; min-width: 0; padding-bottom: 8px; }
.week { display: grid; min-width: 760px; position: relative; }
.week-head, .week-row { display: grid; grid-template-columns: 64px repeat(7, 1fr); }
.week-head { position: sticky; top: 0; background: white; z-index: 2; }
.week-head div, .col-head { text-align: center; font-size: 12px; color: var(--muted); padding: 6px 2px 10px; }
.week-head strong, .col-head strong { display: block; color: var(--navy); font-size: 14px; }
.week-head .today strong, .col-head.today strong { box-shadow: inset 0 -2px 0 var(--gold); }
.week-head .is-unavailable, .day-col.is-unavailable, .column.is-unavailable { opacity: 0.45; }
.week-body { position: relative; display: grid; grid-template-columns: 64px repeat(7, 1fr); }
.hours { position: relative; }
.hour-label {
  position: absolute; left: 0; right: 6px; text-align: right; white-space: nowrap;
  font-size: 11px; color: var(--muted); transform: translateY(-50%);
}
.day-col { position: relative; border-left: 1px solid var(--line); }
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid #efefe8; }
.block {
  position: absolute; left: 4px; right: 4px; border: 0; border-radius: 8px;
  background: var(--cloud); color: var(--navy); font-size: 12px; font-weight: 650; overflow: hidden;
}
.block:hover { background: var(--sky); }
.block.is-selected, .block[aria-pressed="true"] { background: var(--navy); color: white; box-shadow: 0 0 0 2px var(--gold); }
.columns { display: flex; gap: 10px; min-width: max-content; }
.column { width: 168px; }
.col-head { background: var(--paper); border-radius: 12px; margin-bottom: 8px; }
.column .slot { font-size: 13px; }

.form, .result { max-width: 460px; display: grid; gap: 12px; }
label { display: grid; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy-dark); }
.consent {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 450;
  font-size: 14px;
  line-height: 1.45;
}
.consent input { width: 18px; height: 18px; margin-top: 2px; }
.disclosure { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.consent a, .disclosure a { color: var(--navy-light); text-underline-offset: 2px; }
input {
  height: var(--button-height); border: 1px solid var(--navy-sky); border-radius: var(--radius-control); padding: 0 16px; background: var(--paper); font-weight: 400; font-size: 16px; color: var(--navy-dark);
}
input::placeholder { color: var(--muted); }
input:focus { outline: 2px solid var(--navy-light); outline-offset: 2px; background: var(--paper); }
.row-actions { display: flex; gap: 8px; align-items: center; }
.primary {
  background: var(--sunshine); color: var(--navy-black); border: 0; height: var(--button-height); padding: 0 24px; border-radius: var(--radius-button); font-weight: 600; font-size: 16px;
  transition: background 0.3s;
}
.primary:hover { background: var(--gold-punch); }
.primary:disabled { opacity: 0.7; cursor: wait; }
.ghost { padding: 0 16px; height: var(--button-height); border-radius: var(--radius-button); background: transparent; border: 1px solid var(--navy-sky); }
.form-error { color: var(--danger); font-size: 13px; margin: 0; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.45; }
.picked-time { margin: 0; font-weight: 700; }
.mismatch {
  border: 1px solid var(--gold);
  background: #fbf6ea;
  border-radius: 16px;
  padding: 18px;
  display: grid;
  gap: 12px;
  max-width: 560px;
}
.mismatch h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.mismatch p { margin: 0; line-height: 1.45; }

.result h2 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.why { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.why header { padding: 10px 12px; background: var(--paper); font-weight: 700; font-size: 14px; }
.why table { width: 100%; border-collapse: collapse; font-size: 13px; }
.why th, .why td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line); }
.why tr.selected { background: #f8f3e6; }
.pill { display: inline-block; border-radius: 99px; padding: 2px 8px; background: var(--clay); font-size: 12px; }

.fairness { margin-top: 22px; }
.fairness h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.03em; }
.fairness .lead { color: var(--muted); margin: 0 0 14px; max-width: 70ch; line-height: 1.5; }
.panels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.panel h3 { margin: 0 0 8px; font-size: 14px; line-height: 1.35; }
.panel p { color: var(--muted); font-size: 12px; line-height: 1.4; min-height: 2.8em; }
.bar-row { display: grid; grid-template-columns: 72px 1fr auto; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.track { height: 10px; background: var(--clay); border-radius: 99px; overflow: hidden; }
.track span { display: block; height: 100%; border-radius: 99px; }
.track .doug { background: var(--navy-light); }
.track .sergio { background: var(--navy); }
.track .mark { background: var(--gold); }
.former { margin-top: 10px; color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .booker, .booker.show-slots { grid-template-columns: 1fr; }
  .meta, .slots { border: 0; border-top: 1px solid var(--line); }
  .panels { grid-template-columns: 1fr; }
  .booker { min-height: 0; }
}
@media (max-width: 720px) {
  .app { padding: 10px 8px 36px; }
  .booker { border-radius: 16px; }
  .meta { padding: 16px 14px; gap: 10px; }
  .meta h1 { font-size: 22px; }
  .logo { height: 36px; width: auto; }
  .welcome-hello { font-size: 22px; }
  .your-advisor-note { max-width: none; }
  .main { padding: 12px 10px 16px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .nav h2 { min-width: 0; font-size: 16px; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .controls { width: 100%; }
  .controls select { flex: 1; min-width: 0; }
  .dow { font-size: 11px; padding: 4px 0; }
  .day, .day.open, .day.is-past, .day.is-unavailable, .day.skel { min-height: 48px; height: 48px; }
  .column { width: 132px; }
  .advisors { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .advisors button { flex: 0 0 auto; }
  .mismatch { padding: 14px; }
  .mismatch h2 { font-size: 18px; }
}
