/* ── Longevity Fingerprint · B2C design system (phase 1, 2026-09-22) ─────────
   Built from docs/design: 02-design-tokens, 03-components, mockups/*.html.
   Light theme only. Three colours: ink, accent, warm (+ neutrals).
   No red. No green on a value. Groups are told apart by icon and position,
   never by colour. Tokens come from tokens.css (--lf-*).
   Legacy pages keep main.css; this file is loaded only by views/app/. */

@import url("tokens.css");

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.lf {
  margin: 0; background: var(--lf-ground); color: var(--lf-ink);
  font-family: var(--lf-font-body); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.lf a { color: var(--lf-accent); text-decoration: none; }
body.lf a:hover { color: #0B5C56; }
body.lf button { font-family: inherit; }
body.lf svg { display: block; }
.lf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Type roles ───────────────────────────────────────────────────────────── */
.lf-display { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); }
.lf-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--lf-accent); line-height: 1; }
.lf-eyebrow-muted { color: var(--lf-muted); letter-spacing: .06em; }
.lf-muted   { color: var(--lf-muted); }
.lf-body    { color: var(--lf-body); }
.lf-caption { font-size: 11.5px; color: var(--lf-caption); line-height: 1.45; }
.lf-footnote { font-size: 11.5px; color: var(--lf-caption); line-height: 1.45; padding: 16px 0 0; }

/* ── Shell ────────────────────────────────────────────────────────────────── */
.lf-app { min-height: 100vh; display: flex; flex-direction: column; }
.lf-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--lf-gutter) 0;
}
.lf-topbar .lf-eyebrow { padding: 0; }
/* Brand: the attached lockups (public/images/lf-logo-*.svg). Phone bar = horizontal lockup,
   desktop rail = the same horizontal lockup. Clear space is the pack's rule: a quarter of the symbol height. */
.lf-brand-bar { display: block; line-height: 0; }
.lf-brand-bar img { height: 40px; width: auto; display: block; }
.lf-brand { display: none; line-height: 0; }
.lf-brand img { width: 150px; height: auto; display: block; }
.lf-avatar {
  width: 40px; height: 40px; border-radius: 20px; background: var(--lf-card);
  border: 1px solid var(--lf-line); display: flex; align-items: center; justify-content: center;
  color: var(--lf-ink);
}
.lf-main { flex: 1 1 auto; width: 100%; min-width: 0; max-width: 1280px; margin: 0 auto; padding: 0 0 100px; }
.lf-page { display: flex; flex-direction: column; }
.lf-section { padding: 0 var(--lf-gutter); }
.lf-stack { display: flex; flex-direction: column; gap: var(--lf-card-gap); padding: 0 var(--lf-gutter); }
.lf-stack > * { margin: 0; }

.lf-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 78px; z-index: 20;
  padding: 6px 12px 16px; background: var(--lf-card); border-top: 1px solid var(--lf-line);
  display: flex; align-items: stretch;
}
.lf-tab {
  flex: 1 1 0; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--lf-muted); font-size: 11px; font-weight: 500;
}
.lf-tab.is-active { color: var(--lf-accent); font-weight: 600; }
.lf-tab svg { stroke: currentColor; }

.lf-rail { display: none; }
.lf-next-tile {
  padding: 14px 12px; background: var(--lf-soft); border-radius: var(--lf-radius-note);
  display: flex; flex-direction: column; gap: 6px;
}
.lf-next-tile .lf-eyebrow { color: var(--lf-muted); letter-spacing: .06em; }
.lf-next-tile b { font-size: 14px; font-weight: 600; line-height: 1.35; }
.lf-next-tile a { font-size: 13px; font-weight: 600; }

/* Desktop shell: left rail 240, content gutter 48 */
@media (min-width: 1024px) {
  .lf-app { flex-direction: row; }
  .lf-topbar { display: none; }
  .lf-tabbar { display: none; }
  .lf-rail {
    display: flex; flex-direction: column; gap: 6px; width: 240px; flex-shrink: 0;
    padding: 36px 20px; background: var(--lf-card); border-right: 1px solid var(--lf-line);
    position: sticky; top: 0; height: 100vh;
  }
  .lf-rail .lf-brand { display: block; padding: 0 12px 22px; }
  .lf-rail-item {
    display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px;
    border-radius: 12px; color: var(--lf-muted); font-size: 15px; font-weight: 500;
  }
  .lf-rail-item svg { stroke: currentColor; }
  .lf-rail-item.is-active { background: var(--lf-soft); color: var(--lf-ink); font-weight: 600; }
  .lf-rail-spacer { flex: 1 1 auto; }
  .lf-rail-account { margin-top: 8px; font-size: 14px; }
  .lf-main { padding: 44px 48px 48px; }
  .lf-page { gap: 22px; }
  .lf-section, .lf-stack { padding-left: 0; padding-right: 0; }
}

