/* ==========================================================================
   Forms — the public patient pages and the staff form builder.

   Public pages (templates/formskit/public*.html, messaging/email/unsubscribe)
   load this file on its own, without app.css. They are part of the clinic
   website: navy header bar with the heart-and-pulse lockup, ivory page, white
   hairline cards, Playfair Display headings, gold call-to-action buttons with
   navy text, and a slim footer with the address and phone. Inside a frame on
   the website (?embed=1, html.pf-embed) the header and footer drop away and
   the page blends into the site. Everything public is scoped to .pf-page.

   Staff pages (list/detail/submissions) load it after app.css for a few
   builder pieces. Those use fk-* classes and the app's own tokens.
   ========================================================================== */

/* ----------------------------------------------------------- public tokens */
html.pf-page {
  color-scheme: light;
  /* brand constants — the same in every theme */
  --navy: #1B2A41;
  --navy-deep: #152233;
  --navy-2: #2C4160;
  --ivory: #F7F4EF;
  --gold: #C9A86C;
  --gold-hover: #E0C58F;

  --pf-canvas: #F7F4EF;
  --pf-surface: #FFFFFF;
  --pf-surface-2: #FBF9F5;
  --pf-surface-3: #F3EEE6;
  --pf-ink: #1B2A41;
  --pf-ink-2: #33415A;
  --pf-ink-3: #4D596A;
  --pf-ink-4: #5F6B78;
  --pf-line: #E6E0D6;
  --pf-line-strong: #D5CDBF;
  --pf-line-soft: #EFEAE2;
  --pf-accent: #1B2A41;          /* navy: checked choices, focus */
  --pf-accent-ink: #7A5F30;      /* gold used as small text on light */
  --pf-accent-soft: #F3ECDD;
  --pf-accent-softer: #FAF6EE;
  --pf-danger: #B3261E;
  --pf-danger-soft: #FBEAE7;
  --pf-focus: inset 0 0 0 2px #1B2A41, 0 0 0 5px rgba(27, 42, 65, .12);
  --pf-outline: #1B2A41;
  --pf-shadow: 0 1px 2px rgba(27, 42, 65, .05), 0 8px 22px -14px rgba(27, 42, 65, .24);
  --pf-header: #1B2A41;
  --pf-footer: #152233;
  --pf-r-sm: 8px;
  --pf-r-lg: 12px;
  --pf-font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --pf-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --pf-ease: cubic-bezier(.2, .8, .2, 1);
}

html.pf-page[data-theme="dark"] {
  color-scheme: dark;
  --pf-canvas: #0E1622;
  --pf-surface: #152233;
  --pf-surface-2: #192840;
  --pf-surface-3: #203049;
  --pf-ink: #F3EFE7;
  --pf-ink-2: #CDD4DE;
  --pf-ink-3: #A6B0BE;
  --pf-ink-4: #8B97A7;
  --pf-line: #253550;
  --pf-line-strong: #33476A;
  --pf-line-soft: #1D2C43;
  --pf-accent: #D4B57C;
  --pf-accent-ink: #E3CA98;
  --pf-accent-soft: rgba(201, 168, 108, .15);
  --pf-accent-softer: rgba(201, 168, 108, .07);
  --pf-danger: #F09A90;
  --pf-danger-soft: rgba(240, 154, 144, .14);
  --pf-focus: inset 0 0 0 2px #C9A86C, 0 0 0 5px rgba(201, 168, 108, .22);
  --pf-outline: #E0C58F;
  --pf-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 26px -14px rgba(0, 0, 0, .7);
  --pf-header: #0B121C;
  --pf-footer: #070C14;
}

