/* =============================================================================
   ONBOARDING TOUR (2026-10-12): story intro, spotlight tour, final card.
   Copy and targets: chat_notes/tour/tour_script.md; look and motion:
   tour_design.md. Built by tour.js on the first start and removed on end.
   Only new classes are styled here, plus one rule that hides the chat nudge
   while the tour runs. Layers 400-410: above the drawer (103), the chat
   (101-104) and the filter sheet (121), below the login gate (500).
   ============================================================================= */
:root {
    --tour-scrim-rgb: 17, 21, 31;
    --tour-scrim-a: 0.52;
    --tour-ease: cubic-bezier(0.16, 1, 0.3, 1);
    --tour-ease-in: cubic-bezier(0.5, 0, 0.75, 0);
    --tour-cta-bg: var(--accent-color);
    --tour-card-border: rgba(var(--k-rgb), 0.08);
    --tour-shadow: 0 24px 64px rgba(var(--tour-scrim-rgb), 0.28), 0 3px 10px rgba(var(--tour-scrim-rgb), 0.12);
    --tour-note-bg: rgba(var(--accent-rgb), 0.06);
    --tour-note-line: rgba(var(--accent-rgb), 0.16);
    --tour-warn-rgb: 191, 121, 0;
    --tour-paper: #fbfaf7;
    --tour-ink-line: rgba(var(--k-rgb), 0.13);
    /* accent-coloured figure text: the accent darkened a little toward the text colour, so it keeps
       4.5:1 on the figure's tint (the plain accent is 4.48:1 there); the dark theme's lightened accent
       already does */
    --tour-acc-ink: color-mix(in srgb, var(--accent-color) 85%, var(--text-primary));
    --hdr-btn: 40px;
}
@media (pointer: coarse) { :root { --hdr-btn: 44px; } }

html.ipm-tour-on .chat-nudge { display: none !important; }
/* The chat button is hidden while the tour runs, except at its own step: elsewhere it would sit
   undimmed inside a lit area, or under the card, as if it were part of what the step explains. */
html.ipm-tour-on:not(.ipm-tour-at-chat) .chat-launcher {
    opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .2s ease, visibility 0s linear .2s;
}
.ipm-tour [hidden] { display: none !important; }
body.ipm-tour-story-open { overflow: hidden; }

/* ---------- reopen controls ---------- */
.tour-launch {
    height: var(--hdr-btn); min-width: var(--hdr-btn); padding: 0 .95rem 0 .7rem;
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; flex-shrink: 0;
    border-radius: 999px; border: 1px solid rgba(var(--w-rgb), .4); background: rgba(var(--w-rgb), .4);
    color: var(--text-secondary); font: 600 .85rem/1 var(--font-display); letter-spacing: .01em;
    cursor: pointer; transition: background .2s ease, color .2s ease;
}
.tour-launch[hidden] { display: none; }
.tour-launch:hover { color: var(--text-primary); background: rgba(var(--w-rgb), .7); }
.tour-launch:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.tour-launch svg { width: 18px; height: 18px; flex-shrink: 0; }
.tour-launch.is-glint { animation: tourGlint 1.1s var(--tour-ease) 2; }
@keyframes tourGlint {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
    100% { box-shadow: 0 0 0 10px rgba(var(--accent-rgb), 0); }
}
@media (max-width: 575px) {
    .tour-launch { position: absolute; top: calc(1rem + var(--hdr-btn) + .5rem); right: 1rem; width: var(--hdr-btn); padding: 0; }
    .tour-launch-label { display: none; }
}
.methodology-tour-row { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; }
.methodology-tour-row[hidden] { display: none; }
.tour-inline-btn {
    display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: .5rem 1rem .5rem .8rem;
    border-radius: 999px; border: 1px solid rgba(var(--accent-rgb), .25); background: var(--accent-glow);
    color: var(--accent-ink, var(--accent-strong)); font: 600 .88rem/1 var(--font-display); cursor: pointer; /* phase 5 (QA 15): 3.5:1 in light before */
}
.tour-inline-btn svg { width: 16px; height: 16px; }
.tour-inline-btn:hover { background: rgba(var(--accent-rgb), .18); }
.tour-inline-btn:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.methodology-tour-note { font-size: .8rem; color: var(--text-secondary); }
@media (pointer: coarse) { .tour-inline-btn { min-height: 44px; } }

