/* FitPass LIFE Medicare intake
   Colors from the FitPass LIFE logo: ribbon red, fold red, charcoal wordmark.
   Type: Atkinson Hyperlegible (Braille Institute), chosen for low-vision readers. */

@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --ink: #2E2E2E;
  --ink-2: #595959;
  --charcoal: #3F3F3F;
  --brand: #D50022;
  --brand-dark: #9E0019;
  --brand-tint: #FDECEF;
  --ribbon: linear-gradient(100deg, #D50022 0%, #D50022 55%, #9E0019 100%);
  --mist: #F3F3F4;
  --rule: #E2E2E4;
  --edge: #767676;
  --paper: #FFFFFF;
  --error: #B3261E;
  --error-tint: #FCEDEB;
  --focus: #1F1F1F;
  --font: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: calc(env(safe-area-inset-top, 0px) + 5rem); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
}
h1, h2, h3 { line-height: 1.2; margin: 0; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.25rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 1.3rem; font-weight: 700; }
h1:focus, h2:focus { outline: none; }
p { margin: 0 0 1rem; }
a { color: var(--brand-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
code { font-size: 0.95em; background: var(--mist); padding: 0.05em 0.35em; border-radius: 4px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: 0.75rem 1rem; border-radius: 8px; z-index: 50; }
.skip:focus { top: 1rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- masthead ---------- */
.masthead { background: var(--paper); position: relative; }
.masthead::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--ribbon); }
.masthead-inner {
  max-width: 1120px; margin: 0 auto; padding: 1rem 1.5rem 1.2rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 1rem; }
.brand-logo { display: block; line-height: 0; border-radius: 6px; }
.brand-logo img { height: 48px; width: auto; display: block; }
.brand-sub { color: var(--ink-2); font-size: 1.05rem; padding-left: 1rem; border-left: 2px solid var(--rule); line-height: 1.3; }
.help { margin: 0; font-size: 1rem; color: var(--ink-2); }
.help a { font-weight: 700; white-space: nowrap; }

/* ---------- layout ---------- */
.shell {
  max-width: 1120px; margin: 0 auto; padding: 2rem 1.5rem 3rem;
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start;
}
main { min-width: 0; max-width: 760px; }

/* ---------- progress rail (the signature element) ---------- */
.rail { position: sticky; top: 1.5rem; padding-top: 0.25rem; }
.rail-time { font-size: 0.95rem; color: var(--ink-2); margin: 0 0 1.25rem 3.25rem; }
.rail-steps { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.rail-steps::before, .rail-steps::after {
  content: ""; position: absolute; left: 20px; width: 4px; border-radius: 2px;
  top: 28px; bottom: 28px; z-index: 0;
}
.rail-steps::before { background: var(--rule); }
.rail-steps::after {
  background: linear-gradient(180deg, var(--brand), var(--brand-dark));
  transform-origin: top; transform: scaleY(var(--p, 0));
  transition: transform 450ms cubic-bezier(.2, .7, .2, 1);
}
.rail-steps li { position: relative; z-index: 1; }
.rail-steps li { height: 3.5rem; }
.rail-steps button {
  all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 0.9rem;
  width: 100%; min-height: 44px; cursor: pointer; border-radius: 10px; padding: 0.1rem 0.5rem 0.1rem 0;
  color: var(--ink-2); font-size: 1rem;
}
.rail-steps button:disabled { cursor: default; }
.rail-steps button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.rail-steps button:not(:disabled):hover .rail-name { text-decoration: underline; text-underline-offset: 0.2em; }
.marker {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
  background: var(--paper); border: 2px solid var(--edge); color: var(--ink-2);
  position: relative; z-index: 1;
}
.rail-steps li.done .marker { background: var(--brand); border-color: var(--brand); color: transparent; }
.rail-steps li.done .marker::after {
  content: ""; position: absolute; width: 12px; height: 20px; margin-top: -4px;
  border: solid #fff; border-width: 0 3.5px 3.5px 0; transform: rotate(45deg);
}
.rail-steps li.done .rail-name { color: var(--ink); }
.rail-steps li.current .marker { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 0 0 4px var(--brand); }
.rail-steps li.current .rail-name { color: var(--ink); font-weight: 700; }

/* mobile progress */
.mprog { display: none; }
.bar { height: 10px; border-radius: 5px; background: var(--rule); overflow: hidden; }
.bar span { display: block; height: 100%; width: 0; background: var(--ribbon); border-radius: 5px; transition: width 400ms ease; }

/* ---------- notes ---------- */
.note { border-radius: 12px; padding: 1rem 1.25rem; margin-bottom: 1.25rem; background: var(--paper); border: 2px solid var(--rule); }
.note p:last-child { margin-bottom: 0; }
.note-preview { background: var(--paper); border: 2px dashed var(--charcoal); font-size: 1rem; }
.note-resume { background: var(--brand-tint); border: 0; border-left: 6px solid var(--brand); }
.note-error { background: var(--error-tint); border: 0; border-left: 6px solid var(--error); margin: 1.5rem 0 0; }
.note-done { background: var(--mist); border: 0; border-left: 6px solid var(--charcoal); }
.note-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.75rem; }

/* ---------- logo placements ---------- */
.panel { position: relative; isolation: isolate; }
.wm { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; z-index: -1; display: none; }
.panel.show-wm .wm { display: block; }
.wm img { position: absolute; width: 440px; height: auto; right: -70px; bottom: -60px; opacity: 0.07; }
.page, .confirm { position: relative; }
.mprog-top { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.45rem; }
.mprog-mark { width: 26px; height: auto; flex: none; }

/* ---------- agent (Jared) ---------- */
.agent-photo {
  display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 18px; background: var(--charcoal);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08), 0 12px 28px rgba(0, 0, 0, 0.16);
}
.agent {
  margin: 1.5rem 0 1.75rem;
  display: grid; grid-template-columns: 168px minmax(0, 1fr); grid-template-areas: "photo head" "photo bio";
  column-gap: 1.75rem; align-items: start;
}
.agent .agent-photo { grid-area: photo; }
.agent-head { grid-area: head; }
.agent-bio { grid-area: bio; margin: 0.6rem 0 0; max-width: 56ch; }
.agent-hello { font-size: 1.45rem; font-weight: 700; margin: 0.25rem 0 0.15rem; line-height: 1.25; }
.agent-title { margin: 0; color: var(--ink-2); font-size: 1rem; padding-bottom: 0.6rem; border-bottom: 3px solid var(--brand); display: inline-block; }
.confirm-intro { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 1.75rem; align-items: center; margin-bottom: 1.75rem; }
.confirm-intro .lead { margin-bottom: 0; }
.is-done .confirm-photo { animation: photo-in 600ms cubic-bezier(.2, .7, .2, 1) both; }
@keyframes photo-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.signoff { margin: 1.75rem 0 0; font-size: 1.15rem; line-height: 1.4; }
.signoff span { font-weight: 700; font-size: 1.35rem; }

