/* ── Public site ───────────────────────────────────────────────────────────
   The directory and the clinic microsites. Ported from the handoff's
   ui_kits/website (Direction B) and components/navigation + components/medical,
   with the values read off those sources rather than approximated.

   Everything here consumes tokens.css. There is no second palette: a colour
   that is not in the tokens is not in this file. */

/* Section rhythm — the kit measures every band in --gutter-web / --section-y. */
.ds-sect { padding: var(--section-y) var(--gutter-web); }
.ds-sect--tight { padding: 0 var(--gutter-web) var(--section-y); }

.ds-sect--alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  padding: 64px var(--gutter-web);
}

/* SiteHeader.jsx */
.ds-site-header {
  display: flex;
  align-items: center;
  gap: 36px;
  flex-wrap: wrap;
  padding: 20px var(--gutter-web);
  background: var(--surface-brand);
  color: var(--white);
}

.ds-site-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: var(--fw-black) 24px var(--font-display);
  letter-spacing: var(--ls-tight);
  color: var(--white);
  text-decoration: none;
}

.ds-site-brand:hover { color: var(--white); }

.ds-site-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--accent);
  display: grid;
  place-items: center;
  color: var(--navy-700);
  font: var(--fw-black) 17px var(--font-display);
}

.ds-site-nav { display: flex; gap: 26px; flex-wrap: wrap; align-items: center; }

.ds-site-nav a {
  font: var(--fw-semibold) var(--fs-sm) var(--font-display);
  color: #C3D2EC;
  text-decoration: none;
}

.ds-site-nav a:hover,
.ds-site-nav a.active { color: var(--accent); }

.ds-site-actions { margin-inline-start: auto; display: flex; gap: 10px; }

/* Public-site buttons are often anchors. Theme-level link rules must not repaint their text
   with the normal link colour (which can make a filled button look completely blank). */
.directory-theme a.ds-btn--primary,
.directory-theme a.ds-btn--primary:hover { color: var(--action-fg); }
.directory-theme a.ds-btn--secondary,
.directory-theme a.ds-btn--secondary:hover { color: var(--navy-700); }
.directory-theme a.ds-btn--brand,
.directory-theme a.ds-btn--brand:hover { color: var(--white); }
.directory-theme a.ds-btn--on-brand,
.directory-theme a.ds-btn--on-brand:hover { color: var(--white); }

/* The header's own button variant: transparent on navy, hairline border. */
.ds-btn--on-brand {
  background: transparent;
  color: var(--white);
  border-color: var(--border-on-brand);
}

.ds-btn--on-brand:hover:not(:disabled) { background: rgba(255, 255, 255, .12); }

/* The kit's footer is the same navy as the header, one line high. */
.ds-site-footer {
  background: var(--surface-brand);
  color: #93A8CB;
  padding: 36px var(--gutter-web);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: var(--fs-sm);
}

.ds-site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
.ds-site-footer a { color: #93A8CB; text-decoration: none; }
.ds-site-footer a:hover { color: var(--white); }

/* The hero: flat navy, display type, and the search bar sitting on it. */
.ds-hero {
  background: var(--surface-brand);
  color: var(--white);
  padding: 80px var(--gutter-web) 96px;
}

.ds-hero__content { max-width: 820px; }

.ds-hero__kicker {
  font: var(--kicker);
  letter-spacing: var(--ls-kicker);
  color: var(--accent);
  margin-bottom: 20px;
}

.ds-hero h1 {
  font: var(--fw-black) var(--fs-d1)/var(--lh-d1) var(--font-display);
  letter-spacing: var(--ls-display);
  color: var(--white);
  margin: 0;
}

.ds-hero__lede {
  font-size: 19px;
  line-height: 1.9;
  color: var(--text-on-brand-muted);
  margin: 20px 0 0;
  max-width: 620px;
}

.ds-hero__search {
  margin-top: 40px;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 8px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr auto;
  gap: 8px;
  max-width: 940px;
}

.ds-hero__field {
  padding: 12px 16px;
  border-radius: var(--radius-xs);
  background: var(--surface-alt);
  border: 0;
  text-align: start;
  cursor: pointer;
}

.ds-hero__field span {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--text-soft);
  margin-bottom: 3px;
}

.ds-hero__field strong,
.ds-hero__input {
  font: var(--fw-semibold) var(--fs-body) var(--font-display);
  color: var(--text-strong);
}

/* The hero's inputs carry no chrome of their own — the field around them is
   the control, so three of them read as one search bar. */
.ds-hero__input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  appearance: none;
}

.ds-hero__field:focus-within { box-shadow: var(--ring-focus); }

/* The band of figures under the hero, divided from it by a hairline. */
.ds-hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-on-brand);
  margin-top: 56px;
  padding-top: 28px;
}