/* ---------- spotlight: scrim + cutout + ring ---------- */
.ipm-tour-hole {
    position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; width: 0; height: 0;
    border-radius: var(--hole-r, 20px);
    box-shadow: 0 0 0 200vmax rgba(var(--tour-scrim-rgb), calc(var(--tour-scrim-a) * var(--hole-k, 1)));
    will-change: transform, width, height;
}
.ipm-tour-hole::before, .ipm-tour-ring2 {
    content: ''; position: absolute; inset: -1px; border-radius: inherit;
    box-shadow: 0 0 0 2px var(--accent-color), 0 0 0 7px rgba(var(--accent-rgb), .18), 0 0 32px 4px rgba(var(--accent-rgb), .35);
    opacity: var(--ring-a, 1);
}
.ipm-tour-ring2 { position: fixed; inset: auto; left: 0; top: 0; z-index: 400; pointer-events: none; border-radius: 4px; }
.ipm-tour-hole::after, .ipm-tour-pip {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
    box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); opacity: 0;
}
.ipm-tour-hole.is-pulsing::after, .ipm-tour-pip.is-pulsing { animation: tourPulse 1.2s var(--tour-ease) 2; }
.ipm-tour-pip { position: fixed; inset: auto; left: 0; top: 0; z-index: 401; border-radius: 999px; }
@keyframes tourPulse {
    0% { opacity: 1; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), .45); }
    100% { opacity: 0; box-shadow: 0 0 0 14px rgba(var(--accent-rgb), 0); }
}
.ipm-tour-shield { position: fixed; inset: 0; z-index: 401; background: transparent; }

