/* FollowThrough Health: editorial design system (Nov 2026 rebuild).
   Loaded last. Light serif display type, warm ivory paper, terracotta for action and emphasis,
   teal kept only for the brand mark and "within range" status. Flat surfaces, fine borders, few shadows.
   Homepage sections use their own fh-* classes; the old lp-* layers were removed, not overridden.
   Documented in docs/function-style-complete-redesign.md. */

:root {
  --fh-paper: #FAF6EE;
  --fh-cream: #F3EDE2;
  --fh-white: #FFFDF8;
  --fh-ink: #292929;
  --fh-ink-2: #4A4743;      /* 8.4:1 on paper */
  --fh-ink-3: #66625C;      /* 5.6:1 on paper */
  --fh-line: #E6DDCE;
  --fh-line-strong: #D6C9B4;
  --fh-terracotta: #B85C38; /* accents and large type only */
  --fh-accent: #A14E2E;     /* text and buttons: 5.6:1 with white, 5.3:1 on paper */
  --fh-accent-dark: #8A4126;
  --fh-accent-soft: #F4E4D8;
  --fh-teal: #0F766E;
  --fh-serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --fh-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --fh-radius: 16px;
  --fh-radius-lg: 24px;
  --fh-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fh-section: clamp(64px, 8vw, 120px);

  /* The app's own tokens move to the same warm paper so every screen is one product. */
  --ft-bg: var(--fh-paper);
  --ft-surface: var(--fh-white);
  --ft-surface-2: var(--fh-cream);
  --ft-ink: var(--fh-ink);
  --ft-ink-2: var(--fh-ink-2);
  --ft-ink-3: var(--fh-ink-3);
  --ft-line: var(--fh-line);
  --ft-line-strong: var(--fh-line-strong);
  --ft-ivory: var(--fh-cream);
  --ft-serif: var(--fh-serif);
  --ft-shadow-md: 0 1px 2px rgba(41, 41, 41, 0.04), 0 10px 30px rgba(41, 41, 41, 0.05);

  /* One action colour. The app's older layers drew links, focus rings, toggles and icons in teal
     while buttons were terracotta, so two accents competed on every screen. Remapping the tokens
     here fixes every use at once. Teal stays only in the brand mark and "within range" status. */
  --ft-brand: var(--fh-accent);
  --ft-brand-strong: var(--fh-accent-dark);
  --ft-brand-soft: var(--fh-accent-soft);
  --ft-surface-brand: var(--fh-cream);
  --ft-on-brand: #FFFDF8;
  --ft-focus: 0 0 0 3px rgba(161, 78, 46, 0.32);
  --lp-teal: var(--fh-accent);
}

/* ---------- Type ---------- */
.fh-display, .fh-h2, .workspace > .panel h3 {
  font-family: var(--fh-serif) !important;
  font-weight: 300 !important;
  letter-spacing: -0.012em !important;
  color: var(--fh-ink);
  font-optical-sizing: auto;
}
.fh-display { margin: 0; font-size: clamp(2.9rem, 6.4vw, 5.6rem); line-height: 0.98; }
.fh-h2 { margin: 0; font-size: clamp(2.3rem, 4.8vw, 4.1rem); line-height: 1.04; text-wrap: balance; }
.fh-display em, .fh-h2 em { color: var(--fh-terracotta); font-style: italic; font-weight: 300; }
/* Smaller italic text uses the darker accent so it keeps 4.5:1 contrast. */
.fh-footer-line em { color: var(--fh-accent); font-style: italic; font-weight: 300; }
.fh-eyebrow { margin: 0 0 18px; color: var(--fh-accent); font-family: var(--fh-mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; }
.fh-mono { font-family: var(--fh-mono); font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--fh-ink-3); }
.fh-lede { margin: 22px 0 0; max-width: 34em; color: var(--fh-ink-2); font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.55; }
.fh-sub { margin: 18px auto 0; max-width: 40em; color: var(--fh-ink-2); font-size: 1.05rem; line-height: 1.6; }
.fh-fine { margin: 20px auto 0; max-width: 46em; color: var(--fh-ink-3); font-size: 0.86rem; line-height: 1.55; }
.fh-fine a, .fh-links a { color: var(--fh-accent); text-underline-offset: 3px; }
.fh-center { text-align: center; margin-inline: auto; }

/* ---------- Buttons ---------- */
.fh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--ft-font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 180ms var(--fh-ease), border-color 180ms var(--fh-ease), color 180ms var(--fh-ease), transform 180ms var(--fh-ease);
}
.fh-btn:active { transform: scale(0.98); }
.fh-btn-primary, .workspace .fh-btn-primary { background: var(--fh-accent); color: #fff !important; }
.fh-btn-primary:hover { background: var(--fh-accent-dark); }
.fh-btn-outline, .workspace .fh-btn-outline { background: transparent; border-color: var(--fh-accent); color: var(--fh-accent) !important; }
.fh-btn-outline:hover { background: var(--fh-accent-soft); }
.fh-btn:focus-visible, .fh-link-button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(161, 78, 46, 0.35); }
.fh-link-button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-top: 18px; padding: 0; border: 0; background: none; color: var(--fh-accent); font: 600 0.98rem var(--ft-font); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.fh-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fh-actions.fh-center { justify-content: center; }

/* ---------- Header ---------- */
body { background: var(--fh-paper) !important; color: var(--fh-ink); }
.topbar.site-nav { background: rgba(250, 246, 238, 0.94) !important; border: 0 !important; border-bottom: 1px solid var(--fh-line) !important; border-radius: 0 !important; box-shadow: none !important; }
/* Blur only on wide screens: on phones a backdrop-filter would make the header the containing block
   for the fixed bottom tab bar inside it, pinning the tab bar to the top. */
@media (min-width: 721px) { .topbar.site-nav { backdrop-filter: saturate(1.2) blur(10px); } }
@media (max-width: 720px) { .topbar.site-nav { background: rgba(250, 246, 238, 0.97) !important; } }
.site-nav .brand-text strong { font-weight: 600; letter-spacing: -0.01em; color: var(--fh-ink); }
.fh-site-links { display: none; gap: 4px; margin: 0 auto; }
.fh-site-links a { padding: 10px 12px; color: var(--fh-ink-2); font-size: 0.95rem; text-decoration: none; }
.fh-site-links a:hover { color: var(--fh-ink); text-decoration: underline; text-underline-offset: 5px; }
.nav-cta, .workspace .nav-cta { background: var(--fh-ink) !important; color: var(--fh-paper) !important; border-radius: 6px !important; }
.nav-cta:hover { background: var(--fh-accent) !important; }
.nav-signin { color: var(--fh-ink) !important; }
.site-nav .quick-nav.patient-nav { background: var(--fh-cream); }
@media (min-width: 1081px) {
  body[data-active-workspace="home-title"] .fh-site-links, body:not([data-active-workspace]) .fh-site-links { display: flex; }
  body[data-active-workspace="home-title"] .site-nav .quick-nav.patient-nav, body:not([data-active-workspace]) .site-nav .quick-nav.patient-nav { display: none; }
}

/* Tablet widths: the tab bar already has Account, so the header drops its duplicate "Sign in" link
   and stays on one line instead of wrapping the button under it. */
@media (min-width: 721px) and (max-width: 1080px) {
  .site-nav .nav-signin { display: none !important; }
  .site-nav .topbar-actions { flex-wrap: nowrap; }
}

/* Phones: the header keeps the brand only. The "Understand my report" button would be cut to
   "Understand"; the same action is the hero's first button and the Upload tab in the bottom bar. */
@media (max-width: 720px) {
  .site-nav .nav-cta { display: none !important; }
}

/* Tablets: a wider side margin than phones (16px felt cramped at 768-1024). */
@media (min-width: 721px) and (max-width: 1279px) {
  main.app-shell { padding-left: 32px !important; padding-right: 32px !important; }
}

/* ---------- Homepage: "read it together" (13 Nov rebuild) ----------
   The page is set like a printed letter, not a SaaS template: left-aligned text, a margin label for
   each part, hairline rules between parts, no card grids, no comparison ribbon, no looping motion.
   The hero is a lab report on paper with the notes FollowThrough Health would give for it, drawn as
   pen marks. The marks are placed from the real table cells by story.js, so a circle can never land
   on the wrong number. */
.landing { --ed-hand: "Caveat", "Bradley Hand", "Segoe Print", cursive; --ed-pen: #A8432A; }
.app-shell .landing h1, .app-shell .landing h2, .app-shell .landing h3 { letter-spacing: 0 !important; }

/* Hero */
.ed-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding: clamp(40px, 6vw, 88px) 0 clamp(56px, 7vw, 96px); }
.app-shell .landing .ed-display { margin: 0; font: 400 clamp(2.4rem, 4.6vw, 3.8rem)/1.08 var(--fh-serif) !important; color: var(--fh-ink); text-wrap: balance; }
.ed-lede { margin: 26px 0 0; max-width: 31em; color: var(--fh-ink-2); font-size: clamp(1.05rem, 1.4vw, 1.15rem); line-height: 1.6; }
.ed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 34px; }
.ed-btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: 6px; background: var(--fh-ink); color: var(--fh-paper) !important; font: 600 1rem var(--ft-font); cursor: pointer; transition: background 150ms; }
.ed-btn:hover { background: var(--fh-accent); }
.ed-btn:focus-within { outline: 3px solid var(--fh-accent); outline-offset: 3px; }
.ed-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.ed-btn.is-dragging, .ed-btn.drag-over { box-shadow: 0 0 0 4px rgba(161, 78, 46, 0.25); }
.ed-link, .ed-link-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--fh-accent) !important; font: 600 1rem var(--ft-font); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; cursor: pointer; }
.ed-link:hover, .ed-link-button:hover { text-decoration-thickness: 2px; }
.ed-link:focus-visible, .ed-link-button:focus-visible { outline: 2px solid var(--fh-accent); outline-offset: 4px; border-radius: 2px; }
.ed-note { margin: 18px 0 0; max-width: 34em; color: var(--fh-ink-3); font-size: 0.9rem; line-height: 1.55; }
.ed-hero .fh-data-use { margin-top: 14px; }
.app-shell .landing .ed-hero .fh-data-use summary { min-height: 44px; display: inline-flex; align-items: center; justify-content: flex-start !important; width: auto !important; text-align: left !important; color: var(--fh-accent); font-weight: 600; font-size: 0.92rem; cursor: pointer; }
.ed-hero .fh-data-use ul { margin: 8px 0 0; padding-left: 18px; color: var(--fh-ink-2); font-size: 0.92rem; line-height: 1.55; }
.ed-hero .fh-data-use p { font-size: 0.9rem; }

