/* ============================================================================
   screens.css — per-screen layout only. Anything reusable lives in
   components.css; anything tokenised lives in tokens.css.
   ========================================================================== */

/* ── Screen header block: eyebrow + display title + support line ─────────── */
.shead { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-3) 0 0; }
.shead__sub { color: var(--ink-soft); font-size: var(--fs-body-s); }

/* The one Figure XL per screen, with its label beneath */
.figblock { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; }
.figblock__label { color: var(--text-3); font: 600 var(--fs-body-s)/1.4 var(--font-ui); }
.figblock--on-ink .figblock__label { color: var(--text-on-ink-2); }

/* ── 1 · Login ──────────────────────────────────────────────────────────── */
.login {
  box-sizing: border-box;
  width: 100%; height: 100%; min-height: 0; flex: 1 1 auto;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 104px 350px auto;
  align-content: center; gap: 16px;
  padding: 0; margin: 0;
  color: var(--ink);
}
.screen[data-screen="login"] {
  display: flex; flex-direction: column; align-items: center;
  padding: 0;
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 70% 50% at 0% 82%, rgba(var(--gold-rgb), .72), transparent 72%),
    radial-gradient(ellipse 72% 52% at 100% 78%, rgba(var(--sky-rgb), .78), transparent 72%),
    radial-gradient(circle, rgba(var(--sky-deep-rgb), .2) 1px, transparent 1.2px);
  background-size: auto, auto, 80px 80px;
  background-position: center, center, center center;
  background-repeat: no-repeat, no-repeat, repeat;
}
/* Shared reference background for every authenticated screen. The supplied
   artwork provides the exact white field and soft violet/teal bloom. */