/* ---------- the card: a positioning shell (.ipm-tour-card) around the visible box (.tc-inner) ---------- */
.ipm-tour-card { position: fixed; left: 0; top: 0; z-index: 402; width: min(360px, calc(100vw - 32px)); }
.ipm-tour-card.is-final { width: min(400px, calc(100vw - 32px)); }
.ipm-tour-card:focus, .ts-stage:focus { outline: none; }
.tc-inner {
    position: relative; display: flex; flex-direction: column; max-height: calc(100dvh - 32px);
    padding: 1.05rem 1.15rem .95rem; border-radius: 20px; background: var(--surface-solid);
    border: 1px solid var(--tour-card-border); box-shadow: var(--tour-shadow); color: var(--text-primary);
    font-family: var(--font-ui);
}
.ipm-tour-arrow {
    position: absolute; width: 14px; height: 14px; background: var(--surface-solid);
    border: 1px solid var(--tour-card-border); transform: rotate(45deg); display: none;
}
.ipm-tour-card[data-side="bottom"] .ipm-tour-arrow { display: block; top: -8px; border-right: 0; border-bottom: 0; }
.ipm-tour-card[data-side="top"] .ipm-tour-arrow { display: block; bottom: -8px; border-left: 0; border-top: 0; }
.ipm-tour-card[data-side="right"] .ipm-tour-arrow { display: block; left: -8px; border-top: 0; border-right: 0; }
.ipm-tour-card[data-side="left"] .ipm-tour-arrow { display: block; right: -8px; border-left: 0; border-bottom: 0; }
.tc-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .55rem; flex-shrink: 0; }
.tc-eyebrow { flex: 1; font: 600 .7rem/1.2 var(--font-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.tc-eyebrow b { color: var(--accent-strong); font-weight: 700; }
.tc-close {
    width: 30px; height: 30px; flex-shrink: 0; border-radius: 50%; border: 1px solid rgba(var(--k-rgb), .06);
    background: rgba(var(--k-rgb), .03); color: var(--text-secondary); display: inline-flex; align-items: center;
    justify-content: center; cursor: pointer; padding: 0;
}
.tc-close:hover { color: var(--text-primary); background: rgba(var(--k-rgb), .07); }
.tc-close svg { width: 13px; height: 13px; }
.tc-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
/* More below: the text fades out at the foot (set by tour.js while the area can still scroll). */
.tc-scroll.has-more, .ts-slides.has-more {
    -webkit-mask-image: linear-gradient(to bottom, rgba(var(--k-rgb), 1) calc(100% - 28px), transparent);
    mask-image: linear-gradient(to bottom, rgba(var(--k-rgb), 1) calc(100% - 28px), transparent);
}
.tc-title { font: 700 1.14rem/1.25 var(--font-display); letter-spacing: -.01em; margin: 0 0 .35rem; color: var(--text-primary); }
.tc-body { font-size: .88rem; line-height: 1.55; color: var(--text-secondary); margin: 0; }
.tc-body strong, .ts-body strong { color: var(--text-primary); font-weight: 650; }
.tc-num { font-family: var(--font-display); font-weight: 700; color: var(--accent-strong); }
.tc-econ { margin-top: .75rem; border-top: 1px solid rgba(var(--k-rgb), .07); padding-top: .6rem; }
.ts-copy .tc-econ { margin-top: 1rem; }
.tc-econ-btn {
    display: flex; align-items: center; gap: .45rem; width: 100%; padding: .3rem 0; border: 0; background: none;
    cursor: pointer; font: 600 .8rem/1.2 var(--font-display); letter-spacing: .01em; color: var(--accent-strong); text-align: left;
}
.tc-econ-ic { width: 22px; height: 22px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--accent-rgb), .10); flex-shrink: 0; }
.tc-econ-ic svg { width: 13px; height: 13px; }
.tc-chev { margin-left: auto; width: 14px; height: 14px; transition: transform .26s var(--tour-ease); color: var(--text-secondary); flex-shrink: 0; }
.tc-econ-btn[aria-expanded="true"] .tc-chev { transform: rotate(180deg); }
.tc-econ-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .28s var(--tour-ease); }
.tc-econ-panel.is-open { grid-template-rows: 1fr; }
.tc-econ-inner { overflow: hidden; min-height: 0; visibility: hidden; transition: visibility 0s linear .28s; }
.tc-econ-panel.is-open .tc-econ-inner { visibility: visible; transition-delay: 0s; }
.tc-econ-note {
    margin: .45rem 0 0; padding: .65rem .8rem; border: 1px solid var(--tour-note-line); background: var(--tour-note-bg);
    border-radius: 12px; font-size: .8rem; line-height: 1.5; color: var(--text-secondary);
}
.tc-foot { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; flex-shrink: 0; }
.tc-skip {
    margin-right: auto; border: 0; background: none; padding: .4rem .1rem; font: 500 .82rem/1 var(--font-ui);
    color: var(--text-secondary); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(var(--k-rgb), .2); text-underline-offset: 3px;
}
.tc-skip:hover { color: var(--text-primary); }
.tc-btn {
    height: 38px; padding: 0 1rem; border-radius: 999px; font: 600 .86rem/1 var(--font-display); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem; white-space: nowrap;
}
.tc-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.tc-ghost { border: 1px solid rgba(var(--k-rgb), .12); background: transparent; color: var(--text-primary); }
.tc-ghost:hover { background: rgba(var(--k-rgb), .04); }
.tc-primary { border: 0; background: var(--tour-cta-bg); color: var(--text-on-accent); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .28); }
.tc-primary:hover { filter: brightness(1.06); }
/* Next while the next step waits for the full text or the starting chat (tour.js holdFor): it reads "Loading", same width */
.tc-primary.is-holding { cursor: progress; justify-content: center; }
.tc-btn.is-gone { visibility: hidden; }
.ipm-tour button:focus-visible { outline: 2px solid var(--accent-color); outline-offset: 2px; }
.tc-segs { display: flex; gap: 4px; margin-top: .85rem; flex-shrink: 0; }
.tc-segs i { flex: 1; height: 3px; border-radius: 2px; background: rgba(var(--k-rgb), .10); transition: background .3s ease; }
.tc-segs i.done { background: rgba(var(--accent-rgb), .45); }
.tc-segs i.now { background: var(--accent-color); }
.tc-try { margin: .7rem 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.tc-try li { position: relative; padding: .5rem .7rem .5rem 2rem; border-radius: 12px; background: rgba(var(--k-rgb), .035); font-size: .82rem; line-height: 1.45; color: var(--text-secondary); }
.tc-try li::before { content: ''; position: absolute; left: .7rem; top: .72rem; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--accent-color); box-sizing: border-box; }
@media (pointer: coarse) {
    .tc-btn { height: 44px; }
    /* 44 px touch targets. The close button keeps its 30 px drawing and grows only its hit area
       (8 px round its 28 px padding box); the text buttons simply get taller. */
    .tc-close { position: relative; }
    .tc-close::before { content: ''; position: absolute; inset: -8px; }
    .tc-skip, .tc-econ-btn { min-height: 44px; }
}

