/* ==========================================================================
   Cedar Health — bespoke allied-health clinic concept
   Only used by /concepts/clinic/. Shares no rules with local-concept.css.

   Contrast notes (measured against the sRGB relative-luminance formula):
     ink   #17302b on paper #f4f2ea .......... 12.5:1
     ink   #17302b on card  #ffffff .......... 14.1:1
     muted #4a625b on paper #f4f2ea ..........  5.9:1
     accent#1e6f63 on paper #f4f2ea ..........  5.3:1
     white #ffffff on accent #1e6f63 .........  6.0:1
     paper #f4f2ea on ink   #17302b .......... 12.5:1
     mint  #cce9df on ink   #17302b .......... 10.9:1
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ch-ink: #17302b;
  --ch-ink-soft: #274740;
  --ch-muted: #4a625b;
  --ch-paper: #f4f2ea;
  --ch-paper-deep: #e9e6d9;
  --ch-card: #ffffff;
  --ch-accent: #1e6f63;
  --ch-accent-deep: #175a50;
  --ch-mint: #cce9df;
  --ch-mint-soft: #e2f2ea;
  --ch-sand: #b9805a;
  --ch-line: rgba(23, 48, 43, 0.14);
  --ch-line-strong: rgba(23, 48, 43, 0.3);
  --ch-shadow-sm: 0 4px 14px rgba(23, 48, 43, 0.06);
  --ch-shadow: 0 20px 52px rgba(23, 48, 43, 0.09);
  --ch-shadow-lg: 0 30px 80px rgba(23, 48, 43, 0.16);
  --ch-focus: #0d3b34;
  --ch-focus-light: #cce9df;
  --ch-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ch-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ch-radius: 1.15rem;
  --ch-pad: clamp(1.15rem, 4vw, 4.5rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 7.5rem;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100svh;
  overflow-x: clip;
  background: var(--ch-paper);
  color: var(--ch-ink);
  font-family: var(--ch-body);
  font-size: 1rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.is-menu-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--ch-display);
  font-weight: 540;
  letter-spacing: -0.03em;
  line-height: 1.06;
  font-optical-sizing: auto;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 4.1rem);
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
}

h3 {
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
}

table {
  border-collapse: collapse;
  width: 100%;
}

fieldset {
  min-width: 0;
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

ul,
ol {
  padding: 0;
  margin: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid var(--ch-focus);
  outline-offset: 3px;
  border-radius: 0.3rem;
}

::selection {
  background: var(--ch-mint);
  color: var(--ch-ink);
}

.ch-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ch-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ch-icon--lead {
  width: 1.2rem;
  height: 1.2rem;
  color: var(--ch-accent);
}

/* Every custom control hides its real radio/checkbox at 1px. Anchoring each one
   inside its own label keeps browser focus-scrolling on the control the user is
   actually tabbing to, instead of the top of the panel. */
.ch-need,
.ch-visit,
.ch-prac,
.ch-day,
.ch-time,
.ch-chip,
.ch-switch__opt,
.ch-hour__seg,
.ch-check {
  position: relative;
}

.ch-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.ch-skip {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 200;
  padding: 0.85rem 1.15rem;
  border-radius: 999px;
  background: var(--ch-ink);
  color: var(--ch-paper);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-220%);
  transition: transform 160ms ease;
}

.ch-skip:focus {
  transform: translateY(0);
}

/* ------------------------------------------------------------- primitives -- */

.ch-eyebrow {
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--ch-accent-deep);
}

.ch-eyebrow--light {
  color: var(--ch-mint);
}

.ch-fine {
  color: var(--ch-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.ch-fine--light {
  color: rgba(244, 242, 234, 0.78);
}

.ch-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--ch-accent);
  box-shadow: 0 0 0 0.22rem rgba(30, 111, 99, 0.2);
}

.is-closed .ch-dot,
.ch-dot--closed {
  background: var(--ch-sand);
  box-shadow: 0 0 0 0.22rem rgba(185, 128, 90, 0.22);
}

.ch-count {
  margin-top: 0.9rem;
  color: var(--ch-muted);
  font-size: 0.78rem;
  font-weight: 620;
}

.ch-btn {
  min-height: 3.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.35rem;
  border: 1px solid var(--ch-accent-deep);
  border-radius: 999px;
  background: var(--ch-accent-deep);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  transition:
    transform 170ms ease,
    background-color 170ms ease,
    box-shadow 170ms ease;
}

.ch-btn:hover {
  background: #114740;
  border-color: #114740;
  box-shadow: 0 14px 28px rgba(17, 71, 64, 0.26);
  transform: translateY(-2px);
}

.ch-btn:active {
  transform: translateY(0) scale(0.985);
}

.ch-btn--sm {
  min-height: 2.8rem;
  padding: 0.55rem 1.05rem;
  font-size: 0.8rem;
}

.ch-btn--full {
  width: 100%;
}

.ch-btn--ghost {
  border-color: var(--ch-line-strong);
  background: transparent;
  color: var(--ch-ink);
}

.ch-btn--ghost:hover {
  border-color: var(--ch-ink);
  background: rgba(23, 48, 43, 0.06);
  box-shadow: none;
  color: var(--ch-ink);
}