/* ------------------------------------------------------------- public base */
.pf-page *, .pf-page *::before, .pf-page *::after { box-sizing: border-box; }
html.pf-page { -webkit-text-size-adjust: 100%; }
.pf-page body {
  margin: 0;
  background: var(--pf-canvas);
  color: var(--pf-ink);
  font-family: var(--pf-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: lining-nums;
}
/* :where() keeps these resets at element weight, so any .pf-* rule wins. */
:where(.pf-page) h1, :where(.pf-page) h2, :where(.pf-page) h3, :where(.pf-page) p { margin: 0; }
:where(.pf-page) a { color: var(--pf-ink); font-weight: 600; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: 3px; }
:where(.pf-page) a:hover { color: var(--pf-accent-ink); }
:where(.pf-page) a[href^="tel:"] { white-space: nowrap; }
.pf-page :focus-visible { outline: 3px solid var(--pf-outline); outline-offset: 3px; border-radius: 4px; }
.pf-page [tabindex="-1"]:focus { outline: none; }
.pf-page [hidden] { display: none !important; }
.pf-page ::selection { background: #F3ECDD; color: #1B2A41; }
.pf-page .sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.pf-skip {
  position: absolute; left: 16px; top: 12px; z-index: 50; transform: translateY(-200%);
  padding: 10px 16px; border-radius: var(--pf-r-sm); background: var(--gold); color: var(--navy) !important;
  font-weight: 600; text-decoration: none; transition: transform .2s var(--pf-ease);
}
.pf-skip:focus { transform: none; }

.pf-shell { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.pf-wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }
.pf-content { flex: 1 0 auto; padding: clamp(32px, 5vw, 64px) 0 clamp(48px, 7vw, 88px); }

/* ---------------------------------------------- the website header bar */
.pf-brand { background: var(--pf-header); color: var(--ivory); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
.pf-brand :focus-visible { outline-color: var(--gold); }
.pf-brand__bar { display: flex; align-items: center; gap: 20px; min-height: 72px; }
.pf-lockup {
  display: inline-flex; align-items: center; gap: 12px; min-width: 0;
  color: inherit !important; text-decoration: none; font-weight: inherit;
}
.pf-lockup .brand-mark { width: 40px; height: 36px; flex: none; --bm-cut: var(--pf-header); }
.pf-lockup__text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.pf-lockup__text b { font: 500 21px/1 var(--pf-display); letter-spacing: .005em; color: var(--ivory); white-space: nowrap; }
.pf-lockup__text small {
  margin-top: 6px; font: 650 10px/1 var(--pf-font); letter-spacing: .2em; text-transform: uppercase;
  color: var(--gold); white-space: nowrap;
}
.pf-brand__phone {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  min-height: 44px; padding: 0 14px; border-radius: var(--pf-r-sm);
  color: var(--ivory) !important; font: 600 15px/1 var(--pf-font); text-decoration: none;
  font-variant-numeric: tabular-nums; transition: background-color .2s;
}
.pf-brand__phone:hover { background: rgba(255, 255, 255, .07); color: var(--ivory) !important; }
.pf-brand__phone svg { color: var(--gold); flex: none; }

/* The brand mark (copied from app.css .brand-mark: these pages don't load it). */
.pf-page .brand-mark { display: block; overflow: visible; }
.pf-page .brand-mark .bm-heart { fill: var(--gold); transform-origin: 24px 22px; transition: transform .5s var(--pf-ease); }
.pf-page .brand-mark .bm-pulse, .pf-page .brand-mark .bm-pulse-out {
  fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 90; stroke-dashoffset: 0;
}
.pf-page .brand-mark .bm-pulse { stroke: var(--bm-cut, var(--navy)); }
.pf-page .brand-mark .bm-pulse-out { stroke: var(--gold); }
.pf-page a:hover .brand-mark .bm-heart { transform: scale(1.06); }
.pf-page a:hover .brand-mark .bm-pulse, .pf-page a:hover .brand-mark .bm-pulse-out { animation: pf-beat 1.1s var(--pf-ease); }
@keyframes pf-beat { 0% { stroke-dashoffset: 90; } 100% { stroke-dashoffset: 0; } }

/* -------------------------------------------------------- page heading */
.pf-eyebrow {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 650 11px/1 var(--pf-font); letter-spacing: .2em; text-transform: uppercase; color: var(--pf-accent-ink);
}
.pf-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.pf-head { max-width: 760px; margin-bottom: clamp(24px, 3.5vw, 40px); }
.pf-title {
  font-family: var(--pf-display); font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.12;
  letter-spacing: -.01em; color: var(--pf-ink); text-wrap: balance;
}
.pf-intro { margin-top: 16px; max-width: 64ch; color: var(--pf-ink-2); font-size: 17px; line-height: 1.65; }
.pf-intro p + p { margin-top: 10px; }
/* Phone numbers and 911 in form text: tap to call. Never split across lines. */
.pf-tel { color: inherit; font-weight: 600; white-space: nowrap; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pf-tel:hover { color: var(--pf-accent); }
/* A photo or PDF upload: the browser's own picker, sized like the other boxes. */
.pf-file { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px dashed var(--pf-line-strong);
  border-radius: var(--pf-r-sm); background: var(--pf-surface); color: var(--pf-ink-2); font: inherit; cursor: pointer; }
.pf-file:focus-visible { outline: none; box-shadow: var(--pf-focus); }

/* ------------------------------------------------- form + aside layout */
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(24px, 4vw, 48px); align-items: start; }
.pf-layout > * { min-width: 0; }

.pf-card {
  background: var(--pf-surface); border: 1px solid var(--pf-line);
  border-radius: var(--pf-r-lg); box-shadow: var(--pf-shadow);
  padding: clamp(24px, 4vw, 44px);
}

.pf-aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.pf-aside__card {
  padding: 22px 22px 24px; border-radius: var(--pf-r-lg);
  background: var(--pf-surface); border: 1px solid var(--pf-line);
}
.pf-aside__card--navy { background: var(--navy); border-color: var(--navy); color: rgba(247, 244, 239, .86); }
.pf-aside__card--navy :focus-visible { outline-color: var(--gold); }
.pf-aside__title { margin: 0 0 12px; font: 500 19px/1.25 var(--pf-display); color: var(--pf-ink); }
.pf-aside__card--navy .pf-aside__title { color: var(--ivory); }
.pf-aside__label { margin: 0 0 12px; font: 650 10.5px/1 var(--pf-font); letter-spacing: .2em; text-transform: uppercase; color: var(--pf-accent-ink); }
.pf-aside__card--navy .pf-aside__label { color: var(--gold); }
.pf-aside__card--toc:not(:has(li + li)) { display: none; }
.pf-toc { list-style: none; margin: 0; padding: 0; counter-reset: pf-toc; display: grid; gap: 2px; }
.pf-toc li { counter-increment: pf-toc; }
.pf-toc a {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: baseline;
  padding: 8px 0; border-top: 1px solid var(--pf-line-soft);
  color: var(--pf-ink-2); font-weight: 500; font-size: 14.5px; line-height: 1.4; text-decoration: none;
}
.pf-toc li:first-child a { border-top: 0; }
.pf-toc a::before { content: counter(pf-toc, decimal-leading-zero); font: 600 11px/1.6 var(--pf-font); letter-spacing: .06em; color: var(--pf-accent-ink); }
.pf-toc a:hover { color: var(--pf-ink); }
.pf-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.pf-points li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; font-size: 14.5px; line-height: 1.5; }
.pf-points svg { margin-top: 2px; color: var(--gold); }
.pf-points b { display: block; color: var(--ivory); font-weight: 600; }
.pf-aside__call {
  display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px; border-radius: var(--pf-r-sm);
  background: rgba(255, 255, 255, .07); color: var(--ivory) !important; text-decoration: none; font-weight: 500; font-size: 13.5px;
}
.pf-aside__call:hover { background: rgba(255, 255, 255, .12); color: var(--ivory) !important; }
.pf-aside__call svg { color: var(--gold); flex: none; }
.pf-aside__call b { display: block; font: 600 17px/1.2 var(--pf-font); letter-spacing: -.005em; }

.pf-required-note { margin-top: 0; font-size: 14px; color: var(--pf-ink-4); }
.pf-req { color: var(--pf-danger); font-weight: 700; }

/* ------------------------------------------------------------ the sections */
.pf-section { margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--pf-line); }
.pf-section--plain:first-of-type { border-top: 0; padding-top: 0; margin-top: 22px; }
.pf-section__title {
  font-family: var(--pf-display); font-size: 24px; line-height: 1.25; font-weight: 500;
  letter-spacing: -.005em; color: var(--pf-ink); scroll-margin-top: 24px;
}
.pf-section__help { margin-top: 6px; font-size: 15px; color: var(--pf-ink-3); max-width: 62ch; }
.pf-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 20px; margin-top: 22px;
}
.pf-section--plain .pf-grid { margin-top: 0; }
.pf-field { min-width: 0; margin: 0; padding: 0; border: 0; scroll-margin-top: 24px; }
.pf-field--full { grid-column: 1 / -1; }
.pf-field--half { grid-column: span 1; }
.pf-field.is-invalid { border-left: 3px solid var(--pf-danger); padding-left: 14px; }

