:root {
  --mid: #0f1720;
  --ink: #071018;
  --fog: #f7f8f8;
  --mist: #e9eeee;
  --mint: #2ee6c6;
  --mint-soft: #c9fff4;
  --muted: #687078;
  --line: rgba(15,23,32,.14);
  --danger: #c83f4d;
  --warn: #9b6518;
  --ok: #107c69;
  --panel: rgba(255,255,255,.045);
  --panelLine: rgba(255,255,255,.10);
  --shadow: 0 22px 60px rgba(7,16,24,.13);
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--fog); font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .58; }
img { max-width: 100%; display: block; }
.shell { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(247,248,248,.94); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.nav { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 900; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; background: var(--mid); color: var(--mint); border: 1px solid var(--mid); }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { text-decoration: none; font-size: .9rem; font-weight: 800; }
.nav-links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero { background: var(--mid); color: white; border-bottom: 1px solid rgba(255,255,255,.09); }
.hero-grid { min-height: 570px; display: grid; grid-template-columns: 1.12fr .88fr; align-items: stretch; }
.hero-copy { padding: 88px 64px 88px 0; display: flex; flex-direction: column; justify-content: center; }
.hero-art { min-height: 570px; border-left: 1px solid rgba(255,255,255,.11); background: linear-gradient(145deg, rgba(46,230,198,.16), transparent 46%), #13202b; position: relative; overflow: hidden; }
.hero-art::before { content: ""; position: absolute; inset: 38px; border: 1px solid rgba(255,255,255,.18); }
.hero-art::after { content: "+"; position: absolute; right: 58px; bottom: 28px; font-size: 15rem; line-height: 1; font-weight: 200; color: var(--mint); opacity: .92; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; opacity: .84; mix-blend-mode: luminosity; }
.eyebrow { margin: 0 0 17px; text-transform: uppercase; letter-spacing: .18em; font-weight: 900; font-size: .72rem; color: var(--mint); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(3rem, 7vw, 6.6rem); line-height: .91; letter-spacing: -.075em; max-width: 880px; }
h2 { font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1; letter-spacing: -.055em; }
h3 { font-size: 1.18rem; letter-spacing: -.02em; }
.lede { max-width: 700px; font-size: clamp(1.05rem, 2vw, 1.35rem); color: rgba(255,255,255,.76); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn { appearance: none; border: 1px solid var(--mid); background: var(--mid); color: white; min-height: 48px; padding: 12px 18px; font-weight: 900; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 0; }
.btn:hover { transform: translateY(-1px); }
.btn.mint { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn.light { background: white; color: var(--ink); border-color: white; }
.btn.outline { background: transparent; color: inherit; border-color: currentColor; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: var(--danger); border-color: var(--danger); }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: .86rem; }
.icon-btn { width: 46px; height: 46px; padding: 0; display: inline-grid; place-items: center; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 0; }
.section { padding: 78px 0; }
.section.compact { padding: 42px 0; }
.section.dark { background: var(--mid); color: white; }
.section.mist { background: var(--mist); }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 34px; }
.section-head p { max-width: 610px; color: var(--muted); margin-bottom: 0; }
.dark .section-head p { color: rgba(255,255,255,.68); }
.grid { display: grid; gap: 18px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card { background: white; border: 1px solid var(--line); padding: 24px; box-shadow: none; }
.card.dark { background: var(--panel); border-color: var(--panelLine); color: white; }
.card.accent { border-top: 6px solid var(--mint); }
.card p:last-child { margin-bottom: 0; }
.fact { font-size: 2rem; font-weight: 900; letter-spacing: -.055em; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.tag { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 5px 8px; text-transform: uppercase; letter-spacing: .09em; font-size: .66rem; font-weight: 900; background: white; }
.tag[data-status="confirmed"], .tag[data-status="completed"] { border-color: rgba(16,124,105,.3); color: var(--ok); background: #edfffb; }
.tag[data-status="requested"] { border-color: rgba(155,101,24,.3); color: var(--warn); background: #fff9ec; }
.tag[data-status="cancelled"], .tag[data-status="declined"], .tag[data-status="no-show"] { border-color: rgba(200,63,77,.3); color: var(--danger); background: #fff1f3; }
.tag[data-status="blocked"] { background: var(--mid); color: white; border-color: var(--mid); }
.form-page { background: linear-gradient(180deg, var(--mid) 0 330px, var(--fog) 330px); min-height: 100vh; padding-bottom: 72px; }
.form-intro { color: white; padding: 62px 0 32px; }
.form-intro h1 { font-size: clamp(2.8rem, 6vw, 5.4rem); max-width: 980px; }
.form-intro p { max-width: 760px; color: rgba(255,255,255,.72); font-size: 1.08rem; }
.form-panel { background: white; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 32px; }
.form-section { padding: 28px 0; border-top: 1px solid var(--line); }
.form-section:first-child { border-top: 0; padding-top: 0; }
.form-section h2 { font-size: 1.65rem; margin-bottom: 8px; }
.form-section > p { color: var(--muted); }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
label, .label { text-transform: uppercase; letter-spacing: .1em; font-size: .71rem; font-weight: 900; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: white; color: var(--ink); padding: 13px 14px; min-height: 48px; border-radius: 0; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(46,230,198,.27); border-color: var(--ink); }
textarea { min-height: 110px; resize: vertical; }
.checkline { display: flex; gap: 10px; align-items: flex-start; }
.checkline input { width: 20px; height: 20px; min-height: 0; margin-top: 2px; }
.schedule-grid { display: grid; grid-template-columns: 1fr 120px 120px; gap: 10px; align-items: center; }
.schedule-row { display: contents; }
.day-toggle { display: flex; gap: 10px; align-items: center; font-weight: 850; }
.day-toggle input { width: 20px; min-height: 20px; }
.type-list { display: grid; gap: 12px; }
.type-row { display: grid; grid-template-columns: 1.3fr 120px 1fr auto; gap: 10px; padding: 14px; border: 1px solid var(--line); background: var(--fog); }
.mode-checks { display: flex; gap: 16px; flex-wrap: wrap; }
.mode-checks label { text-transform: none; letter-spacing: 0; font-size: .9rem; display: flex; align-items: center; gap: 7px; }
.mode-checks input { width: 18px; min-height: 18px; }
.notice { border-left: 5px solid var(--mint); background: var(--mist); padding: 16px 18px; }
.notice.warn { border-color: #d89a31; }
.notice.danger { border-color: var(--danger); }
.result-box { padding: 24px; background: var(--mid); color: white; border: 1px solid var(--mid); }
.result-link { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; }
.result-link input { background: rgba(255,255,255,.08); color: white; border-color: rgba(255,255,255,.16); }
.practice-hero { background: var(--mid); color: white; }
.practice-hero-grid { display: grid; grid-template-columns: 1fr .7fr; min-height: 460px; }
.practice-copy { padding: 72px 56px 72px 0; align-self: center; }
.practice-copy h1 { font-size: clamp(2.8rem, 6vw, 5.8rem); }
.practice-visual { position: relative; background: #142530; border-left: 1px solid rgba(255,255,255,.12); min-height: 400px; overflow: hidden; }
.practice-visual .hero-photo { opacity: .9; mix-blend-mode: normal; }
.practice-visual.no-photo::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; font-size: 18rem; font-weight: 100; color: var(--mint); }
.booking-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 24px; align-items: start; }
.sticky { position: sticky; top: 94px; }
.type-option, .mode-option, .slot-btn { width: 100%; text-align: left; border: 1px solid var(--line); background: white; padding: 15px; color: var(--ink); border-radius: 0; }
.type-option:hover, .mode-option:hover, .slot-btn:hover, .type-option.selected, .mode-option.selected, .slot-btn.selected { border-color: var(--ink); box-shadow: inset 5px 0 0 var(--mint); }
.option-stack { display: grid; gap: 10px; }
.slot-groups { display: grid; gap: 18px; }
.slot-day { border-top: 1px solid var(--line); padding-top: 16px; }
.slot-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.slot-btn { width: auto; min-width: 92px; text-align: center; }
.booking-step { padding: 22px 0; border-top: 1px solid var(--line); }
.booking-step:first-child { padding-top: 0; border-top: 0; }
.hidden { display: none !important; }
.success { border: 1px solid rgba(16,124,105,.35); background: #ecfff9; padding: 22px; }
.error { border: 1px solid rgba(200,63,77,.35); background: #fff0f2; color: #7d1f2a; padding: 14px 16px; }
.desk { min-height: 100vh; background: #eef1f1; }
.desk-head { background: var(--mid); color: white; padding: 34px 0 28px; }
.desk-head h1 { font-size: clamp(2.1rem, 5vw, 4.5rem); margin-bottom: 8px; }
.desk-toolbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.utility-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 0; overflow-x: auto; border-bottom: 1px solid var(--line); background: white; position: sticky; top: 70px; z-index: 20; }
.tab { appearance: none; border: 0; border-right: 1px solid var(--line); background: white; padding: 16px 20px; font-weight: 900; white-space: nowrap; }
.tab.active { background: var(--mid); color: white; }
.tab-panel { display: none; padding: 34px 0 70px; }
.tab-panel.active { display: block; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.metric { background: white; border: 1px solid var(--line); padding: 18px; }
.metric strong { display: block; font-size: 2rem; letter-spacing: -.06em; }
.appointment-list { display: grid; gap: 12px; }
.appointment-card { background: white; border: 1px solid var(--line); padding: 20px; display: grid; grid-template-columns: minmax(220px,.8fr) 1.2fr auto; gap: 18px; align-items: start; }
.appointment-time { font-size: 1.12rem; font-weight: 900; }
.appointment-contact a { color: var(--ok); }
.inline-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: end; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: white; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { text-align: left; padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; background: var(--mist); }
.login-card { width: min(560px, calc(100% - 32px)); margin: 70px auto; background: white; border: 1px solid var(--line); padding: 28px; box-shadow: var(--shadow); }
.health-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.health-row { padding: 18px; border: 1px solid var(--line); background: white; display: flex; justify-content: space-between; gap: 18px; }
.health-row strong[data-ok="true"] { color: var(--ok); }
.health-row strong[data-ok="false"] { color: var(--danger); }
.footer { padding: 32px 0; border-top: 1px solid var(--line); background: white; }
.footer-row { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; background: var(--mid); color: white; padding: 14px 18px; transform: translateY(120px); opacity: 0; transition: .22s ease; border-left: 5px solid var(--mint); box-shadow: var(--shadow); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast[data-tone="error"] { border-left-color: var(--danger); }
.install-sheet { position: fixed; inset: 0; z-index: 80; background: rgba(7,16,24,.66); display: grid; place-items: end center; padding: 18px; }
.install-sheet .card { width: min(620px, 100%); box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .hero-grid, .practice-hero-grid, .booking-layout { grid-template-columns: 1fr; }
  .hero-copy, .practice-copy { padding: 62px 0; }
  .hero-art, .practice-visual { min-height: 330px; border-left: 0; border-top: 1px solid rgba(255,255,255,.11); }
  .grid.three, .grid.two, .metrics { grid-template-columns: repeat(2, 1fr); }
  .appointment-card { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .inline-form { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 650px) {
  .shell { width: min(100% - 22px, var(--max)); }
  .nav { min-height: 62px; }
  .nav-links { gap: 10px; }
  .nav-links a:nth-child(3), .nav-links a:nth-child(4) { display: none; }
  h1 { font-size: clamp(2.9rem, 16vw, 4.6rem); }
  .hero-art::after { font-size: 10rem; }
  .section { padding: 56px 0; }
  .grid.three, .grid.two, .metrics, .fields, .health-grid, .inline-form { grid-template-columns: 1fr; }
  .form-panel { padding: 20px; }
  .schedule-grid { grid-template-columns: 1fr 96px 96px; gap: 7px; }
  .type-row { grid-template-columns: 1fr; }
  .result-link { grid-template-columns: 1fr; }
  .desk-toolbar { flex-direction: column; }
  .tabs { top: 62px; }
  .appointment-card { padding: 16px; }
  .section-head { display: block; }
}
.public-info-section { padding: 34px 0 0; background: var(--fog); }
.public-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.booking-title-row { margin-bottom: 22px; }
.booking-title-row h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.landing-row, .landing-setting-row { grid-template-columns: .7fr 1fr auto; }
.timeline, .restore-list { display: grid; gap: 10px; }
.timeline-row, .restore-row { background: white; border: 1px solid var(--line); padding: 16px; display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.timeline-row code { max-width: 55%; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--muted); font-size: .75rem; }
.code-box { background: var(--mid); color: #d8fff8; border: 1px solid var(--panelLine); padding: 14px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .76rem; line-height: 1.55; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 20px; }
@media (max-width: 900px) {
  .public-info-grid { grid-template-columns: 1fr 1fr; }
  .export-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .public-info-grid, .export-grid { grid-template-columns: 1fr; }
  .timeline-row, .restore-row { display: grid; }
  .timeline-row code { max-width: none; }
}

/* V004 medical-suite connector */
.appointment-actions { display: grid; gap: 10px; min-width: 92px; }
.medical-suite-box { margin-top: 16px; border: 1px solid var(--line); background: var(--fog); padding: 14px; }
.visit-ref-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.visit-ref-row span { display: grid; gap: 4px; }
.visit-ref-row strong { text-transform: uppercase; letter-spacing: .09em; font-size: .68rem; }
.visit-ref-row code { font-size: .76rem; color: var(--muted); overflow-wrap: anywhere; }
.suite-action-grid { display: grid; grid-template-columns: minmax(150px, auto) 1fr; gap: 8px 10px; align-items: center; }
.suite-state { font-size: .73rem; color: var(--muted); }
.suite-state[data-suite-state="prepared"] { color: var(--warn); }
.suite-state[data-suite-state="opened"] { color: var(--ink); font-weight: 800; }
.suite-state[data-suite-state="linked"] { color: var(--ok); font-weight: 900; }
@media (max-width: 650px) {
  .visit-ref-row { align-items: flex-start; }
  .suite-action-grid { grid-template-columns: 1fr; }
  .suite-state { margin-top: -3px; margin-bottom: 4px; }
}


/* V005 permanent medical-suite launcher */
.medical-suite-launcher { margin: 22px 0 26px; border-top: 4px solid var(--mint); }
.section-head.compact { align-items: end; gap: 22px; margin-bottom: 0; }
.suite-appointment-picker { min-width: min(100%, 360px); }
.medical-suite-launcher .medical-suite-box { margin-top: 18px; }
@media (max-width: 760px) {
  .section-head.compact { align-items: stretch; }
  .suite-appointment-picker { min-width: 0; width: 100%; }
}