/* ---------- form surface ---------- */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: 18px; padding: 2.5rem 3rem 1rem; }
.page h1, .confirm h1 { margin-bottom: 0.75rem; }
.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 58ch; margin-bottom: 1.75rem; }
.aside { font-size: 1rem; color: var(--ink-2); background: var(--mist); padding: 0.75rem 1rem; border-radius: 10px; margin-bottom: 2rem; }
.opt { font-weight: 400; color: var(--ink-2); }

.field { margin: 0 0 1.5rem; padding: 0; border: 0; min-width: 0; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
label, legend { display: block; font-weight: 700; margin-bottom: 0.45rem; padding: 0; }
.mini { font-weight: 400; font-size: 0.95rem; color: var(--ink-2); margin-bottom: 0.25rem; }
.hint { font-size: 1rem; color: var(--ink-2); margin: -0.15rem 0 0.6rem; }
.status { font-size: 1rem; color: var(--ink-2); margin: 0.5rem 0 0; min-height: 0; }
.status:empty { display: none; }
.counter { font-size: 0.95rem; color: var(--ink-2); margin: 0.35rem 0 0; text-align: right; }
.sub { border-left: 4px solid var(--rule); padding-left: 1.25rem; margin: -0.25rem 0 1.5rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input:not([type]), select, textarea {
  display: block; width: 100%; min-height: 52px;
  font: inherit; color: var(--ink);
  padding: 0.65rem 0.9rem;
  background: var(--paper); border: 2px solid var(--edge); border-radius: 10px;
  appearance: none; -webkit-appearance: none;
}
textarea { resize: vertical; min-height: 6rem; }
select {
  padding-right: 2.75rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%232E2E2E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 1.2rem;
}
select:disabled, input:disabled { background-color: var(--mist); color: var(--ink-2); border-color: var(--rule); cursor: not-allowed; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); }
::placeholder { color: #737373; opacity: 1; }

.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.25rem; }
.row-3 { grid-template-columns: 1.3fr 0.8fr 1.1fr; }
.dob { display: grid; grid-template-columns: 1.5fr 0.9fr 1.1fr; gap: 0.75rem; }
.pair { display: grid; grid-template-columns: 1.5fr 1fr; gap: 0.75rem; max-width: 26rem; margin-bottom: 0.6rem; }
.field-short { max-width: 16rem; }
.money { position: relative; }
.money span { position: absolute; left: 0.9rem; top: 50%; transform: translateY(-50%); color: var(--ink-2); }
.money input { padding-left: 1.9rem; }

/* checkboxes and radios */
input[type="checkbox"], input[type="radio"] {
  width: 1.45rem; height: 1.45rem; margin: 0; flex: none; accent-color: var(--brand); cursor: pointer;
}
label.check { display: flex; align-items: flex-start; gap: 0.75rem; font-weight: 400; cursor: pointer; margin: 0.35rem 0 0; }
label.check input { margin-top: 0.12rem; }
label.check.small { font-size: 1rem; align-items: center; margin: 0; }
label.check.small input { margin-top: 0; }

.options { display: grid; gap: 0.6rem; }
.options-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.option {
  display: flex; align-items: center; gap: 0.75rem; margin: 0;
  min-height: 56px; padding: 0.7rem 1rem;
  font-weight: 400; cursor: pointer;
  border: 2px solid var(--rule); border-radius: 12px; background: var(--paper);
}
.option:hover { border-color: var(--edge); }
.option:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); font-weight: 700; }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input:focus-visible { outline: none; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; margin: 0; font-weight: 400; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 48px; padding: 0.55rem 1.1rem;
  border: 2px solid var(--edge); border-radius: 999px; cursor: pointer; background: var(--paper);
}
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip input:checked + span::before {
  content: ""; width: 7px; height: 13px; margin: -3px 2px 0 0;
  border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.chip input:disabled + span { opacity: 0.45; cursor: not-allowed; }

/* stars */
.stars { display: flex; gap: 0.35rem; }
.stars label { position: relative; margin: 0; cursor: pointer; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 10px; }
.stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stars svg { width: 44px; height: 44px; fill: var(--paper); stroke: var(--edge); stroke-width: 1.4; stroke-linejoin: round; transition: fill 120ms; }
.stars label.lit svg { fill: var(--brand); stroke: var(--brand-dark); }
.stars label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 1px; }
.stars label:hover svg { stroke: var(--ink); }
.scale { display: flex; justify-content: space-between; max-width: 296px; font-size: 0.95rem; color: var(--ink-2); margin: 0.3rem 0 0; }