/* ── PageHeader / SectionTitle ────────────────────────────────────────────── */
.lf-page-header { padding: 14px var(--lf-gutter) 18px; display: flex; flex-direction: column; gap: 6px; }
.lf-page-header .lf-back {
  width: 44px; height: 44px; margin: 0 0 4px -12px; display: flex; align-items: center; justify-content: center; color: var(--lf-ink);
}
.lf-page-title { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); font-size: 28px; line-height: 1.12; color: var(--lf-ink); margin: 0; }
.lf-page-sub { font-size: 15px; line-height: 1.5; color: var(--lf-muted); }
.lf-section-title { padding: 26px var(--lf-gutter) 12px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.lf-section-title h2 { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); font-size: 19px; line-height: 1.2; margin: 0; }
.lf-section-title .lf-right { font-size: 12.5px; color: var(--lf-muted); }
@media (min-width: 1024px) {
  .lf-page-header { padding: 0 0 8px; }
  .lf-page-title { font-size: 34px; line-height: 1.1; }
  .lf-page-sub { font-size: 16px; max-width: 640px; }
  .lf-section-title { padding: 8px 0 2px; }
  .lf-section-title h2 { font-size: 22px; }
  .lf-section-title .lf-right { font-size: 13px; }
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.lf-card {
  background: var(--lf-card); border: 1px solid var(--lf-line); border-radius: var(--lf-radius-card);
  padding: 16px 18px; color: var(--lf-ink);
}
.lf-card.is-dashed { border-style: dashed; }
.lf-card.is-warm { border: 1.5px solid var(--lf-warm); }
.lf-card.is-tight { padding: 14px 16px; }
a.lf-card { display: block; }
body.lf a.lf-card, body.lf a.lf-prog-row, body.lf a.lf-card:hover, body.lf a.lf-prog-row:hover { color: var(--lf-ink); }
body.lf a.lf-card:hover { border-color: #D6D1C8; }
.lf-card-col { display: flex; flex-direction: column; gap: 8px; }

.lf-hero {
  margin: 20px var(--lf-gutter) 0; padding: 20px 20px 18px; background: var(--lf-ink);
  border-radius: var(--lf-radius-hero); display: flex; flex-direction: column; gap: 12px; color: #fff;
}
.lf-hero .lf-eyebrow { color: var(--lf-hero-eyebrow); }
.lf-hero-headline { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); font-size: 21px; line-height: 1.3; color: #fff; }
.lf-hero-body { font-size: 14px; line-height: 1.5; color: var(--lf-hero-body); }
.lf-hero .lf-btn-on-ink { align-self: flex-start; margin-top: 4px; }
@media (min-width: 1024px) {
  .lf-hero { margin: 0; padding: 26px 28px; flex-direction: row; align-items: center; gap: 28px; }
  .lf-hero-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
  .lf-hero-headline { font-size: 24px; line-height: 1.25; }
  .lf-hero-body { font-size: 15px; max-width: 560px; }
  .lf-hero .lf-btn-on-ink { margin: 0; flex-shrink: 0; }
}

.lf-row-card, a.lf-card.lf-row-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.lf-row-card .lf-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lf-row-card .lf-row-title { font-size: 15px; font-weight: 600; }
.lf-row-card .lf-row-sub { font-size: 12.5px; color: var(--lf-muted); line-height: 1.4; }
.lf-row-card .lf-chev { color: #9AA5A2; flex-shrink: 0; }
.lf-row-card.is-muted .lf-row-title { color: var(--lf-muted); }
@media (min-width: 1024px) {
  .lf-row-card { padding: 16px 18px; gap: 16px; }
  .lf-row-card .lf-row-title { font-size: 16px; }
  .lf-row-card .lf-row-sub { font-size: 13.5px; line-height: 1.45; }
}

.lf-icon-tile {
  width: 40px; height: 40px; border-radius: var(--lf-radius-tile); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--lf-soft); color: var(--lf-ink);
}
.lf-icon-tile.tone-accent { background: var(--lf-accent-tint); color: var(--lf-accent); }
.lf-icon-tile.tone-warm   { background: var(--lf-warm-tint);   color: var(--lf-warm); }
.lf-icon-tile.tone-ink    { background: var(--lf-ink); color: #fff; border-radius: 22px; width: 44px; height: 44px; }
.lf-icon-tile.tone-muted  { color: var(--lf-muted); }
.lf-icon-tile.is-round    { border-radius: 22px; width: 44px; height: 44px; }
.lf-icon-tile svg { stroke: currentColor; }
@media (min-width: 1024px) { .lf-row-card .lf-icon-tile { width: 44px; height: 44px; } }

.lf-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 0 var(--lf-gutter); }
.lf-stat-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lf-stat-tile { padding: 14px 12px; background: var(--lf-card); border: 1px solid var(--lf-line); border-radius: 14px; display: flex; flex-direction: column; gap: 2px; }
.lf-stat-val { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); font-size: 26px; line-height: 1; }
.lf-stat-val.tone-warm { color: var(--lf-warm); }
.lf-stat-val.tone-accent { color: var(--lf-accent); }
.lf-stat-lbl { font-size: 12px; color: var(--lf-muted); }
@media (min-width: 1024px) { .lf-stat-grid { padding: 0; } .lf-stat-val { font-size: 30px; } }

.lf-badge-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px var(--lf-gutter) 0; }
.lf-badge { padding: 12px 14px; background: var(--lf-card); border: 1px solid var(--lf-line); border-radius: 14px; display: flex; align-items: center; gap: 10px; }
.lf-badge-dot { width: 28px; height: 28px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: var(--lf-accent); color: #fff; }
.lf-badge.is-warn .lf-badge-dot { background: var(--lf-warm-tint); color: var(--lf-warm); }
.lf-badge.is-neutral .lf-badge-dot { background: var(--lf-soft); color: var(--lf-muted); }
.lf-badge-dot svg { stroke: currentColor; }
.lf-badge-title { font-size: 13px; font-weight: 600; }
.lf-badge-sub { font-size: 11.5px; color: var(--lf-muted); }
@media (min-width: 1024px) { .lf-badge-grid { margin: 0; } }

.lf-note { margin: 16px var(--lf-gutter) 0; padding: 14px 16px; background: var(--lf-soft); border-radius: var(--lf-radius-note); display: flex; flex-direction: column; gap: 4px; }
.lf-note.tone-accent { background: var(--lf-accent-tint); }
.lf-note.tone-warm { background: var(--lf-warm-tint); }
.lf-note.is-flush { margin: 0; }
.lf-note-title { font-size: 13.5px; font-weight: 600; }
.lf-note-body { font-size: 13px; color: var(--lf-body); line-height: 1.5; }
@media (min-width: 1024px) { .lf-note { margin: 0; padding: 16px 18px; } .lf-note-title { font-size: 14px; } .lf-note-body { font-size: 13.5px; } }

/* Banner: one per screen (flag / info) */
.lf-banner { margin: 0 var(--lf-gutter); padding: 14px 16px; border-radius: var(--lf-radius-note); display: flex; gap: 10px; align-items: flex-start; background: var(--lf-accent-tint); }
.lf-banner.tone-warm { background: var(--lf-warm-tint); }
.lf-banner svg { flex-shrink: 0; stroke: var(--lf-accent); margin-top: 1px; }
.lf-banner.tone-warm svg { stroke: var(--lf-warm); }
.lf-banner-text { font-size: 13px; line-height: 1.5; color: var(--lf-body); }
@media (min-width: 1024px) { .lf-banner { margin: 0; } }

/* DetailsPanel — collapsed by default, native <details> */
.lf-details { padding: 0 18px; }
.lf-details > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  min-height: 44px; padding: 10px 0 8px; font-size: 14px; font-weight: 600; color: var(--lf-ink);
}
.lf-details > summary::-webkit-details-marker { display: none; }
.lf-details > summary svg { color: var(--lf-muted); transition: transform .15s; }
.lf-details[open] > summary svg { transform: rotate(90deg); }
.lf-details-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 12.5px; color: var(--lf-body); line-height: 1.4; padding: 4px 0 14px; }
.lf-details-grid dt { color: var(--lf-muted); margin: 0; }
.lf-details-grid dd { margin: 0; overflow-wrap: anywhere; }
.lf-details-verbatim { font-size: 12.5px; color: var(--lf-body); line-height: 1.5; padding: 0 0 14px; }

