/* ====================================================================================================================================
   FITMARK'S OWN LOOK (Nov 22 2026; QUIZ-V1-SPEC.md sections 4 and 8.3; stream "quiz-pages").

   Fitmark is the member's own lead qualification quiz builder inside the portal, in its own violet (design/MONEY-DESIGN-BRIEF.md
   section 2.4, design/assets/fitmark/). The family system: money-tokens.css carries the shared type, text, cards, chart, status,
   radii, shadows, spacing and motion for every suite product; fitmark-tokens.css (loaded after it) swaps the frame, the band, the
   canvas and the signal to Fitmark's palette inside .fitmark-app. This file only gives those tokens short names (--f-*) and draws
   Fitmark's screens. It reads no portal variable (--gold, --card ...), and every class starts with fm- so nothing here reaches
   another page. The member's own brand color is --money-accent, set by data-accent on <body> (the eight approved colors).
   ==================================================================================================================================== */

.fitmark-app {
  --f-bg: var(--money-canvas);
  --f-surface: var(--money-card);
  --f-surface-2: #F7F5FC;              /* ours: wells and hover rows, the canvas's violet tint on white */
  --f-surface-3: #ECE8F6;              /* ours: meter tracks */
  --f-line: #E2DDEF;                   /* ours: hairlines, in the product's tint */
  --f-line-strong: #A9A2BF;            /* ours: the edge of a control, 3:1 on white */
  --f-ink: #160B2E;                    /* ours: primary text, 17:1 on white */
  --f-ink-2: #463F5C;                  /* ours: 9.6:1 on white */
  --f-ink-muted: #625B78;              /* ours: 6.4:1 on white, 5.7:1 on the canvas */
  --f-accent: var(--money-accent);
  --f-accent-strong: color-mix(in oklab, var(--money-accent) 82%, black);
  --f-accent-soft: color-mix(in oklab, var(--money-accent) 12%, white);
  --f-accent-hi: color-mix(in oklab, var(--money-accent) 62%, white);
  --f-accent-ink: #FFFFFF;
  --f-sig: var(--fitmark-signal);
  --f-sig-ink: var(--fitmark-signal-ink);
  /* status, always with a word */
  --f-pos: var(--money-pill-paid-fg);      --f-pos-soft: var(--money-pill-paid-bg);
  --f-info: var(--money-pill-due-fg);      --f-info-soft: var(--money-pill-due-bg);
  --f-neg: var(--money-pill-overdue-fg);   --f-neg-soft: var(--money-pill-overdue-bg);
  --f-warn: var(--money-pill-partial-fg);  --f-warn-soft: var(--money-pill-partial-bg);
  --f-quiet: #4F4866;                      --f-quiet-soft: #EEEBF5;
  /* HOT, WARM and COOL: the red, orange and blue circles of our own lead lists (JT, Nov 6 2026), with tinted chips for words */
  --f-hot: #E5484D;  --f-hot-ink: #B42318;  --f-hot-soft: #FDE8E7;
  --f-warm: #F07A2A; --f-warm-ink: #9A3E0B; --f-warm-soft: #FDEEE2;
  --f-cool: #2A6FDB; --f-cool-ink: #1E4FA8; --f-cool-soft: #E7EEFC;
  /* data: the family's categories in their fixed order (results pages take them by position) */
  --f-c1: var(--money-cat-1); --f-c2: var(--money-cat-2); --f-c3: var(--money-cat-3); --f-c4: var(--money-cat-4);
  --f-c5: var(--money-cat-5); --f-c6: var(--money-cat-6); --f-c7: #0E9FB5; --f-c8: var(--money-cat-other);
  --f-grid: #ECE8F4;
  --f-axis: var(--f-ink-muted);
  /* type */
  --f-font: var(--money-font-ui);
  --f-font-display: var(--money-font-display);
  --f-fs-xs: 0.74rem; --f-fs-sm: 0.86rem; --f-fs-base: 0.92rem; --f-fs-md: 1rem; --f-fs-lg: 1.15rem; --f-fs-xl: 1.4rem; --f-fs-2xl: 2.1rem;
  /* shape and depth */
  --f-r-sm: var(--money-r-sm); --f-r-md: var(--money-r-md); --f-r: var(--money-r-lg); --f-r-xl: var(--money-r-xl); --f-r-pill: var(--money-r-pill);
  --f-shadow-1: 0 1px 2px rgba(22, 11, 46, 0.05), 0 10px 30px -14px rgba(22, 11, 46, 0.24);
  --f-shadow-2: 0 2px 6px rgba(22, 11, 46, 0.08), 0 22px 48px -20px rgba(22, 11, 46, 0.36);
  --f-shadow-3: 0 28px 64px rgba(22, 11, 46, 0.32);
  --f-scrim: rgba(18, 8, 38, 0.58);
  --f-focus: 2px solid var(--money-accent);
  --f-t: var(--money-d-fast) var(--money-ease);
  /* the shell: the portal menu's widths (272px open, 72px folded), so the two menus feel like one system */
  --f-topbar-h: 64px;
  --f-side-w: 272px;
  --f-side-ink: #FFFFFF;
  --f-side-ink-muted: var(--fitmark-band-fg-2);
  --f-side-line: rgba(255, 255, 255, 0.12);
  --f-side-hover: rgba(255, 255, 255, 0.07);
  --f-side-active: rgba(255, 255, 255, 0.12);
}
/* the member's brand colors, the approved eight (design/assets/brand-colors.json: white text on each at 5.4:1 or better) */
.fitmark-app[data-accent="evergreen"]  { --money-accent: #0F6B4F; }
.fitmark-app[data-accent="teal"]       { --money-accent: #0A6E80; }
.fitmark-app[data-accent="cobalt"]     { --money-accent: #2350D8; }
.fitmark-app[data-accent="iris"]       { --money-accent: #5B3FD6; }
.fitmark-app[data-accent="orchid"]     { --money-accent: #A2307A; }
.fitmark-app[data-accent="terracotta"] { --money-accent: #B4451F; }
.fitmark-app[data-accent="ochre"]      { --money-accent: #8C6200; }
.fitmark-app[data-accent="graphite"]   { --money-accent: #2B3440; }

/* ------------------------------------------------------------------------------------------------------------------ THE APP */
body.fitmark-app { margin: 0; min-height: 100vh; }
.fitmark-app { color-scheme: light; background: var(--f-bg); color: var(--f-ink-2); font-family: var(--f-font); font-size: var(--f-fs-base); line-height: 1.55; overflow-wrap: break-word; }
.fitmark-app #appHeader { display: none; }
.fitmark-app main.page { padding: 0; }
.fitmark-app [hidden] { display: none !important; }
.fitmark-app h1, .fitmark-app h2, .fitmark-app h3, .fitmark-app h4 { color: var(--f-ink); font-family: var(--f-font-display); letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
.fitmark-app a { color: inherit; }
.fitmark-app a:focus-visible, .fitmark-app button:focus-visible, .fitmark-app input:focus-visible, .fitmark-app select:focus-visible,
.fitmark-app textarea:focus-visible, .fitmark-app [tabindex]:focus-visible { outline: var(--f-focus); outline-offset: 2px; }
.fitmark-app button { font-family: inherit; }
.fm-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.fm-skip { position: absolute; left: 12px; top: -60px; z-index: 70; background: var(--f-accent); color: var(--f-accent-ink); padding: 10px 14px; border-radius: var(--f-r-sm); font-weight: 700; }
.fm-skip:focus { top: 12px; }

.fm-shell { display: grid; grid-template-columns: var(--f-side-w) minmax(0, 1fr); min-height: 100vh; }
@media (min-width: 961px) {
  .fm-shell { grid-template-columns: auto minmax(0, 1fr); background: linear-gradient(90deg, #1A0A36 0 var(--f-side-w), transparent var(--f-side-w)); }
  .fm-side { width: var(--f-side-w); box-sizing: border-box; }
  html.fm-anim .fm-shell { background: none; }
}
.fm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px 14px; overflow-y: auto; box-sizing: border-box;
  background: var(--money-menu-bg); color: var(--f-side-ink); border-right: 1px solid var(--f-side-line); }
.fm-product { display: inline-flex; align-items: center; gap: 8px; padding: 2px 8px 10px; text-decoration: none; }
.fm-product img { display: block; height: 24px; width: auto; }
.fm-brand { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 10px 8px 16px; margin-bottom: 6px; border-bottom: 1px solid var(--f-side-line); text-decoration: none; }
.fm-brand__markwrap { position: relative; display: inline-flex; flex: none; }
.fm-brand__mark { width: 42px; height: 42px; flex: none; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(140deg, var(--f-accent-hi), var(--f-accent)); color: var(--f-accent-ink); font-weight: 800; font-size: var(--f-fs-md); letter-spacing: 0.02em; }
.fm-brand__mark img { width: 100%; height: 100%; object-fit: contain; background: #FFFFFF; }
.fm-brand__badge, .fm-fold, .fm-tip { display: none; }
.fm-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.fm-brand__name { color: var(--f-side-ink); font-weight: 800; font-size: var(--f-fs-md); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fm-brand__sub { color: var(--f-side-ink-muted); font-size: var(--f-fs-xs); }
.fm-newbtn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; margin: 0 0 12px; border: 0; border-radius: 14px; background: var(--f-accent); color: var(--f-accent-ink);
  font: 700 var(--f-fs-md) var(--f-font); cursor: pointer; box-shadow: 0 10px 24px -10px var(--f-accent), inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.fm-newbtn svg { width: 18px; height: 18px; flex: none; }
.fm-newbtn:hover { filter: brightness(1.08); }
/* MENU-FIT (hotfix, Nov 26 2026): the list SCROLLS inside its own room and the foot stays under it. It used to be allowed to shrink under
   its own rows (min-height: 0) with nothing to scroll, so at a short window the last rows were drawn over the foot ("Get help" on top of
   "My Business Suite" at 1536 by 782). The 4px of padding (taken back by the margin) keeps a row's focus ring from being cut by the scroll
   box; position: relative keeps a word folded away for a screen reader (absolute, 1px) inside the list, or it stays where the list would
   have put it unscrolled and makes the whole menu scroll as well (two bars, Money folded at 560 tall); under two rows of room the whole menu scrolls instead (a phone on its side). Gate: verify_tack.py T25 (suite_menu_fit.py). */
.fm-menu { position: relative; display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 88px; margin: -4px; padding: 4px; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  scrollbar-color: rgba(255, 255, 255, 0.34) transparent; /* the portal's thin bar (app.css), light on the dark menu */ }
.fm-menu__item { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: var(--f-r-sm); color: var(--f-side-ink-muted);
  font-weight: 700; text-decoration: none; transition: background var(--f-t), color var(--f-t); }
.fm-menu__item svg { width: 20px; height: 20px; flex: none; }
.fm-menu__item:hover { background: var(--f-side-hover); color: var(--f-side-ink); }
.fm-menu__item.is-on { background: var(--f-side-active); color: var(--f-side-ink); box-shadow: inset 4px 0 0 var(--f-sig); }
.fm-menu__badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--f-r-pill); background: var(--f-hot); color: #FFFFFF;
  font-size: var(--f-fs-xs); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.fm-side__foot { display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--f-side-line); }
.fm-side__link { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 6px 12px; border-radius: var(--f-r-sm); color: var(--f-side-ink-muted);
  font-size: var(--f-fs-sm); font-weight: 700; text-decoration: none; }
.fm-side__link:hover { background: var(--f-side-hover); color: var(--f-side-ink); }
.fm-side__link svg { width: 18px; height: 18px; flex: none; }
.fm-powered { padding: 10px 12px 0; margin: 0; color: var(--f-side-ink-muted); font-size: var(--f-fs-xs); }

/* THE FOLD (a wide screen): the portal menu's button, widths and motion (app.css html.rail-collapsed), in Fitmark's colors */
@media (min-width: 961px) {
  html.rail-collapsed .fitmark-app { --f-side-w: 72px; }
  .fm-side { z-index: 25; }
  .fm-fold { display: inline-flex; align-items: center; justify-content: center; position: fixed; top: 19px; left: calc(var(--f-side-w) - 13px); z-index: 30;
    width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 1px solid rgba(204, 153, 255, 0.5); background: #200C42; color: var(--f-sig);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); cursor: pointer; transition: color var(--f-t), border-color var(--f-t); }
  .fm-fold svg { width: 15px; height: 15px; transition: transform .22s ease; }
  .fm-fold:hover { color: #FFFFFF; border-color: var(--f-sig); }
  .fm-fold:focus-visible { outline: 2px solid var(--f-sig); outline-offset: 2px; }
  html.rail-collapsed .fm-fold svg { transform: rotate(180deg); }
  html.fm-anim .fm-side { transition: width .22s ease; }
  html.fm-anim .fm-fold { transition: left .22s ease; }
  html.rail-collapsed .fm-side { padding-left: 10px; padding-right: 10px; overflow-x: hidden; }
  html.rail-collapsed .fm-product { display: none; }
  html.rail-collapsed .fm-brand { justify-content: center; gap: 0; padding: 4px 0 16px; }
  html.rail-collapsed .fm-brand__badge { display: block; position: absolute; right: -7px; bottom: -7px; width: 22px; height: 22px; border-radius: 7px; background: #1A0A36; padding: 1px; box-sizing: border-box; }
  html.rail-collapsed .fm-brand__badge img { display: block; width: 20px; height: 20px; }
  html.rail-collapsed .fm-brand__text,
  html.rail-collapsed .fm-menu__item > span:not(.fm-menu__badge),
  html.rail-collapsed .fm-side__link > span,
  html.rail-collapsed .fm-newbtn > span,
  html.rail-collapsed .fm-powered { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  html.rail-collapsed .fm-menu__item, html.rail-collapsed .fm-side__link { position: relative; justify-content: center; gap: 0; padding-left: 0; padding-right: 0; }
  html.rail-collapsed .fm-newbtn { width: 46px; margin-left: auto; margin-right: auto; }
  html.rail-collapsed .fm-menu__badge { position: absolute; top: 1px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; margin: 0; font-size: 0.66rem; }
  .fm-tip { display: block; position: fixed; left: 0; top: 0; z-index: 80; max-width: 280px; padding: 7px 11px; border-radius: 9px; background: #1A0A36;
    border: 1px solid rgba(204, 153, 255, 0.4); color: #FFFFFF; font-family: var(--f-font); font-size: 0.86rem; font-weight: 700; line-height: 1.3; white-space: nowrap;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35); pointer-events: none; opacity: 0; visibility: hidden; transform: translate(-4px, -50%);
    transition: opacity .12s ease, transform .12s ease, visibility 0s linear .12s; }
  .fm-tip.is-on { opacity: 1; visibility: visible; transform: translate(0, -50%); transition: opacity .12s ease, transform .12s ease; }
  .fm-tip__name, .fm-tip__sub { display: block; }
  .fm-tip__sub { margin-top: 1px; color: var(--f-side-ink-muted); font-size: 0.74rem; font-weight: 600; }
}
@media (prefers-reduced-motion: reduce) { html.fm-anim .fm-side, html.fm-anim .fm-fold, .fm-fold svg, .fm-tip, .fm-tip.is-on { transition: none; } }

.fm-main { min-width: 0; display: flex; flex-direction: column; }
.fm-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: var(--f-topbar-h); padding: 10px 28px; box-sizing: border-box;
  background: var(--f-bg); border-bottom: 1px solid var(--f-line); }
.fm-topbar__title { font-size: var(--f-fs-lg); font-weight: 800; color: var(--f-ink); margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-topbar__actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.fm-menubtn { display: none; width: 44px; height: 44px; flex: none; border-radius: var(--f-r-sm); border: 1px solid var(--f-line-strong); background: var(--f-surface); color: var(--f-ink); cursor: pointer; align-items: center; justify-content: center; }
.fm-menubtn svg { width: 20px; height: 20px; }
.fm-topbar [data-new-top] { display: none; }
.fm-iconbtn { position: relative; width: 42px; height: 42px; flex: none; border-radius: 12px; border: 1px solid var(--f-line-strong); background: var(--f-surface); color: var(--f-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.fm-iconbtn svg { width: 19px; height: 19px; }
.fm-bell__dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--f-hot); box-shadow: 0 0 0 2px var(--f-surface); }
.fm-bellwrap { position: relative; }
.fm-bellpop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(340px, 86vw); display: grid; padding: 6px; border-radius: 14px; background: var(--f-surface); box-shadow: var(--f-shadow-2); border: 1px solid var(--f-line); }
.fm-bellpop a, .fm-bellpop p { padding: 10px 12px; border-radius: 10px; color: var(--f-ink); font-size: var(--f-fs-sm); font-weight: 600; text-decoration: none; margin: 0; }
.fm-bellpop a:hover { background: var(--f-surface-2); }
.fm-bellpop small { display: block; color: var(--f-ink-muted); font-weight: 500; }
.fm-bellpop p { color: var(--f-ink-muted); font-weight: 500; }
.fitmark-app .fm-avatar { width: 42px; height: 42px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: #E9DDFB; color: #3A1774; font-weight: 800; font-size: var(--f-fs-sm); text-decoration: none; }
.fm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.fm-view { padding: 24px 28px 56px; max-width: 1320px; width: 100%; box-sizing: border-box; }
.fm-view:has(.fm-band) { max-width: none; }
.fm-closed { padding: 48px 28px; max-width: 640px; }
.fm-scrim { display: none; }

/* ------------------------------------------------------------------------------------------------------------------ TEXT AND LAYOUT */
.fm-h1 { font-size: var(--f-fs-2xl); font-weight: 800; line-height: 1.1; }
.fm-h2 { font-size: var(--f-fs-xl); font-weight: 800; margin: 0 0 4px; }
.fm-h3 { font-size: var(--f-fs-xs) !important; letter-spacing: 0.1em; text-transform: uppercase; color: var(--f-ink-muted) !important; font-family: var(--f-font) !important; font-weight: 800; margin: 0 0 12px !important; }
.fm-lede { color: var(--f-ink-muted); margin: 0 0 18px; max-width: 760px; }
.fm-muted { color: var(--f-ink-muted); }
.fm-small { font-size: var(--f-fs-sm); }
.fm-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-link { color: var(--f-accent); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.fm-link:hover { color: var(--f-accent-strong); }
.fm-back { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; color: var(--f-ink-muted); font-weight: 700; font-size: var(--f-fs-sm); text-decoration: none; margin-bottom: 8px; }
.fm-back:hover { color: var(--f-accent); }
.fm-back svg { width: 16px; height: 16px; flex: none; }
.fm-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.fm-row > * { min-width: 0; }
.fm-row-top { align-items: flex-start; }
.fm-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.fm-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fm-card { min-width: 0; background: var(--f-surface); border-radius: var(--f-r); padding: 22px 24px; box-shadow: var(--f-shadow-1); border: 1px solid rgba(22, 11, 46, 0.05); box-sizing: border-box; }
.fm-card + .fm-card { margin-top: 18px; }
.fm-grid > .fm-card + .fm-card, .fm-cols .fm-card + .fm-card { margin-top: 0; }
.fm-card__h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.fm-card__h > div { min-width: 0; flex: 1 1 220px; }
.fm-card__h h3 { font-family: var(--f-font); font-size: var(--money-fs-card-title); font-weight: 700; letter-spacing: -0.01em; }
.fm-card__h p { margin: 3px 0 0; color: var(--f-ink-muted); font-size: var(--money-fs-small); }
.fm-card-accent { box-shadow: 0 0 0 2px var(--f-accent) inset, var(--f-shadow-1); }
.fm-well { background: var(--f-surface-2); border-radius: var(--f-r-md); padding: 14px 16px; min-width: 0; }
.fm-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.fm-col { display: grid; gap: 20px; min-width: 0; align-content: start; }

/* the band: Fitmark's deep violet with its lilac glow; on Home it runs under the top bar and the first cards rise over its foot */
.fm-band { position: relative; isolation: isolate; margin: -24px -28px 0; padding: 26px 28px calc(var(--money-band-overlap) + 26px); background: var(--money-band); color: var(--money-band-fg); overflow: hidden; }
.fm-band::after { content: ''; position: absolute; inset: 0; z-index: -1; background-image: var(--money-grain); opacity: var(--money-grain-opacity); mix-blend-mode: overlay; pointer-events: none; }
.fm-rise { position: relative; margin-top: calc(-1 * var(--money-band-overlap)); }
.fm-shell.is-home .fm-main { position: relative; }
.fm-shell.is-home .fm-topbar { position: absolute; left: 0; right: 0; top: 0; background: transparent; border-bottom: 0; }
.fm-shell.is-home .fm-topbar__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fm-shell.is-home .fm-band { padding-top: calc(var(--f-topbar-h) + 34px); }
.fm-shell.is-home .fm-menubtn, .fm-shell.is-home .fm-iconbtn { background: var(--money-glass); border-color: var(--money-glass-line); color: #FFFFFF; }
.fm-shell.is-home .fm-bell__dot { box-shadow: 0 0 0 2px var(--fitmark-base); }
.fm-hello h2 { color: #FFFFFF; font-size: clamp(1.8rem, 3.1vw, var(--money-fs-greeting)); font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; }
.fm-hello h2 em { font-style: normal; color: var(--f-sig); }
.fm-hello p { margin: 8px 0 0; color: var(--money-band-fg-2); font-size: var(--f-fs-md); max-width: 640px; }
.fm-band__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 24px; }
.fm-band__top > * { min-width: 0; }
.fm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.fm-tile { container-type: inline-size; min-width: 0; padding: 18px 20px; border-radius: var(--money-r-band-tile); background: var(--money-glass); border: 1px solid var(--money-glass-line); backdrop-filter: blur(var(--money-glass-blur)); box-sizing: border-box; }
.fm-tile__label { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; color: var(--money-band-fg-2); font-weight: 600; font-size: var(--f-fs-sm); }
.fm-tile__label i { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.fm-tile__num { display: block; color: #FFFFFF; font-weight: 700; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; font-size: clamp(1.5rem, 14cqi, var(--money-fs-stat)); }
.fm-tile__sub { margin: 8px 0 0; color: var(--money-band-fg-2); font-size: var(--f-fs-sm); }

/* ------------------------------------------------------------------------------------------------------------------ CONTROLS */
.fm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 16px; border-radius: var(--f-r-pill); box-sizing: border-box;
  border: 1px solid var(--f-line-strong); background: var(--f-surface); color: var(--f-ink); font: inherit; font-size: var(--f-fs-sm); font-weight: 700; line-height: 1.2;
  cursor: pointer; text-decoration: none; text-align: center; transition: background var(--f-t), border-color var(--f-t), color var(--f-t); }
.fm-btn svg { width: 16px; height: 16px; flex: none; }
.fm-btn:hover { border-color: var(--f-accent); color: var(--f-accent); }
.fm-btn-primary, .fitmark-app a.fm-btn-primary { background: var(--f-accent); border-color: var(--f-accent); color: var(--f-accent-ink); }
.fm-btn-primary:hover, .fitmark-app a.fm-btn-primary:hover { background: var(--f-accent-strong); border-color: var(--f-accent-strong); color: var(--f-accent-ink); }
.fm-btn-danger { background: var(--f-neg-soft); border-color: var(--f-neg); color: var(--f-neg); }
.fm-btn-danger:hover { background: var(--f-neg); color: #FFFFFF; border-color: var(--f-neg); }
.fm-btn-quiet { border-color: transparent; background: transparent; color: var(--f-ink-2); }
.fm-btn-sm { min-height: 34px; padding: 5px 12px; font-size: var(--f-fs-xs); }
.fm-btn-block { width: 100%; }
.fm-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.fm-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fm-actions-end { justify-content: flex-end; }
.fm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fm-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 5px 13px; border-radius: var(--f-r-pill); border: 1px solid var(--f-line-strong); box-sizing: border-box;
  background: var(--f-surface); color: var(--f-ink-2); font: inherit; font-size: var(--f-fs-sm); font-weight: 700; cursor: pointer; text-decoration: none; }
.fm-chip:hover { border-color: var(--f-accent); color: var(--f-accent); }
.fm-chip.is-on, .fm-chip[aria-pressed="true"] { background: var(--f-accent-soft); border-color: var(--f-accent); color: var(--f-accent-strong); }
.fm-chip i { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.fm-chip__n { opacity: 0.75; font-size: var(--f-fs-xs); font-variant-numeric: tabular-nums; }
.fm-field { display: block; margin-bottom: 14px; min-width: 0; }
.fm-field > span { display: block; font-size: var(--f-fs-xs); letter-spacing: 0.07em; text-transform: uppercase; color: var(--f-ink-muted); font-weight: 800; margin-bottom: 6px; }
.fm-field small { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); margin-top: 6px; line-height: 1.45; }
.fm-input, .fm-field input:not([type=checkbox]):not([type=radio]), .fm-field select, .fm-field textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--f-r-sm); border: 1px solid var(--f-line-strong); background: var(--f-surface); box-sizing: border-box;
  color: var(--f-ink); font: inherit; font-size: var(--f-fs-md); transition: border-color var(--f-t), box-shadow var(--f-t); }
.fm-field textarea, textarea.fm-input { min-height: 84px; resize: vertical; line-height: 1.45; }
.fm-field select, select.fm-input { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23625B78' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; text-overflow: ellipsis; }
.fm-input:focus, .fm-field input:focus, .fm-field select:focus, .fm-field textarea:focus { outline: none; border-color: var(--f-accent); box-shadow: 0 0 0 3px var(--f-accent-soft); }
.fm-input[aria-invalid="true"], .fm-field [aria-invalid="true"], [data-path][aria-invalid="true"] { border-color: var(--f-neg) !important; box-shadow: 0 0 0 3px var(--f-neg-soft); }
.fm-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.fm-form-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fm-form-1 { grid-template-columns: minmax(0, 1fr); }
.fm-form .fm-span { grid-column: 1 / -1; }
.fm-check { display: flex; align-items: flex-start; gap: 10px; color: var(--f-ink-2); cursor: pointer; margin: 4px 0 12px; line-height: 1.45; min-width: 0; }
.fm-check input { margin-top: 2px; flex: none; width: 18px; height: 18px; accent-color: var(--f-accent); }
.fm-check > span { min-width: 0; }
.fm-err { margin: 6px 0 0; color: var(--f-neg); font-size: var(--f-fs-sm); }
.fm-ok { margin: 6px 0 0; color: var(--f-pos); font-size: var(--f-fs-sm); }
.fm-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 14px; background: var(--f-surface-3); max-width: 100%; box-sizing: border-box; }
.fm-seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--f-ink-2); font: 700 var(--f-fs-sm) var(--f-font); cursor: pointer; }
.fm-seg button[aria-pressed="true"] { background: var(--f-surface); color: var(--f-ink); box-shadow: 0 2px 8px rgba(22, 11, 46, 0.12); }
.fm-swatches { display: flex; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.fm-swatch { position: relative; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 2px solid var(--f-surface); box-shadow: 0 0 0 1px var(--f-line-strong); }
.fm-swatch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.fm-swatch:has(input:checked) { box-shadow: 0 0 0 3px var(--f-ink); }
.fm-swatch:has(input:focus-visible) { outline: var(--f-focus); outline-offset: 3px; }
.fm-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--f-ink-2); font-weight: 600; min-width: 0; }
.fm-switch input { appearance: none; -webkit-appearance: none; width: 40px; height: 24px; border-radius: 999px; background: var(--f-line-strong); position: relative; flex: none; margin: 0; cursor: pointer; transition: background var(--f-t); }
.fm-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; transition: left var(--f-t); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); }
.fm-switch input:checked { background: var(--f-accent); }
.fm-switch input:checked::after { left: 19px; }
.fm-switch input:disabled { opacity: 0.55; cursor: not-allowed; }

/* pills and temperature */
.fm-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--f-r-pill); padding: 3px 10px; font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; }
.fm-pill-muted { background: var(--f-quiet-soft); color: var(--f-quiet); }
.fm-pill-info { background: var(--f-info-soft); color: var(--f-info); }
.fm-pill-warn { background: var(--f-warn-soft); color: var(--f-warn); }
.fm-pill-ok { background: var(--f-pos-soft); color: var(--f-pos); }
.fm-pill-danger { background: var(--f-neg-soft); color: var(--f-neg); }
.fm-pill-accent { background: var(--f-accent-soft); color: var(--f-accent-strong); }
.fm-dotlive { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.fm-temp { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; flex: none; }
.fm-temp-hot { background: var(--f-hot); } .fm-temp-warm { background: var(--f-warm); } .fm-temp-cool { background: var(--f-cool); }
.fm-temp-none { background: transparent; border: 2px dashed var(--f-line-strong); box-sizing: border-box; }
.fm-tchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--f-r-pill); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.03em; white-space: nowrap; }
.fm-tchip-hot { background: var(--f-hot-soft); color: var(--f-hot-ink); } .fm-tchip-warm { background: var(--f-warm-soft); color: var(--f-warm-ink); } .fm-tchip-cool { background: var(--f-cool-soft); color: var(--f-cool-ink); }
.fm-has { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--f-r-pill); background: var(--f-pos-soft); color: var(--f-pos); font-size: var(--f-fs-xs); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.fm-miss { display: inline-flex; align-items: center; padding: 1px 8px; border-radius: var(--f-r-pill); border: 1.5px dashed var(--f-line-strong); color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.fm-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fm-templine { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }

/* lists */
.fm-list { background: var(--f-surface); border-radius: var(--f-r); overflow: hidden; box-shadow: var(--f-shadow-1); border: 1px solid rgba(22, 11, 46, 0.05); }
.fm-item { display: grid; grid-template-columns: 22px minmax(0, 1.5fr) minmax(0, 1.1fr) minmax(0, 0.9fr) auto; gap: 14px; align-items: center; padding: 14px 18px;
  border-top: 1px solid var(--f-line); color: var(--f-ink-2); text-decoration: none; transition: background var(--f-t); }
.fm-item:first-child { border-top: 0; }
a.fm-item:hover { background: var(--f-surface-2); }
.fm-item > * { min-width: 0; }
.fm-item__title { display: block; color: var(--f-ink); font-weight: 700; overflow-wrap: anywhere; }
.fm-item__sub { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-sm); overflow-wrap: anywhere; }
.fm-item__end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.fm-item__end small { color: var(--f-ink-muted); font-size: var(--f-fs-xs); white-space: nowrap; }
.fm-list__foot { padding: 12px 18px; border-top: 1px solid var(--f-line); color: var(--f-ink-muted); font-size: var(--f-fs-sm); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fm-empty { text-align: center; padding: 40px 20px; color: var(--f-ink-muted); }
.fm-empty h3 { font-size: var(--f-fs-lg); margin-bottom: 6px; }
.fm-empty p { max-width: 480px; margin: 0 auto 16px; }
.fm-loading { color: var(--f-ink-muted); padding: 36px 0; text-align: center; }
.fm-tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.fm-table { width: 100%; border-collapse: collapse; font-size: var(--f-fs-sm); font-variant-numeric: tabular-nums; color: var(--f-ink-2); }
.fm-table th, .fm-table td { padding: 9px 10px; text-align: left; border-top: 1px solid var(--f-line); vertical-align: top; }
.fm-table thead th { border-top: 0; background: var(--f-surface-2); color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.fm-table td.r, .fm-table th.r { text-align: right; white-space: nowrap; }
.fm-table tr.fm-sec td { background: var(--f-accent-soft); color: var(--f-accent-strong); font-weight: 800; }
.fm-table tr.fm-tot td { border-top: 2px solid var(--f-ink); font-weight: 800; color: var(--f-ink); }
.fm-notice { border-left: 3px solid var(--f-accent); background: var(--f-surface-2); color: var(--f-ink-2); font-size: var(--f-fs-sm); line-height: 1.55; padding: 10px 14px; border-radius: 0 var(--f-r-sm) var(--f-r-sm) 0; margin: 12px 0; }
.fm-notice-warn { border-left-color: var(--f-warn); background: var(--f-warn-soft); }
.fm-notice-bad { border-left-color: var(--f-neg); background: var(--f-neg-soft); }
.fm-note { color: var(--f-ink-muted); font-size: var(--f-fs-sm); line-height: 1.55; margin: 10px 0; }
.fm-timeline { list-style: none; margin: 0; padding: 0; }
.fm-timeline li { position: relative; padding: 0 0 14px 22px; color: var(--f-ink-2); }
.fm-timeline li::before { content: ''; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--f-accent); }
.fm-timeline li::after { content: ''; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--f-line); }
.fm-timeline li:last-child::after { display: none; }
.fm-timeline small { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); }

/* ------------------------------------------------------------------------------------------------------------------ HOME */
.fm-quizgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.fm-quiz { display: flex; flex-direction: column; gap: 12px; min-width: 0; background: var(--f-surface); border-radius: var(--f-r); padding: 20px 22px; box-shadow: var(--f-shadow-1); border: 1px solid rgba(22, 11, 46, 0.05); text-decoration: none; color: inherit; box-sizing: border-box; }
.fm-quiz:hover { box-shadow: var(--f-shadow-2); }
.fm-quiz__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.fm-quiz__top > :first-child { min-width: 0; }
.fm-quiz h3 { font-family: var(--f-font-display); font-size: 1.12rem; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.fm-quiz__meta { color: var(--f-ink-muted); font-size: var(--f-fs-sm); margin: 0; }
.fm-quiz__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--f-line); }
.fm-quiz__stats div { min-width: 0; }
.fm-quiz__stats b { display: block; color: var(--f-ink); font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fm-quiz__stats span { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); }
.fm-quiz-new { align-items: center; justify-content: center; text-align: center; border: 2px dashed var(--f-line-strong); background: transparent; box-shadow: none; cursor: pointer; font: inherit; min-height: 210px; }
.fm-quiz-new:hover { border-color: var(--f-accent); color: var(--f-accent); box-shadow: none; }
.fm-quiz-new svg { width: 30px; height: 30px; color: var(--f-accent); }
.fm-hotstrip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.fm-hotcard { display: grid; gap: 6px; min-width: 0; padding: 14px 16px; border-radius: var(--f-r-md); background: var(--f-surface-2); border-left: 4px solid var(--f-hot); text-decoration: none; color: inherit; }
.fm-hotcard:hover { background: var(--f-accent-soft); }
.fm-hotcard b { color: var(--f-ink); overflow-wrap: anywhere; }
.fm-hotcard small { color: var(--f-ink-muted); font-size: var(--f-fs-xs); overflow-wrap: anywhere; }
.fm-hotcard .fm-call { color: var(--f-hot-ink); font-weight: 800; font-size: var(--f-fs-xs); }

/* ------------------------------------------------------------------------------------------------------------------ THE BUILDER */
.fm-bhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.fm-bhead__name { min-width: 0; flex: 1 1 320px; }
.fm-bhead__name input { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: transparent; border-radius: var(--f-r-sm); padding: 4px 8px; margin-left: -8px;
  font: 800 1.55rem/1.25 var(--f-font-display); letter-spacing: -0.02em; color: var(--f-ink);
  text-overflow: ellipsis; }   /* a long quiz name ends with an ellipsis, never cut mid word; the full name is its title (verify_fitmark F5) */
.fm-bhead__name input:hover { border-color: var(--f-line); }
.fm-bhead__name input:focus { outline: none; border-color: var(--f-accent); background: var(--f-surface); }
.fm-bhead__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--f-ink-muted); font-size: var(--f-fs-sm); margin-top: 4px; }
.fm-save { display: inline-flex; align-items: center; gap: 6px; }
.fm-save i { width: 8px; height: 8px; border-radius: 50%; background: var(--f-pos); }
.fm-save.is-busy i { background: var(--f-warn); }
.fm-save.is-bad i { background: var(--f-neg); }
/* in place of Publish changes when the server says the draft is what is live (b_share.js publishControl) */
.fm-pubslot { display: inline-flex; align-items: center; min-width: 0; }
.fm-nochange { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 4px; color: var(--f-ink-muted); font-size: var(--f-fs-sm); font-weight: 700; }
.fm-nochange i { width: 8px; height: 8px; border-radius: 50%; background: var(--f-pos); flex: none; }
.fm-tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 14px 0 20px; border-bottom: 1px solid var(--f-line); }
.fm-tabs::-webkit-scrollbar { display: none; }
.fm-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; color: var(--f-ink-muted); font-weight: 700; font-size: var(--f-fs-sm);
  text-decoration: none; border: 0; border-bottom: 3px solid transparent; background: none; cursor: pointer; white-space: nowrap; font-family: inherit; }
.fm-tab:hover { color: var(--f-ink); }
.fm-tab[aria-selected="true"] { color: var(--f-accent); border-bottom-color: var(--f-accent); }
.fm-tab__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--f-neg); color: #FFFFFF; font-size: 0.7rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; }
.fm-tab__n.is-warn { background: var(--f-warn); }
.fm-work { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.fm-work.no-preview { grid-template-columns: minmax(0, 1fr); }
.fm-work > * { min-width: 0; }
.fm-pane { position: sticky; top: calc(var(--f-topbar-h) + 16px); max-height: calc(100vh - var(--f-topbar-h) - 32px); overflow: auto; }
.fm-qcard { position: relative; background: var(--f-surface); border-radius: var(--f-r); padding: 18px 20px 16px; box-shadow: var(--f-shadow-1); border: 1px solid rgba(22, 11, 46, 0.05); margin-bottom: 16px; min-width: 0; }
.fm-qcard.is-flash, .is-flash { animation: fmFlash 1.4s ease; }
@keyframes fmFlash { 0%, 40% { box-shadow: 0 0 0 3px var(--f-accent), var(--f-shadow-1); } 100% { box-shadow: var(--f-shadow-1); } }
@media (prefers-reduced-motion: reduce) { .fm-qcard.is-flash, .is-flash { animation: none; outline: 3px solid var(--f-accent); } }
.fm-qcard__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.fm-qcard__n { width: 30px; height: 30px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--f-accent-soft); color: var(--f-accent-strong); font-weight: 800; font-size: var(--f-fs-sm); }
.fm-qcard__type { flex: 1 1 160px; min-width: 0; color: var(--f-ink-muted); font-size: var(--f-fs-sm); font-weight: 700; }
.fm-qcard__tools { display: flex; gap: 4px; flex-wrap: wrap; }
.fm-ibtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--f-line); background: var(--f-surface); color: var(--f-ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 0; }
.fm-ibtn svg { width: 16px; height: 16px; }
.fm-ibtn:hover { border-color: var(--f-accent); color: var(--f-accent); }
.fm-ibtn:disabled { opacity: 0.35; cursor: default; }
.fm-ibtn-bad:hover { border-color: var(--f-neg); color: var(--f-neg); }
.fm-opts { display: grid; gap: 8px; margin: 4px 0 10px; }
.fm-opt { display: grid; grid-template-columns: minmax(0, 1fr) 96px 36px; gap: 8px; align-items: start; }
.fm-opt input { width: 100%; box-sizing: border-box; }
.fm-pts { position: relative; }
.fm-pts input { padding-right: 34px !important; text-align: right; }
.fm-pts::after { content: attr(data-unit); position: absolute; right: 10px; top: 12px; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 700; pointer-events: none; }
.fm-opt__h { display: grid; grid-template-columns: minmax(0, 1fr) 96px 36px; gap: 8px; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.fm-scalepts { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin-bottom: 12px; }
.fm-scalepts label { display: grid; gap: 4px; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 700; min-width: 0; }
.fm-more { margin-top: 6px; border-top: 1px dashed var(--f-line); padding-top: 10px; }
.fm-more > summary { cursor: pointer; color: var(--f-ink-2); font-weight: 700; font-size: var(--f-fs-sm); list-style: none; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.fm-more > summary::-webkit-details-marker { display: none; }
.fm-more > summary::before { content: '+'; display: inline-flex; width: 18px; height: 18px; border-radius: 6px; background: var(--f-surface-3); align-items: center; justify-content: center; font-weight: 800; }
.fm-more[open] > summary::before { content: '\2212'; }
.fm-more__body { padding-top: 10px; }
.fm-issue { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 0; color: var(--f-neg); font-size: var(--f-fs-sm); font-weight: 600; line-height: 1.4; }
.fm-issue.is-warn { color: var(--f-warn); }
.fm-issue svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.fm-issues { display: grid; gap: 8px; }
.fm-issuebtn { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; width: 100%; text-align: left; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--f-line);
  background: var(--f-surface); color: var(--f-ink-2); font: inherit; font-size: var(--f-fs-sm); cursor: pointer; box-sizing: border-box; }
.fm-issuebtn:hover { border-color: var(--f-accent); }
.fm-issuebtn i { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; font-size: 0.8rem; color: #FFFFFF; background: var(--f-neg); }
.fm-issuebtn.is-warn i { background: var(--f-warn); }
.fm-issuebtn b { display: block; color: var(--f-ink); font-size: var(--f-fs-xs); text-transform: uppercase; letter-spacing: 0.05em; }
.fm-issuebtn span { min-width: 0; overflow-wrap: anywhere; }
.fm-addrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 18px; }
.fm-blocks { display: grid; gap: 10px; margin-bottom: 12px; }
.fm-block { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.fm-block__tools { display: flex; gap: 4px; }
.fm-btnrow { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) 36px; gap: 8px; align-items: start; margin-bottom: 8px; }
.fm-rcard__color { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.fm-why3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.fm-why3 div { padding: 12px 14px; border-radius: 12px; background: var(--f-surface-2); min-width: 0; }
.fm-why3 b { display: block; color: var(--f-ink); }
.fm-why3 span { color: var(--f-ink-muted); font-size: var(--f-fs-sm); }

/* the scoring sheet */
.fm-sheet td.fm-sheet__q { color: var(--f-ink); font-weight: 700; }
.fm-sheet td.fm-sheet__q small { display: block; color: var(--f-ink-muted); font-weight: 500; }
.fm-sheet .fm-sheet__pts input { width: 78px; min-height: 36px; padding: 6px 8px; text-align: right; border-radius: 8px; border: 1px solid var(--f-line-strong); font: inherit; color: var(--f-ink); background: var(--f-surface); box-sizing: border-box; }
.fm-sheet tr.fm-sheet__qrow td { background: var(--f-surface-2); border-top: 2px solid var(--f-line); }
.fm-sheet td.fm-sheet__a { padding-left: 26px; }
.fm-share { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.fm-share i { display: block; height: 8px; border-radius: 4px; background: var(--f-accent); min-width: 2px; }
.fm-scorebar { margin: 4px 0 6px; }
.fm-scorebar__track { display: flex; height: 22px; border-radius: 8px; overflow: hidden; background: var(--f-surface-3); }
.fm-scorebar__track span { display: block; height: 100%; min-width: 2px; border-right: 2px solid var(--f-surface); box-sizing: border-box; }
.fm-scorebar__track span:last-child { border-right: 0; }
.fm-scorebar__ticks { display: flex; justify-content: space-between; color: var(--f-ink-muted); font-size: var(--f-fs-xs); margin-top: 4px; font-variant-numeric: tabular-nums; }
.fm-legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--f-fs-sm); color: var(--f-ink-2); }
.fm-legend li { display: inline-flex; align-items: center; gap: 7px; min-width: 0; }
.fm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; }
.fm-legend b { color: var(--f-ink); font-variant-numeric: tabular-nums; }
.fm-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 12px; }
.fm-cats div { padding: 10px 12px; border-radius: 12px; background: var(--f-surface-2); min-width: 0; }
.fm-cats b { display: block; color: var(--f-ink); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.fm-cats span { color: var(--f-ink-muted); font-size: var(--f-fs-xs); overflow-wrap: anywhere; }
.fm-rule { border: 1px solid var(--f-line); border-radius: 14px; padding: 14px 14px 6px; margin-bottom: 12px; background: var(--f-surface); min-width: 0; }
.fm-rule__h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fm-rule__h b { color: var(--f-ink); }
.fm-rule__h input { flex: 1 1 200px; min-width: 0; }
.fm-cond { display: grid; grid-template-columns: 54px minmax(0, 1fr) 36px; gap: 8px; align-items: start; margin-bottom: 8px; }
.fm-cond__and { color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 13px; }
.fm-cond__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; min-width: 0; }
.fm-cond__body > select { grid-column: 1 / -1; }
.fm-cond__opts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 4px 2px; }
.fm-cond__opts label { display: inline-flex; gap: 6px; align-items: center; color: var(--f-ink-2); font-size: var(--f-fs-sm); min-width: 0; }
.fm-cond__opts input { width: 16px; height: 16px; accent-color: var(--f-accent); flex: none; }
.fm-thento { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; margin: 4px 0 10px; }
.fm-thento > span { color: var(--f-ink); font-weight: 700; font-size: var(--f-fs-sm); }
.fm-range { display: grid; grid-template-columns: 90px 90px minmax(0, 1fr) 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.fm-range__h { display: grid; grid-template-columns: 90px 90px minmax(0, 1fr) 36px; gap: 8px; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.fm-signal { border-top: 1px solid var(--f-line); padding-top: 14px; margin-top: 14px; }
.fm-signal:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.fm-signal h4 { font-family: var(--f-font); font-size: var(--f-fs-md); font-weight: 700; margin-bottom: 8px; }
.fm-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 14px; margin-bottom: 8px; }
.fm-pick label { display: flex; align-items: flex-start; gap: 8px; color: var(--f-ink-2); font-size: var(--f-fs-sm); line-height: 1.4; min-width: 0; }
.fm-pick input { width: 17px; height: 17px; flex: none; margin-top: 1px; accent-color: var(--f-accent); }
.fm-pick label span { min-width: 0; overflow-wrap: anywhere; }

/* test a path and where people land */
.fm-path { display: grid; gap: 14px; }
.fm-path__q { min-width: 0; }
.fm-path__q > b { display: block; color: var(--f-ink); font-size: var(--f-fs-sm); margin-bottom: 6px; overflow-wrap: anywhere; }
.fm-path__q.is-skipped { opacity: 0.55; }
.fm-path__q small { color: var(--f-ink-muted); font-size: var(--f-fs-xs); }
.fm-answers { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-answers button { min-height: 34px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--f-line-strong); background: var(--f-surface); color: var(--f-ink-2); font: 600 var(--f-fs-sm) var(--f-font); cursor: pointer; text-align: left; max-width: 100%; overflow-wrap: anywhere; line-height: 1.3; }
.fm-answers button[aria-pressed="true"] { background: var(--f-accent); border-color: var(--f-accent); color: var(--f-accent-ink); }
.fm-outcome { display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: linear-gradient(150deg, #2B1056, #3A1774 60%, #47208C); color: #FFFFFF; min-width: 0; }
.fm-outcome__big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fm-outcome__big b { font-size: 2.6rem; line-height: 1; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #FFFFFF; }
.fm-outcome__big span { color: var(--money-band-fg-2); font-weight: 600; }
.fm-outcome__result { font-family: var(--f-font-display); font-size: 1.3rem; font-weight: 700; color: var(--f-sig); line-height: 1.25; overflow-wrap: anywhere; }
.fm-outcome p { margin: 0; color: #E8E0F8; line-height: 1.5; }
.fm-outcome .fm-cats div { background: rgba(255, 255, 255, 0.08); }
.fm-outcome .fm-cats b { color: #FFFFFF; }
.fm-outcome .fm-cats span { color: var(--money-band-fg-2); }
.fm-land { display: grid; gap: 12px; }
.fm-hbar { display: grid; grid-template-columns: minmax(96px, 36%) minmax(40px, 1fr) auto; align-items: center; gap: 12px; }
.fm-hbar__label { color: var(--f-ink-2); font-size: var(--f-fs-sm); font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.fm-hbar__label small { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 500; }
.fm-hbar__track { display: block; height: 12px; border-radius: 999px; background: var(--f-grid); overflow: hidden; position: relative; }
.fm-hbar__track i { display: block; height: 100%; border-radius: inherit; }
.fm-hbar__track i + i { position: absolute; left: 0; top: 0; opacity: 0.45; }
.fm-hbar__val { color: var(--f-ink); font-weight: 700; font-size: var(--f-fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.fm-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fm-trio div { padding: 12px; border-radius: 12px; background: var(--f-surface-2); min-width: 0; }
.fm-trio b { display: block; color: var(--f-ink); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.fm-trio span { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); }

/* the preview (the taker's view, with a Test ribbon) */
.fm-preview { position: relative; border-radius: 22px; overflow: hidden; background: #FFFFFF; border: 1px solid var(--f-line); box-shadow: var(--f-shadow-2); min-width: 0; }
.fm-preview__ribbon { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 14px; background: #FFE9A8; color: #5A3F00; font-weight: 800; font-size: var(--f-fs-xs); letter-spacing: 0.06em; text-transform: uppercase; }
.fm-preview__ribbon button { border: 0; background: rgba(0, 0, 0, 0.08); color: inherit; font: inherit; padding: 4px 10px; border-radius: 999px; cursor: pointer; letter-spacing: 0.04em; }
.fm-preview__body { padding: 22px 22px 24px; display: grid; gap: 14px; min-height: 360px; align-content: start; color: #1D1B22; }
.fm-preview__biz { display: flex; align-items: center; gap: 10px; color: #4A4656; font-weight: 700; font-size: var(--f-fs-sm); min-width: 0; }
.fm-preview__biz span:last-child { min-width: 0; overflow-wrap: anywhere; }
.fm-preview__logo { width: 30px; height: 30px; border-radius: 9px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--f-accent); color: #FFFFFF; font-size: 0.75rem; font-weight: 800; }
.fm-preview h3 { font-family: var(--f-font-display); font-size: 1.35rem; color: #141218; line-height: 1.2; overflow-wrap: anywhere; }
.fm-preview p { margin: 0; color: #4A4656; overflow-wrap: anywhere; }
.fm-preview__bar { height: 6px; border-radius: 3px; background: #EEEAF4; overflow: hidden; }
.fm-preview__bar i { display: block; height: 100%; background: var(--f-accent); border-radius: inherit; }
.fm-preview__opts { display: grid; gap: 8px; }
.fm-preview__opts button { text-align: left; min-height: 46px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid #DDD8E6; background: #FFFFFF; color: #1D1B22; font: 600 var(--f-fs-base) var(--f-font); cursor: pointer; line-height: 1.35; overflow-wrap: anywhere; }
.fm-preview__opts button:hover { border-color: var(--f-accent); }
.fm-preview__opts button[aria-pressed="true"] { border-color: var(--f-accent); background: var(--f-accent-soft); }
.fm-preview__scale { display: grid; grid-template-columns: repeat(auto-fit, minmax(36px, 1fr)); gap: 6px; }
.fm-preview__scale button { min-height: 42px; border-radius: 10px; border: 1.5px solid #DDD8E6; background: #FFFFFF; font: 700 var(--f-fs-sm) var(--f-font); cursor: pointer; color: #1D1B22; }
.fm-preview__scale button[aria-pressed="true"] { background: var(--f-accent); border-color: var(--f-accent); color: #FFFFFF; }
.fm-preview__ends { display: flex; justify-content: space-between; gap: 10px; color: #6A6577; font-size: var(--f-fs-xs); }
.fm-preview__ends span { min-width: 0; overflow-wrap: anywhere; }
.fm-preview__nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.fm-preview__badge { justify-self: center; color: #6A6577; font-size: var(--f-fs-xs); }
.fm-preview__field { display: grid; gap: 4px; }
.fm-preview__field span { color: #4A4656; font-size: var(--f-fs-xs); font-weight: 700; }
.fm-preview__field input { min-height: 42px; border-radius: 10px; border: 1.5px solid #DDD8E6; padding: 8px 12px; font: inherit; color: #1D1B22; width: 100%; box-sizing: border-box; }
.fm-preview__consent { display: flex; gap: 8px; align-items: flex-start; color: #4A4656; font-size: var(--f-fs-sm); line-height: 1.4; }
.fm-preview__consent input { margin-top: 2px; flex: none; accent-color: var(--f-accent); }
.fm-rpage { display: grid; gap: 12px; min-width: 0; }
.fm-rpage h3 { font-size: 1.4rem; }
.fm-rpage h4 { font-family: var(--f-font-display); font-size: 1.1rem; color: #141218; overflow-wrap: anywhere; }
.fm-rpage ul { margin: 0; padding-left: 20px; color: #4A4656; display: grid; gap: 4px; }
.fm-rpage .fm-callout { padding: 12px 14px; border-radius: 12px; background: var(--f-accent-soft); color: #2A2433; font-weight: 600; }
.fm-rpage a { color: var(--f-accent); }
.fm-rpage__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.fm-rpage__btns a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px; background: var(--f-accent); color: #FFFFFF !important; font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.fm-rpage__score { display: flex; align-items: baseline; gap: 8px; color: #141218; }
.fm-rpage__score b { font-size: 2rem; font-variant-numeric: tabular-nums; }

/* the share tab */
.fm-qr { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: center; }
.fm-qr img { width: 180px; height: 180px; display: block; border-radius: 12px; background: #FFFFFF; border: 1px solid var(--f-line); padding: 8px; box-sizing: border-box; }
.fm-code { position: relative; }
.fm-code pre { margin: 0; padding: 14px 16px; border-radius: 12px; background: #1A0A36; color: #EDE5FF; font: 500 0.8rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-all; max-height: 220px; overflow: auto; }
.fm-copyline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.fm-copyline code { display: block; padding: 10px 12px; border-radius: 10px; background: var(--f-surface-2); border: 1px solid var(--f-line); color: var(--f-ink); font: 600 0.86rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; }
.fm-status { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.fm-status > div { min-width: 0; flex: 1 1 260px; }
.fm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fm-steps li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; color: var(--f-ink-2); }
.fm-steps li > i { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 0.75rem; font-weight: 800; background: var(--f-surface-3); color: var(--f-ink-2); }
.fm-steps li.is-ok > i { background: var(--f-pos); color: #FFFFFF; }
.fm-steps li.is-bad > i { background: var(--f-neg); color: #FFFFFF; }
.fm-steps li.is-wait > i { background: var(--f-warn); color: #FFFFFF; }

/* templates and guided setup */
.fm-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.fm-tpl { display: grid; gap: 8px; align-content: start; text-align: left; padding: 16px 18px; border-radius: 16px; border: 1.5px solid var(--f-line); background: var(--f-surface); cursor: pointer; font: inherit; color: var(--f-ink-2); min-width: 0; box-sizing: border-box; }
.fm-tpl:hover, .fm-tpl[aria-pressed="true"] { border-color: var(--f-accent); box-shadow: 0 0 0 3px var(--f-accent-soft); }
.fm-tpl b { color: var(--f-ink); font-family: var(--f-font-display); font-size: 1.08rem; overflow-wrap: anywhere; }
.fm-tpl small { color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; overflow-wrap: anywhere; }
.fm-tpl span { font-size: var(--f-fs-sm); overflow-wrap: anywhere; }
.fm-tpl ul { margin: 0; padding-left: 18px; font-size: var(--f-fs-sm); color: var(--f-ink-2); }
.fm-rank { display: grid; gap: 6px; }
.fm-rank li { list-style: none; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--f-surface); border: 1px solid var(--f-line); cursor: grab; }
.fm-rank li.is-drag { opacity: 0.5; }
.fm-rank li > i { width: 26px; height: 26px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-weight: 800; background: var(--f-accent-soft); color: var(--f-accent-strong); font-size: 0.8rem; }
.fm-rank li > span { min-width: 0; overflow-wrap: anywhere; color: var(--f-ink); font-weight: 600; }
.fm-rank__ends { display: flex; justify-content: space-between; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; margin: 8px 2px 4px; }
.fm-gsteps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fm-gsteps span { padding: 4px 10px; border-radius: 999px; background: var(--f-surface-3); color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; }
.fm-gsteps span.is-on { background: var(--f-accent); color: var(--f-accent-ink); }
.fm-change td.is-new { color: var(--f-accent-strong); font-weight: 800; }

/* ------------------------------------------------------------------------------------------------------------------ CHARTS */
.fm-chart { position: relative; min-width: 0; }
.fm-chart svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--f-font); }
.fm-chart text { fill: var(--f-axis); font-size: 11px; }
.fm-chart .fm-chart__grid { stroke: var(--f-grid); stroke-width: 1; }
.fm-chart .fm-chart__val { fill: var(--f-ink); font-weight: 700; }
.fm-chart .fm-chart__center { fill: var(--f-ink); font-weight: 800; }
.fm-chart .fm-chart__centersub { fill: var(--f-ink-muted); }
.fm-chart[data-chart="line"], .fm-chart[data-chart="funnel"] { container-type: inline-size; }
@container (max-width: 560px) { .fm-chart[data-chart="line"] svg text, .fm-chart[data-chart="funnel"] svg text { font-size: 20px; } }
.fm-chart-empty { color: var(--f-ink-muted); padding: 26px 0; text-align: center; }
.fm-funnel { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.fm-funnel__step { position: relative; padding: 14px 16px 16px; min-width: 0; border-left: 1px solid var(--f-line); }
.fm-funnel__step:first-child { border-left: 0; }
.fm-funnel__step span { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.fm-funnel__step b { display: block; color: var(--f-ink); font-size: 1.9rem; line-height: 1.1; font-variant-numeric: tabular-nums; margin: 4px 0; }
.fm-funnel__step small { display: block; color: var(--f-ink-muted); font-size: var(--f-fs-xs); }
.fm-funnel__step em { font-style: normal; color: var(--f-accent-strong); font-weight: 800; }
.fm-donutrow { display: grid; grid-template-columns: minmax(0, 170px) minmax(0, 1fr); gap: 20px; align-items: center; container-type: inline-size; }
.fm-donutrow svg { max-width: 170px; margin: 0 auto; }
@container (max-width: 380px) { .fm-donutrow { grid-template-columns: minmax(0, 1fr); } }
.fm-legend-col { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: var(--f-fs-sm); color: var(--f-ink-2); }
.fm-legend-col li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: baseline; gap: 8px; }
.fm-legend-col i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.fm-legend-col span { min-width: 0; overflow-wrap: anywhere; }
.fm-legend-col b { color: var(--f-ink); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fm-segbar { display: flex; gap: 2px; height: 16px; border-radius: 8px; overflow: hidden; margin-bottom: 16px; background: var(--f-surface-3); }
.fm-segbar span { display: block; min-width: 4px; }

/* ------------------------------------------------------------------------------------------------------------------ THE LEAD CARD */
.fm-lead-h { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 18px; }
.fm-lead-h > div { min-width: 0; flex: 1 1 320px; }
.fm-lead-h h2 { font-size: 1.7rem; overflow-wrap: anywhere; }
.fm-lead-h p { margin: 4px 0 0; color: var(--f-ink-muted); overflow-wrap: anywhere; }
.fm-contact { display: grid; gap: 8px; margin: 0; }
.fm-contact div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; }
.fm-contact dt { color: var(--f-ink-muted); font-size: var(--f-fs-sm); }
.fm-contact dd { margin: 0; color: var(--f-ink); font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.fm-math td.r b { color: var(--f-ink); }
.fm-math td small { display: block; color: var(--f-ink-muted); }
.fm-bigtemp { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 16px; border-radius: 16px; }
.fm-bigtemp > i { width: 44px; height: 44px; border-radius: 50%; }
.fm-bigtemp b { display: block; color: var(--f-ink); font-size: 1.05rem; overflow-wrap: anywhere; }
.fm-bigtemp span { color: var(--f-ink-2); font-size: var(--f-fs-sm); }
.fm-bigtemp-hot { background: var(--f-hot-soft); } .fm-bigtemp-hot > i { background: var(--f-hot); }
.fm-bigtemp-warm { background: var(--f-warm-soft); } .fm-bigtemp-warm > i { background: var(--f-warm); }
.fm-bigtemp-cool { background: var(--f-cool-soft); } .fm-bigtemp-cool > i { background: var(--f-cool); }
.fm-bigtemp-none { background: var(--f-surface-2); } .fm-bigtemp-none > i { border: 2px dashed var(--f-line-strong); box-sizing: border-box; }
.fm-consent { padding: 10px 12px; border-radius: 12px; background: var(--f-surface-2); margin-bottom: 8px; }
.fm-consent q { display: block; color: var(--f-ink); quotes: none; font-weight: 600; overflow-wrap: anywhere; }
.fm-consent small { color: var(--f-ink-muted); font-size: var(--f-fs-xs); }
.fm-statusbtns { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-filters { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }

/* ------------------------------------------------------------------------------------------------------------------ DIALOGS AND TOASTS */
.fm-modal { position: fixed; inset: 0; z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; background: var(--f-scrim); }
.fm-modal.is-open { display: flex; }
.fm-modal__panel { width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; background: var(--f-surface); color: var(--f-ink-2); border-radius: var(--f-r-xl); box-shadow: var(--f-shadow-3); padding: 24px; box-sizing: border-box; }
.fm-modal__panel-wide { max-width: 820px; }
.fm-modal__panel-xl { max-width: 1060px; }
.fm-modal__title { font-size: var(--f-fs-xl); margin: 0 0 8px !important; overflow-wrap: anywhere; }
.fm-modal__body { color: var(--f-ink-2); line-height: 1.55; }
.fm-modal__actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 20px; }
.fm-modal .fm-form { margin-top: 14px; }
.fm-toast { position: fixed; left: 50%; bottom: 28px; z-index: 1100; transform: translateX(-50%) translateY(20px); max-width: min(560px, calc(100vw - 32px)); box-sizing: border-box;
  background: var(--f-ink); color: #FFFFFF; padding: 12px 20px; border-radius: var(--f-r-pill); font-size: var(--f-fs-sm); font-weight: 700;
  box-shadow: var(--f-shadow-2); opacity: 0; pointer-events: none; transition: opacity var(--f-t), transform var(--f-t); }
.fm-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ------------------------------------------------------------------------------------------------------------------ SMALLER SCREENS */
@media (max-width: 1360px) { .fm-work { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 1180px) {
  .fm-work { grid-template-columns: minmax(0, 1fr); }
  .fm-pane { display: none; }
  .fm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-cols { grid-template-columns: minmax(0, 1fr); }
  .fm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fm-filters > :first-child { grid-column: 1 / -1; }
}
@media (min-width: 1181px) { .fm-only-narrow { display: none !important; } }
@media (max-width: 960px) {
  .fm-shell { grid-template-columns: minmax(0, 1fr); }
  .fm-side { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform var(--f-t); box-shadow: var(--f-shadow-3); }
  .fm-shell.is-menu .fm-side { transform: none; }
  .fm-shell.is-menu .fm-scrim { display: block; position: fixed; inset: 0; z-index: 55; background: var(--f-scrim); }
  .fm-menubtn { display: inline-flex; }
  .fm-topbar { padding: 8px 14px; }
  .fm-newbtn { display: none; }
  .fm-topbar [data-new-top] { display: inline-flex; }
  .fm-grid { grid-template-columns: minmax(0, 1fr); }
  .fm-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fm-filters > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .fm-view { padding: 14px 14px 48px; }
  .fm-band { margin: -14px -14px 0; padding: 20px 14px calc(56px + 20px); }
  .fm-shell.is-home .fm-band { padding-top: calc(var(--f-topbar-h) + 20px); }
  .fm-rise { margin-top: -56px; }
  .fm-tiles { gap: 10px; }
  .fm-tile { padding: 14px; }
  .fm-card { padding: 18px 16px; border-radius: 18px; }
  .fm-qcard { padding: 16px 14px 14px; }
  .fm-form, .fm-form-3, .fm-grid-3, .fm-why3, .fm-trio { grid-template-columns: minmax(0, 1fr); }
  .fm-item { grid-template-columns: 18px minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px; }
  .fm-item > .fm-item__mid { grid-column: 2; }
  .fm-item > .fm-item__res { grid-column: 2; }
  .fm-item > .fm-item__end { grid-column: 3; grid-row: 1; }
  .fm-opt, .fm-opt__h { grid-template-columns: minmax(0, 1fr) 84px 36px; }
  .fm-block { grid-template-columns: minmax(0, 1fr) auto; }
  .fm-block > textarea { grid-column: 1 / -1; grid-row: 2; }
  .fm-btnrow { grid-template-columns: minmax(0, 1fr) 36px; }
  .fm-btnrow > :nth-child(2) { grid-column: 1; grid-row: 2; }
  .fm-btnrow > :nth-child(3) { grid-column: 2; grid-row: 1; }
  .fm-range { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 36px; }
  .fm-range > select { grid-column: 1 / span 2; grid-row: 2; }
  .fm-range > .fm-ibtn { grid-column: 3; grid-row: 1; }
  .fm-range__h { display: none; }
  .fm-cond { grid-template-columns: minmax(0, 1fr) 36px; }
  .fm-cond__and { grid-column: 1 / -1; padding-top: 0; }
  .fm-pick { grid-template-columns: minmax(0, 1fr); }
  .fm-qr { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .fm-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-funnel__step:nth-child(3) { border-left: 0; }
  .fm-funnel__step:nth-child(n+3) { border-top: 1px solid var(--f-line); }
  .fm-hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .fm-hbar__track { grid-column: 1 / -1; grid-row: 2; }
  .fm-modal { padding: 10px; align-items: flex-end; }
  .fm-modal__panel { max-height: 92vh; padding: 20px 16px; border-radius: 22px; }
  .fm-bhead__name input { font-size: 1.3rem; }
  .fm-contact div { grid-template-columns: 80px minmax(0, 1fr); }
  .fm-filters { grid-template-columns: minmax(0, 1fr); }
  .fm-hotstrip { grid-auto-columns: minmax(220px, 80%); }
  .fm-quizgrid { grid-template-columns: minmax(0, 1fr); }
  /* A TABLE THAT STACKS ON A PHONE (stream F4, Nov 26 2026): a table marked fm-stack never scrolls sideways inside its card. Each row
     becomes a wrapping line, an empty cell takes no room, and a cell with data-label says its column's name (the head is kept for screen
     readers only). The scoring sheet: the question on its own line, then each answer with its points field beside it. */
  .fm-table.fm-stack, .fm-table.fm-stack tbody { display: block; }
  .fm-table.fm-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fm-table.fm-stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 9px 10px; border-top: 1px solid var(--f-line); }
  .fm-table.fm-stack tbody tr:first-child { border-top: 0; }
  .fm-table.fm-stack tr > td { display: block; padding: 0; border: 0; background: none; min-width: 0; text-align: left; white-space: normal; overflow-wrap: anywhere; }
  .fm-table.fm-stack tr > td:empty { display: none; }
  .fm-table.fm-stack td[data-label]::before { content: attr(data-label); margin-right: 6px; color: var(--f-ink-muted); font-size: var(--f-fs-xs); font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }
  .fm-table.fm-stack tr.fm-tot { border-top: 2px solid var(--f-ink); }
  .fm-table.fm-stack tr > td.fm-stack__main { flex: 1 0 100%; }
  .fm-table.fm-stack tr > td.fm-stack__grow { flex: 1 1 0; }
  .fm-table.fm-stack tr.fm-sec { background: var(--f-accent-soft); color: var(--f-accent-strong); font-weight: 800; }
  .fm-sheet.fm-stack tr.fm-sheet__qrow { background: var(--f-surface-2); border-top: 2px solid var(--f-line); }
  .fm-sheet.fm-stack tr > td.fm-sheet__q { flex: 1 0 100%; }
  .fm-sheet.fm-stack tr.fm-sheet__arow { flex-wrap: nowrap; padding-left: 22px; }
  .fm-sheet.fm-stack tr > td.fm-sheet__a, .fm-sheet.fm-stack tr.fm-tot > td:first-child { flex: 1 1 0; }
  .fm-sheet.fm-stack tr > td.fm-sheet__pts { flex: none; display: flex; align-items: center; }
}
@media (max-width: 420px) {
  .fm-tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fm-topbar [data-new-top] span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .fm-topbar [data-new-top] { width: 42px; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { .fitmark-app *, .fm-toast { transition: none !important; } }