/* errors */
.error { color: var(--error); font-weight: 700; font-size: 1rem; margin: 0.45rem 0 0; display: flex; gap: 0.5rem; }
.error:empty { display: none; }
.error::before {
  content: "!"; flex: none; width: 1.3rem; height: 1.3rem; border-radius: 50%; margin-top: 0.1rem;
  background: var(--error); color: #fff; font-size: 0.85rem; display: grid; place-items: center;
}
.field.invalid input:not([type="checkbox"]):not([type="radio"]), .field.invalid select, .field.invalid textarea { border-color: var(--error); }
.field.invalid .option { border-color: var(--error); }
fieldset.field.invalid, .picked-field.invalid { border-left: 4px solid var(--error); padding-left: 1rem; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 52px; padding: 0 1.5rem; border-radius: 12px;
  font: inherit; font-weight: 700; cursor: pointer; border: 2px solid transparent; text-decoration: none;
}
.btn.small { min-height: 44px; padding: 0 1.1rem; font-size: 1rem; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.secondary { background: var(--paper); color: var(--brand-dark); border-color: var(--brand); }
.btn.secondary:hover { background: var(--brand-tint); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--edge); }
.btn.ghost:hover { background: var(--mist); }
.btn.add { background: var(--charcoal); color: #fff; }
.btn.add:hover { background: #1F1F1F; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.link {
  font: inherit; background: none; border: 0; padding: 0.35rem 0.1rem; cursor: pointer;
  color: var(--brand-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 0.18em; min-height: 44px;
}
.link:hover { color: var(--ink); }

/* pager */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-top: 1.25rem; padding: 0 0.25rem;
}
.pager #nextBtn { margin-left: auto; min-width: 11rem; }
.save-status { margin: 0; font-size: 0.95rem; color: var(--ink-2); text-align: center; flex: 1; }
.save-status:empty { visibility: hidden; }

/* ---------- doctors ---------- */
.searchbox { background: var(--mist); border-radius: 14px; padding: 1.25rem 1.25rem 1.25rem; margin-bottom: 0.5rem; }
.searchbox .field { margin-bottom: 1rem; }
.doc-row { grid-template-columns: minmax(0, 1fr) 11rem; align-items: end; }
.doc-row label { white-space: nowrap; }
.results, .picked { list-style: none; margin: 0.75rem 0 1rem; padding: 0; }
.results li, .picked li {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: 0.85rem 0; border-bottom: 1px solid var(--rule);
}
.results li:first-child, .picked li:first-child { border-top: 1px solid var(--rule); }
.results li > div, .picked-main { flex: 1 1 14rem; min-width: 0; }
.results strong, .picked strong { display: block; }
.results span, .picked-main span { display: block; font-size: 1rem; color: var(--ink-2); }
.picked li.empty { color: var(--ink-2); font-size: 1rem; }
.picked-field { margin-top: 1.5rem; }
.picked-field h2 { margin-bottom: 0.25rem; }
#docManualToggle { margin: 0.25rem 0 1rem; }
.tag { font-size: 0.9rem; font-weight: 700; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--mist); color: var(--ink); white-space: nowrap; }
.tag-brand { background: var(--brand-tint); color: var(--brand-dark); }

