/* ============================================================================
   The supplement scan: the scan page and its result page (T514). On the design
   system's tokens; the public shell and public-page.css give the frame, the
   buttons, the fields and the choices. The 8 px grid; nothing moves on hover.
   ========================================================================== */
.pub-card.sq { max-width: 760px; }
.sq h1 { outline: none; }
.sq-head { margin-top: var(--s-6); }
.sq-head h1 { font-size: var(--t-h2); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-head .sub { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }

/* ---- the front -------------------------------------------------------------- */
.sq-hero { padding: var(--s-8) var(--s-6); border-radius: var(--r-xl); background: var(--bp-teal-08); }
.sq-hero h1 { margin-top: 8px; font-size: var(--t-h1); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-lead { margin-top: 16px; color: var(--ink-2); font-size: var(--t-body); line-height: var(--lh-body); max-width: 60ch; }
.sq-points { margin: var(--s-6) 0 0; padding: 0; list-style: none; display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 560px) { .sq-points { grid-template-columns: 1fr; } }
.sq-points li { position: relative; padding: 16px 16px 16px 40px; border-radius: var(--r-lg); background: var(--paper); font-weight: var(--w-semi);
  line-height: var(--lh-snug); min-width: 0; }
.sq-points li::before { content: ""; position: absolute; left: 16px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--bp-lime); }
.sq-free { margin-top: 16px; color: var(--ink-3); }
.sq-sec { margin-top: var(--s-8); }
.sq-sec h2 { font-size: var(--t-h3); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-steps { margin: 16px 0 0; padding-left: 24px; list-style: decimal; display: grid; gap: 8px; color: var(--ink-2); line-height: var(--lh-body); }
.sq-card { margin-top: var(--s-6); padding: 16px; border-radius: var(--r-lg); background: var(--bp-teal-08); line-height: var(--lh-body); }
.sq-card b { display: block; font-weight: var(--w-semi); }
.sq-card p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); }
.sq-card--blood { background: var(--paper); border: 1px solid var(--line-2); }
.sq-card--care { background: var(--cx-warn-wash); color: var(--ink); font-size: var(--t-sm); }
.sq-card--note { background: var(--paper); border: 1px solid var(--line-2); font-size: var(--t-sm); color: var(--ink-2); }
.sq-note { margin-top: 16px; color: var(--ink-3); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-note + .sq-note { margin-top: 8px; }

/* ---- the steps -------------------------------------------------------------- */
.sq-progress { margin-top: var(--s-5); }
.sq-progress__count { color: var(--ink-2); font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
.sq-progress__bar { margin-top: 8px; height: 8px; border-radius: var(--r-pill); background: var(--viz-track); overflow: hidden; }
.sq-progress__bar i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--bp-teal); }
.sq-field { margin: var(--s-6) 0 0; padding: 0; border: 0; min-width: 0; }
.sq-legend { padding: 0; margin-bottom: 8px; font-weight: var(--w-semi); line-height: var(--lh-snug); }
.sq-field + .sq-field { margin-top: var(--s-6); }
.sq-tiles { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 480px) { .sq-tiles { grid-template-columns: 1fr; } }
.sq-tile { position: relative; display: block; min-width: 0; }
.sq-tile input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sq-tile span { display: flex; align-items: center; min-height: 48px; padding: 8px 16px; border: 1px solid var(--line-2); border-radius: var(--r-md);
  background: var(--paper); color: var(--ink); font-size: var(--t-sm); font-weight: var(--w-semi); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.sq-tile input:checked + span { background: var(--bp-teal); border-color: var(--bp-teal); color: #fff; }
.sq-tile input:focus-visible + span { outline: 3px solid var(--bp-lime); outline-offset: 2px; }
.sq-costs { margin-top: var(--s-6); display: grid; gap: 8px; }
.sq-cost { display: grid; gap: 8px 16px; grid-template-columns: minmax(0, 1fr) 160px; align-items: center; padding: 16px;
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--paper); }
.sq-cost.is-bad { border-color: var(--alert); box-shadow: 0 0 0 1px var(--alert); }
.sq-cost__name { font-weight: var(--w-semi); min-width: 0; overflow-wrap: anywhere; }
.sq-cost__amount { display: grid; gap: 4px; font-size: var(--t-xs); color: var(--ink-3); }
.sq-cost__amount .input { min-height: 44px; }
.sq-cost__doctor { grid-column: 1 / -1; min-height: 44px; }
.sq-cost__doctor input:focus-visible + .choice__mark, .sq-gate .choice input:focus-visible + .choice__mark { outline: 3px solid var(--bp-lime); outline-offset: 2px; }
@media (max-width: 480px) { .sq-cost { grid-template-columns: 1fr; } }
.sq-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--s-6); }
.sq-actions .btn { min-height: 48px; max-width: 100%; white-space: normal; text-align: center; }
.sq-actions [data-sq-next], .sq-actions [data-sq-go] { margin-left: auto; }
.sq-actions--hero { margin-top: var(--s-6); }
.sq-actions--end { margin-top: var(--s-8); }
.sq-open, .sq-err { margin-top: 16px; min-height: 1.4em; color: var(--alert); font-size: var(--t-sm); font-weight: var(--w-semi); }
.sq-err[hidden] { display: none; }
.sq-saved { margin-top: 8px; color: var(--ink-3); }
.sq-gate { margin-top: var(--s-6); }
.sq-consent { margin-top: var(--s-5); padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper); }
.sq-consent ul { margin: 8px 0 0; padding-left: 16px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-consent li + li { margin-top: 4px; }

/* ---- the result ------------------------------------------------------------- */
.sq-hero--result { padding-bottom: var(--s-6); }
.sq-date { margin-top: 8px; color: var(--ink-3); }
.sq-panel { margin-top: var(--s-6); padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--sh-1); }
.sq-panel h2 { font-size: var(--t-h3); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-panel > p, .sq-panel > .sub { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-panel--care { background: var(--cx-warn-wash); border-color: transparent; box-shadow: none; }
.sq-panel--saving { background: var(--ink-dark); border-color: transparent; color: #fff; }
.sq-panel--saving h2 { color: #fff; }
.sq-panel--saving > p { color: #e6ece9; }
.sq-panel--saving .sq-big { color: #fff; font-size: var(--t-h3); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-areas { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sq-area { display: flex; gap: 16px; align-items: flex-start; padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); }
.sq-area__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--bp-teal); color: #fff; font-weight: var(--w-semi); }
.sq-area b { display: block; font-weight: var(--w-semi); }
.sq-area div span { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-groups { margin-top: 16px; display: grid; gap: 16px; }
.sq-group h3 { display: flex; align-items: center; gap: 8px; font-size: var(--t-body); font-weight: var(--w-semi); }
.sq-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ink-3); }
.sq-group--keep .sq-dot { background: var(--ok); }
.sq-group--stop .sq-dot { background: var(--alert); }
.sq-group--replace .sq-dot { background: var(--bp-teal); }
.sq-group--check .sq-dot { background: var(--cx-warn); }
.sq-count { color: var(--ink-3); font-weight: var(--w-med); font-variant-numeric: tabular-nums; }
.sq-items { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sq-item { padding: 16px; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--paper); min-width: 0; }
.sq-item__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.sq-item__head b { font-weight: var(--w-semi); }
.sq-item__eur { color: var(--ink-2); font-size: var(--t-sm); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sq-item p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-item__also { color: var(--ink-3); }
.sq-adds { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sq-adds li { padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); min-width: 0; }
.sq-adds b { display: block; font-weight: var(--w-semi); }
.sq-adds span { display: block; margin-top: 4px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-adds .btn { margin-top: 8px; min-height: 44px; }

/* ---- the two next steps ------------------------------------------------------- */
.sq-panel--next { background: var(--bp-teal-08); border-color: transparent; box-shadow: none; }
.sq-next__cards { margin-top: 16px; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.sq-next__cards--one { grid-template-columns: 1fr; }
@media (max-width: 640px) { .sq-next__cards { grid-template-columns: 1fr; } }
.sq-next__card { display: flex; flex-direction: column; align-items: flex-start; padding: var(--s-6); border-radius: var(--r-lg); background: var(--paper);
  border: 1px solid var(--line); min-width: 0; }
.sq-next__card--panel { border-color: var(--bp-teal-40); }
.sq-next__card b { margin-top: 8px; font-size: var(--t-h3); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-next__card p { margin-top: 8px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }
.sq-next__card .btn { margin-top: auto; min-height: 48px; max-width: 100%; white-space: normal; text-align: center; }
.sq-next__card > p:last-of-type { margin-bottom: 16px; }
.sq-price { margin-top: 8px; font-size: var(--t-h3); font-weight: var(--w-semi); color: var(--bp-teal); }
.sq-payback { padding: 8px 16px; border-radius: var(--r-md); background: var(--bp-lime-tint); color: var(--ink) !important; }
.sq-both { margin-top: 16px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }

/* ---- the advice -------------------------------------------------------------- */
.sq-products { margin: var(--s-6) 0 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.sq-product { padding: var(--s-6); border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--paper); box-shadow: var(--sh-1); min-width: 0; }
.sq-product__name { display: block; font-size: var(--t-h3); font-weight: var(--w-med); line-height: var(--lh-snug); }
.sq-product .btn { margin-top: 16px; min-height: 48px; max-width: 100%; white-space: normal; }
.sq-dl { margin: 16px 0 0; display: grid; gap: 8px; }
.sq-dl div { display: grid; gap: 4px 16px; grid-template-columns: 120px minmax(0, 1fr); }
@media (max-width: 480px) { .sq-dl div { grid-template-columns: 1fr; } }
.sq-dl dt { color: var(--ink-3); font-size: var(--t-sm); }
.sq-dl dd { margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); overflow-wrap: anywhere; }
.sq-day { margin: 16px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sq-day li { display: grid; gap: 4px 16px; grid-template-columns: 160px minmax(0, 1fr); padding: 16px; border-radius: var(--r-lg); background: var(--paper-2); }
@media (max-width: 480px) { .sq-day li { grid-template-columns: 1fr; } }
.sq-day b { font-weight: var(--w-semi); }
.sq-day span { color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-body); }

/* the shell's own small controls on the scan's two pages, a thumb high (T496's rule) */
body[data-sq-page] [data-lang-switch] .lang-btn, body[data-sq-page] [data-auth-login]:not([hidden]) { min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; }

/* ---- the start page's band (app/js/start.js) ------------------------------------------------------------------ */