.ch-linkish {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
  color: var(--ch-accent-deep);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.ch-linkish:hover {
  color: var(--ch-ink);
}

/* ---------------------------------------------------------- preview bar -- */

.ch-preview {
  position: relative;
  z-index: 90;
  min-height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem var(--ch-pad);
  background: var(--ch-ink);
  color: rgba(244, 242, 234, 0.84);
  font-size: 0.7rem;
  font-weight: 620;
}

.ch-preview a {
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #f4f2ea;
  text-decoration: none;
}

.ch-preview a:hover {
  text-decoration: underline;
}

.ch-preview__note {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
}

.ch-preview .ch-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.ch-preview :focus-visible {
  outline-color: var(--ch-focus-light);
}

/* --------------------------------------------------------------- header -- */

/* The hero behind this strip is a single flat paper field with no photograph,
   so one ink colour is legible right across it. The pill surfaces are for
   separation once the page scrolls a card underneath. */
.ch-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem var(--ch-pad);
  pointer-events: none;
}

.ch-header > * {
  pointer-events: auto;
}

.ch-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.35rem 1.05rem 0.35rem 0.35rem;
  border: 1px solid var(--ch-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ch-card) 92%, transparent);
  box-shadow: var(--ch-shadow-sm);
  color: var(--ch-ink);
  text-decoration: none;
}

.ch-brand__mark {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ch-accent-deep);
  color: #ffffff;
}

.ch-brand__leaf {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ch-brand__text strong {
  display: block;
  font-family: var(--ch-display);
  font-size: 1.05rem;
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.ch-brand__text small {
  display: block;
  color: var(--ch-muted);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.ch-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.4vw, 1.35rem);
  padding: 0.3rem 0.35rem 0.3rem clamp(0.9rem, 1.8vw, 1.4rem);
  border: 1px solid var(--ch-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ch-card) 92%, transparent);
  box-shadow: var(--ch-shadow-sm);
  font-size: 0.79rem;
  font-weight: 660;
}

@supports (backdrop-filter: blur(1px)) {
  .ch-brand,
  .ch-nav {
    background: color-mix(in srgb, var(--ch-card) 80%, transparent);
    backdrop-filter: blur(16px) saturate(140%);
  }
}

.ch-nav > a:not(.ch-btn) {
  position: relative;
  min-height: 2.75rem;
  min-width: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ch-ink);
  text-decoration: none;
  white-space: nowrap;
}

.ch-nav > a:not(.ch-btn)::after {
  position: absolute;
  right: 0;
  bottom: 0.5rem;
  left: 0;
  height: 1.5px;
  border-radius: 2px;
  background: var(--ch-accent);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 200ms ease;
}

.ch-nav > a:not(.ch-btn):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.ch-menu-toggle {
  min-height: 2.9rem;
  display: none;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ch-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--ch-card) 92%, transparent);
  box-shadow: var(--ch-shadow-sm);
  font-size: 0.8rem;
  font-weight: 720;
}

/* ----------------------------------------------------------------- hero -- */

.ch-hero {
  position: relative;
  padding: 6.5rem var(--ch-pad) clamp(3rem, 6vw, 5rem);
  margin-top: -4.9rem;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% -8%, var(--ch-mint-soft), transparent 70%),
    var(--ch-paper);
}

.ch-hero__contours {
  position: absolute;
  top: -2rem;
  right: 0;
  left: 0;
  height: 34rem;
  color: rgba(30, 111, 99, 0.16);
  pointer-events: none;
}

.ch-hero__inner {
  position: relative;
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
}

.ch-hero h1 {
  margin-top: 1.1rem;
  text-wrap: balance;
}

.ch-hero__lede {
  max-width: 44rem;
  margin: 1.25rem auto 0;
  color: var(--ch-ink-soft);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
}

.ch-status {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 1.5rem;
  padding: 0.5rem 1.05rem 0.5rem 0.9rem;
  border: 1px solid var(--ch-line);
  border-radius: 999px;
  background: var(--ch-card);
  box-shadow: var(--ch-shadow-sm);
  font-size: 0.8rem;
}

.ch-status strong {
  font-weight: 760;
}

.ch-status span[data-desk-detail] {
  color: var(--ch-muted);
}

/* step 1 ------------------------------------------------------------------ */

.ch-step-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ch-accent-deep);
}

.ch-step-badge span {
  width: 1.55rem;
  height: 1.55rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ch-accent-deep);
  color: #ffffff;
  font-family: var(--ch-display);
  font-size: 0.86rem;
  font-weight: 620;
  letter-spacing: 0;
}

.ch-needs {
  position: relative;
  max-width: 74rem;
  margin: clamp(2.25rem, 4vw, 3.25rem) auto 0;
  padding: clamp(1.25rem, 2.6vw, 2.25rem);
  border: 1px solid var(--ch-line);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow);
}

.ch-needs__head {
  max-width: 42rem;
}

.ch-needs__head h2 {
  margin-top: 0.6rem;
  font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.ch-needs__sub {
  margin-top: 0.65rem;
  color: var(--ch-muted);
  font-size: 0.88rem;
}

.ch-needs__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15.5rem, 100%), 1fr));
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.ch-need {
  display: block;
  cursor: pointer;
}