.screen:not([data-screen="login"]) {
  /* Match the login atmosphere while omitting its yellow bloom: a clean
     white field with a soft teal wash rising from the lower-right. */
  background-color: var(--surface);
  background-image:
    radial-gradient(ellipse 72% 52% at 100% 78%, rgba(var(--sky-rgb), .46), transparent 72%),
    radial-gradient(circle, rgba(var(--sky-deep-rgb), .08) 1px, transparent 1.2px);
  background-size: auto, 80px 80px;
  background-position: center, center;
  background-repeat: no-repeat, repeat;
}
.screen[data-screen="login"] > .login { margin-bottom: 0; }
.login__art { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.login__art img { position: absolute; left: 0; width: 100%; max-width: none; height: auto; }
.login__eclipse { top: 36.85%; }
.login__planet { top: 64.89%; }
.login__mast {
  position: relative; top: -6px; z-index: 1;
  display: grid; place-items: center;
}
.login__mast::before {
  content: ""; position: absolute; z-index: -1;
  width: 176px; height: 126px; border-radius: 50%;
  background: rgba(var(--surface-rgb), .96);
  filter: blur(5px); pointer-events: none;
}
.login__brandmark {
  width: 84px; height: 96px; object-fit: contain; object-position: center;
  filter: none;
}
.login__card {
  position: relative; z-index: 1; justify-self: center;
  display: block; box-sizing: border-box;
  width: calc(100% - 40px); max-width: calc(var(--frame-w) - 40px); height: 350px;
  padding: 42px var(--sp-5) var(--sp-6);
  color: var(--ink);
  background:
    linear-gradient(145deg,
      rgba(var(--surface-rgb), .74) 0%,
      rgba(var(--surface-rgb), .5) 58%,
      rgba(var(--lav-rgb), .28) 100%);
  border: 1px solid rgba(var(--surface-rgb), .82);
  border-radius: var(--r-lg);
  box-shadow:
    0 2px 4px rgba(var(--ink-rgb), .04),
    0 16px 36px -14px rgba(var(--ink-rgb), .18),
    0 34px 70px -24px rgba(var(--ink-rgb), .2),
    inset 0 1px 0 rgba(var(--surface-rgb), .92),
    inset 0 -1px 0 rgba(var(--lav-rgb), .28);
  -webkit-backdrop-filter: blur(22px) saturate(1.32);
          backdrop-filter: blur(22px) saturate(1.32);
}
.login__heading { display: grid; gap: var(--sp-2); margin-bottom: 35px; text-align: center; }
.login__heading .display-l { color: var(--ink); font-size: 24px; line-height: 1.2; }
.login__heading .body-s { color: var(--login-muted); }
.login__fields { display: grid; gap: 10px; }
.login__control { display: grid; gap: var(--sp-1); }
.login__card .field__label { color: var(--ink); font-size: var(--fs-micro); }
.login__email-field {
  min-height: 52px; display: flex; align-items: center; gap: 8px;
  padding: 0 14px; border-radius: var(--r-md);
  background: rgba(var(--surface-rgb), .48);
  border: 1px solid rgba(var(--surface-rgb), .56);
  box-shadow: inset 0 1px 0 rgba(var(--surface-rgb), .52);
}
.login__email-field svg { flex: 0 0 auto; color: var(--sky-ink); }
.login__card .field {
  min-height: 32px; flex: 1 1 auto; min-width: 0; padding: 0;
  color: var(--ink); background: transparent;
  border: 0;
  border-radius: 0; box-shadow: none;
}
.login__card .field:focus {
  border: 0; box-shadow: none;
}
.login__card .field::placeholder { color: var(--text-mute); opacity: 1; }
.login__card .btn { min-height: 44px; border-radius: var(--r-sm); }
.login__card .btn--primary {
  margin-top: 10px;
  color: var(--text-on-ink); background: var(--sky-ink);
  border: 0; box-shadow: none;
}
.login__card .btn--primary:active {
  color: var(--text-on-ink); background: var(--ink); box-shadow: none;
}
.login__card > .btn--on-ink {
  min-height: 44px;
  margin-top: 16px;
  color: var(--ink); background: rgba(var(--surface-rgb), .46);
  border: 1px solid rgba(var(--surface-rgb), .7);
  box-shadow: inset 0 1px 0 rgba(var(--surface-rgb), .64);
}
.login__card > .btn--on-ink:active { color: var(--ink); background: rgba(var(--surface-rgb), .62); }
.login__card > .btn--on-ink svg { color: var(--sky-ink); }
.login__footer {
  position: relative; z-index: 1;
  width: calc(100% - 40px); max-width: calc(var(--frame-w) - 40px);
  justify-self: center; align-self: start;
  display: grid; justify-items: center; gap: 18px;
  padding-top: 10px;
  text-align: center;
  color: var(--ink);
}
.login__proof { display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; gap: 16px; }
.login__proof > span {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ink);
  font: 700 14px/1.25 var(--font-ui); white-space: nowrap;
}
.login__proof svg { color: var(--sky-ink); }
.login__proof > i { width: 1px; height: 24px; background: linear-gradient(180deg, var(--sky), var(--gold)); opacity: .7; }
.login__privacy { display: inline-flex; align-items: center; gap: 8px; color: var(--login-muted); font-size: var(--fs-body-s); text-align: center; }
.login__privacy svg { color: var(--login-muted); }
.login__powered { margin: -8px 0 0; color: var(--login-muted); font-size: 14px; line-height: 1.4; text-align: center; }
.login__powered span { color: var(--sky-deep); }

@media (max-width: 359px) {
  .login { grid-template-rows: 96px 350px auto; gap: var(--sp-3); }
  .login__brandmark { width: 84px; height: 96px; }
  .login__proof { gap: 8px; }
  .login__proof > span { gap: 4px; font-size: 14px; }
  .login__proof > i { height: 20px; }
}