/* ---------- medication combobox (wireframe 1) ---------- */
.combo-box { position: relative; }
.combo-box input { padding-right: 3rem; }
.combo-icon { position: absolute; right: 0.95rem; top: 26px; transform: translateY(-50%); width: 22px; height: 22px; color: var(--ink); pointer-events: none; }
#drugList {
  position: relative; margin: -2px 0 0; padding: 0.35rem 0; list-style: none;
  background: var(--paper); border: 2px solid var(--ink); border-top-color: var(--rule);
  border-radius: 0 0 12px 12px; max-height: min(24rem, 55vh); overflow-y: auto; overscroll-behavior: contain;
}
#drugList [role="option"] { padding: 0.7rem 1rem; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
#drugList [role="option"]:hover, #drugList [role="option"].active { background: var(--brand-tint); }
#drugList [role="option"].active { box-shadow: inset 4px 0 0 var(--brand); }
#drugList mark { background: var(--brand-tint); color: inherit; font-weight: 700; border-radius: 3px; padding: 0 1px; }
#drugList .opt-route { font-size: 0.95rem; color: var(--ink-2); white-space: nowrap; }
#drugList .typed { color: var(--brand-dark); font-weight: 700; border-top: 1px solid var(--rule); }
#drugList .combo-note { padding: 0.4rem 1rem; font-size: 0.9rem; color: var(--ink-2); }
.combo:has(#drugList:not([hidden])) #drugSearch { border-color: var(--ink); border-radius: 10px 10px 0 0; }

/* ---------- dose panel (wireframe 2) ---------- */
.dose-panel { border: 2px solid var(--charcoal); border-radius: 16px; padding: 1.5rem; margin-bottom: 1.5rem; background: var(--paper); }
.dose-panel h2 { font-size: 1.5rem; margin-bottom: 0.4rem; }
.dose-panel .route { font-size: 1rem; font-weight: 400; color: var(--ink-2); }
.dose-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1rem; }
.dose-options { border: 2px solid var(--edge); border-radius: 12px; overflow: hidden; max-height: 26rem; overflow-y: auto; }
.dose-opt { display: flex; align-items: center; gap: 0.75rem; margin: 0; padding: 0.75rem 1rem; font-weight: 400; cursor: pointer; border-bottom: 1px solid var(--rule); }
.dose-opt:last-child { border-bottom: 0; }
.dose-opt:hover { background: var(--mist); }
.dose-opt:has(input:checked) { background: var(--brand-tint); font-weight: 700; box-shadow: inset 5px 0 0 var(--brand); }
.dose-amount .field { margin-bottom: 1rem; }
.qty-row { display: flex; align-items: center; gap: 0.75rem; }
.qty-row input { max-width: 7rem; }
.dose-actions { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.25rem; }