.ch-need input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-need__box {
  position: relative;
  min-height: 9.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 1rem 1.05rem 2.6rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: var(--ch-radius);
  background: var(--ch-paper);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ch-need__title {
  font-family: var(--ch-display);
  font-size: 1.12rem;
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.ch-need__sub {
  color: var(--ch-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.ch-need__tag {
  position: absolute;
  bottom: 0.95rem;
  left: 1.05rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--ch-mint);
  color: var(--ch-ink);
  font-size: 0.66rem;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ch-need:hover .ch-need__box {
  border-color: var(--ch-accent);
  transform: translateY(-2px);
  box-shadow: var(--ch-shadow-sm);
}

.ch-need input:checked + .ch-need__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-card);
  box-shadow:
    inset 0 0 0 2px var(--ch-accent-deep),
    var(--ch-shadow-sm);
}

.ch-need input:checked + .ch-need__box::after {
  position: absolute;
  top: 0.9rem;
  right: 0.95rem;
  width: 1.4rem;
  height: 1.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ch-accent-deep);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  content: "✓";
}

.ch-need input:focus-visible + .ch-need__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

/* route readout ----------------------------------------------------------- */

.ch-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 1.5rem;
  margin-top: 1.4rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--ch-radius);
  background: var(--ch-ink);
  color: var(--ch-paper);
}

.ch-route__label {
  grid-column: 1;
  color: var(--ch-mint);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.ch-route__line {
  grid-column: 1;
  font-size: 1.02rem;
}

.ch-route__line strong {
  font-weight: 720;
  color: #ffffff;
}

.ch-route__aside {
  grid-column: 1;
  color: rgba(244, 242, 234, 0.76);
  font-size: 0.79rem;
}

.ch-route .ch-btn {
  grid-column: 2;
  grid-row: 1 / span 3;
  border-color: var(--ch-mint);
  background: var(--ch-mint);
  color: var(--ch-ink);
}

.ch-route .ch-btn:hover {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.28);
}

.ch-route :focus-visible {
  outline-color: var(--ch-focus-light);
}

/* --------------------------------------------------------------- intake -- */

.ch-intake {
  padding: clamp(3.25rem, 6vw, 5.5rem) var(--ch-pad) clamp(3rem, 6vw, 5rem);
  border-top: 1px solid var(--ch-line);
  background: linear-gradient(180deg, var(--ch-paper-deep), var(--ch-paper) 26rem);
}

.ch-intake__head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.ch-intake__head h2 {
  margin-top: 0.7rem;
  text-wrap: balance;
}

.ch-intake__intro {
  margin-top: 0.9rem;
  color: var(--ch-ink-soft);
  font-size: 0.98rem;
}

.ch-intake__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 21.5rem;
  align-items: start;
  gap: clamp(1rem, 2.2vw, 2rem);
}

/* the numbered rail ------------------------------------------------------- */

.ch-path {
  position: relative;
  display: grid;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.ch-step {
  position: relative;
  padding: clamp(1.15rem, 2.2vw, 1.9rem);
  border: 1px solid var(--ch-line);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow-sm);
}

.ch-step h3 {
  margin-top: 0.55rem;
}

.ch-step__intro {
  max-width: 44rem;
  margin-top: 0.6rem;
  color: var(--ch-muted);
  font-size: 0.88rem;
}

/* new / returning switch -------------------------------------------------- */

.ch-switch {
  margin-top: 1.2rem;
}

.ch-switch legend {
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  font-weight: 720;
}

.ch-switch__track {
  display: inline-flex;
  padding: 0.25rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 999px;
  background: var(--ch-paper);
}

.ch-switch__opt {
  cursor: pointer;
}

.ch-switch__opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-switch__opt span {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1.15rem;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  transition: background-color 150ms ease, color 150ms ease;
}

.ch-switch__opt input:checked + span {
  background: var(--ch-accent-deep);
  color: #ffffff;
}

.ch-switch__opt input:focus-visible + span {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-switch__note {
  margin-top: 0.7rem;
  color: var(--ch-muted);
  font-size: 0.8rem;
}

/* visit cards ------------------------------------------------------------- */

.ch-visits {
  margin-top: 1.35rem;
}

.ch-visits__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr));
  gap: 0.65rem;
}

.ch-visit {
  display: block;
  cursor: pointer;
}

