:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --ink: #12201f;
  --muted: #5b6d69;
  --line: #d9e2dd;
  --surface: #ffffff;
  --accent: #0f766e;
  --accent-2: #b45309;
  --soft: #e8f4f1;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #071312;
  --ink: #ecfffb;
  --muted: #a8c5be;
  --line: #1f3b37;
  --surface: #0c1c1a;
  --accent: #2dd4bf;
  --accent-2: #f59e0b;
  --soft: #102a27;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 0 22px;
  background: rgba(244, 247, 244, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
:root[data-theme="dark"] .topbar { background: rgba(7, 19, 18, 0.92); }

.brand, nav { display: flex; align-items: center; gap: 12px; }
.brand { font-weight: 800; }
nav a { color: var(--muted); font-weight: 650; }
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(38vw, 360px);
}
.global-search {
  display: grid;
  gap: 3px;
  flex: 1;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}
.global-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-transform: none;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
}
.search-panel {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 20;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100vw - 28px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 60px rgba(18, 32, 31, 0.18);
}
.search-panel a, .search-panel article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.search-panel span { color: var(--muted); line-height: 1.4; }
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px clamp(18px, 5vw, 72px) 0;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
}
.breadcrumbs a { color: var(--accent); }
.breadcrumbs b { color: var(--line); }

.mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 68px);
  padding: clamp(28px, 6vw, 78px) clamp(18px, 5vw, 72px) 36px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 820px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent-2);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1, h2 { margin: 0; line-height: 1.02; letter-spacing: 0; }
h1 { font-size: clamp(3rem, 8vw, 7rem); max-width: 860px; }
h2 { font-size: clamp(2rem, 5vw, 4rem); }

[hidden] { display: none !important; }

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.65;
}

.home-portal {
  min-height: calc(100vh - 68px);
  padding: clamp(24px, 5vw, 60px);
  background:
    radial-gradient(circle at 20% 20%, rgba(180, 83, 9, 0.18), transparent 28%),
    radial-gradient(circle at 84% 28%, rgba(15, 118, 110, 0.20), transparent 28%),
    linear-gradient(135deg, #fffaf0 0%, #eef6e9 52%, #edf6f7 100%);
}
:root[data-theme="dark"] .home-portal {
  background:
    radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.16), transparent 28%),
    radial-gradient(circle at 84% 28%, rgba(45, 212, 191, 0.18), transparent 28%),
    linear-gradient(135deg, #071312 0%, #0f1f1d 56%, #071a1d 100%);
}
.home-orbit {
  position: relative;
  display: grid;
  place-items: center;
  min-height: calc(100vh - 136px);
  border: 1px solid rgba(18, 32, 31, 0.14);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(18, 32, 31, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(18, 32, 31, 0.05) 1px, transparent 1px),
    rgba(255, 253, 247, 0.66);
  background-size: 44px 44px;
}
.home-core {
  z-index: 1;
  max-width: 780px;
  padding: 28px;
  text-align: center;
}
.home-core .lead { margin-left: auto; margin-right: auto; }
.byline {
  margin: 10px 0 0;
  color: var(--accent);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 850;
}
.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.start-button {
  display: inline-grid;
  place-items: center;
  min-width: min(78vw, 300px);
  min-height: 78px;
  border-radius: 8px;
  background: #12201f;
  color: white;
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  box-shadow: 0 18px 50px rgba(18, 32, 31, 0.24);
}
.portal-button {
  display: inline-grid;
  place-items: center;
  min-height: 54px;
  padding: 0 18px;
  border: 1px solid rgba(18, 32, 31, 0.16);
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.82);
  color: var(--ink);
  font-weight: 850;
  box-shadow: 0 10px 28px rgba(18, 32, 31, 0.08);
}
.help-dot {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-top: 12px;
  padding: 0;
  border: 1px solid rgba(18, 32, 31, 0.16);
  border-radius: 50%;
  background: #fffdf7;
  color: var(--accent-2);
  font-weight: 950;
}
.help-dot::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 5;
  display: none;
  width: min(320px, 82vw);
  left: 0;
  top: calc(100% + 8px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12201f;
  color: white;
  font-size: .9rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
}
.help-dot:hover::after, .help-dot:focus-visible::after { display: block; }
.orbit-note {
  position: absolute;
  max-width: 210px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(18, 32, 31, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-weight: 750;
}
.orbit-note-a { top: 12%; left: 8%; }
.orbit-note-b { top: 18%; right: 8%; }
.orbit-note-c { bottom: 14%; left: 10%; }
.orbit-note-d { right: 12%; bottom: 12%; }
.help-bubble {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(18, 32, 31, 0.16);
  border-radius: 50%;
  background: #fffdf7;
  color: var(--accent-2);
  font-weight: 950;
}
.help-bubble::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  display: none;
  width: min(260px, 78vw);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #12201f;
  color: white;
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
  transform: translateX(-50%);
}
.help-bubble:hover::after, .help-bubble:focus-visible::after { display: block; }
.help-bubble-a { top: 9%; left: 28%; }
.help-bubble-b { top: 34%; right: 18%; }
.help-bubble-c { left: 18%; bottom: 28%; }
.help-bubble-d { right: 31%; bottom: 10%; }
.player-page { background: #f7faf8; min-height: calc(100vh - 68px); }
.player-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.player-card {
  display: grid;
  gap: 12px;
  min-height: 250px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.06);
}
.player-card strong { font-size: 1.2rem; line-height: 1.2; }
.player-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.tools-page {
  min-height: calc(100vh - 68px);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.10), transparent 36%),
    linear-gradient(315deg, rgba(180, 83, 9, 0.10), transparent 42%),
    #fbfdfb;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.tool-card-link { color: inherit; }