.pf-label {
  display: block; padding: 0; margin: 0 0 8px;
  font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--pf-ink);
}
.pf-help { margin: -3px 0 10px; font-size: 13.5px; line-height: 1.45; color: var(--pf-ink-4); }
.pf-help--after { margin: 7px 0 0; }
.pf-error { margin: 0 0 8px; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--pf-danger); }

/* ------------------------------------------------------------------ inputs */
.pf-page input[type=text], .pf-page input[type=email], .pf-page input[type=tel],
.pf-page input[type=date], .pf-page input[type=number], .pf-page select, .pf-page textarea {
  display: block; width: 100%; min-height: 48px; margin: 0;
  padding: 12px 14px; border: 1px solid var(--pf-line-strong); border-radius: var(--pf-r-sm);
  background: var(--pf-surface); color: var(--pf-ink);
  font: inherit; font-size: 16px; font-weight: 500; line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.pf-page textarea { min-height: 128px; resize: vertical; }
.pf-page input::placeholder, .pf-page textarea::placeholder { color: var(--pf-ink-4); opacity: .75; font-weight: 400; }
.pf-page input:hover, .pf-page select:hover, .pf-page textarea:hover { border-color: var(--pf-ink-4); }
.pf-page input[type=text]:focus, .pf-page input[type=email]:focus, .pf-page input[type=tel]:focus,
.pf-page input[type=date]:focus, .pf-page input[type=number]:focus, .pf-page select:focus, .pf-page textarea:focus {
  outline: none; border-color: transparent; box-shadow: var(--pf-focus);
}
.pf-page [aria-invalid="true"]:not([type=radio]):not([type=checkbox]) { border-color: var(--pf-danger); box-shadow: inset 0 0 0 1px var(--pf-danger); }
.pf-page select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%231B2A41' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 18px;
}
.pf-page[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23C9A86C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}
.pf-page input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .7; }
.pf-page[data-theme="dark"] input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1); }