/* Chips */
.lf-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: var(--lf-radius-pill); white-space: nowrap; line-height: 1; color: var(--lf-muted); background: var(--lf-soft); }
.lf-chip.tone-accent { color: var(--lf-accent); background: var(--lf-accent-tint); }
.lf-chip.tone-warm { color: var(--lf-warm); background: var(--lf-warm-tint); }
.lf-tagchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 500; padding: 7px 11px; background: var(--lf-soft); border-radius: var(--lf-radius-pill); color: var(--lf-ink); border: 0; cursor: default; }
.lf-tagchip.is-small { font-size: 12px; padding: 5px 10px; }
.lf-tagchip.is-checked svg { stroke: var(--lf-accent); }
.lf-tagchip.is-checked { background: var(--lf-accent-tint); }
button.lf-tagchip { cursor: pointer; }
.lf-tagrow { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Buttons and inputs ───────────────────────────────────────────────────── */
.lf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: var(--lf-radius-pill); font-size: 15px; font-weight: 600; border: 0; cursor: pointer; line-height: 1;
}
.lf-btn.is-primary { background: var(--lf-ink); color: #fff; }
.lf-btn.is-primary:hover { color: #fff; background: #0D1614; }
.lf-btn.is-secondary { background: var(--lf-card); color: var(--lf-ink); border: 1px solid var(--lf-line); }
.lf-btn.is-secondary:hover { color: var(--lf-ink); border-color: #C9CFCB; }
.lf-btn.is-block { display: flex; width: 100%; }
.lf-btn.is-small { min-height: 44px; padding: 0 16px; font-size: 14px; }
.lf-btn.is-compact { min-height: 40px; padding: 0 14px; font-size: 13px; }
.lf-btn svg { stroke: currentColor; }
.lf-btn-on-ink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; background: #fff; color: var(--lf-ink); border-radius: var(--lf-radius-pill); font-size: 14px; font-weight: 600; }
.lf-btn-on-ink:hover { color: var(--lf-ink); }
.lf-btn-on-ink svg { stroke: currentColor; }
@media (min-width: 1024px) { .lf-btn-on-ink { min-height: 48px; padding: 0 22px; font-size: 15px; } }
.lf-link { color: var(--lf-accent); font-weight: 600; }

.lf-search { position: relative; }
.lf-search input {
  width: 100%; min-height: 44px; padding: 0 12px 0 40px; background: var(--lf-soft); border: 0; border-radius: 12px;
  font-family: inherit; font-size: 14px; color: var(--lf-ink);
}
.lf-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); stroke: var(--lf-muted); pointer-events: none; }
.lf-input {
  width: 100%; min-height: 40px; padding: 0 12px; background: var(--lf-ground); border: 1px solid var(--lf-line); border-radius: 10px;
  font-family: inherit; font-size: 13px; color: var(--lf-ink);
}
.lf-input-row { display: flex; align-items: center; gap: 8px; }
.lf-input-row .lf-input { flex: 1 1 auto; }
select.lf-input { appearance: none; -webkit-appearance: none; }
textarea.lf-input { min-height: 96px; line-height: 1.5; resize: vertical; }
.lf-inline-form { display: inline; margin: 0; }
.lf-viewas { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 var(--lf-gutter) 12px; padding: 8px 12px; background: var(--lf-warm-tint); color: var(--lf-warm); border-radius: 12px; font-size: 12.5px; }
.lf-viewas span { display: inline-flex; align-items: center; gap: 6px; }
.lf-viewas svg { stroke: currentColor; }
.lf-viewas button { border: 0; background: transparent; color: var(--lf-warm); font: inherit; font-weight: 600; cursor: pointer; min-height: 32px; padding: 0 6px; }
@media (min-width: 1024px) { .lf-viewas { margin: 0 0 18px; } }
a.lf-tagchip { color: var(--lf-ink); }
.lf-label { font-size: 12.5px; font-weight: 600; padding-top: 4px; }

/* ── Tracks and charts (inline SVG from src/services/ui/tracks.js) ────────── */
.lf-track { width: 100%; height: auto; }
@media (min-width: 1024px) { .lf-timechart { max-width: 620px; display: block; } }
.lf-track-caption { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--lf-muted); }
.lf-track-caption > :nth-child(2):not(:last-child) { text-align: center; }
.lf-track-caption > :last-child { text-align: right; }
.lf-track-caption b { font-weight: 600; color: var(--lf-ink); }
.lf-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--lf-muted); }
.lf-legend span { display: inline-flex; align-items: center; gap: 6px; }
.lf-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 5px; background: var(--lf-ink); }
.lf-legend i.is-hollow { background: #fff; border: 2px solid var(--lf-ink); }
.lf-legend i.is-band { width: 14px; height: 8px; border-radius: 0; background: var(--lf-accent-tint); }

/* Programme group card */
.lf-group-card { padding: 16px 18px 6px; }
.lf-group-hd { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.lf-group-name { font-size: 16px; font-weight: 600; }
.lf-group-sub { font-size: 12.5px; color: var(--lf-muted); }
.lf-prog-row, a.lf-prog-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--lf-line); color: inherit; }
.lf-prog-row .lf-prog-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lf-prog-name { font-size: 14px; font-weight: 500; }
.lf-prog-val { font-size: 14px; font-weight: 600; white-space: nowrap; }
.lf-prog-sub { font-size: 11.5px; color: var(--lf-muted); }
.lf-prog-row.is-low { color: var(--lf-muted); }
.lf-prog-row.is-low .lf-prog-name, .lf-prog-row.is-low .lf-prog-val { color: var(--lf-muted); }
.lf-prog-row.is-low .lf-track { opacity: .55; }