.tool-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.06);
}
.tool-card label {
  font-weight: 850;
  color: var(--ink);
}
.tool-card input, .tool-card select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.tool-card input[type="file"] {
  min-height: auto;
  padding: 11px 12px;
}
.tool-card output {
  min-height: 72px;
  padding: 12px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--muted);
  line-height: 1.5;
}
.tool-logo-card {
  align-content: start;
  min-height: 280px;
}
.tool-logo {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 8px;
  background: #12201f;
  color: white;
  font-size: 2.7rem;
  font-weight: 950;
  box-shadow: 0 18px 40px rgba(18, 32, 31, 0.18);
}
.audio-logo {
  background:
    linear-gradient(135deg, #0f766e, #b45309);
}
.tool-logo-card h3 {
  margin: 0;
  font-size: 1.45rem;
}
.tool-logo-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.speed-logo {
  font-size: 1.15rem;
  color: #083344;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(20, 184, 166, 0.20)),
    #ecfeff;
}
.revenue-logo {
  color: #f7fee7;
  background:
    linear-gradient(135deg, rgba(20, 83, 45, 0.92), rgba(15, 118, 110, 0.82)),
    #14532d;
}
.compact-focus-tool {
  margin-top: 18px;
}
.tool-ideas {
  margin-top: 28px;
}
.compact-title {
  margin-bottom: 16px;
}
.compact-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}
.tool-idea-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.tool-idea {
  display: grid;
  gap: 10px;
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.82);
}
.tool-idea strong {
  font-size: 1.05rem;
}
.tool-idea p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}
.tool-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.event-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.event-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.06);
}
.event-card h3 { margin: 0; }
.event-card p { margin: 0; color: var(--muted); line-height: 1.5; }
.course-page {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.07), transparent 34%),
    #f8fbfb;
}
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.lesson-card {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.05);
}
.lesson-card h3 { margin: 10px 0 8px; }
.lesson-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.seo-checklist {
  width: min(980px, 100%);
  margin: 22px auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}