.ch-visit input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-visit__box {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 0.95rem;
  background: var(--ch-paper);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.ch-visit__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.ch-visit__name {
  font-family: var(--ch-display);
  font-size: 1.04rem;
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.ch-visit__fee {
  font-size: 0.95rem;
  font-weight: 780;
  white-space: nowrap;
}

.ch-visit__meta {
  color: var(--ch-accent-deep);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ch-visit__what {
  margin-top: 0.15rem;
  color: var(--ch-muted);
  font-size: 0.81rem;
  line-height: 1.45;
}

.ch-visit:hover .ch-visit__box {
  border-color: var(--ch-accent);
}

.ch-visit input:checked + .ch-visit__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-mint-soft);
  box-shadow: inset 0 0 0 2px var(--ch-accent-deep);
}

.ch-visit input:focus-visible + .ch-visit__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

/* practitioners ----------------------------------------------------------- */

.ch-team {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

.ch-prac {
  display: block;
  cursor: pointer;
}

.ch-prac input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-prac__box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 0.95rem;
  background: var(--ch-paper);
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease,
    opacity 150ms ease;
}

/* Placeholder portraits: a drawn monogram disc rather than a grey box or a
   broken image. A photo request is filed for these. */
.ch-prac__avatar {
  position: relative;
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 20%, var(--ch-mint), var(--ch-accent) 96%);
  color: #ffffff;
  font-family: var(--ch-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.ch-prac__avatar::after {
  content: attr(data-initials);
}

.ch-prac__body {
  display: grid;
  gap: 0.14rem;
  min-width: 0;
}

.ch-prac__name {
  font-family: var(--ch-display);
  font-size: 1.1rem;
  font-weight: 580;
  letter-spacing: -0.02em;
}

.ch-prac__cred {
  display: inline-block;
  padding: 0.06rem 0.42rem;
  border-radius: 999px;
  background: var(--ch-ink);
  color: var(--ch-paper);
  font-family: var(--ch-body);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  vertical-align: 0.14em;
}

.ch-prac__role {
  color: var(--ch-accent-deep);
  font-size: 0.74rem;
  font-weight: 740;
}

.ch-prac__focus {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.ch-prac__focus span {
  padding: 0.14rem 0.55rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 640;
}

.ch-prac__meta {
  margin-top: 0.25rem;
  color: var(--ch-muted);
  font-size: 0.73rem;
}

.ch-prac__state {
  color: var(--ch-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: right;
  text-transform: uppercase;
}

.ch-prac__state strong {
  display: block;
  color: var(--ch-ink);
  font-size: 0.86rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.ch-prac:hover .ch-prac__box {
  border-color: var(--ch-accent);
}

.ch-prac input:checked + .ch-prac__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-mint-soft);
  box-shadow: inset 0 0 0 2px var(--ch-accent-deep);
}

.ch-prac input:focus-visible + .ch-prac__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-prac input:disabled + .ch-prac__box {
  border-style: dashed;
  background: transparent;
  cursor: not-allowed;
}

.ch-prac input:disabled + .ch-prac__box .ch-prac__avatar {
  background: var(--ch-paper-deep);
  color: var(--ch-muted);
}

.ch-prac:has(input:disabled) {
  cursor: not-allowed;
}

/* days + times ------------------------------------------------------------ */

.ch-when {
  margin-top: 1.35rem;
}

.ch-days__rail {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(6.2rem, 100%), 1fr));
  gap: 0.5rem;
}

.ch-when__fallback {
  grid-column: 1 / -1;
  color: var(--ch-muted);
  font-size: 0.84rem;
}

.ch-day {
  display: block;
  cursor: pointer;
}

.ch-day input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-day__box {
  min-height: 4.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  padding: 0.55rem 0.35rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 0.85rem;
  background: var(--ch-paper);
  text-align: center;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    color 150ms ease;
}

.ch-day__dow {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ch-day__num {
  font-family: var(--ch-display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.ch-day__open {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--ch-muted);
}

.ch-day:hover .ch-day__box {
  border-color: var(--ch-accent);
}

.ch-day input:checked + .ch-day__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-accent-deep);
  color: #ffffff;
}

/* rgba(255,255,255,.86) on #175a50 measures 5.0:1 — the sub-label stays
   quieter than the date without dropping below AA. */
.ch-day input:checked + .ch-day__box .ch-day__open {
  color: rgba(255, 255, 255, 0.86);
}

.ch-day input:focus-visible + .ch-day__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-day input:disabled + .ch-day__box {
  border-style: dashed;
  background: transparent;
  color: var(--ch-muted);
  cursor: not-allowed;
}

.ch-times {
  margin-top: 1.35rem;
}

.ch-times__legend {
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  font-weight: 720;
}

.ch-times__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(6.5rem, 100%), 1fr));
  gap: 0.45rem;
}

.ch-time {
  display: block;
  cursor: pointer;
}

.ch-time input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-time__box {
  min-height: 2.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 0.7rem;
  background: var(--ch-paper);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ch-time:hover .ch-time__box {
  border-color: var(--ch-accent);
}

.ch-time input:checked + .ch-time__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-accent-deep);
  color: #ffffff;
}

.ch-time input:focus-visible + .ch-time__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-when__echo {
  margin-top: 0.85rem;
  color: var(--ch-muted);
  font-size: 0.82rem;
}

.ch-when__none {
  padding: 0.9rem 1rem;
  border: 1px dashed var(--ch-line-strong);
  border-radius: 0.8rem;
  color: var(--ch-muted);
  font-size: 0.85rem;
}

/* summary ----------------------------------------------------------------- */

.ch-summary {
  position: sticky;
  top: 6.5rem;
}

.ch-summary__card {
  position: relative;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border: 1px solid var(--ch-line);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow);
}

.ch-summary__rows {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ch-line);
}

