/* Alvy · la web pública. Misma identidad que el producto (agendify/web/DESIGN.md): piedra cálida, teal de marca,
   Plus Jakarta Sans y el vocabulario de estados de la cita (sólido, contorno, punteado, rayado) como firma. */

@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/plus-jakarta-sans-latin-800.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --stone: #f5f5f4;
  --surface: #ffffff;
  --surface-2: #fafaf9;
  --ink: #1c1917;
  --muted: #57534e;
  --line: #e7e5e4;
  --line-strong: #d6d3d1;
  --teal: #0a6b63;
  --teal-hover: #08584f;
  --teal-soft: #e5f0ee;
  --deep: #063f3a;
  --deep-2: #0b4d47;
  --on-deep: #f2fbf9;
  --on-deep-muted: #b6d8d2;
  --mint: #6ee7d3;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --danger: #b91c1c;
  /* WhatsApp, con sus colores reales */
  --wa-wall: #efeae2;
  --wa-out: #d9fdd3;
  --wa-time: #54656f;
  --wa-link: #027eb5;
  --wa-note: #fdf3d5;
  --r-control: 8px;
  --r-card: 14px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--stone);
  -webkit-font-smoothing: antialiased;
  caret-color: var(--teal);
  scrollbar-color: var(--line-strong) var(--stone);
}

::selection { background: color-mix(in oklab, var(--teal) 22%, transparent); color: var(--ink); }

