/* Clear Wave website — mirrors the iOS app: system grouped background, large titles,
   pill tabs, flat teal cards, white pill buttons and a floating tab bar. */
:root {
  --teal: #178e96;          /* app "primary" */
  --hero: #2f9aa1;          /* Turbo / Automatic card */
  --bg: #f2f2f7;            /* app "bg" */
  --card: #fafaff;          /* app "card" */
  --text: #000000;
  --muted: #8a8a8e;
  --pill: #dcdce1;
  --line: rgba(60, 60, 67, 0.13);
  --tab-bg: #ffffff;
  --tab-sel: #ececf0;
  --teal-tint: rgba(23, 142, 150, 0.13);
  --teal-text: #12808a;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1c1c1e; --text: #ffffff; --muted: #8d8d93; --pill: #2c2c2e;
    --line: rgba(84, 84, 88, 0.6); --tab-bg: #1c1c1e; --tab-sel: #2c2c2e;
    --teal-tint: rgba(41, 173, 179, 0.2); --teal-text: #3cc3c9; --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1c1c1e; --text: #ffffff; --muted: #8d8d93; --pill: #2c2c2e;
  --line: rgba(84, 84, 88, 0.6); --tab-bg: #1c1c1e; --tab-sel: #2c2c2e;
  --teal-tint: rgba(41, 173, 179, 0.2); --teal-text: #3cc3c9; --shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Noto Sans", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; }
svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 12px; }
[hidden] { display: none !important; }

/* Page column, phone-width like the app */
.app { max-width: 560px; margin: 0 auto; padding: 0 20px calc(120px + env(safe-area-inset-bottom)); }
.page { display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - 120px); }
.page-head { display: flex; align-items: center; justify-content: space-between; padding-top: calc(26px + env(safe-area-inset-top)); }
.page-head h1, .page-head h2 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.tagline { margin: -12px 0 0; color: var(--muted); font-size: 15px; }
.icon-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.7; }

/* Pill tabs (Automatic / Turbo) */
.pills { display: flex; gap: 8px; }
.pills button {
  flex: 1; height: 34px; padding: 0 10px; border-radius: 999px; background: var(--pill);
  font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background .15s, color .15s;
}
.pills button[aria-selected="true"], .pills button[aria-checked="true"] { background: var(--teal); color: #fff; }
.pills.small button { height: 30px; font-size: 13px; }
.pills.mini { flex: 0 0 auto; gap: 4px; }
.pills.mini button { flex: 0 0 auto; height: 28px; font-size: 12px; padding: 0 10px; }

/* Teal hero card */
.hero-card {
  position: relative; overflow: hidden; background: var(--hero); color: #fff;
  border-radius: 14px; padding: 20px; min-height: 380px;
  display: flex; flex-direction: column;
}
.hero-time { margin: 0; font-size: 17px; font-weight: 600; opacity: .95; position: relative; }
.hero-title { margin: 26px 0 0; font-size: 26px; line-height: 1.2; font-weight: 700; position: relative; max-width: 62%; }
.hero-bottom { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; position: relative; }
.hero-bottom p { margin: 0; font-size: 15px; font-weight: 600; }

/* Phone corner + drops, drawn instead of the app's image */
.hero-drops { position: absolute; inset-block-start: 0; inset-inline-end: 0; width: 56%; height: 75%; pointer-events: none; }
.hero-drops .phone {
  position: absolute; top: -40px; inset-inline-end: -46px; width: 170px; height: 110px; border-radius: 30px;
  background: linear-gradient(160deg, #e9fbfb, #a8e1e3); transform: rotate(-28deg);
  box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .7), 0 10px 20px rgba(0, 60, 64, .25);
}
.hero-drops .phone::after { content: ""; position: absolute; left: 50%; bottom: 14px; width: 38px; height: 8px; margin-left: -19px; border-radius: 4px; background: #1b6f74; }
.hero-drops i {
  position: absolute; width: 26px; height: 26px; border-radius: 0 50% 50% 50%; transform: rotate(45deg);
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.95), rgba(255,255,255,.35) 45%, rgba(255,255,255,.12) 70%);
  box-shadow: inset -2px -3px 6px rgba(255,255,255,.35), 0 3px 8px rgba(0,60,64,.18);
  animation: bob 3.2s ease-in-out infinite;
}
.hero-drops i:nth-child(2) { top: 42%; inset-inline-start: 24%; width: 52px; height: 52px; }
.hero-drops i:nth-child(3) { top: 30%; inset-inline-start: 44%; width: 24px; height: 24px; animation-delay: .6s; }
.hero-drops i:nth-child(4) { top: 46%; inset-inline-start: 62%; width: 22px; height: 22px; animation-delay: 1.1s; }
.hero-drops i:nth-child(5) { top: 66%; inset-inline-start: 50%; width: 18px; height: 18px; animation-delay: .3s; }
.hero-drops i:nth-child(6) { top: 58%; inset-inline-start: 80%; width: 28px; height: 28px; animation-delay: 1.6s; }
@keyframes bob { 50% { translate: 0 6px; } }