/* ── Profile ───────────────────────────────────────────────────────────── */
.profile-hero {
  position: relative; min-height: 264px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr); align-content: end; gap: var(--sp-3);
  padding: var(--sp-5); border-radius: var(--r-xl); color: var(--text-on-ink);
  background: var(--ink); background-image: var(--grad-deep-veil);
  box-shadow: var(--e-hero);
}
.profile-notch { --nw: 108px; --nh: 48px; }
.profile-notch__badge { left: 0; right: auto; }
.profile-hero__avatar {
  position: absolute; z-index: 1; right: var(--sp-3); top: 26px;
  width: 142px; height: 142px; display: block;
  object-fit: cover; object-position: center top;
  border-radius: var(--r-pill); background: var(--surface); border: 1px solid rgba(var(--surface-rgb), .46);
  box-shadow: 0 12px 28px -14px rgba(var(--ink-rgb), .5);
}
.profile-hero__copy { position: relative; z-index: 2; display: grid; gap: 5px; align-content: center; min-width: 0; max-width: 190px; transform: translateY(-30px); }
.profile-hero__copy .display-l { color: var(--sky-deep); font-size: 24px; line-height: 1.1; white-space: nowrap; }
.profile-hero__copy .body-s { color: var(--text-on-ink-2); }
.profile-hero__meta { display: grid; gap: 4px; margin-bottom: 0; }
.profile-hero__meta span { display: block; }
.profile-hero__meta span:first-child { font-size: 14px; }
.profile-hero__copy .eyebrow { color: var(--text-on-ink-2); margin-bottom: var(--sp-1); }
.profile-actions { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.profile-action {
  min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px;
  border-radius: var(--r-pill); background: rgba(var(--surface-rgb), .9); color: var(--ink);
  font: 700 var(--fs-micro)/1 var(--font-ui); cursor: pointer;
  transition: transform var(--t-tap) var(--ease-out), background var(--t-hover) var(--ease-out);
}
.profile-action:active { transform: scale(.96); }
.profile-action:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.profile-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: var(--sp-2); min-height: 112px; padding: var(--sp-3) var(--sp-2); border-radius: var(--r-lg); background: rgba(var(--surface-rgb), .72);
  border: 1px solid rgba(var(--surface-rgb), .76); box-shadow: var(--e1);
}
.profile-stats > div { display: grid; justify-items: center; gap: 6px; min-width: 0; padding: var(--sp-2) var(--sp-1); text-align: center; }
.profile-stats > div + div { border-left: 1px solid var(--line); padding-left: var(--sp-2); }
.profile-stats svg { color: var(--sky-ink); }
.profile-stats strong { font: 600 var(--fs-body-s)/1.2 var(--font-ui); }
.profile-stats span { font: 400 var(--fs-micro)/1.25 var(--font-ui); color: var(--text-3); white-space: nowrap; }
.profile-details { display: grid; gap: var(--sp-3); }
.profile-row { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-3); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--line); }
.profile-row:last-child { padding-bottom: 0; border-bottom: 0; }
.profile-details .profile-row:nth-last-child(2) { padding-bottom: 0; border-bottom: 0; }
.profile-row strong { text-align: right; overflow-wrap: anywhere; }
.row.profile-life {
  width: 100%; margin-inline: 0; padding: var(--sp-3);
  background: rgba(var(--surface-rgb), .62);
  border-radius: var(--r-lg); border: 1px solid rgba(var(--surface-rgb), .72);
}
.profile-life .strong, .profile-life .meta { display: block; }