/* The report sheet and the pen */
.ed-sheet-wrap { position: relative; margin: 0; padding: 12px 210px 0 0; }
.ed-sheet { position: relative; padding: 24px 26px 26px; border: 1px solid #E6DECF; background: #FFFEFA; box-shadow: 0 1px 0 #E6DECF, 0 22px 40px -22px rgba(70, 45, 20, 0.3); transform: rotate(-1deg); font: 400 0.8rem/1.5 var(--fh-mono); color: #3A3833; }
.ed-sheet header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #DDD4C4; }
.app-shell .landing .ed-sheet header b { font: 600 0.8rem var(--ft-font) !important; letter-spacing: 0.04em !important; text-transform: uppercase; color: #3A3833; }
.ed-sheet header span { color: #6B665F; }
.ed-sheet table { width: 100%; border-collapse: collapse; }
.app-shell .landing .ed-sheet th { padding: 8px 4px; text-align: left; font: 400 0.66rem var(--fh-mono) !important; letter-spacing: 0.08em !important; text-transform: uppercase; color: #6B665F; }
.ed-sheet td { padding: 9px 4px; border-top: 1px dotted #D6CCBA; white-space: nowrap; }
.ed-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.ed-ink path { fill: none; stroke: var(--ed-pen); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-ink text { fill: var(--ed-pen); font: 600 20px var(--ed-hand); }
.ed-hand { font: 600 1.4rem/1.1 var(--ed-hand); color: var(--ed-pen); }
.ed-notes { margin: 0; padding: 0; list-style: none; }
.ed-notes li { position: absolute; width: 190px; margin: 0; transform: rotate(-2deg); }
.ed-ask { margin: 22px 0 0 8px; max-width: 30em; transform: rotate(-1deg); }
.ed-caption { margin: 14px 0 0 8px; color: var(--fh-ink-3); font-size: 0.84rem; }

/* Parts: a margin label on the left, the content on the right, a hairline between parts */
.ed-part { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px 48px; padding: clamp(56px, 7vw, 88px) 0; border-top: 1px solid var(--fh-line); }
.app-shell .landing .ed-label { margin: 0; padding-top: 12px; font: 500 0.76rem/1.4 var(--fh-mono) !important; letter-spacing: 0.07em; text-transform: uppercase; color: var(--fh-ink-3); }
.app-shell .landing .ed-h2 { margin: 0 0 20px; max-width: 22em; font: 400 clamp(1.8rem, 3vw, 2.45rem)/1.15 var(--fh-serif) !important; color: var(--fh-ink); text-wrap: balance; }
.ed-body { margin: 0; max-width: 38em; color: var(--fh-ink-2); line-height: 1.65; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 28px; margin: 28px 0 0; }
.ed-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin: 36px 0 0; padding: 0; list-style: none; }
.ed-steps li { padding-top: 16px; border-top: 2px solid var(--fh-ink); }
.app-shell .landing .ed-steps b { display: block; margin-bottom: 12px; font: 400 2.2rem/1 var(--fh-serif) !important; color: var(--fh-accent); }
.app-shell .landing .ed-steps h3 { margin: 0 0 6px; font: 600 1rem/1.4 var(--ft-font) !important; color: var(--fh-ink); }
.ed-steps p { margin: 0; color: var(--fh-ink-2); font-size: 0.98rem; line-height: 1.6; }
.ed-sign { margin-top: 14px !important; font: 600 1.7rem var(--ed-hand) !important; color: var(--ed-pen) !important; }

/* What it reads: a plain index, not cards */
.fh-areas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; margin-top: 28px; }
.fh-area { padding: 18px 0; border-top: 1px solid var(--fh-line); }
.app-shell .landing .fh-area h3 { margin: 0 0 8px; font: 600 0.95rem var(--ft-font) !important; color: var(--fh-ink); }
.fh-area ul { margin: 0; padding: 0; list-style: none; color: var(--fh-ink-2); font-size: 0.95rem; line-height: 1.75; }
.fh-area-more p { margin: 0 0 6px; color: var(--fh-ink-2); font-size: 0.95rem; line-height: 1.6; }
.app-shell .landing .fh-more { font: 600 0.95rem var(--ft-font) !important; color: var(--fh-ink) !important; }
.fh-area-more .fh-btn { min-height: 44px; padding: 0; border: 0; background: none; color: var(--fh-accent) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 5px; }

/* Guide: the chat is the point; the mark stays small and quiet */
/* AI Health Guide (rebuilt 19 Nov, owner priority 4: "less decorative, more useful"). The chat is the
   main object, as a card; the abstract mark is a small header icon that shows the guide's state, and
   what it can and won't do is said plainly beside it. */
#guide .guide-scope { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; margin-top: 8px; }
.app-shell .landing #guide .guide-scope h3 { margin: 0 0 10px; color: var(--fh-ink); font: 600 0.95rem var(--ft-font, system-ui) !important; }
#guide .guide-card { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--fh-line); border-radius: 22px; background: var(--fh-white); box-shadow: 0 24px 48px -36px rgba(80, 52, 28, 0.35); }
#guide .guide-avatar { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "mark who" "label label"; align-items: center; gap: 4px 14px; padding: 18px 22px 14px; border-bottom: 1px solid var(--fh-line); background: var(--fh-paper); }
#guide .guide-figure { grid-area: mark; display: block; width: 52px; height: 52px; overflow: visible; }
#guide .guide-who { grid-area: who; min-width: 0; }
#guide .guide-name { margin: 0; color: var(--fh-ink); font: 400 1.25rem/1.2 var(--fh-serif); }
#guide .guide-state { margin: 2px 0 0; color: var(--fh-ink-3); font: 0.78rem var(--fh-mono); }
#guide .guide-label { grid-area: label; margin: 8px 0 0; color: var(--fh-ink-3); font-size: 0.82rem; }
#guide .guide-figure :is(.guide-body, .guide-ring, .guide-ripple, .guide-orbit, .guide-spark, .guide-halo) { transform-box: view-box; transform-origin: 160px 160px; }
#guide .guide-ring { opacity: 0.5; transition: opacity 400ms var(--fh-ease); }
#guide .guide-ripple { opacity: 0; }
#guide .guide-body { transition: transform 500ms var(--fh-ease), filter 400ms var(--fh-ease); }
#guide .guide-avatar.is-thinking .guide-body { animation: fh-breathe 1.8s ease-in-out infinite; }
#guide .guide-avatar.is-thinking .guide-orbit { animation: fh-orbit 2.4s linear infinite; }
#guide .guide-avatar.is-speaking .guide-ripple { animation: fh-ripple 1.6s var(--fh-ease) infinite; }
#guide .guide-avatar.is-reading .guide-body { animation: fh-breathe 1.2s ease-in-out infinite; }
#guide .guide-avatar:is(.is-error, .is-offline) .guide-body { filter: grayscale(0.85) opacity(0.7); }
#guide .guide-avatar.is-offline .guide-spark { opacity: 0; }
#guide .guide-chat { display: grid; gap: 14px; padding: 18px 22px 20px; }
#guide .guide-log { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; }
#guide .guide-msg { max-width: 92%; }
#guide .guide-msg p { margin: 0; padding: 10px 14px; border-radius: 14px; line-height: 1.55; }
#guide .guide-msg-guide p { background: var(--fh-cream); color: var(--fh-ink); border-bottom-left-radius: 4px; }
#guide .guide-msg-you { justify-self: end; }
#guide .guide-msg-you p { background: var(--fh-accent); color: #fff !important; border-bottom-right-radius: 4px; }
#guide .guide-msg.guide-urgent > p { background: #FBEAE7; color: #7a1b12 !important; }
#guide .guide-typing { display: inline-flex; gap: 5px; }
#guide .guide-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--fh-terracotta); animation: fh-dot 1s ease-in-out infinite; }
#guide .guide-typing span:nth-child(2) { animation-delay: 150ms; } #guide .guide-typing span:nth-child(3) { animation-delay: 300ms; }
#guide .guide-tools { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 0.86rem; }
#guide .guide-tools button { min-height: 36px; padding: 0 12px; border: 1px solid var(--fh-line-strong); border-radius: 999px; background: var(--fh-white); color: var(--fh-ink); cursor: pointer; }
#guide .guide-tools a { align-self: center; color: var(--fh-accent); }
#guide .guide-source { margin: 6px 0 0 !important; color: var(--fh-ink-3); font-size: 0.8rem; }
#guide .guide-chips { display: flex; flex-wrap: wrap; gap: 8px; }
#guide .guide-chips button { min-height: 40px; padding: 8px 14px; border: 1px solid var(--fh-line-strong); border-radius: 999px; background: var(--fh-white); color: var(--fh-ink); font: inherit; font-size: 0.9rem; cursor: pointer; }
#guide .guide-chips button:hover { border-color: var(--fh-accent); color: var(--fh-accent); }
#guide .guide-form { display: flex; gap: 10px; }
#guide .guide-form input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border: 1px solid var(--fh-line-strong); border-radius: 12px; background: #fff; color: var(--fh-ink); font: inherit; }
#guide .guide-form input:focus-visible, #guide .guide-chips button:focus-visible, #guide .guide-form .fh-btn:focus-visible { outline: 3px solid rgba(161, 78, 46, 0.4); outline-offset: 2px; }
#guide .guide-form .fh-btn { min-height: 50px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--fh-accent); color: #fff; font-weight: 600; cursor: pointer; }
#guide .guide-form .fh-btn:hover { background: var(--fh-accent-dark); }
#guide .guide-share { display: flex; gap: 8px; align-items: center; color: var(--fh-ink-2); font-size: 0.9rem; }
#guide .guide-fine { margin: 0; color: var(--fh-ink-3); font-size: 0.8rem; line-height: 1.5; }

/* Will / won't / your data */
.ed-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 28px; }
.app-shell .landing .ed-cols h3 { margin: 0 0 6px; font: 600 0.95rem var(--ft-font) !important; color: var(--fh-ink); }
.ed-cols ul { margin: 0; padding: 0; list-style: none; }
.ed-cols li { padding: 10px 0; border-top: 1px solid var(--fh-line); color: var(--fh-ink-2); line-height: 1.5; }

/* Clinics */
.ed-clinic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: start; }
.fh-doctors-video { margin: 0; }
.fh-doctors-video video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--fh-line-strong); border-radius: 6px; background: #1d1b19; }
.fh-doctors-video figcaption { margin-top: 10px; color: var(--fh-ink-3); font-size: 0.85rem; }

/* Pricing: a typeset table */
.ed-price { width: 100%; max-width: 880px; border-collapse: collapse; }
.ed-price :is(th, td) { padding: 18px 20px 18px 0; border-top: 1px solid var(--fh-line); vertical-align: baseline; text-align: left; color: var(--fh-ink-2); line-height: 1.55; }
.ed-price tr:last-child :is(th, td) { border-bottom: 1px solid var(--fh-line); }
.app-shell .landing .ed-price th { width: 18%; font: 400 1.45rem var(--fh-serif) !important; color: var(--fh-ink); }
.ed-price .ed-amount { width: 16%; font: 400 1.45rem var(--fh-serif); color: var(--fh-ink); white-space: nowrap; }
.ed-price .ed-amount small { font: 400 0.82rem var(--ft-font); color: var(--fh-ink-3); }
.ed-price td:last-child { width: 14%; padding-right: 0; white-space: nowrap; }

/* Questions: a ruled list; one answer open at a time (story.js) */
#faq .faq-list { display: grid; max-width: 820px; }
#faq .faq-item { border-top: 1px solid var(--fh-line); }
#faq .faq-item:last-child { border-bottom: 1px solid var(--fh-line); }
#faq .faq-item h3 { margin: 0; }
.app-shell .landing #faq .faq-item button { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 58px; padding: 12px 0; border: 0; background: none; color: var(--fh-ink); font: 600 1.02rem var(--ft-font) !important; text-align: left; cursor: pointer; }
#faq .faq-item button:hover { color: var(--fh-accent); }
#faq .faq-item button:focus-visible { outline: 2px solid var(--fh-accent); outline-offset: 2px; }
#faq .faq-icon { position: relative; flex: 0 0 auto; width: 14px; height: 14px; }
#faq .faq-icon::before, #faq .faq-icon::after { content: ""; position: absolute; left: 0; top: 6.25px; width: 14px; height: 1.5px; background: currentColor; transition: transform 200ms var(--fh-ease); }
#faq .faq-icon::after { transform: rotate(90deg); }
#faq .faq-item.is-open .faq-icon::after { transform: rotate(0deg); }
#faq .faq-answer { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 250ms var(--fh-ease); }
#faq .faq-item.is-open .faq-answer { grid-template-rows: 1fr; }
#faq .faq-answer > div { overflow: hidden; visibility: hidden; transition: visibility 0s 250ms; }
#faq .faq-item.is-open .faq-answer > div { visibility: visible; transition: visibility 0s; }
#faq .faq-answer p { margin: 0; padding: 0 0 20px; max-width: 44em; color: var(--fh-ink-2); line-height: 1.65; }
#faq .faq-more { margin: 24px 0 0; color: var(--fh-ink-2); line-height: 1.7; }
#faq .faq-more a { color: var(--fh-accent); font-weight: 600; text-underline-offset: 3px; }

/* Footer: plain, ruled, no floating card */
.fh-footer { padding: 0 0 32px; border-top: 1px solid var(--fh-line); }
.fh-footer-card { padding: 48px 0 0; }
.fh-footer-brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.app-shell .landing .fh-footer-brand span { font: 400 1.3rem var(--fh-serif) !important; color: var(--fh-ink); }
.fh-footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; margin-top: 32px; }
.fh-footer-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.app-shell .fh-footer .fh-footer-cols h2 { margin: 0 0 12px; font: 600 0.86rem var(--ft-font) !important; letter-spacing: 0 !important; color: var(--fh-ink) !important; }
.fh-footer-cols ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.fh-footer-cols a { display: inline-flex; align-items: center; min-height: 32px; color: var(--fh-ink-2); text-decoration: none; }
.fh-footer-cols a:hover { color: var(--fh-accent); text-decoration: underline; text-underline-offset: 4px; }
.app-shell .landing .fh-footer-line { margin: 0; font: 400 1.2rem/1.4 var(--fh-serif) !important; color: var(--fh-ink); }
.fh-footer-line em { font-style: normal; color: inherit; }
.fh-footer-apps { margin: 14px 0 0; color: var(--fh-ink-3); font-size: 0.9rem; }
.fh-footer-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 22px; }
.fh-footer-legal a { display: inline-flex; align-items: center; min-height: 28px; color: var(--fh-ink-3); font-size: 0.8rem; text-decoration: none; }
.fh-footer-legal a:hover { color: var(--fh-accent); text-decoration: underline; }
.fh-footer-fine { margin: 28px 0 0; color: var(--fh-ink-3); font-size: 0.78rem; line-height: 1.55; }