/* Choices: every option is a tile you can tap anywhere on. */
.pf-options { display: grid; gap: 8px; }
/* Short answers (Yes/No, a 1–5 scale, the PHQ-9 frequencies) sit in one row
   of equal tiles; two or three of them don't need the whole width. */
.pf-options--inline { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.pf-options--inline .pf-check { align-items: center; }
.pf-options--few { max-width: 540px; }
.pf-field--half .pf-options--few { max-width: none; }
.pf-options--columns { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.pf-check {
  position: relative; display: flex; align-items: flex-start; gap: 12px;
  min-height: 48px; padding: 12px 14px; border: 1px solid var(--pf-line-strong); border-radius: var(--pf-r-sm);
  background: var(--pf-surface); color: var(--pf-ink-2); font-size: 15px; font-weight: 500; line-height: 1.4;
  cursor: pointer; transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.pf-check:hover { border-color: var(--pf-ink-4); }
.pf-check:has(input:checked) { border-color: var(--pf-accent); box-shadow: inset 0 0 0 1px var(--pf-accent); background: var(--pf-accent-softer); color: var(--pf-ink); }
.pf-check:has(input:focus-visible) { box-shadow: var(--pf-focus); border-color: transparent; }
.pf-check input {
  flex: 0 0 20px; width: 20px; height: 20px; margin: 0; accent-color: var(--navy); cursor: pointer;
}
.pf-page[data-theme="dark"] .pf-check input { accent-color: var(--gold); }
.pf-check input:focus-visible { outline: none; }
.pf-check__text { min-width: 0; }
.pf-field.is-invalid .pf-check { border-color: color-mix(in srgb, var(--pf-danger) 45%, var(--pf-line-strong)); }

/* A 0–10 scale: one row of numbered buttons, like the paper form's boxes. The
   radio itself is visually hidden; the whole box is its label. */
.pf-options--scale { grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 6px; }
.pf-options--scale .pf-check {
  justify-content: center; align-items: center; min-height: 48px; padding: 0;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.pf-options--scale .pf-check input {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
}

/* A consent box: the statement is the label, the small print sits under it. */
.pf-consent {
  border: 1px solid var(--pf-line); border-radius: var(--pf-r-sm); background: var(--pf-surface-2);
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.pf-consent:has(input:checked) { border-color: var(--pf-accent); background: var(--pf-accent-softer); }
.pf-consent:has(input:focus-visible) { box-shadow: var(--pf-focus); border-color: transparent; }
.pf-check--bare { border: 0; background: transparent; padding: 15px 16px; }
.pf-check--bare:hover, .pf-check--bare:has(input:checked) { background: transparent; box-shadow: none; }
.pf-check--bare:has(input:focus-visible) { box-shadow: none; }
.pf-consent__help { margin: -8px 0 0; padding: 0 16px 14px 48px; font-size: 13px; }
.pf-field.is-invalid .pf-consent { border-color: color-mix(in srgb, var(--pf-danger) 45%, var(--pf-line)); }

/* ------------------------------------------------------ summary and submit */
.pf-summary {
  margin: 0 0 26px; padding: 18px 20px 18px 22px; border: 1px solid color-mix(in srgb, var(--pf-danger) 35%, transparent);
  border-left: 4px solid var(--pf-danger); border-radius: var(--pf-r-sm); background: var(--pf-danger-soft);
}
.pf-summary:focus { outline: none; box-shadow: var(--pf-focus); }
.pf-summary__title { font-family: var(--pf-font); font-size: 16.5px; line-height: 1.35; font-weight: 700; color: var(--pf-danger); }
.pf-summary__text { margin-top: 6px; color: var(--pf-ink-2); }
.pf-summary__list { margin: 10px 0 0; padding-left: 20px; }
.pf-summary__list li + li { margin-top: 4px; }
.pf-summary__list a { color: var(--pf-danger); font-weight: 600; text-decoration: underline; text-decoration-color: currentColor; }

.pf-actions {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px;
  margin-top: 36px; padding-top: 26px; border-top: 1px solid var(--pf-line);
}
.pf-actions__note { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--pf-ink-4); }
.pf-actions__note svg { color: var(--pf-accent-ink); flex: none; }
.pf-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 220px; min-height: 52px; padding: 0 28px; border: 0; border-radius: var(--pf-r-sm);
  background: var(--gold); color: var(--navy); font: inherit; font-size: 16px; font-weight: 600; letter-spacing: 0;
  cursor: pointer; transition: background-color .25s ease, transform .3s var(--pf-ease), box-shadow .3s var(--pf-ease);
}
.pf-submit svg { transition: transform .3s var(--pf-ease); }
.pf-submit:hover { background: var(--gold-hover); transform: translateY(-1px); box-shadow: 0 1px 2px rgba(27, 42, 65, .05), 0 6px 18px -10px rgba(27, 42, 65, .3); }
.pf-submit:hover svg { transform: translateX(3px); }
.pf-submit:active { transform: translateY(0) scale(.98); }
.pf-submit:focus-visible { outline: 3px solid var(--pf-outline); outline-offset: 3px; }
.pf-submit.is-sending { opacity: .7; cursor: progress; }
.pf-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--pf-r-sm); box-shadow: inset 0 0 0 1.5px var(--pf-line-strong);
  color: var(--pf-ink) !important; font-weight: 600; font-size: 15px; text-decoration: none; transition: box-shadow .2s, background-color .2s;
}
.pf-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--pf-ink); background: var(--pf-surface); }