/* ── 2 · Home ───────────────────────────────────────────────────────────── */
.notchcard > .card--hero {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(var(--sky-rgb), .42) 0%, rgba(var(--sky-rgb), .20) 48%, rgba(var(--gold-rgb), .28) 100%),
    rgba(var(--surface-rgb), .46);
  border: 1px solid rgba(var(--surface-rgb), .66);
  border-image: none;
  box-shadow: 0 16px 34px -18px rgba(var(--ink-rgb), .3),
              inset 0 1px 0 rgba(var(--surface-rgb), .72),
              inset 0 -1px 0 rgba(var(--gold-rgb), .24);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
          backdrop-filter: blur(22px) saturate(1.4);
}
.screen > .card--hero {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(var(--sky-rgb), .42) 0%, rgba(var(--sky-rgb), .20) 48%, rgba(var(--gold-rgb), .28) 100%),
    rgba(var(--surface-rgb), .46);
  border: 1px solid rgba(var(--surface-rgb), .66);
  border-image: none;
  box-shadow: 0 16px 34px -18px rgba(var(--ink-rgb), .3),
              inset 0 1px 0 rgba(var(--surface-rgb), .72),
              inset 0 -1px 0 rgba(var(--gold-rgb), .24);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
          backdrop-filter: blur(22px) saturate(1.4);
}
.screen > .card--hero .figblock--on-ink .figblock__label,
.screen > .card--hero .body-s,
.screen > .card--hero .meta { color: var(--ink); }
.notchcard > .card--hero .figblock__label,
.notchcard > .card--hero .figblock--on-ink .figblock__label {
  color: var(--ink);
}
.notchcard > .card--hero .eyebrow,
.notchcard > .card--hero .body-s,
.notchcard > .card--hero .meta,
.notchcard > .card--hero .title {
  color: var(--ink);
}
.notchcard > .card--hero .sum__line .label { color: var(--ink-soft); }
.notchcard > .card--hero .sum__line--total .label { color: var(--ink); }
.notchcard > .card--hero > .title { margin-top: 8px !important; line-height: 1.2; }
.notchcard > .card--hero > .body-s { margin-top: 8px !important; }
.notchcard > .card--hero > .btn { margin-top: 14px !important; }
.ecard-hero-title { display: grid; gap: 3px; margin-top: 8px !important; }
.ecard-hero-title span:last-child { color: var(--ink-soft); font-size: var(--fs-body-s); font-weight: 500; }
.ecard-hero-name { margin-top: 6px; }
.ecard-hero-btn { margin-top: 14px !important; }
.notchcard > .card--hero .chip--on-ink {
  color: var(--text-on-ink);
  background: var(--sky-ink);
  border-color: var(--sky-lift);
}
.notchcard > .card--hero .chip--on-ink .chip__dot {
  background: var(--sky-lift);
  box-shadow: 0 0 0 2px rgba(var(--surface-rgb), .45);
}
.notchcard > .card--hero .track--on-ink {
  background: rgba(var(--ink-rgb), .16);
}
.notchcard > .card--hero .btn--on-ink {
  color: var(--text-on-ink);
  background: var(--sky-ink);
  border-color: rgba(var(--sky-deep-rgb), .2);
}
.notchcard > .card--hero .btn--on-ink:active {
  color: var(--text-on-ink);
  background: var(--ink);
}
.home__ring { display: flex; align-items: center; gap: var(--sp-4); }

/* Right-hand stat rows — icon tile, figure, label. Deliberately flat: no
   border, no shadow, no second accent. The ring is the card's only emphasis. */
.stats { display: grid; gap: var(--sp-4); margin: 0; }
.stat  { display: flex; align-items: center; gap: var(--sp-2); }
.stat > div { display: flex; flex-direction: column; }
.stat__tile {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  background: var(--info-bg); color: var(--sky-ink);
}
.stat__tile svg { stroke: currentColor; }
.stat__val {
  order: 1;
  margin: 0;
  font: 500 var(--fs-figure-m)/1.1 var(--font-fig);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text);
}
.stat__key { order: 2; font: 400 var(--fs-micro)/1.3 var(--font-ui); color: var(--text-3); }

/* ── 3–6 · Enrollment ───────────────────────────────────────────────────── */
.enroll__steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); counter-reset: step; }
.enroll__step  { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: var(--sp-3); align-items: start; }
.enroll__num {
  counter-increment: step;
  width: 26px; height: 26px; border-radius: var(--r-pill);
  display: grid; place-items: center; background: var(--info-bg); color: var(--sky-ink);
  font: 700 var(--fs-body-s)/1 var(--font-ui);
}
.enroll__num::before { content: counter(step); }