.seo-checklist ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  padding-left: 20px;
}
.reading-page {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 34%),
    #fbfdfb;
}
.reading-article {
  display: grid;
  gap: 16px;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(18, 32, 31, 0.07);
}
.reading-article h3 {
  margin: 8px 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.8rem);
}
.reading-article p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.72;
}
.reading-note {
  padding: 16px;
  border: 1px solid rgba(15, 118, 110, 0.22);
  border-radius: 8px;
  background: #ecfdf5;
  color: #14532d;
  line-height: 1.55;
}
.reading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.utility-page {
  min-height: calc(100vh - 68px);
  background:
    linear-gradient(180deg, rgba(180, 83, 9, 0.06), transparent 32%),
    #f8fbfb;
}
.utility-card {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 3vw, 30px);
}
.utility-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.speed-test-page {
  background:
    linear-gradient(180deg, rgba(14, 165, 233, 0.08), transparent 34%),
    #f8fbfb;
}
.speed-card {
  align-items: center;
  text-align: center;
}
.speed-meter {
  position: relative;
  display: grid;
  place-items: center;
  width: min(300px, 82vw);
  aspect-ratio: 2 / 1;
  margin: 0 auto 8px;
  overflow: hidden;
  border-radius: 300px 300px 12px 12px;
  background:
    radial-gradient(circle at 50% 100%, var(--surface) 0 34%, transparent 35%),
    conic-gradient(from 270deg at 50% 100%, #ef4444 0deg 38deg, #f59e0b 38deg 84deg, #22c55e 84deg 180deg, transparent 180deg 360deg);
  border: 1px solid var(--line);
}
.speed-meter strong {
  position: absolute;
  bottom: 20px;
  font-size: clamp(2.4rem, 8vw, 4.4rem);
  line-height: 1;
  color: var(--ink);
}
.speed-meter small {
  position: absolute;
  bottom: 4px;
  color: var(--muted);
  font-weight: 800;
}
.speed-needle {
  position: absolute;
  bottom: 0;
  width: 44%;
  height: 4px;
  transform-origin: right center;
  transform: rotate(-90deg);
  background: #083344;
  border-radius: 999px;
  transition: transform 220ms ease;
}
.speed-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.speed-stats article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.speed-stats span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}
.speed-stats strong {
  font-size: 1.05rem;
}
.secondary-button {
  background: #f8fafc;
  color: var(--ink);
  border: 1px solid var(--line);
}
.speed-details {
  width: 100%;
  display: grid;
  gap: 12px;
  text-align: left;
}
.speed-details h3 {
  margin: 4px 0 0;
}
.speed-identity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.speed-identity-grid article {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}
.speed-identity-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
}
.speed-identity-grid strong {
  overflow-wrap: anywhere;
  font-size: 0.88rem;
}
.speed-details pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #082f2f;
  color: #e6fffb;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.revenue-card output {
  display: block;
  margin-top: 10px;
  font-weight: 850;
}
.revenue-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.revenue-results article {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8faf9;
}
.revenue-results span {
  color: var(--muted);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}