.ch-summary__rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.ch-summary__rows dt {
  flex: 0 0 auto;
  color: var(--ch-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ch-summary__rows dd {
  font-size: 0.9rem;
  font-weight: 620;
  text-align: right;
}

.ch-summary__fee {
  padding-top: 0.55rem;
  border-top: 1px solid var(--ch-line);
}

.ch-summary__net dd {
  font-family: var(--ch-display);
  font-size: 1.5rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.ch-summary__cover {
  margin-top: 0.75rem;
  color: var(--ch-muted);
  font-size: 0.78rem;
}

.ch-summary__cover a {
  color: var(--ch-accent-deep);
  font-weight: 700;
}

.ch-summary__card .ch-btn {
  margin-top: 1.1rem;
}

.ch-summary__card .ch-fine {
  margin-top: 0.75rem;
}

.ch-summary__done {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.65rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-card);
  text-align: center;
}

.ch-summary__mark {
  width: 2.9rem;
  height: 2.9rem;
  display: grid;
  place-items: center;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--ch-mint);
  color: var(--ch-accent-deep);
}

.ch-summary__mark .ch-icon {
  width: 1.4rem;
  height: 1.4rem;
  stroke-width: 2.2;
}

.ch-summary__done p:not(.ch-eyebrow) {
  color: var(--ch-ink-soft);
  font-size: 0.87rem;
}

/* ------------------------------------------------------------- coverage -- */

.ch-coverage {
  padding: clamp(3.25rem, 6vw, 5.5rem) var(--ch-pad);
  background:
    radial-gradient(80% 60% at 12% 0%, rgba(30, 111, 99, 0.4), transparent 62%),
    var(--ch-ink);
  color: var(--ch-paper);
}

.ch-coverage__head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.ch-coverage__head h2 {
  margin-top: 0.7rem;
  text-wrap: balance;
}

.ch-coverage__head p {
  margin-top: 0.9rem;
  color: rgba(244, 242, 234, 0.84);
  font-size: 0.98rem;
}

.ch-coverage__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: start;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.ch-coverage :focus-visible {
  outline-color: var(--ch-focus-light);
}

.ch-plan {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.15rem, 2.2vw, 1.75rem);
  border: 1px solid rgba(244, 242, 234, 0.2);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: rgba(244, 242, 234, 0.06);
}

.ch-plan__set legend,
.ch-field__label,
.ch-field > span {
  margin-bottom: 0.55rem;
  display: block;
  color: var(--ch-mint);
  font-size: 0.72rem;
  font-weight: 780;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ch-plan__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ch-chip {
  cursor: pointer;
}

.ch-chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-chip span {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(244, 242, 234, 0.34);
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 660;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ch-chip:hover span {
  border-color: var(--ch-mint);
}

.ch-chip input:checked + span {
  border-color: var(--ch-mint);
  background: var(--ch-mint);
  color: var(--ch-ink);
  font-weight: 740;
}

.ch-chip input:focus-visible + span {
  outline: 3px solid var(--ch-focus-light);
  outline-offset: 2px;
}

.ch-chip input:disabled + span {
  border-color: rgba(244, 242, 234, 0.16);
  color: rgba(244, 242, 234, 0.62);
  cursor: not-allowed;
}

/* A plan type with a fixed rate has no percentage to pick, so the control is
   disabled in place rather than removed — the layout never shifts underfoot. */
.ch-plan__set.is-off legend {
  color: rgba(204, 233, 223, 0.66);
}

.ch-plan__set.is-off .ch-chip {
  cursor: not-allowed;
}

.ch-plan__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  align-items: start;
  gap: 1.1rem;
}

.ch-field select {
  width: 100%;
  min-height: 2.9rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid rgba(244, 242, 234, 0.34);
  border-radius: 0.7rem;
  background: var(--ch-ink);
  color: var(--ch-paper);
  font-size: 0.88rem;
  font-weight: 640;
}

.ch-stepper__controls {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ch-round {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 242, 234, 0.34);
  border-radius: 50%;
  color: var(--ch-paper);
  transition: background-color 150ms ease, border-color 150ms ease;
}

.ch-round:hover {
  border-color: var(--ch-mint);
  background: rgba(204, 233, 223, 0.16);
}

.ch-round[disabled] {
  opacity: 0.38;
  cursor: not-allowed;
}

.ch-stepper__value {
  min-width: 4.5rem;
  font-family: var(--ch-display);
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  text-align: center;
}

.ch-plan__note {
  color: rgba(244, 242, 234, 0.84);
  font-size: 0.83rem;
}

/* the ledger -------------------------------------------------------------- */

.ch-ledger {
  padding: clamp(1.15rem, 2.2vw, 1.75rem);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-paper);
  color: var(--ch-ink);
}

.ch-ledger__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ch-accent-deep);
}

.ch-ledger__bar {
  display: flex;
  height: 2.2rem;
  margin-top: 0.85rem;
  overflow: hidden;
  border-radius: 0.6rem;
  background: var(--ch-paper-deep);
}

.ch-ledger__seg {
  display: block;
  height: 100%;
  transition: width 260ms ease;
}

.ch-ledger__seg--used {
  background: repeating-linear-gradient(
    -45deg,
    #17302b,
    #17302b 5px,
    #274740 5px,
    #274740 10px
  );
}

.ch-ledger__seg--now {
  background: var(--ch-accent);
}

.ch-ledger__seg--left {
  background: var(--ch-mint);
}

.ch-ledger__key {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-top: 0.75rem;
  color: var(--ch-muted);
  font-size: 0.78rem;
}

.ch-ledger__key li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ch-ledger__key strong {
  color: var(--ch-ink);
  font-weight: 780;
}

.ch-key {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 0.2rem;
}

.ch-key--used {
  background: var(--ch-ink);
}

.ch-key--now {
  background: var(--ch-accent);
}

.ch-key--left {
  background: var(--ch-mint);
  outline: 1px solid var(--ch-line-strong);
}

.ch-ledger__math {
  display: grid;
  gap: 0.4rem;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ch-line);
}

.ch-ledger__math > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.ch-ledger__math dt {
  color: var(--ch-muted);
  font-weight: 620;
}

.ch-ledger__math dd {
  font-weight: 720;
}