/* The arithmetic, shown not just resolved (deck p.7) */
.sum { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.review-summary .sum { margin-top: 30px; }
.sum__line {
  display: grid; grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline; column-gap: var(--sp-3);
}
.sum__line .label {
  min-width: 0; color: var(--text-2);
  font-size: var(--fs-body-s); line-height: 1.35;
}
.card--hero .sum__line .label        { color: var(--text-on-ink-2); }
.card--hero .sum__line--total .label { color: var(--text-on-ink); }
.sum__line .val {
  white-space: nowrap; text-align: right;
  font: 500 var(--fs-figure-m)/1 var(--font-fig);
  font-variant-numeric: tabular-nums;
}
.sum__rule { height: 1px; background: var(--grad-line); margin: var(--sp-1) 0; }
.sum__line--total .label { color: var(--text); font-weight: 700; font-size: var(--fs-body); }
.sum__line--total .val   { font-size: var(--fs-figure-l); }

.donut-legend { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.donut-legend__row { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-body-s); }
.donut-legend__dot { width: 9px; height: 9px; border-radius: var(--r-pill); flex: 0 0 9px; }
.donut-legend__amt { margin-left: auto; font: 500 var(--fs-body)/1 var(--font-fig); font-variant-numeric: tabular-nums; }

/* ── 7 · Flex hub ───────────────────────────────────────────────────────── */
.flexcat { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
.flexcat__head { display: flex; align-items: center; gap: var(--sp-3); }
.flexcat__head .meta { display: block; }
.flexcat__figs {
  display: flex; align-items: baseline; gap: 4px;
  margin-left: auto; flex: 0 0 auto; white-space: nowrap;
}

.market__item { display: flex; align-items: center; gap: var(--sp-3); }

/* ── Latest claim — two lines, no icon tile, no borders ──────────────────── */
.claimline {
  display: grid; gap: 6px; width: 100%; text-align: left;
  min-height: 48px; padding: 2px 0; cursor: pointer;
  border-radius: var(--r-sm);
}
.claimline:focus-visible { outline: var(--focus-ring); outline-offset: 4px; }
.claimline__row { display: flex; align-items: baseline; gap: var(--sp-3); }
.claimline__row > :last-child { margin-left: auto; flex: 0 0 auto; }
.claimline__amt {
  font: 500 var(--fs-figure-m)/1 var(--font-fig);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text);
}
.claimline .title, .claimline__amt { transition: none; }
.claimline:active .title, .claimline:active .claimline__amt { color: var(--sky-ink); }

/* ── 8 · Benefits ───────────────────────────────────────────────────────── */
.covered { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }

/* Base tile: a plain labelled chip with its icon inline. Used by the plan
   sheet's checklist, where all four icons are the same tick — as oversized
   watermarks those would be four identical pieces of decoration, not
   information. */
.covered__tile {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px;
  padding: var(--sp-3);
  border-radius: var(--r-md); background: var(--mist); color: var(--text);
  font: 600 var(--fs-body-s)/1.35 var(--font-ui);
  text-align: left; border: 0; cursor: pointer;
  transition: box-shadow var(--t-hover) var(--ease-out), transform var(--t-tap) var(--ease-out);
}
.covered__tile svg { stroke: var(--sky-ink); }
.covered__tile:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.covered__tile:active { transform: scale(.985); }

/* Art variant: gradient tile with the icon as a visible, proportional accent
   anchored inside the bottom-right corner and sitting behind the text.

   The geometry keeps the two apart rather than trusting them to miss:
     text  starts at 12px; at two lines it ends at ~46px
     icon  top edge = min-height − bottom inset − size = 100 − 8 − 30 = 62px
   leaving a clear vertical gap, with padding-right holding every line
   clear of the icon's column.

   CONSTRAINT: labels here must fit two lines. A third line ends at ~65px and
   runs into the icon (measured at −7px in the plan sheet, which is why that
   checklist stays on the base tile). Keep labels short, or raise min-height to
   119px before adding a longer one.

   The restrained 30px size keeps each mark recognizable without turning it
   into a competing illustration. */
.covered--art .covered__tile {
  position: relative; overflow: hidden;
  align-content: start;
  min-height: 100px;
  padding: var(--sp-3) 46px var(--sp-3) var(--sp-3);
  background:
    linear-gradient(148deg, rgba(var(--sky-rgb), .20) 0%, rgba(var(--lav-rgb), .26) 100%),
    var(--surface);
}
.covered--art .covered__tile svg {
  position: absolute; right: var(--sp-3); bottom: var(--sp-2);
  width: 30px; height: 30px;
  stroke: var(--sky-deep); stroke-width: 1.6;
  opacity: .42; pointer-events: none;
}

/* ── My plans, banded by who pays ────────────────────────────────────────── */
.planset { display: grid; grid-template-columns: minmax(0, 1fr); }
.planset__head {
  display: flex; align-items: baseline; gap: var(--sp-3);
  padding-bottom: var(--sp-2);
}
.planset__sum {
  margin-left: auto; flex: 0 0 auto; white-space: nowrap;
  font: 600 var(--fs-micro)/1.3 var(--font-ui); color: var(--text-3);
}

.ecard {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); padding: var(--sp-5);
  border-radius: var(--r-md); background: var(--ink); color: var(--text-on-ink);
}
.ecard__qr {
  width: 148px; height: 148px; margin: 0 auto;
  display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(var(--ink-rgb), .08), 0 8px 22px -16px rgba(var(--ink-rgb), .42);
}
.ecard__qr-code { width: 124px; height: 124px; }
.ecard__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.ecard__field .k { font: 700 var(--fs-label)/1.2 var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: var(--text-on-ink-2); }
.ecard__field .v { font: 600 var(--fs-body-s)/1.4 var(--font-ui); }
.ecard__member-name, .ecard__member-no { display: block; }
.ecard__member-no { margin-top: 2px; font-size: var(--fs-micro); color: var(--text-on-ink-2); letter-spacing: .06em; }
.sheet .stack-2 > .row .grow { display: grid; align-content: center; gap: 2px; }
.sheet .stack-2 > .row .strong, .sheet .stack-2 > .row .meta { display: block; }