/* Time chart card */
.lf-chart-hd { display: flex; justify-content: space-between; align-items: baseline; }
.lf-chart-hd b { font-size: 14px; font-weight: 600; }
.lf-chart-val { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 500); letter-spacing: var(--lf-display-tracking, 0); font-size: 24px; }

/* Journey strip */
.lf-journey { display: flex; flex-direction: column; gap: 12px; }
.lf-journey-labels { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; }
.lf-journey-labels > div { display: flex; flex-direction: column; min-width: 0; }
.lf-journey-labels > div:nth-child(n+2) { align-items: center; text-align: center; }
.lf-journey-labels > div:last-child { align-items: flex-end; text-align: right; }
.lf-journey-labels > div:first-child { align-items: flex-start; text-align: left; }
.lf-journey-labels b { font-weight: 600; }
.lf-journey-labels .is-next b { color: var(--lf-muted); }
.lf-journey-labels a { font-weight: 600; }
.lf-journey-labels .lf-muted { color: var(--lf-muted); }

/* Vertical step lists: UnlockTrack, KitTimeline */
.lf-steps { display: flex; flex-direction: column; }
.lf-step { display: flex; gap: 14px; }
.lf-step-rail { display: flex; flex-direction: column; align-items: center; }
.lf-step-dot { width: 26px; height: 26px; border-radius: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--lf-card); border: 2px solid var(--lf-dashed); color: #8A9491; }
.lf-step-dot svg { stroke: currentColor; }
.lf-step.is-done .lf-step-dot { background: var(--lf-accent); border-color: var(--lf-accent); color: #fff; }
.lf-step.is-next .lf-step-dot { border-color: var(--lf-accent); }
.lf-step.is-next .lf-step-dot::after { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--lf-accent); }
.lf-step-line { width: 2px; flex: 1 1 auto; background: var(--lf-line); margin-top: 4px; min-height: 18px; }
.lf-step.is-done .lf-step-line { background: var(--lf-accent); }
.lf-step-text { display: flex; flex-direction: column; gap: 2px; padding-bottom: 16px; }
.lf-step-title { font-size: 14.5px; font-weight: 600; color: var(--lf-ink); }
.lf-step.is-locked .lf-step-title { color: var(--lf-muted); }
.lf-step-sub { font-size: 12.5px; color: var(--lf-muted); line-height: 1.45; }
.lf-steps.is-kit .lf-step-dot { width: 28px; height: 28px; border-radius: 14px; }
.lf-steps.is-kit .lf-step-title { font-size: 15px; }
.lf-steps.is-kit .lf-step-text { padding-bottom: 18px; }
.lf-steps.is-kit .lf-step-line { min-height: 22px; }

/* Finding / gated / medicine / risk cards */
.lf-card-hd { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.lf-card-title { font-size: 15px; font-weight: 600; }
.lf-card-text { font-size: 13.5px; color: var(--lf-body); line-height: 1.5; }
.lf-card-line { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--lf-muted); }
.lf-card-line svg { stroke: var(--lf-muted); flex-shrink: 0; }
.lf-card-meta { font-size: 11.5px; color: var(--lf-muted); }
.lf-gated { display: flex; flex-direction: column; gap: 10px; }
.lf-gated-hd { display: flex; align-items: center; gap: 12px; }
.lf-gated .lf-btn { align-self: flex-start; }
.lf-verbatim { font-size: 13px; line-height: 1.5; color: var(--lf-body); padding: 10px 12px; background: var(--lf-accent-tint); border-radius: 10px; }
.lf-verbatim.tone-soft { background: var(--lf-soft); }

/* Numbered step (IdentityBlocked "what happens now") */
.lf-num { width: 28px; height: 28px; border-radius: 14px; background: var(--lf-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 13px; font-weight: 600; }

/* Ring + bars (ancestry) */
.lf-ring-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.lf-ring-title { font-size: 14.5px; font-weight: 600; }
.lf-bar-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 18px; }
.lf-bar-hd { display: flex; justify-content: space-between; font-size: 14px; }
.lf-bar-hd b { font-weight: 600; }

/* States */
.lf-skeleton { background: var(--lf-soft); border-radius: 8px; color: transparent; animation: lf-pulse 1.4s ease-in-out infinite; }
@keyframes lf-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.lf-withheld { display: flex; flex-direction: column; gap: 6px; }
.lf-withheld .lf-card-title { color: var(--lf-muted); }

/* Desktop grid */
.lf-grid { display: flex; flex-direction: column; gap: 22px; }
/* Phase 5 desktop layout: every screen is a main column (2/3) and an aside
   (1/3) at ≥1024 px; on the phone the wrappers vanish (display: contents) and
   the blocks flow in DOM order, main first, aside after. */
