/* The patient app, Direction B "Path" (docs/specs/patient-app.md 4.1; canvas "Patient App Directions").
   Warm ground, white panels, navy for structure, clay only as the "next" signal. White text never sits on peach.
   Fonts: the phone's own sans serif for now, Noto Sans Armenian served from here; the brand fonts (Inter, Montserrat,
   Source Serif 4) are added as files served from this folder once they are in the repository. */
@font-face { font-family: "Noto Sans Armenian"; src: url("/api/patient/assets/NotoSansArmenian.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
:root {
  --ground: #F7F4F1; --panel: #FFFFFF; --line: #E6E1DB; --line2: #EEE9E3;
  --ink: #1A2E3D; --mid: #4A6478; --navy: #2E5B7D; --navy-dark: #1E3D55; --tint: #E6EEF6;
  --wash: #FBEFE5; --clay: #C4824A; --clay-deep: #9A5A2A; --green: #4A7C6F; --green-tint: #E3EFEA;
  --field: #7B8D9C; --focus: #2E5B7D;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Armenian", sans-serif;
  --serif: Georgia, "Times New Roman", "Noto Sans Armenian", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--ground); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
#app { max-width: 520px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.boot { text-align: center; color: var(--mid); padding: 40vh 16px 0; margin: 0; }
a { color: var(--navy); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header: white logo bar, Back on the left or the logo, Call us on the right */
.bar { background: var(--panel); border-bottom: 1px solid var(--line); min-height: 60px; padding: 8px 12px 8px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; position: sticky; top: 0; z-index: 2; }
.bar .logo { height: 19px; width: auto; display: block; }
.bar .back { min-height: 44px; display: inline-flex; align-items: center; gap: 2px; color: var(--navy); font-weight: 600; text-decoration: none; background: none; border: 0; padding: 0 8px 0 0; cursor: pointer; }
.bar .step { font-size: 13px; color: var(--mid); }
.pill-btn { min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1.5px solid var(--navy); color: var(--navy); background: var(--panel); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; cursor: pointer; }
.progress { display: flex; gap: 4px; padding: 0 16px 6px; background: var(--panel); border-bottom: 1px solid var(--line); }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: #D6DDE4; }
.progress span.on { background: var(--navy); }

/* Body */
main { flex: 1; padding: 22px 16px 120px; display: flex; flex-direction: column; gap: 14px; }
h1 { font-size: 23px; line-height: 1.25; margin: 0 4px; font-weight: 700; }
h2 { font-size: 15px; margin: 6px 4px 0; font-weight: 600; }
p { margin: 0 4px; }
.lead { font-size: 16px; line-height: 1.55; }
.muted { color: var(--mid); font-size: 14px; line-height: 1.5; }
.serif { font-family: var(--serif); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.panel.pad { padding: 14px; }
.row { min-height: 56px; padding: 10px 14px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line2); }
.row:first-child { border-top: 0; }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .label { font-size: 13px; color: var(--mid); }
.row .value { font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.badge-ok { align-self: flex-start; min-height: 32px; padding: 0 12px 0 8px; border-radius: 16px; background: var(--green-tint); display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; margin: 0 4px; }
.icon-circle { width: 72px; height: 72px; border-radius: 36px; background: var(--tint); color: var(--navy); display: flex; align-items: center; justify-content: center; margin: 4px 4px 0; }
.note { background: var(--tint); border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.5; margin: 0; }
.warn { background: var(--wash); border-radius: 10px; padding: 12px; font-size: 14px; line-height: 1.5; margin: 0; }
.error { color: #8A2C1F; font-size: 14px; margin: 0 4px; }

/* Language picker */
.langs { display: flex; flex-direction: column; gap: 12px; padding: 32px 20px 0; }
.lang { min-height: 66px; border-radius: 12px; border: 1.5px solid var(--field); background: var(--panel); padding: 0 20px; display: flex; align-items: center; justify-content: space-between; font-size: 21px; font-weight: 600; cursor: pointer; text-align: left; }
.lang-top { background: var(--panel); min-height: 260px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; border-bottom: 1px solid var(--line); }
.lang-top .logo { height: 30px; width: auto; }

/* Fields */
fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; margin: 0 4px 10px; font-size: 15px; font-weight: 600; }
.dob { display: flex; gap: 10px; margin: 0 4px; }
.dob label, .field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--mid); }
.dob label { width: 88px; }
.dob label.year { flex: 1; width: auto; }
input[type=text], input[type=email], input[type=tel] { min-height: 56px; border-radius: 10px; border: 1.5px solid var(--field); padding: 0 14px; font-size: 20px; background: var(--panel); width: 100%; }
input:focus { border-color: var(--navy); border-width: 2.5px; outline: none; }
.field { margin: 0 4px; }

/* Choices */
.choice { background: var(--panel); border: 1.5px solid var(--field); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.choice.on { background: #F3F7FB; border: 2.5px solid var(--navy); }
.choice input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.choice .t { font-size: 16px; font-weight: 600; display: block; }
.choice .s { font-size: 14px; color: var(--mid); line-height: 1.45; display: block; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 11px; background: var(--navy); color: #FFFFFF; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; }
.check + .check { border-top: 1px solid var(--line2); }
.gap { height: 10px; }
.field-select { min-height: 52px; border-radius: 10px; border: 1.5px solid var(--field); padding: 0 12px; font-size: 17px; background: var(--panel); }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }

/* Sample email */
.sample { background: #1E2A35; border-radius: 16px; padding: 14px 12px; margin: 0; }
.sample .msg { background: #F2F4F6; border-radius: 14px; padding: 10px 12px; color: #111827; font-size: 14px; line-height: 1.4; }
.sample .from { font-size: 12.5px; font-weight: 600; color: #3B4757; display: block; margin-bottom: 4px; }

/* Buttons */
.foot { position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--line); padding: 12px 16px calc(16px + env(safe-area-inset-bottom)); }
.foot-inner { max-width: 488px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.btn { min-height: 52px; border-radius: 10px; background: var(--navy); color: #FFFFFF; border: 0; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; padding: 0 16px; width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-out { min-height: 50px; border-radius: 10px; background: var(--panel); color: var(--navy); border: 1.5px solid var(--navy); font-size: 15px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer; padding: 0 16px; width: 100%; }
.link { align-self: center; min-height: 40px; display: inline-flex; align-items: center; font-size: 15px; font-weight: 500; color: var(--navy); background: none; border: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.danger { color: #8A2C1F; border-color: #8A2C1F; }

/* Home */
.next { background: var(--navy); color: #FFFFFF; border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.next .k { font-size: 13px; font-weight: 600; color: #F0C9A8; }
.next .t { font-size: 19px; font-weight: 600; }
.next .s { font-size: 14px; color: #D3DCE6; line-height: 1.5; }
.list a.row, .list button.row { width: 100%; text-align: left; background: none; border-left: 0; border-right: 0; border-bottom: 0; color: inherit; text-decoration: none; cursor: pointer; font-size: 15px; }
.list .row:first-child { border-top: 0; }

/* Phase 1 (2026-10-25): the signed-in tabs, the visits path, change requests, results, Learn, loss */
.bar-r { display: flex; gap: 6px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border: 0; background: none; color: var(--navy); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 22px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: var(--panel); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding: 0 4px env(safe-area-inset-bottom); }
.tab { flex: 1; max-width: 110px; min-height: 64px; border: 0; border-top: 3px solid transparent; background: none; color: var(--mid); font-size: 12px; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: 6px 2px 4px; text-align: center; line-height: 1.15; }
.tab.on { border-top-color: var(--navy); color: var(--navy); font-weight: 600; }
#app.has-tabs main { padding-bottom: 110px; }
.foot.over-tabs { bottom: calc(64px + env(safe-area-inset-bottom)); }
.hello { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 4px; }
.hello h1 { margin: 0; }
.chip { min-height: 28px; padding: 0 11px; border-radius: 14px; border: 1.5px solid var(--navy); color: var(--navy); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; white-space: nowrap; }
.next .v { font-size: 15px; }
.next-acts { display: flex; gap: 8px; margin-top: 10px; }
.on-navy { min-height: 40px; padding: 0 14px; border-radius: 8px; background: #FFFFFF; color: var(--navy-dark); border: 0; font-size: 14px; font-weight: 600; cursor: pointer; }
.link-row { text-decoration: none; color: inherit; }
.list .row svg, .row > svg { flex: none; color: var(--navy); }
.dot { flex: none; }
.dot-done { fill: var(--green); }
.dot-check { fill: none; stroke: #FFFFFF; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.dot-next { fill: #FFFFFF; stroke: var(--clay); stroke-width: 2.5; }
.dot-next-in { fill: var(--clay); }
.dot-later { fill: #FFFFFF; stroke: var(--field); stroke-width: 2; }
.path { padding: 14px 14px 4px; }
.step-row { display: flex; gap: 12px; align-items: flex-start; }
.step-rail { display: flex; flex-direction: column; align-items: center; width: 24px; flex: none; align-self: stretch; }
.rail { width: 2px; flex: 1; background: #D6DDE4; margin: 4px 0; min-height: 12px; }
.step-row:last-child .rail { display: none; }
.step-body { flex: 1; display: flex; flex-direction: column; gap: 1px; padding-bottom: 14px; min-width: 0; }
.step-body .when { font-size: 13px; color: var(--mid); }
.step-body .when.next-when { color: var(--clay-deep); font-weight: 600; }
.step-body .value, .panel .value { font-size: 15px; font-weight: 600; }
.step-body .label, .label.block { font-size: 13px; color: var(--mid); display: block; }
.step-row .pill-btn { min-height: 36px; font-size: 13px; }
.picks { display: flex; flex-direction: column; gap: 8px; }
.pick-day { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; align-items: center; }
.pick { min-height: 44px; border-radius: 8px; border: 1.5px solid var(--field); background: var(--panel); font-size: 14px; cursor: pointer; }
.pick[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #FFFFFF; font-weight: 600; }
.offices .check + .check { border-top: 1px solid var(--line2); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 4px; }
.chip-btn { min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1.5px solid var(--field); background: var(--panel); font-size: 14px; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--tint); border-color: var(--navy); font-weight: 600; }
.icon-circle.soft { background: #ECE8E3; }
.loss { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; }
.loss h1 { margin: 0; color: var(--navy-dark); font-weight: 600; }
.row.col { flex-direction: column; align-items: stretch; }
.row-in { display: flex; gap: 12px; align-items: center; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.small, .btn-out.small { min-height: 44px; font-size: 14px; }