/* phone: the card is a sheet docked to the bottom or the top */
.ipm-tour-card[data-mode="sheet"] { left: 0; right: 0; width: auto; top: auto; bottom: 0; }
.ipm-tour-card[data-mode="sheet"][data-dock="top"] { top: 0; bottom: auto; }
.ipm-tour-card[data-mode="sheet"] .tc-inner {
    max-height: 62dvh; border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0;
    padding: 1rem 1.1rem calc(.9rem + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(var(--tour-scrim-rgb), .18);
}
.ipm-tour-card[data-mode="sheet"][data-dock="top"] .tc-inner {
    border-radius: 0 0 22px 22px; border-top: 0; border-bottom: 1px solid var(--tour-card-border);
    padding: calc(1rem + env(safe-area-inset-top, 0px)) 1.1rem .9rem; box-shadow: 0 12px 40px rgba(var(--tour-scrim-rgb), .18);
}
.ipm-tour-card[data-mode="sheet"][data-lift="1"] .tc-inner { padding-bottom: .9rem; }
.ipm-tour-card[data-mode="sheet"] .ipm-tour-arrow { display: none; }
.ipm-tour-card[data-mode="sheet"] .tc-btn { height: 44px; }

/* the post-skip hint, and the wait while the full text loads (a Tour click before it: load-speed stage 2) */
.ipm-tour-hint, .ipm-tour-wait {
    position: fixed; left: 0; top: 0; z-index: 403; max-width: min(280px, calc(100vw - 32px)); padding: .6rem .8rem;
    border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--tour-card-border); box-shadow: var(--tour-shadow);
    font: 400 .82rem/1.45 var(--font-ui); color: var(--text-secondary);
}
.ipm-tour-hint strong { color: var(--text-primary); font-weight: 650; }
.ipm-tour-hint .ipm-tour-arrow, .ipm-tour-wait .ipm-tour-arrow { display: block; top: -8px; border-right: 0; border-bottom: 0; }
.ipm-tour-hint.no-arrow .ipm-tour-arrow, .ipm-tour-wait.no-arrow .ipm-tour-arrow { display: none; }
.ipm-tour-live, .ts-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ---------- story ---------- */
.ipm-tour-story { position: fixed; inset: 0; z-index: 410; display: flex; align-items: center; justify-content: center; padding: 24px; }
.ts-backdrop { position: absolute; inset: 0; background: var(--overlay-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.ts-backdrop::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(var(--accent-rgb), .07) 1.5px, transparent 1.5px); background-size: 24px 24px; }
.ts-stage {
    position: relative; width: min(920px, 100%); max-height: calc(100dvh - 48px); border-radius: 24px;
    background: var(--surface-solid); border: 1px solid var(--tour-card-border); box-shadow: var(--tour-shadow);
    overflow: hidden; display: flex; flex-direction: column; color: var(--text-primary); font-family: var(--font-ui);
}
.ts-top { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem 0 1.5rem; flex-shrink: 0; }
.ts-progress { display: flex; gap: 6px; flex: 1; max-width: 220px; }
.ts-progress button { flex: 1; height: 4px; padding: 0; border: 0; border-radius: 2px; background: rgba(var(--k-rgb), .10); cursor: pointer; position: relative; }
.ts-progress button::before { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }
.ts-progress button.done { background: rgba(var(--accent-rgb), .45); }
.ts-progress button::after { content: ''; position: absolute; inset: 0; border-radius: inherit; background: var(--accent-color); transform: scaleX(0); transform-origin: left; transition: transform .32s var(--tour-ease); }
.ts-progress button[aria-current="step"]::after { transform: scaleX(1); }
.ts-count { font: 600 .72rem/1 var(--font-display); color: var(--text-secondary); letter-spacing: .06em; white-space: nowrap; }
.ts-count b { font: 800 1rem/1 var(--font-display); color: var(--accent-strong); letter-spacing: 0; }
.ts-skip { margin-left: auto; border: 0; background: none; font: 500 .84rem/1 var(--font-ui); color: var(--text-secondary); cursor: pointer; padding: .5rem .25rem; border-radius: 6px; }
.ts-skip:hover { color: var(--text-primary); }
.ts-slides { display: grid; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ts-slide { grid-area: 1 / 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem; padding: 1.4rem 2rem .5rem 1.5rem; align-items: center; }
.ts-slide.is-off, .ts-slide.is-off .tc-econ-panel.is-open .tc-econ-inner { visibility: hidden; pointer-events: none; }
.ts-figure {
    position: relative; height: 340px; border-radius: 18px; background: rgba(var(--accent-rgb), .035);
    border: 1px solid rgba(var(--accent-rgb), .10); overflow: hidden; forced-color-adjust: none;
}
.ts-figure::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(var(--accent-rgb), .10) 1.2px, transparent 1.2px); background-size: 18px 18px; }
.ts-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ts-copy { position: relative; min-width: 0; }
.ts-eyebrow { font: 600 .72rem/1.2 var(--font-ui); letter-spacing: .07em; text-transform: uppercase; color: var(--accent-strong); margin: 0 0 .6rem; }
.ts-title { font: 700 1.7rem/1.18 var(--font-display); letter-spacing: -.02em; color: var(--text-primary); margin: 0 0 .75rem; }
.ts-body { font-size: .95rem; line-height: 1.6; color: var(--text-secondary); margin: 0; }
.ts-nav { display: flex; align-items: center; gap: .6rem; padding: .9rem 1.5rem 1.25rem; flex-shrink: 0; }
.ts-nav .tc-btn { height: 42px; padding: 0 1.2rem; font-size: .92rem; }
.ts-spacer { flex: 1; }
/* Touch: the story's top row paints above the slides, so its enlarged hit areas are not covered
   by a slide (a slide's entrance animation makes it a layer of its own). */