.lf-grid, .lf-grid-main, .lf-grid-aside, .lf-grid-2, .lf-grid-3 { display: contents; }
@media (min-width: 1024px) {
  .lf-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: start; }
  .lf-grid-main { grid-column: span 2; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .lf-grid-aside { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
  .lf-grid-main > .lf-section-title:first-child, .lf-grid-aside > .lf-section-title:first-child { padding-top: 0; }
  /* side-by-side boxes are the same height (2026-10-10, client): the grid stretches its cells, a wrapper around a
     card (risk: card + details panel) becomes a column whose card takes the spare height, and a card's closing
     block ("What you can do") sits at its foot so the pair lines up */
  .lf-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .lf-grid-2 > div:not(.lf-desktop-only):not(.lf-card) { display: flex; flex-direction: column; gap: 10px; }
  .lf-grid-2 > div > .lf-card:first-child { flex: 1; }
  .lf-grid-2 .lf-card > .lf-actions { margin-top: auto; }
  .lf-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .lf-grid-main .lf-stack, .lf-grid-aside .lf-stack { gap: 12px; }
  .lf-grid-aside .lf-note { margin: 0; }
  .lf-aside-card { padding: 18px 20px; }
  .lf-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 13px; }
  .lf-kv dt { color: var(--lf-muted); margin: 0; } .lf-kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
  .lf-row-card .lf-row-title { font-size: 16px; }
}
.lf-kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 12px; font-size: 13px; margin: 0; }
.lf-kv dt { color: var(--lf-muted); margin: 0; } .lf-kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.lf-status-row { display: flex; align-items: center; gap: 12px; }
/* deep ancestry */
.lf-map-card { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.lf-map { width: 100%; height: auto; display: block; border-radius: 10px; }
.lf-map-legend { padding: 0 6px; }
.lf-legend i.lf-leg-line { width: 16px; height: 0; border-top: 2.5px solid var(--lf-accent); border-radius: 0; background: none; }
.lf-legend i.lf-leg-line.is-mt { border-top-style: dashed; border-top-color: var(--lf-ink); }
.lf-legend i.lf-leg-start { width: 9px; height: 9px; border-radius: 5px; background: #fff; border: 2px solid var(--lf-ink); }
.lf-legend i.lf-leg-end { width: 10px; height: 10px; border-radius: 5px; background: var(--lf-ink); }
.lf-steps-list { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--lf-accent); display: flex; flex-direction: column; gap: 10px; }
.lf-steps-list.lf-steps-mt { border-left-color: var(--lf-ink); border-left-style: dashed; }
.lf-steps-list li { position: relative; }
.lf-steps-list li::before { content: ""; position: absolute; left: -19px; top: 5px; width: 8px; height: 8px; border-radius: 4px; background: var(--lf-accent); }
.lf-steps-list.lf-steps-mt li::before { background: var(--lf-ink); }
.lf-step-era { font-size: 12.5px; font-weight: 600; }
.lf-panel-gene { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--lf-line); }
.lf-lifetime { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid var(--lf-line); }
.lf-lifetime-hd { font-size: 13.5px; font-weight: 600; }
.lf-track-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--lf-muted); }
.lf-track-explain { font-size: 12.5px; line-height: 1.45; padding-bottom: 4px; }
.lf-desktop-only { display: contents; }
@media (max-width: 1023.98px) { .lf-desktop-only { display: none; } }
@media (min-width: 1024px) { .lf-phone-only { display: none; } }
.lf-status-row .lf-badge-dot { flex-shrink: 0; }
.lf-bottom-space { height: 100px; }
@media (min-width: 1024px) { .lf-bottom-space { height: 0; } }
/* Onboarding: brand lockup above the welcome title (phone 150 px, desktop 180 px) */
.lf-onboard-logo { padding: 8px 0 18px; line-height: 0; }
.lf-onboard-logo img { width: 150px; height: auto; display: block; }
/* The brand shows once per screen: Welcome hides the phone bar's lockup under its own big one,
   and on desktop drops its own because the rail already carries it. */
.lf-shell-welcome .lf-brand-bar { visibility: hidden; }
@media (min-width: 1024px) { .lf-shell-welcome .lf-onboard-logo { display: none; } }

/* Sign-in family (login, register, reset, new password) — 2026-10-06. One centred card on paper, the
   stacked colour lockup above it. Inputs are taller here than in the app's inline forms (48 px, 15 px)
   because these are the only forms a person fills on a phone keyboard. */
.lf-auth-wrap { display: flex; flex-direction: column; min-height: 100vh; }
.lf-auth-inner { margin: auto; width: 100%; max-width: 440px; padding: 28px 16px 40px; box-sizing: border-box; }
.lf-auth-brand { display: block; width: 104px; margin: 0 auto 22px; line-height: 0; }
.lf-auth-brand img { width: 100%; height: auto; display: block; }
.lf-auth-card { padding: 24px 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.lf-auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; align-self: flex-start; margin-bottom: -6px; }
.lf-auth-back svg { stroke: currentColor; }
.lf-auth-head { display: flex; flex-direction: column; gap: 6px; }
.lf-auth-head .lf-page-title { font-size: 24px; }
.lf-auth-head .lf-page-sub { margin: 0; font-size: 14.5px; }
.lf-auth-banner { margin: 0; }
.lf-auth-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.lf-auth-form .lf-btn { margin-top: 4px; }
.lf-field { display: flex; flex-direction: column; gap: 6px; }
.lf-field .lf-label { padding: 0; }
.lf-field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.lf-field-aside { font-size: 12.5px; font-weight: 600; }
.lf-field-aside.is-muted { color: var(--lf-muted); font-weight: 500; }
.lf-auth .lf-input { min-height: 48px; font-size: 15px; border-radius: 12px; padding: 0 14px; }
.lf-auth .lf-input:focus { outline: 2px solid var(--lf-accent); outline-offset: 0; border-color: var(--lf-accent); }
.lf-auth .lf-input::placeholder { color: #9AA3A1; }
.lf-select { position: relative; }
.lf-select select.lf-input { padding-right: 40px; }
.lf-select svg { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(90deg); stroke: var(--lf-muted); pointer-events: none; }
.lf-auth-consent { background: var(--lf-soft); border-radius: var(--lf-radius-note); padding: 0 14px; }
.lf-auth-consent > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 8px 0; font-size: 13px; font-weight: 600; }
.lf-auth-consent > summary::-webkit-details-marker { display: none; }
.lf-auth-consent > summary svg { color: var(--lf-muted); flex-shrink: 0; transition: transform .15s; }
.lf-auth-consent[open] > summary svg { transform: rotate(90deg); }
.lf-auth-consent-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.lf-auth-consent-chips { display: inline-flex; gap: 4px; }
.lf-auth-consent-chips .lf-chip { background: var(--lf-card); }
.lf-auth-consent-body { padding: 2px 0 14px; display: flex; flex-direction: column; gap: 8px; }
.lf-auth-consent-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--lf-body); }
.lf-auth-consent-list { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--lf-body); display: flex; flex-direction: column; gap: 4px; }
.lf-auth-check { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--lf-body); cursor: pointer; }
.lf-auth-check input { width: 20px; height: 20px; margin: 1px 0 0; flex-shrink: 0; accent-color: var(--lf-accent); }
.lf-auth-done { gap: 8px; }
.lf-auth-done-icon { width: 40px; height: 40px; border-radius: var(--lf-radius-tile); background: var(--lf-card); color: var(--lf-accent); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.lf-auth-done-icon svg { stroke: currentColor; }
.lf-auth-done .lf-note-title { font-size: 16px; }
.lf-auth-foot { text-align: center; font-size: 14px; color: var(--lf-body); margin: 20px 0 0; }
.lf-auth-foot a { font-weight: 600; }
.lf-auth-footnote { text-align: center; padding-top: 22px; }
@media (min-width: 1024px) {
  .lf-auth-inner { padding: 56px 16px 64px; }
  .lf-auth-brand { width: 124px; margin-bottom: 28px; }
  .lf-auth-card { padding: 30px 28px 26px; }
  .lf-auth-head .lf-page-title { font-size: 26px; }
}
.lf-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Outbound reference links in details panels (3.7): accent, underlined so they read as links among values */
.lf-details-grid dd a.lf-ext { text-decoration: underline; text-underline-offset: 2px; }

/* Fusion screen card on Screening (2026-10-10): a detected fusion is named with the entity the pipeline gives it */
.lf-fusion.is-detected { border-left: 3px solid var(--lf-warm); }
.lf-fusion-entry { padding: 10px 12px; border-radius: 10px; background: var(--lf-warm-tint); display: flex; flex-direction: column; gap: 4px; }
.lf-fusion-name { font-weight: 700; font-size: 15px; letter-spacing: 0.01em; color: var(--lf-ink); overflow-wrap: anywhere; }
.lf-fusion-history { list-style: none; margin: 4px 0 0; padding: 8px 0 0; border-top: 1px solid var(--lf-line); display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.lf-fusion-history li { display: flex; justify-content: space-between; gap: 12px; color: var(--lf-ink); }
.lf-fusion-history li span:last-child { text-align: right; color: var(--lf-muted); }
.lf-fusion-history li.is-detected span:last-child { color: var(--lf-warm); font-weight: 600; }
.lf-fusion-entry .lf-footnote { padding: 0; }
.lf-fusion-entity { font-size: 14px; line-height: 1.45; color: var(--lf-ink); }

/* Transcriptomic age preview on Immune (2026-10-10): dashed border = a value the laboratory holds back */
.lf-age-preview { border: 1.5px dashed var(--lf-line); }
.lf-age-eyebrow { color: var(--lf-warm); }
.lf-age-value { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 600); letter-spacing: var(--lf-display-tracking, -0.015em); font-size: 28px; color: var(--lf-ink); }
.lf-age-clock { font-family: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--lf-muted); }
.lf-age-clocks { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px solid var(--lf-line); display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 18px; font-size: 13px; }
.lf-age-clocks li { display: flex; justify-content: space-between; gap: 10px; color: var(--lf-muted); }
.lf-age-clocks li.is-primary { color: var(--lf-ink); font-weight: 600; }

