@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --paper: #f6f6ef;
  --ink: #1b2a24;
  --muted: #56635c;
  --line: #dbe1d8;
  --theme: #103e36;
  --accent: #d7f2ac;
  --soft: color-mix(in srgb, var(--theme) 7%, white);
  --font: Archivo, 'Segoe UI', sans-serif;
  font: 16px/1.5 var(--font);
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 2px solid #29876c; outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
small { font-size: 13px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend { padding: 0; margin-bottom: 9px; font-weight: 600; font-size: 14px; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; gap: 24px; align-items: center; justify-content: space-between; min-height: 72px; padding: 10px clamp(22px, 4.2vw, 66px); border-bottom: 1px solid var(--line); background: var(--paper); }
.wordmark, .mini-brand, .phone-brand, .side-brand, .clinic-brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.035em; text-decoration: none; white-space: nowrap; }
.wordmark { font-size: 23px; }
.brand-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: var(--accent); background: var(--theme); flex-shrink: 0; }
.brand-icon svg { width: 23px; height: 23px; }
.wordmark-meta { font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; padding-left: 12px; margin-left: 5px; border-left: 1px solid var(--line); }
.demo-label { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.demo-label > span, .signal { display: inline-block; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: #4b9171; }
.quiet { border: 0; background: transparent; padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.install { font-weight: 600; white-space: nowrap; }
.home { display: grid; grid-template-columns: minmax(370px, 45fr) minmax(0, 55fr); }
.intro { display: flex; flex-direction: column; justify-content: center; gap: 42px; padding: clamp(32px, 5vw, 78px) clamp(24px, 4.4vw, 72px); }
.eyebrow { color: var(--theme); font-weight: 600; font-size: 14px; margin-bottom: 17px; }
.intro h1 { font-weight: 500; font-size: clamp(45px, 5.3vw, 91px); line-height: .99; letter-spacing: -.075em; max-width: 11ch; text-wrap: balance; }
.lead { margin-top: 21px; color: var(--muted); max-width: 42ch; font-size: clamp(16px, 1.3vw, 20px); }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 14px; border: 1px solid transparent; border-radius: 8px; padding: 9px 14px; font-size: 14px; font-weight: 600; line-height: 1.35; text-decoration: none; background: var(--soft); transition: background .18s, border-color .18s, transform .18s; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary { background: var(--theme); color: white; }
.button.subtle { border-color: var(--line); background: transparent; }
.button.subtle:hover { background: var(--soft); }
.button.accent { background: var(--accent); color: var(--theme); }
.guided, .scenarios { max-width: 560px; }
.guided h2, .scenarios h2 { margin-bottom: 10px; font-size: 14px; font-weight: 600; }
.step-list { border-top: 1px solid var(--line); }
.step { border-bottom: 1px solid var(--line); }
.step > button { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 9px 0; text-align: left; border: 0; background: transparent; color: var(--muted); font-size: 15px; }
.step.selected > button { color: var(--theme); font-weight: 600; }
.step-detail { display: grid; gap: 4px; padding: 0 28px 12px 0; animation: reveal .22s ease-out; }
.step-detail strong { font-weight: 600; }
.step-detail p { color: var(--muted); font-size: 14px; }
.text-link { border: 0; padding: 2px 0; background: transparent; color: var(--theme); font-weight: 600; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; text-align: left; }
.brand-picker { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.brand-picker button { min-height: 55px; background: transparent; border: 1px solid var(--line); border-radius: 8px; text-align: left; padding: 8px 10px; font-size: 14px; font-weight: 600; }
.brand-picker button:hover, .brand-picker button[aria-pressed=true] { border-color: var(--theme); background: var(--soft); }
.brand-picker small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.stage { align-self: start; position: sticky; top: 72px; min-height: calc(100svh - 72px); display: grid; grid-template-rows: auto 1fr auto; padding: clamp(22px, 3.1vw, 48px); background: var(--theme); color: var(--accent); overflow: hidden; transition: background .28s; }
.stage-header, .stage-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.stage-header > span:first-child { display: flex; align-items: center; gap: 8px; }
.stage-header > span:last-child { opacity: .85; }
.signal { background: var(--accent); }
.stage-work { position: relative; isolation: isolate; align-self: center; min-height: clamp(415px, 40vw, 650px); display: grid; align-items: center; }
.mini-desk { width: min(92%, 610px); background: #eef3ec; border: 1px solid #dde7df; border-radius: 15px; color: var(--ink); overflow: hidden; transform: translateY(-32px); transition: transform .45s cubic-bezier(.2,.75,.2,1); }
.mini-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; font-size: 13px; color: var(--muted); }
.mini-brand { color: var(--ink); font-size: 14px; }
.mini-brand .brand-icon { width: 23px; height: 23px; border-radius: 6px; }
.mini-brand svg { width: 17px; height: 17px; }
.mini-page { margin: 0 7px 7px; padding: 17px; background: white; border: 1px solid #e4e8e1; border-radius: 11px; }
.mini-page h2 { font-size: 28px; font-weight: 600; letter-spacing: -.045em; margin-bottom: 12px; }
.mini-date { font-size: 13px; color: var(--muted); }
.mini-cols, .mini-row, .mini-empty { display: grid; grid-template-columns: 59px 1fr auto; align-items: center; gap: 8px; padding: 9px 0; border-bottom: 1px solid #ebeee9; font-size: 13px; }
.mini-cols, .mini-empty, .mini-row small { color: var(--muted); }
.mini-row strong, .mini-row small { display: block; }
.mini-row small { font-size: 12px; }
.mini-dot { width: 7px; height: 7px; background: #419578; border-radius: 50%; }
.mini-empty { border-bottom: 0; }
.phone { position: absolute; z-index: 2; right: 0; top: 50%; width: clamp(195px, 37%, 248px); background: #fafbf7; border: 5px solid #182721; border-radius: 27px; color: var(--ink); transform: translateY(-37%) rotate(-3deg); box-shadow: 0 16px 35px #14261d46; overflow: hidden; transition: transform .45s cubic-bezier(.2,.75,.2,1); }
.desk-first .phone { transform: translate(12px, -23%) scale(.82) rotate(2deg); }
.desk-first .mini-desk { position: relative; z-index: 3; transform: translateY(-49px) scale(1.045); }
.stage-work[data-step='0'] .phone, .stage-work[data-step='1'] .mini-desk, .stage-work[data-step='2'] { animation: stage-in .42s ease-out; }
@keyframes stage-in { from { opacity: .4; } to { opacity: 1; } }
.phone-notch { width: 35px; height: 5px; border-radius: 0 0 5px 5px; background: #182721; margin: 0 auto; }
.phone-brand { font-size: 15px; padding: 12px 13px 8px; }
.phone-brand .brand-icon { width: 23px; height: 23px; border-radius: 6px; }
.phone-brand svg { width: 16px; height: 16px; }
.phone-inner { padding: 11px 13px 17px; }
.phone-kicker { font-size: 12px; color: var(--muted); }
.phone-inner h2 { font-size: clamp(21px, 2.2vw, 32px); line-height: 1.06; letter-spacing: -.06em; font-weight: 600; margin: 5px 0 13px; }
.phone-service { display: grid; background: var(--soft); border-radius: 8px; padding: 8px; font-size: 12px; }
.phone-service small, .phone-service span { color: var(--muted); font-size: 12px; }
.phone-date { font-size: 12px; margin: 12px 0 6px; }
.phone-times { display: flex; gap: 4px; }
.phone-times span { border: 1px solid var(--line); border-radius: 4px; font-size: 11px; padding: 4px; }
.phone-times span:first-child { border-color: var(--theme); background: var(--soft); }
.phone-action { width: 100%; min-height: 32px; padding: 6px; margin-top: 10px; background: var(--theme); color: white; font-size: 12px; }
.stage-caption { border-top: 1px solid color-mix(in srgb, var(--accent) 33%, transparent); padding-top: 13px; }
.step-count { font-variant-numeric: tabular-nums; opacity: .85; }
.footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px; padding: 13px clamp(22px, 4.2vw, 66px); color: var(--muted); font-size: 13px; }
.footer a { text-underline-offset: 4px; }
.view-nav { display: flex; gap: clamp(15px, 2vw, 30px); align-items: center; padding: 0 clamp(20px, 4.2vw, 66px); border-bottom: 1px solid var(--line); overflow-x: auto; }
.view-nav a { padding: 12px 0 9px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.view-nav a[aria-current] { color: var(--ink); border-color: var(--theme); font-weight: 600; }
.app-shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 10px; padding: 16px 16px 16px 0; margin: 22px auto; width: min(1320px, calc(100% - 6vw)); min-height: 64vh; border-radius: 18px; background: var(--soft); }
.app-side { display: flex; flex-direction: column; padding: 20px 18px; gap: 10px; }
.side-brand { font-size: 19px; }
.app-side h1 { font-size: 20px; letter-spacing: -.04em; margin-top: 14px; }
.app-side p { color: var(--muted); font-size: 13px; }
.side-nav { display: grid; gap: 4px; margin-top: 9px; }
.side-button { padding: 8px 9px; text-align: left; background: transparent; border: 0; border-radius: 6px; font-size: 14px; }
.side-button[aria-pressed=true] { background: color-mix(in srgb, var(--theme) 10%, white); font-weight: 600; }
.side-button:hover { background: #fff9; }
.side-bottom { margin-top: auto; padding-top: 22px; }
.sheet { min-width: 0; padding: clamp(18px, 2.8vw, 38px); border: 1px solid #e7ebe5; border-radius: 16px; background: #fff; }
.sheet-title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 15px; margin-bottom: 20px; }
.sheet h2, .clinic-info h2 { font-size: clamp(22px, 2vw, 30px); letter-spacing: -.055em; font-weight: 600; }
.sheet-title p, .history-row p, .clinic-service p { color: var(--muted); font-size: 14px; }
.sheet h3 { font-size: 16px; margin: 20px 0 8px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 650px; }
label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
select { width: 100%; min-height: 40px; padding: 7px 9px; border: 1px solid #d2dad2; border-radius: 7px; background: #fff; font-size: 14px; font-weight: 400; }
.provider { display: flex; gap: 10px; align-items: center; margin: 17px 0 23px; }
.provider small, .agenda-row small { display: block; color: var(--muted); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; background: var(--soft); color: var(--theme); font-size: 13px; font-weight: 700; }
.days, .times { display: flex; flex-wrap: wrap; gap: 7px; }
.day, .time { border-radius: 7px; background: white; border: 1px solid var(--line); }
.day { min-width: 57px; display: grid; gap: 1px; padding: 6px 8px; }
.day strong { font-size: 18px; }
.day small { color: var(--muted); font-size: 12px; }
.time { font-variant-numeric: tabular-nums; min-height: 38px; padding: 5px 11px; font-size: 14px; }
.day:hover, .time:hover, .day[aria-pressed=true], .time[aria-pressed=true] { border-color: var(--theme); background: var(--soft); }
.booking-end { border-top: 1px solid var(--line); padding-top: 17px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.booking-end p { color: var(--muted); font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 9px; margin-bottom: 20px; }
.metrics div { padding: 10px 13px; display: grid; gap: 1px; }
.metrics div + div { border-left: 1px solid var(--line); }
.metrics span { color: var(--muted); font-size: 13px; }
.metrics strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.toolbar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.agenda-heading, .agenda-row { display: grid; grid-template-columns: 63px minmax(0, 1fr) 112px 118px; align-items: center; gap: 10px; padding: 9px 4px; }
.agenda-heading { color: var(--muted); font-size: 13px; }
.agenda-row, .history-row { border-top: 1px solid #e8ece6; font-size: 14px; min-height: 53px; }
.agenda-row time { font-variant-numeric: tabular-nums; font-weight: 600; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.status { width: fit-content; padding: 2px 7px; border-radius: 4px; font-size: 12px; background: #edf0eb; color: #425148; white-space: nowrap; }
.status.booked, .status.arrived, .status.closed { background: #e5f3e9; color: #245440; }
.status.pending { background: #fbefce; color: #694d18; }
.status.absent { background: #f7e7e3; color: #813b35; }
.status.blocked { background: #e6ebe8; color: #34463a; }
.danger { color: #813b35; }
.history-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; }
.history-row > :first-child { flex: 1 1 170px; }
.empty { padding: 14px 0; color: var(--muted); font-size: 14px; }
.request-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 15px; }
.request-form label { min-width: min(100%, 210px); }
.config-info { padding-top: 18px; color: var(--muted); }
.clinic { display: grid; grid-template-columns: 1fr 1fr; min-height: 66vh; }
.clinic-intro { padding: clamp(27px, 6vw, 100px); display: grid; align-content: center; justify-items: start; gap: 18px; color: var(--accent); background: var(--theme); }
.clinic-brand { font-size: 25px; }
.clinic-brand .brand-icon { border: 1px solid var(--accent); }
.clinic-intro h1 { font-size: clamp(35px, 5vw, 78px); line-height: 1; letter-spacing: -.065em; font-weight: 500; }
.clinic-info { padding: clamp(25px, 4vw, 66px); }
.clinic-info h2 { margin: 14px 0 8px; }
.clinic-info > p { color: var(--muted); }
.clinic-service { display: flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.clinic-service > div { flex: 1; }
dialog { width: min(520px, calc(100% - 28px)); border: 1px solid var(--line); border-radius: 15px; padding: 21px; background: white; color: var(--ink); box-shadow: 0 20px 54px #14261d2f; }
dialog::backdrop { background: #14261d7c; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-heading h2 { font-size: 23px; }
.dialog-heading button { padding: 0 4px; font-size: 26px; text-decoration: none; }
dialog p { margin: 9px 0 16px; }
.toast { position: fixed; inset: auto 16px 16px auto; z-index: 10; max-width: min(420px, calc(100% - 32px)); padding: 12px 16px; background: var(--theme); color: white; border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); border-radius: 8px; box-shadow: 0 6px 24px #14261d27; font-size: 14px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.fresh { animation: fresh 1.2s ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fresh { from { background: var(--accent); } to { background: transparent; } }
@media (max-width: 970px) {
  .intro { gap: 28px; }
  .home { grid-template-columns: minmax(345px, 48fr) minmax(0, 52fr); }
  .stage { padding-inline: 20px; }
  .mini-desk { width: 100%; }
  .mini-page { padding: 11px; }
  .app-shell { grid-template-columns: 176px minmax(0, 1fr); }
  .app-side { padding-inline: 12px; }
}
@media (max-width: 720px) {
  .topbar { position: static; flex-wrap: wrap; gap: 1px 15px; min-height: 58px; padding: 7px 16px; }
  .wordmark { font-size: 19px; }
  .wordmark-meta { display: none; }
  .demo-label { order: 3; flex-basis: 100%; font-size: 12px; }
  .home { display: flex; flex-direction: column; }
  .intro { display: contents; }
  .intro-main { order: 0; padding: 28px 20px 22px; }
  .intro h1 { font-size: clamp(42px, 10vw, 62px); }
  .lead { margin-top: 14px; }
  .hero-actions { margin-top: 15px; }
  .stage { order: 1; position: relative; top: auto; min-height: 0; align-self: stretch; padding: 15px 20px; }
  .stage-work { min-height: 425px; width: min(100%, 510px); justify-self: center; }
  .stage-work .mini-desk { transform: translateY(-25px); }
  .stage-work .phone { top: 46%; transform: translateY(-40%) rotate(-3deg); }
  .stage-work.desk-first .phone { transform: translateY(-32%) scale(.82) rotate(2deg); }
  .guided, .scenarios { order: 2; padding: 17px 20px; max-width: none; }
  .scenarios { padding-top: 0; }
  .app-shell { display: block; margin: 10px auto; width: calc(100% - 18px); padding: 0 6px 6px; }
  .app-side { padding: 12px 10px 7px; gap: 4px; }
  .app-side .side-brand { display: none; }
  .app-side h1 { margin: 0; }
  .side-nav { display: flex; overflow-x: auto; gap: 2px; margin-top: 4px; }
  .side-button { white-space: nowrap; font-size: 13px; }
  .side-bottom { display: none; }
  .sheet { padding: 14px; }
  .agenda-heading { display: none; }
  .agenda-row { grid-template-columns: 47px minmax(0, 1fr) auto; gap: 3px 8px; }
  .agenda-row .row-actions { grid-column: 2 / -1; }
  .agenda-row small { font-size: 12px; }
  .clinic { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .stage-work { min-height: 400px; }
  .phone { width: 170px; }
  .mini-row, .mini-empty, .mini-cols { grid-template-columns: 41px 1fr auto; font-size: 12px; }
  .mini-row small { font-size: 11px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics div:nth-child(3) { border-left: 0; }
  .metrics div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .booking-end { align-items: stretch; flex-direction: column; }
  .brand-picker button { padding-inline: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