/* ── 9 · Find care ──────────────────────────────────────────────────────── */
.map {
  position: relative; isolation: isolate;
  height: 168px; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid rgba(var(--sky-deep-rgb), .12);
  background: var(--map-ground);
  box-shadow: inset 0 1px 0 rgba(var(--surface-rgb), .78),
              0 12px 26px -20px rgba(var(--ink-rgb), .38);
}
.map::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(135deg, rgba(var(--surface-rgb), .08), rgba(var(--sky-rgb), .03));
}
.map__art { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; }
.map__ground { fill: var(--map-ground); }
.map__park { fill: var(--map-park); }
.map__road {
  fill: none; stroke: rgba(var(--surface-rgb), .92); stroke-width: 2.25;
  vector-effect: non-scaling-stroke;
}
.map__road--curve { stroke-width: 2; }
.map__spot {
  position: absolute; z-index: 3;
  transform: translate(-50%, -50%);
}
.map__spot {
  width: 14px; height: 14px; border-radius: var(--r-pill);
  display: grid; place-items: center; padding: 0;
  background: var(--sky); border: 2px solid var(--surface);
  box-shadow: 0 4px 10px -3px rgba(var(--ink-rgb), .38);
  cursor: pointer;
  transition: width var(--t-hover) var(--ease-out), height var(--t-hover) var(--ease-out),
              background var(--t-hover) var(--ease-out), transform var(--t-hover) var(--ease-out),
              box-shadow var(--t-hover) var(--ease-out);
}
.map__spot::after {
  content: ''; position: absolute; inset: -8px; border-radius: inherit;
}
.map__spot:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }
.map__spot.is-active {
  width: 32px; height: 42px; border: 0; border-radius: 0;
  overflow: visible;
  background: transparent; color: var(--text-on-ink);
  box-shadow: none;
  transform: translate(-50%, -68%);
}
.map__spot.is-active::before {
  content: ''; position: absolute; left: 1px; top: 1px;
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 8px;
  background: var(--ink);
  box-shadow: 0 10px 20px -9px rgba(var(--ink-rgb), .62);
  transform: rotate(-45deg);
}
.map__spot.is-active svg {
  position: absolute; left: 9px; top: 9px; z-index: 1;
  transform: none;
}
.map__distance {
  position: absolute; left: 50%; top: 36px;
  transform: translateX(-50%);
  padding: 4px 8px; border-radius: var(--r-pill);
  background: rgba(var(--surface-rgb), .94); color: var(--ink);
  border: 1px solid rgba(var(--ink-rgb), .06);
  box-shadow: 0 6px 13px -8px rgba(var(--ink-rgb), .48);
  font: 700 10px/1 var(--font-ui); white-space: nowrap;
}
.clinic-row {
  border-radius: var(--r-sm);
  transition: background var(--t-hover) var(--ease-out), box-shadow var(--t-hover) var(--ease-out);
}
.clinic-row.is-selected {
  background: rgba(var(--sky-rgb), .09);
}
.clinic-row.is-selected .mark { background: rgba(var(--sky-rgb), .2); }