/* `.ds-stat__*` itself lives in doctory.css; on the navy hero it turns. */
.ds-hero__stats .ds-stat__value { color: var(--accent); }
.ds-hero__stats .ds-stat__label { color: var(--text-on-brand-muted); }

/* SectionHeader at website scale — the pages use --fs-d3, not the panels' h2. */
.ds-sect .ds-section h2,
.ds-sect--tight .ds-section h2,
.ds-sect--alt .ds-section h2 {
  font: var(--fw-black) var(--fs-d3)/var(--lh-d3) var(--font-display);
}

.ds-section__action {
  font: var(--fw-bold) var(--fs-sm) var(--font-display);
  color: var(--text-link);
  white-space: nowrap;
  text-decoration: none;
}

/* SpecialtyTile.jsx */
.ds-spec {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-card);
  color: inherit;
  text-decoration: none;
  transition: var(--t-hover);
}

.ds-spec--cell {
  display: block;
  padding: 26px;
  border: 0;
  border-radius: 0;
  text-align: start;
}

.ds-spec__glyph { color: var(--accent-strong); }

.ds-spec:hover { background: var(--surface-alt); }

.ds-spec--cell .ds-spec__text { margin-top: 14px; }

.ds-spec__text b {
  display: block;
  font: var(--fw-bold) var(--fs-sm) var(--font-display);
  color: var(--text-strong);
}

.ds-spec--cell .ds-spec__text b { font-size: var(--fs-h3); }

.ds-spec__text span { font-size: var(--fs-2xs); color: var(--text-soft); }

/* The home page rules the tiles into one grid rather than giving each a border. */
.ds-spec-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border);
}

.ds-spec-grid > * { border-inline-start: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ds-spec-grid > :nth-child(4n + 1) { border-inline-start: 0; }
.ds-spec-grid > :nth-last-child(-n + 4) { border-bottom: 0; }

/* DoctorRow.jsx */
.ds-doc-list { border-top: 1px solid var(--border); }

.ds-doc-row {
  display: grid;
  grid-template-columns: 74px 1fr auto auto;
  gap: 22px;
  align-items: center;
  padding: 22px 8px;
  border-bottom: 1px solid var(--border);
  transition: var(--t-hover);
}

.ds-doc-row:hover { background: var(--surface-alt); }

.ds-doc-row__main { min-width: 0; }

.ds-doc-row__main h3 {
  font: var(--fw-bold) var(--fs-h2)/1.4 var(--font-display);
  color: var(--text-strong);
  margin: 0;
}

.ds-doc-row__main h3 a { color: inherit; text-decoration: none; }
.ds-doc-row__main h3 a:hover { color: var(--text-link); }

.ds-doc-row__specialty { font-size: var(--fs-sm); color: var(--text-muted); margin-top: 4px; }

.ds-doc-row__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
  font-size: var(--fs-xs);
  color: var(--text-soft);
}

.ds-doc-row__price { text-align: start; }

.ds-doc-row__price b {
  font: var(--fw-black) var(--fs-h2) var(--font-display);
  color: var(--text-strong);
  white-space: nowrap;
}

.ds-doc-row__price span {
  display: block;
  font-size: var(--fs-2xs);
  color: var(--text-soft);
}

/* Rating.jsx — one star, the score, and how many said so. */
.ds-rating {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font: var(--fw-bold) var(--fs-xs)/1.4 var(--font-display);
  color: var(--text-strong);
}

.ds-rating__count { font-weight: var(--fw-regular); color: var(--text-soft); }

/* PlanCard.jsx */
.ds-plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

.ds-plan {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

/* The featured plan takes a 2px navy edge; Direction B does not lean on shadow. */
.ds-plan--featured { border: 2px solid var(--navy-700); padding: 23px; }

.ds-plan__name { font: var(--fw-bold) var(--fs-h3) var(--font-display); color: var(--text-strong); }

.ds-plan__price {
  font: var(--fw-black) var(--fs-d3) var(--font-display);
  color: var(--text-strong);
  margin: 10px 0 6px;
}

.ds-plan__price span {
  font: var(--fw-regular) var(--fs-xs) var(--font-body);
  color: var(--text-soft);
}

.ds-plan__summary { font-size: var(--fs-xs); line-height: 1.7; color: var(--text-muted); margin: 0; }

.ds-plan__features {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: grid;
  gap: 8px;
  flex: 1;
}

.ds-plan__features li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: var(--fs-xs);
  color: var(--text-body);
}

.ds-plan .ds-btn { margin-top: 20px; }

/* AppointmentCard.jsx */
.ds-appt {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--surface-card);
}

.ds-appt__head { display: flex; gap: 12px; align-items: center; }

