/* speaker.doctor — one stylesheet for every page. Dark only, the app's navy + blue palette
   (Presentation/Common/DesignSystem/Colors.swift), rounded type like the app. */

:root {
  --bg: #050b14;          /* blue600 */
  --surface: #0e2340;     /* blue500 */
  --surface-2: #122c4f;   /* blue400 */
  --line: #1c3a63;
  --text: #e3fcff;        /* blue100 */
  --muted: #8fa9c8;       /* blue200, lifted for contrast on navy */
  --accent: #0084ff;      /* blue300 */
  --accent-hi: #3aa0ff;
  --green: #00d494;
  --orange: #ff6b35;
  --red: #ff4828;
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; background-color: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1.0625rem; line-height: 1.7; -webkit-font-smoothing: antialiased;
  min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }
body > .site-footer { flex-shrink: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-hi); text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 30; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 54rem; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(5, 11, 20, .82); -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px); }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; max-width: 64rem; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: .95rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav .nav-cta { color: var(--text); background: var(--accent); padding: 8px 16px; border-radius: 999px; font-weight: 600; }
.site-nav .nav-cta:hover { background: var(--accent-hi); }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent; color: var(--text); cursor: pointer; }
.menu-btn svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.menu-btn path { transition: transform .25s ease, opacity .2s ease; transform-origin: 12px 12px; }
.is-open .menu-btn .l1 { transform: translateY(5px) rotate(45deg); }
.is-open .menu-btn .l2 { opacity: 0; }
.is-open .menu-btn .l3 { transform: translateY(-5px) rotate(-45deg); }

/* Typography */
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.85rem); margin: 2.4em 0 .8em; }
h3 { font-size: 1.15rem; margin: 1.8em 0 .5em; }
p, ul, ol { margin: 0 0 1.25em; }
p, li, dd { overflow-wrap: break-word; }
h1, h2, h3, p, li, dd, dt, blockquote, figcaption, summary, .lead { text-wrap: pretty; }
li { margin-bottom: .55em; }
.lead { font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .95rem; }
strong { color: var(--text); font-weight: 650; }
.eyebrow { color: var(--accent-hi); font-size: .9rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: .6em; }

/* Sections */
section { padding: 32px 0; }
@media (min-width: 760px) { section { padding: 48px 0; } }
section > h2:first-child { margin-top: 0; }
article { padding: 40px 0 32px; }
.breadcrumb { font-size: .95rem; color: var(--muted); padding-top: 24px; }
.breadcrumb a { color: var(--muted); }