/* ------------------------------------------------ thank-you / closed pages */
.pf-status { max-width: 640px; margin: clamp(8px, 3vw, 32px) auto 0; text-align: center; padding: clamp(36px, 6vw, 60px) clamp(22px, 5vw, 52px); }
.pf-status__icon {
  width: 64px; height: 64px; margin: 0 auto 22px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pf-surface-3); color: var(--pf-ink-3);
}
.pf-status__icon--done { background: var(--navy); color: var(--gold); box-shadow: 0 0 0 6px var(--pf-accent-soft); }
.pf-status .pf-eyebrow { justify-content: center; }
.pf-status .pf-eyebrow::before { display: none; }
.pf-status .pf-title { font-size: clamp(28px, 3.6vw, 38px); }
.pf-status__text { max-width: 480px; margin: 14px auto 0; color: var(--pf-ink-2); font-size: 16.5px; }
.pf-status__text p + p { margin-top: 8px; }
.pf-status__aside { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--pf-line); font-size: 15px; color: var(--pf-ink-3); }
.pf-status .pf-actions { justify-content: center; border-top: 0; margin-top: 26px; padding-top: 0; }

/* ------------------------------------------------------------- footer */
.pf-foot { background: var(--pf-footer); color: rgba(247, 244, 239, .74); font-size: 13.5px; line-height: 1.6; }
.pf-foot :focus-visible { outline-color: var(--gold); }
.pf-foot a { color: rgba(247, 244, 239, .92); font-weight: 500; text-decoration: none; }
.pf-foot a:hover { color: var(--gold-hover); }
.pf-foot__grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; padding: 36px 0 26px; }
.pf-foot__name { display: block; margin-bottom: 4px; font: 500 18px/1.3 var(--pf-display); color: var(--ivory); }
.pf-foot__h { display: block; margin-bottom: 8px; font: 650 10.5px/1 var(--pf-font); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.pf-foot address { font-style: normal; }
.pf-foot__base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding: 16px 0 22px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: 12.5px; color: rgba(247, 244, 239, .62);
}
.pf-foot__base svg { vertical-align: -2px; margin-right: 6px; color: var(--gold); }
.pf-footnote { margin-top: 16px; text-align: center; font-size: 13px; color: var(--pf-ink-4); }