h1, h2, h3 { margin: 0; font-weight: 800; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--teal); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-hover); }
img, svg { display: block; }
time, dd, .tabular { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.section--deep :focus-visible, .close :focus-visible { outline-color: var(--mint); }

.sprite { display: none; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-control); font-weight: 700; }
.skip:focus { top: 12px; }
.skip:hover, .skip:focus { color: #fff; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-control); border: 1px solid transparent;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color 120ms var(--ease), border-color 120ms var(--ease), color 120ms var(--ease), transform 120ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn--primary { background: var(--teal); color: #fff; }
.btn--primary:hover { background: var(--teal-hover); color: #fff; }
.btn--quiet { color: var(--ink); padding-inline: 12px; }
.btn--quiet:hover { color: var(--teal); }
.btn--line { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--line:hover { border-color: var(--teal); color: var(--teal); }
.btn--light { background: #fff; color: var(--deep); }
.btn--light:hover { background: var(--teal-soft); color: var(--deep); }
.btn--ghost-light { border-color: rgb(255 255 255 / 0.35); color: var(--on-deep); }
.btn--ghost-light:hover { border-color: #fff; color: #fff; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Encabezado */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--stone) 94%, transparent); border-bottom: 1px solid var(--line); }
.top__row { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -0.03em; }
.brand:hover { color: var(--ink); }
.top__nav { display: flex; gap: 4px; margin-left: auto; }
.top__nav a { padding: 8px 12px; border-radius: var(--r-control); color: var(--muted); font-size: 15px; font-weight: 700; text-decoration: none; }
.top__nav a:hover { color: var(--ink); background: color-mix(in oklab, var(--ink) 5%, transparent); }
.menu { display: none; position: relative; }
.menu summary { list-style: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-control); border: 1px solid var(--line-strong); cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 8px; display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 12px 32px rgb(28 25 23 / 0.12); }
.menu nav a { padding: 10px 12px; border-radius: var(--r-control); color: var(--ink); font-weight: 700; text-decoration: none; }
.menu nav a:hover { background: var(--stone); }

/* Portada */
.hero { padding-top: clamp(36px, 5vw, 64px); padding-bottom: clamp(48px, 7vw, 96px); overflow-x: clip; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 4.2vw, 4.6rem); line-height: 1.02; letter-spacing: -0.04em; max-width: 13ch; }
.lead { margin-top: 24px; max-width: 58ch; font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); color: var(--muted); }
.hero .actions { margin-top: 28px; }
.tuck { margin-left: -0.07em; }
.hero__price { margin-top: 16px; font-size: 15px; color: var(--muted); }
.hero__price b { color: var(--ink); }
@media (min-width: 1024px) {
  .hero__copy { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: end; }
  .hero__aside .lead { margin-top: 0; }
  .hero .board { margin-top: 48px; }
}

.board {
  position: relative; margin-top: clamp(40px, 6vw, 72px);
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(72px, 150px) minmax(300px, 400px) minmax(0, 1fr); align-items: start;
  padding: 44px 0 36px 40px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.board__bar { position: absolute; top: 9px; left: 40px; display: flex; align-items: center; gap: 12px; }
.board__tag { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.board > .chat { grid-column: 1; }
.board > .day:not(.day--ghost) { grid-column: 3; }
.board > .day--ghost { grid-column: 4; width: 400px; margin-left: 24px; opacity: 0.45; }
.board__path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.board__path { transition: opacity 500ms var(--ease); }
.board__path.is-faded { opacity: 0; }
.board__path > path { fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 6 7; }
.board__replay { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 3px 10px; white-space: nowrap; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.board__replay:hover { color: var(--teal); border-color: var(--teal); }
.board__replay[hidden] { display: none; }
.board__replay .ico { width: 15px; height: 15px; }

@media (min-width: 1100px) {
  /* El tablero sigue más allá del borde: el viernes ya empieza a llenarse. */
  .board { margin-right: calc(50% - 50vw); border-right: 0; border-radius: var(--r-card) 0 0 var(--r-card); }
}

/* WhatsApp */
.chat { border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--wa-wall); font-size: 14.5px; line-height: 1.4; }
.chat__head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line); }
.chat__head b { display: block; font-size: 15px; }
.chat__head small { display: block; font-size: 12.5px; color: var(--wa-time); }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; font-size: 15px; flex: none; }
.avatar--grey { background: #78716c; }
.avatar--brand { background: #2563eb; }
.chat__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 12px; height: 352px; overflow: hidden; scroll-behavior: smooth; }
.chat__body.is-scrolled { mask-image: linear-gradient(transparent, #000 28px); }
.msg { position: relative; max-width: 86%; padding: 7px 10px 6px; border-radius: var(--r-control); background: var(--surface); box-shadow: 0 1px 0.5px rgb(11 20 26 / 0.13); }
.msg time { float: right; margin: 6px 0 -4px 10px; font-size: 12px; color: var(--wa-time); }
.msg--in { align-self: flex-start; }
.msg--out { align-self: flex-end; background: var(--wa-out); }
.msg__button { display: flex; align-items: center; justify-content: center; gap: 6px; clear: both; margin: 8px -10px -6px; padding: 9px 10px; border-top: 1px solid #e9edef; color: var(--wa-link); font-weight: 700; }
.msg__button .ico { width: 15px; height: 15px; }
.msg__quick, .msg__list { display: grid; clear: both; margin: 8px -10px -6px; }
.msg__quick span, .msg__list span { padding: 8px 10px; border-top: 1px solid #e9edef; color: var(--wa-link); font-weight: 700; text-align: center; }
.msg__list span { text-align: left; color: var(--ink); font-weight: 400; }
.chip { align-self: center; margin: 4px 0; padding: 4px 10px; border-radius: var(--r-control); background: rgb(255 255 255 / 0.9); color: var(--wa-time); font-size: 12.5px; font-weight: 700; box-shadow: 0 1px 0.5px rgb(11 20 26 / 0.13); }
.note { align-self: center; display: flex; gap: 8px; align-items: flex-start; max-width: 92%; margin-top: 6px; padding: 8px 12px; border-radius: var(--r-control); background: var(--wa-note); font-size: 13px; color: #54452a; }
.note .ico { width: 16px; height: 16px; margin-top: 1px; color: var(--teal); }

/* La agenda del día: el vocabulario de estados */
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; }
.day__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.day__head b { font-size: 20px; letter-spacing: -0.02em; }
.day__head span { font-size: 13px; font-weight: 700; color: var(--muted); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.slot {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  min-height: 56px; padding: 7px 10px; border: 1.5px solid var(--line); border-radius: var(--r-control); background: var(--surface);
  transition: border-color 360ms var(--ease), background-color 360ms var(--ease), box-shadow 600ms var(--ease);
}
.slot time { font-size: 14px; font-weight: 700; color: var(--muted); }
.slot span { min-width: 0; font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.slot span b { display: block; font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot--done { border-color: var(--ok); background: var(--ok-soft); }
.slot--waiting { border-color: var(--warn); }
.slot--free { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.slot--free span b { color: var(--muted); font-weight: 700; }
.slot--problem { border-color: var(--danger); background-image: repeating-linear-gradient(135deg, color-mix(in oklab, var(--danger) 14%, transparent) 0 4px, transparent 4px 8px); }

.mark { display: inline-flex; align-items: center; padding: 2px 10px; border: 1.5px solid; border-radius: 9999px; font-style: normal; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.mark--done { background: var(--ok); border-color: var(--ok); color: #fff; }
.mark--waiting { border-color: var(--warn); color: var(--warn); background: var(--surface); }
.mark--free { border-style: dashed; border-color: var(--line-strong); color: var(--muted); }
.mark--problem { border-color: var(--danger); color: var(--danger); background: var(--surface) repeating-linear-gradient(135deg, color-mix(in oklab, var(--danger) 18%, transparent) 0 4px, transparent 4px 8px); }

/* La cita que viaja del chat a la agenda */
.is-target .slot__free, .is-target .slot__who, .is-target .mark { display: none; }
.is-target[data-state="free"] { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.is-target[data-state="free"] .slot__free { display: block; }
.is-target[data-state="free"] .slot__free b { color: var(--muted); }
.is-target[data-state="waiting"] { border-color: var(--warn); background: var(--surface); }
.is-target[data-state="waiting"] .slot__who, .is-target[data-state="done"] .slot__who { display: block; }
.is-target[data-state="waiting"] .mark--waiting, .is-target[data-state="done"] .mark--done { display: inline-flex; animation: stamp 420ms var(--ease); }
.is-target.is-arriving { box-shadow: 0 0 0 4px color-mix(in oklab, var(--teal) 22%, transparent); }

@keyframes stamp { from { transform: scale(1.18); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
[data-step].is-hidden { display: none; }
[data-step].is-new { animation: rise 260ms var(--ease) both; transform-origin: bottom; }

/* Cifras */
.facts { padding-bottom: clamp(24px, 4vw, 48px); }
.strip { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.strip > div { padding: 18px 22px; border-left: 1px solid var(--line); }
.strip > div:first-child { border-left: 0; }
.strip dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.strip dd { margin: 4px 0 0; font-size: clamp(18px, 1.1rem + 0.5vw, 22px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }

/* Secciones */
.section { padding-block: clamp(72px, 9vw, 128px); }
.section--surface { background: var(--surface); border-block: 1px solid var(--line); }
.section h2, .close h2 { font-size: clamp(2rem, 1.3rem + 2.4vw, 3.1rem); line-height: 1.06; letter-spacing: -0.035em; max-width: 20ch; }
.head { margin-bottom: clamp(36px, 5vw, 56px); }
.sub { margin-top: 16px; max-width: 62ch; font-size: clamp(1.02rem, 0.98rem + 0.25vw, 1.15rem); color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); gap: clamp(40px, 7vw, 112px); align-items: center; }
.split--reverse { grid-template-columns: minmax(0, 1fr) minmax(300px, 440px); }

.notes { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; max-width: 58ch; }
.notes li { position: relative; padding-left: 22px; color: var(--muted); font-size: 15.5px; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.8em; width: 12px; height: 2px; background: var(--teal); }

/* Pasos del paciente (pestañas) */
.steps { display: grid; gap: 8px; margin-top: 36px; counter-reset: paso; }
.step {
  position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 14px; align-items: start;
  width: 100%; padding: 16px 18px; border: 1px solid transparent; border-radius: var(--r-card); background: transparent;
  font: inherit; color: inherit; text-align: left; cursor: pointer; overflow: hidden;
  transition: background-color 180ms var(--ease), border-color 180ms var(--ease);
}
.step::before {
  counter-increment: paso; content: counter(paso);
  grid-row: span 2; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px dashed var(--line-strong); color: var(--muted); font-size: 13px; font-weight: 800;
}
.step b { font-size: 17px; letter-spacing: -0.01em; }
.step span { display: block; margin-top: 2px; font-size: 15px; color: var(--muted); }
.step:hover { background: color-mix(in oklab, var(--surface) 70%, transparent); }
.step[aria-selected="true"] { background: var(--surface); border-color: var(--line); }
.step[aria-selected="true"]::before { border: 1.5px solid var(--teal); color: var(--teal); }
.step.is-past::before { background: var(--teal); border: 1.5px solid var(--teal); color: #fff; }
.step::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; visibility: hidden; }
.step.is-timing::after { visibility: visible; transform: scaleX(1); transition: transform var(--dwell, 5s) linear; }

.phone { justify-self: center; width: min(100%, 360px); padding: 10px; border-radius: 40px; background: var(--ink); }
.phone__screen { position: relative; height: 640px; border-radius: 30px; overflow: hidden; background: var(--wa-wall); }
.phone .pane { position: absolute; inset: 0; }
.chat--phone { height: 100%; border: 0; border-radius: 0; display: flex; flex-direction: column; }
.chat--phone .chat__head { padding-top: 22px; }
.chat--phone .chat__body { flex: 1; height: auto; justify-content: flex-end; }

.pane.is-active { animation: fade 240ms var(--ease) both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* La página de reserva, en miniatura */
.book { height: 100%; padding: 26px 18px 18px; background: var(--stone); display: flex; flex-direction: column; font-size: 14px; }
.book__brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.book__step { margin: 18px 0 8px; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.book__label { margin: 14px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.book__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.book__list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--muted); font-size: 13px; }
.book__list b { display: block; font-size: 14.5px; color: var(--ink); }
.book__list .is-picked { border-color: #2563eb; }
.book__list .is-picked .ico { color: #2563eb; }
.book__chips, .book__times { display: flex; flex-wrap: wrap; gap: 6px; }
.book__chips span, .book__times span { padding: 7px 12px; border: 1.5px solid var(--line); border-radius: var(--r-control); background: var(--surface); font-weight: 700; font-size: 13.5px; }
.book__times span { min-width: 64px; text-align: center; font-variant-numeric: tabular-nums; }
.book .is-picked { border-color: #2563eb; color: #1d4ed8; }
.book__chips .is-picked, .book__times .is-picked { background: #2563eb; color: #fff; }
.book__go { margin-top: auto; display: grid; place-items: center; min-height: 46px; border-radius: var(--r-control); background: #2563eb; color: #fff; font-weight: 700; }

/* El portal */
.app { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: 560px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface-2); overflow: hidden; }
.app__nav { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--line); background: var(--surface); }
.app__nav button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-control); background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; text-align: left; cursor: pointer; transition: background-color 120ms var(--ease), color 120ms var(--ease); }
.app__nav button:hover { background: var(--stone); color: var(--ink); }
.app__nav button[aria-selected="true"] { background: var(--teal-soft); color: var(--teal); }
.app__main { position: relative; padding: clamp(20px, 3vw, 32px); }
.app__tag { position: absolute; top: 20px; right: 24px; font-size: 13px; font-weight: 700; color: var(--muted); }
.app__title { margin-bottom: 16px; font-size: 24px; letter-spacing: -0.02em; }
.app__title span { margin-left: 8px; font-size: 15px; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.strip--app { margin-bottom: 16px; }
.strip--app dd small { margin-left: 6px; font-size: 13px; font-weight: 700; color: var(--ok); }
.slots--app .slot { grid-template-columns: 52px minmax(0, 1fr) auto auto; background-color: var(--surface); }
.slots--app .slot--done { background-color: var(--ok-soft); }
.slot__actions { display: flex; gap: 6px; }
.slot__actions button { min-height: 36px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--ink); font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer; transition: border-color 120ms var(--ease), transform 120ms var(--ease); }
.slot__actions button:hover { border-color: var(--teal); color: var(--teal); }
.slot__actions button:active { transform: scale(0.98); }
.slot__actions button[aria-pressed="true"], .slot__actions button[aria-pressed="true"]:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.slot .mark.is-stamped { animation: stamp 420ms var(--ease); }
.app__hint { margin-top: 12px; font-size: 14px; color: var(--muted); }

.wizard { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 8px; max-width: 560px; }
.wizard li { position: relative; display: grid; padding: 12px 14px 12px 48px; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); color: var(--muted); font-size: 14.5px; }
.wizard li b { color: var(--ink); font-size: 15px; }
.wizard li::before { content: ""; position: absolute; left: 14px; top: 14px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px dashed var(--line-strong); }
.wizard .is-done::before { border: 1.5px solid var(--teal); background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.wizard .is-current { border-color: var(--teal); }
.wizard .is-current::before { border: 1.5px solid var(--teal); }
.fake-btn { display: inline-grid; place-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--r-control); background: var(--teal); color: #fff; font-weight: 700; }

.search { display: flex; align-items: center; gap: 8px; max-width: 420px; min-height: 44px; margin-bottom: 14px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); color: var(--muted); font-size: 15px; }
.rows { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.rows li:first-child { border-top: 0; }
.rows li b { display: block; color: var(--ink); font-size: 15px; }
.rows--plain li b { display: inline; font-size: 16px; font-variant-numeric: tabular-nums; }

.points { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.points li { display: flex; gap: 10px; color: var(--muted); font-size: 15.5px; }
.points b { color: var(--ink); }
.points .ico { margin-top: 3px; color: var(--teal); }

.chat--card { max-width: 440px; justify-self: end; width: 100%; }
.chat--card .chat__body { height: auto; min-height: 260px; justify-content: flex-end; }

/* Costos: el campo teal profundo */
.section--deep { background: var(--deep); color: var(--on-deep); }
.section--deep .sub, .section--deep .fine { color: var(--on-deep-muted); }
.section--deep a { color: var(--mint); }
.costs { margin: 0; padding: clamp(20px, 3vw, 32px); border: 1px solid rgb(255 255 255 / 0.14); border-radius: var(--r-card); background: var(--deep-2); }
.costs figcaption { font-size: 15px; font-weight: 700; }
.costs__legend { display: flex; gap: 20px; margin: 8px 0 18px; font-size: 13.5px; color: var(--on-deep-muted); }
.key { display: inline-flex; align-items: center; gap: 8px; }
.key::before { content: ""; width: 12px; height: 12px; border-radius: 3px; }
.key--alvy::before { background: var(--mint); }
.key--menu::before { background: rgb(255 255 255 / 0.3); }
/* Columnas iguales: las dos barras de una fila se leen en la misma escala (S/ 300 = todo el ancho). */
.costs table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.costs thead th:first-child { width: 120px; }
.costs thead th { padding: 0 12px 10px 0; font-size: 13px; font-weight: 700; color: var(--on-deep-muted); text-align: left; }
.costs tbody th { padding: 12px 12px 12px 0; font-size: 16px; font-weight: 800; text-align: left; font-variant-numeric: tabular-nums; border-top: 1px solid rgb(255 255 255 / 0.1); }
.costs td { padding: 12px 16px 12px 0; border-top: 1px solid rgb(255 255 255 / 0.1); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { display: block; height: 14px; margin-bottom: 8px; border-radius: 3px; width: calc(var(--v) * 0.3333%); transition: width 900ms var(--ease); }
.bar--alvy { background: var(--mint); }
.bar--menu { background: rgb(255 255 255 / 0.3); }
.costs.is-waiting .bar { width: 0; }
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(32px, 4vw, 48px); }
.cols p { font-size: 15.5px; color: var(--on-deep-muted); }
.cols b { display: block; margin-bottom: 4px; color: var(--on-deep); font-size: 17px; }
.fine { margin-top: 28px; max-width: 90ch; font-size: 13.5px; color: var(--muted); }

/* Cómo empezamos */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: t; }
.timeline li { position: relative; padding-top: 52px; }
.timeline li::before { counter-increment: t; content: counter(t); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--teal); background: var(--stone); color: var(--teal); font-weight: 800; z-index: 1; }
.timeline li::after { content: ""; position: absolute; top: 18px; left: 44px; right: -16px; border-top: 1.5px dashed var(--line-strong); }
.timeline li:last-child::after { display: none; }
.timeline li:last-child::before { background: var(--teal); color: #fff; }
.timeline b { display: block; font-size: 18px; letter-spacing: -0.01em; }
.timeline span { display: block; margin-top: 6px; color: var(--muted); font-size: 15.5px; }

/* Precios */
.plans { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.plan { display: flex; flex-direction: column; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--stone); }
.plan h3 { font-size: 22px; letter-spacing: -0.02em; }
.plan__for { margin-top: 4px; color: var(--muted); font-size: 15px; }
.plan__price { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; }
.plan__price b { font-size: clamp(2.6rem, 2rem + 2vw, 3.5rem); letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.plan__price span { color: var(--muted); font-weight: 700; }
.plan__setup { margin: 8px 0 24px; font-size: 15px; color: var(--muted); }
.plan .btn { margin-top: auto; align-self: flex-start; min-width: 200px; }
.plan__both { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 16px 32px; padding: 28px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); }
.plan__both h3 { font-size: 17px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; color: var(--ink); line-height: 1.45; }
.checks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 11px no-repeat; }

.founders { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px; margin-top: 16px; padding: 24px 28px; border: 1px solid color-mix(in oklab, var(--teal) 30%, transparent); border-radius: var(--r-card); background: var(--teal-soft); }
.founders__slots { display: grid; grid-template-columns: repeat(5, 18px); gap: 6px; }
.founders__slots i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px dashed var(--teal); }
.founders h3 { font-size: 19px; letter-spacing: -0.01em; }
.founders p { margin-top: 4px; color: #2f4a46; font-size: 15.5px; }
.fine--dark { color: var(--muted); }

/* Datos: un registro, el dato primero */
.ledger { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ledger__rows { margin: 0; border-top: 1px solid var(--line-strong); }
.ledger__rows > div { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.ledger__rows dt { font-weight: 700; }
.ledger__rows dd { margin: 0; color: var(--muted); }

/* Preguntas */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq h2 { position: sticky; top: 96px; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; list-style: none; padding: 20px 40px 20px 0; font-size: 18px; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px; background: linear-gradient(currentColor, currentColor) center / 14px 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 14px no-repeat; color: var(--teal); transition: transform 180ms var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--teal); }
.faq details p { padding: 0 40px 22px 0; color: var(--muted); max-width: 62ch; }

/* Cierre */
.close { background: var(--deep); color: var(--on-deep); }
.close__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); gap: 48px; align-items: center; padding-block: clamp(72px, 9vw, 120px); }
/* La agenda de mañana, ya llena: la misma firma sobre el campo teal. */
.close__day { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.close .slot { border-color: rgb(255 255 255 / 0.22); background: rgb(255 255 255 / 0.05); }
.close .slot time, .close .slot span { color: var(--on-deep-muted); }
.close .slot span b { color: var(--on-deep); }
.close .slot--done { border-color: var(--mint); background: color-mix(in oklab, var(--mint) 12%, transparent); }
.close .slot--waiting { border-color: #fbbf77; }
.close .slot--free { border-style: dashed; background: transparent; }
.close .mark--done { background: var(--mint); border-color: var(--mint); color: var(--deep); }
.close .mark--waiting { background: transparent; border-color: #fbbf77; color: #fbd3a0; }
.close h2 { max-width: 16ch; }
.close p { margin-top: 16px; max-width: 52ch; font-size: 18px; color: var(--on-deep-muted); }
.close .actions { margin-top: 32px; }

/* Pie */
.foot { padding-block: 40px 56px; background: var(--stone); border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.foot__inner { display: grid; gap: 14px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot__links a, .foot p a { color: var(--muted); }
.foot__links a:hover, .foot p a:hover { color: var(--teal); }
.foot .brand { font-size: 19px; }

/* Páginas legales */
.legal { max-width: 760px; padding-block: 48px 80px; }
.legal h1 { font-size: clamp(2rem, 1.6rem + 1.6vw, 2.6rem); letter-spacing: -0.03em; }
.legal h2 { margin-top: 36px; font-size: 1.3rem; letter-spacing: -0.01em; }
.legal p, .legal li { margin-top: 12px; color: #3a3532; }
.legal ul, .legal ol { padding-left: 22px; }
.legal .meta { margin-top: 8px; color: var(--muted); }
.top__back { margin-left: auto; }
.legal a { overflow-wrap: anywhere; }

/* Ancho medio */
@media (max-width: 1099px) {
  .board { grid-template-columns: minmax(280px, 380px) minmax(64px, 1fr) minmax(280px, 400px); padding-right: 40px; }
  .board > .day--ghost { display: none; }
}
@media (max-width: 960px) {
  .top__nav { display: none; }
  .menu { display: block; }
  .top__row > .btn { margin-left: auto; }
  .plan__both { grid-template-columns: minmax(0, 1fr); }
  .ledger { grid-template-columns: minmax(0, 1fr); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 36px; }
  .timeline li:nth-child(2)::after { display: none; }
  .split, .split--reverse { grid-template-columns: minmax(0, 1fr); }
  .chat--card { justify-self: start; }
  .points { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  /* Los pasos del paciente: el celular justo debajo del título, para ver lo que cambia cada paso. */
  #como-funciona .split { display: flex; flex-direction: column; gap: 0; }
  #como-funciona .split__text { display: contents; }
  #como-funciona .phone { order: 3; margin-top: 32px; }
  #como-funciona .steps { order: 4; }
  #como-funciona .notes { order: 5; }
}
@media (max-width: 800px) {
  /* Celular: el chat arriba, la agenda abajo, y la cita baja de uno a otra. */
  .board { grid-template-columns: minmax(0, 1fr); row-gap: 72px; padding: 44px 16px 52px; }
  .board__bar { left: 16px; }
  .board > .chat, .board > .day:not(.day--ghost) { grid-column: 1; }
  .chat__body { height: 380px; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip > div:nth-child(3) { border-left: 0; }
  .strip > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .app__nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .app__nav button { flex: none; min-height: 40px; padding: 0 10px; }
  .app__tag { position: static; display: inline-block; margin-bottom: 12px; }
  .slots--app .slot { grid-template-columns: 48px minmax(0, 1fr) auto; }
  .slots--app .slot__actions { grid-column: 2 / -1; }
  .cols { grid-template-columns: minmax(0, 1fr); }
  .faq { grid-template-columns: minmax(0, 1fr); }
  .faq h2 { position: static; }
  .close__inner { grid-template-columns: minmax(0, 1fr); }
  .close__day { display: none; }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .founders { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .founders .btn { justify-self: start; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .plans { grid-template-columns: minmax(0, 1fr); }
  .checks { grid-template-columns: minmax(0, 1fr); }
  .ledger__rows > div { grid-template-columns: minmax(0, 1fr); }
  .hero__more { display: none; }
  .board .chat__body { height: 300px; }
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .timeline li::after { display: none; }
  .phone { width: 100%; max-width: 340px; }
  .phone__screen { height: 600px; }
  .costs tbody th { width: 64px; }
  .costs td { padding-right: 10px; font-size: 14px; }
  .hero .actions .btn { width: 100%; }
  .top__row { gap: 12px; }
  .top__row > .btn--sm { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