.ts-top { position: relative; z-index: 1; }
@media (pointer: coarse) {
    .ts-skip { position: relative; }
    .ts-skip::before { content: ''; position: absolute; inset: -8px -4px; }
    .ts-progress button::before { top: -20px; bottom: -20px; }
}
@media (max-width: 767px) {
    .ipm-tour-story { padding: 0; align-items: flex-end; }
    .ts-stage { width: 100%; height: calc(100dvh - max(12px, env(safe-area-inset-top, 0px))); max-height: none; border-radius: 22px 22px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
    .ts-top { padding: .9rem 1rem 0 1.1rem; }
    .ts-slide { grid-template-columns: 1fr; gap: 1.1rem; padding: 1rem 1.1rem .75rem; align-content: start; align-items: start; }
    .ts-figure { height: auto; aspect-ratio: 400 / 290; max-height: 36dvh; }
    .ts-title { font-size: 1.4rem; }
    .ts-body { font-size: .92rem; }
    .ts-nav { padding: .75rem 1rem calc(.9rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(var(--k-rgb), .06); }
    .ts-nav .tc-btn { height: 44px; padding: 0 1.05rem; }
}
/* Short landscape screens (a phone held sideways): the figure fits the slide area and sits at the
   top beside the text, which scrolls (with the fade at its foot) when it is the longer of the two. */
@media (min-width: 768px) and (max-height: 560px) {
    .ipm-tour-story { padding: 12px; }
    .ts-stage { max-height: calc(100dvh - 24px); }
    .ts-slide { padding-top: .6rem; gap: 1.5rem; align-items: start; }
    .ts-figure { height: min(340px, calc(100dvh - 190px)); }
    .ts-title { font-size: 1.4rem; }
}

/* figure classes (SVG: colours only through classes, never var() in attributes) */
.f-ring { fill: none; stroke: rgba(var(--accent-rgb), .18); stroke-width: 1; }
.f-ring.r2 { stroke: rgba(var(--accent-rgb), .24); } .f-ring.r3 { stroke: rgba(var(--accent-rgb), .30); }
.f-cross { stroke: rgba(var(--accent-rgb), .16); stroke-width: 1; }
.f-acc { fill: var(--accent-color); }
.f-s0 { fill: var(--tour-cta-bg); }   /* the strong bar under white labels: 4.7:1 in both themes */
.f-wedge { fill: rgba(var(--accent-rgb), .10); }
.f-g0 { stop-color: var(--accent-color); stop-opacity: 0; } .f-g1 { stop-color: var(--accent-color); stop-opacity: 1; }
.f-sweep { stroke-width: 2.5; stroke-linecap: round; }
.f-halo { fill: rgba(var(--accent-rgb), .12); }
.f-ripple { fill: none; stroke: rgba(var(--accent-rgb), .5); stroke-width: 1.2; opacity: 0; }
.f-code { font: 600 11px var(--font-display); fill: var(--text-secondary); letter-spacing: .04em; }
.f-disc { fill: var(--surface-solid); stroke: rgba(var(--k-rgb), .10); }
.f-glyph { fill: none; stroke: var(--accent-strong); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.f-glyph-t { font: 800 6.5px var(--font-display); fill: var(--accent-strong); stroke: none; }
.f-statn { font: 800 17px var(--font-display); fill: var(--text-primary); }
.f-statn.acc, .f-num.acc { fill: var(--tour-acc-ink); }
.f-statw, .f-lab, .f-tag { font: 600 11px var(--font-ui); letter-spacing: .07em; text-transform: uppercase; fill: var(--text-secondary); }
.f-paper { fill: var(--tour-paper); stroke: rgba(var(--k-rgb), .10); }
.f-head { fill: rgba(var(--k-rgb), .30); }
.f-line { fill: var(--tour-ink-line); }
.f-funnel { fill: rgba(var(--accent-rgb), .07); }
.f-funnel-s { fill: none; stroke: var(--accent-color); stroke-opacity: .55; stroke-width: 1.5; }
.f-pill { fill: var(--surface-solid); stroke: rgba(var(--k-rgb), .10); filter: drop-shadow(0 3px 6px rgba(var(--tour-scrim-rgb), .10)); }
.f-dot-a { fill: var(--status-active-txt); } .f-dot-n { fill: var(--status-announced-txt); } .f-dot-d { fill: var(--status-discussion-txt); }
.f-pill-t { font: 600 11px var(--font-display); fill: var(--text-primary); }
.f-quote { font: 800 16px var(--font-display); fill: var(--tour-acc-ink); }
.f-num { font: 800 17px var(--font-display); fill: var(--text-primary); }
.f-cap { font: 700 11px var(--font-ui); letter-spacing: .07em; text-transform: uppercase; fill: var(--text-secondary); }
.f-rowlab { font: 600 12px var(--font-display); fill: var(--text-primary); }
.f-pale { fill: rgba(var(--accent-rgb), .22); stroke: rgba(var(--accent-rgb), .45); stroke-dasharray: 3 3; }
.f-note { font: 600 10.5px var(--font-ui); fill: var(--text-secondary); }
.f-total { font: 800 13px var(--font-display); fill: var(--text-primary); }
.f-s1 { fill: rgba(var(--accent-rgb), .55); } .f-s2 { fill: rgba(var(--accent-rgb), .25); }
.f-pct { font: 700 11px var(--font-display); fill: var(--text-on-accent); } .f-pct.dk { fill: var(--text-primary); }
.f-track { fill: rgba(var(--k-rgb), .18); }
.f-thumb { fill: var(--surface-solid); filter: drop-shadow(0 1px 1.5px rgba(var(--tour-scrim-rgb), .25)); }
.f-swlab { font: 600 11.5px var(--font-display); fill: var(--tour-acc-ink); }
.f-leg { font: 600 11px var(--font-ui); fill: var(--text-secondary); }
.f-card { fill: var(--surface-solid); stroke: rgba(var(--k-rgb), .10); filter: drop-shadow(0 8px 14px rgba(var(--tour-scrim-rgb), .10)); }
.f-stat-bg { fill: var(--status-active-bg); stroke: var(--status-active-border); }
.f-stat-t { font: 700 10.5px var(--font-ui); fill: var(--status-active-txt); }
.f-ctitle { font: 700 13px var(--font-display); fill: var(--text-primary); }
.f-meta { font: 500 11px var(--font-ui); fill: var(--text-secondary); }
.f-amt { font: 800 19px var(--font-display); fill: var(--tour-acc-ink); }
.f-small { font: 700 10px var(--font-ui); letter-spacing: .08em; fill: var(--text-secondary); }
.f-mark { font: 800 34px var(--font-display); fill: rgba(var(--accent-rgb), .35); }
.f-chip { fill: rgba(var(--k-rgb), .04); stroke: rgba(var(--k-rgb), .12); }
.f-chip.acc { fill: rgba(var(--accent-rgb), .10); stroke: rgba(var(--accent-rgb), .3); }
.f-chip-t { font: 600 11px var(--font-display); fill: var(--text-primary); } .f-chip-t.acc { fill: var(--tour-acc-ink); }
.f-lens { fill: rgba(var(--accent-rgb), .08); stroke: var(--accent-color); stroke-width: 2.2; }
.f-lens-h { stroke: var(--accent-color); stroke-width: 3.2; stroke-linecap: round; }
.f-pop, .f-flip { transform-box: fill-box; transform-origin: center; }
/* Phones: the figure is drawn at about 0.89x, so its text is set 1.15x larger (tour.js scales the
   widths it estimates by the same factor). */
@media (max-width: 767px) {
    .f-code, .f-statw, .f-lab, .f-tag, .f-pill-t, .f-cap, .f-pct, .f-leg, .f-meta, .f-chip-t { font-size: 12.6px; }
    .f-statn, .f-num { font-size: 19.5px; }
    .f-rowlab { font-size: 13.8px; }
    .f-note { font-size: 12px; }
    .f-total, .f-ctitle { font-size: 15px; }
    .f-swlab { font-size: 13.2px; }
    .f-stat-t { font-size: 12px; }
    .f-small { font-size: 11.5px; }
    .f-cap { letter-spacing: .05em; }
}
.f-grow { transform-box: fill-box; transform-origin: left center; }
.f-drop { transform-box: fill-box; transform-origin: center top; }

/* ---------- motion, forced colours, print ---------- */
@media (prefers-reduced-motion: reduce) {
    .ipm-tour-hole.is-pulsing::after, .ipm-tour-pip.is-pulsing, .tour-launch.is-glint { animation: none; }
    .ts-progress button::after, .tc-econ-panel, .tc-chev, .tc-segs i { transition: none; }
}
@media (forced-colors: active) {
    .ipm-tour-hole::before, .ipm-tour-ring2 { outline: 3px solid Highlight; outline-offset: 2px; }
    .tc-inner, .ts-stage, .ipm-tour-hint, .ipm-tour-wait { border: 1px solid CanvasText; }
    .ts-backdrop { background: Canvas; }
    /* the figures keep their own colours, so they keep their own (opaque) ground too */
    .ts-figure { background: var(--surface-solid); }
    .tc-primary { border: 1px solid ButtonText; }
    .ts-progress button, .tc-segs i, .tc-segs i.done { background: GrayText; }
    .ts-progress button::after, .tc-segs i.now { background: Highlight; }
}
@media print { #ipm-tour, .ipm-tour-hint, .ipm-tour-wait, .tour-launch, .methodology-tour-row { display: none !important; } }