/* -------------------------------------------------------------- embed mode */
/* Inside the clinic website: no page background, header, footer or aside;
   the page is exactly as tall as the form (forms.js reports it to the frame). */
html.pf-embed, .pf-embed body { height: auto; min-height: 0; background: transparent; }
.pf-embed .pf-shell { display: block; min-height: 0; padding: 2px; }
.pf-embed .pf-wrap { width: auto; }
.pf-embed .pf-content { padding: 0; }
.pf-embed .pf-layout { display: block; }
.pf-embed .pf-aside { display: none; }
.pf-embed .pf-head { margin-bottom: 20px; }
.pf-embed .pf-title { font-size: clamp(26px, 3.4vw, 34px); }
.pf-embed .pf-card { box-shadow: none; }
.pf-embed .pf-status { margin-top: 0; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .pf-layout { grid-template-columns: minmax(0, 1fr); }
  .pf-aside { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-aside__card--toc { display: none; }
}
@media (max-width: 760px) {
  .pf-foot__grid { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 28px; }
  .pf-aside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .pf-wrap { width: min(100% - 32px, 1120px); }
  .pf-embed .pf-shell { padding: 1px; }
  .pf-brand__bar { min-height: 60px; gap: 12px; }
  .pf-lockup { gap: 10px; }
  .pf-lockup .brand-mark { width: 34px; height: 31px; }
  .pf-lockup__text b { font-size: 18px; }
  .pf-lockup__text small { display: none; }
  .pf-brand__phone { width: 44px; padding: 0; justify-content: center; }
  .pf-brand__phone-text { display: none; }
  .pf-card { padding: 24px 18px 26px; }
  .pf-intro { font-size: 16px; }
  .pf-section { margin-top: 26px; padding-top: 24px; }
  .pf-section__title { font-size: 21px; }
  .pf-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pf-field--half { grid-column: 1 / -1; }
  .pf-field.is-invalid { padding-left: 12px; }
  .pf-options--inline { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pf-options--tiny { grid-auto-flow: column; grid-template-columns: none; }
  .pf-options--columns { grid-template-columns: minmax(0, 1fr); }
  .pf-options--scale { gap: 3px; }
  .pf-options--scale .pf-check { min-height: 44px; font-size: 14px; }
  .pf-submit { width: 100%; min-width: 0; }
  .pf-actions__note { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-page *, .pf-page *::before, .pf-page *::after { transition: none !important; animation: none !important; }
}
@media print {
  .pf-brand, .pf-foot, .pf-aside, .pf-skip { display: none !important; }
  .pf-page body { background: #fff; }
  .pf-card { box-shadow: none; }
}

/* ==========================================================================
   Staff form builder (app.css tokens)
   ========================================================================== */
.fk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-5); }
.fk-stat {
  display: block; padding: var(--sp-4) var(--sp-5); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: inherit;
}
a.fk-stat:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); color: inherit; }
.fk-stat__label { font-size: 10.5px; font-weight: 650; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-ink); }
.fk-stat__value { margin-top: 4px; font-family: var(--display); font-size: 28px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); }
.fk-stat__meta { font-size: 12px; color: var(--ink-4); }
.fk-stat--attention .fk-stat__value { color: var(--caution); }