/* `hidden` must win over component display rules (2026-10-10: the medicine lookup's rows were display:flex, so
   the attribute did nothing and the search looked broken) */
.lf [hidden] { display: none !important; }
.lf-drug-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lf-drug-hit { border-top: 1px solid var(--lf-line); }
.lf-drug-det > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; }
.lf-drug-det > summary::-webkit-details-marker { display: none; }
.lf-drug-det > summary svg { flex: none; color: var(--lf-muted); transition: transform .15s; }
.lf-drug-det[open] > summary svg { transform: rotate(90deg); }
.lf-drug-sum { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lf-drug-det > .lf-drug-line { padding: 0 0 8px; }
.lf-drug-det > .lf-drug-line:last-child { padding-bottom: 12px; }
#lf-drug-more { align-self: flex-start; margin-top: 4px; }
.lf-drug-hit .lf-prog-hd { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.lf-drug-line { display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.45; color: var(--lf-ink); }
.lf-drug-line.is-muted { color: var(--lf-muted); font-style: italic; }
.lf-drug-src { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--lf-muted); font-style: normal; }
.lf-drug-pop { font-size: 12px; color: var(--lf-muted); }

/* "What you can do" on risk cards (2026-10-10): every modifiable factor from the PRS report, verbatim */
.lf-actions { background: var(--lf-accent-tint); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.lf-actions-hd { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lf-accent); }
.lf-actions ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.lf-actions li { position: relative; padding-left: 14px; font-size: 13.5px; line-height: 1.45; color: var(--lf-ink); }
.lf-actions li::before { content: ''; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 3px; background: var(--lf-accent); }

/* Notices (attention[], assay 1.1, 2026-10-17): warm or neutral, never red; always visible */
.lf-notice { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border-left: 3px solid var(--lf-line); }
.lf-notice.tone-warm { background: var(--lf-warm-tint); border-left-color: var(--lf-warm); }
.lf-notice-tag { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--lf-muted); }
.lf-notice.tone-warm .lf-notice-tag { color: var(--lf-warm); }
.lf-notice-title { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 600); font-size: 16px; line-height: 1.3; color: var(--lf-ink); }
.lf-notice-text { font-size: 14px; line-height: 1.55; color: var(--lf-ink); }
.lf-notice-ev { font-size: 12.5px; color: var(--lf-muted); font-variant-numeric: tabular-nums; }
.lf-more-link { font-size: 13.5px; font-weight: 600; align-self: flex-start; }

/* Your immune team (cell composition, assay 1.1): fixed order and colours, no reference bands */
.lf-team { gap: 10px; }
.lf-team-bar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--lf-soft); }
.lf-team-bar.is-thin { height: 12px; border-radius: 4px; }
.lf-team-bar span { display: block; height: 100%; }
.lf-team.is-low .lf-team-bar, .lf-team.is-low .lf-team-legend i { filter: saturate(.35); opacity: .75; }
.lf-team-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 16px; font-size: 13px; }
.lf-team-legend li { display: flex; align-items: center; gap: 7px; min-width: 0; }
.lf-team-legend i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.lf-team-legend span { flex: 1; min-width: 0; color: var(--lf-muted); }
.lf-team-legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.lf-team-derived { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; padding-top: 8px; border-top: 1px solid var(--lf-line); }
.lf-team-derived dt { font-size: 12px; color: var(--lf-muted); margin: 0; }
.lf-team-derived dd { margin: 2px 0 0; font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 600); font-size: 18px; font-variant-numeric: tabular-nums; }
.lf-team-derived dd.is-na { font-family: inherit; font-weight: 400; font-size: 12.5px; color: var(--lf-muted); }
.lf-team-valid { font-size: 13px; line-height: 1.5; color: var(--lf-muted); }
.lf-team-rec { font-size: 13.5px; line-height: 1.5; background: var(--lf-accent-tint); border-radius: 10px; padding: 10px 12px; color: var(--lf-ink); }
.lf-team-rec b { color: var(--lf-accent); }
.lf-team-limits > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--lf-accent); }
.lf-team-limits > summary::-webkit-details-marker { display: none; }
.lf-team-limits[open] > summary svg { transform: rotate(90deg); }
.lf-team-limits ul { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--lf-ink); display: flex; flex-direction: column; gap: 4px; }
.lf-team-history { display: flex; flex-direction: column; gap: 8px; }
.lf-team-hrow { display: grid; grid-template-columns: minmax(0, 170px) 1fr; gap: 10px; align-items: center; font-size: 12.5px; color: var(--lf-muted); }
.lf-team-hrow.is-current .lf-team-hlabel { color: var(--lf-ink); font-weight: 600; }
@media (max-width: 480px) { .lf-team-hrow { grid-template-columns: 1fr; gap: 4px; } }