.ds-appt__foot {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.ds-appt__foot > span { display: inline-flex; gap: 6px; align-items: center; }

.ds-appt__token {
  margin-inline-start: auto;
  font: var(--fw-bold) var(--fs-2xs) var(--font-display);
  color: var(--turq-700);
}

.ds-appt-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

/* A two-column form, collapsing to one when the page is narrow. */
.ds-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0 16px;
}

.ds-form-grid .ds-field { margin-bottom: 14px; }

/* The play button over a video's poster in the clinic gallery. */
.ds-play {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(8, 24, 58, .78);
  color: var(--white);
  display: grid;
  place-items: center;
}

/* A shorter hero for the pages that carry a heading rather than a search. */
.ds-hero--short { padding: 64px var(--gutter-web); }
.ds-hero--short h1 { font-size: var(--fs-d2); }

/* The footnotes under the price list: three quiet cards on the alt surface. */
.ds-note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.ds-note-grid b {
  display: block;
  font: var(--fw-bold) var(--fs-h3) var(--font-display);
  color: var(--text-strong);
  margin: 10px 0 6px;
}

.ds-note-grid p { font-size: var(--fs-xs); line-height: 1.8; color: var(--text-muted); margin: 0; }

/* The three numbered steps under the doctor list. */
.ds-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--navy-700);
}

.ds-steps > * { padding: 28px 26px 0 0; }

.ds-steps__n { font: var(--fw-black) var(--fs-sm) var(--font-display); color: var(--accent-strong); }

.ds-steps h3 { font: var(--fw-bold) var(--fs-h2) var(--font-display); margin: 10px 0 8px; }

.ds-steps p { font-size: var(--fs-sm); line-height: 1.8; color: var(--text-muted); margin: 0; }

/* TimeSlotGrid.jsx */
.ds-slots { display: grid; gap: 8px; }

.ds-slot {
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text-body);
  font: var(--fw-semibold) var(--fs-xs) var(--font-display);
  cursor: pointer;
  transition: var(--t-hover);
}

.ds-slot:hover:not(:disabled) { border-color: var(--navy-400); }

.ds-slot--on { background: var(--action); border-color: var(--action); color: var(--action-fg); }

.ds-slot:disabled {
  background: var(--gray-100);
  color: var(--gray-400);
  text-decoration: line-through;
  cursor: not-allowed;
}

/* ── Doctor page ───────────────────────────────────────────────────────────
   A navy band carrying the portrait, the name at display size and the fee,
   then the body split between tabs and a booking card that follows the page. */

.ds-doc-hero {
  background: var(--surface-brand);
  color: var(--white);
  padding: 44px var(--gutter-web);
  display: flex;
  gap: 26px;
  align-items: center;
  flex-wrap: wrap;
}

.ds-doc-hero .ds-avatar {
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .10);
  color: var(--white);
}

.ds-doc-hero h1 {
  font: var(--fw-black) var(--fs-d2) var(--font-display);
  letter-spacing: var(--ls-tight);
  color: var(--white);
  margin: 12px 0 6px;
}

.ds-doc-hero__sub { font-size: var(--fs-body); color: var(--text-on-brand-muted); }
.ds-doc-hero__sub a { color: var(--accent); text-decoration: none; }

.ds-doc-hero__facts {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
  font-size: var(--fs-sm);
  color: var(--text-on-brand-muted);
}

.ds-doc-hero__price { text-align: start; }

.ds-doc-hero__fee {
  font: var(--fw-black) var(--fs-d3) var(--font-display);
  color: var(--accent);
  white-space: nowrap;
}

.ds-doc-hero__note { font-size: var(--fs-2xs); color: var(--text-on-brand-muted); }

.ds-doc-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 40px;
  padding: 36px var(--gutter-web) var(--section-y);
  align-items: start;
}

.ds-book-aside { position: sticky; top: 24px; }

.ds-doc-section {
  font: var(--fw-bold) var(--fs-h3) var(--font-display);
  color: var(--text-strong);
  margin: 26px 0 10px;
}

/* Tabs.jsx — an underlined row, not a pill group. */
.ds-tabs {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}

.ds-tab {
  border: 0;
  background: transparent;
  padding: 0 0 12px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  font: var(--fw-semibold) var(--fs-sm) var(--font-display);
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--t-hover);
}

.ds-tab:hover { color: var(--text-body); }

.ds-tab--on { color: var(--text-strong); border-bottom-color: var(--navy-700); }

/* DateStrip.jsx — the days that can be booked, scrolling sideways if they must. */
.ds-daystrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.ds-day {
  flex: 0 0 auto;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 62px;
  padding: 10px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
  transition: var(--t-hover);
}

.ds-day:hover:not(:disabled) { border-color: var(--navy-400); }

.ds-day--on { background: var(--navy-700); border-color: var(--navy-700); }
.ds-day--on .ds-daystrip__dow { color: var(--text-on-brand-muted); }
.ds-day--on .ds-daystrip__num { color: var(--white); }