.revenue-results strong {
  color: #14532d;
  font-size: clamp(1.1rem, 2vw, 1.55rem);
}
.revenue-results small {
  color: var(--muted);
  line-height: 1.35;
}
.revenue-playbook {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.related-links {
  display: grid;
  gap: 10px;
  padding: 20px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.related-links div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.related-links a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 800;
}
textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
  background: white;
}
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] input,
:root[data-theme="dark"] .tool-card input,
:root[data-theme="dark"] .tool-card select {
  background: #071312;
  color: var(--ink);
}
.preview-canvas {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.qr-box {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: white;
}
.converter-row {
  display: grid;
  grid-template-columns: minmax(110px, 0.42fr) minmax(160px, 1fr);
  gap: 10px;
  align-items: end;
}
.audio-tool .button[hidden] { display: none !important; }
.audio-tool .button { text-align: center; }
.audio-converter-page {
  min-height: calc(100vh - 68px);
  padding-left: clamp(18px, 4vw, 56px);
  padding-right: clamp(18px, 4vw, 56px);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08), transparent 36%),
    #f8fbfb;
}
.audio-title {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.audio-tool-layout {
  display: grid;
  grid-template-columns: minmax(150px, 0.42fr) minmax(420px, 1.35fr) minmax(150px, 0.42fr);
  gap: clamp(14px, 2vw, 24px);
  align-items: stretch;
  width: min(1180px, 100%);
  margin: 0 auto;
}
.audio-tool-layout .ad-slot {
  margin: 0;
}
.audio-tool {
  min-height: 380px;
  justify-content: center;
  padding: clamp(20px, 3vw, 34px);
}
.audio-side-ad {
  min-height: 380px;
}
.audio-ad {
  width: min(1180px, 100%);
  margin: 18px auto;
}
.audio-info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: min(1180px, 100%);
  margin: 18px auto 0;
}
.ad-slot-inline {
  margin-bottom: 16px;
}
.hidden-story-key {
  position: fixed;
  right: 7px;
  bottom: 7px;
  z-index: 9;
  display: grid;
  place-items: center;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border-radius: 50%;
  color: transparent;
  background: rgba(18, 32, 31, 0.28);
}
.hidden-story-key:hover, .hidden-story-key:focus-visible {
  width: 18px;
  height: 18px;
  color: white;
  background: var(--accent-2);
}
.manual-page { background: #eef6e9; min-height: calc(100vh - 68px); }
.story-page {
  min-height: calc(100vh - 68px);
  background:
    radial-gradient(circle at 12% 22%, rgba(180, 83, 9, 0.18), transparent 30%),
    linear-gradient(145deg, #fffdf7, #eef6e9);
}
.story-stage {
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(20px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 50px rgba(18, 32, 31, 0.10);
}
.story-stage h2 { font-size: clamp(2rem, 6vw, 4.5rem); }
.story-stage p { margin: 0; color: var(--muted); font-size: 1.08rem; line-height: 1.7; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.button, button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 750;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.button.primary { background: var(--accent); color: white; border-color: var(--accent); }
.button.ghost { background: transparent; }

.signal-panel, .tool-card, .module-card, .book-card, .app-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.06);
}

.signal-panel {
  align-self: end;
  padding: 24px;
  min-height: 260px;
}

.status-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.ad-slot {
  margin: 0 clamp(18px, 5vw, 72px);
  min-height: 92px;
  padding: 16px;
  border: 1px dashed #9ca3af;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  text-align: center;
}
.ad-slot[data-ads-ready="true"] {
  display: block;
  border-style: solid;
  background: rgba(255, 255, 255, 0.72);
}
.ad-slot[data-ads-ready="auto"] {
  display: none;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
}
.ad-slot[data-ads-ready="false"],
.ad-slot:empty {
  display: none;
}
.ad-slot-home {
  margin-top: -74px;
  margin-bottom: 18px;
}
.ad-slot-home[data-ads-ready="auto"] {
  min-height: 54px;
  opacity: 0.46;
}
.ad-slot-native { margin-top: 24px; margin-bottom: 24px; }

.section {
  padding: 76px clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--line);
}

.section-title { position: relative; max-width: 780px; margin-bottom: 26px; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.module-card { min-height: 220px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; }
.module-card p { color: var(--muted); line-height: 1.5; }
.library-band { background: #eef6e9; }
.book-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.book-card { overflow: hidden; min-height: 360px; display: flex; flex-direction: column; }
.book-cover {
  display: grid;
  place-items: center;
  min-height: 230px;
  padding: 16px;
  background: linear-gradient(145deg, #0f766e, #164e63);
  color: white;
  text-align: center;
  font-weight: 850;
}
.book-cover img { width: 100%; height: 230px; object-fit: cover; border-radius: 0; }
.book-body { padding: 14px; display: flex; flex: 1; flex-direction: column; gap: 8px; }
.book-body h3 { margin: 0; font-size: 1rem; line-height: 1.2; }
.book-body p { margin: 0; color: var(--muted); line-height: 1.4; }
.book-actions { margin-top: auto; display: flex; gap: 8px; }
.book-detail-grid { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.detail-cover { min-height: 420px; }
.pdf-reader { width: 100%; min-height: 78vh; margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.mini-list { display: grid; gap: 12px; margin-top: 12px; }
.mini-list-item { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.72); }
.mini-list-item p { margin: 0; color: var(--muted); line-height: 1.45; }
.download-landing { min-height: calc(100vh - 68px); }
.ad-grid { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(280px, 1.3fr) minmax(160px, .7fr); gap: 16px; align-items: stretch; }
.download-focus { display: grid; place-items: center; min-height: 360px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.policy-page { background: #f8fbfb; }
.policy-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.app-band { background: #f7faf8; }
.app-panel { padding: 22px; align-self: stretch; }
.app-panel span { display: inline-flex; margin-top: 16px; color: var(--accent); font-weight: 850; }
.puzzle-band { background: #f4f1e8; }
.fragment-stage {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf7;
}
.fragment-stage[hidden] { display: none; }
.fragment-stage h3 { margin: 0; font-size: 1.55rem; line-height: 1.15; }
.fragment-stage p { margin: 0; color: var(--muted); line-height: 1.55; }
.fragment-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.puzzle-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.puzzle-card {
  display: grid;
  gap: 10px;
  min-height: 190px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(18, 32, 31, 0.06);
}
.puzzle-card strong { font-size: 1.05rem; line-height: 1.2; }
.puzzle-card p { margin: 0; color: var(--muted); line-height: 1.45; }
.puzzle-code { color: var(--accent-2); font-size: 0.78rem; font-weight: 850; letter-spacing: 0; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 420px); gap: 28px; align-items: start; }
.tool-card { padding: 18px; display: grid; gap: 10px; }
label { font-weight: 750; }
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}
output { color: var(--muted); line-height: 1.45; }

.offline, .soft-band { background: var(--soft); }
.offline ul { display: grid; gap: 10px; padding-left: 20px; max-width: 820px; }
.download-link[aria-disabled="true"] {
  opacity: 0.68;
  pointer-events: none;
}
.meta-pill {
  display: inline-flex;
  width: fit-content;
  border-radius: 8px;
  padding: 6px 9px;
  background: var(--soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 28px clamp(18px, 5vw, 72px);
  color: var(--muted);
}

@media (max-width: 860px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 14px 18px; }
  nav { width: 100%; justify-content: space-between; }
  .top-actions { width: 100%; min-width: 0; }
  .search-panel { top: 132px; right: 14px; }
  .hero, .split { grid-template-columns: 1fr; min-height: auto; }
  .home-orbit { min-height: 680px; }
  .orbit-note { position: static; margin: 8px; justify-self: stretch; }
  .help-bubble { position: static; margin: 6px; }
  .home-core { order: -1; }
  .module-grid { grid-template-columns: 1fr; }
  .policy-grid { grid-template-columns: 1fr; }
  .player-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .tool-idea-grid { grid-template-columns: 1fr; }
  .tool-hub-grid { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .lesson-grid { grid-template-columns: 1fr; }
  .seo-checklist ul { grid-template-columns: 1fr; }
  .utility-row { grid-template-columns: 1fr; }
  .speed-stats { grid-template-columns: 1fr 1fr; }
  .speed-identity-grid { grid-template-columns: 1fr; }
  .revenue-results { grid-template-columns: 1fr; }
  .revenue-playbook { grid-template-columns: 1fr; }
  .book-detail-grid, .ad-grid { grid-template-columns: 1fr; }
  .audio-tool-layout { grid-template-columns: 1fr; }
  .audio-info-grid { grid-template-columns: 1fr; }
  .audio-side-ad { min-height: 120px; }
  .puzzle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  footer { flex-direction: column; }
}

@media (max-width: 560px) {
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  nav a { padding: 9px; border: 1px solid var(--line); border-radius: 8px; text-align: center; }
  .breadcrumbs { font-size: .8rem; }
  .book-grid { grid-template-columns: 1fr; }
  .puzzle-grid { grid-template-columns: 1fr; }
  .converter-row { grid-template-columns: 1fr; }
}