.ch-ledger__total {
  padding-top: 0.55rem;
  border-top: 1px solid var(--ch-line);
}

.ch-ledger__total dt {
  color: var(--ch-ink);
  font-weight: 740;
}

.ch-ledger__total dd {
  font-family: var(--ch-display);
  font-size: 1.65rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.ch-ledger__runway {
  margin-top: 0.9rem;
  padding: 0.7rem 0.9rem;
  border-radius: 0.7rem;
  background: var(--ch-mint-soft);
  font-size: 0.83rem;
  font-weight: 600;
}

.ch-ledger .ch-fine--light {
  color: var(--ch-muted);
  margin-top: 0.9rem;
}

/* ---------------------------------------------------------- first visit -- */

.ch-first {
  padding: clamp(3.25rem, 6vw, 5.5rem) var(--ch-pad);
  background: var(--ch-paper);
}

.ch-first__head {
  max-width: 46rem;
  margin-bottom: clamp(1.75rem, 3.5vw, 2.75rem);
}

.ch-first__head h2 {
  margin-top: 0.7rem;
}

.ch-first__head p {
  margin-top: 0.9rem;
  color: var(--ch-ink-soft);
  font-size: 0.98rem;
}

.ch-first__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: stretch;
  gap: clamp(1rem, 2.2vw, 2rem);
}

.ch-hour,
.ch-bring {
  display: flex;
  flex-direction: column;
  padding: clamp(1.15rem, 2.2vw, 1.75rem);
  border: 1px solid var(--ch-line);
  border-radius: calc(var(--ch-radius) + 0.35rem);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow-sm);
}

.ch-hour__title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ch-accent-deep);
}

/* One 60-minute bar, split by how long each part of the visit takes. */
.ch-hour__bar {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.9rem;
}

.ch-hour__seg {
  flex: var(--ch-seg) 1 0;
  min-width: 0;
  cursor: pointer;
}

.ch-hour__seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-hour__segbox {
  min-height: 4.4rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.6rem 0.55rem;
  border: 1px solid var(--ch-line-strong);
  border-radius: 0.6rem;
  background: var(--ch-paper);
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ch-hour__min {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ch-muted);
}

.ch-hour__name {
  font-family: var(--ch-display);
  font-size: 1rem;
  font-weight: 580;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.ch-hour__seg:hover .ch-hour__segbox {
  border-color: var(--ch-accent);
}

.ch-hour__seg input:checked + .ch-hour__segbox {
  border-color: var(--ch-accent-deep);
  background: var(--ch-accent-deep);
  color: #ffffff;
}

.ch-hour__seg input:checked + .ch-hour__segbox .ch-hour__min {
  color: rgba(255, 255, 255, 0.86);
}

.ch-hour__seg input:focus-visible + .ch-hour__segbox {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-hour__detail {
  min-height: 8.5rem;
  margin-top: 1.15rem;
  padding: 1.05rem 1.15rem;
  border-radius: var(--ch-radius);
  background: var(--ch-mint-soft);
}

.ch-hour__detail h3 {
  font-size: 1.15rem;
}

.ch-hour__detail p {
  margin-top: 0.5rem;
  color: var(--ch-ink-soft);
  font-size: 0.9rem;
}

.ch-hour__figure {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: 1.15rem;
}

.ch-hour__figure img {
  width: 100%;
  flex: 1;
  min-height: 15rem;
  height: auto;
  object-fit: cover;
  object-position: 50% 38%;
  border-radius: var(--ch-radius);
  /* The stock frames are cool blue-grey; pulling saturation back a touch
     settles them into the palette without hiding the subject. */
  filter: saturate(0.82);
}

.ch-hour__figure figcaption {
  margin-top: 0.6rem;
}


/* checklist --------------------------------------------------------------- */

.ch-bring__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.ch-bring__count {
  font-size: 0.8rem;
  font-weight: 760;
}

.ch-bring__meter {
  height: 0.45rem;
  margin-top: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--ch-paper-deep);
}

.ch-bring__meter span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--ch-accent);
  transition: width 260ms ease;
}

.ch-bring__list {
  display: grid;
  gap: 0.35rem;
  margin-top: 1.15rem;
}

.ch-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 0.65rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.ch-check:hover {
  background: var(--ch-paper);
}