.fk-share { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: var(--sp-5); margin-bottom: var(--sp-5); align-items: start; }
.fk-share .card__body { display: flex; flex-direction: column; gap: var(--sp-3); }
.fk-share__hint { font-size: 12.5px; color: var(--ink-4); margin: 0; }
.fk-share__row { display: flex; gap: 6px; align-items: stretch; }
.fk-share__row input { flex: 1 1 auto; min-width: 0; padding-left: 13px; font-family: var(--mono); font-size: 12.5px; }
.fk-code {
  width: 100%; min-height: 132px; padding: 11px 13px !important; resize: vertical;
  font-family: var(--mono); font-size: 11.5px !important; line-height: 1.5; white-space: pre;
  /* JetBrains Mono would draw !== and === as single glyphs; this is code to copy. */
  font-variant-ligatures: none; font-feature-settings: "liga" 0, "calt" 0;
  color: var(--ink-2); background: var(--surface-2) !important;
}

.fk-fields td { height: auto !important; padding-top: 10px !important; padding-bottom: 10px !important; }
@media (min-width: 761px) {
  .fk-fields tr.fk-heading-row td { background: var(--surface-2); }
}
.fk-move { display: inline-flex; gap: 2px; }
.fk-move form { margin: 0; }
.fk-move .btn:disabled { opacity: .3; }
.fk-q { font-weight: 600; color: var(--ink); line-height: 1.4; }
.fk-q--heading { font-family: var(--font); text-transform: uppercase; letter-spacing: .18em; font-size: 11px; font-weight: 650; color: var(--accent-ink); }
.fk-q__meta { margin-top: 3px; font-size: 12px; color: var(--ink-4); line-height: 1.45; }
.fk-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.fk-order { font-family: var(--mono); font-size: 11.5px; color: var(--ink-4); min-width: 22px; text-align: right; }
:target > td { background: var(--accent-softer); }

.fk-answers { margin: 0; }
.fk-answers__section {
  margin: var(--sp-5) 0 var(--sp-2); padding-top: var(--sp-4); border-top: 1px solid var(--line-soft);
  font-family: var(--font); font-size: 11px; font-weight: 650; letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent-ink);
}
.fk-answers__section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.fk-answer { display: grid; grid-template-columns: minmax(180px, 38%) minmax(0, 1fr); gap: var(--sp-4); padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.fk-answer:last-child { border-bottom: 0; }
.fk-answer dt { color: var(--ink-3); font-size: 13px; }
.fk-answer dd { margin: 0; color: var(--ink); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.fk-answer dd.is-empty { color: var(--ink-4); }

@media (max-width: 1040px) {
  .fk-share { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fk-answer { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