/* ── 11 · FAQ ───────────────────────────────────────────────────────────── */
.faq__q {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  width: 100%; text-align: left; cursor: pointer;
  min-height: 44px; padding: var(--sp-3) 0;
  font: 600 var(--fs-body)/1.4 var(--font-ui); color: var(--text);
}
.faq__q:focus-visible { outline: var(--focus-ring); outline-offset: -2px; border-radius: var(--r-sm); }
.faq__q:active { color: var(--sky-ink); }
.faq__q svg { margin-left: auto; flex: 0 0 20px; stroke: var(--text-3); transition: transform var(--t-hover) var(--ease-out); }
.faq__q[aria-expanded="true"] svg { transform: rotate(180deg); }
.faq__a { display: grid; gap: var(--sp-3); padding-bottom: var(--sp-4); }
.faq__cite, .cite {
  display: inline-flex; align-items: center; gap: 6px;
  font: 600 var(--fs-micro)/1.3 var(--font-ui); color: var(--sky-ink);
}
.cite { color: var(--text-3); align-items: flex-start; }
.cite svg { flex: 0 0 auto; margin-top: 2px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item:last-child { border-bottom: 0; }

/* Brand hairlines: quiet teal-to-yellow transitions keep separators
   consistent with the reference dashboard without adding visual weight. */
.profile-row:not(:last-child),
.faq__item:not(:last-child) {
  border-bottom: 1px solid transparent;
  border-image: var(--grad-line) 1;
}

/* ── 12 · Assistant ─────────────────────────────────────────────────────── */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-3); align-content: start; }
.bubble {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-lg);
  font-size: var(--fs-body); line-height: var(--lh-body); max-width: 86%;
}
.bubble--me  { background: var(--ink); color: var(--text-on-ink); justify-self: end; border-bottom-right-radius: var(--r-xs); }
.bubble--bot { background: var(--surface); border: 1px solid var(--line); justify-self: start; border-bottom-left-radius: var(--r-xs); box-shadow: var(--e1); }
.sources { display: grid; gap: 6px; margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid transparent; border-image: var(--grad-line) 1; }
.source { display: flex; align-items: center; gap: 6px; font-size: var(--fs-micro); color: var(--text-3); }
.source strong { color: var(--sky-ink); font-weight: 600; }

