/* D1.6 only. Original D and earlier shared styles remain unchanged. */
:root {
  --gold-text: #785d28;
  --control-border: #9e8e75;
  --selected: #efe3c7;
  --selected-border: #8e7137;
  --muted: #686157;
}
html { color-scheme: light; scroll-padding-block: 24px; }
body { overflow-wrap: break-word; }
.masthead { background: #eee6d7; border-bottom: 1px solid #dfd4c1; }
.layout { gap: 44px; padding-top: 40px; }
.visit-panel { box-shadow: none; }
.visit-panel-top { padding: 30px 28px 26px; }
.visit-title {
  margin: 26px 0 28px;
  font: 400 2.75rem/1.16 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}
.visit-title em { color: var(--gold-text); font-weight: 400; }
.visit-subtitle { margin: 6px 0 12px; font-size: 1.2rem; font-weight: 600; line-height: 1.4; }
.visit-footnote { border-top: 1px solid #d7cbba; padding: 18px 20px; font-size: .75rem; }
.visit-panel .eyebrow, .visit-facts .icon { color: var(--gold-text); }
.booking-card { padding: 32px; min-height: 380px; }
.booking-card h1 {
  margin: 10px 0 14px;
  font: 400 clamp(2rem, 3.3vw, 2.55rem)/1.16 Georgia, "Times New Roman", serif;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.booking-card > .eyebrow { color: var(--gold-text); font-size: .68rem; }
.booking-card .lede { margin: 0 0 22px; max-width: 54ch; font-size: .94rem; line-height: 1.7; }
#page-title { scroll-margin-top: 24px; }
.journey { display: block; margin-bottom: 22px; }
.journey:empty { display: none; }
.journey-list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}
.journey-list li { display: flex; align-items: center; gap: 8px; color: #716858; font-size: .76rem; }
.journey-list b { width: 28px; height: 28px; flex: none; background: #f6f1e8; color: #67573c; }
.journey-list .journey-label { display: inline; min-height: 0; }
.journey-list [aria-current=step] { color: #312d26; font-weight: 650; }
.journey-list [aria-current=step] b { background: #dbc28a; border-color: #a68844; color: #332816; }
.journey-complete b { border-color: #c9b582; background: #f0e8d7; }
.journey-complete .icon { width: 15px; height: 15px; }
.service-grid { gap: 12px; margin-block: 24px 14px; align-items: stretch; grid-auto-rows: 1fr; }
.service-choice {
  min-height: 114px; padding: 20px 38px 20px 18px;
  border-color: #ded5c7; border-radius: 14px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.service-choice strong { font-size: 1rem; font-weight: 600; line-height: 1.45; }
.service-choice span { color: #74603a; font-size: .78rem; line-height: 1.5; }
.service-choice::after {
  content: ""; width: 8px; height: 8px; top: 26px; right: 20px;
  border-top: 1.5px solid var(--gold-text); border-right: 1.5px solid var(--gold-text);
  transform: rotate(45deg);
}
.service-choice:hover { border-color: var(--selected-border); background: #fcf8f0; box-shadow: 0 3px 12px #59462b09; }
.service-more { border-color: #cfc3af; background: transparent; }
.provider-control { margin: 22px 0 24px; font-size: .85rem; font-weight: 600; }
.provider-control select { margin-top: 9px; height: 52px; border-color: var(--control-border); font-weight: 400; }
.provider-control::after { bottom: 24px; }
.date-nav { margin-top: 20px; }
.date-nav > strong { font-size: .94rem; font-weight: 600; text-transform: capitalize; }
.date-nav button { display: grid; place-items: center; border-color: var(--control-border); border-radius: 50%; width: 44px; height: 44px; }
.date-nav button:disabled { color: #9a9388; border-color: #ddd5c8; background: transparent; }
.days {
  grid-template-columns: repeat(7, minmax(44px, 1fr)); gap: 6px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
  margin: 14px 0 8px; padding: 5px 2px 9px;
  scrollbar-width: thin; scrollbar-color: #b5a179 transparent;
}
.days.production-weekdays { grid-template-columns: repeat(5, minmax(44px, 1fr)); }
.days.production-weekdays + .calendar-hint { display: none; }
.day { min-width: 44px; min-height: 78px; border-color: #d7cebf; scroll-snap-align: start; }
.day span { font-size: .69rem; color: #625a4e; letter-spacing: .01em; }
.day strong { font-size: 1.38rem; margin-top: 6px; }
.day:disabled { opacity: 1; color: #9a9285; background: #f3eee6; border-color: #e3dacb; }
.day:disabled span { color: #9a9285; }
.day[aria-pressed=true], .slot[aria-pressed=true] {
  background: var(--selected); border-color: var(--selected-border);
  box-shadow: inset 0 0 0 1px var(--selected-border); color: #312714;
}
.day[aria-pressed=true] span { color: #59451d; }
.calendar-hint { display: none; color: var(--muted); font-size: .76rem; margin: 0 0 14px; }
.times-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.times-heading h2 { margin: 0; font: 600 .9rem/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
.times-heading > span { flex: none; color: var(--muted); font-size: .75rem; }
.slots { margin: 0 0 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
/* Production hygienist prices: readable rows on mobile, two columns on desktop.
   This class is absent from the preserved D1.6 prototype. */
.slots.production-price-slots { grid-template-columns: minmax(0, 1fr); }
.production-price-slots .slot { display: grid; grid-template-columns: minmax(0, 1fr) 140px; gap: 4px 12px; padding: 14px; text-align: left; align-items: center; }
.production-price-slots .slot > br { display: none; }
.production-price-slots .slot > span:first-child { grid-column: 1; font-size: 1.1rem; }
.production-price-slots .slot-provider { grid-column: 1; margin: 0; font-size: .75rem; line-height: 1.4; }
.production-price-slots .service-description { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 3px; margin: 0; font-size: .8rem; line-height: 1.4; }
.production-price-slots del { white-space: nowrap; color: #756b5c; }
.production-price-slots strong { font-size: .8rem; line-height: 1.4; }
@media (min-width: 1000px) { .slots.production-price-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 359px) { .production-price-slots .slot { grid-template-columns: minmax(0, 1fr) 122px; padding: 12px; gap: 4px 8px; } }
.slot { border-color: #d2c6b4; min-height: 50px; font-size: 1rem; font-variant-numeric: tabular-nums; }
.calendar-message { padding: 20px 18px; margin: 18px 0; border: 1px solid #ded3c1; border-radius: 12px; background: #fbf8f2; color: var(--muted); font-size: .88rem; line-height: 1.7; }
.selected-hint { display: flex; gap: 9px; align-items: flex-start; margin: 18px 0 0; font-size: .85rem; line-height: 1.6; color: #5b503b; }
.selected-hint .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--gold-text); }
.selected-hint strong { font-weight: 650; color: #312d26; }
.selection-summary-card { display: grid; gap: 5px; margin: 22px 0 26px; padding: 17px 19px; background: #faf6ec; border: 1px solid #d8c7a5; border-radius: 12px; }
.selection-summary-card span { color: #6e5b37; font-size: .79rem; line-height: 1.6; }
.selection-summary-card strong { font-size: .9rem; line-height: 1.6; font-weight: 600; }
.flow-actions { margin-top: 24px; padding-top: 22px; border-top: 1px solid #e5ddcf; gap: 16px; align-items: center; }
.flow-actions .primary-button { min-width: 172px; }
.primary-button { background: #c6ab70; border-color: #a98c4e; color: #2c2518; min-height: 52px; }
.primary-button:hover:not(:disabled) { background: #d1bb89; }
.primary-button:disabled { opacity: 1; background: #e9e2d7; border-color: #e1d8ca; color: #827a6d; }
.back-link { padding-inline: 4px; min-width: 64px; }
.contact-field { margin: 22px 0; font-size: .86rem; font-weight: 600; line-height: 1.5; }
.contact-field input { min-height: 54px; padding: 13px 14px; border-color: var(--control-border); font-weight: 400; }
.clinic-message-field textarea { display:block; box-sizing:border-box; width:100%; min-height:112px; margin-top:8px; padding:14px 16px; border:1px solid var(--control-border); border-radius:12px; background:var(--paper,#fffdfa); color:inherit; font-family:inherit; font-size:16px; font-weight:400; line-height:1.6; resize:vertical; }
.clinic-message-field textarea::placeholder { color:var(--muted); opacity:1; }
.clinic-message-field textarea:focus-visible { outline:2px solid var(--gold,#ae8a2a); outline-offset:3px; }
.contact-field input[readonly] { background: #f8f5ee; color: #675d4e; text-overflow: ellipsis; }
.contact-field small { display: block; margin-top: 8px; color: var(--muted); font-size: .77rem; font-weight: 400; line-height: 1.6; }
.contact-field input:focus-visible { background: #fffdfa; }
.contact-field input:user-invalid { border-color: #a34e3f; background: #fff7f4; }
.code-input { max-width: 260px; font-size: 1.25rem !important; letter-spacing: .35em; }
.patient-name-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.patient-name-fields .contact-field { min-width: 0; margin-top: 0; }
#patient-form { margin-top: 26px; border-top: 1px solid #e5ddcf; padding-top: 3px; }
#patient-form > h2 { margin: 22px 0 12px; font: 600 1.08rem/1.5 ui-sans-serif, system-ui, sans-serif; letter-spacing: 0; }
#patient-form > .mode-note { margin: 16px 0; }
.review-list { padding: 10px 20px; background: #faf7f0; border-color: #dcd0bc; }
.review-list div { padding: 14px 0; align-items: baseline; }
.review-list dt { font-size: .82rem; }
.review-list dd { font-size: .92rem; line-height: 1.55; font-weight: 500; overflow-wrap: anywhere; }
.review-list .review-price-row { align-items: center; }
.review-price-row dd { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.review-price-label { font-size: .72rem; color: #7a5f2b; }
.review-price-amount { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: baseline; gap: 4px 9px; }
.review-price-amount del { color: #756b5c; font-size: .78rem; white-space: nowrap; }
.review-price-amount strong { font-size: 1.04rem; font-weight: 600; }
.mode-note { font-size: .8rem; line-height: 1.7; }
.scope-note { border-color: #b69854; font-size: .82rem; line-height: 1.75; }
.receipt-mark { width: 52px; height: 52px; margin-bottom: 20px; }
.receipt-mark-neutral { background: #f1ece3; border-color: #d4c8b4; color: #756750; }
.appointment { border-color: #d9cdb8; border-radius: 16px; padding: 22px; margin: 24px 0; }
.appointment-top { gap: 18px; }
.appointment-top > div:last-child { min-width: 0; }
.date-tile { width: 62px; min-height: 72px; padding: 10px 7px; background: #f4ecdc; border-color: #d0bb8d; }
.date-tile strong { font-size: 1.8rem; }
.date-tile span { color: #74603a; }
.status-badge { font-size: .63rem; letter-spacing: .06em; margin-bottom: 7px; }
.appointment h3 { font-size: 1.04rem; line-height: 1.5; }
.appointment p { font-size: .85rem; line-height: 1.65; }
.appointment .appointment-time { color: #3e372b; margin: 6px 0; }
.appointment-actions:empty { display: none; }
.appointment-actions button { min-height: 48px; font-size: .86rem; border-color: #bba576; }
.appointment.cancelled { opacity: 1; background: #faf8f3; }
.appointment.cancelled .status-badge { color: #716858; }
.link-preview { min-height: 52px; }
.pending-card { padding: 22px; border-color: #cfb579; background: #fbf4e4; }
.pending-card h3 { line-height: 1.5; }
.pending-card p { line-height: 1.75; color: #6c562b; }
.pending-card button { max-width: 100%; white-space: normal; }
.notice { line-height: 1.7; }
.site-footer { gap: 12px 24px; padding: 12px 24px max(28px, env(safe-area-inset-bottom)); color: var(--muted); }
.site-footer .quiet-button { color: #655335; white-space: nowrap; }
.loading-state { min-height: 220px; display: flex; gap: 12px; align-items: center; justify-content: center; color: var(--muted); font-size: .9rem; }
.loading-dot { width: 9px; height: 9px; border-radius: 50%; background: #a2874d; box-shadow: 0 0 0 5px #f3ebd9; flex: none; }
.noscript-note { margin: 20px auto; max-width: 60ch; padding: 20px; }
@media (hover: hover) {
  .day:hover:not(:disabled), .slot:hover:not(:disabled) { border-color: #8e7137; background: #f6edd9; }
  .date-nav button:hover:not(:disabled) { background: #f3ead8; border-color: #ad945f; }
}
@media (max-width: 1020px) and (min-width: 781px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr); gap: 26px; padding-inline: 22px; }
  .visit-panel-top { padding: 26px 22px; }
  .visit-title { font-size: 2.35rem; }
  .booking-card { padding: 26px 22px; }
  .journey-list { gap: 6px; }
  .journey-list li { gap: 6px; font-size: .7rem; }
}
@media (max-width: 780px) {
  .preview-ribbon { gap: 3px 12px; padding: 7px 16px; line-height: 1.55; }
  .preview-ribbon > span:first-child { font-size: .61rem; letter-spacing: .1em; }
  .masthead { min-height: 74px; padding: 17px 20px; }
  .masthead .brand img { width: 180px; }
  .layout { max-width: 550px; padding: 22px 20px 0; gap: 22px; }
  .visit-panel { border: 0; border-radius: 0; border-bottom: 1px solid #ded2bd; background: transparent; padding-bottom: 17px; }
  .visit-panel-top { padding: 0; }
  .visit-title, .visit-footnote { display: none; }
  .visit-subtitle { font-size: .94rem; margin: 0 0 5px; }
  .visit-facts { font-size: .78rem; margin-top: 0; }
  .journey { margin-bottom: 24px; }
  .journey-list { gap: 8px; }
  .journey-list li { gap: 6px; font-size: .7rem; }
  .journey-list b { width: 25px; height: 25px; font-size: .65rem; }
  .booking-card { min-height: 300px; padding: 0; }
  .booking-card h1 { font-size: clamp(2rem, 7.4vw, 2.3rem); margin: 10px 0 13px; }
  .booking-card .lede { font-size: .9rem; margin-bottom: 20px; }
  .service-grid { margin-top: 22px; }
  .service-choice { min-height: 89px; padding: 17px 40px 17px 18px; }
  .service-choice strong { font-size: 1rem; }
  .service-choice span { margin-top: 6px; }
  .provider-control { margin-block: 22px; }
  .days { gap: 5px; }
  .day { min-height: 76px; }
  .times-heading { margin-top: 19px; }
  .times-heading h2 { font-size: .84rem; }
  .flow-actions { margin-bottom: 12px; padding-top: 20px; }
  .flow-actions .primary-button { min-width: 154px; padding-inline: 18px; }
  .review-list { padding-inline: 16px; }
  .review-list dd { max-width: 65%; }
  .appointment { padding: 19px 16px; margin-block: 22px; }
  .appointment-top { gap: 13px; }
  .date-tile { width: 54px; min-height: 67px; }
  .appointment h3 { font-size: 1rem; }
  .site-footer { max-width: 550px; margin-top: 26px; gap: 4px 16px; padding-inline: 20px; font-size: .74rem; }
  .site-footer > span { width: 100%; }
  .site-footer .quiet-button { padding-inline: 0; font-size: .83rem; }
}
@media (max-width: 380px) {
  .layout { padding-inline: 16px; }
  .masthead { padding-inline: 16px; }
  .masthead .brand img { width: 164px; }
  .masthead #close { max-width: 110px; font-size: .69rem; padding-inline: 0; }
  .journey-list { gap: 5px; }
  .journey-list li { gap: 4px; font-size: .65rem; }
  .journey-list b { width: 23px; height: 23px; }
  .calendar-hint { display: block; }
  .days { margin-bottom: 4px; }
  .flow-actions { flex-wrap: wrap; align-items: stretch; }
  .flow-actions .primary-button { flex: 1 0 150px; min-width: 0; padding-inline: 15px; }
  .patient-name-fields { grid-template-columns: 1fr; gap: 0; }
  .review-list div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; }
  .review-list dd { max-width: none; }
  .appointment-top { gap: 11px; }
  .date-tile { width: 49px; }
  .status-badge { letter-spacing: .035em; }
  .site-footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .day[aria-pressed=true], .slot[aria-pressed=true], .journey-list [aria-current=step] b { outline: 2px solid Highlight; outline-offset: -3px; }
  .service-choice::after { border-color: ButtonText; }
}
@media print {
  .journey, .flow-actions, .link-preview, #make-link, #check-mail { display: none; }
  .booking-card { border: 0; padding: 0; }
  .appointment { break-inside: avoid; }
}
/* Optional campaign entry follows the existing understated booking controls. */
.campaign-code{margin:18px 0 22px;padding:14px 0;border-top:1px solid var(--line,#ded2bf);border-bottom:1px solid var(--line,#ded2bf);font-family:inherit;font-size:14px;line-height:1.6}
.campaign-code summary{cursor:pointer;width:fit-content;min-height:44px;display:flex;align-items:center;gap:9px;list-style:none;color:inherit}
.campaign-code summary::before{content:'+';font-size:20px;font-weight:400}
.campaign-code[open] summary::before{content:'−'}
.campaign-code summary::-webkit-details-marker{display:none}
.campaign-fields{display:flex;gap:12px;align-items:flex-end;margin:8px 0}
.campaign-fields label{display:flex;flex-direction:column;gap:6px;flex:1;min-width:0}
.campaign-fields input{box-sizing:border-box;width:100%;min-width:0;min-height:48px;font:inherit;font-size:16px;padding:10px 12px;border:1px solid currentColor;border-radius:8px;color:inherit;background:transparent}
.campaign-fields button{min-height:48px;flex-shrink:0;white-space:nowrap}
.campaign-code .back-link{min-height:44px;color:inherit}
.campaign-code p{margin:8px 0}.campaign-code.applied p{margin-top:0}.campaign-error{color:#aa4934}
@media(max-width:360px){.campaign-fields{flex-wrap:wrap}.campaign-fields button{width:100%}}