/* Returning visitors' dashboard (rebuilt again 18 Nov). Main column: welcome, four next steps and
   the latest saved report (or a ready state). Side column: a picture panel holding the next step,
   questions, and a privacy note. Sample reports are never shown here.
   Phones: welcome, next steps (upload first), report, then the side column. */
.app-shell .landing .ft-dash { display: block; margin: 0 !important; padding: clamp(28px, 4vw, 56px) 0 clamp(40px, 5vw, 64px) !important; border: 0 !important; border-bottom: 1px solid var(--fh-line) !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; }
.app-shell .landing .ft-dash[hidden] { display: none; }
.fd { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); grid-template-areas: "head side" "tiles side" "report side"; grid-template-rows: auto auto 1fr; gap: 24px clamp(24px, 3vw, 44px); align-items: start; }
.fd-head { grid-area: head; min-width: 0; }
.fd-tiles { grid-area: tiles; min-width: 0; }
.fd-report { grid-area: report; min-width: 0; }
.fd-side { grid-area: side; display: grid; gap: 16px; min-width: 0; }
.fd-eyebrow, .fd-kicker, .fd-next-kicker { margin: 0 0 8px; color: var(--fh-accent); font: 500 0.74rem var(--fh-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.app-shell .landing .fd-title { margin: 0 0 10px !important; font: 400 clamp(2.6rem, 5vw, 4rem)/1 var(--fh-serif) !important; letter-spacing: -0.03em; color: var(--fh-ink) !important; }
.fd-title em { color: var(--fh-terracotta); font-style: italic; font-weight: 300; }
.fd-lede { margin: 0; max-width: 46ch; color: var(--fh-ink-2); font-size: 1.08rem; line-height: 1.55; }
.fd-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Next steps: four quiet tiles, the first filled */
.fd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.app-shell .landing .fd-tile { display: grid; align-content: start; gap: 14px; min-height: 128px; padding: 16px; border: 1px solid var(--fh-line); border-radius: 16px; background: var(--fh-white); color: var(--fh-ink) !important; text-decoration: none !important; transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease; }
.fd-tile .fd-icon { color: var(--fh-accent); }
.fd-tile b { display: block; font: 600 0.98rem/1.25 var(--ft-font, system-ui); }
.fd-tile small { display: block; margin-top: 4px; color: var(--fh-ink-3); font-size: 0.84rem; line-height: 1.4; }
.app-shell .landing .fd-tile:hover { border-color: var(--fh-accent); transform: translateY(-2px); }
.app-shell .landing .fd-tile-main { background: var(--fh-accent); border-color: var(--fh-accent); color: #fff !important; }
.fd-tile-main .fd-icon, .fd-tile-main small { color: rgba(255, 255, 255, 0.92); }
.app-shell .landing .fd-tile-main:hover { background: var(--fh-accent-dark); }
.app-shell .landing .fd-tile:focus-visible, .app-shell .landing .fd-btn:focus-visible, .fd-inline:focus-visible, .fd-more-q summary:focus-visible { outline: 3px solid rgba(161, 78, 46, 0.45); outline-offset: 2px; }

/* Buttons and links */
.app-shell .landing .fd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--fh-accent); border-radius: 10px; font: 600 1rem var(--ft-font, system-ui) !important; text-decoration: none !important; cursor: pointer; }
.app-shell .landing .fd-btn-primary { background: var(--fh-accent) !important; color: #fff !important; }
.app-shell .landing .fd-btn-primary:hover { background: var(--fh-accent-dark) !important; }
.fd-link { display: inline-flex; align-items: center; min-height: 40px; color: var(--fh-accent) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.app-shell .landing .fd-inline { min-height: 32px; padding: 0 !important; border: 0 !important; background: none !important; color: var(--fh-accent) !important; font: inherit !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* The latest report */
.fd-report { display: grid; gap: 22px; padding: clamp(22px, 3vw, 30px); border: 1px solid var(--fh-line); border-radius: 22px; background: var(--fh-white); box-shadow: 0 24px 48px -36px rgba(80, 52, 28, 0.35); }
.fd-report-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 20px; padding-bottom: 18px; border-bottom: 1px solid var(--fh-line); }
.app-shell .landing .fd-report h3 { margin: 0 0 4px; font: 400 clamp(1.5rem, 2.4vw, 1.9rem)/1.15 var(--fh-serif) !important; color: var(--fh-ink) !important; }
.fd-report-head p:not(.fd-kicker) { margin: 0; color: var(--fh-ink-3); font-size: 0.92rem; }
.fd-status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font: 600 0.88rem var(--ft-font, system-ui); }
.fd-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.fd-status-out { background: var(--fh-accent-soft); color: var(--fh-accent-dark); }
.fd-status-in { background: #E1EFEC; color: var(--fh-teal); }
.fd-status-saved { background: var(--fh-cream); color: var(--fh-ink-2); }
.fd-stats { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "total bar" "total legend"; align-items: center; gap: 10px 28px; }
.fd-total { grid-area: total; margin: 0; color: var(--fh-ink-2); }
.fd-total b { display: block; color: var(--fh-ink); font: 400 clamp(3.2rem, 6vw, 4.4rem)/0.95 var(--fh-serif); letter-spacing: -0.03em; }
.fd-bar { grid-area: bar; display: flex; gap: 4px; height: 14px; }
.fd-bar i { display: block; height: 100%; border-radius: 7px; }
.fd-bar-in, .fd-dot-in { background: #6FA285; }
.fd-bar-out, .fd-dot-out { background: #C8734F; }
.fd-bar-none, .fd-dot-none { background: var(--fh-line-strong); }
.fd-legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 0; padding: 0; list-style: none; color: var(--fh-ink-2); font-size: 0.92rem; }
.fd-legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.fd-legend b { color: var(--fh-ink); font-variant-numeric: tabular-nums; }
.fd-dot { width: 10px; height: 10px; border-radius: 50%; }
.fd-areas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; margin: 0; padding: 0; list-style: none; }
.fd-areas li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 !important; padding: 10px 0 !important; border: 0 !important; border-top: 1px solid var(--fh-line) !important; background: none !important; }
.fd-areas b { color: var(--fh-ink); font-size: 0.95rem; font-weight: 500; }
.fd-areas span { flex: none; color: var(--fh-ink-3); font-size: 0.86rem; }
.fd-areas .fd-area-out span { color: var(--fh-accent-dark); font-weight: 600; }
.app-shell .landing .fd-out h4 { margin: 0 0 8px; color: var(--fh-ink); font: 600 0.95rem var(--ft-font, system-ui) !important; }
.fd-out ul { margin: 0; padding: 0; list-style: none; }
.fd-out li { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "range label"; align-items: baseline; gap: 4px 16px; margin: 0 !important; padding: 12px 0 !important; border: 0 !important; border-top: 1px solid var(--fh-line) !important; background: none !important; }
.fd-out-name { grid-area: name; color: var(--fh-ink); font-weight: 600; }
.fd-out-value { grid-area: value; justify-self: end; color: var(--fh-ink); font: 400 1.2rem var(--fh-serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fd-out-range { grid-area: range; color: var(--fh-ink-3); font-size: 0.88rem; }
.fd-out-label { grid-area: label; justify-self: end; padding: 2px 10px; border-radius: 999px; background: var(--fh-accent-soft); color: var(--fh-accent-dark); font-size: 0.8rem; font-weight: 600; text-align: right; }
.fd-more { margin: 8px 0 0; color: var(--fh-ink-3); font-size: 0.9rem; }
.fd-legacy p { margin: 0; }
.fd-legacy-count { color: var(--fh-ink); font: 400 clamp(1.4rem, 2.4vw, 1.75rem)/1.25 var(--fh-serif); }
.fd-legacy-note { margin-top: 14px !important; padding: 14px 16px; border-radius: 12px; background: var(--fh-paper); color: var(--fh-ink-2); font-size: 0.95rem; line-height: 1.55; }
.fd-report-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding-top: 18px; border-top: 1px solid var(--fh-line); }
.fd-report-foot > span { color: var(--fh-ink-3); font-size: 0.88rem; }

/* Ready state: no report saved yet, nothing made up */
.fd-ready { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--fh-white) 0%, var(--fh-white) 55%, #F3EBDD 100%); }
.fd-ready-mark { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--fh-accent-soft); color: var(--fh-accent); }
.fd-ready-mark .fd-icon { width: 26px; height: 26px; }
.fd-ready .fd-kicker { margin-top: 4px; }
.app-shell .landing .fd-ready h3 { font-size: clamp(1.8rem, 3vw, 2.4rem) !important; letter-spacing: -0.02em; }
.fd-ready-lede { margin: 0; max-width: 48ch; color: var(--fh-ink-2); font-size: 1.04rem; line-height: 1.55; }
.fd-ready-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fd-ready-list li { position: relative; margin: 0 !important; padding: 0 0 0 30px !important; border: 0 !important; background: none !important; color: var(--fh-ink); }
.fd-ready-list li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border: 1.5px solid var(--fh-teal); border-radius: 50%; }

/* Side: picture panel with the next step, questions, privacy */
.fd-media { position: relative; margin: 0; }
.fd-media .fx-photo { aspect-ratio: 4 / 5; border-radius: 22px; }
.app-shell .landing .fd-media .fd-media-art { display: flex; align-items: stretch; flex-direction: column; justify-content: flex-end; min-height: clamp(300px, 26vw, 380px); padding: 22px; border-radius: 22px; }
.app-shell .landing .fd-media .fd-media-art::before { background: radial-gradient(120% 90% at 20% 10%, #F6DCC4 0%, transparent 55%), radial-gradient(90% 80% at 90% 90%, #3F6F68 0%, transparent 60%), linear-gradient(160deg, #E9B494, #6E5A4A); }
.fd-next { width: 100%; padding: 18px 20px; border: 1px solid rgba(255, 255, 255, 0.55); border-radius: 18px; background: rgba(255, 253, 248, 0.9); backdrop-filter: blur(12px); }
.fd-next p { margin: 0; }
.fd-next-title { color: var(--fh-ink); font: 400 1.35rem/1.25 var(--fh-serif); }
.fd-next-when { margin-top: 4px !important; color: var(--fh-ink-2); }
.fd-panel { padding: 20px 22px; border: 1px solid var(--fh-line); border-radius: 18px; background: var(--fh-white); }
.app-shell .landing .fd-panel h3 { margin: 0 0 4px; font: 400 1.3rem/1.2 var(--fh-serif) !important; color: var(--fh-ink) !important; }
.fd-panel-note { margin: 0 0 12px; color: var(--fh-ink-3); font-size: 0.86rem; }
.fd-questions ol { display: grid; gap: 10px; margin: 0; padding-left: 1.6em; color: var(--fh-ink); font: 400 1.02rem/1.45 var(--fh-serif); }
.fd-questions li { margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.fd-questions li::marker { color: var(--fh-accent); font-family: var(--fh-mono); font-size: 0.9em; }
.fd-more-q { margin-top: 8px; }
.fd-more-q summary { display: inline-flex; align-items: center; min-height: 40px; color: var(--fh-accent); font-weight: 600; cursor: pointer; }
.fd-more-q ol { margin-top: 6px; }
.fd-trust { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; background: #EEF5F3; border-color: #D3E4DF; }
.fd-trust .fd-icon { color: var(--fh-teal); margin-top: 3px; }
.fd-trust p { margin: 0 0 4px; color: var(--fh-ink-2); font-size: 0.94rem; line-height: 1.5; }
.fd-trust .fd-link { color: var(--fh-teal) !important; }

@media (max-width: 1100px) {
  .fd { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "tiles" "report" "side"; grid-template-rows: none; }
  .fd-side { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .fd-side .fd-media { grid-row: span 2; }
}
@media (max-width: 760px) {
  .fd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fd-side { grid-template-columns: minmax(0, 1fr); }
  .fd-side .fd-media { grid-row: auto; }
  .app-shell .landing .fd-media .fd-media-art { min-height: 220px; }
}
@media (max-width: 640px) {
  .fd { gap: 18px; }
  .fd-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .app-shell .landing .fd-tile { min-height: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 14px; padding: 14px 16px; }
  .fd-tile small { margin-top: 2px; }
  .fd-report { padding: 20px 18px; border-radius: 18px; }
  .fd-report-foot .fd-btn { width: 100%; }
  .fd-stats { grid-template-columns: minmax(0, 1fr); grid-template-areas: "total" "bar" "legend"; }
  .fd-areas { grid-template-columns: minmax(0, 1fr); }
  .fd-panel { padding: 18px; }
}
@media (max-width: 360px) {
  .fd-tiles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell .landing .fd-tile { transition: none; }
  .app-shell .landing .fd-tile:hover { transform: none; }
}
.fd .ft-dash-tag { margin-left: 6px; vertical-align: 2px; }
.ft-dash-tag { padding: 1px 6px; border: 1px solid currentColor; border-radius: 3px; color: var(--fh-accent); font: 500 0.62rem var(--fh-mono); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; }
/* The install button in the header: a quiet text button, not a pill */
.app-shell .site-nav .install-button { min-height: 40px; padding: 0 10px !important; border: 0 !important; border-radius: 6px !important; background: none !important; color: var(--fh-ink-2) !important; box-shadow: none !important; font-weight: 500 !important; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- App: report results (pass 3) ----------
   Same language as the homepage: light serif headings and values, thin lines instead of coloured
   stripes, one terracotta primary button, warm panels. Styling only: every value, word and order
   stays as the analysis produced it. */
/* One button language across the site (13 Nov): the main action is ink with a small radius, like the
   homepage and header; terracotta is kept for links and hover. */
.app-shell .primary-button, .app-shell .workspace .primary-button { background: var(--fh-accent) !important; color: #fff !important; box-shadow: none !important; border-radius: 10px !important; font-weight: 600 !important; }
.app-shell .primary-button:hover, .app-shell .workspace .primary-button:hover { background: var(--fh-accent-dark) !important; transform: none; }
.app-shell .site-nav .quick-nav.patient-nav a.active { background: var(--fh-white) !important; color: var(--fh-accent-dark) !important; box-shadow: 0 0 0 1px var(--fh-line) !important; }
.app-shell .primary-button { min-height: 48px; height: auto !important; padding: 12px 24px !important; line-height: 1.25 !important; }
.app-shell .secondary-button { border-color: var(--fh-line) !important; box-shadow: none !important; }
.app-shell #report-results .result-hero .section-heading-action > strong { font-family: var(--fh-serif) !important; font-weight: 300 !important; font-size: clamp(2rem, 3.4vw, 2.8rem) !important; line-height: 1.05 !important; letter-spacing: -0.01em; color: var(--fh-ink); }
.app-shell #report-results .result-hero > div > span { font-family: var(--fh-mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fh-accent); }
.app-shell #report-results :is(.result-cards, .result-doctor, .next-steps, .result-source, .result-save, .result-privacy) :is(h4, .section-heading-action > strong, .section-heading-action > h4) { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: clamp(1.45rem, 2.2vw, 1.85rem) !important; letter-spacing: -0.005em !important; color: var(--fh-ink); }
.app-shell #report-results .report-summary { border: 1px solid var(--fh-line) !important; border-left-width: 1px !important; box-shadow: none !important; background: var(--fh-white) !important; }
.app-shell #report-results .report-summary-eyebrow { font-family: var(--fh-mono); font-size: 0.72rem; letter-spacing: 0.06em; color: var(--fh-accent); }
/* Counts at the top of every report (19 Nov): labelled numbers, one bar, body areas. */
.app-shell #report-results .summary-stats { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "total bar" "total legend" "areas areas"; align-items: center; gap: 10px 24px; margin: 18px 0 16px; padding: 18px 0; border-top: 1px solid var(--fh-line); border-bottom: 1px solid var(--fh-line); }
.app-shell #report-results .summary-total { grid-area: total; margin: 0; color: var(--fh-ink-2); font-size: 0.92rem; }
.app-shell #report-results .summary-total b { display: block; color: var(--fh-ink); font: 400 clamp(2.6rem, 5vw, 3.4rem)/0.95 var(--fh-serif); letter-spacing: -0.03em; }
.app-shell #report-results .summary-bar { grid-area: bar; display: flex; gap: 4px; height: 12px; }
.app-shell #report-results .summary-bar i { display: block; height: 100%; border-radius: 6px; }
.app-shell #report-results .summary-bar-in, .app-shell #report-results .summary-dot-in { background: #6FA285; }
.app-shell #report-results .summary-bar-out, .app-shell #report-results .summary-dot-out { background: #C8734F; }
.app-shell #report-results .summary-bar-none, .app-shell #report-results .summary-dot-none { background: var(--fh-line-strong); }
.app-shell #report-results .summary-legend { grid-area: legend; display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0; padding: 0; list-style: none; color: var(--fh-ink-2); font-size: 0.9rem; }
.app-shell #report-results .summary-legend li { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; }
.app-shell #report-results .summary-legend b { color: var(--fh-ink); font-variant-numeric: tabular-nums; }
.app-shell #report-results .summary-dot { width: 10px; height: 10px; border-radius: 50%; }
.app-shell #report-results .summary-areas { grid-area: areas; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 0 24px; margin: 6px 0 0; padding: 0; list-style: none; }
.app-shell #report-results .summary-areas li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 0 !important; padding: 8px 0 !important; border: 0 !important; border-top: 1px solid var(--fh-line) !important; background: none !important; }
.app-shell #report-results .summary-areas span { color: var(--fh-ink); font-size: 0.92rem; font-weight: 500; }
.app-shell #report-results .summary-areas small { flex: none; color: var(--fh-ink-3); font-size: 0.84rem; }
.app-shell #report-results .summary-area-out small { color: var(--fh-accent-dark); font-weight: 600; }
@media (max-width: 560px) { .app-shell #report-results .summary-stats { grid-template-columns: minmax(0, 1fr); grid-template-areas: "total" "bar" "legend" "areas"; } }
.app-shell #report-results .result-card-item { border: 1px solid var(--fh-line) !important; border-left-width: 1px !important; box-shadow: none !important; background: var(--fh-white) !important; padding: 20px 22px !important; }
.app-shell #report-results .result-card-item header strong { font-weight: 500 !important; font-size: 1.05rem; }
.app-shell #report-results .result-card-item header em { font-style: normal; font-weight: 500 !important; font-size: 0.8rem; padding: 3px 10px; background: var(--fh-accent-soft); color: var(--fh-accent-dark); }
.app-shell #report-results .result-card-value { margin-top: 10px !important; }
.app-shell #report-results .result-card-value b { font-family: var(--fh-serif) !important; font-weight: 300 !important; font-size: 2.6rem; line-height: 1; letter-spacing: -0.01em; color: var(--fh-ink); }
.app-shell #report-results .result-card-unit { font-family: "DM Sans", system-ui, sans-serif; font-size: 0.9rem; color: var(--fh-ink-3); margin-left: 2px; }
.app-shell #report-results .result-card-range { font-family: var(--fh-mono); font-size: 0.76rem; letter-spacing: 0; color: var(--fh-ink-3); margin-top: 6px !important; }
.app-shell #report-results .result-card-more > summary, .app-shell #report-results .feedback-early-access, .app-shell #report-results .next-steps-more > summary, .app-shell #report-results .next-steps-more summary, .app-shell #report-results .next-steps a, .app-shell #report-results .next-steps-more summary span { color: var(--fh-accent) !important; }
.app-shell #report-results .result-card-source-line { background: var(--fh-cream) !important; font-family: var(--fh-mono); }
.app-shell #report-results .result-doctor { background: var(--fh-cream) !important; border: 1px solid var(--fh-line) !important; box-shadow: none !important; }
.app-shell #report-results .result-doctor-hint { color: var(--fh-ink-3) !important; }
.app-shell #report-results .result-doctor-questions li { color: var(--fh-ink); }
.app-shell #report-results .result-doctor-questions li::marker, .app-shell #report-results .next-steps-list li::marker { font-family: var(--fh-mono); color: var(--fh-accent); }
.app-shell #report-results :is(.result-source, .result-save, .feedback-box) { box-shadow: none !important; }
.app-shell #report-results .next-steps-list strong { font-weight: 500 !important; }
.app-shell #report-results .result-more > summary :is(strong, b, h4, h5), .app-shell #report-results .result-more > summary { font-weight: 500 !important; }
.app-shell #report-results .safety-note { background: var(--fh-cream) !important; border: 1px solid var(--fh-line) !important; color: var(--fh-ink-2); }
.app-shell #report-results .safety-note span { color: var(--fh-ink-2); }

/* ---------- App: upload (pass 4) ----------
   Styling only: the same controls, words and order. */
.app-shell .report-panel .eyebrow { font-family: var(--fh-mono); font-size: 0.72rem !important; font-weight: 400 !important; letter-spacing: 0.06em; color: var(--fh-accent) !important; }
.app-shell .report-panel .whose-chip { border-color: var(--fh-line) !important; background: var(--fh-white) !important; color: var(--fh-ink) !important; font-weight: 500 !important; }
.app-shell .report-panel .whose-chip.is-active { background: var(--fh-ink) !important; border-color: var(--fh-ink) !important; color: #fff !important; }
.app-shell .report-panel .composer-drop { background: var(--fh-white) !important; border: 1.5px dashed #CDBFA9 !important; box-shadow: none !important; }
.app-shell .report-panel .composer-drop:hover, .app-shell .report-panel .composer-drop.is-over { background: var(--fh-accent-soft) !important; border-color: var(--fh-terracotta) !important; }
.app-shell .report-panel .composer-drop strong { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.45rem; line-height: 1.2; letter-spacing: -0.005em; color: var(--fh-ink); }
.app-shell .report-panel .composer-drop small { color: var(--fh-ink-3); }
.app-shell .report-panel .composer-drop-icon { background-color: var(--fh-accent) !important; color: #fff !important; box-shadow: none !important; }
.app-shell .report-panel .hero-sample-icon { background: var(--fh-cream) !important; color: var(--fh-accent) !important; }
.app-shell .report-panel .hero-sample-icon :is(svg, path) { color: var(--fh-accent) !important; fill: currentColor; }
.app-shell .report-panel .data-use summary { color: var(--fh-accent) !important; }
.app-shell .report-panel :is(textarea, input[type="text"], input:not([type])) { background: var(--fh-white) !important; border-color: var(--fh-line) !important; }

/* ---------- App: original-report evidence (pass 5) ----------
   "All tests on your report" and "The line in your report". Styling only; values as read. */
.app-shell #report-results .lab-panel-head { background: var(--fh-cream) !important; color: var(--fh-ink-2) !important; font-family: var(--fh-mono); font-size: 0.74rem !important; letter-spacing: 0.04em; }
.app-shell #report-results .lab-panel-head > span { color: var(--fh-ink-2) !important; }
.app-shell #report-results .lab-panel-row strong { color: var(--fh-ink) !important; font-weight: 500 !important; }
.app-shell #report-results .lab-panel-row > span:nth-child(2) { font-family: var(--fh-mono); font-size: 0.86rem; color: var(--fh-ink); }
.app-shell #report-results .lab-panel-row > span:nth-child(3) { font-family: var(--fh-mono); font-size: 0.82rem; color: var(--fh-ink-3); }
.app-shell #report-results .lab-panel-row em { font-style: normal; font-weight: 500 !important; }
.app-shell #report-results .lab-filter { border-color: var(--fh-line) !important; background: var(--fh-white) !important; color: var(--fh-ink) !important; }
.app-shell #report-results .lab-filter[aria-pressed="true"] { background: var(--fh-ink) !important; border-color: var(--fh-ink) !important; color: #fff !important; }
.app-shell #report-results .lab-filter[aria-pressed="true"] span { background: rgba(255, 255, 255, 0.18) !important; color: #fff !important; }
.app-shell #report-results .result-card-source-title { color: var(--fh-accent) !important; }

/* ---------- App: history, record and reminders (pass 6) ----------
   Styling only. Shared: section labels are mono terracotta everywhere in the app. */
.app-shell .panel .eyebrow { font-family: var(--fh-mono); font-size: 0.72rem !important; font-weight: 400 !important; letter-spacing: 0.06em; color: var(--fh-accent) !important; }
.app-shell .panel .status-line { color: var(--fh-ink-2) !important; }
.app-shell .v1-history-list .history-item-head > strong { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.35rem; color: var(--fh-ink) !important; }
.app-shell .v1-history-list strong { color: var(--fh-ink) !important; }
.app-shell .v1-history-list p strong { font-weight: 500 !important; }
.app-shell .v1-history-list article { border-color: var(--fh-line) !important; box-shadow: none !important; background: var(--fh-white) !important; }
.app-shell .history-open { color: var(--fh-accent) !important; }
.app-shell #history-trends .history-trends-title { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: clamp(1.45rem, 2.2vw, 1.85rem) !important; color: var(--fh-ink); }
.app-shell #history-trends .trend-card { border-color: var(--fh-line) !important; box-shadow: none !important; background: var(--fh-white) !important; }
.app-shell #history-trends .trend-card h5 { font-weight: 500 !important; font-size: 1.05rem; color: var(--fh-ink); }
.app-shell #history-trends .trend-card td:nth-child(2) b, .app-shell #history-trends .trend-card td:nth-child(2) strong { font-weight: 500 !important; }
.app-shell .record-summary-card { border-color: var(--fh-line) !important; box-shadow: none !important; background: var(--fh-white) !important; }
.app-shell .record-summary-card strong { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.2rem; color: var(--fh-ink) !important; }
.app-shell .reminders-panel #rm-add { width: auto !important; align-self: start; flex: 0 0 auto; padding: 12px 26px !important; }
.app-shell .reminders-panel .rm-note { background: var(--fh-cream) !important; border-color: var(--fh-line) !important; color: var(--fh-ink-2); }

/* ---------- App: DocBridge (pass 7) ----------
   Styling only: prices, wording and the evaluation-mode notice are unchanged. */
.app-shell .docbridge-panel .db-pilot-note { background: var(--fh-cream) !important; border-color: var(--fh-line) !important; color: var(--fh-ink-2); }
.app-shell .docbridge-panel .db-pricing div { border-color: var(--fh-line) !important; background: var(--fh-white) !important; box-shadow: none !important; }
.app-shell .docbridge-panel .db-pricing strong { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.2rem; color: var(--fh-ink); }
.app-shell .docbridge-panel .db-pricing span { color: var(--fh-ink-3); }
.app-shell .docbridge-panel .db-demo-offer { border: 1px solid var(--fh-line) !important; background: var(--fh-cream) !important; border-radius: var(--fh-radius) !important; padding: 22px 24px !important; }
.app-shell .docbridge-panel :is(#db-demo-start, #db-signin > .secondary-button, .db-waitlist button) { justify-self: start; display: inline-flex; align-items: center; justify-content: center; width: auto !important; min-width: 0; padding-left: 26px !important; padding-right: 26px !important; }
.app-shell .docbridge-panel .db-waitlist { border-top-color: var(--fh-line) !important; }

/* ---------- App: account, signed in (pass 8) ----------
   Styling only: plans, prices and wording are unchanged. "Verified" keeps teal ink as a positive state. */
.app-shell #account-avatar { background: var(--fh-cream) !important; color: var(--fh-accent-dark) !important; border-color: var(--fh-line) !important; font-family: var(--fh-serif); font-weight: 400 !important; }
.app-shell #auth-badge.sync-badge.online { background: var(--fh-white) !important; border-color: var(--fh-line) !important; color: var(--fh-teal, #0F766E) !important; }
.app-shell .billing-card { box-shadow: none !important; border-color: var(--fh-line) !important; background: var(--fh-white) !important; }
.app-shell .yd-note a { color: var(--fh-accent) !important; }
.app-shell .billing-card.billing-card-current { background: var(--fh-cream) !important; border: 1.5px solid var(--fh-ink) !important; }

/* ---------- App: DocBridge clinician workspace (pass 9) ----------
   Styling only: what the clinician reads, edits and approves is unchanged. Rows outside the lab's
   range keep a tint (now warm) so they still stand out. */
.app-shell .docbridge-panel .db-demo-banner { background: var(--fh-cream) !important; border: 1px solid var(--fh-line) !important; color: var(--fh-ink-2); }
.app-shell .docbridge-panel .db-pane { border: 1px solid var(--fh-line) !important; border-radius: var(--fh-radius) !important; background: var(--fh-white) !important; box-shadow: none !important; }
.app-shell .docbridge-panel .db-original-pane { background: var(--fh-cream) !important; border-style: dashed !important; border-color: #CDBFA9 !important; }
.app-shell .docbridge-panel .db-pane h4 { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.2rem; color: var(--fh-ink); }
.app-shell .docbridge-panel .db-table th, .app-shell .docbridge-panel #db-batch th { background: var(--fh-cream) !important; color: var(--fh-ink-2) !important; font-weight: 500 !important; }
.app-shell .docbridge-panel .db-table td:nth-child(2), .app-shell .docbridge-panel .db-table td:nth-child(3) { font-family: var(--fh-mono); font-size: 0.86rem; }
.app-shell .docbridge-panel .db-table tr.db-flag td { background: var(--fh-accent-soft) !important; }
.app-shell .docbridge-panel .text-button { color: var(--fh-accent) !important; border-color: var(--fh-line) !important; }
.app-shell .docbridge-panel :is(.db-stat, .db-stats > div) { border-color: var(--fh-line) !important; background: var(--fh-white) !important; box-shadow: none !important; }

/* ---------- Pass 10: craft fixes from the 13 Nov audit (docs/human-quality-product-review.md) ---------- */
/* Story: steps that have not played yet were drawn as empty bordered boxes, which read as broken
   loading placeholders. They now take their space invisibly and appear when their step plays. */
#report-story .story-card { opacity: 0; }
#report-story .story-canvas[data-step="3"] .story-card-3, #report-story .story-canvas[data-step="4"] :is(.story-card-3, .story-card-4),
#report-story .story-canvas[data-step="5"] :is(.story-card-3, .story-card-4, .story-card-5), #report-story .story-canvas[data-step="6"] .story-card,
#report-story.story-static .story-card { opacity: 1; }

/* Help button: the 160px "Need help?" pill sat on top of the Upload screen's "Explain report"
   button and other right-aligned controls. A 52px round button keeps the same name for screen
   readers (aria-label) and, on wide screens, sits in the page margin instead of over content. */
.help-chat-launcher { min-height: 52px; width: 52px; padding: 0; justify-content: center; background: var(--fh-ink); box-shadow: 0 6px 18px rgba(41, 41, 41, 0.18); }
.help-chat-launcher > span:first-child { width: auto; height: auto; background: none; color: var(--fh-white); font-family: var(--fh-serif); font-size: 1.45rem; font-weight: 400; }
.help-chat-launcher-text { display: none; }
.help-chat-launcher:hover { background: var(--fh-accent); }
.help-chat-launcher:focus-visible { outline: 3px solid var(--fh-accent); outline-offset: 3px; }
main.app-shell { padding-bottom: 96px; }

/* Collapsed sections in "Your data" had their disclosure arrow removed, so "Who else handles
   your data" looked like a heading over an empty section. Show a plain chevron that turns. */
.yd-details > summary { list-style: none; gap: 10px; }
.yd-details > summary::-webkit-details-marker { display: none; }
.yd-details > summary::before { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 0 2px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 150ms var(--fh-ease); }
.yd-details[open] > summary::before { transform: rotate(45deg); }

/* Small headings on Account and "Your data" were heavy sans with tight tracking, while the
   matching cards on Record use the serif. Use the serif everywhere for the same level. */
.app-shell :is(.auth-aside h4, .your-data-panel h4) { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.25rem !important; letter-spacing: 0 !important; color: var(--fh-ink) !important; }

/* ---------- Pass 11 (15 Nov): app screens in the homepage's language ----------
   Upload, History, Record and Account still looked like the old template: white rounded panels with
   shadows, pill buttons and chips, filled boxes for small cards and notes, and big rounded "+ Add"
   bars. Same rules as the homepage: ruled sections on the paper, a small radius, ink for the main
   action, terracotta for links. Layout and behaviour are unchanged; this is presentation only. */
.app-shell .workspace > .panel { border: 0 !important; border-top: 1px solid var(--fh-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.app-shell .workspace > .panel:first-of-type { border-top: 0 !important; }
.app-shell :is(.secondary-button, .install-button, .rm-list button) { border-radius: 10px !important; background: transparent !important; border: 1px solid var(--fh-accent) !important; color: var(--fh-accent) !important; }
.app-shell .secondary-button:hover { border-color: var(--fh-accent-dark) !important; background: var(--fh-accent-soft) !important; }
.app-shell .report-panel .whose-chip { border-radius: 6px !important; }
.app-shell .workspace :is(input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea) { border-radius: 6px !important; box-shadow: none !important; }
.app-shell .report-panel :is(.composer-drop, .hero-sample, .composer-sample) { border-radius: 8px !important; box-shadow: none !important; }
.app-shell .record-summary-card { border: 0 !important; border-top: 2px solid var(--fh-ink) !important; border-radius: 0 !important; background: transparent !important; padding-left: 0 !important; padding-right: 0 !important; }
.app-shell .add-form > summary { min-height: 44px; padding: 8px 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--fh-accent) !important; font-weight: 600; }
.app-shell .add-form > summary:hover { text-decoration: underline; text-underline-offset: 5px; }
.app-shell .add-form { border: 0 !important; border-radius: 0 !important; background: transparent !important; }
.app-shell .add-form[open] { background: transparent !important; padding-bottom: 8px; }
.app-shell .add-form > :is(form, .lab-trend-grid, .primary-action-row) { padding-left: 0 !important; padding-right: 0 !important; }
.app-shell .add-form > summary::before { width: 22px !important; height: 22px !important; background: transparent !important; color: var(--fh-accent) !important; border: 1.5px solid currentColor; font-weight: 600 !important; }
.app-shell .add-form[open] > summary::before { color: var(--fh-ink) !important; }
/* The header already ends in a rule; on app screens the first section's top rule would double it. */
body[data-active-workspace]:not([data-active-workspace="home-title"]) .topbar.site-nav { border-bottom-color: transparent !important; }
/* Screen tabs: plain words with an underline for the current one, not a pill group. */
.app-shell .site-nav .quick-nav.patient-nav { background: transparent !important; box-shadow: none !important; border: 0 !important; }
.app-shell .site-nav .quick-nav.patient-nav a { border-radius: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--fh-ink-2) !important; }
.app-shell .site-nav .quick-nav.patient-nav a:hover { color: var(--fh-ink) !important; }
.app-shell .site-nav .quick-nav.patient-nav a.active { color: var(--fh-ink) !important; box-shadow: inset 0 -2px 0 var(--fh-accent) !important; }
@media (max-width: 720px) {
  .app-shell .site-nav .quick-nav.patient-nav { background: rgba(250, 246, 238, 0.98) !important; border-top: 1px solid var(--fh-line) !important; border-radius: 0 !important; }
  .app-shell .site-nav .quick-nav.patient-nav a.active { box-shadow: inset 0 2px 0 var(--fh-accent) !important; }
}
.app-shell .add-form[open] > summary { color: var(--fh-ink) !important; }
.app-shell .auth-aside, .app-shell .yd-card, .app-shell .history-empty, .app-shell .workspace .v1-history-list > .history-empty { border: 0 !important; border-top: 1px solid var(--fh-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.app-shell .auth-benefits svg { background: transparent !important; border: 1px solid var(--fh-line-strong); border-radius: 6px !important; }
.app-shell .reminders-panel .rm-note, .app-shell .billing-banner { border: 0 !important; border-left: 2px solid var(--fh-accent) !important; border-radius: 0 !important; background: transparent !important; padding: 4px 0 4px 14px !important; }
.app-shell .auth-tabs, .app-shell .segmented { border-radius: 8px !important; }
.app-shell .auth-tabs button, .app-shell .segmented button { border-radius: 6px !important; }

/* ---------- Pass 12 (16 Nov): the opened report in the homepage's language ----------
   The report screen still set every part in its own box: a rounded summary card, a grid of rounded
   result cards, a filled questions panel, boxed "original report", "save or share", safety note and
   feedback. Same rules as the rest of the site now: ruled parts, results as ruled rows, 6 px corners.
   Presentation only; every value, label, range and sentence is unchanged. */
.app-shell #report-results :is(.report-summary, .result-doctor, .result-source, .result-save, .result-privacy, .safety-note, .feedback-box) { border: 0 !important; border-top: 1px solid var(--fh-line-strong) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
/* The summary is the one card on the results screen, in the homepage's panel style (18 Nov). */
.app-shell #report-results .report-summary { border: 1px solid var(--fh-line) !important; border-radius: 22px !important; background: var(--fh-white) !important; padding: 26px 28px !important; box-shadow: 0 24px 48px -36px rgba(80, 52, 28, 0.35) !important; }
.app-shell #report-results .result-cards-grid { column-gap: 48px !important; row-gap: 0 !important; }
.app-shell #report-results .result-cards-grid > .result-card-item { border: 0 !important; border-top: 1px solid var(--fh-line-strong) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: 18px 0 20px !important; animation: none !important; }
.app-shell #report-results .result-card-item header em { border-radius: 4px !important; }
.app-shell #report-results .result-more { border: 0 !important; border-top: 1px solid var(--fh-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
.app-shell #report-results .result-more:last-of-type { border-bottom: 1px solid var(--fh-line) !important; }
.app-shell #report-results .result-more > summary { padding-left: 0 !important; padding-right: 0 !important; }
/* "Your next 3 steps": the list drew the browser's own "1." as well as its counter, and the browser
   number sat outside the page edge (a stray "." at 1440 px). One number, inside the column. */
.app-shell #report-results :is(.next-steps-list, .result-doctor-questions) { list-style: decimal outside !important; padding-left: 2.4em !important; margin-left: 0 !important; }
.app-shell #report-results :is(.next-steps-list, .result-doctor-questions) li::before { content: none !important; display: none !important; }
.app-shell #report-results :is(.next-steps-list, .result-doctor-questions) li::marker { color: var(--fh-accent); font-weight: 600; }
/* The three steps sit side by side in a grid, so each number goes inside its own column. */
.app-shell #report-results .next-steps-list { list-style-position: inside !important; padding-left: 0 !important; }

/* ---------- Pass 13 (16 Nov): DocBridge in the same language ----------
   The clinician workspace still used boxes everywhere: rounded pricing cards, filled notices, six
   white stat tiles (five fitted a row, so "Approved with no edits" sat alone on a second row), and
   rounded white blocks for New lab, Inbox, Team and Settings. Now: the six numbers on one ruled row
   (three per row on phones), ruled blocks, notices with a left rule, and no teal left on the file
   picker. Presentation only; numbers, wording and prices are unchanged. */
.app-shell .docbridge-panel :is(.db-pilot-note, .db-demo-banner) { border: 0 !important; border-left: 2px solid var(--fh-accent) !important; border-radius: 0 !important; background: transparent !important; padding: 6px 0 6px 14px !important; }
.app-shell .docbridge-panel .db-demo-banner { margin-top: 24px !important; }
.app-shell .docbridge-panel .db-pricing > div { border: 0 !important; border-top: 2px solid var(--fh-ink) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: 12px 0 0 !important; }
.app-shell .docbridge-panel .db-metrics { display: grid !important; grid-template-columns: repeat(6, minmax(0, 1fr)) !important; gap: 0 !important; border-top: 1px solid var(--fh-line-strong); border-bottom: 1px solid var(--fh-line-strong); }
.app-shell .docbridge-panel .db-metrics > div { border: 0 !important; border-left: 1px solid var(--fh-line) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding: 14px 16px !important; }
.app-shell .docbridge-panel .db-metrics > div:first-child { border-left: 0 !important; padding-left: 0 !important; }
.app-shell .docbridge-panel .db-metrics strong { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.8rem !important; }
.app-shell .docbridge-panel .db-block { border: 0 !important; border-top: 1px solid var(--fh-line-strong) !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; padding-left: 0 !important; padding-right: 0 !important; }
.app-shell .docbridge-panel .db-row { border-radius: 6px !important; }
.app-shell .docbridge-panel .sync-badge { border-radius: 4px !important; }
.app-shell .docbridge-panel input[type="file"] { border: 1px dashed var(--fh-line-strong) !important; border-radius: 6px !important; background: transparent !important; }
.app-shell .docbridge-panel .db-list-head h4 { font-family: var(--fh-serif) !important; font-weight: 400 !important; font-size: 1.3rem !important; letter-spacing: 0 !important; }
@media (max-width: 720px) {
  .app-shell .docbridge-panel .db-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .app-shell .docbridge-panel .db-metrics > div:nth-child(3n + 1) { border-left: 0 !important; padding-left: 0 !important; }
  .app-shell .docbridge-panel .db-metrics > div:nth-child(n + 4) { border-top: 1px solid var(--fh-line) !important; }
  .app-shell .docbridge-panel .db-metrics strong { font-size: 1.4rem !important; }
}

/* ---------- Motion ----------
   The homepage has no entrance or looping animation. Only the guide's mark moves, and only while it
   is working on an answer. */
@keyframes fh-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@keyframes fh-orbit { to { transform: rotate(360deg); } }
@keyframes fh-ripple { 0% { transform: scale(1); opacity: 0.45; } 100% { transform: scale(2.05); opacity: 0; } }
@keyframes fh-dot { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) {
  #guide .guide-avatar *, #guide .guide-typing span { animation: none !important; transition: none !important; }
  #faq .faq-answer, #faq .faq-icon::after { transition: none !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .ed-hero { grid-template-columns: 1fr; }
  .ed-sheet-wrap { max-width: 720px; }
}
@media (max-width: 860px) {
  .ed-part { grid-template-columns: minmax(0, 1fr); gap: 8px; }

  .ed-steps, .ed-cols, .ed-clinic, .fh-areas { grid-template-columns: 1fr; gap: 28px; }
  .fh-areas { gap: 0; }
  .fh-footer-grid { grid-template-columns: 1fr; }
  #guide .guide-scope { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ed-sheet-wrap { padding-right: 0; }
  .ed-sheet { padding: 16px 12px 18px; font-size: 0.7rem; transform: rotate(-0.6deg); }
  .app-shell .landing .ed-sheet th { padding: 6px 2px; font-size: 0.56rem !important; letter-spacing: 0.02em !important; }
  .ed-sheet td { padding: 7px 2px; white-space: normal; overflow-wrap: anywhere; }
  .ed-sheet table { table-layout: fixed; }
  .ed-sheet :is(th, td):nth-child(1) { width: 27%; }
  .ed-sheet :is(th, td):nth-child(2) { width: 14%; }
  .ed-sheet :is(th, td):nth-child(3) { width: 10%; }
  .ed-sheet :is(th, td):nth-child(4) { width: 25%; }
  .ed-hero .fh-data-use summary { justify-content: flex-start !important; width: auto !important; text-align: left !important; }
  .ed-notes { margin-top: 16px; counter-reset: ed; }
  .ed-notes li { position: static; width: auto; margin: 6px 0 0 8px; transform: none; font-size: 1.25rem; }
  .ed-notes li::before { counter-increment: ed; content: counter(ed) " \00B7  "; }
  .ed-ask { font-size: 1.25rem; }
  .ed-price, .ed-price tbody, .ed-price tr { display: block; }
  .ed-price tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 0; border-top: 1px solid var(--fh-line); }
  .ed-price :is(th, td) { width: auto !important; padding: 0; border: 0 !important; }
  .ed-price td:nth-child(3) { grid-column: 1 / -1; }
  .ed-price td:last-child { grid-column: 1 / -1; }
  .fh-footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #guide .guide-form { flex-wrap: wrap; }
  #guide .guide-form .fh-btn { flex: 1 1 100%; }
}
.history-item-head .ft-dash-tag { margin-left: 8px; vertical-align: 2px; }

/* All tests on your report (17 Nov): a count with in-range / outside bars, each body area with its
   own split bar, a thin coloured edge on every result and dots for earlier readings of the same test.
   Colours only repeat what the lab's own range says; nothing is re-graded. */
#report-results .lab-panel { --lab-in: #6E9F83; --lab-out: #C0714F; --lab-none: #CFC6B6; }
#report-results .lab-summary { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 48px; align-items: end; margin: 8px 0 18px; padding: 4px 0 22px; border-bottom: 1px solid var(--fh-line); }
#report-results .lab-summary-count { margin: 0; color: var(--fh-ink-2); font-size: 1rem; }
#report-results .lab-summary-count b { display: block; font: 400 clamp(2.6rem, 6vw, 3.6rem)/1 var(--fh-serif); color: var(--fh-ink); letter-spacing: -0.02em; }
#report-results .lab-summary-bars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.app-shell #report-results .lab-summary-bars li { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); align-items: center; gap: 12px; color: var(--fh-ink-2); font-size: 0.92rem; }
#report-results .lab-summary-bars i { display: block; height: 8px; min-width: 6px; border-radius: 4px; }
#report-results .lab-split-in { background: var(--lab-in); }
#report-results .lab-split-out { background: var(--lab-out); }
#report-results .lab-split-none { background: var(--lab-none); }
#report-results .lab-panel-group-head [role="rowheader"] { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
#report-results .lab-panel-group-head small { color: var(--fh-ink-3); font: 400 0.82rem var(--ft-font); }
#report-results .lab-split { display: inline-flex; gap: 3px; width: 72px; height: 5px; align-self: center; }
#report-results .lab-split i { display: block; height: 100%; border-radius: 3px; }
.app-shell #report-results .lab-panel-row.lab-tone-in, .app-shell #report-results .lab-panel-row.lab-tone-out, .app-shell #report-results .lab-panel-row.lab-tone-none { box-shadow: inset 3px 0 0 var(--lab-in); }
.app-shell #report-results .lab-panel-row.lab-tone-out { box-shadow: inset 3px 0 0 var(--lab-out); }
.app-shell #report-results .lab-panel-row.lab-tone-none { box-shadow: inset 3px 0 0 var(--lab-none); }
#report-results .lab-trend { display: block; margin-top: 6px; line-height: 0; }
#report-results .lab-trend polyline { fill: none; stroke: var(--fh-line-strong); stroke-width: 1.2; }
#report-results .lab-trend circle { stroke: #FFFDF8; stroke-width: 1; }
#report-results .lab-dot-in { fill: var(--lab-in); }
#report-results .lab-dot-out { fill: var(--lab-out); }
#report-results .lab-dot-none { fill: var(--lab-none); }
@media (max-width: 640px) {
  #report-results .lab-summary { grid-template-columns: 1fr; gap: 12px; }
  #report-results .lab-summary-bars li { grid-template-columns: 1fr; gap: 4px; }
}
@media print { #report-results .lab-trend polyline { stroke: #999; } }

/* ---------- Report journey (20 Nov) ----------
   The header sits flush at the top with a full-width band, so text no longer shows through the gap
   above it. Under the summary: jump links and "Find a result". Own questions under the report's.
   "Your privacy" after Save or share. One layout from phone to desktop: it only wraps. */
.topbar.site-nav { top: 0 !important; }
.topbar.site-nav::before { content: ""; position: absolute; z-index: -1; top: -12px; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); background: var(--fh-paper); border-bottom: 1px solid var(--fh-line); pointer-events: none; }
.app-shell #report-results .result-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 4px 0 26px; min-width: 0; }
.app-shell #report-results .result-jump { display: flex; flex-wrap: wrap; gap: 8px; }
.app-shell #report-results .result-jump-link { flex: 0 0 auto; min-height: 40px; padding: 8px 14px; border: 1px solid var(--fh-line-strong); border-radius: 999px; background: var(--fh-white); color: var(--fh-ink); font: 500 0.92rem/1.2 inherit; font-family: inherit; cursor: pointer; }
.app-shell #report-results .result-jump-link:hover { border-color: var(--fh-accent); color: var(--fh-accent); }
.app-shell #report-results .result-find { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; max-width: 560px; min-width: 0; }
.app-shell #report-results .result-find label, .app-shell #report-results .result-own-question label { font-weight: 600; color: var(--fh-ink); font-size: 0.95rem; }
.app-shell #report-results .result-find input, .app-shell #report-results .result-own-row input { width: 100%; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid var(--fh-line-strong); border-radius: 12px; background: var(--fh-white); color: var(--fh-ink); font: inherit; font-size: 1rem; }
.app-shell #report-results .result-find-list { display: grid; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.app-shell #report-results .result-find-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name label" "value value" "range range"; gap: 2px 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--fh-line); border-left: 4px solid var(--fh-line-strong); border-radius: 12px; background: var(--fh-white); color: var(--fh-ink); text-align: left; font: inherit; cursor: pointer; }
.app-shell #report-results .result-find-item:hover { border-color: var(--fh-accent); }
.app-shell #report-results .result-find-out { border-left-color: var(--fh-terracotta); }
.app-shell #report-results .result-find-in { border-left-color: #6E9E85; }
.app-shell #report-results .result-find-item strong { grid-area: name; font-weight: 600; }
.app-shell #report-results .result-find-item em { grid-area: label; font-style: normal; font-size: 0.85rem; color: var(--fh-ink-2); }
.app-shell #report-results .result-find-value { grid-area: value; font-family: var(--fh-serif); font-size: 1.25rem; }
.app-shell #report-results .result-find-item small { grid-area: range; color: var(--fh-ink-3); font-family: var(--fh-mono); font-size: 0.82rem; }
.app-shell #report-results .result-find-empty { padding: 10px 2px; color: var(--fh-ink-3); }
.app-shell #report-results .is-found { animation: fh-found 1.6s var(--fh-ease); }
@keyframes fh-found { 0%, 40% { box-shadow: 0 0 0 3px rgba(161, 78, 46, 0.35); background-color: var(--fh-accent-soft); } 100% { box-shadow: 0 0 0 0 rgba(161, 78, 46, 0); } }
@media (prefers-reduced-motion: reduce) { .app-shell #report-results .is-found { animation: none; outline: 3px solid rgba(161, 78, 46, 0.45); outline-offset: 2px; } }
.app-shell #report-results [tabindex="-1"]:focus { outline: none; }
.app-shell #report-results [tabindex="-1"]:focus-visible { outline: 3px solid rgba(161, 78, 46, 0.45); outline-offset: 4px; }
.app-shell #report-results .result-own-item { list-style: none; }
.app-shell #report-results .result-own-tag { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; background: var(--fh-accent-soft); color: var(--fh-accent-dark); font-size: 0.78rem; font-weight: 600; vertical-align: 2px; }
.app-shell #report-results .result-own-remove { min-height: 32px; margin-left: 4px; font-size: 0.85rem; }
.app-shell #report-results .result-own-question { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; margin: 14px 0 16px; max-width: 640px; }
.app-shell #report-results .result-own-row { display: flex; gap: 8px; }
.app-shell #report-results .result-own-row input { flex: 1 1 auto; min-width: 0; width: 0 !important; }
.app-shell #report-results .result-own-row button { flex: 0 0 auto; width: auto !important; min-height: 46px; }
.app-shell #report-results .result-privacy-facts { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; color: var(--fh-ink-2); }
.app-shell #report-results .result-privacy-facts li { position: relative; display: block !important; padding: 0 0 0 22px !important; border: 0 !important; background: none !important; }
.app-shell #report-results .result-privacy-facts li::before { content: ""; position: absolute; left: 4px; top: 0.55em; width: 8px; height: 8px; border-radius: 50%; background: var(--fh-teal); }
.app-shell #report-results .result-privacy-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-shell #report-results .result-privacy-actions a { display: inline-flex; align-items: center; text-decoration: none; }
/* Room for the help button and the phone tab bar under the last part of the results. */
@media (max-width: 720px) {
  .app-shell #report-results .v1-result-card { padding-bottom: 72px; }
  .app-shell #report-results .result-jump { gap: 6px; }
  .app-shell #report-results .result-jump-link { min-height: 36px; padding: 6px 12px; font-size: 0.86rem; }
}
/* Phones: the name and "Sign in" stay on one line each and no longer overlap in the header. */
@media (max-width: 480px) {
  .app-shell .topbar.site-nav .nav-signin { min-height: 40px; padding: 0 12px !important; font-size: 0.9rem !important; white-space: nowrap; }
  .app-shell .topbar.site-nav .brand-text strong { font-size: 1.05rem !important; }
}
@media (max-width: 360px) {
  .app-shell .topbar.site-nav .brand-text strong { font-size: 0.94rem !important; }
  .app-shell .topbar.site-nav .brand-logo { width: 26px; height: 26px; }
  .app-shell .topbar.site-nav .brand-lockup { gap: 6px; }
  .app-shell .topbar.site-nav .nav-signin { padding: 0 10px !important; font-size: 0.86rem !important; }
}

/* 21 Nov: "Save or load reports" belongs to the form, not to the results. It now sits in the form's
   action row under "Explain report", as a quiet link, instead of on its own just above "Your report is ready". */
.app-shell .composer-type .composer-actions { flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.app-shell .composer-type .composer-more { flex: 1 1 100%; order: 2; margin: 0; padding-top: 10px; border-top: 1px solid var(--fh-line); }
.app-shell .composer-type .composer-more > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 0.92rem; font-weight: 600; color: var(--fh-ink-2); list-style: none; }
.app-shell .composer-type .composer-more > summary::-webkit-details-marker { display: none; }
.app-shell .composer-type .composer-more > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
.app-shell .composer-type .composer-more[open] > summary::before { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { .app-shell .composer-type .composer-more > summary::before { transition: none; } }
.app-shell .composer-type .composer-more-body { display: grid; gap: 12px; margin-top: 8px; max-width: 560px; }
.app-shell .composer-type .composer-more-body .sync-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.app-shell .composer-type .composer-more-body .sync-grid button { width: auto; }

/* What a button in the results did, shown next to it (the same words as the status line above the form). */
.app-shell #report-results .result-local-status { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--fh-teal); background: var(--fh-white, #fff); color: var(--fh-ink-2); font-size: 0.92rem; }
.app-shell #report-results .result-local-status:empty { display: none; }

/* The doctor brief, in a dialog on this page instead of a new tab. */
.brief-dialog { width: min(860px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--fh-line, #e6ddce); border-radius: 16px; background: #fffdf8; color: var(--fh-ink, #292929); overflow: auto; }
.brief-dialog::backdrop { background: rgba(41, 41, 41, 0.45); }
.brief-dialog-bar { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 14px 20px; border-bottom: 1px solid var(--fh-line, #e6ddce); background: #fffdf8; }
.brief-dialog-bar h2 { margin: 0; font-family: var(--fh-serif, Georgia, serif); font-weight: 400; font-size: 1.3rem; }
.brief-dialog-bar h2:focus { outline: none; }
.brief-dialog-bar h2:focus-visible { outline: 3px solid rgba(161, 78, 46, 0.45); outline-offset: 4px; }
.brief-dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.brief-dialog-actions button { width: auto; min-height: 44px; padding: 0 20px; border-radius: 999px; font-family: inherit; font-size: 0.95rem; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: none; }
.brief-dialog-print { border: 1px solid var(--fh-accent, #a14e2e); background: var(--fh-accent, #a14e2e); color: #fff; }
.brief-dialog-print:hover { background: var(--fh-accent-dark, #8A4126); }
.brief-dialog-close { border: 1px solid var(--fh-line-strong, #d6c9b4); background: #fffdf8; color: var(--fh-ink, #292929); }
.brief-dialog-actions button:focus-visible { outline: 3px solid rgba(161, 78, 46, 0.45); outline-offset: 2px; }
.brief-dialog-frame { display: block; width: 100%; min-height: 60vh; border: 0; background: #fffdf8; }
@media (max-width: 600px) {
  .brief-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .brief-dialog-bar { padding: 10px 16px; }
  .brief-dialog-actions { flex: 1 1 100%; }
  .brief-dialog-actions button { flex: 1 1 auto; }
}
/* For browsers that print the whole page rather than the brief's frame: print only the brief. */
@media print {
  html.brief-open body > *:not(#doctor-brief-dialog) { display: none !important; }
  html.brief-open .brief-dialog { position: static; width: auto; max-width: none; max-height: none; height: auto; border: 0; overflow: visible; }
  html.brief-open .brief-dialog-bar { display: none; }
}

/* The help button covered the right edge of results on phones and tablets (the page has no margin
   for it there). Below 900px it becomes a slim tab on the screen edge: still always visible and one
   tap away, with the same name for screen readers, but it covers only the page's side margin. */
@media (max-width: 900px) {
  .help-chat:not(.open) { right: 0; }
  .help-chat:not(.open) .help-chat-launcher { width: 30px; min-height: 52px; padding: 0; border-radius: 14px 0 0 14px; box-shadow: -2px 3px 10px rgba(41, 41, 41, 0.18); }
  .help-chat:not(.open) .help-chat-launcher > span:first-child { font-size: 1.15rem; }
}

/* All tests on a phone (22 Nov): one compact list. Each result is a row with the name and what it
   measures on the left and its label on the right; the value and the lab's range sit on a second
   line, with the range named (the column headers are hidden on phones). Text and values unchanged. */
@media (max-width: 760px) {
  .app-shell #report-results .lab-panel-row:not(.lab-panel-head):not(.lab-panel-group-head) {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name label" "value range";
    gap: 4px 12px;
    padding: 12px 14px;
    align-items: baseline;
  }
  .app-shell #report-results .lab-panel-row:not(.lab-panel-head):not(.lab-panel-group-head) > span:nth-child(1) { grid-area: name; grid-column: auto; }
  .app-shell #report-results .lab-panel-row:not(.lab-panel-head):not(.lab-panel-group-head) > span:nth-child(2) { grid-area: value; }
  .app-shell #report-results .lab-panel-row:not(.lab-panel-head):not(.lab-panel-group-head) > span:nth-child(3) { grid-area: range; text-align: right; }
  .app-shell #report-results .lab-panel-row:not(.lab-panel-head):not(.lab-panel-group-head) > span:nth-child(4) { grid-area: label; text-align: right; white-space: nowrap; }
  .app-shell #report-results .lab-panel-row > span[data-label]::before {
    content: attr(data-label) " ";
    font-family: var(--ft-font, inherit);
    font-size: 0.74rem;
    color: var(--fh-ink-3);
  }
  .app-shell #report-results .lab-panel-row small { font-size: 0.78rem; line-height: 1.35; margin-top: 2px; }
}
