:root {
  --bg: #F4F7F6;
  --surface: #FFFFFF;
  --surface-alt: #E8F0EE;
  --stage: #0F1E24;
  --stage-card: #172B33;
  --ink: #102026;
  --muted: #475E66;
  --stage-ink: #F0F7F6;
  --stage-muted: #A8C2C0;
  --border: #CBDAD7;
  --accent: #0F766E;
  --accent-hover: #115E59;
  --signal: #B45309;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 32, 38, 0.06);
  --shadow-md: 0 8px 24px rgba(16, 32, 38, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--accent-hover);
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navigation */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.brand-link:hover {
  color: var(--accent);
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--stage);
  color: var(--stage-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: var(--surface-alt);
  color: var(--accent);
}

.nav-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* Reserved Golden Ad Slots (0 height when empty) */
.gfs-ad-slot:empty,
.gfs-ad-slot-wrap:empty {
  display: none;
}

.gfs-ad-slot {
  margin: 16px auto;
}

.gfs-ad-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  text-align: center;
}

/* Breadcrumbs & Page Head */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}

.breadcrumbs a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumbs a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.page-head {
  padding-top: 24px;
  padding-bottom: 16px;
}

.eyebrow-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  color: var(--ink);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
}

.badge-accent {
  background: var(--accent);
  color: var(--surface);
  border-color: var(--accent);
}

h1, h2, h3 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.2;
  color: var(--ink);
  margin-top: 0;
}

h1 {
  font-size: 36px;
  margin-bottom: 12px;
}

h2 {
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 16px;
}

h3 {
  font-size: 22px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.page-lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 70ch;
  margin: 0;
}

/* Interactive Tool Stage (Signature Acoustic Studio Block) */
.tool-shell {
  background: var(--stage);
  color: var(--stage-ink);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}

.stage-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--stage-card);
}

.stage-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--stage-ink);
  margin: 0;
}

.duplex-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--stage-muted);
}

.wave-bars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 16px;
}

.wave-bars span {
  width: 4px;
  border-radius: 4px;
  background: var(--accent);
  display: inline-block;
}

.wave-bars span:nth-child(1) { height: 8px; }
.wave-bars span:nth-child(2) { height: 16px; }
.wave-bars span:nth-child(3) { height: 12px; }
.wave-bars span:nth-child(4) { height: 14px; }

.tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.tool-tab {
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--stage-card);
  color: var(--stage-ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tool-tab[aria-selected="true"],
.tool-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.tool-panel {
  background: var(--stage-card);
  border-radius: var(--radius-sm);
  padding: 24px;
}

.tool-panel[hidden] {
  display: none;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.field-group {
  margin-bottom: 16px;
}

.field-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--stage-ink);
  margin-bottom: 8px;
}

.field-control {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 16px;
  font-family: inherit;
}

.range-control {
  width: 100%;
  accent-color: var(--accent);
  min-height: 32px;
  cursor: pointer;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  font-size: 14px;
  color: var(--stage-ink);
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--surface);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--surface);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.result-box {
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border);
}

.result-status {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-alt);
  color: var(--accent);
  margin-bottom: 12px;
}

.result-status.is-warn {
  color: var(--signal);
}

.result-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

.result-list {
  margin: 12px 0 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--ink);
}

.result-list li {
  margin-bottom: 8px;
}

.latency-bar-group {
  margin-top: 12px;
}

.latency-track-label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}

.latency-track {
  height: 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 12px;
}

.latency-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-sm);
}

.latency-fill.is-slow {
  background: var(--signal);
}

.script-output {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 14px;
  color: var(--ink);
  white-space: pre-wrap;
  margin: 12px 0;
}

.tool-note {
  font-size: 12px;
  color: var(--stage-muted);
  margin: 12px 0 0;
}

/* Split Visual + Key Specs Block */
.overview-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  margin: 32px 0 48px;
}

.visual-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 0;
}

.visual-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.visual-caption {
  padding: 12px 16px;
  font-size: 14px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.specs-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.specs-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}

.specs-dl {
  margin: 0;
}

.specs-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--surface-alt);
  font-size: 14px;
}

.specs-row:last-child {
  border-bottom: none;
}

.specs-row dt {
  color: var(--muted);
  font-weight: 600;
}

.specs-row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
  color: var(--ink);
}

/* Editorial Prose Section */
.prose-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
  max-width: 100%;
  overflow-x: hidden;
}

.prose {
  min-width: 0;
  max-width: 100%;
}

.prose p,
.prose li {
  max-width: 70ch;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
}

.prose p {
  margin: 0 0 16px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h2 + p {
  background: var(--bg);
  border-left: 4px solid var(--accent);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.prose ul,
.prose ol {
  padding-left: 24px;
  margin: 0 0 24px;
}

.prose li {
  margin-bottom: 8px;
}

.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}

.prose table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-collapse: collapse;
  font-size: 14px;
}

.prose th,
.prose td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.prose th {
  background: var(--surface-alt);
  font-weight: 600;
  color: var(--ink);
}

/* Related Hub-and-Spoke Grid */
.related-section {
  margin-bottom: 48px;
}

.section-heading {
  margin-top: 0;
  margin-bottom: 24px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.related-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  border-color: var(--accent);
}

.related-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.related-card-body {
  padding: 16px 24px;
}

.related-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 8px;
}

.related-card-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 48px;
}

.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
}

.faq-q {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}

.faq-a {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
  max-width: 70ch;
}

/* Engagement (Like, Share, Comments) */
.engage-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}

.engage-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--surface-alt);
}

.engage-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.engage-btn[aria-pressed="true"],
.engage-btn[data-gf-liked] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.share-msg {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.comments-list[data-gf-empty]::before {
  content: "Have a question about latency, regional access, or camera setup? Leave a verified note below.";
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.comment-item {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.comment-item[data-gf-owner] {
  border-left: 4px solid var(--accent);
}

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.comment-author {
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
}

.owner-tag {
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--surface);
  font-size: 12px;
}

.comment-body {
  margin: 4px 0 8px;
  font-size: 14px;
  color: var(--ink);
}

.comment-reply-btn {
  min-height: 32px;
  padding: 4px 12px;
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--ink);
  cursor: pointer;
}

.comment-replies {
  margin-top: 8px;
  padding-left: 16px;
  border-left: 2px solid var(--border);
}

.comment-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.comment-form-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
}

.comment-input {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  background: var(--bg);
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.footer-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--ink);
}

.footer-note {
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 12px;
  max-width: 52ch;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.footer-bottom {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-alt);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 820px) {
  .overview-split,
  .tool-grid,
  .related-grid,
  .footer-grid,
  .comment-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 22px;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 64px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: var(--shadow-md);
  }

  .site-nav.is-open {
    display: flex;
  }

  .tool-shell,
  .tool-panel,
  .prose-section {
    padding: 16px;
  }

  .btn-primary,
  .btn-outline {
    width: 100%;
  }
}