.ds-day--full { opacity: 0.45; cursor: not-allowed; }

.ds-daystrip__dow { font-size: var(--fs-2xs); color: var(--text-soft); }

.ds-daystrip__num {
  font: var(--fw-bold) var(--fs-xs) var(--font-display);
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

/* The day filter above the results, and the times each result card offers on that day. */
.ds-dayfilter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.ds-dayfilter__legend {
  font: var(--fw-semibold) var(--fs-xs) var(--font-display);
  color: var(--text-soft);
}

/* The native picker covers its own label, so the whole chip is the target while the control
   itself stays a real date input the browser and the keyboard already know how to drive. */
.ds-dayfilter__pick {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill, 999px);
  background: var(--white);
  font: var(--fw-semibold) var(--fs-xs) var(--font-display);
  color: var(--text-body);
  cursor: pointer;
  transition: var(--t-hover);
}

.ds-dayfilter__pick:hover { border-color: var(--navy-400); }

.ds-dayfilter__pick--on {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: var(--white);
}

.ds-dayfilter__pick input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.ds-dayslots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.ds-dayslots .ds-slot { height: 34px; padding: 0 14px; }

.ds-dayslots__more {
  font: var(--fw-semibold) var(--fs-xs) var(--font-display);
  color: var(--navy-700);
  text-decoration: none;
}

.ds-dayslots__more:hover { text-decoration: underline; }

/* The row and the times it offers read as one result, so the rule goes round both. */
.ds-doc-list__row { border-bottom: 1px solid var(--border); }
.ds-doc-list__row .ds-doc-row { border-bottom: 0; }
.ds-doc-list__row .ds-dayslots { margin: 0 8px 20px; }

/* A slot rendered as a link keeps the grid's button shape. */
a.ds-slot {
  display: grid;
  place-items: center;
  text-decoration: none;
}

/* The search page's filter rail beside its results. */
.ds-search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding: 36px var(--gutter-web) var(--section-y);
  align-items: start;
}

.ds-filters { display: grid; gap: 22px; align-content: start; }

.ds-filters h3 { font: var(--fw-bold) var(--fs-h3) var(--font-display); margin: 0 0 12px; }

.ds-filters__group {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  display: grid;
  gap: 10px;
}

.ds-filters__legend { font: var(--fw-bold) var(--fs-xs) var(--font-display); color: var(--text-muted); }

/* The chip bar the search page puts above its results. */
.ds-filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 28px var(--gutter-web);
  border-bottom: 1px solid var(--border);
}

.ds-filter-bar__count { margin-inline-start: auto; font-size: var(--fs-sm); color: var(--text-muted); }
.ds-filter-bar__count b { color: var(--text-strong); }

@media (max-width: 1100px) {
  .ds-search-layout,
  .ds-doc-layout { grid-template-columns: 1fr; gap: 24px; }
  .ds-book-aside { position: static; }
  .ds-plan-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 960px) {
  .ds-hero { padding: 48px var(--gutter-web) 56px; }
  .ds-hero h1 { font-size: var(--fs-d3); }
  .ds-hero__search { grid-template-columns: 1fr; }
  .ds-hero__stats,
  .ds-spec-grid,
  .ds-steps { grid-template-columns: repeat(2, 1fr); }
  .ds-spec-grid > * { border-inline-start: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .ds-spec-grid > :nth-child(2n + 1) { border-inline-start: 0; }
  .ds-spec-grid > :nth-last-child(-n + 2) { border-bottom: 0; }
  .ds-doc-row { grid-template-columns: 56px 1fr; gap: 14px; }
  .ds-doc-row__price,
  .ds-doc-row > .ds-btn { grid-column: 2; }
  .ds-site-actions { width: 100%; margin-inline-start: 0; }
}

@media (max-width: 960px) {
  .ds-note-grid { grid-template-columns: repeat(2, 1fr); }
  .ds-doc-hero { padding: 28px var(--gutter-web); gap: 18px; }
  .ds-doc-hero h1 { font-size: var(--fs-d3); }
}

@media (max-width: 620px) {
  .ds-site-header {
    gap: 16px;
    padding: 16px var(--gutter-web);
  }

  .ds-site-brand,
  .ds-site-nav,
  .ds-site-actions { width: 100%; }

  .ds-site-nav {
    gap: 10px 18px;
    justify-content: flex-start;
  }

  .ds-site-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .ds-site-actions .ds-btn {
    justify-content: center;
    min-width: 0;
    padding-inline: 10px;
  }

  .ds-hero__stats,
  .ds-spec-grid,
  .ds-plan-grid,
  .ds-note-grid,
  .ds-steps { grid-template-columns: 1fr; }
  .ds-spec-grid > * { border-inline-start: 0; }
}