.white-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 44px;
  border-radius: 999px; background: #fff; color: var(--teal); font-weight: 700; font-size: 17px;
  transition: transform .12s, opacity .15s; text-align: center;
}
.white-btn:active, .teal-btn:active { transform: scale(.97); }
.white-btn.small { min-height: 40px; padding: 0 20px; font-size: 15px; }
.white-btn.wide { width: 100%; max-width: 420px; }
.footnote { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.footnote.left { text-align: start; }

/* Cards */
.card { background: var(--card); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.card-title { margin: 0; font-size: 20px; font-weight: 700; }
.teal-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px;
  border-radius: 14px; background: var(--teal); color: #fff; font-size: 17px; font-weight: 600;
  transition: transform .12s, background .15s;
}
.teal-btn .play { width: 18px; height: 18px; fill: #fff; }
.teal-btn.active { background: #c9484f; }
.teal-btn.active .play { display: none; }

/* HZ generator */
.hz-readout { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.hz-readout output { font-size: 64px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.hz-readout span { font-size: 20px; font-weight: 700; color: var(--muted); }
input[type="range"] { width: 100%; accent-color: var(--teal); margin: 0; height: 28px; }
.scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: -10px; direction: ltr; }
.row { display: flex; align-items: center; gap: 10px; }
.round-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-tint); color: var(--teal-text); font-size: 22px; font-weight: 600; }
.chips { flex: 1; min-width: 0; display: flex; gap: 5px; justify-content: center; direction: ltr; }
.chip { flex: 0 1 auto; min-width: 0; height: 32px; padding: 0 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; color: var(--muted); }
.chip.active { border-color: var(--teal); color: var(--teal-text); background: var(--teal-tint); }
.vol-row { display: flex; align-items: center; gap: 10px; }
.vol-row svg { width: 22px; height: 22px; fill: var(--muted); flex: 0 0 auto; }
.vol-row .stroke, .stroke { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.vol-row svg .stroke { stroke: var(--muted); }

/* dB meter */
.gauge { position: relative; width: min(100%, 280px); margin: 0 auto; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 16; stroke-linecap: round; }
.gauge-track { stroke: var(--teal-tint); }
.gauge-fill { stroke: var(--teal); stroke-dasharray: 282.74; stroke-dashoffset: 282.74; transition: stroke-dashoffset .15s linear, stroke .3s; }
.gauge-center { position: absolute; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; }
.gauge-center output { font-size: 52px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.gauge-center span { font-size: 15px; font-weight: 600; color: var(--muted); }
.levels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.levels span { text-align: center; font-size: 11px; font-weight: 700; letter-spacing: .02em; padding: 5px 2px; border-radius: 8px; color: var(--muted); background: var(--bg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.levels span.on { background: var(--teal); color: #fff; }
.levels span.on[data-level="2"] { background: #e39b3a; }
.levels span.on[data-level="3"] { background: #c9484f; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats div { background: var(--bg); border-radius: 12px; padding: 8px; text-align: center; }
.stats span { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stats strong { font-size: 20px; font-variant-numeric: tabular-nums; }

/* Speaker test */
.speakers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8vh; }
.speaker-card {
  position: relative; background: var(--card); border-radius: 18px; border: 1.5px solid var(--line);
  padding: 44px 10px 18px; display: flex; flex-direction: column; align-items: center; gap: 16px;
  transition: border-color .15s, transform .12s;
}
.speaker-card:active { transform: scale(.98); }
.speaker-card.on { border-color: rgba(23, 142, 150, .55); }
.speaker-card strong { font-size: 15px; }
.badge { position: absolute; top: 12px; inset-inline-start: 12px; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--pill); color: var(--muted); }
.speaker-card.on .badge { background: var(--teal-tint); color: var(--teal-text); }
.check { position: absolute; top: 12px; inset-inline-end: 12px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line); }
.speaker-card.on .check {
  border: 0; background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat;
}
.spk { width: 64px; height: 86px; border-radius: 14px; background: linear-gradient(160deg, #1f5f63, #0e3537); display: grid; place-items: center; box-shadow: 0 6px 14px rgba(0,0,0,.18); }
.spk i { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle, #0b2a2c 30%, #2a7b80 32%, #2a7b80 40%, #0b2a2c 42%); box-shadow: 0 0 0 3px #2a7b80; }
.speaker-card.playing .spk i { animation: thump .22s ease-in-out infinite alternate; }
@keyframes thump { to { transform: scale(1.1); } }
.bottom-stack { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }

.toggle-row { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.row-icon { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--teal-tint); color: var(--teal); }
.row-icon svg { width: 20px; height: 20px; fill: currentColor; }
.row-icon.blue { background: rgba(0, 122, 255, .16); color: #0a84ff; }
.row-icon.orange { background: rgba(255, 149, 0, .18); color: #ff9500; }
.row-icon.gray { background: rgba(142, 142, 147, .2); color: #8e8e93; }
.row-icon.cyan { background: rgba(50, 173, 230, .18); color: #32ade6; }
.row-icon.indigo { background: rgba(88, 86, 214, .18); color: #5856d6; }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-text strong { font-size: 16px; font-weight: 600; }
.row-text small { font-size: 13px; color: var(--muted); }

/* iOS switch */
.switch { appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 51px; height: 31px; border-radius: 999px; background: var(--pill); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.2); transition: transform .2s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(20px); }

/* More */
.promo { background: var(--hero); color: #fff; border-radius: 14px; padding: 18px; display: grid; grid-template-columns: auto 1fr; gap: 12px 14px; align-items: center; }
.promo img { border-radius: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.promo-text { display: flex; flex-direction: column; gap: 2px; }
.promo-text strong { font-size: 18px; }
.promo-text small { font-size: 14px; opacity: .9; }
.promo .white-btn { grid-column: 1 / -1; width: 100%; }
.promo-link { grid-column: 1 / -1; text-align: center; font-weight: 600; font-size: 15px; opacity: .95; }
.group { background: var(--card); border-radius: 14px; overflow: hidden; }
.group-title { margin: 8px 0 -8px; padding-inline-start: 4px; font-size: 15px; font-weight: 600; color: var(--muted); }
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; }
.list-row + .list-row { box-shadow: inset 0 1px 0 var(--line); }
.chev { color: var(--muted); font-size: 22px; line-height: 1; }
[dir="rtl"] .chev { transform: scaleX(-1); display: inline-block; }
select {
  appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: var(--muted);
  font-size: 15px; padding: 6px 18px 6px 4px; text-align: end; cursor: pointer; max-width: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%238a8a8e' stroke-width='1.6' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2px center; background-size: 12px;
}
.faq details { padding: 0 14px; }
.faq details + details { box-shadow: inset 0 1px 0 var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 15px 0; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--teal-text); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 15px; color: var(--muted); font-size: 15px; }

/* Floating tab bar */
.tabbar {
  position: fixed; z-index: 20; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 5px; border-radius: 999px; background: var(--tab-bg);
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
}
.tabbar a { width: 74px; height: 52px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--text); transition: background .15s; }
.tabbar a svg { width: 24px; height: 24px; fill: currentColor; }
.tabbar a .stroke { fill: none; stroke: currentColor; stroke-width: 2; }
.tabbar a span { font-size: 10.5px; font-weight: 700; white-space: nowrap; max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
.tabbar a[aria-current="page"] { background: var(--tab-sel); color: var(--teal); }
.tabbar a[aria-current="page"] svg circle[fill] { fill: var(--tab-sel); }

/* Full-screen cleaner */
.cleaner {
  position: fixed; inset: 0; z-index: 50; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #34a3a9, #178e96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px;
  padding: calc(40px + env(safe-area-inset-top)) 24px calc(30px + env(safe-area-inset-bottom));
}
.cleaner-title { margin: 0; font-size: 30px; font-weight: 700; opacity: .9; text-align: center; }
.dial { position: relative; width: min(66vw, 280px); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .18); display: grid; place-items: center; box-shadow: inset 0 0 40px rgba(255,255,255,.12); }
.dial svg { position: absolute; inset: -10px; width: calc(100% + 20px); height: calc(100% + 20px); transform: rotate(-90deg); }
.dial-arc { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 578.05; stroke-dashoffset: 578.05; transition: stroke-dashoffset .25s linear; }
.dial-num { font-size: clamp(72px, 24vw, 112px); font-weight: 800; color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.cleaner.done .dial-num { color: #fff; }
.cleaner.playing .dial { animation: shake .16s ease-in-out infinite alternate; }
@keyframes shake { to { transform: scale(1.012); } }
.cleaner-desc { margin: 0; max-width: 340px; text-align: center; font-weight: 700; font-size: 18px; line-height: 1.35; min-height: 2.7em; }
.cleaner-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.link-btn { color: #fff; font-weight: 600; opacity: .9; padding: 6px 12px; }
.bubbles i { position: absolute; bottom: -20px; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .5); animation: rise 6s linear infinite; }
.bubbles i:nth-child(1) { left: 12%; animation-delay: 0s; }
.bubbles i:nth-child(2) { left: 28%; width: 6px; height: 6px; animation-delay: 1.2s; animation-duration: 5s; }
.bubbles i:nth-child(3) { left: 44%; width: 14px; height: 14px; animation-delay: 2.5s; animation-duration: 7s; }
.bubbles i:nth-child(4) { left: 61%; animation-delay: .6s; }
.bubbles i:nth-child(5) { left: 76%; width: 7px; height: 7px; animation-delay: 3.1s; animation-duration: 5.5s; }
.bubbles i:nth-child(6) { left: 88%; width: 12px; height: 12px; animation-delay: 1.8s; }
.bubbles i:nth-child(7) { left: 6%; width: 5px; height: 5px; animation-delay: 4s; animation-duration: 4.6s; }
.bubbles i:nth-child(8) { left: 52%; width: 8px; height: 8px; animation-delay: 4.6s; }
.after-promo { width: 100%; max-width: 420px; display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 12px 14px; box-sizing: border-box; border-radius: 16px; background: rgba(255,255,255,.16); color: #fff; text-decoration: none; }
.after-promo[hidden] { display: none; }
.after-promo img { border-radius: 10px; }
.after-promo .promo-text strong { font-size: 16px; }
.after-promo .promo-text small { font-size: 13px; opacity: .9; }
.after-promo-btn { grid-column: 1 / -1; text-align: center; background: #fff; color: #000; font-weight: 700; font-size: 14px; border-radius: 999px; padding: 10px 14px; }
.cleaner:not(.playing) .bubbles i { animation-play-state: paused; opacity: .35; }
@keyframes rise { to { transform: translateY(-110vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bubbles i, .hero-drops i, .cleaner.playing .dial { animation: none; } }

@media (min-width: 700px) {
  .app { padding-top: 24px; }
  .hero-card { min-height: 420px; padding: 24px; }
  .hero-title { font-size: 30px; }
}

/* ---------- Guides (blog) ---------- */
.app.doc { padding-bottom: calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }
.doc-nav { display: flex; align-items: center; justify-content: space-between; padding-top: calc(18px + env(safe-area-inset-top)); }
.doc-nav .back { color: var(--teal-text); font-weight: 600; font-size: 16px; }
.doc-nav .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.doc-nav .brand img { border-radius: 7px; }
.doc-nav .brand.small { color: var(--teal-text); font-weight: 600; }
.doc-head h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.doc-meta { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.answer { background: var(--card); border-radius: 14px; padding: 16px 18px; border-inline-start: 4px solid var(--teal); }
.answer h2 { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--teal-text); }
.answer p { margin: 0; font-size: 17px; line-height: 1.5; font-weight: 500; }
.prose { background: var(--card); border-radius: 14px; padding: 4px 20px 18px; font-size: 17px; line-height: 1.6; }
.prose h2 { font-size: 21px; line-height: 1.25; margin: 22px 0 8px; }
.prose p { margin: 0 0 12px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-inline-start: 22px; }
.prose li { margin: 6px 0; }
.prose a, .footnote a { color: var(--teal-text); text-decoration: underline; text-underline-offset: 2px; }
.cta { margin-top: 4px; }
.posts .list-row { align-items: flex-start; padding: 14px; }
.posts .row-text strong { font-size: 17px; line-height: 1.3; }
.posts .row-text small { margin-top: 4px; line-height: 1.4; }
.posts .chev { margin-top: 2px; }
.guides-link { display: block; text-align: center; color: var(--teal-text); font-size: 15px; font-weight: 600; }
.app.doc .group-title { margin: 6px 0 8px; }
.footnote.langs { line-height: 2; }
.footnote.langs a { color: var(--teal-text); white-space: nowrap; }
[dir="rtl"] .doc-nav .back { display: inline-block; }

/* ================= Desktop / large screens: a regular website layout =================
   Phones keep the app look (floating tab bar). From 900px wide: top navigation bar,
   wider content and two-column pages. */
.site-header { display: none; }

@media (min-width: 900px) {
  body { font-size: 17px; }
  .site-header {
    display: block; position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
    border-bottom: 1px solid var(--line);
  }
  .sh-inner { max-width: 1120px; margin: 0 auto; padding: 0 32px; height: 64px; display: flex; align-items: center; gap: 28px; }
  .sh-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; white-space: nowrap; }
  .sh-brand img { border-radius: 8px; }
  .sh-nav { display: flex; gap: 4px; flex: 1; min-width: 0; }
  .sh-nav a { padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
  .sh-nav a:hover { color: var(--text); background: var(--pill); }
  .sh-nav a[aria-current="page"] { color: var(--teal-text); background: var(--teal-tint); }
  .sh-cta { padding: 9px 18px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; }
  .sh-cta:hover { filter: brightness(1.08); }

  .tabbar { display: none; }
  .app { max-width: 1120px; padding: 0 32px 72px; }
  .page { min-height: 0; gap: 20px; }
  .page-head { padding-top: 48px; }
  .page-head h2 { font-size: 40px; }
  .page-head .icon-btn { display: none; }

  /* Clean: text on the left, the teal card on the right */
  #clean:not([hidden]) {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    column-gap: 64px; row-gap: 20px; align-content: start; padding-top: 24px;
  }
  #clean > * { grid-column: 1; }
  #clean > .hero-card { grid-column: 2; grid-row: 1 / span 6; min-height: 480px; padding: 28px; }
  #clean .page-head h1 { font-size: 64px; letter-spacing: -0.03em; }
  #clean .tagline { margin: 0; font-size: 22px; line-height: 1.35; color: var(--muted); }
  #clean .pills { max-width: 420px; }
  #clean .footnote { text-align: start; font-size: 15px; }
  #clean .guides-link { text-align: start; }
  .hero-title { font-size: 34px; }

  /* HZ & dB: the two tools side by side */
  #hz:not([hidden]) { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
  #hz > .page-head { grid-column: 1 / -1; }
  #hz .card { padding: 24px; }

  /* Test and More: centred, readable width */
  #test, #more { max-width: 760px; margin: 0 auto; }
  .speakers { margin-top: 24px; gap: 16px; }
  .speaker-card { padding: 52px 16px 24px; }
  .spk { width: 80px; height: 106px; }
  .bottom-stack { margin-top: 24px; }

  /* Guides */
  .app.doc { max-width: 820px; padding-bottom: 72px; }
  .doc-nav .brand:not(.small) { display: none; }
  .doc-head h1 { font-size: 44px; }
  .prose { font-size: 18px; padding: 8px 28px 22px; }
  .answer { padding: 20px 24px; }
  .answer p { font-size: 18px; }
}

@media (min-width: 1200px) {
  #clean .page-head h1 { font-size: 72px; }
}
/* Tool landing pages (tone generator, decibel meter) */
.tool-intro { margin: -8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
#hz[data-first="db"] .hz-card { order: 1; }
#hz .tool-info, #hz .tool-links { order: 2; }
.tool-info { background: var(--card); border-radius: 14px; padding: 18px 20px; line-height: 1.55; }
.tool-info h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.25; }
.tool-info h3 { margin: 14px 0 4px; font-size: 16px; }
.tool-info ol { margin: 0; padding-inline-start: 22px; }
.tool-info li { margin: 6px 0; }
.tool-info p { margin: 0; color: var(--muted); }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-links a { padding: 8px 14px; border-radius: 999px; background: var(--card); color: var(--teal-text); font-weight: 600; font-size: 15px; }
@media (min-width: 900px) {
  #hz > .tool-intro, #hz > .tool-info, #hz > .tool-links { grid-column: 1 / -1; }
  #hz .tool-intro { font-size: 19px; max-width: 820px; }
  #hz .page-head h1 { font-size: 48px; }
}
.featured { display: none; }
@media (min-width: 900px) {
  #clean > .featured { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
  .fg-card { background: var(--card); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
  .fg-card:hover { border-color: var(--teal); transform: translateY(-2px); }
  .fg-card strong { font-size: 17px; line-height: 1.3; }
  .fg-card small { color: var(--muted); font-size: 14px; line-height: 1.45; }
}

/* ---------- Home landing (below the water eject tool) ---------- */
.landing { display: flex; flex-direction: column; gap: 28px; margin-top: 28px; }
.l-sec h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; letter-spacing: -0.01em; }
.l-sec > p { margin: 0 0 14px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.l-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.l-steps li { counter-increment: step; background: var(--card); border-radius: 14px; padding: 14px 16px 14px 56px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.l-steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 15px; }
.l-steps strong { font-size: 16px; }
.l-steps span { color: var(--muted); font-size: 15px; line-height: 1.45; }
.l-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.l-tool { background: var(--card); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 4px; color: inherit; text-decoration: none; border: 1px solid transparent; transition: border-color .15s, transform .15s; }
.l-tool:hover { border-color: var(--teal); transform: translateY(-2px); }
.l-ico { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.l-tool strong { font-size: 16px; }
.l-tool small { color: var(--muted); font-size: 14px; line-height: 1.4; }
.l-guides { display: grid; gap: 10px; margin-bottom: 10px; }
.l-guides .fg-card { background: var(--card); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 6px; color: inherit; text-decoration: none; }
.l-guides .fg-card strong { font-size: 16px; line-height: 1.3; }
.l-guides .fg-card small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.l-promo { margin-top: 4px; }

/* ---------- Site footer ---------- */
.site-footer { border-top: 1px solid var(--pill); margin-top: 8px; padding: 32px 20px calc(130px + env(safe-area-inset-bottom)); font-size: 15px; }
.app.doc ~ .site-footer { padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.sf-inner { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px 20px; }
.sf-brand { grid-column: 1 / -1; }
.sf-brand a { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: inherit; text-decoration: none; }
.sf-brand img { border-radius: 8px; }
.sf-brand p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; max-width: 420px; }
.site-footer h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: inherit; text-decoration: none; }
.site-footer ul a:hover { color: var(--teal-text); }
.sf-copy { grid-column: 1 / -1; margin: 8px 0 0; color: var(--muted); font-size: 13px; }

@media (min-width: 900px) {
  #clean > .landing { grid-column: 1 / -1; margin-top: 56px; gap: 48px; }
  .l-sec h2 { font-size: 32px; }
  .l-sec > p { font-size: 18px; max-width: 820px; }
  .l-steps { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .l-tools { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .l-guides { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .l-promo { grid-template-columns: auto 1fr auto; padding: 24px; }
  .l-promo .white-btn { grid-column: auto; width: auto; }
  #clean .page-head h1 { font-size: 52px; }
  .site-footer { padding: 48px 32px; }
  .sf-inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .sf-brand { grid-column: auto; }
}
@media (min-width: 1200px) { #clean .page-head h1 { font-size: 58px; } }
/* Tool landing pages: no full-height layout, content flows after the tool */
.page:has(> .tool-intro) { min-height: 0; }
.page:has(> .tool-intro) .speakers { margin-top: 8px; }
.page:has(> .tool-intro) .bottom-stack { margin-top: 8px; }