/* ---------- review ---------- */
.review { margin-bottom: 2rem; }
.review-sec { border-top: 1px solid var(--rule); padding: 1rem 0 0.75rem; }
.review-sec:last-child { border-bottom: 1px solid var(--rule); }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.review-head h2 { font-size: 1.15rem; }
.review dl { margin: 0.35rem 0 0; display: grid; gap: 0.2rem; }
.review dl div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1rem; }
.review dt { color: var(--ink-2); font-size: 1rem; }
.review dd { margin: 0; overflow-wrap: anywhere; }
.review ul { margin: 0.35rem 0 0; padding-left: 1.25rem; }
.review p { margin: 0.35rem 0 0; color: var(--ink-2); }
.sign-block { background: var(--mist); border-radius: 14px; padding: 1.25rem; }
.sign-block legend { float: left; width: 100%; margin-bottom: 0.5rem; }
.sign-block legend + * { clear: both; }

/* ---------- confirmation ---------- */
.confirm { padding-bottom: 1.5rem; }
.confirm h2 { margin: 2rem 0 0.75rem; }
.next-steps { margin: 0; padding-left: 1.5rem; }
.next-steps li { margin-bottom: 0.5rem; }
.calendar-area { margin: 0.5rem 0 1.25rem; }
.cal-frame { width: 100%; height: 700px; border: 2px solid var(--rule); border-radius: 14px; background: var(--paper); }
.cal-placeholder { border: 2px dashed var(--edge); border-radius: 14px; padding: 2rem 1.5rem; text-align: center; background: var(--mist); }

/* ---------- footer ---------- */
.foot { background: var(--paper); position: relative; }
.foot::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--ribbon); }
.foot-inner { max-width: 1120px; margin: 0 auto; padding: 2.25rem 1.5rem 2.5rem; font-size: 0.95rem; color: var(--ink-2); }
.foot-inner p { max-width: 80ch; }
.foot-brand { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.75rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.foot-brand img { width: 83px; height: auto; flex: none; }
.foot-title { font-size: 1.1rem; font-weight: 700; color: var(--ink); margin: 0 0 0.25rem; }
.foot-contact { display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; margin: 0; font-size: 1.05rem; }
.foot-contact a { font-weight: 700; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.foot-links .link { font-size: 0.95rem; }
.legal { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.foot-inner .legal p { font-size: 0.8rem; line-height: 1.55; margin: 0 0 0.7rem; max-width: 110ch; color: var(--ink-2); }
.foot-inner .legal p:first-child { font-weight: 700; color: var(--ink); }
.foot-inner .legal p:last-child { margin-bottom: 0; font-style: italic; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); padding: 0 0 2rem; gap: 0; }
  .rail { display: none; }
  main { max-width: none; }
  .mprog {
    display: block; position: sticky; top: 0; z-index: 30;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: calc(env(safe-area-inset-top, 0px) + 0.7rem) 1.25rem 0.8rem;
  }
  .mprog p { margin: 0; font-weight: 700; font-size: 1rem; }
  .note { margin: 1rem 1rem 0; }
  .panel { border-radius: 0; border-left: 0; border-right: 0; padding: 1.75rem 1.25rem 0.5rem; margin-top: 1rem; }
  .pager {
    position: sticky; bottom: 0; z-index: 30; margin: 0;
    background: var(--paper); border-top: 1px solid var(--rule);
    padding: 0.75rem 1rem calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
    flex-wrap: wrap;
  }
  .save-status { order: -1; flex-basis: 100%; font-size: 0.9rem; }
  body.typing .pager { position: static; border-top: 0; }
  .pager #nextBtn { flex: 1; min-width: 0; }
  .dose-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .row, .row-3, .doc-row { grid-template-columns: minmax(0, 1fr); }
  .doc-row label { white-space: normal; }
  .options-3 { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
  .brand-logo img { height: 36px; }
  .agent { grid-template-columns: 112px minmax(0, 1fr); grid-template-areas: "photo head" "bio bio"; column-gap: 1.1rem; align-items: center; }
  .agent-hello { font-size: 1.25rem; }
  .agent-bio { margin-top: 1rem; }
  .confirm-intro { grid-template-columns: 1fr; gap: 1.25rem; }
  .confirm-photo { width: 160px; }
  .help-label { display: none; }
  .masthead-inner { flex-wrap: nowrap; }
  .wm img { width: 300px; right: -60px; bottom: -40px; }
  .foot-brand { align-items: flex-start; }
  .foot-brand img { width: 64px; }
  .masthead-inner { padding: 0.8rem 1.25rem; }
  .review dl div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .review dt { font-size: 0.95rem; }
  .dose-panel { padding: 1.1rem; }
  .cal-frame { height: 780px; }
  .stars label { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