/* App Store CTA */
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 1.4em 0; }
.badge-link { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .2s ease; }
.badge-link img { height: 50px; width: auto; }
.badge-link:hover { transform: scale(1.03); }
.cta-note { color: var(--muted); font-size: .95rem; }
.cta-note strong { color: var(--text); }
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 700; padding: 14px 22px; border-radius: 999px; font-size: 1.05rem; }
.btn:hover { background: var(--accent-hi); color: #fff; }

/* Tone player (home + JBL page). Big round button with a 30 s progress ring. */
.tone { text-align: center; padding: 48px 0 24px; overflow-x: clip; /* the player's glow reaches past narrow screens */ }
.tone h1 { max-width: 40rem; margin: 0 auto .35em; }
.tone .lead { max-width: 36rem; margin: 0 auto 1.6em; color: var(--muted); }
.tone-player { position: relative; width: min(260px, 70vw); aspect-ratio: 1; margin: 0 auto; }
.tone-player::before { content: ""; position: absolute; inset: -30%; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgba(0, 132, 255, .28), transparent 62%); transition: opacity .4s ease; opacity: .7; }
.tone-player.is-playing::before { opacity: 1; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 64% { transform: scale(1.04); } 65%, 100% { transform: scale(.94); } }
.tone-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tone-ring circle { fill: none; stroke-width: 6; }
.tone-ring .track { stroke: var(--surface-2); }
.tone-ring .bar { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; opacity: 0; }
/* The round cap would show as a dot at 0%: the bar only appears once the tone runs. */
.tone-player.is-playing .tone-ring .bar, .tone-player.is-done .tone-ring .bar { opacity: 1; }
.tone-player.is-done .tone-ring .bar { stroke: var(--green); }
.tone-btn {
  position: absolute; inset: 14px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: radial-gradient(circle at 50% 35%, #163a66, var(--surface) 70%); color: var(--text); font: inherit;
  display: grid; place-content: center; gap: 4px; transition: transform .15s ease;
}
.tone-btn:hover { transform: scale(1.02); }
.tone-btn:active { transform: scale(.98); }
.tone-btn svg { width: 54px; height: 54px; margin: 0 auto; fill: var(--text); }
.tone-hz { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.tone-state { font-size: .95rem; color: var(--muted); min-height: 1.5em; }
.tone-steps { list-style: none; padding: 0; margin: 28px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 10px; max-width: 40rem; }
.tone-steps li { margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .92rem; }
.tone-after { max-width: 34rem; margin: 22px auto 0; padding: 16px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.tone-after[hidden] { display: none; }
.tone-after p { margin: 0 0 .6em; }
@media (prefers-reduced-motion: reduce) { .tone-player.is-playing::before { animation: none; } }

/* Feature rows: phone screen on one side, copy on the other */
.rows { display: grid; gap: 56px; margin: 2.4em 0; }
.row { display: grid; gap: 24px; align-items: center; }
.row-text h3 { margin-top: 0; font-size: 1.5rem; }
.row-text p { color: var(--muted); margin-bottom: 0; max-width: 28rem; }
.row-phone { display: flex; justify-content: center; }
.row-phone img { width: min(240px, 62vw); border-radius: 34px; border: 6px solid #13243b; box-shadow: 0 0 0 1px var(--line), 0 30px 80px -20px rgba(0, 132, 255, .35); }
@media (min-width: 760px) {
  .rows { gap: 96px; }
  .row { grid-template-columns: 300px 1fr; gap: 56px; }
  .row:nth-child(even) { grid-template-columns: 1fr 300px; }
  .row:nth-child(even) .row-phone { order: 2; }
}

/* Cards, steps, notes */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 1.4em 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent); color: var(--text); }
.card h3 { margin-top: 0; }
.card p { color: var(--muted); margin-bottom: 0; }
.card .more { color: var(--accent-hi); display: inline-block; margin-top: .8em; font-weight: 600; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 48px; margin-bottom: 1.4em; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); color: var(--accent-hi); display: grid; place-items: center; font-weight: 700; }
.note { background: var(--surface); border-left: 3px solid var(--accent); border-radius: 0 12px 12px 0; padding: 14px 18px; margin: 1.4em 0; }
.note.warn { border-left-color: var(--orange); }
.dodont { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.4em 0; }
.dodont > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.dodont h3 { margin-top: 0; }
.dodont .do h3 { color: var(--green); }
.dodont .dont h3 { color: var(--orange); }
.dodont ul { margin: 0; padding-left: 1.1em; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; }
table.wide { min-width: 40rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.yes { color: var(--green); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: -2px; color: var(--accent-hi); font-size: 1.3rem; }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding-top: 10px; color: var(--muted); }
.sources { font-size: .96rem; color: var(--muted); }
.sources li { margin-bottom: .6em; }

/* Glossary */
.glossary dt { font-weight: 700; font-size: 1.12rem; margin-top: 1.4em; scroll-margin-top: 90px; }
.glossary dd { margin: .35em 0 0; color: var(--muted); }
.glossary dt:target { color: var(--accent-hi); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 48px 0 56px; color: var(--muted); font-size: 1rem; }
.site-footer .wrap { max-width: 64rem; }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .8em; color: var(--text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* 404 */
.lost { text-align: center; padding-top: 56px; }
.lost .lead { max-width: 30rem; margin-left: auto; margin-right: auto; }
.lost-links { list-style: none; padding: 0; margin: 2em auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.lost-links a { display: inline-block; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; }

/* Mobile: menu sheet + sticky App Store pill */
@media (max-width: 759px) {
  .menu-btn { display: grid; place-items: center; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 8px 16px 24px; background: var(--bg); box-shadow: 0 30px 60px rgba(0, 0, 0, .6); border-bottom: 1px solid var(--line);
    font-size: 1.25rem; font-weight: 600; opacity: 0; transform: translateY(-8px); pointer-events: none; visibility: hidden;
    transition: opacity .2s ease, transform .25s ease, visibility 0s linear .25s;
  }
  .is-open .site-nav { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition: opacity .2s ease, transform .25s ease; }
  .site-nav a { color: var(--text); padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .nav-cta { background: none; padding: 14px 4px; border-radius: 0; color: var(--accent-hi); }
  html.menu-open { overflow: hidden; }
  /* Under 80% width: iOS 26 Safari tints its toolbar from wide fixed elements at the bottom. */
  .sticky-cta {
    position: fixed; left: 0; right: 0; margin: 0 auto; width: min(78vw, 340px); bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 15;
    display: block; text-align: center; padding: 16px; border-radius: 999px; isolation: isolate; color: #fff; font-weight: 700; text-decoration: none;
    transform: translateY(160%); transition: transform .35s ease;
  }
  .sticky-cta::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); }
  .sticky-cta.show { transform: none; }
  body { padding-bottom: 88px; }
  h1 { font-size: clamp(1.8rem, 8vw, 2.2rem); }
  .site-footer a { display: inline-block; padding: 6px 0; }
}
@media (min-width: 760px) { .sticky-cta { display: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.tone-btn .i-stop, .tone-player.is-playing .tone-btn .i-play { display: none; }
.tone-player.is-playing .tone-btn .i-stop { display: block; }
/* Post-tone handoff: the moment the visitor wonders whether it worked. */
.tone-after { text-align: left; }
.tone-after-title { font-size: 1.25rem; margin: 0 0 .4em; }
.tone-after-shot { margin: 14px auto 12px; max-width: 300px; text-align: center; }
.tone-after-shot img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); }
.tone-after-shot figcaption { margin-top: 6px; font-size: .8rem; color: var(--muted); }
.tone-after .btn { margin-top: 6px; }

/* Comparison table: our column tinted, first column pinned while the table scrolls on phones */
.compare { min-width: 640px; }
.compare th.us, .compare td.us { background: rgba(0,132,255,.12); }
.compare th.us { color: var(--text); border-top: 2px solid var(--accent); }
.compare td:first-child, .compare th:first-child { position: sticky; left: 0; background: var(--bg); min-width: 9.5rem; }