/* The composer is chrome, not content: it lives in the frame beside the tab
   bar, not inside the scrolling screen. As a sticky child of a short screen it
   floated mid-page, and its --paper fade painted a pale band across a ground
   that is no longer paper. Now it is a floating pill, sibling to the tab bar
   and styled the same way, sitting directly above it. */
.composer {
  position: absolute; z-index: 41;
  /* Keep the assistant composer on the same horizontal grid as the tabbar
     and the screen cards above it. */
  left: var(--sp-5); right: var(--sp-5);
  bottom: calc(var(--tabbar-h, 58px) + var(--sp-3) + var(--sp-2) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: var(--sp-2);
  padding: 5px;
  background: rgba(var(--surface-rgb), .94);
  -webkit-backdrop-filter: blur(14px) saturate(1.6);
          backdrop-filter: blur(14px) saturate(1.6);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: 0 12px 30px -10px rgba(var(--ink-rgb), .30),
              0 2px 6px -2px rgba(var(--ink-rgb), .10);
  transition: border-color var(--t-hover) var(--ease-out),
              box-shadow var(--t-hover) var(--ease-out);
}
.composer[hidden] { display: none; }
/* The field gives up its own chrome to the pill, so the focus ring moves to
   the container — otherwise focus would be invisible. */
.composer .field {
  border: 0; background: none; box-shadow: none;
  min-height: 44px; padding: 0 var(--sp-2) 0 var(--sp-3);
}
.composer .field:focus { box-shadow: none; }
.composer:focus-within {
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(var(--sky-rgb), .28),
              0 12px 30px -10px rgba(var(--ink-rgb), .30);
}

/* ── 13 · Life event ────────────────────────────────────────────────────── */
.events { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
.event {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); padding: var(--sp-4);
  border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--surface);
  font: 600 var(--fs-body-s)/1.35 var(--font-ui); color: var(--text); text-align: left;
  cursor: pointer; min-height: 88px; align-content: start;
  transition: border-color var(--t-hover) var(--ease-out), background var(--t-hover) var(--ease-out),
              box-shadow var(--t-hover) var(--ease-out),
              transform var(--t-tap) var(--ease-out);
}
.event svg { stroke: var(--sky-ink); }
.event:active { transform: scale(.97); }
.event:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.event[aria-pressed="true"] { border-color: var(--sky); background: var(--info-bg); }
.life-event-date { display: grid; gap: var(--sp-2); }
.life-event-date .field__label { color: var(--ink); }
.life-event-date .meta { margin: 0; }

/* ── Claims ─────────────────────────────────────────────────────────────── */
.dropzone {
  display: grid; place-items: center; gap: var(--sp-2); text-align: center;
  padding: var(--sp-6) var(--sp-4); cursor: pointer;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-md);
  background: var(--surface-sunk); color: var(--text-2);
  transition: border-color var(--t-hover) var(--ease-out), background var(--t-hover) var(--ease-out),
              box-shadow var(--t-hover) var(--ease-out);
}
.dropzone:focus-visible { outline: var(--focus-ring); outline-offset: 2px; }
.dropzone[data-filled="true"] { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: var(--ok); }

.receipt-thumb {
  height: 120px; border-radius: var(--r-sm);
  background:
    linear-gradient(160deg, rgba(var(--surface-rgb), .9), rgba(var(--surface-rgb), .3)),
    repeating-linear-gradient(0deg, var(--line) 0 1px, transparent 1px 12px),
    var(--surface-sunk);
}

/* ── Empty / info strip ─────────────────────────────────────────────────── */
.notice {
  display: flex; gap: var(--sp-2); align-items: flex-start;
  padding: var(--sp-3); border-radius: var(--r-md);
  background: var(--info-bg); color: var(--sky-ink);
  font: 400 var(--fs-body-s)/1.45 var(--font-ui);
}
.notice svg { flex: 0 0 18px; margin-top: 1px; }
.notice--warn { background: var(--warn-bg); color: var(--warn); }