.ch-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ch-check__box {
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  margin-top: 0.15rem;
  border: 1.5px solid var(--ch-line-strong);
  border-radius: 0.45rem;
  background: var(--ch-card);
  color: transparent;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.ch-check__box .ch-icon {
  width: 0.95rem;
  height: 0.95rem;
  stroke-width: 2.6;
}

.ch-check input:checked + .ch-check__box {
  border-color: var(--ch-accent-deep);
  background: var(--ch-accent-deep);
  color: #ffffff;
}

.ch-check input:focus-visible + .ch-check__box {
  outline: 3px solid var(--ch-focus);
  outline-offset: 2px;
}

.ch-check__text {
  color: var(--ch-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.ch-check__text strong {
  display: block;
  color: var(--ch-ink);
  font-size: 0.94rem;
  font-weight: 700;
}

.ch-check input:checked ~ .ch-check__text strong {
  text-decoration: line-through;
  text-decoration-color: var(--ch-line-strong);
}

/* The checklist card is shorter than the hour card beside it, so the closing
   note sits on the bottom edge instead of leaving a pale gap under the card. */
.ch-bring__msg {
  margin-top: auto;
  padding-top: 1rem;
  color: var(--ch-muted);
  font-size: 0.79rem;
}

/* --------------------------------------------------------------- clinic -- */

.ch-clinic {
  padding: clamp(3.25rem, 6vw, 5.5rem) var(--ch-pad) clamp(3.5rem, 6vw, 5.5rem);
  border-top: 1px solid var(--ch-line);
  background: linear-gradient(180deg, var(--ch-paper), var(--ch-paper-deep));
}

.ch-clinic__head {
  margin-bottom: clamp(1.75rem, 3.5vw, 2.5rem);
}

.ch-clinic__head h2 {
  margin-top: 0.7rem;
}

.ch-clinic__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  gap: 0.85rem;
}

.ch-clinic__grid > * {
  min-width: 0;
}

.ch-openstate,
.ch-hours,
.ch-where,
.ch-access,
.ch-policies {
  padding: clamp(1.05rem, 1.8vw, 1.5rem);
  border: 1px solid var(--ch-line);
  border-radius: var(--ch-radius);
  background: var(--ch-card);
  box-shadow: var(--ch-shadow-sm);
}

.ch-openstate {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--ch-ink);
  color: var(--ch-paper);
}

.ch-openstate__label {
  color: var(--ch-mint);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ch-openstate__state {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.55rem;
  font-family: var(--ch-display);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.ch-openstate .ch-dot {
  background: var(--ch-mint);
  box-shadow: 0 0 0 0.22rem rgba(204, 233, 223, 0.24);
}

.ch-openstate.is-closed .ch-dot {
  background: #eab98f;
  box-shadow: 0 0 0 0.22rem rgba(234, 185, 143, 0.24);
}

.ch-openstate__detail {
  margin-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 620;
}

.ch-openstate__clock {
  margin-top: 0.75rem;
  color: rgba(244, 242, 234, 0.76);
  font-size: 0.74rem;
}

.ch-hours h3,
.ch-where h3,
.ch-access h3,
.ch-policies h3 {
  font-size: 1.15rem;
}

.ch-hours table {
  margin-top: 0.75rem;
  font-size: 0.83rem;
}

.ch-hours th,
.ch-hours td {
  padding: 0.42rem 0;
  border-bottom: 1px solid var(--ch-line);
  text-align: left;
}

.ch-hours th {
  font-weight: 620;
}

.ch-hours td {
  color: var(--ch-muted);
  text-align: right;
}

.ch-hours tr.is-today th,
.ch-hours tr.is-today td {
  color: var(--ch-accent-deep);
  font-weight: 780;
}

.ch-where__line {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 0.85rem;
  font-size: 0.88rem;
}

.ch-where__line .ch-icon {
  margin-top: 0.25rem;
  color: var(--ch-accent);
}

.ch-where__line a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--ch-accent-deep);
  font-weight: 660;
}

.ch-where .ch-fine {
  margin-top: 1rem;
}

.ch-access h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ch-access ul {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.ch-access li {
  position: relative;
  padding-left: 1.1rem;
  color: var(--ch-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.ch-access li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--ch-accent);
  content: "";
}

/* The photo column runs the full height of both rows, so the row underneath
   only has to carry the access notes and the policy list. */
.ch-clinic__figure {
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.ch-clinic__figure img {
  width: 100%;
  flex: 1;
  min-height: 18rem;
  height: auto;
  object-fit: cover;
  object-position: 50% 46%;
  border-radius: var(--ch-radius);
  filter: saturate(0.82);
}

.ch-clinic__figure figcaption {
  padding: 0.65rem 0.15rem 0;
}

.ch-policies {
  grid-column: span 2;
}

.ch-access,
.ch-policies {
  align-self: stretch;
}

.ch-policies dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  gap: 0.9rem 1.35rem;
  margin-top: 0.9rem;
}

.ch-policies dt {
  color: var(--ch-accent-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ch-policies dd {
  margin-top: 0.25rem;
  color: var(--ch-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------- footer -- */

.ch-footer {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 3rem);
  padding: clamp(2.5rem, 5vw, 4rem) var(--ch-pad);
  background: var(--ch-ink);
  color: rgba(244, 242, 234, 0.84);
}

.ch-footer .ch-brand {
  border-color: rgba(244, 242, 234, 0.22);
  background: rgba(244, 242, 234, 0.08);
  color: var(--ch-paper);
  backdrop-filter: none;
}

.ch-footer .ch-brand__mark {
  background: var(--ch-mint);
  color: var(--ch-ink);
}

.ch-footer .ch-brand__text small {
  color: rgba(244, 242, 234, 0.7);
}

.ch-footer__brand p {
  margin-top: 1rem;
  font-family: var(--ch-display);
  font-size: 1.35rem;
  font-weight: 540;
  letter-spacing: -0.02em;
  color: var(--ch-paper);
}

.ch-footer__label {
  font-size: 0.83rem;
  line-height: 1.6;
}

.ch-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin-top: 1.25rem;
}

.ch-footer__links a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  color: var(--ch-mint);
  font-size: 0.86rem;
  font-weight: 700;
}

.ch-footer__credit {
  margin-top: 0.75rem;
  color: rgba(244, 242, 234, 0.66);
  font-size: 0.74rem;
}

.ch-footer__credit a {
  color: rgba(244, 242, 234, 0.9);
}

.ch-footer :focus-visible {
  outline-color: var(--ch-focus-light);
}

/* ------------------------------------------------------- dock and toast -- */

.ch-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem 0.55rem 1.15rem;
  border-top: 1px solid rgba(244, 242, 234, 0.16);
  background: var(--ch-ink);
  color: var(--ch-paper);
}

.ch-dock p {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.ch-dock strong {
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-dock span {
  color: var(--ch-mint);
  font-size: 0.76rem;
  font-weight: 700;
}

.ch-dock .ch-btn {
  border-color: var(--ch-mint);
  background: var(--ch-mint);
  color: var(--ch-ink);
}

.ch-dock :focus-visible {
  outline-color: var(--ch-focus-light);
}

.ch-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 120;
  max-width: 26rem;
  margin-inline: auto;
  padding: 0.85rem 1.15rem;
  border-radius: 0.9rem;
  background: var(--ch-ink);
  box-shadow: var(--ch-shadow-lg);
  color: var(--ch-paper);
  font-size: 0.85rem;
  font-weight: 620;
  text-align: center;
  opacity: 0;
  transform: translateY(1.2rem);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}

.ch-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.ch-noscript {
  padding: 1rem var(--ch-pad);
  background: var(--ch-mint);
  color: var(--ch-ink);
  font-size: 0.85rem;
  font-weight: 620;
}

/* ----------------------------------------------------------- responsive -- */

@media (max-width: 1180px) {
  .ch-intake__grid,
  .ch-first__grid,
  .ch-coverage__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-summary {
    position: static;
  }

  .ch-clinic__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Stacked, the photos no longer have a neighbouring column to match, so they
     take a fixed ratio instead of stretching to fill a row. */
  .ch-clinic__figure {
    grid-row: auto;
  }

  .ch-clinic__figure img,
  .ch-hour__figure img {
    flex: none;
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .ch-policies {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  .ch-menu-toggle {
    display: inline-flex;
  }

  .ch-nav {
    position: fixed;
    top: 4.4rem;
    right: 0.7rem;
    left: 0.7rem;
    z-index: 85;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.9rem;
    border-radius: 1.25rem;
    box-shadow: var(--ch-shadow-lg);
    font-size: 0.95rem;
  }

  .ch-nav.is-open {
    display: flex;
  }

  .ch-nav > a:not(.ch-btn) {
    min-height: 3rem;
    padding-inline: 0.6rem;
    border-radius: 0.7rem;
    justify-content: flex-start;
  }

  .ch-nav > a:not(.ch-btn)::after {
    display: none;
  }

  .ch-nav > a:not(.ch-btn):hover {
    background: var(--ch-paper);
  }

  .ch-nav .ch-btn {
    margin-top: 0.5rem;
  }

  .ch-preview {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 1rem;
    font-size: 0.66rem;
  }

  .ch-route {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-route .ch-btn {
    grid-column: 1;
    grid-row: auto;
    margin-top: 0.7rem;
    width: 100%;
  }

  .ch-dock {
    display: flex;
  }

  body:has(.ch-dock:not([hidden])) {
    padding-bottom: 4.4rem;
  }

  .ch-toast {
    bottom: 5.2rem;
  }

  .ch-clinic__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ch-policies {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .ch-hero {
    padding-top: 5.75rem;
  }

  .ch-hero__inner {
    text-align: left;
  }

  .ch-hero__lede {
    margin-inline: 0;
  }

  /* The status line wraps to two rows on a phone, so the pill squares off and
     the dot pins to the first line rather than floating in the middle. */
  .ch-status {
    align-items: flex-start;
    border-radius: 1rem;
  }

  .ch-status .ch-dot {
    margin-top: 0.5rem;
  }

  .ch-prac__box {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .ch-prac__state {
    grid-column: 2;
    text-align: left;
  }

  .ch-prac__state strong {
    display: inline;
  }

  .ch-hour__bar {
    flex-wrap: wrap;
  }

  .ch-hour__seg {
    flex: 1 1 45%;
  }

  .ch-visit__top {
    flex-direction: column;
    gap: 0.1rem;
  }

  /* Two tidy rows: the two links share the top row and the honesty line spans
     underneath, keeping the demo chrome shallow on a phone. */
  .ch-preview {
    display: grid;
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
    gap: 0;
    font-size: 0.62rem;
  }

  .ch-preview__note {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    padding-bottom: 0.3rem;
    text-align: center;
  }

  .ch-preview__app {
    order: 2;
  }

  .ch-brand__text small {
    display: none;
  }

  .ch-footer {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 420px) {
  .ch-days__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ch-times__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ch-switch__track {
    display: flex;
    width: 100%;
  }

  .ch-switch__opt {
    flex: 1;
  }

  .ch-switch__opt span {
    width: 100%;
    justify-content: center;
    padding-inline: 0.5rem;
  }

  .ch-dock p {
    line-height: 1.2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .ch-btn:hover,
  .ch-need:hover .ch-need__box {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --ch-line: rgba(23, 48, 43, 0.42);
    --ch-line-strong: rgba(23, 48, 43, 0.66);
    --ch-muted: #3c534c;
  }

  .ch-hero__contours {
    display: none;
  }
}

@media print {
  .ch-header,
  .ch-preview,
  .ch-dock,
  .ch-toast,
  .ch-hero__contours {
    display: none;
  }

  body {
    background: #fff;
  }
}