/* Research (not released) panel, admin only (2026-10-20): neutral, dashed, raw numbers, no colour scale */
.lf-research { border: 1.5px dashed var(--lf-line); padding: 0; }
.lf-research > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 18px; }
.lf-research > summary::-webkit-details-marker { display: none; }
.lf-research > summary svg { margin-left: auto; color: var(--lf-muted); }
.lf-research[open] > summary svg { transform: rotate(90deg); }
.lf-research-tag { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--lf-ink); }
.lf-research-sub { font-size: 12px; color: var(--lf-muted); }
.lf-research-block { border-top: 1px solid var(--lf-line); padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lf-research-hd { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.lf-research-hd h3 { margin: 0; font-size: 15px; font-weight: 600; }
.lf-research-ref { font-size: 12px; color: var(--lf-muted); }
.lf-research-lead { margin: 0; font-size: 13.5px; font-weight: 600; }
.lf-research-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--lf-muted); }
.lf-research-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.lf-research-list li { display: grid; grid-template-columns: 1fr auto 60px; gap: 10px; }
.lf-research-list b { font-variant-numeric: tabular-nums; }
.lf-research-list em { font-style: normal; color: var(--lf-muted); }
.lf-research-scroll { overflow-x: auto; max-width: 100%; }
.lf-research-table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.lf-research-table th { text-align: left; font-weight: 600; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--lf-muted); padding: 6px 8px; border-bottom: 1px solid var(--lf-line); white-space: nowrap; }
.lf-research-table td { padding: 5px 8px; border-bottom: 1px solid var(--lf-line); vertical-align: middle; white-space: nowrap; }
.lf-research-table td:first-child { white-space: normal; min-width: 130px; }
.lf-research-table td.num { text-align: right; }
.lf-research-table tr.is-unusual td { font-weight: 600; }
.lf-research-range { position: relative; display: block; width: 90px; height: 10px; background: var(--lf-soft); border-radius: 5px; }
.lf-research-range i { position: absolute; top: 0; height: 100%; background: #BCC4C1; border-radius: 5px; }
.lf-research-range b { position: absolute; top: -3px; width: 3px; height: 16px; background: var(--lf-ink); border-radius: 2px; transform: translateX(-1.5px); }
.lf-research-raw { margin: 0; max-height: 320px; overflow: auto; background: var(--lf-soft); border-radius: 8px; padding: 10px; font-size: 11.5px; }
.lf-research-visit { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; }
.lf-research-sub-details > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--lf-accent); }
.lf-research { min-width: 0; max-width: 100%; overflow: hidden; }
.lf-research-sub-details table { display: block; overflow-x: auto; }
.lf-research-sort { display: flex; gap: 6px; flex-wrap: wrap; }
.lf-research-sort .lf-chip { cursor: pointer; border: 1px solid var(--lf-line); background: transparent; font: inherit; font-size: 11px; font-weight: 600; }
.lf-research-sort .lf-chip.is-on { background: var(--lf-ink); color: #fff; border-color: var(--lf-ink); }
.lf-research-table th[title]:not([title=""]) { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
/* Your report in plain words (narrative 0.1, §8.4): plain typography only, no icons, no colour, no charts */
.lf-plain { padding: 0 var(--lf-gutter); max-width: 68ch; color: var(--lf-body); font-size: 16px; line-height: 1.65; }
.lf-plain section { margin-top: 22px; }
.lf-plain h2 { font-family: var(--lf-font-display); font-weight: var(--lf-display-weight, 600); letter-spacing: var(--lf-display-tracking, 0); font-size: 19px; line-height: 1.25; color: var(--lf-ink); margin: 0 0 8px; }
.lf-plain .lf-plain-title { font-size: 22px; }
.lf-plain-lead { font-size: 17px; color: var(--lf-ink); margin: 0 0 6px; }
.lf-plain-p { margin: 0 0 12px; }
.lf-stack > .lf-plain-p { margin: 0; color: var(--lf-body); font-size: 16px; line-height: 1.6; }
.lf-plain ul { margin: 0; padding-left: 20px; } .lf-plain li { margin-bottom: 6px; }
.lf-plain dl { margin: 0; } .lf-plain dt { font-weight: 600; color: var(--lf-ink); margin-top: 8px; } .lf-plain dd { margin: 2px 0 0; }
.lf-plain-pending { border-left: 3px solid var(--lf-line); padding: 2px 0 2px 12px; margin: 0 0 16px; }
.lf-plain-foot { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--lf-line); font-size: 13.5px; line-height: 1.55; color: var(--lf-muted); }
.lf-plain-foot p { margin: 0 0 8px; }
.lf-plain-inset { padding: 0 18px; }
.lf-plain-inset.lf-plain-foot { margin: 16px 18px 14px; padding: 12px 0 0; }
/* admin review of a narrative (§8.3) */
.lf-nr-preview > summary, .lf-nr-side > summary { cursor: pointer; padding: 14px 18px; font-weight: 600; list-style: none; }
.lf-nr-editor { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.lf-nr-editor[inert] { opacity: .7; }
.lf-nr-ta { min-height: 0; height: auto; padding: 10px 12px; line-height: 1.5; font: inherit; font-size: 14px; resize: vertical; }
.lf-nr-sec { border: 1px solid var(--lf-line); border-radius: var(--lf-radius-note); padding: 10px 12px 12px; margin: 6px 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.lf-nr-sec legend { font-size: 12px; font-weight: 600; color: var(--lf-muted); padding: 0 4px; }
.lf-nr-sec .lf-research-why, .lf-nr-editor > .lf-dc-table td { white-space: normal; }
.lf-dc-table td.num, .lf-dc-table td:nth-child(3) { white-space: nowrap; }
.lf-dc-table th { white-space: normal; vertical-align: bottom; }
.lf-dc-table td, .lf-dc-table th { padding-left: 6px; padding-right: 6px; }
.lf-dc-gene { min-width: 120px; max-width: 260px; }
.lf-dc-gene .lf-chip { font-size: 10.5px; padding: 1px 6px; }
.lf-dc-tissue { display: block; font-size: 11.5px; color: var(--lf-muted); line-height: 1.35; margin-top: 2px; }
.lf-research-why { align-self: flex-start; }
.lf-nr-h { font-size: 15px; font-weight: 600; margin: 0 0 8px; color: var(--lf-ink); }
.lf-nr-h3 { font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
.lf-nr-side { padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.lf-nr-side.lf-research { padding: 0 18px 14px; }
.lf-nr-flags { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--lf-body); } .lf-nr-flags li { margin-bottom: 6px; }
.lf-nr-verdict { margin: 0 0 6px; font-weight: 600; font-size: 14px; }
.lf-nr-verdict.is-blocked { color: var(--lf-warm); }
.lf-nr-check-row { margin: 0 0 4px; font-size: 13px; line-height: 1.45; } .lf-nr-check-row b { font-weight: 600; }
.lf-nr-check-row.is-hard { color: var(--lf-warm); }
.lf-btn[disabled] { opacity: .45; cursor: not-allowed; }
.lf-grade { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.lf-grade.is-expected_skin, .lf-grade.is-floor { background: var(--lf-soft); color: var(--lf-muted); }
.lf-grade.is-shared { background: transparent; color: var(--lf-ink); border-color: var(--lf-line); }
.lf-grade.is-above_floor { background: transparent; color: var(--lf-ink); border-color: var(--lf-ink); border-style: dashed; }
.lf-grade.is-isolated { background: transparent; color: var(--lf-ink); border-color: var(--lf-ink); }
.lf-dc-flag { display: inline-block; padding: 0 6px; border-radius: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--lf-ink); border: 1px dashed var(--lf-muted); white-space: nowrap; }
.lf-dc-lift { border: 1px solid var(--lf-ink); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.lf-dc-lift-hd { margin: 0; font-weight: 600; }
.lf-dc-lift-more summary { cursor: pointer; font-size: 13px; color: var(--lf-muted); margin-top: 6px; }
.lf-grade.is-pattern { background: var(--lf-ink); color: #fff; border-color: var(--lf-ink); }
.lf-research-why { font: inherit; font-size: 11px; font-weight: 600; background: none; border: 1px solid var(--lf-line); border-radius: 999px; padding: 1px 8px; cursor: pointer; color: var(--lf-ink); }
.lf-research-ev td { white-space: normal; background: var(--lf-soft); }
.lf-research-ev p { margin: 0 0 6px; max-width: 72ch; }
.lf-research-mini { width: auto; margin-top: 4px; }
/* research panel headers (handover §3): the draw's visit id and date, or the person with the stated limits */
.lf-research-draw { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-size: 13.5px; padding: 4px 18px 10px; }
.lf-research-draw a, .lf-research-visit a { color: var(--lf-accent); }
.lf-research-limits { margin: 0 18px 12px; padding-left: 18px; font-size: 12.5px; color: var(--lf-muted); display: flex; flex-direction: column; gap: 3px; }
/* research box: the blood-draw drop-down under the title (client 2026-10-20) */
.lf-research-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 0 18px 14px; }
.lf-research-pick .lf-label { margin: 0; }
.lf-research-pick .lf-select { flex: 0 1 320px; min-width: 0; }
.lf-research-pick a { color: var(--lf-accent); font-size: 13px; }
.lf-research-one { border-top: 1px solid var(--lf-line); padding-top: 12px; }
/* healthy bands on programme rows (assay 1.8 / 1.9, notes §2.4): neutral greys, captions under the track */
.lf-band-caps { display: flex; flex-direction: column; gap: 1px; font-size: 11.5px; color: var(--lf-muted); line-height: 1.4; }
.lf-band-note { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--lf-line); font-size: 11.5px; line-height: 1.5; color: var(--lf-muted); }
/* band legend (2026-10-28): the band's colour in front of its name and numbers; the two dots named with their values */
.lf-band-legend { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 12px; line-height: 1.4; color: var(--lf-muted); }
.lf-band-legend li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.lf-band-legend b { color: var(--lf-ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.lf-band-legend em { font-style: normal; }
.lf-band-swatch { flex: none; width: 18px; height: 9px; border-radius: 3px; align-self: center; }
.lf-band-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; align-self: center; margin: 0 4px; box-sizing: border-box; }
.lf-band-dot.is-now { background: var(--lf-accent); }
.lf-band-dot.is-prev { background: #fff; border: 2px solid var(--lf-ink); }

/* ── Report 3.9 (2026-11-04): plain tables for the carrier summary, the blood groups and the partner list ── */
.lf-table { border-collapse: collapse; width: 100%; font-size: 13px; line-height: 1.4; color: var(--lf-body); }
.lf-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--lf-muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--lf-line); }
.lf-table td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--lf-line); vertical-align: top; }
.lf-table td.num, .lf-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.lf-table tr:last-child td { border-bottom: 0; }
.lf-table-wrap { overflow-x: auto; }
.lf-table .lf-cell-sub { display: block; font-size: 12px; color: var(--lf-muted); margin-top: 2px; }
.lf-conf { font-size: 11px; color: var(--lf-muted); white-space: nowrap; }
.lf-apoe-choice { display: flex; flex-direction: column; gap: 10px; }
.lf-plain-text { font-size: 15px; line-height: 1.6; color: var(--lf-body); }
