:root {
  --bg: #f6f9fd; --card: #ffffff; --text: #0b1b4d; --muted: #52627a; --line: #dce6f2;
  --primary: #0878ff; --primary-hover: #0062d6; --primary-soft: #edf5ff; --primary-line: #c7defc;
  --accent: #c2410c; --accent-soft: #f4b393;   /* chart data colour (lower Results; unchanged in this slice) */
  --ok: #15803d; --weak: #a16207; --none: #52627a;
  --warn-bg: #fff7e6; --warn-line: #f3c46b; --radius: 14px;
  --shadow: 0 1px 2px rgba(11, 27, 77, .04), 0 4px 16px rgba(11, 27, 77, .04);
  /* plot styling tokens (defaults = original look, used by Technical Details); Product overrides below */
  --plot-frame: #c9ced6; --plot-tick: #8a93a3; --plot-grid: #eceef2; --plot-insignificant: #c4c9d2;
  --plot-panel: transparent; --chart-secondary: #d97706; --envelope: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.45; overflow-x: hidden; }
/* ---- shell */
.topbar { background: rgba(255, 255, 255, .92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10;
  backdrop-filter: saturate(1.4) blur(8px); }
.topbar-inner { max-width: 1400px; margin: 0 auto; padding: 14px 28px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; flex: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), #3f9bff);
  display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 750; font-size: 17px; letter-spacing: -.01em; }
.brand-desc { font-size: 11.5px; color: var(--muted); }
.mainnav { display: flex; gap: 4px; margin-left: auto; }
.mainnav a { color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: 8px; white-space: nowrap; }
.mainnav a[href]:hover { color: var(--text); background: var(--primary-soft); }
.mainnav a.active { color: var(--primary); font-weight: 600; }
.mainnav a[aria-disabled="true"] { cursor: default; }
.fixture-nav { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; max-width: 1160px; margin: 0 auto; padding: 0 20px 10px; }
.fixture-nav a { color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.fixture-nav a.active { color: var(--text); border-color: var(--text); }
.fixture-nav[hidden] { display: none; }
main { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
main.home { max-width: 1400px; padding: 0 28px 40px; }
/* before the app has rendered (#app holds the server's fallback hero), keep the footer below the fold so it does not
   jump down when the page appears; without JavaScript the intro shows here */
#app:has(> .app-fallback) { min-height: 100vh; }
.app-deep .app-fallback { display: none; }               /* another page is opening (route-hint.js) */
.noscript-intro p:first-child { margin-top: 0; }
.noscript-intro p:last-child { margin-bottom: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow); }
.card h2 { margin: 0 0 6px; font-size: 18px; }
.explain { color: var(--muted); margin: 0 0 12px; font-size: 14px; }
.tip { display: inline-block; margin-left: 6px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--muted);
  color: var(--muted); font-size: 12px; line-height: 16px; text-align: center; cursor: help; position: relative; }
.tip:hover .tiptext, .tip:focus .tiptext { display: block; }
.tiptext { display: none; position: absolute; left: 24px; top: -6px; width: 280px; background: #1d2330; color: #fff;
  padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4; z-index: 5; text-align: left; font-weight: 400; }
.summary-title { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; margin: 0 0 12px; }
.dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.dot.detected { background: var(--ok); } .dot.weak { background: var(--weak); }
.dot.not_detected, .dot.insufficient { background: var(--none); }
.items { list-style: none; padding: 0; margin: 0 0 12px; }
.items li { padding: 8px 0; border-top: 1px solid var(--line); display: flex; align-items: flex-start; gap: 4px; }
.items li:first-child { border-top: 0; }
.warnings { margin: 8px 0 0; padding: 0; list-style: none; }
.warnings li { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 14px; }
.footer-note { color: var(--muted); font-size: 12.5px; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.toggle { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 8px; }
.toggle button { border: 0; background: transparent; padding: 6px 16px; cursor: pointer; font: inherit; color: var(--muted); }
.toggle button[aria-pressed="true"] { background: var(--text); color: #fff; }
.plot { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plot svg, .gutter svg { width: 100%; height: auto; display: block; }
.plot text, .gutter text { font-size: 13px; fill: var(--muted); font-family: inherit; }
.plot .axis-title, .gutter .axis-title { font-size: 14px; fill: var(--text); }
.sentences p { margin: 4px 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 8px 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--text); border-bottom-color: var(--text); }
.upload-zone { display: block; cursor: pointer; margin-top: 12px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 36px; text-align: center; background: var(--card); }
.upload-zone.drag { border-color: var(--text); }
.btn { background: var(--text); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font: inherit; cursor: pointer; }
.btn[disabled] { opacity: .45; cursor: default; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--text); }
.file-info { margin-top: 16px; }
.stages { list-style: none; padding: 0; }
.stages li { padding: 8px 0; color: var(--muted); }
.stages li.active { color: var(--text); font-weight: 600; }
.stages li.done { color: var(--ok); }
.stages li::before { content: "○ "; } .stages li.active::before { content: "◐ "; } .stages li.done::before { content: "● "; }
.error { background: #fdecec; border: 1px solid #f0a4a4; border-radius: 8px; padding: 12px; }
details.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 14px; }
details.section > summary { cursor: pointer; font-weight: 650; }
.concept { font-size: 12px; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 26px 0 6px; }
.concept-def { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
table.data { border-collapse: collapse; width: 100%; font-size: 13px; margin: 8px 0; }
table.data th, table.data td { border-bottom: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; }
.figure { width: 100%; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
@media (max-width: 600px) { .plot svg { min-width: 620px; } main { padding: 14px 10px 40px; } .card { padding: 14px; } .tiptext { width: 220px; left: -100px; top: 22px; } }
.upload-zone .small { display: inline-block; margin-top: 12px; }

/* ---- icons */
.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---- home hero */
.hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 56px 32px 48px; margin: 0 -16px 8px;
  background: radial-gradient(120% 90% at 100% 0%, #e3efff 0%, rgba(237, 245, 255, 0) 60%),
              linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(32px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 18px; font-weight: 760; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero-sub { font-size: 18px; color: var(--muted); margin: 0; max-width: 34em; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.values li { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); }
.values li strong { display: block; font-size: 15px; }
.values li span > span { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.value-icon, .trust-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex: none; }

/* ---- upload */
.upload-card { display: grid; grid-template-columns: 1fr 280px; gap: 28px; padding: 28px; margin-top: 28px; scroll-margin-top: 90px; }
.upload-card h2 { font-size: 22px; margin: 0 0 6px; letter-spacing: -.01em; }
.upload-card .lead { color: var(--muted); margin: 0 0 4px; }
.upload-zone { border-color: var(--primary-line); background: linear-gradient(180deg, #fbfdff, var(--primary-soft)); transition: border-color .15s, background .15s; }
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); }
.upload-zone .btn.secondary { border-color: var(--primary); color: var(--primary); background: #fff; font-weight: 600; }
.file-info .btn:not(.secondary) { background: var(--primary); }
.tips { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 18px; align-self: start; }
.tips h3 { margin: 0 0 10px; font-size: 15px; }
.tips ul { list-style: none; margin: 0; padding: 0; }
.tips li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; padding: 5px 0; }
.tips .icon { width: 18px; height: 18px; color: var(--primary); stroke-width: 2.2; margin-top: 1px; }

/* ---- trust row */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 4px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, .6); }
.trust-item h3 { margin: 2px 0 4px; font-size: 14.5px; }
.trust-item p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }
.trust-icon { width: 34px; height: 34px; border-radius: 9px; }
.trust-icon .icon { width: 19px; height: 19px; }

/* ---- results: summary card */
.tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.summary-card { padding: 26px; background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%); }
.summary-card .summary-title { font-size: 24px; letter-spacing: -.015em; margin-bottom: 20px; }
.summary-card .dot { width: 14px; height: 14px; box-shadow: 0 0 0 5px rgba(21, 128, 61, .12); }
.summary-card .dot.weak { box-shadow: 0 0 0 5px rgba(161, 98, 7, .12); }
.summary-card .dot.not_detected, .summary-card .dot.insufficient { box-shadow: 0 0 0 5px rgba(82, 98, 122, .12); }
.measures { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.measure { background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); border: 1px solid var(--primary-line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.measure-label { font-size: 13px; font-weight: 600; color: var(--muted); display: flex; align-items: center; }
.measure-value { font-size: 24px; font-weight: 720; letter-spacing: -.02em; margin: 6px 0 2px; overflow-wrap: anywhere; }
.measure-extra { font-size: 14px; font-weight: 600; color: var(--primary); }
.measure-help { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.summary-card .footer-note { margin-top: 16px; }

/* ---- results: Product visualisation cards (presentation only; data marks come from report.json) */
.product {
  --accent: var(--primary); --accent-soft: #9cc7ff; --chart-secondary: #64748b;
  --plot-frame: #d5dfec; --plot-tick: #9aa8bd; --plot-grid: #edf2f8; --plot-insignificant: #d6dee9;
  --plot-panel: #f8fbff; --envelope: var(--primary);
}
.product > .card { margin-bottom: 10px; }
.viz-card { padding: 22px 24px 18px; }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.viz-title { flex: 1 1 320px; min-width: 0; }
.viz-card h2 { font-size: 19px; letter-spacing: -.01em; margin: 0; }
.viz-card h2 .tip { vertical-align: 2px; }
.viz-head .explain { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.viz-card .toggle, .ex-view .toggle { flex: none; margin: 0; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.viz-card .toggle button, .ex-view .toggle button { border-radius: 999px; padding: 6px 18px; min-height: 34px; font-size: 14px; font-weight: 600; color: var(--muted); }
.viz-card .toggle button[aria-pressed="true"], .ex-view .toggle button[aria-pressed="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(11, 27, 77, .14); }
.viz-card .toggle button:focus-visible, .ex-view .toggle button:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.product .tip { border-color: #a9b7cb; color: #6b7c96; }
.product .tip:hover, .product .tip:focus { border-color: var(--primary); color: var(--primary); }
.viz-card .sentences { margin: 0 0 16px; padding: 10px 14px; border-left: 3px solid var(--primary); border-radius: 0 10px 10px 0;
  background: linear-gradient(90deg, var(--primary-soft), rgba(237, 245, 255, 0)); }
.viz-card .sentences p { margin: 2px 0; font-size: 14px; color: var(--muted); }
.viz-card .sentences p:first-child { font-size: 16px; font-weight: 650; color: var(--text); }
.viz-card .warnings { margin: -6px 0 14px; }
.plot-note { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.product .plot text, .product .gutter text { fill: #5f6f86; }
.product .plot .axis-title, .product .gutter .axis-title { fill: var(--text); }
.product .plot .band-label, .product .gutter .band-label { font-weight: 600; }
.product .plot .band-label.secondary, .product .gutter .band-label.secondary { fill: var(--chart-secondary) !important; }
.product .plot line.edge, .product .gutter line.edge { stroke-opacity: .55; }
.product .plot line.edge.secondary, .product .gutter line.edge.secondary { stroke-dasharray: 4 3; }
.nowrap { white-space: nowrap; }
.nowrap .tiptext { white-space: normal; }
.cycle-inner svg + svg { margin-top: 6px; }
/* contained horizontal scroll for wide plots on narrow screens (never page-level) */
.plot-wrap { position: relative; }
.plot-wrap::before, .plot-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 28px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.plot-wrap::before { left: 0; background: linear-gradient(90deg, #fff, rgba(255, 255, 255, 0)); }
.plot-wrap::after { right: 0; background: linear-gradient(270deg, #fff, rgba(255, 255, 255, 0)); }
.plot-wrap.can-left::before, .plot-wrap.can-right::after { opacity: 1; }
/* pinned y-axis / colour-scale copies (built by pinGutters only when the plot scrolls) */
.gutter { position: absolute; overflow: hidden; background: #fff; z-index: 2; pointer-events: none; transition: box-shadow .2s; }
.gutter.left { left: 0; }
.gutter.right { right: 0; }
.gutter-clone { position: absolute; top: 0; }
.plot-wrap.pinned::before, .plot-wrap.pinned::after { display: none; }
.plot-wrap.pinned .x-title { visibility: hidden; }
.x-caption { position: absolute; z-index: 3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text); pointer-events: none; }
.plot-wrap.pinned.can-left .gutter.left { box-shadow: 8px 0 10px -8px rgba(11, 27, 77, .35); }
.plot-wrap.pinned.can-right .gutter.right { box-shadow: -8px 0 10px -8px rgba(11, 27, 77, .35); }

/* ---- evidence-first Results: recording -> see it -> what we measured -> look closer */
.section-label { margin: 26px 2px 10px; font-size: 12.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--primary); }
.product > .section-label:first-child { margin-top: 4px; }
.recording-card { padding: 20px 24px; }
.recording-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.recording-icon { width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.recording-name { margin: 0; font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.facts > div { background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%); border: 1px solid var(--primary-line); border-radius: 12px; padding: 10px 14px; min-width: 0; }
.facts dt { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 650; overflow-wrap: anywhere; }
.recording-card .warnings { margin-top: 12px; }
.recording-card .footer-note { margin-top: 14px; }
.evidence-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.evidence-legend li { display: flex; align-items: center; gap: 8px; }
.sw { width: 22px; height: 12px; border-radius: 3px; flex: none; display: inline-block; }
.sw-excluded { background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .75) 0 2px, transparent 2px 5px), #8a97ad; }
.sw-boundary { background: linear-gradient(90deg, transparent 9px, #2b3a5c 9px 13px, transparent 13px); border: 1px solid var(--line); }
.sw-range { border: 2.5px solid var(--primary); border-left: 0; width: 10px; border-radius: 0; }
.sw-cycles { background: repeating-linear-gradient(90deg, #2b3a5c 0 2px, transparent 2px 6px); height: 9px; }
.measurements-card { padding: 22px 24px; }
.measurements-card .measures { margin-bottom: 0; }

/* ---- responsive */
@media (max-width: 900px) { .product .plot text, .product .gutter text { font-size: 15px; } .product .plot .axis-title, .product .gutter .axis-title { font-size: 15.5px; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding: 36px 20px 32px; }
  .upload-card { grid-template-columns: 1fr; }
  .trust { grid-template-columns: 1fr; }
  .measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .topbar-inner { padding: 10px 14px; gap: 10px; }
  .brand-desc { display: none; }
  .hero { margin: 0 -10px 8px; padding: 28px 16px 26px; }
  .hero-sub { font-size: 16px; }
  .values { gap: 10px; }
  .values li { padding: 12px; flex-direction: column; gap: 8px; }
  .upload-card { padding: 18px; margin-top: 18px; }
  .upload-zone { padding: 24px 14px; }
  .summary-card { padding: 18px; }
  .summary-card .summary-title { font-size: 20px; }
  .viz-card { padding: 16px 14px 14px; }
  .viz-card h2 { font-size: 17.5px; }
  .viz-card .plot-wrap { margin: 0 -14px; }
  .viz-card .plot { padding: 0 14px 4px; overscroll-behavior-x: contain; }
  .viz-card .plot svg { min-width: 640px; }
  .viz-card .cycle-inner { min-width: 640px; }
  .measure-value { font-size: 20px; }
}
@media (max-width: 380px) { .measures { grid-template-columns: 1fr; } }

/* ==================================================================== Home V2 (coordination/design/home-v2-mockup.png) */
/* Inter, self-hosted (static/fonts/InterVariable.woff2, SIL OFL 1.1 - see static/fonts/OFL.txt) */
@font-face { font-family: "Inter"; src: url("/static/fonts/InterVariable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
.topbar, main.home, .site-footer { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-optical-sizing: auto; }
:root { --purple: #5b45d6; --purple-soft: #efeafe; --orange: #f28c28; --orange-soft: #fff3e6; }
/* header: glyph logo, early-beta pill, nav, account placeholders */
.brand-glyph svg { width: 34px; height: 26px; fill: none; stroke: var(--primary); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; display: block; }
.brand .brand-name { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.beta-pill { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--purple);
  background: var(--purple-soft); border-radius: 7px; padding: 4px 9px; margin-left: 4px; }
.mainnav { gap: 18px; margin: 0 auto; }
.mainnav a { font-size: 15px; color: var(--text); padding: 8px 4px; border-radius: 0; border-bottom: 2px solid transparent; }
.mainnav a[href]:hover { background: none; color: var(--primary); }
.mainnav a.active { color: var(--primary); font-weight: 500; border-bottom-color: var(--primary); }
.mainnav a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.mainnav a:focus:not(:focus-visible) { outline: none; }
.account { display: flex; gap: 12px; flex: none; }
.acct-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; padding: 10px 20px; border-radius: 10px;
  text-decoration: none; cursor: default; white-space: nowrap; }
.acct-btn .icon { width: 18px; height: 18px; }
.acct-login { color: var(--text); border: 1px solid var(--line); background: #fff; }
.acct-create { color: #fff; background: var(--primary); box-shadow: 0 4px 12px rgba(8, 120, 255, .18); }

/* page */
.home2 { position: relative; }
.home2::before { content: ""; position: absolute; z-index: -1; left: -220px; top: 120px; width: 520px; height: 620px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(8, 120, 255, .07), rgba(8, 120, 255, 0)); pointer-events: none; }
.h2-hero { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1fr); gap: 44px; align-items: start; padding: 40px 0 34px; }
.h2-hero.solo { grid-template-columns: minmax(0, 720px); }
.h2-left { padding-top: 34px; scroll-margin-top: 90px; }
.h2-left h1 { font-size: clamp(38px, 4.1vw, 64px); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; margin: 0 0 22px; }
.h2-left h1 em { font-style: normal; color: var(--primary); }
.h2-sub { font-size: clamp(17px, 1.55vw, 22px); line-height: 1.45; color: var(--muted); margin: 0 0 30px; max-width: 30em; }
.h2-zone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 24px 22px; border: 1.5px dashed #b9d4f6;
  border-radius: 18px; background: linear-gradient(180deg, rgba(255, 255, 255, .85), rgba(237, 245, 255, .6)); cursor: pointer; text-align: center;
  transition: border-color .15s, background .15s; }
.h2-zone:hover, .h2-zone.drag { border-color: var(--primary); background: var(--primary-soft); }
.btn.h2-choose { display: inline-flex; align-items: center; gap: 12px; background: var(--primary); color: #fff; font-size: 20px; font-weight: 600;
  padding: 15px 64px; border-radius: 999px; box-shadow: 0 6px 18px rgba(8, 120, 255, .25); }
.h2-choose .icon { width: 26px; height: 26px; stroke-width: 1.9; }
.h2-drop { font-size: 16px; color: var(--text); margin-top: 6px; }
.h2-formats { font-size: 15px; color: var(--muted); }
.h2-privacy { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--muted); margin-top: 18px; }
.h2-privacy .icon { width: 18px; height: 18px; }
.h2-left .file-info { margin-top: 14px; }
.h2-left .file-info .btn:not(.secondary) { background: var(--primary); }

/* example recording card */
.example-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 40px rgba(11, 27, 77, .07); padding: 22px 24px 24px; min-height: 520px; }
.ex-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ex-head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.pill { font-size: 13px; font-weight: 500; border-radius: 7px; padding: 4px 10px; }
.pill.purple { color: var(--purple); background: var(--purple-soft); }
.ex-dur { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 14.5px; color: var(--muted); }
.ex-dur .icon { width: 18px; height: 18px; }
.ex-plot svg { width: 100%; height: auto; display: block; }
.ex-spec text { font-size: 15px; fill: #5f6f86; font-family: inherit; }
.ex-spec .ax { font-size: 15.5px; fill: var(--text); }
.ex-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 20px; }
.ex-tile { display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 12px; min-width: 0;
  background: linear-gradient(180deg, #fff, #fafcff); }
.ex-tile-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.ex-tile-icon .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.ex-tile-icon.purple { background: var(--purple-soft); color: var(--purple); }
.ex-tile-icon.blue { background: var(--primary-soft); color: var(--primary); }
.ex-tile-icon.orange { background: var(--orange-soft); color: var(--orange); }
.ex-tile-value { font-size: 21px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.ex-tile-label { font-size: 13.5px; color: var(--muted); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.ex-tile-icon { width: 42px; height: 42px; }
.help-tip { position: relative; display: inline-flex; color: #8796ad; cursor: help; }
.help-tip .icon { width: 17px; height: 17px; }
.help-tip:hover, .help-tip:focus { color: var(--primary); }
.help-tip:hover .tiptext, .help-tip:focus .tiptext { display: block; }
.help-tip .tiptext { left: auto; right: -10px; top: 24px; width: 250px; }
.ex-listen { border-top: 1px solid var(--line); padding-top: 18px; }
.ex-listen h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.ex-players { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 20px; align-items: center; }
.ex-sep { width: 1px; height: 46px; background: var(--line); }
.player { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pl-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; cursor: pointer; flex: none; }
.pl-btn .icon { width: 22px; height: 22px; }
.pl-btn:hover:not([disabled]) { background: #dcebff; }
.pl-btn:focus-visible, .pl-bar:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pl-body { flex: 1; min-width: 0; }
.pl-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.pl-name { font-size: 15px; font-weight: 600; }
.pl-time { font-size: 13.5px; color: #8796ad; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-bar { height: 4px; background: #e1e7f0; border-radius: 2px; cursor: pointer; position: relative; }
.pl-fill { height: 100%; width: 0; background: var(--primary); border-radius: 2px; }
.player.disabled { opacity: .6; }
.player.disabled .pl-btn { cursor: default; background: #eef1f6; color: #9aa6b8; }
.player.disabled .pl-bar { cursor: default; }

/* feature cards */
.h2-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 4px; }
.feature { display: flex; gap: 10px; border-radius: 20px; padding: 26px 18px 26px 22px; min-height: 220px; border: 1px solid transparent; }
.feature.orange { background: linear-gradient(135deg, #fff6ec, #fffaf4); border-color: #fbe9d5; }
.feature.blue { background: linear-gradient(135deg, #eef5ff, #f6f9fe); border-color: #dfeafa; }
.feature.purple { background: linear-gradient(135deg, #f2eeff, #f8f6ff); border-color: #e7e0fb; }
.feature-body { flex: 1; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-content: start; }
.feature-icon { grid-row: 1 / span 2; display: inline-flex; padding-top: 2px; }
.feature-icon .icon { width: 36px; height: 36px; stroke-width: 2; }
.feature-icon.orange { color: var(--orange); } .feature-icon.blue { color: var(--primary); } .feature-icon.purple { color: var(--purple); }
.feature h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.22; letter-spacing: -.01em; font-weight: 700; }
.feature p { grid-column: 2; margin: 0 0 20px; font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.feature-cta { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 500;
  color: var(--primary); border: 1.5px solid var(--primary); border-radius: 9px; padding: 9px 18px; background: #fff; text-decoration: none; }
.feature-cta[aria-disabled="true"] { cursor: default; }
.feature-cta .icon { width: 18px; height: 18px; }
.feature-art { flex: none; align-self: center; }
.feature-art .illu { width: 90px; height: auto; display: block; filter: drop-shadow(0 6px 14px rgba(11, 27, 77, .08)); }
.feature[data-feature="track"] .illu { width: 92px; }
.feature[data-feature="community"] .illu { width: 100px; filter: none; }

/* bottom strip */
.h2-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 26px; padding-top: 26px; border-top: 1px solid var(--line); }
.strip-item { display: flex; align-items: center; gap: 14px; padding: 4px 20px; border-left: 1px solid var(--line); min-width: 0; }
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-icon { width: 38px; height: 38px; color: var(--primary); stroke-width: 1.9; flex: none; }
.strip-item strong { display: block; font-size: 16.5px; font-weight: 600; }
.strip-item span { display: block; font-size: 14.5px; color: var(--muted); }
#stat strong { font-size: 27px; font-weight: 700; line-height: 1.1; }
#stat .stat-n { display: inline; font-size: inherit; color: inherit; }

/* Lucide icon weight: 2 on the 24-unit grid; larger icons get a thinner unit stroke so the optical weight stays ~2 px */
.home2 .icon, .topbar .icon { stroke-width: 2; }
.home2 .feature-icon .icon { stroke-width: 1.5; }
.home2 .strip-icon { stroke-width: 1.55; }
.home2 .ex-tile-icon .icon { stroke-width: 2; }
/* typography refinements with Inter */
.h2-left h1 { font-weight: 800; letter-spacing: -.035em; line-height: 1.02; text-wrap: balance; }
.h2-sub { font-weight: 400; letter-spacing: -.005em; }
.btn.h2-choose { font-weight: 600; letter-spacing: -.01em; }
.feature h3 { font-weight: 700; letter-spacing: -.015em; }
.ex-head h2 { font-weight: 650; letter-spacing: -.01em; }
.ex-tile-value, #stat strong, .pl-time, .ex-dur { font-variant-numeric: tabular-nums; }
.ex-tile-value { font-weight: 700; letter-spacing: -.02em; }
.ex-tile.wrap .ex-tile-label { display: block; white-space: normal; line-height: 1.3; font-size: 13px; }
.ex-tile.wrap .help-tip { vertical-align: -3px; margin-left: 4px; }
.brand .brand-name { font-weight: 700; letter-spacing: -.025em; }
.mainnav a { font-weight: 450; }
/* site footer (light, secondary) */
.site-footer { border-top: 1px solid var(--line); margin-top: 8px; }
.site-footer-inner { max-width: 1400px; margin: 0 auto; padding: 16px 28px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer-brand { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 13.5px; color: var(--muted); text-decoration: none; }
.footer-links a[href]:hover { color: var(--primary); }
.footer-links a[aria-disabled="true"] { cursor: default; }

/* ---- final polish (home-v2-final-polish-002): moderate scale reduction, compact nav, tiles, feature badges */
.h2-hero { gap: 40px; padding: 30px 0 30px; }
.h2-left { padding-top: 22px; }
.h2-left h1 { font-size: clamp(36px, 3.72vw, 57px); margin-bottom: 18px; }
.h2-sub { font-size: clamp(16.5px, 1.24vw, 19px); margin-bottom: 24px; }
.h2-zone { padding: 22px 22px 18px; gap: 8px; border-radius: 16px; }
.btn.h2-choose { font-size: 18px; padding: 13px 50px; gap: 10px; }
.h2-choose .icon { width: 22px; height: 22px; }
.h2-drop { font-size: 15px; margin-top: 4px; }
.h2-formats { font-size: 14px; }
.h2-privacy { font-size: 13.5px; margin-top: 12px; display: block; }
.h2-privacy .icon { display: inline-block; vertical-align: -3px; margin-right: 6px; width: 16px; height: 16px; }
.example-card { min-height: 0; padding: 18px 20px 18px; border-radius: 20px; }
.ex-head { margin-bottom: 6px; }
.ex-head h2 { font-size: 17px; }
.ex-tiles { gap: 10px; margin: 6px 0 14px; }
.ex-tile { position: relative; gap: 10px; padding: 10px 26px 10px 10px; border-radius: 13px; }
.ex-tile-icon { width: 38px; height: 38px; }
.ex-tile-icon .icon { width: 21px; height: 21px; }
.ex-tile-text { min-width: 0; }
.ex-tile-value { font-size: 19px; }
.ex-tile-label { font-size: 13px; white-space: normal; line-height: 1.25; display: block; }
.ex-tile .help-tip { position: absolute; top: 8px; right: 8px; }
.ex-tile .help-tip .icon { width: 15px; height: 15px; }
.ex-listen { padding-top: 14px; }
.ex-listen h3 { font-size: 15px; margin-bottom: 10px; }
.pl-btn { width: 44px; height: 44px; }
.pl-btn .icon { width: 19px; height: 19px; }
.h2-features { gap: 18px; }
.feature { min-height: 0; padding: 22px 18px 22px 20px; border-radius: 18px; align-items: center; }
.feature h3 { font-size: 18.5px; margin-bottom: 8px; }
.feature p { font-size: 14.5px; margin-bottom: 16px; }
.feature-cta { font-size: 14.5px; padding: 8px 15px; }
/* feature icon = tinted badge, same treatment as the example tiles, so icon and illustration read as one family */
.feature-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; padding: 0; margin-top: -2px; }
.feature-icon.orange { background: #ffe9d2; } .feature-icon.blue { background: #dcebff; } .feature-icon.purple { background: #e9e2ff; }
.home2 .feature-icon .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.feature-art .illu { width: 96px; filter: drop-shadow(0 8px 16px rgba(11, 27, 77, .10)); }
.feature[data-feature="track"] .illu { width: 104px; }
.feature[data-feature="community"] .illu { width: 104px; filter: drop-shadow(0 8px 16px rgba(91, 69, 214, .18)); }
.h2-strip { margin-top: 22px; padding-top: 22px; }
.strip-icon { width: 34px; height: 34px; }
.strip-item strong { font-size: 15.5px; }
.strip-item span { font-size: 14px; }
#stat strong { font-size: 25px; }
/* header: compact "More" menu - shown when the secondary links no longer fit */
.nav-more { position: relative; display: none; }
.more-btn { display: inline-flex; align-items: center; gap: 4px; font: inherit; font-size: 15px; font-weight: 450; color: var(--text);
  background: none; border: 0; padding: 8px 6px; cursor: pointer; border-radius: 8px; }
.more-btn .icon { width: 16px; height: 16px; transition: transform .15s; }
.more-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.more-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.more-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 220px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(11, 27, 77, .12); padding: 6px; z-index: 30; }
.more-menu[hidden] { display: none; }
.more-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-size: 14.5px; cursor: default; border-bottom: 0; }
.more-menu a:focus { outline: none; background: var(--primary-soft); }
.more-menu small { font-size: 12px; color: var(--muted); }
.more-menu .menu-acct { display: none; }
/* ---- home-v3-product-polish-001 */
/* example spectrogram: the Results plotting convention (heatmapSvg) with the Product plot palette */
.home2 { --plot-frame: #d5dfec; --plot-tick: #9aa8bd; --plot-grid: #edf2f8; }
.ex-plot .plot text, .ex-plot .gutter text { font-size: 15px; fill: #5f6f86; }
.ex-plot .plot .axis-title, .ex-plot .gutter .axis-title { font-size: 15.5px; fill: var(--text); }
.ex-plot .plot-wrap { margin: 0 -4px; }
/* grid/flex children must be allowed to shrink so a wide plot or table scrolls inside its own box, never the page */
.h2-right, .example-card, .ex-plot, .feature, .feature-preview, .feature-preview > *, .hist { min-width: 0; }
.feature-preview > * { max-width: 100%; }
.ex-view { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.ex-view .toggle button { min-height: 30px; padding: 4px 16px; font-size: 13.5px; }
.ex-plot .ph-legend { justify-content: flex-end; }
.ex-cb-caption { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ex-cb-swatch { width: 44px; height: 8px; border-radius: 4px; flex: none; }
/* the history example needs a little more width than the other two cards on desktop */
.h2-features { grid-template-columns: minmax(0, 1fr) minmax(0, 1.22fr) minmax(0, 1fr); }
.hist-table th, .hist-table td { padding: 6px 4px; }
.hist-table { font-size: 11px; }
.hist-table th { font-size: 10px; }
.hist-table td:first-child, .hist-table th:first-child { padding-left: 8px; }
.hist-table td:last-child, .hist-table th:last-child { padding-right: 8px; }
/* rich help tooltip (Relative intensity) */
.help-tip.rich .tiptext { width: 320px; padding: 12px 14px; line-height: 1.45; }
.help-tip.rich .tiptext strong { display: block; margin-bottom: 6px; font-size: 13px; }
.help-tip.rich .tp { display: block; margin-top: 6px; }
.help-tip.rich .tp.tech { font-size: 11.5px; opacity: .78; border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 6px; }
/* feature cards: one structure for all three - badge + heading, text, visual preview, CTA */
.feature { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding: 22px 22px 22px; }
.feature-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.feature-head h3 { margin: 0; }
.feature > p { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.feature-preview { flex: 1; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; min-height: 128px; }
.feature-cta { align-self: flex-start; }
.ex-data-tag { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--muted); background: rgba(255, 255, 255, .8); border: 1px dashed #b8c4d6; border-radius: 6px; padding: 2px 7px; margin-bottom: 6px; }
.hist { width: 100%; }
.hist-scroll { overflow-x: auto; border-radius: 10px; border: 1px solid #d6e4f7; background: #fff; box-shadow: 0 6px 16px rgba(11, 27, 77, .06); }
.hist-table { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.hist-table th { text-align: left; font-weight: 600; color: var(--muted); background: #f5f9ff; padding: 6px 6px; line-height: 1.2; vertical-align: bottom; font-size: 10.5px; }
.hist-table td { padding: 6px 6px; border-top: 1px solid #edf2f8; white-space: nowrap; color: var(--text); }
.hist-table td:first-child, .hist-table th:first-child { padding-left: 9px; }
.hist-table td:last-child { font-weight: 600; color: var(--orange); }
.doc-preview { display: flex; align-items: center; gap: 14px; width: 100%; }
.doc-preview .illu { width: 74px; flex: none; filter: drop-shadow(0 8px 16px rgba(11, 27, 77, .10)); }
.doc-side { flex: 1; min-width: 0; }
.doc-title { display: block; font-size: 12.5px; font-weight: 650; margin-bottom: 4px; color: var(--text); }
.doc-side .hist-scroll { border-color: #f3dcc2; }
.doc-side .hist-table th { background: #fff6ec; }
.com-preview .illu { width: 128px; filter: drop-shadow(0 8px 18px rgba(91, 69, 214, .2)); }

/* ---- home-v3-1-mockup-alignment-001 (coordination/design/home-v3-1-mockup.jpg) */
/* hero illustration: sits behind the right side of the text column, never above the text */
.h2-left { position: relative; }
.h2-left > :not(.hero-illu) { position: relative; z-index: 1; }
.hero-illu { position: absolute; z-index: 0; top: 14px; right: -46px; width: 236px; height: auto; pointer-events: none; user-select: none; }
.h2-left .h2-sub { max-width: 21em; }
/* three equal benefits (the previous task's wider middle column is not needed for the 5-column example table) */
.h2-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* compact upload CTA (same #zone / #file / drop handling as before) */
.h2-zone.compact { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 0; border: 0; background: none;
  border-radius: 0; text-align: left; max-width: 30em; }
.h2-zone.compact:hover, .h2-zone.compact.drag { background: none; }
.h2-zone.compact.drag .btn.h2-choose { outline: 3px dashed var(--primary-line); outline-offset: 4px; }
.h2-zone.compact .btn.h2-choose { font-size: 17px; padding: 13px 30px; gap: 10px; border-radius: 12px; }
.h2-zone.compact .h2-choose .icon { width: 20px; height: 20px; }
.h2-reassure { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.45; }
.h2-zone.compact .h2-formats { font-size: 12px; color: #8796ad; }
/* V3.1 feature cards: three equal benefits */
.feature.v31 { padding: 22px 22px 20px; }
.feature.v31 .feature-head { align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.feature.v31 .feature-head h3 { margin: 2px 0 6px; font-size: 19px; }
.feature.v31 .feature-head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.feature-icon.plain { background: none !important; width: auto; height: auto; margin-top: 2px; }
.home2 .feature-icon.plain .icon { width: 34px; height: 34px; stroke-width: 1.9; }
.feature.v31 .feature-preview { min-height: 150px; margin-bottom: 16px; }
.feature-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hist-table.v31 { font-size: 12px; }
.hist-table.v31 th { font-size: 11px; }
.hist-table.v31 td:last-child { color: var(--text); font-weight: 500; }
@media (max-width: 480px) { .hist-table.v31 th, .hist-table.v31 td { padding-left: 4px; padding-right: 4px; } .hist-table.v31 { font-size: 11.5px; } }
.hist-table .th-short { display: none; }
@media (max-width: 480px) { .hist-table .th-long { display: none; } .hist-table .th-short { display: inline; } }
/* report preview: small stacked sheet with the real example spectrogram */
.rp-stack { position: relative; width: 250px; max-width: 100%; height: 150px; }
.rp-sheet { position: absolute; inset: 0 14px 0 0; background: #fff; border: 1px solid #d6e4f7; border-radius: 10px; padding: 12px 14px;
  box-shadow: 0 8px 22px rgba(11, 27, 77, .10); display: flex; flex-direction: column; gap: 6px; }
.rp-sheet.back { inset: 8px 0 -6px 14px; box-shadow: none; background: #f4f8fe; }
.rp-title { font-size: 13px; font-weight: 650; color: var(--text); }
.rp-sub { font-size: 10.5px; color: var(--muted); margin-top: -4px; }
.rp-row { display: flex; gap: 10px; align-items: center; margin-top: 2px; }
.rp-spec { width: 82px; height: 42px; border-radius: 5px; background-color: #120726; background-size: 100% 220%; background-position: center 42%; flex: none; }
.rp-lines { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.rp-lines i, .rp-line { display: block; height: 5px; border-radius: 3px; background: #e6edf6; }
.rp-lines i.short, .rp-line.short { width: 60%; }
/* community: what a shared dataset can describe (descriptive questions, no diagnosis) */
.cm-box { position: relative; width: 100%; background: rgba(255, 255, 255, .75); border: 1px solid #e3dcfb; border-radius: 12px; padding: 12px 14px 12px; }
.cm-box strong { display: block; font-size: 13px; font-weight: 650; margin-bottom: 6px; padding-right: 48px; }
.cm-box ul { margin: 0; padding-left: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.55; padding-right: 40px; }
.cm-bars { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 30px; }
@media (max-width: 700px) { .hero-illu { display: none; } }

@media (max-width: 1120px) {
  .mainnav a.nav-secondary { display: none; }
  .nav-more { display: block; }
}
/* every destination stays reachable: what leaves the header bar appears in the More menu */
@media (max-width: 900px) {
  .acct-create { display: none; }
  .more-menu .menu-create { display: flex; }
}
@media (max-width: 600px) {
  .acct-login { display: none; }
  .more-menu .menu-login { display: flex; }
  .topbar-inner { padding: 10px 12px; gap: 8px; }
  .brand { gap: 7px; }
  .brand .brand-name { font-size: 17px; }
  .brand-glyph svg { width: 26px; height: 20px; }
  .beta-pill { font-size: 9.5px; padding: 3px 6px; margin-left: 0; letter-spacing: .03em; }
}
.h2-hero { padding-bottom: 24px; }

@media (max-width: 1180px) {
  .h2-hero { grid-template-columns: minmax(0, 1fr); gap: 30px; padding-top: 28px; }
  .h2-left { padding-top: 6px; max-width: 760px; }
  .hero-illu { right: 0; top: 0; width: 200px; }
  .h2-left h1 { font-size: clamp(38px, 5.4vw, 52px); }
  .h2-features { grid-template-columns: minmax(0, 1fr); }
  .feature { min-height: 0; }
  .h2-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
  .strip-item:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .ex-tiles { grid-template-columns: 1fr; gap: 8px; }
  .ex-players { grid-template-columns: 1fr; gap: 16px; }
  .ex-sep { display: none; }
  .example-card { min-height: 0; }
}
@media (max-width: 600px) {
  .mainnav { margin-left: auto; margin-right: 0; gap: 4px; }
  .mainnav a { font-size: 14.5px; }
  .more-btn { font-size: 14.5px; padding: 8px 4px; }
  .account { gap: 0; }
  .acct-btn { padding: 8px 10px; }
  main.home { padding: 0 16px 32px; }
  .h2-hero { padding: 18px 0 22px; }
  .h2-left h1 { font-size: 34px; }
  .h2-sub { font-size: 16px; }
  .btn.h2-choose { font-size: 17px; padding: 12px 30px; }
  .h2-zone { padding: 18px 12px 14px; }
  .h2-sub { font-size: 16.5px; margin-bottom: 22px; }
  .btn.h2-choose { font-size: 18px; padding: 13px 34px; }
  .h2-zone { padding: 22px 14px 18px; }
  .example-card { padding: 16px 14px 18px; border-radius: 18px; }
  .ex-head { flex-wrap: wrap; row-gap: 6px; }
  .ex-spec text { font-size: 19px; }
  .ex-spec .ax { font-size: 19px; }
  .ex-spec .minor { display: none; }
  .feature { padding: 20px 16px; }
  .feature-art { align-self: flex-end; }
  .feature-body { grid-template-columns: 1fr; }
  .feature-icon { grid-row: auto; margin-bottom: 10px; }
  .feature p, .feature-cta { grid-column: 1; }
  .h2-strip { grid-template-columns: 1fr; }
  .strip-item { border-left: 0; padding-left: 0; }
  .site-footer-inner { padding: 14px 16px 20px; }
  .footer-links { gap: 16px; }
}

/* ---------------------------------------------------------------- Product Results (results-product-summary-001) */
/* reference: results UX mockup - compact metadata, result block, spectrogram, inline technical details */
.product > .res-meta { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding: 0 4px; margin-bottom: 8px; background: none; border: 0; box-shadow: none; }
.res-meta .recording-icon { width: 30px; height: 30px; border-radius: 8px; }
.res-meta .recording-name { font-size: 16px; }
.res-meta .recording-icon .icon { width: 18px; height: 18px; }
.res-meta .recording-name { flex: 1 1 auto; min-width: 0; }
.res-facts { margin: 0; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.res-block { padding: 12px 20px 10px; }
.res-block.ok { background: linear-gradient(180deg, #f1faf5 0%, #ffffff 100%); border-color: #cfe9da; }
.res-block.info { background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 100%); border-color: var(--primary-line); }
.res-head { display: flex; gap: 12px; align-items: flex-start; }
.res-mark { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; margin-top: 0; }
.res-block.ok .res-mark { background: #1f9d5b; }
.res-block.info .res-mark { background: var(--primary); }
.res-mark .icon { width: 19px; height: 19px; }
.res-title { margin: 0; font-size: 22px; line-height: 1.2; letter-spacing: -.02em; }
.res-lead { margin: 2px 0 0; font-size: 14.5px; color: var(--muted); }
.res-tiles { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 10px; margin: 10px 0 0; }
.res-tile { position: relative; display: flex; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 28px 10px 12px; min-width: 0; box-shadow: var(--shadow); }
.res-tile .ex-tile-icon { width: 34px; height: 34px; }
.res-tile .ex-tile-icon .icon { width: 18px; height: 18px; }
.res-tile-text { min-width: 0; }
.res-tile-label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.res-tile-value { font-size: 20px; font-weight: 720; letter-spacing: -.02em; margin: 1px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.res-tile-sub { font-size: 12px; color: var(--muted); }
.res-tile .help-tip { position: absolute; top: 10px; right: 10px; }
.res-tile .help-tip .icon { width: 15px; height: 15px; }
.res-missing, .res-time { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.res-time { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.res-time .help-tip .icon { width: 15px; height: 15px; }
.res-why { margin: 10px 0 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px 16px; }
.res-why h3 { margin: 0 0 2px; font-size: 14px; }
.res-why ul { margin: 0; padding-left: 20px; }
.res-why li { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 1px; }
.res-footer { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.res-footer .icon { width: 15px; height: 15px; flex: none; margin-top: 1px; color: var(--primary); }
.tech-details { padding: 0; }
.tech-details > summary { list-style: none; cursor: pointer; display: flex; justify-content: flex-start; align-items: center; gap: 12px; padding: 12px 20px; }
.tech-details > summary::-webkit-details-marker { display: none; }
.tech-details > summary h2 { margin: 0; font-size: 17px; }
.tech-details > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
/* arrow on the left: points right when closed, down when open */
.tech-chev, .tg-chev { flex: none; width: 9px; height: 9px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(-45deg); margin: 0 2px 0 0; transition: transform .15s; }
.tech-details[open] > summary .tech-chev, .tech-group[open] > summary .tg-chev { transform: rotate(45deg); margin-top: -4px; }
.tech-body { padding: 0 22px 18px; border-top: 1px solid var(--line); }
.tech-body .tech-measures { margin-top: 12px; }
.tech-body .tech-measures .measures { margin-bottom: 0; }
.tech-body .viz-card { margin: 16px 0 0; box-shadow: none; }
/* results-technical-details-011: labelled groups, closed by default */
.tech-group { border-top: 1px solid var(--line); }
.tech-body > .tech-group:first-child { border-top: 0; }
.tech-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: 15px; font-weight: 650; }
.tech-group > summary::-webkit-details-marker { display: none; }
.tech-group > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.tech-group .tg-chev { width: 8px; height: 8px; }
.tg-body { padding: 0 0 14px 22px; min-width: 0; overflow-wrap: anywhere; }
.tg-body > .viz-card { margin: 4px 0 12px; box-shadow: none; }
.tg-body > .tech-measures { margin: 4px 0 12px; }
.tg-body .concept { margin-top: 10px; }
.tech-sec h3 { margin: 14px 0 8px; font-size: 14px; }
.tech-sec h4 { margin: 10px 0 6px; }
.tg-body table.data { width: 100%; table-layout: fixed; }
.tg-body table.data th, .tg-body table.data td { overflow-wrap: anywhere; vertical-align: top; }
.tech-page { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; margin-bottom: 18px; }
/* results-product-polish-002: denser first viewport (spectrogram card + listening) */
main:has(> .product) { padding-top: 8px; }
.product .evidence-card { padding: 12px 20px 10px; }
.product .evidence-card .viz-head { margin-bottom: 4px; align-items: center; }
/* results-uploaded-audio-003: title and its one-line explanation share a row when there is room */
.product .evidence-card .viz-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.product .evidence-card .viz-head .explain { margin: 0; }
.product .evidence-card .toggle button { min-height: 30px; padding: 4px 16px; }
.product .evidence-card .evidence-legend { margin-top: 4px; }
.res-listen { display: flex; align-items: center; gap: 10px 22px; border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px; }
.res-listen h3 { margin: 0; font-size: 14px; font-weight: 600; white-space: nowrap; }
.res-listen .ex-players { flex: 1; min-width: 0; gap: 18px; }
.res-listen .ex-sep { height: 32px; }
.res-listen .pl-btn { width: 34px; height: 34px; }
.res-listen .pl-btn .icon { width: 17px; height: 17px; }
.res-listen .pl-top { margin-bottom: 5px; }
.res-listen .pl-name { font-size: 14px; }
.res-listen .pl-time { font-size: 12.5px; }
.res-listen-card .res-listen { border-top: 0; margin-top: 0; padding-top: 0; }
/* results-analyse-another-013: clear separation from Technical details (was 16px); status under the button */
.res-again { margin: 36px 0 0; display: flex; flex-direction: column; align-items: flex-end; }
/* results-analyse-another-link-014: a plain blue text link, right-aligned */
.again-link { padding: 4px 2px; border: 0; background: none; color: var(--primary); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.again-link:hover { text-decoration: underline; }
.again-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.again-info { margin-top: 10px; align-self: stretch; }
.again-info:empty { display: none; }
@media (max-width: 760px) {
  .res-tiles { grid-template-columns: 1fr; }
  .res-title { font-size: 20px; }
  .res-block { padding: 14px 14px 12px; }
  .res-listen { flex-direction: column; align-items: stretch; }
  .product .evidence-card { padding: 12px 12px 10px; }
  .res-head { gap: 12px; }
  .res-mark { width: 28px; height: 28px; }
  .tech-body { padding: 0 14px 14px; }
  .tg-body { padding-left: 0; }
}
/* results-phase2 spectrogram UX: tools row, crosshair readout, zoom/pan */
.spec-tools { display: flex; align-items: center; gap: 6px 16px; flex-wrap: wrap; margin-top: 6px; }
.spec-hint { margin: 0; flex: 1 1 auto; font-size: 12.5px; color: var(--muted); }
.spec-marks { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.spec-marks input { margin: 0; accent-color: var(--primary); }
.spec-zoom { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; }
.spec-zoom .zb { min-width: 30px; height: 28px; padding: 0 8px; border: 0; border-radius: 999px; background: transparent; color: var(--text); font: inherit; font-size: 16px; font-weight: 650; line-height: 1; cursor: pointer; }
.spec-zoom .zb.reset { font-size: 13px; font-weight: 600; }
.spec-zoom .zb:hover:not(:disabled) { background: #fff; color: var(--primary); }
.spec-zoom .zb:disabled { color: #b4bfcf; cursor: default; }
.spec-zoom .zb:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.spec-zoom-level { min-width: 24px; text-align: center; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.evidence-card .plot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plot-hit { cursor: crosshair; }
.plot-wrap.dragging .plot-hit { cursor: grabbing; }
.spec-readout { position: absolute; z-index: 4; pointer-events: none; white-space: nowrap; background: #1d2330; color: #fff; font-size: 12.5px; padding: 5px 9px; border-radius: 6px; box-shadow: 0 4px 12px rgba(11, 27, 77, .25); font-variant-numeric: tabular-nums; }
.spec-readout span { display: block; margin-top: 2px; font-size: 11.5px; opacity: .85; }
@media (max-width: 760px) { .spec-hint { flex-basis: 100%; } }
/* results-spectrogram-playback-008: zoom in the header, white marks, readable crosshair, playback playhead */
.evidence-card .spec-ctrls { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; flex: none; }
.spec-zoom-ic { display: inline-grid; place-items: center; width: 26px; color: var(--primary); }
.spec-zoom-ic .icon { width: 17px; height: 17px; }
.evidence-card .spec-zoom { background: #fff; border-color: var(--primary-line); }
.xh .xh-u, .ph .ph-u { stroke: #000; stroke-opacity: .55; stroke-width: 3; }
.xh .xh-l { stroke: #fff; stroke-opacity: 1; stroke-width: 1; stroke-dasharray: 4 3; }
.ph .ph-l { stroke: #fff; stroke-width: 2; }
.ph .ph-cap { fill: #fff; stroke: #000; stroke-opacity: .55; stroke-width: 1; }
.spec-readout { border: 1px solid rgba(255, 255, 255, .35); }
/* legend swatches show the marks as they appear: white over the dark image */
.sw-boundary { background: linear-gradient(90deg, transparent 9px, #fff 9px 12px, transparent 12px), #2a1b3d; border: 0; }
.sw-cycles { background: repeating-linear-gradient(90deg, #fff 0 2px, transparent 2px 6px), #2a1b3d; height: 10px; }
/* results-spectrogram-cursor-level-009 */
.spec-readout .lvl { font-weight: 700; }

/* results-spectrogram-views-help-010: (i) next to Analysis/Raw */
.spec-views-tip { align-self: center; }
.spec-views-tip .tiptext strong { display: block; margin-bottom: 4px; }
.spec-views-tip .tiptext { z-index: 20; width: 260px; max-width: calc(100vw - 32px); }
@media (max-width: 760px) {
  .evidence-card .spec-ctrls { flex: 1 1 100%; position: relative; }
  .spec-views-tip { position: static; }
  .spec-views-tip .tiptext { left: 0; right: 0; top: calc(100% + 6px); width: auto; max-width: none; }
}

/* results-playback-session-012: only existing versions; choose the same recording again (local check) */
.res-listen { flex-wrap: wrap; }
.ex-players.single { grid-template-columns: minmax(0, 1fr); max-width: 520px; }
.res-listen .relink { flex-basis: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; }
.relink-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--primary-line); border-radius: 999px; background: #fff; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.relink-btn .icon { width: 15px; height: 15px; }
.relink-btn:hover:not(:disabled) { background: var(--primary-soft); }
.relink-btn:disabled { opacity: .6; cursor: progress; }
.relink-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.relink-hint { color: var(--muted); }
.relink-err { flex-basis: 100%; color: #b42318; font-weight: 600; }
/* ---- accounts slice: Save entry, consent panel, sign-in, My recordings */
body.signed-in .acct-create, body.signed-in .more-menu .menu-create { display: none !important; }
.res-save-btn { margin-left: auto; padding: 4px 2px; border: 0; background: none; color: var(--primary); font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.res-save-btn:hover { text-decoration: underline; }
.res-save-btn:focus-visible, .link-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.res-saved { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.res-saved .icon { width: 16px; height: 16px; }
.res-saved a { color: var(--primary); text-decoration: none; }
.res-saved a:hover { text-decoration: underline; }
.save-panel h2 { font-size: 17px; }
.save-panel p { margin: 0 0 12px; color: var(--muted); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; font-weight: 500; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--primary); }
.acct-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.btn.acct-primary { background: var(--primary); }
.btn.acct-primary:not([disabled]):hover { background: var(--primary-hover); }
.btn.danger { background: #c62828; }
.link-btn { padding: 4px 2px; border: 0; background: none; font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer; }
.danger-link { color: #c62828; }
.link-btn:hover { text-decoration: underline; }
.save-err, .acct-err { margin: 0 0 12px; }
.acct-card { max-width: 520px; margin: 24px auto; padding: 28px; }
.acct-card h1 { margin: 0 0 8px; font-size: 24px; }
.acct-lead { margin: 0 0 18px; color: var(--muted); }
.acct-note { padding: 10px 12px; border-radius: 8px; background: var(--warn-bg); border: 1px solid var(--warn-line); font-size: 14px; }
.acct-form { display: flex; flex-direction: column; gap: 8px; }
.acct-form label { font-weight: 600; font-size: 14.5px; }
.acct-form input { font: inherit; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
.acct-form input:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.acct-form .btn { align-self: flex-start; margin-top: 6px; }
.acct-confirm { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #fdf3f3; border: 1px solid #f0c4c4; }
.acct-confirm p { margin: 0 0 10px; font-weight: 600; }
.my-page h1 { margin: 8px 0 16px; font-size: 26px; }
.my-list { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.my-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto; gap: 8px 20px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.my-main { display: flex; flex-direction: column; min-width: 0; }
.my-open { font-weight: 700; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.my-open:hover { color: var(--primary); text-decoration: underline; }
.my-date { font-size: 13px; color: var(--muted); }
.my-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; font-variant-numeric: tabular-nums; }
.my-facts dt { font-size: 12px; color: var(--muted); }
.my-facts dd { margin: 0; font-weight: 600; font-size: 14.5px; }
.my-state { color: var(--muted); font-size: 14px; }
.my-side { justify-self: end; text-align: right; }
.my-side .acct-confirm { text-align: left; }
.my-empty { color: var(--muted); }
.acct-account h2 { font-size: 17px; }
.acct-account p { margin: 0 0 12px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .my-row { grid-template-columns: minmax(0, 1fr); }
  .my-side { justify-self: start; text-align: left; }
  .acct-card { margin: 8px auto; padding: 20px; }
  .res-save-btn, .res-saved { margin-left: 0; }
}
/* accounts: second Save entry under the player; original-recording step in the save panel */
.listen-save { display: flex; justify-content: flex-end; margin-top: 10px; }
.listen-save .res-save-btn, .listen-save .res-saved { margin-left: 0; }
/* the opened save panel uses the Results "info" block treatment (light-blue tint, blue border) so it stands out */
.save-panel { scroll-margin-top: 88px; background: linear-gradient(180deg, #f0f6ff 0%, #ffffff 100%); border-color: var(--primary-line); }
.save-original { margin: 0 0 14px; }
.save-panel .save-need { margin: 0 0 8px; }
.save-panel .save-file { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.save-file .icon { width: 16px; height: 16px; flex: none; color: var(--ok); }
/* ---- recording context + Medical information (chips; every field visible, most are selections) */
.sp-section { margin: 4px 0 16px; padding-top: 14px; border-top: 1px solid var(--primary-line); }
.sp-section h3, .sd-head h2, .sd-head h3 { margin: 0 0 8px; font-size: 16px; }
.sd-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fld { display: grid; grid-template-columns: minmax(160px, 240px) minmax(0, 1fr); gap: 6px 16px; align-items: start; margin: 0 0 12px; }
.fld-label { font-size: 14px; font-weight: 600; padding-top: 6px; }
.fld-opt { font-weight: 400; color: var(--muted); }
.fld-body { min-width: 0; }
.fld-body input[type="text"], .fld-body textarea { width: 100%; margin-top: 6px; }
.fld-body input, .fld-body textarea, .fld-body select { font: inherit; font-size: 14.5px; padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; color: var(--text); }
.fld-body textarea { margin-top: 0; resize: vertical; }
.fld-body input:focus, .fld-body textarea:focus, .fld-body select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.fld-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.save-panel .fld-hint { margin: 4px 0 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font: inherit; font-size: 14px; padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--text); cursor: pointer; }
.chip:hover { border-color: var(--primary-line); background: var(--primary-soft); }
.chip[aria-checked="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.chip:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ctx-when, .med-date { display: flex; flex-wrap: wrap; gap: 8px; }
.ctx-num { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.ctx-num input { width: 84px; }
.ctx-filedate { margin-top: 4px; font-size: 14px; }
.med-test { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 2px; margin: 0 0 10px; background: #fff; }
.med-test-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.med-tests-edit .med-add { font-size: 14.5px; }
.med-tests { margin: 0; padding-left: 18px; }
.med-tests li { margin: 0 0 6px; }
.report-status { font-size: 14px; color: var(--muted); }
.report-status.err { color: #c62828; }
.saved-details .sd-block + .sd-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.ctx-summary { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0 0 6px; }
.ctx-summary dt { font-size: 12px; color: var(--muted); }
.ctx-summary dd { margin: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.med-page .card h2 { font-size: 17px; }
.med-back { margin: 8px 0 0; }
.med-tomb { padding: 8px 12px; border-radius: 8px; background: var(--primary-soft); border: 1px solid var(--primary-line); }
.med-history-list { margin: 0 0 8px; padding-left: 18px; }
/* imaging report files inside a test card: name, Open, Remove; consent + upload below */
.med-file-list { list-style: none; margin: 0 0 8px; padding: 0; }
.med-file-list:empty { display: none; }
.med-file-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding: 8px 10px; margin-bottom: 6px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--primary-soft); }
.med-file-name { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; font-size: 14.5px; }
.med-file-acts { display: inline-flex; gap: 16px; align-items: center; }
.med-file-acts .again-link, .med-file-acts .link-btn { padding: 4px 0; }
.med-file-list .acct-confirm { flex-basis: 100%; }
.med-file-list .acct-confirm p { margin: 4px 0; }
.med-file-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 8px; }
.med-files-fld .report-consent { margin: 0; }
.med-test-confirm .acct-confirm { margin: 0 0 10px; }
.med-file-summary { margin: 4px 0 0; padding-left: 18px; font-size: 14.5px; }
.med-file-summary a { color: var(--primary); overflow-wrap: anywhere; }
.med-history-list { list-style: none; padding-left: 0; }
.med-history-list > li { margin-bottom: 10px; }
.med-h-date { font-weight: 600; font-size: 14px; }
.med-history-list ul { margin: 2px 0 0; padding-left: 18px; color: var(--text); font-size: 14.5px; }
@media (max-width: 700px) {
  .fld { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .fld-label { padding-top: 0; }
}
/* planned tests, the scheduled question and what decided a saved recording's medical link */
.med-scheduled-fld { margin-top: 14px; }
.my-medical-link.med-zone { padding: 18px 20px 12px; }
.med-optional { font-size: 12px; font-weight: 600; padding: 2px 8px; margin-left: 6px; vertical-align: middle; background: #ece8fb; color: #5b4bb5; }
.ctx-notes { width: 100%; box-sizing: border-box; }
.med-test.med-planned { border-style: dashed; }
.med-tests-planned { margin-top: 6px; }
.sd-basis { margin: 8px 0 0; color: var(--muted); }
/* Medical findings & tests: one calm lavender tint for the whole area, so it reads as its own category next to the
   recording context (fields inside keep their normal look) */
.med-zone { background: #f8f6ff; border: 1px solid #e7e1fa; border-radius: 12px; padding: 14px 16px 6px; }
.sp-section.med-zone { margin-top: 6px; }
.saved-details .sd-block.med-zone { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e7e1fa; }
/* Cleaner listening version: a short note under the two players */
.cleaner-note { margin: 8px 0 0; font-size: 13px; color: var(--muted); max-width: 70ch; }
/* Cleaner: a subtly marked derived listening aid (the Original stays primary); its playhead has its own colour */
.player[data-cleaner] { background: #f3fafc; border: 1px solid #d5ecf2; border-radius: 10px; padding: 6px 10px; }
.ph.ph-cleaner .ph-l { stroke: #22d3ee; }
.ph.ph-cleaner .ph-cap { fill: #22d3ee; }
.ph-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.ph-key { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-left: 10px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.ph-key:first-child { margin-left: 0; }
.ph-key-original { background: #fff; }
.ph-key-cleaner { background: #22d3ee; }
/* Typical Cycle: the measured active part (cycle_morphology.activity), restrained */
.act-shade { fill: var(--primary); fill-opacity: .09; }
.cycle-activity { margin: 6px 0 0; font-size: 14px; color: var(--text); }

/* =====================================================================================================================
   Design refresh (results-redesign-028): one visual language for Home and Results - a soft blue-grey page, white
   cards, deep navy text, vivid blue controls, restrained purple / blue / green / orange accents, small handwritten notes.
   Shared tokens first; page-specific rules only where a page has its own element.
   ===================================================================================================================== */
:root {
  --page: #dbe4ef; --page-top: #e3eaf3;
  --card-line: #e2e9f2; --card-radius: 18px;
  --card-shadow: 0 1px 2px rgba(16, 36, 84, .05), 0 10px 28px rgba(16, 36, 84, .07);
  --green: #16a34a; --green-soft: #e6f6ec; --hand: #7c3aed;
  --hand-font: "Segoe Print", "Bradley Hand", "Chalkboard SE", "Marker Felt", "Comic Neue", cursive;
  --wave: #2f6bff; --wave-ex: #b8c4d6; --pulse: #7c4dff; --pulse-soft: rgba(124, 77, 255, .14);
}
body { background: linear-gradient(180deg, var(--page-top) 0, var(--page) 420px) var(--page); background-attachment: fixed; }
.topbar { background: rgba(227, 234, 243, .86); border-bottom-color: rgba(16, 36, 84, .06); }
.acct-btn.acct-login, .acct-btn.acct-my { background: #fff; border: 1px solid var(--card-line); box-shadow: 0 1px 2px rgba(16, 36, 84, .05); }
.card, .example-card, .feature, .feature.v31 { background: #fff; border: 1px solid var(--card-line); border-radius: var(--card-radius); box-shadow: var(--card-shadow); }
.feature.orange, .feature.blue, .feature.purple { background: #fff; border-color: var(--card-line); }
.home2::before { display: none; }                                   /* no decorative blob */
.ex-tile, .res-tile { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 36, 84, .04); }
.ex-tile-icon.green { background: var(--green-soft); color: var(--green); }
.h2-strip { border-top-color: rgba(16, 36, 84, .08); }
.btn.h2-choose, .btn.acct-primary { box-shadow: 0 6px 16px rgba(8, 120, 255, .22); }

/* segmented Raw / Analysis selector (Home and Results): strong blue selected state, clearly distinct inactive state */
.viz-card .toggle, .ex-view .toggle { background: #eef3f9; border: 1px solid var(--card-line); padding: 4px; gap: 4px; }
.viz-card .toggle button, .ex-view .toggle button { color: var(--text); background: transparent; min-height: 36px; padding: 6px 22px; font-weight: 600; }
.viz-card .toggle button:hover:not([aria-pressed="true"]), .ex-view .toggle button:hover:not([aria-pressed="true"]) { background: #fff; }
.viz-card .toggle button[aria-pressed="true"], .ex-view .toggle button[aria-pressed="true"] { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(8, 120, 255, .28); }

/* handwritten accents: decorative only (aria-hidden), desktop widths only */
.hand-row { display: flex; justify-content: flex-end; height: 26px; margin: 0 0 4px; padding-right: 96px; pointer-events: none; }
.hand-note { font-family: var(--hand-font); color: var(--hand); font-size: 13.5px; line-height: 1; transform: rotate(-3deg);
  white-space: nowrap; display: inline-flex; align-items: flex-end; gap: 2px; opacity: .9; }
.hand-note svg { width: 26px; height: 20px; fill: none; stroke: var(--hand); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 4px; }
@media (max-width: 1000px) { .hand-row { display: none; } }   /* the header wraps: no reliable place next to the selector */

/* ---- Results layout */
main:has(> .product) { max-width: 1180px; }
.product > .card { margin-bottom: 14px; }
.product > .res-meta { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; padding: 10px 16px; margin-bottom: 14px; box-shadow: var(--card-shadow); }
.res-block, .res-block.ok, .res-block.info, .res-block.weak { position: relative; background: #fff; border-color: var(--card-line); padding: 20px 22px 14px; }
.res-head { position: relative; align-items: center; gap: 16px; }
.res-mark { width: 44px; height: 44px; }
.res-mark .icon { width: 24px; height: 24px; }
.res-block.ok .res-mark { background: var(--green); }
.res-block.weak .res-mark { background: #e8edf5; color: #52627a; }
.res-block.info .res-mark { background: var(--primary-soft); color: var(--primary); }
.res-title { font-size: 26px; letter-spacing: -.025em; }
.res-lead { font-size: 15px; }
.res-tiles { gap: 14px; margin-top: 18px; }
.res-tile { padding: 16px 30px 16px 14px; gap: 14px; align-items: center; min-height: 92px; }
.res-tile .ex-tile-icon { width: 46px; height: 46px; border-radius: 50%; }
.res-tile .ex-tile-icon .icon { width: 22px; height: 22px; }
.res-tile-label { font-size: 13px; font-weight: 600; color: var(--text); }
.res-tile-value { font-size: 23px; font-weight: 750; margin-top: 2px; }
.res-tile-sub { font-size: 12.5px; line-height: 1.35; }
.res-tile.muted .res-tile-value { font-size: 16px; font-weight: 650; color: #6b7a90; }
.res-foot { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; margin-top: 12px; }
.res-foot .res-time { margin: 0; }
.res-foot .res-footer { margin: 0; flex: 1 1 360px; }
.res-foot .res-time + .res-footer { border-left: 1px solid var(--card-line); padding-left: 18px; }

/* spectrogram card + player */
.product .evidence-card { position: relative; padding: 18px 22px 16px; }
.product .evidence-card .viz-head { margin-bottom: 10px; }
.product .evidence-card .viz-card h2, .product .viz-card h2 { font-size: 20px; }
.spec-ctrls { position: relative; }

.spec-zoom { background: #fff; border-color: var(--card-line); padding: 3px 6px; }
.res-listen { border-top-color: var(--card-line); }

/* activity + typical pulse */
.viz-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.viz-row.single { grid-template-columns: minmax(0, 1fr); }
.viz-row > .card { margin: 0; position: relative; }
.viz-ic { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; margin-right: 10px; vertical-align: middle; }
.viz-ic .icon { width: 18px; height: 18px; }
.viz-ic.purple { background: var(--purple-soft); color: var(--purple); }
.viz-ic.blue { background: var(--primary-soft); color: var(--primary); }
.viz-row h2 { display: flex; align-items: center; }
/* sound activity: one filtered envelope (blue curve, subtle fill), excluded spans discreet */
.act-box { min-height: 120px; }
.act-svg { width: 100%; height: auto; display: block; }
.act-svg text { font-size: 13px; fill: #5f6f86; font-family: inherit; }
.act-svg .axis-title { fill: var(--text); font-size: 12.5px; }
.act-line { stroke: var(--wave); stroke-width: 1.4; fill: none; stroke-linejoin: round; }
.act-area { fill: var(--wave); fill-opacity: .12; }
.act-grid { stroke: #edf1f6; }
.act-axis { stroke: #cfd8e4; }
.act-ex { fill: var(--wave-ex); fill-opacity: .28; }
.act-hit { cursor: pointer; }
.act-msg { margin: 0; padding: 26px 8px; font-size: 13.5px; color: var(--muted); text-align: center; }
.act-legend { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.act-ex-key { width: 14px; height: 10px; border-radius: 2px; background: var(--wave-ex); opacity: .5; }
.act-range { white-space: nowrap; font-weight: 600; color: var(--text); }
.act-note { margin: 6px 0 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.pulse-svg { width: 100%; height: auto; display: block; }
.pulse-svg text { font-size: 12.5px; fill: #5f6f86; font-family: inherit; }
.pulse-svg .axis-title { fill: var(--text); font-size: 12.5px; }
.wave-ph line { stroke: var(--text); stroke-width: 1.6; }
.wave-ph.cleaner line { stroke: #0891b2; }
.pulse-grid { stroke: #edf1f6; }
.pulse-width { fill: var(--pulse-soft); }
.pulse-area { fill: var(--pulse); fill-opacity: .08; }
.pulse-line { stroke: var(--pulse); stroke-width: 2.4; fill: none; stroke-linejoin: round; }
.pulse-peak { stroke: var(--pulse); stroke-dasharray: 3 3; stroke-opacity: .7; }
.pulse-label { fill: var(--pulse) !important; font-weight: 650; font-size: 12.5px !important; }
.pulse-note { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.pulse-plot { max-width: 520px; margin: 0 auto; }
.pulse-na { display: flex; gap: 10px; align-items: flex-start; padding: 18px 14px; background: #f5f8fc; border-radius: 12px; color: var(--muted); font-size: 14px; }
.pulse-na .icon { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--primary); }
.pulse-na p { margin: 0; }

/* About this analysis (collapsed) */
.about-card { padding: 0; }
.about-card > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 22px; cursor: pointer; }
.about-card > summary::-webkit-details-marker { display: none; }
.about-card > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: var(--card-radius); }
.about-head { flex: 1; display: flex; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; min-width: 0; }
.about-head h2 { margin: 0; font-size: 18px; }
.about-sub { font-size: 13px; color: var(--muted); }
.about-chev { width: 10px; height: 10px; border-right: 2px solid var(--text); border-bottom: 2px solid var(--text); transform: rotate(45deg); margin: -4px 6px 0 0; transition: transform .15s; flex: none; }
.about-card[open] .about-chev { transform: rotate(-135deg); margin-top: 4px; }
.about-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 32px; padding: 0 22px 18px 66px; }
.about-body h3 { margin: 10px 0 4px; font-size: 14px; }
.about-body ul { margin: 0; padding-left: 18px; }
.about-body li { font-size: 13.5px; line-height: 1.45; color: var(--muted); margin: 2px 0; }
.about-general { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.about-data { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin: 10px 0 0; font-size: 13px; }
.about-data a { color: var(--primary); font-weight: 600; text-decoration: none; }
.about-data a:hover { text-decoration: underline; }
.about-data span { color: #8090a6; font-size: 12px; }

/* My recordings: the result state with the same meaning as on Results */
.state-chip { display: inline-block; margin-left: 8px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }
.state-chip.weak { background: #eef1f6; color: #52627a; border: 1px solid #dbe2ec; }

/* responsive: four cards -> two per row -> one; stacked visualisations */
@media (max-width: 1000px) {
  .res-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .viz-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .about-body { grid-template-columns: minmax(0, 1fr); padding: 0 16px 16px; }
  .about-card > summary { padding: 14px 16px; }
  .res-foot .res-time + .res-footer { border-left: 0; padding-left: 0; }
  .res-title { font-size: 22px; }
}
@media (max-width: 520px) {
  .res-tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .res-tile { min-height: 0; padding: 10px 30px 10px 12px; }
  .res-tile .ex-tile-icon { width: 38px; height: 38px; }
  .res-tile-value { font-size: 20px; }
  .res-block, .res-block.ok, .res-block.info, .res-block.weak { padding: 16px 14px 12px; }
  .res-mark { width: 38px; height: 38px; }
  .pulse-svg text { font-size: 15px; }
}

/* ---- ux-031: Save card, recording rename, saved confirmation, activity zoom */
.product .save-panel.card { background: #f0f7ff; border: 1px solid #cfe2fb; box-shadow: 0 1px 2px rgba(8, 120, 255, .06), 0 8px 24px rgba(8, 120, 255, .08); padding: 22px 24px; }
.save-panel h2 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 4px; }
.save-panel .sp-section, .save-panel .ctx-form { background: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.my-name { display: flex; align-items: center; gap: 4px 6px; flex-wrap: wrap; min-width: 0; }
.my-rename { display: inline-grid; place-items: center; width: 28px; height: 28px; border: 0; border-radius: 8px; background: transparent; color: #8796ad; cursor: pointer; flex: none; }
.my-rename .icon { width: 15px; height: 15px; }
.my-rename:hover, .my-rename:focus-visible { color: var(--primary); background: var(--primary-soft); outline: none; }
.my-orig { font-size: 12px; color: #8796ad; overflow-wrap: anywhere; }
.my-rename-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; width: 100%; }
.my-rename-input { flex: 1 1 200px; min-width: 0; font: inherit; font-weight: 600; padding: 7px 10px; border: 1px solid var(--primary-line); border-radius: 10px; color: var(--text); }
.my-rename-input:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.my-rename-form .btn { padding: 7px 14px; font-size: 14px; }
.my-rename-err { flex-basis: 100%; font-size: 13px; color: #c62828; }
.activity-card .viz-head { align-items: center; }
.act-zoom { flex: none; }
.activity-card .plot-wrap.zoomed .plot { cursor: grab; }
.gutter .x-tick { display: none; }      /* pinned axis copies: the time labels belong to the scrolling plot only */

/* ---- research-consent-032: optional research choice (Save form, Account) and the Privacy / Terms / Contact pages */
.research-opt { margin: 4px 0 14px; padding: 14px 0 0; border-top: 1px solid #d6e6fb; }
.research-opt h3 { margin: 0 0 8px; font-size: 14.5px; }
.research-opt .consent, .research-acct .consent { margin-bottom: 6px; }
.research-support { margin: 0 0 0 28px; font-size: 13px; line-height: 1.45; color: var(--muted); }
.research-support a, .research-acct a { color: var(--primary); }
.research-acct { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--card-line); }
.research-acct h3 { margin: 0 0 6px; font-size: 15px; }
.research-acct p { margin: 0 0 8px; font-size: 14px; }
.research-acct .research-support { margin-bottom: 10px; }
.legal-page { max-width: 760px; margin: 8px auto 0; background: #fff; border: 1px solid var(--card-line); border-radius: var(--card-radius);
  box-shadow: var(--card-shadow); padding: 28px 32px 32px; line-height: 1.6; }
.legal-page h1 { margin: 6px 0 4px; font-size: 28px; letter-spacing: -.02em; }
.legal-lead { margin: 0 0 12px; font-size: 16px; color: var(--muted); }
.legal-nav { display: flex; gap: 16px; font-size: 14px; }
.legal-nav a { color: var(--muted); text-decoration: none; }
.legal-nav a[aria-current="page"] { color: var(--primary); font-weight: 600; }
.legal-sec { margin-top: 22px; scroll-margin-top: 90px; }
.legal-sec h2 { margin: 0 0 6px; font-size: 19px; }
.legal-sec h3 { margin: 12px 0 4px; font-size: 15px; }
.legal-sec p, .legal-sec li { font-size: 15px; color: var(--text); }
.legal-sec ul { margin: 4px 0 8px; padding-left: 20px; }
.legal-sec li { margin: 3px 0; }
.legal-sec a { color: var(--primary); }
.legal-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.legal-cards > div { background: #f5f9fe; border: 1px solid var(--card-line); border-radius: 12px; padding: 12px 14px; }
.legal-cards h3 { margin: 0 0 4px; font-size: 14.5px; }
.legal-cards p { margin: 0; font-size: 13.5px; color: var(--muted); }
.legal-updated { display: inline-block; margin-bottom: 6px; font-size: 13.5px; color: var(--muted); }
.legal-launch { margin: 26px 0 0; padding: 10px 14px; font-size: 13.5px; color: var(--muted); border-left: 3px solid var(--primary-line); background: #f7faff; border-radius: 0 10px 10px 0; }
.legal-sec > p { margin: 0 0 8px; line-height: 1.6; }
.legal-cards p { line-height: 1.5; }
.legal-topics { margin: 14px 0 0; font-size: 15px; line-height: 1.6; color: var(--text); }
.legal-contact a { color: var(--primary); font-weight: 600; overflow-wrap: anywhere; }
.legal-contact { margin: 18px 0 0; padding: 14px 16px; background: #f5f9fe; border-radius: 12px; color: var(--muted); }
@media (max-width: 700px) { .legal-page { padding: 18px 16px 22px; } .legal-cards { grid-template-columns: minmax(0, 1fr); } .legal-page h1 { font-size: 24px; } }
.research-active { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.research-active a { color: var(--primary); }
.save-panel .save-notice { margin: 16px 0 12px; padding: 10px 14px; font-size: 14.5px; line-height: 1.5; color: var(--text); font-weight: 500;
  background: #fff; border: 1px solid var(--primary-line); border-radius: 12px; }

/* ---- save-cta-035: the Save entry points (main = primary blue button under the player; metadata row = outlined) */
.res-save-btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; font-weight: 600; text-decoration: none; }
.res-save-btn:hover { text-decoration: none; }
.res-save-btn .icon { width: 16px; height: 16px; flex: none; }
.res-save-btn.main { background: var(--primary); color: #fff; padding: 10px 20px; min-height: 44px; font-size: 15px; box-shadow: 0 6px 16px rgba(8, 120, 255, .22); }
.res-save-btn.main:hover { background: var(--primary-hover); }
.res-save-btn.outline { background: #fff; color: var(--primary); border: 1px solid var(--primary-line); padding: 6px 14px; min-height: 36px; font-size: 14px; }
.res-save-btn.outline:hover { background: var(--primary-soft); }
.res-save-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 999px; }
@media (max-width: 600px) { .listen-save .res-save-btn.main { width: 100%; justify-content: center; } }

/* ---- ldm-036: development-only comparison (#/r/<id>/compare, dev tools on) */
.dev-compare-link { text-align: center; margin: 8px 0 24px; font-size: 12.5px; }
.dev-compare-link a { color: var(--muted); }
.dev-compare { overflow-x: auto; }
.dev-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dev-table th, .dev-table td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 1px solid var(--line, #e5e9f0); }
.dev-table thead th { font-weight: 700; }
.dev-table tbody th { font-weight: 600; white-space: nowrap; }

/* ---- ui-037/038: the frequency range stays on one line (no smaller font); three evenly spaced cards on wide screens,
   one per row below 1000 px (a wide range such as "12,500–19,500 Hz" always fits) */
.res-tile[data-measure="frequency"] .res-tile-value { white-space: nowrap; overflow-wrap: normal; }
.res-tiles { grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
@media (max-width: 999px) { .res-tiles { grid-template-columns: minmax(0, 1fr); } }

/* ---- results-038: full-width Sound activity, restyled chart, hover reading and Measure mode (both charts) */
.activity-card .act-box { min-height: 200px; }
.act-svg .act-line { stroke: var(--primary); stroke-width: 2; fill: none; stroke-linejoin: round; stroke-linecap: round; shape-rendering: geometricPrecision; }
.act-svg .act-area { stroke: none; }
.act-svg .act-grid { stroke: #e9eef6; stroke-dasharray: 2 4; }
.act-svg .act-axis { stroke: #cfd8e4; }
.act-svg .y-tick { font-size: 12px; fill: #7a879b; font-variant-numeric: tabular-nums; }
.act-svg .x-tick { font-size: 12.5px; fill: #5f6f86; font-variant-numeric: tabular-nums; }
.act-hover-line { stroke: #0b1b4d; stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 3 3; }
.act-hover-dot { fill: #fff; stroke: var(--primary); stroke-width: 2.5; }
.act-ctrls, .spec-ctrls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.measure-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 999px;
  background: #fff; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.measure-btn .icon { width: 16px; height: 16px; color: var(--primary); }
.measure-btn:hover { border-color: var(--primary-line); color: var(--primary); }
.measure-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.measure-btn[aria-pressed="true"] .icon { color: #fff; }
.measure-btn:focus-visible, .mp-actions button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.plot.measuring, .plot.measuring .act-hit, .plot.measuring .plot-hit { cursor: crosshair; }
.measure-panel { margin: 8px 0 4px; padding: 10px 14px; border: 1px solid var(--primary-line); border-radius: 12px; background: linear-gradient(180deg, #f5f9ff, #fff);
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.mp-body { flex: 1 1 320px; min-width: 0; font-size: 13.5px; color: var(--text); }
.mp-hint { margin: 2px 0; color: var(--muted); }
.mp-row { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 2px 0; font-variant-numeric: tabular-nums; }
.mp-k { min-width: 92px; font-weight: 650; color: #0b1b4d; }
.mp-v { font-weight: 600; }
.mp-note { flex-basis: 100%; margin-left: 102px; font-size: 12px; color: var(--muted); }
.mp-deltas { margin-top: 6px; padding-top: 6px; border-top: 1px dashed #d6e2f3; }
.mp-ref { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.mp-actions { display: flex; gap: 6px; }
.mp-actions button { height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--card-line); background: #fff; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.mp-actions .mp-done { background: var(--primary); border-color: var(--primary); color: #fff; }
.mp-actions button:disabled { color: #b4bfcf; cursor: default; }
.measure-layer .mk-guide { stroke: #0b1b4d; stroke-opacity: .5; stroke-width: 1; stroke-dasharray: 4 3; }
.measure-layer .mk-link { stroke: #ffb300; stroke-width: 1.6; stroke-dasharray: 5 4; }
.measure-layer .mk-dot { fill: #ffb300; stroke: #fff; stroke-width: 2; }
.measure-layer .mk-label { font-size: 12px; font-weight: 700; fill: #0b1b4d; paint-order: stroke; stroke: #fff; stroke-width: 3px; }
.act-readout { white-space: nowrap; }
@media (max-width: 600px) { .mp-note { margin-left: 0; } .mp-k { min-width: 80px; } .measure-btn span { display: none; } .measure-btn { width: 34px; padding: 0; justify-content: center; } }
.viz-card .plot svg.act-svg, .plot svg.act-svg { min-width: 0; }      /* drawn for the card's own width (fixed-size fonts); zoom widens it inline */
.measure-panel[hidden] { display: none; }

/* ---- ui-039: the handwritten toggle note is shown only once placed under the Analysis/Raw toggle (placeHandNote);
   Measure help next to each Measure button (existing help-tip pattern) */
.evidence-card .hand-row:not(.placed) { visibility: hidden; }
.measure-group { display: inline-flex; align-items: center; gap: 4px; position: relative; }
.measure-tip { align-self: center; }
.measure-tip .tiptext { left: auto; right: 0; top: calc(100% + 6px); width: 260px; max-width: calc(100vw - 32px); z-index: 20; }
@media (max-width: 760px) { .measure-group { position: static; } .act-ctrls, .evidence-card .spec-ctrls { position: relative; }
  .measure-tip { position: static; } .measure-tip .tiptext { left: 0; right: 0; width: auto; max-width: none; } }

/* ---- share-040: Share with your doctor (owner panel, My recordings, recipient notice / CTA, Home card) */
.share-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 6px 14px; border: 1px solid var(--primary-line); border-radius: 999px;
  background: #fff; color: var(--primary); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.share-btn .icon { width: 16px; height: 16px; }
.share-btn:hover { background: var(--primary-soft); }
.share-btn[aria-expanded="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.share-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.res-meta .share-btn { margin-left: 10px; }
.share-panel { border-color: var(--primary-line); background: linear-gradient(180deg, #f5f9ff, #fff); }
.share-panel h2 { margin: 0 0 6px; font-size: 18px; }
.share-panel p { margin: 0 0 10px; font-size: 14.5px; line-height: 1.5; }
.share-panel .share-note { font-size: 13px; color: var(--muted); }
.share-url-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.share-url-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.share-url { flex: 1 1 320px; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--card-line); border-radius: 10px; background: #fff;
  font: inherit; font-size: 13.5px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.share-url:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.share-status { min-height: 1.2em; font-size: 13px; color: var(--green, #1a7f37); font-weight: 600; }
.share-panel.inline { grid-column: 1 / -1; margin: 4px 0 0; box-shadow: none; }   /* full width of the .my-row grid */
.share-chip { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: #e9f2ff;
  color: var(--primary); font-size: 12px; font-weight: 650; vertical-align: middle; }
.share-chip .icon { width: 13px; height: 13px; }
.share-chip[hidden] { display: none; }
.my-side { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.share-notice { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #f2f7ff; border-color: var(--primary-line); }
.share-notice .icon { width: 18px; height: 18px; color: var(--primary); flex: none; }
.share-notice p { margin: 0; font-size: 14px; color: var(--text); }
.share-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 14px;
  background: linear-gradient(135deg, #f5f9ff, #e9f2ff); border-color: var(--primary-line); }
.share-cta h2 { margin: 0 0 4px; font-size: 19px; }
.share-cta p { margin: 0; color: var(--muted); font-size: 14.5px; }
.share-cta .btn, .share-unavailable .btn { text-decoration: none; display: inline-block; }
.share-unavailable { max-width: 640px; margin: 24px auto; }
.share-unavailable h1 { font-size: 22px; margin: 0 0 8px; }
.sp-box { background: #f5f9ff; border: 1px solid var(--card-line); border-radius: 12px; padding: 12px 14px; }
.sp-steps { display: flex; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0; flex-wrap: wrap; }
.sp-steps li { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; font-size: 13.5px; color: #0b1b4d; }
.sp-steps li + li::before { content: "\2192"; color: var(--primary); margin-right: 2px; }
.sp-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; }
@media (max-width: 600px) { .res-meta .share-btn { margin: 8px 0 0; } .share-url { flex-basis: 100%; } .share-cta .btn { width: 100%; text-align: center; } }

/* ---- share-041: Share UX polish (shorter panels, link first, Stop sharing apart, compact My recordings, Home cards) */
.share-learn { font-weight: 600; color: var(--primary); white-space: nowrap; }
.share-panel .share-url { height: 44px; font-size: 14px; }
.share-panel .share-copy, .share-panel .share-native { min-height: 44px; }
.share-status.fail { color: #c62828; }
.share-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap;
  margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--card-line); }
.share-foot .share-note { margin: 0; }
.share-foot .share-stop { font-weight: 600; }
.my-side { gap: 18px; }
.my-side .share-btn.row { min-height: 34px; padding: 5px 13px; font-size: 13.5px; }
.sp-box { display: flex; flex-direction: column; justify-content: center; gap: 12px; width: 100%; padding: 16px 14px; }
.sp-steps { justify-content: center; align-items: center; gap: 8px; margin: 0; flex-wrap: nowrap; }
.sp-steps li { flex-direction: column; gap: 6px; font-size: 14px; min-width: 64px; }
.sp-steps li + li::before { content: none; }
.sp-steps li + li { position: relative; }
.sp-steps li + li::after { content: ""; position: absolute; top: 15px; right: calc(50% + 22px); width: calc(100% - 28px); height: 2px; background: var(--primary-line); }
.sp-n { width: 32px; height: 32px; font-size: 14px; font-weight: 700; box-shadow: 0 0 0 4px #fff; position: relative; z-index: 1; }
.feature .sp-includes { margin: 0; text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); }
.cm-box p { margin: 0; padding-right: 48px; font-size: 13px; line-height: 1.5; color: var(--muted); }
/* Home cards: the example content right below the description in every card (same gap); the CTAs share a baseline */
.feature.v31 .feature-preview { align-items: flex-start; }
.feature.v31 .sp-box { padding: 18px 14px 16px; }
/* My recordings: a fixed action column, so the measurement columns line up whether a row says Share or Manage share */
@media (min-width: 701px) { .my-side { min-width: 212px; } }
@media (max-width: 1180px) { .feature.v31 .feature-preview { min-height: 0; } }
@media (max-width: 700px) { .my-side { justify-content: flex-start; } }

/* ---- examples-042: public Examples (the My recordings rows; Results in example mode) */
.ex-intro { margin: -4px 0 18px; max-width: 760px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.ex-row .ex-desc { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.ex-row .my-name .my-open { font-weight: 650; }
.ex-row .ex-open { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 16px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.ex-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.ex-back { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14.5px; text-decoration: none; }
.ex-back:hover { text-decoration: underline; }
.ex-back .icon { width: 16px; height: 16px; }
.ex-label { display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px; background: var(--primary-soft); color: var(--primary);
  font-size: 12.5px; font-weight: 650; }
.res-meta .ex-desc { flex-basis: 100%; margin: 0; padding-left: 42px; color: var(--muted); font-size: 14px; }   /* own line, under the name */
.ex-row .my-name .state-chip { margin-left: 0; }
.ex-cta { margin-top: 14px; }
.ex-note { max-width: 760px; margin: 22px 4px 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.ex-note p { margin: 0 0 10px; }
.ex-note a { color: var(--primary); }
@media (max-width: 700px) { .res-meta .ex-desc { padding-left: 0; } .ex-row .my-side { width: 100%; } .ex-row .ex-open { width: 100%; justify-content: center; } }

/* ---- how-to-record-045: How to record (approved mockup: illustration beside four tips, note, help section) */
main:has(> .htr-page) { max-width: 1180px; }
.htr-card { padding: 34px 32px 26px; border-radius: 22px; }
.htr-card h1 { margin: 0 0 6px; font-size: clamp(30px, 3.6vw, 40px); font-weight: 800; letter-spacing: -.02em; color: #0b1b4d; line-height: 1.1; }
.htr-intro { margin: 0 0 22px; font-size: clamp(15.5px, 1.5vw, 18px); color: #44557a; }
.htr-grid { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.htr-figure { margin: 0; border-radius: 14px; overflow: hidden; background: #e8f1fd; min-height: 300px; }
.htr-figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 40% 30%; }
.htr-side { display: flex; flex-direction: column; gap: 10px; }
.htr-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.htr-step { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 12px 16px; background: #fff; border: 1px solid #e1e9f4;
  border-radius: 10px; box-shadow: 0 1px 2px rgba(16, 36, 84, .03); }
.htr-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e7f0fd; color: var(--primary); font-weight: 700; font-size: 16px; }
.htr-ic { flex: none; display: grid; place-items: center; width: 30px; color: var(--primary); }
.htr-ic .icon { width: 24px; height: 24px; stroke-width: 1.8; }
.htr-step h2 { margin: 0 0 3px; font-size: 15px; font-weight: 700; color: #0b1b4d; }
.htr-step p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #5a6a86; }
.htr-note { display: flex; gap: 14px; align-items: center; min-height: 62px; padding: 12px 16px; border: 1px solid #cfe0f7; border-radius: 10px; background: #ebf3fd; }
.htr-note-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #5ea8f2; color: #fff;
  font: 700 17px/1 Georgia, "Times New Roman", serif; }
.htr-note strong { display: block; margin-bottom: 3px; font-size: 14px; font-weight: 700; color: #0b1b4d; }
.htr-note p { margin: 0; font-size: 13.5px; line-height: 1.45; color: #5a6a86; }
.htr-help { margin-top: 18px; padding: 18px 26px 20px; border-top: 1px solid #e6edf6; background: linear-gradient(180deg, #f3f8ff, #edf4fe); border-radius: 12px; }
.htr-card > .htr-help { border-top: 0; position: relative; }
.htr-card > .htr-help::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; border-top: 1px solid #e3eaf4; }
.htr-help h2 { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: #0b1b4d; }
.htr-help p { margin: 0 0 12px; font-size: 13.5px; color: #5a6a86; }
.htr-help-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.htr-contact { display: inline-flex; align-items: center; gap: 10px; padding: 8px 22px; border: 1.5px solid var(--primary); border-radius: 6px; background: #fff;
  color: var(--primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.htr-contact:hover { background: var(--primary-soft); }
.htr-contact .icon { width: 18px; height: 18px; }
.htr-help-aside { padding-left: 22px; border-left: 1px solid #d5dfec; font-size: 13.5px; color: #5a6a86; }
@media (max-width: 900px) {
  .htr-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .htr-figure { min-height: 0; }
  .htr-figure img { height: auto; aspect-ratio: 3 / 2; }
}
@media (max-width: 600px) {
  .htr-card { padding: 22px 16px 18px; }
  .htr-intro { margin-bottom: 16px; }
  .htr-step, .htr-note { align-items: flex-start; gap: 12px; padding: 12px 14px; }
  .htr-ic { margin-top: 3px; }
  .htr-help { padding: 16px; }
  .htr-help-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .htr-contact { justify-content: center; }
  .htr-help-aside { padding-left: 0; border-left: 0; }
}

/* ---- about-053: About PT Analyzer (founder's story; reading width, quiet emphasis, personal signature) */
main:has(> .about-page) { max-width: 980px; }
.about-page { max-width: 720px; margin: 8px auto 0; padding: 40px 48px 44px; background: #fff; border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow); color: var(--text); }
.ab-head { margin-bottom: 26px; }
.ab-kicker { margin: 0 0 8px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.about-page h1 { margin: 0; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.18; letter-spacing: -.02em; color: #0b1b4d; }
.ab-sec { margin-top: 46px; }
.ab-sec:first-of-type { margin-top: 0; }
.about-page h2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin: 0 0 14px; font-size: 21px; line-height: 1.3; color: #0b1b4d; }
.about-page p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.75; color: #24324f; }
.about-page .ab-key { margin: 22px 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--primary); font-size: 19px; line-height: 1.55;
  font-weight: 600; color: #0b1b4d; }
.about-page .ab-note { margin: 18px 0 0; padding: 12px 16px; border-radius: 12px; background: #f2f7ff; border: 1px solid var(--primary-line);
  font-size: 15px; line-height: 1.6; color: #35466a; }
.ab-tag { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: #f1edfd; color: #5b45d6;
  font-size: 12px; font-weight: 650; letter-spacing: .01em; }
.ab-sign { display: flex; flex-direction: column; gap: 2px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--card-line); }
.ab-name { font-family: var(--hand-font); font-size: 30px; line-height: 1.2; color: #0b1b4d; }
.ab-role { font-size: 14px; color: var(--muted); }
@media (max-width: 600px) {
  .about-page { padding: 26px 18px 30px; }
  .about-page p { font-size: 16px; line-height: 1.7; }
  .about-page .ab-key { font-size: 17.5px; padding-left: 14px; }
  .ab-sec { margin-top: 38px; }
}

/* ---- medical-visibility-054 (closed): one quiet line on a recording when the reported information has changed */
.sd-later { margin: 10px 0 0; padding: 8px 12px; border-left: 3px solid var(--primary-line); background: #f8fbff; border-radius: 0 8px 8px 0; color: var(--muted); }
.sd-later a { font-weight: 600; }

/* ---- workspace-055 (Stage 1): My recordings as the signed-in home; account menu; compact rows */
.acct-menu { display: none; position: relative; }
body.signed-in .acct-menu { display: block; }
body.signed-in .acct-login { display: none; }
.acct-menu-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 240px; padding: 5px 10px 5px 5px; border: 1px solid var(--line);
  border-radius: 999px; background: #fff; color: var(--text); font: inherit; font-size: 14.5px; font-weight: 500; cursor: pointer; }
.acct-menu-btn:hover { border-color: var(--primary-line); }
.acct-menu-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.acct-menu-btn .icon { width: 16px; height: 16px; color: var(--muted); flex: none; }
.acct-avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 700; flex: none; }
.acct-menu-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dropdown { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 220px; padding: 6px; background: #fff;
  border: 1px solid var(--card-line); border-radius: 12px; box-shadow: var(--card-shadow); }
.acct-dropdown a, .acct-dropdown button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: inherit; font-size: 14.5px; text-align: left; text-decoration: none; cursor: pointer; }
.acct-dropdown a:hover, .acct-dropdown button:hover, .acct-dropdown :focus-visible { background: var(--primary-soft); outline: none; }
.acct-dropdown [hidden] { display: none; }                 /* e.g. the Admin item: `display: block` above must not reveal it */
.acct-dropdown .acct-menu-signout { border-top: 1px solid var(--card-line); border-radius: 0 0 8px 8px; margin-top: 4px; }
.my-home .my-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin: 8px 0 14px; }
.my-home h1 { margin: 0 0 4px; font-size: clamp(28px, 3.4vw, 36px); letter-spacing: -.02em; }
.my-sub { margin: 0; color: var(--muted); font-size: 15.5px; }
.my-upload { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.my-upload-btn { display: inline-flex; align-items: center; gap: 10px; }
.my-upload-btn .icon { width: 18px; height: 18px; }
.my-formats { font-size: 12.5px; color: var(--muted); }
.my-upload-info:empty { display: none; }
.my-upload-info { margin: 0 0 14px; }
.my-count { margin: 18px 0 10px; font-size: 19px; }
.my-home .my-list { gap: 8px; }
.my-home .my-row { padding: 11px 16px; }
.my-more { position: relative; }
.my-more-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.my-more-btn:hover, .my-more-btn[aria-expanded="true"] { background: var(--primary-soft); color: var(--text); }
.my-more-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.my-more-btn .icon { width: 18px; height: 18px; fill: currentColor; stroke: none; }
.my-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 150px; padding: 6px; background: #fff;
  border: 1px solid var(--card-line); border-radius: 10px; box-shadow: var(--card-shadow); }
.my-more-menu button { display: block; width: 100%; padding: 9px 12px; border: 0; border-radius: 8px; background: none; color: #c62828;
  font: inherit; font-size: 14.5px; text-align: left; cursor: pointer; }
.my-more-menu button:hover, .my-more-menu button:focus-visible { background: #fdf3f3; outline: none; }
.acct-page h1 { margin: 8px 0 16px; }
.acct-legal { margin: 16px 4px; font-size: 14px; color: var(--muted); }
.acct-legal a { color: var(--primary); }
@media (max-width: 700px) {
  .my-upload { align-items: stretch; width: 100%; }
  .my-upload-btn { justify-content: center; }
  .my-home .my-side { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .acct-menu-label, .acct-menu-btn .icon { display: none; }
  .acct-menu-btn { padding: 0; border: 0; background: none; margin-left: 6px; }
  .acct-avatar { width: 30px; height: 30px; font-size: 13px; }
  body.signed-in .beta-pill { display: none; }       /* signed in on a phone: room for the account avatar */
}

/* ---- workspace-055 polish: wider workspace (~1100 px), rows of equal height with aligned columns */
main:has(> .my-home) { max-width: 1132px; }                  /* 1100 px content + the 16 px side padding */
.my-home .my-row { grid-template-columns: minmax(0, 1fr) minmax(0, 480px) 212px; min-height: 74px; padding: 10px 16px; }
.my-home .my-main { gap: 3px; }
.my-home .my-name { flex-wrap: nowrap; }
.my-home .my-open { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-meta { display: flex; align-items: center; gap: 4px 8px; min-width: 0; height: 24px; overflow: hidden; }   /* same height with or without chips */
.my-meta > * { flex: none; }
.my-meta .my-date, .my-meta .my-orig { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-meta .share-chip, .my-meta .state-chip { margin-left: 0; }
.my-facts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 18px; }
.my-home .my-side { min-width: 0; justify-self: stretch; justify-content: flex-end; }   /* the column, not the buttons, sets the edge */
@media (max-width: 1000px) {
  .my-home .my-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto; }
}
@media (max-width: 700px) {
  .my-home .my-row { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .my-meta { flex-wrap: wrap; height: auto; }
  .my-home .my-side { justify-content: flex-start; }
  .my-facts-grid { display: flex; flex-wrap: wrap; gap: 4px 22px; }
  .my-fact-empty { display: none; }
}

/* ---- workspace-055 Stage 2: Medical connection bridge (above the recordings). Static: no animation at all. */
/* the colour is the connection's state as a whole: both endpoint cards, the connector and its symbol share it */
.med-bridge { --br: #94a0b2; --br-line: #d3d9e2; --br-soft: #f3f5f8; --br-ink: #4b5a70;
  display: grid; grid-template-columns: minmax(380px, 500px) minmax(0, 1fr) auto; align-items: center; gap: 14px 28px; padding: 16px 20px; }
.med-bridge.br-orange { --br: #e07a1f; --br-line: #f5cda6; --br-soft: #fff6ed; --br-ink: #9a4a0b; }
.med-bridge.br-green { --br: #1f9a52; --br-line: #b5e0c4; --br-soft: #effaf3; --br-ink: #146c36; }
/* two endpoint cards and the connector between them */
.br-graphic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(100px, 170px) minmax(0, 1fr); align-items: center; }
.br-point { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; min-width: 0; position: relative; z-index: 1;
  padding: 12px 8px 11px; border: 1px solid var(--br-line); border-radius: 12px; background: var(--br-soft); box-shadow: 0 2px 8px rgba(11, 27, 77, .05); }
.br-ico { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: var(--card); color: var(--br-ink); border: 1px solid var(--br-line); }
.br-ico .icon { width: 20px; height: 20px; }
.br-label { font-size: 13px; font-weight: 600; line-height: 1.25; }
.br-sub { font-size: 12px; color: var(--muted); line-height: 1.3; }
.br-status { color: var(--br-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; justify-content: center; white-space: nowrap; }
.br-status .icon { width: 13px; height: 13px; flex: none; }
.br-conn { position: relative; margin: 0 -8px; display: grid; align-items: center; }
.br-svg { width: 100%; height: auto; display: block; overflow: visible; }
.br-svg path, .br-svg circle { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.br-wave, .br-net, .br-line { stroke: var(--br); }
.br-node, .br-end { fill: var(--card) !important; stroke: var(--br); stroke-width: 2 !important; }
.br-gray .br-net { stroke-dasharray: 3 5; }
.br-badge { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--br); border: 3px solid var(--card); box-shadow: 0 2px 6px rgba(11, 27, 77, .18); display: grid; place-items: center; color: #fff; }
.br-badge svg { width: 20px; height: 20px; }
.br-text h2 { font-size: 17px; margin: 0 0 3px; }
.br-text p { margin: 0; color: var(--muted); font-size: 14px; }
.br-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.br-actions .btn { text-align: center; white-space: nowrap; text-decoration: none; }
/* more prominent while nothing is entered: larger illustration on top, centred text, actions side by side */
.med-bridge.br-prominent { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 28px 24px 26px;
  background: linear-gradient(180deg, #f8f9fb, var(--card) 75%); }
.br-prominent .br-graphic { width: 100%; max-width: 620px; grid-template-columns: minmax(0, 1fr) minmax(90px, 200px) minmax(0, 1fr); }
.br-prominent .br-point { padding: 16px 10px 14px; }
.br-prominent .br-ico { width: 46px; height: 46px; }
.br-prominent .br-ico .icon { width: 24px; height: 24px; }
.br-prominent .br-label { font-size: 14px; }
.br-prominent .br-text { margin-top: 6px; }
.br-prominent .br-text h2 { font-size: 21px; margin-bottom: 6px; }
.br-prominent .br-text p { font-size: 15px; max-width: 520px; }
.br-prominent .br-actions { flex-direction: row; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
@media (max-width: 1000px) {
  .med-bridge:not(.br-prominent) { grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); }
  .med-bridge:not(.br-prominent) .br-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
@media (max-width: 700px) {
  .med-bridge, .med-bridge:not(.br-prominent), .med-bridge.br-prominent { grid-template-columns: minmax(0, 1fr); justify-items: stretch; text-align: left; padding: 16px; gap: 12px; }
  .br-graphic, .br-prominent .br-graphic { grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr); max-width: none; }
  .br-badge { width: 30px; height: 30px; }
  .br-badge svg { width: 17px; height: 17px; }
  .br-point, .br-prominent .br-point { padding: 10px 6px; }
  .br-prominent .br-text { text-align: center; }
  .med-bridge:not(.br-prominent) .br-actions, .br-prominent .br-actions { grid-column: auto; flex-direction: row; justify-content: stretch; }
  .br-actions .btn { flex: 1 1 0; padding-left: 10px; padding-right: 10px; }
}

/* ---- workspace-055 Stage 2: older "Not sure" answers (and test card titles) */
.med-test-name { display: inline-flex; align-items: center; gap: 8px; }
.med-legacy { margin: 6px 0 0; font-size: 13px; color: var(--muted); background: #f4f6f9; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.med-legacy .med-legacy-clear { font-size: 13px; color: var(--primary); font-weight: 600; padding: 0; }

/* ---- save-ux-056: prominent top "Save to my recordings" (solid blue for every visitor, signed in or not); the
   just-saved recording on My recordings */
.res-save-btn.outline { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(8, 120, 255, .22); }
.res-save-btn.outline:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.my-saved-msg { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 9px 14px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: #146c36; background: #effaf3; border: 1px solid #b5e0c4; }
.my-saved-msg .icon { width: 18px; height: 18px; flex: none; }
.my-home .my-row { transition: background-color .8s ease, box-shadow .8s ease; }
.my-home .my-row, .my-home .my-saved-msg { scroll-margin-top: 84px; }               /* below the sticky header when scrolled to */
.my-home .my-row.my-row-new { background: #f2f8ff; box-shadow: 0 0 0 2px var(--primary), 0 6px 18px rgba(8, 120, 255, .12); }
@media (prefers-reduced-motion: reduce) { .my-home .my-row { transition: none; } }

/* ---- Stage 3 F1: the findings-first entry page (#/my/medical/add) */
.mi-page [hidden] { display: none !important; }            /* the steps appear only when needed */
.mi-page .acct-lead { margin-bottom: 14px; }
.mi-status { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  color: #4b5a70; background: #f3f5f8; border: 1px solid #d3d9e2; }
.mi-status.br-orange { color: #9a4a0b; background: #fff6ed; border-color: #f5cda6; }
.mi-status.br-green { color: #146c36; background: #effaf3; border-color: #b5e0c4; }
.mi-status .icon { width: 16px; height: 16px; }
.mi-card { padding: 22px 24px; }
.mi-q { font-size: 20px; margin: 0 0 4px; }
.mi-sub { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.mi-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mi-choice { display: flex; align-items: center; gap: 12px; padding: 15px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--text); text-align: left; cursor: pointer; }
.mi-choice:hover { border-color: var(--primary-line); }
.mi-choice[aria-pressed="true"] { border-color: var(--primary); background: #f7fbff; box-shadow: 0 0 0 4px var(--primary-soft); }
.mi-choice:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mi-ic { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.mi-ic .icon { width: 20px; height: 20px; }
.mi-ic.g { background: #effaf3; color: #1f9a52; border: 1px solid #b5e0c4; }
.mi-ic.o { background: #fff6ed; color: #9a4a0b; border: 1px solid #f5cda6; }
.mi-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.mi-step .chip[hidden] { display: none; }
.mi-finding-other, .mi-types-other, .mi-exam-name { display: block; width: 100%; max-width: 420px; margin-top: 8px; padding: 8px 12px; border: 1px solid #cfd8e5; border-radius: 10px; font: inherit; }
.mi-files { list-style: none; margin: 0; padding: 0; }
.mi-files li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 9px 12px; margin: 0 0 8px; border: 1px solid var(--primary-line); border-radius: 10px; background: #f7fbff; font-size: 14px; }
.mi-files .icon { width: 17px; height: 17px; color: var(--primary); flex: none; }
.mi-file-name { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.mi-file-link { font-size: 12px; font-weight: 600; color: #0757c2; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: 999px; padding: 1px 9px; }
.mi-files .mi-file-remove { margin-left: auto; }
.mi-disc { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
/* medical information storage consent (medical-v1): a quiet line next to Save, shown until the consent is recorded */
.med-consent-note { margin: 10px 0 8px; font-size: 13px; line-height: 1.5; color: var(--muted); }
.med-consent-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.mi-skip { margin: 16px 0 0; font-size: 14px; color: var(--muted); }
.mi-skip a { font-weight: 600; color: var(--primary); }
.mi-noimg { font-size: 14px; }
.mi-view { margin: 4px 0 0; }
@media (max-width: 700px) {
  .mi-card { padding: 18px 16px; }
  .mi-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .mi-page .acct-actions .btn { flex: 1 1 0; }
}

/* ---- Stage 3 F2: Upload a report / Write a note; notes and reports on Medical background */
.mi-or { display: flex; align-items: center; gap: 12px; color: #8a96a8; font-size: 13px; margin: 18px 0 12px; }
.mi-or::before, .mi-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.mi-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.mi-act { display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cfd8e5; border-radius: 999px; padding: 8px 16px; font: inherit;
  font-size: 14px; font-weight: 600; color: var(--text); background: #fff; cursor: pointer; }
.mi-act .icon { width: 16px; height: 16px; color: var(--primary); }
.mi-act[aria-pressed="true"] { border-color: var(--primary); background: #f7fbff; color: #0757c2; box-shadow: 0 0 0 3px var(--primary-soft); }
.mi-act:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.mi-up-panel, .mi-note-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.mn-text { width: 100%; min-height: 96px; padding: 10px 12px; border: 1px solid #cfd8e5; border-radius: 10px; font: inherit; resize: vertical; }
.mn-list, .md-list { list-style: none; margin: 0; padding: 0; }
.mn-list li, .md-list li { padding: 12px 0; border-top: 1px solid var(--line); }
.mn-list li:first-child, .md-list li:first-child { border-top: 0; }
.mn-meta { margin: 0 0 4px; font-size: 12.5px; color: var(--muted); }
.mn-body { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.mn-acts { display: flex; gap: 14px; }
.mn-acts .mn-edit { color: var(--primary); font-weight: 600; }
.md-name { color: var(--primary); }
.mn-view[hidden] { display: none; }
.md-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.md-name { font-weight: 600; overflow-wrap: anywhere; }
.md-meta { font-size: 13px; color: var(--muted); }
.md-row .md-remove { margin-left: auto; }
.mi-up-panel [hidden], .mi-note-panel [hidden] { display: none !important; }

/* ---- Stage 3 F3: "What you've added" (grouped, collapsible; one item edited at a time) */
.ad-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 0 6px; }
.ad-top .mi-status { margin: 0; }
.ad-top .ad-add { text-decoration: none; }
.ad-updated { margin: 0 0 12px; }
.ad-card { padding: 18px 22px; }
.ad-card [hidden] { display: none !important; }
.ad-group { border-top: 1px solid var(--line); }
.ad-group:first-of-type { border-top: 0; }
.ad-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 700;
  color: var(--text); cursor: pointer; text-align: left; }
.ad-head:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.ad-count { font-size: 12px; font-weight: 700; color: var(--muted); background: #f3f5f8; border-radius: 999px; padding: 1px 8px; }
.ad-chev { margin-left: auto; width: 18px; height: 18px; color: var(--primary); transition: none; }
.ad-head[aria-expanded="false"] .ad-chev { transform: rotate(-90deg); }
.ad-list { list-style: none; margin: 0 0 8px; padding: 0; }
.ad-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 4px 10px; padding: 8px 0 8px 2px; }
.ad-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; }
.ad-dot.dot-green { background: #1f9a52; } .ad-dot.dot-orange { background: #e07a1f; } .ad-dot.dot-gray { background: #94a0b2; } .ad-dot.dot-blue { background: var(--primary); }
.ad-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.ad-title { font-weight: 600; overflow-wrap: anywhere; }
.ad-title .mn-body { font-weight: 400; white-space: pre-wrap; }
.ad-meta { font-size: 13px; color: var(--muted); }
.ad-acts { display: flex; gap: 14px; white-space: nowrap; }
.ad-acts .link-btn:not(.danger-link) { color: var(--primary); font-weight: 600; }
.ad-row > .acct-confirm, .ad-row > .ad-editor { grid-column: 2 / -1; }
.ad-editor { margin: 6px 0 4px; padding: 12px 14px; border: 1px solid var(--primary-line); border-radius: 12px; background: #f9fbff; }
.ad-editor .med-test-head { display: none; }
.ad-editor .med-test { border: 0; padding: 0; margin: 0; background: none; }
.ad-more { margin: 0 0 10px 21px; }
@media (max-width: 700px) {
  .ad-card { padding: 14px 16px; }
  .ad-row { grid-template-columns: auto minmax(0, 1fr); }
  .ad-acts { grid-column: 2; }
}

/* ---- research participation invitation (under the bridge; orange / green only) */
.ri-card { margin: -6px 0 18px; padding: 14px 18px; border-color: var(--primary-line); background: #f7fbff;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; }
.ri-card h2 { margin: 0 0 6px; font-size: 15px; }
.ri-card .research-consent { margin: 0; }
.ri-card .research-support { margin: 8px 0 0 28px; font-size: 12.5px; color: var(--muted); }
.ri-acts { display: flex; gap: 8px; align-items: center; justify-self: end; }
.ri-card .ri-err { grid-column: 1 / -1; margin: 0; }
.ri-done { grid-column: 1 / -1; margin: 0; font-weight: 600; color: #146c36; }
@media (max-width: 700px) {
  .ri-card { grid-template-columns: minmax(0, 1fr); }
  .ri-acts { justify-self: stretch; }
  .ri-acts .btn { flex: 1 1 0; }
}

/* ---- medical entry: imaging answers (three) and, in their own card, reports and notes */
.mi-card .mi-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mi-ic.n { background: #f3f5f8; color: #4b5a70; border: 1px solid #d3d9e2; }
.mi-choice:disabled { cursor: not-allowed; opacity: .55; }
.mi-hint { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.mi-more-card .mi-sub { margin-bottom: 14px; }
.mi-more-saved { margin: 12px 0 0; font-size: 14px; font-weight: 600; color: #146c36; }
@media (max-width: 900px) { .mi-card .mi-choices { grid-template-columns: minmax(0, 1fr); } }
.ad-status { display: flex; align-items: center; gap: 10px; margin: 4px 0 6px; padding: 8px 12px; border-radius: 10px; background: #f3f5f8; font-size: 14px; }
.ad-status .ad-dot { margin-top: 0; }
.ad-status .ad-edit-all { margin-left: auto; color: var(--primary); font-weight: 600; }

/* ---- Stage 4A: Medical history timeline */
.med-history-list > li > ul > li { display: flex; flex-direction: column; gap: 1px; margin: 4px 0; }
.mh-meta { font-size: 12.5px; color: var(--muted); }
.mh-add-year { font-size: 12.5px; color: var(--primary); font-weight: 600; padding: 0; }

/* ---- Stage 4B: the medical information linked to a recording */
.sd-medical .hs-h { margin: 10px 0 4px; font-size: 14px; }
.sd-medical .hs-list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; }
.sd-medical .hs-status { margin: 6px 0; }
.sd-medical .hs-by { margin: 8px 0 0; }

/* ---- resource-guard-1: waiting for the analysis queue */
.queue-note { margin: 4px 0 12px; color: var(--muted); font-weight: 600; }

/* ---- Admin V1 (read-only): Dashboard, Research library, research recording detail */
.admin { max-width: 1160px; margin: 0 auto; }
.admin.admin-wide { max-width: 1480px; }
main.admin-wide-main { max-width: 1520px; }
.admin-head { display: flex; align-items: center; gap: 10px; margin: 4px 0 8px; }
.admin-head h1 { margin: 0; font-size: 26px; }
.admin-ro { font-size: 12px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; background: var(--card); }
.admin-tabs { margin-bottom: 16px; }
.admin-note { font-size: 12.5px; color: var(--muted); margin: 6px 0; }
.admin-stat-label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); }
.admin-stat-n { font-size: 32px; font-weight: 700; line-height: 1.15; margin-right: 6px; }
.admin-unit { font-size: 13px; color: var(--muted); }
.admin-analyses { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 36px; margin-bottom: 0; }
.admin-analyses .admin-note { flex-basis: 100%; margin: 0; }
.admin-split { display: flex; gap: 28px; margin: 0; }
.admin-split dt { font-size: 12px; color: var(--muted); }
.admin-split dd { margin: 0; font-size: 20px; font-weight: 700; }
.admin-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 20px 0 0; }
.admin-filter-label { font-weight: 600; font-size: 14px; margin-right: 4px; }
.admin-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.admin-chip.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.admin-chip:focus-visible, .admin-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 10px 0 12px; }
.admin-stats .card, .admin-grid .card, .admin-med .card { margin: 0; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; }
.admin-grid h2, .admin-med h2 { font-size: 17px; margin: 0 0 2px; }
.admin-svg { width: 100%; height: auto; display: block; margin-top: 6px; }
.admin-bar { fill: var(--primary); }
.admin-bar-n { font-size: 12px; font-weight: 700; fill: var(--text); }
.admin-bar-label { font-size: 12px; fill: var(--muted); }
.admin-axis { stroke: var(--line); }
.admin-dist { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 14px; }
.admin-dist li { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; }
.admin-dist strong { text-align: right; }
.admin-dist-bar { width: 100%; height: 10px; display: block; }
.admin-dist-bg { fill: #eef1f6; }
.dist-gray { fill: #94a0b2; } .dist-orange { fill: #e07a1f; } .dist-green { fill: #1f9a52; }
.admin-bridge-tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.admin-asof { margin-top: 12px; }
/* website traffic (Admin dashboard): a plain CSS bar per day and a small sources table */
.admin-traffic { margin-top: 18px; }
.admin-traffic h2 { font-size: 17px; margin: 0 0 2px; }
.admin-traffic .admin-stats .card { box-shadow: none; }
.tr-h { font-size: 14px; margin: 10px 0 6px; }
.tr-chart { position: relative; height: 120px; padding-top: 16px; border-bottom: 1px solid var(--line); }
.tr-max { position: absolute; top: 0; left: 0; font-size: 11px; color: var(--muted); }
.tr-bars { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.tr-bar { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 0; }
.tr-bar > span { display: block; width: 100%; min-height: 1px; background: var(--primary); border-radius: 2px 2px 0 0; }
.tr-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.tr-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.tr-table th, .tr-table td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.tr-table th { font-size: 12px; color: var(--muted); font-weight: 600; }
.tr-table td:not(:first-child), .tr-table th:not(:first-child) { text-align: right; }
.tr-off { color: #9a4a0b; font-weight: 600; }
.admin-lib-intro { margin-bottom: 0; }
.admin-lib-intro p, .admin-empty p { margin: 0; font-size: 14px; }
.admin-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 14px 0 4px; }
.admin-search input { min-width: 280px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--card); color: var(--text); }
.admin-sel { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.admin-sel select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--card); color: var(--text); }
.admin-table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.admin-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.admin-table th, .admin-table td { padding: 8px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.admin-table th { white-space: normal; }
.admin-table td:nth-child(9) { white-space: normal; min-width: 96px; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table td:nth-child(12) { white-space: normal; min-width: 160px; }
.admin-table th { background: #f6f8fb; }
.admin-table tbody tr:hover { background: var(--primary-soft); }
.admin-table a { color: var(--primary); font-weight: 600; text-decoration: none; }
.admin-sort { border: 0; background: none; padding: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; text-align: left; }
.admin-warn { display: block; font-size: 11.5px; color: #9a5600; }
/* Users (account administration) */
.admin-users-total { grid-template-columns: minmax(180px, 280px); }
.admin-users th { font-size: 12px; font-weight: 700; color: var(--muted); }
.admin-users td { overflow-wrap: anywhere; }
.admin-consent { display: inline-block; justify-self: start;font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; border: 1px solid var(--line); color: var(--muted); }
.admin-consent.consent-active { color: #1f7a45; border-color: #b9e0c8; background: #eef8f2; }
.admin-consent.consent-withdrawn { color: #9a5600; border-color: #f0d3ad; background: #fdf5eb; }
.admin-detail-head { margin-bottom: 14px; }
.admin-detail-head h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; margin: 6px 0 8px; }
.admin-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; }
.admin-facts dt { font-size: 12px; color: var(--muted); }
.admin-facts dd { margin: 0; font-size: 14px; font-weight: 600; }
.admin-back { margin: 0; }
.admin-back a { color: var(--primary); font-size: 14px; font-weight: 600; text-decoration: none; }
.admin-med { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin: 0 0 18px; }
.admin-med-now { border-style: dashed; }
.admin-med-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 8px 0 4px; }
.admin-med-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 10px; }
.admin-med-list li { display: flex; flex-direction: column; gap: 1px; font-size: 14px; }
.admin-med-meta { font-size: 12.5px; color: var(--muted); }
.admin-audio-note { margin: 8px 0 0; }
.admin-med-single { grid-template-columns: 1fr; }
.admin-unchanged { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
@media (max-width: 760px) {
  .admin-search, .admin-search input { flex-basis: 100%; min-width: 0; width: 100%; }
  .admin-table-wrap { overflow-x: visible; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  .admin-table td { display: grid; grid-template-columns: 44% 1fr; gap: 8px; padding: 3px 0; border: 0; white-space: normal; }
  .admin-table td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); }
  .admin-dist li { grid-template-columns: 84px 1fr 36px; }
}

/* ---- Sound Library: community sharing (share panel), community items, Admin Public Library */
.share-community:not(:empty) { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.comm-label { display: block; font-size: 13.5px; font-weight: 600; margin: 0 0 6px; }
.comm-findings { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.comm-radio { font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.comm-contact { margin: 0 0 12px; }
.comm-contact-row { display: flex; flex-wrap: wrap; gap: 8px; }
.comm-contact-row select, .comm-contact-row input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; background: var(--card); color: var(--text); }
.comm-contact-row input { flex: 1 1 220px; min-width: 0; }
.comm-preview { border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; margin: 0 0 10px; background: var(--card); }
.comm-preview ul { margin: 0 0 6px; padding-left: 18px; font-size: 14px; line-height: 1.5; }
.comm-warn { margin-top: 4px; }
.comm-status a { margin-left: 4px; color: var(--primary); font-weight: 600; }
.ex-chip { background: var(--primary-soft); color: var(--primary); }
.ex-community { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.ex-finding { color: var(--text); font-weight: 600; }
.ex-contact { overflow-wrap: anywhere; }
.ex-preview { margin: 0 0 10px; }
.admin-pl-h { font-size: 17px; margin: 18px 0 8px; }
.admin-pl-item { margin: 0 0 10px; }
.admin-pl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; }
.admin-pl-head a { margin-left: auto; color: var(--primary); font-weight: 600; text-decoration: none; }
.admin-pl-form { display: grid; gap: 8px; margin-top: 6px; }
.admin-pl-form label { display: grid; gap: 3px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.admin-pl-form input, .admin-pl-form textarea, .admin-pl-form select { padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 14px; font-weight: 400; color: var(--text); background: var(--card); }
.admin-pl-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.admin-pl-row .pl-pos { width: 90px; }

/* ---- sharing: the two actions (Results, after a save) and compact Public Library items */
.share-choices h2 { margin: 0 0 10px; font-size: 17px; }
.sc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.sc-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; cursor: pointer; }
.sc-opt:hover, .sc-opt[aria-expanded="true"] { border-color: var(--primary); background: var(--primary-soft); }
.sc-opt .icon { flex: none; width: 22px; height: 22px; color: var(--primary); margin-top: 2px; }
.sc-opt strong { display: block; font-size: 15px; }
.sc-opt span span { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.share-choices .share-note { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.comm-done { display: flex; align-items: center; gap: 8px; font-weight: 600; color: #1f7a45; }
.comm-done .icon { width: 20px; height: 20px; }
.my-side .comm-btn { white-space: nowrap; }
details.admin-pl-item > summary { cursor: pointer; list-style: none; margin: 0; }
details.admin-pl-item > summary::-webkit-details-marker { display: none; }
.admin-pl-edit { color: var(--muted); font-size: 13px; }
details.admin-pl-item[open] .admin-pl-edit { visibility: hidden; }
.admin-pl-item { padding-top: 12px; padding-bottom: 12px; }

/* ---- 2026-10-15 polish: lighter Save form, compact rows, Sound Library cards + quick Play */
.save-panel .sp-section { margin: 2px 0 10px; padding-top: 10px; }
.save-panel .research-opt { margin: 2px 0 8px; padding-top: 10px; }
.save-panel .research-opt h3 { margin-bottom: 6px; }
.save-panel .save-notice { margin: 10px 0 8px; padding: 0; background: none; border: 0; box-shadow: none; font-size: 13px; font-weight: 400; color: var(--muted); }
@media (min-width: 701px) {
  .my-home .my-row { grid-template-columns: minmax(0, 1fr) minmax(0, 480px) 372px; }   /* fixed: columns line up across rows */
  .my-home .my-side { gap: 8px; }
}
.my-home .my-side .share-btn.row { min-height: 32px; padding: 4px 12px; }
@media (max-width: 700px) { .my-home .my-side { gap: 8px; } .my-home .my-row { gap: 6px 16px; } }
.comm-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 0; font-size: 14.5px; font-weight: 600; color: #1f7a45; }
.comm-line .icon { width: 18px; height: 18px; }
.comm-line a, .comm-line .link-btn { font-weight: 600; color: var(--primary); }
.comm-line > span[aria-hidden] { color: var(--muted); font-weight: 400; }
.ex-row .my-name { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 4px 10px; justify-items: start; }
.ex-row .my-name > :not(.ex-play) { grid-column: 2; }
.ex-row .my-name .my-open { font-size: 16px; }
.ex-play { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--primary-line); border-radius: 50%; background: var(--card); color: var(--primary); cursor: pointer; }
.ex-play .icon { width: 16px; height: 16px; }
.ex-play:hover { background: var(--primary-soft); }
.ex-play[data-state="playing"], .ex-play[data-state="loading"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.ex-play[data-state="loading"] { animation: ex-pulse 1s ease-in-out infinite; }
.ex-play:disabled { opacity: .45; cursor: not-allowed; }
@keyframes ex-pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .ex-play[data-state="loading"] { animation: none; } }
.ex-chip { font-size: 11.5px; font-weight: 600; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; }
.ex-row .ex-desc { padding-left: 46px; }
.ex-row .ex-community { padding-left: 46px; }
.ex-finding { display: inline-block; padding: 2px 10px; border-radius: 999px; background: #eef8f2; color: #1f7a45; font-weight: 600; }
.ex-contact a { color: var(--primary); font-weight: 600; overflow-wrap: anywhere; }
.ex-contact-text { user-select: all; color: var(--text); }
@media (max-width: 700px) { .ex-row .ex-desc, .ex-row .ex-community { padding-left: 0; } }
@media (min-width: 701px) { .my-list .ex-row { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.5fr) auto; } }

/* ---- Sound Library cards, tighter (2026-10-15): Play | title + badges on one line, compact finding / contact */
.ex-row .my-name { display: flex; align-items: flex-start; gap: 10px; flex-wrap: nowrap; }   /* Play level with the title's first line */
.ex-row .my-name > :not(.ex-play) { grid-column: auto; }
.ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; padding-top: 7px; align-content: flex-start; }
.ex-head .my-open { overflow-wrap: anywhere; }
.my-list .ex-row { padding-top: 10px; padding-bottom: 10px; row-gap: 6px; }
.ex-row .ex-desc { margin-top: 2px; }
.ex-row .ex-community { margin-top: 4px; gap: 4px 12px; align-items: center; }
.ex-finding { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; padding: 1px 9px; }
.ex-contact { white-space: nowrap; }
.ex-contact-link { display: inline-block; padding: 1px 10px; border: 1px solid var(--primary-line); border-radius: 999px; text-decoration: none; }
.ex-contact-link:hover { background: var(--primary-soft); }
.ex-contact-text { white-space: normal; overflow-wrap: anywhere; }
.admin-pl-head .ex-play { width: 30px; height: 30px; }
.admin-pl-head .ex-play .icon { width: 13px; height: 13px; }
.admin-rec { display: inline-flex; align-items: center; gap: 8px; }
.admin-rec .ex-play { width: 26px; height: 26px; }
.admin-rec .ex-play .icon { width: 12px; height: 12px; }

/* ---- 2026-10-16 (approved): more prominent Play buttons - vivid blue disc, white icon, ~18 % larger; same player */
.pl-btn { width: 52px; height: 52px; background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(8, 120, 255, .28);
  transition: background-color .15s, box-shadow .15s, transform .08s; }
.pl-btn .icon { width: 23px; height: 23px; }
.pl-btn:hover:not([disabled]) { background: var(--primary-hover); box-shadow: 0 6px 16px rgba(8, 120, 255, .34); }
.pl-btn:active:not([disabled]) { transform: scale(.94); box-shadow: 0 2px 6px rgba(8, 120, 255, .30); }
.pl-btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }   /* a white gap, then the brand blue */
.player.disabled .pl-btn { box-shadow: none; }
.res-listen .pl-btn { width: 40px; height: 40px; }
.res-listen .pl-btn .icon { width: 19px; height: 19px; }
/* homepage "Try me": the Results handwritten note style (.hand-note), placed by placeTryMe() next to the heading */
.ex-listen { position: relative; }
.hand-try { position: absolute; left: 0; top: 0; pointer-events: none; visibility: hidden; z-index: 1; }
.hand-try.placed { visibility: visible; }
.hand-try .hand-note { align-items: flex-start; gap: 0; font-size: 15px; transform: none; }
.hand-try .hand-note svg { width: auto; height: auto; margin: 0; overflow: visible; }
.hand-try .hand-text { display: inline-block; transform: rotate(-3deg); }

/* ---- 2026-10-16 (approved): "Add a recording" chooser + Record now (one dialog for Home and My recordings) */
.rec-dialog { border: 0; padding: 0; border-radius: 18px; width: min(440px, calc(100% - 32px)); max-height: calc(100% - 32px); color: var(--text);
  background: #fff; box-shadow: 0 24px 60px rgba(11, 27, 77, .22); }
.rec-dialog::backdrop { background: rgba(11, 27, 77, .38); }
.rec-body { padding: 22px 22px 24px; }
.rec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rec-head h2 { margin: 0; font-size: 20px; }
.rec-close { width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.rec-close:hover { background: var(--primary-soft); color: var(--text); }
.rec-close .icon { width: 20px; height: 20px; }
.rec-choices { display: grid; gap: 12px; }
.rec-choice { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 14px 16px; text-align: left; font: inherit; color: var(--text);
  background: #fff; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.rec-choice:hover { border-color: var(--primary); background: var(--primary-soft); }
.rec-choice:focus-visible, .rec-close:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.rec-choice strong { display: block; font-size: 16px; }
.rec-choice span span { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
.rec-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.rec-ic .icon { width: 22px; height: 22px; }
.rec-guide { margin: 0 0 12px; color: var(--muted); }
.rec-timer { margin: 6px 0 18px; font-size: 34px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.rec-live { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 0; color: #c62828; font-weight: 600; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #e53935; animation: rec-pulse 1.2s ease-in-out infinite; }
@keyframes rec-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rec-dot { animation: none; } }
.rec-square { width: 12px; height: 12px; border-radius: 2px; background: currentColor; display: inline-block; }
.rec-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.rec-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 24px; }
.rec-actions .btn .icon { width: 20px; height: 20px; }
.rec-dialog .error { margin: 0 0 14px; }
.rec-steps { margin: 0 0 12px; padding-left: 22px; line-height: 1.5; }
.rec-steps li { margin: 4px 0; }
.rec-note { margin: 0 0 18px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.rec-preview { margin: 4px 0 18px; }
.rec-more { display: flex; justify-content: center; gap: 22px; margin-top: 12px; }
.rec-more .link-btn { min-height: 44px; display: inline-flex; align-items: center; color: var(--primary); font: inherit; font-weight: 600;
  text-decoration: none; background: none; border: 0; padding: 0 4px; cursor: pointer; }
.rec-more .link-btn:hover { text-decoration: underline; }
@media (max-width: 560px) {               /* a bottom sheet on phones */
  .rec-dialog { width: 100%; max-width: none; margin: auto 0 0; border-radius: 18px 18px 0 0; max-height: 92%; }
  .rec-body { padding: 20px 18px calc(22px + env(safe-area-inset-bottom)); }
}

/* ---- 2026-10-16 (approved): Sound Library cards (finding, one-row measurements, note, contact button) + sorting,
   community form fields (public title, note) */
.ex-tools { display: flex; justify-content: flex-end; margin: 0 0 12px; }
.ex-sort-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.ex-sort { font: inherit; font-size: 14px; color: var(--text); padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; max-width: 100%; }
.ex-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ex-list[aria-busy="true"] { min-height: 100vh; }               /* room for the recordings while they load (no jump) */
.ex-disc { margin: -10px 0 18px; max-width: 760px; font-size: 13.5px; color: var(--muted); }
.ex-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ex-card-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ex-card-head .ex-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.ex-card-head .my-open { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.ex-card .ex-desc { margin: 0; }
.ex-finding-line { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.ex-finding { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--purple); background: var(--purple-soft); border-radius: 8px; padding: 3px 9px; }
.ex-reported { font-size: 12.5px; color: var(--muted); }
.ex-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.ex-metrics div { min-width: 0; background: var(--primary-soft); border-radius: 10px; padding: 8px 10px; }
.ex-metrics dt { font-size: 12px; color: var(--muted); margin: 0 0 2px; }
.ex-metrics dd { margin: 0; font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.ex-metrics-state { margin: 0; color: var(--muted); }
.ex-own-words { border-left: 3px solid var(--purple-soft); background: #fafaff; border-radius: 0 10px 10px 0; padding: 8px 12px; }
.ex-own-h { margin: 0 0 3px; font-size: 12.5px; font-weight: 600; color: var(--purple); text-transform: uppercase; letter-spacing: .03em; }
.ex-own-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.ex-own-words:not(.full):not(.open) .ex-own-text { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ex-own-more { margin-top: 4px; font-size: 14px; color: var(--primary); }
.ex-own-caption { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); }
.ex-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; }
.ex-contact-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; color: var(--primary); border: 1.5px solid var(--primary); font-weight: 600; }
.ex-contact-btn:hover { background: var(--primary-soft); }
.ex-card-actions .btn, .ex-contact-row .btn { text-decoration: none; }
.ex-contact-btn .icon { width: 18px; height: 18px; }
.ex-contact-text { margin: 0; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.ex-contact-row { margin: 10px 0 0; }
.comm-field { margin: 12px 0; }
.comm-field input, .comm-field textarea { width: 100%; box-sizing: border-box; font: inherit; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.comm-field textarea { resize: vertical; min-height: 96px; }
.comm-count { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); text-align: right; }
.admin-pl-ownernote { white-space: pre-line; }
@media (max-width: 560px) {
  .ex-card { padding: 14px; }
  .ex-metrics { gap: 6px; }
  .ex-metrics div { padding: 7px 8px; }
  .ex-metrics dd { font-size: 13.5px; }
  .ex-card-actions { justify-content: stretch; }
  .ex-card-actions .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
  .ex-tools { justify-content: flex-start; }
}

/* ---- 2026-10-16: Sound Library colour refresh (scoped to the library cards only) */
.ex-card { box-shadow: 0 1px 2px rgba(11, 27, 77, .04), 0 4px 14px rgba(11, 27, 77, .05); transition: box-shadow .15s, border-color .15s; }
.ex-card:hover { border-color: #d9dcf5; box-shadow: 0 2px 4px rgba(11, 27, 77, .05), 0 8px 22px rgba(91, 69, 214, .09); }
.ex-card .ex-play { background: #087bfa; border-color: #087bfa; color: #fff; }
.ex-card .ex-play:hover { background: #0062d6; border-color: #0062d6; }
.ex-card .ex-play[data-state="playing"], .ex-card .ex-play[data-state="loading"] { background: #0052b4; border-color: #0052b4; color: #fff; }
.ex-card .ex-metrics div:nth-child(1) { background: #e6f6ff; }
.ex-card .ex-metrics div:nth-child(2) { background: #f0ecff; }
.ex-card .ex-metrics div:nth-child(3) { background: #fff3e7; }
.ex-card .ex-own-words { background: #f7f4ff; border-left-color: #c9bdf5; }
.ex-card .ex-own-h { color: #6a4fe0; }
.ex-card .ex-own-text { color: #1f2a4d; }
.ex-card .ex-contact-btn { background: #f3efff; color: #5b45d6; border-color: #5b45d6; }
.ex-card .ex-contact-btn:hover { background: #e7e0ff; color: #4a35c4; border-color: #4a35c4; }
/* ---- Understanding PT (/pulsatile-tinnitus, guide.py): one long, readable editorial column; quiet sidebar TOC on wide
   screens, a native disclosure on smaller ones; few callouts; compact sources. Room is left for one or two diagrams. */
main.pt-page { max-width: none; padding: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.pt-wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 72px; }
.pt-article { position: relative; max-width: 760px; margin: 0 auto; color: var(--text); }
.pt-article [id] { scroll-margin-top: 92px; }
.pt-head { margin: 8px 0 26px; }
.pt-article .pt-kicker { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--primary); }
.pt-kicker span { color: #9fb3cf; margin: 0 4px; }
.pt-article h1 { margin: 0; font-size: clamp(32px, 4.4vw, 46px); line-height: 1.12; letter-spacing: -.025em; color: #0b1b4d; }
.pt-article .pt-sub { margin: 16px 0 0; font-size: 19px; line-height: 1.55; color: #35466a; }
.pt-article .pt-byline { margin: 14px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.pt-dot { margin: 0 8px; color: #9fb3cf; }
.pt-article p, .pt-article li { font-size: 17px; line-height: 1.75; color: #24324f; }
.pt-article p { margin: 0 0 16px; }
.pt-article ul, .pt-article ol { margin: 0 0 18px; padding-left: 24px; }
.pt-article li { margin: 0 0 6px; }
.pt-article strong { color: #0b1b4d; }
.pt-article a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; overflow-wrap: anywhere; }
.pt-article a:hover { color: var(--primary-hover); }
.pt-article a:focus-visible, .pt-toc summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.pt-note { margin: 0 0 34px; padding: 20px 22px 6px; border-radius: 16px; background: #f2f7ff; border: 1px solid var(--primary-line); }
.pt-note h2 { margin: 0 0 10px; font-size: 18px; color: #0b1b4d; }
.pt-note p { font-size: 16px; line-height: 1.7; color: #35466a; }
.pt-intro h2, .pt-end h2 { margin: 0 0 12px; font-size: 24px; letter-spacing: -.01em; color: #0b1b4d; }
.pt-group > h2 { margin: 64px 0 0; padding-top: 18px; border-top: 1px solid var(--card-line); font-size: 13px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--primary); }
.pt-q { margin-top: 30px; }
.pt-q + .pt-q { margin-top: 56px; }
.pt-q h3 { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 29px); line-height: 1.25; letter-spacing: -.015em; color: #0b1b4d; }
.pt-q h4 { margin: 30px 0 10px; font-size: 19.5px; line-height: 1.35; color: #0b1b4d; }
.pt-q h5 { margin: 24px 0 8px; font-size: 17.5px; line-height: 1.4; color: #0b1b4d; }
.pt-callout { margin: 22px 0; padding: 14px 18px; border-left: 3px solid var(--primary); border-radius: 0 12px 12px 0; background: #f6f9ff; }
p.pt-callout { padding: 12px 18px; }
div.pt-callout > h4 { margin-top: 2px; }
div.pt-callout > p:last-child { margin-bottom: 4px; }
.pt-sources { margin: 26px 0 0; padding: 14px 0 0; border-top: 1px dashed var(--card-line); }
.pt-sources-h { margin: 0 0 6px !important; font-size: 13px !important; text-transform: uppercase; letter-spacing: .05em; color: var(--muted) !important; }
.pt-sources-h strong { color: var(--muted); }
.pt-sources ul { margin: 0; padding-left: 18px; }
.pt-sources li { font-size: 14px; line-height: 1.55; margin: 0 0 5px; color: var(--muted); }
p.pt-src { font-size: 14px; line-height: 1.55; color: var(--muted); }
.pt-table-wrap { margin: 6px 0 24px; overflow-x: auto; border: 1px solid var(--card-line); border-radius: 12px; background: #fff; }
.pt-table-wrap:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pt-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; line-height: 1.45; }
.pt-table caption { text-align: left; padding: 10px 14px 4px; font-size: 13px; font-weight: 600; color: var(--muted); }
.pt-table th, .pt-table td { padding: 9px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--card-line); color: #24324f; }
.pt-table thead th { border-top: 0; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pt-table tbody th { font-weight: 700; color: #0b1b4d; white-space: nowrap; }
.pt-cta { margin: 28px 0 8px; padding: 22px 24px 8px; border-radius: 18px; border: 1px solid var(--primary-line);
  background: linear-gradient(135deg, #eef5ff 0%, #f3efff 100%); }
.pt-cta h4 { margin: 0 0 8px !important; font-size: 22px !important; letter-spacing: -.01em; }
.pt-cta p { font-size: 16px; color: #35466a; }
.pt-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pt-cta-actions .btn { text-decoration: none; display: inline-flex; align-items: center; padding: 11px 22px; font-weight: 600; font-size: 15px; }
.pt-cta-actions .btn:not(.secondary) { background: var(--primary); color: #fff; }
.pt-cta-actions .btn:not(.secondary):hover { background: var(--primary-hover); color: #fff; }
.pt-cta-actions .btn.secondary { background: #fff; color: #0b1b4d; border-color: var(--primary-line); }
.pt-extra { margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--card-line); }
.pt-extra h2 { margin: 0 0 14px; font-size: clamp(24px, 2.6vw, 29px); line-height: 1.25; letter-spacing: -.015em; color: #0b1b4d; }
.pt-end { margin-top: 64px; padding-top: 22px; border-top: 1px solid var(--card-line); }
.pt-end p { font-size: 15.5px; color: #35466a; }
/* table of contents */
.pt-toc { margin: 8px 0 28px; }
.pt-toc-d { background: #fff; border: 1px solid var(--card-line); border-radius: 14px; box-shadow: 0 1px 2px rgba(16, 36, 84, .04); }
.pt-toc summary { cursor: pointer; padding: 13px 16px; font-size: 15px; font-weight: 650; color: #0b1b4d; list-style: none;
  display: flex; align-items: center; gap: 4px; }
.pt-toc summary::-webkit-details-marker { display: none; }
.pt-toc summary::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform .15s; }
.pt-toc-d[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
.pt-toc-count { font-weight: 500; color: var(--muted); }
.pt-toc-list { list-style: none; margin: 0; padding: 0 16px 12px; }
.pt-toc-list > li { margin: 0 0 10px; font-size: 14px; }
.pt-toc-group > a { display: inline-block; margin: 4px 0 4px; font-size: 12px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary) !important; text-decoration: none !important; }
.pt-toc-list ol { list-style: none; margin: 0; padding: 0; }
.pt-toc-list ol li { margin: 0; font-size: 14px; line-height: 1.4; }
.pt-toc-list ol a { display: block; padding: 5px 0; color: #35466a; text-decoration: none; }
.pt-toc-list ol a:hover { color: var(--primary); }
@media (min-width: 1180px) {
  .pt-article { max-width: 1090px; padding-right: 320px; }
  .pt-toc { position: absolute; top: 0; right: 0; width: 280px; height: 100%; margin: 0; }
  .pt-toc-inner { position: sticky; top: 88px; max-height: calc(100vh - 110px); overflow-y: auto; }
  .pt-toc-d { background: transparent; border: 0; box-shadow: none; }
  .pt-toc summary { list-style: none; padding: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); cursor: default; pointer-events: none; }
  .pt-toc summary::after, .pt-toc-count { display: none; }
  .pt-toc summary::-webkit-details-marker { display: none; }
  .pt-toc-list { padding: 0 0 0 14px; border-left: 1px solid var(--card-line); }
}
@media (max-width: 600px) {
  .pt-wrap { padding: 18px 16px 56px; }
  .pt-article .pt-sub { font-size: 17.5px; }
  .pt-article p, .pt-article li { font-size: 16.5px; line-height: 1.72; }
  .pt-note { margin-bottom: 26px; padding: 14px 14px 2px; border-radius: 14px; }
  .pt-note h2 { margin-bottom: 8px; font-size: 17px; }
  .pt-article .pt-note p { margin-bottom: 10px; font-size: 15.5px; line-height: 1.6; }
  .pt-head { margin-bottom: 18px; }
  .pt-toc { margin: 0 0 22px; }
  /* the scan overview as one card per examination (same labels and words as the table) */
  .pt-table-wrap { overflow: visible; border: 0; background: none; }
  .pt-table { min-width: 0; }
  .pt-table caption { display: block; padding: 0 0 8px; }
  .pt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .pt-table, .pt-table tbody, .pt-table tr, .pt-table th, .pt-table td { display: block; }
  .pt-table tr { margin: 0 0 10px; padding: 10px 14px; background: #fff; border: 1px solid var(--card-line); border-radius: 12px; }
  .pt-table th, .pt-table td { padding: 3px 0; border: 0; }
  .pt-table tbody th { font-size: 16px; padding-bottom: 4px; }
  .pt-table td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--muted); }
  .pt-q h4 { font-size: 18.5px; }
  .pt-cta { padding: 18px 16px 6px; }
  .pt-cta-actions .btn { flex: 1 1 auto; justify-content: center; }
}
/* the guide's own entry in the header shows as the current page (like the app's active link) */
.mainnav a[aria-current="page"] { color: var(--primary); font-weight: 500; border-bottom-color: var(--primary); }
/* the contextual links into the guide (home, About) */
.h2-learn { margin: 6px 0 0; }
.h2-learn a { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--primary); text-decoration: none; }
.h2-learn a:hover { text-decoration: underline; }
.h2-learn .icon { width: 16px; height: 16px; }
.about-page .ab-more { margin-top: 30px; font-size: 16px; }
.about-page .ab-more a { color: var(--primary); font-weight: 600; }
