:root {
  --bg: #0b111b;
  --bg-elevated: #0f1726;
  --card: #121b2b;
  --card-2: #172338;
  --text: #e6edf7;
  --heading: #f8fafc;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --safe: #2dd4bf;
  --warn: #facc15;
  --danger: #fb7185;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(56, 189, 248, 0.34);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 42px rgba(2, 8, 20, 0.42);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 50% -180px, rgba(56, 189, 248, 0.11), transparent 60%), var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }

/* Backward-compatible narrow container for privacy/terms/support */
.wrap { max-width: 780px; margin: 0 auto; padding: 28px 20px 64px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 17, 27, 0.84);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--safe));
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.65);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}
.site-nav a:hover, .site-nav a.active { color: var(--heading); text-decoration: none; }
.site-nav a.active { color: var(--accent); font-weight: 600; }

.lang-menu { position: relative; }
.lang-switch {
  list-style: none;
  cursor: pointer;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--heading);
  font-size: 0.82rem;
  font-weight: 600;
  user-select: none;
}
.lang-switch::-webkit-details-marker { display: none; }
.lang-switch:hover { border-color: var(--accent); color: var(--accent); }
.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 132px;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 2px;
  z-index: 60;
}
.lang-dropdown a {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text);
}
.lang-dropdown a:hover, .lang-dropdown a.active {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 15px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--safe));
  color: #05131f !important;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.22);
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-cta:hover { transform: translateY(-1px); opacity: 0.94; }

/* Legacy header/footer inside .wrap pages */
.wrap header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; padding-bottom: 24px; border-bottom: 1px solid var(--border);
}
.wrap nav { display: flex; gap: 18px; flex-wrap: wrap; }
.wrap nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; font-weight: 500; }
.wrap nav a:hover, .wrap nav a.active { color: var(--accent); }
.wrap footer {
  margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--muted); font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}

/* Typography */
main { padding: 28px 0 56px; }
h1 {
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.025em;
  color: var(--heading);
}
h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.25;
  margin: 0 0 12px;
  letter-spacing: -0.015em;
  color: var(--heading);
}
h3 { font-size: 1.06rem; margin: 0 0 8px; color: var(--heading); }
p, li { color: #cbd5e1; }
ul { padding-left: 20px; }
li { margin-bottom: 6px; }
.lead { font-size: 1.06rem; color: var(--muted); max-width: 720px; margin: 0 0 22px; }
.meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 24px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Breadcrumbs & Badges */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.22);
}
.pill.safe { background: rgba(45, 212, 191, 0.14); color: var(--safe); border-color: rgba(45, 212, 191, 0.26); }
.pill.warn { background: rgba(250, 204, 21, 0.14); color: var(--warn); border-color: rgba(250, 204, 21, 0.28); }
.pill.danger { background: rgba(251, 113, 133, 0.15); color: var(--danger); border-color: rgba(251, 113, 133, 0.30); }

/* Cards & Buttons */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 18px 0;
}
.cta, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent), var(--safe));
  color: #05131f;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.14s ease, opacity 0.14s ease;
}
.cta:hover, .btn-primary:hover { transform: translateY(-1px); opacity: 0.93; text-decoration: none; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 13px;
  background: var(--card-2);
  color: var(--heading);
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover { border-color: var(--border-strong); background: #1c2a42; text-decoration: none; }
.btn-danger {
  background: rgba(251, 113, 133, 0.18);
  color: #fecdd3;
  border: 1px solid rgba(251, 113, 133, 0.4);
}

/* Homepage Online Meter Instrument */
.hero-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.meter-grid {
  display: grid;
  grid-template-columns: 1.02fr 1fr;
  gap: 18px;
  align-items: stretch;
}
.meter-card {
  background: linear-gradient(160deg, #121c2e 0%, #0f1726 100%);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.dial-wrap {
  position: relative;
  width: 240px;
  height: 240px;
  margin: 4px auto 14px;
}
.dial-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial-track { fill: none; stroke: rgba(148, 163, 184, 0.15); stroke-width: 14; }
.dial-progress {
  fill: none;
  stroke: var(--safe);
  stroke-width: 14;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.14s ease-out, stroke 0.2s ease;
}
.dial-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.dial-value {
  font-size: 3.35rem;
  font-weight: 800;
  line-height: 1;
  color: var(--heading);
  letter-spacing: -0.03em;
}
.dial-unit { font-size: 0.86rem; color: var(--muted); margin-top: 6px; font-weight: 600; }
.env-badge {
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--heading);
  margin-bottom: 16px;
}
.env-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--safe); }
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.stat-tile {
  background: rgba(11, 17, 27, 0.55);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 10px 8px;
  text-align: center;
}
.stat-label { font-size: 0.72rem; font-weight: 700; color: var(--muted); letter-spacing: 0.05em; }
.stat-num { font-size: 1.15rem; font-weight: 700; color: var(--heading); margin-top: 2px; }

.meter-right { display: flex; flex-direction: column; gap: 16px; }
.chart-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 18px;
}
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.chart-canvas { width: 100%; height: 112px; display: block; border-radius: 10px; }

.control-dock {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.cal-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.cal-row input[type="range"] { flex: 1; accent-color: var(--accent); }
.meter-status { font-size: 0.84rem; color: var(--muted); margin: 0; }

/* Contextual App Bridge Strip (High-Conversion Hook) */
.app-bridge {
  margin-top: 16px;
  background: rgba(56, 189, 248, 0.07);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 18px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.bridge-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bridge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--heading);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.bridge-btn:hover { border-color: var(--accent); color: var(--accent); }
.bridge-tag {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.16);
  color: var(--accent);
}

/* Modal for Browser-to-App Conversion */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 8, 20, 0.75);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal-box {
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 22px;
  max-width: 480px;
  width: 100%;
  padding: 26px;
  box-shadow: var(--shadow);
}
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.modal-close {
  background: var(--card-2);
  border: 1px solid var(--border);
  color: var(--text);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.1rem;
}

/* Sections & Grids */
.section { margin-top: 44px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* AEO Direct Answer Box */
.answer-box {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.11), rgba(45, 212, 191, 0.06));
  border: 1px solid rgba(56, 189, 248, 0.30);
  border-radius: 18px;
  padding: 20px 22px;
  margin: 18px 0 24px;
}
.answer-box p { margin: 0; font-size: 1.04rem; color: var(--heading); }

/* Scale Meter Bar (0–140 dB) */
.scale-bar {
  position: relative;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2dd4bf 0%, #38bdf8 35%, #facc15 57%, #fb923c 72%, #fb7185 100%);
  margin: 22px 0 10px;
}
.scale-marker {
  position: absolute;
  top: -6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 4px solid var(--bg);
  box-shadow: 0 0 0 3px var(--accent);
  transform: translateX(-50%);
}
.scale-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.data-table th, .data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.data-table th {
  background: var(--card-2);
  color: var(--heading);
  font-weight: 700;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(56, 189, 248, 0.04); }

/* dB Chip Links */
.db-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.db-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 11px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--heading);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.db-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Classroom Monitor */
.classroom-stage {
  border-radius: 24px;
  min-height: 430px;
  padding: 28px;
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #0f766e;
  transition: background-color 0.25s ease;
}
.classroom-stage.warn { background: #b45309; }
.classroom-stage.danger { background: #be123c; }
.classroom-stage.balls-mode { background: #0f172a; }
.classroom-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}
.classroom-stage.balls-mode .classroom-canvas { display: block; }
.classroom-hud { position: relative; z-index: 2; }
.classroom-db {
  font-size: clamp(4rem, 11vw, 7.5rem);
  font-weight: 900;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 6px 24px rgba(0, 0, 0, 0.28);
}
.classroom-msg {
  font-size: clamp(1.25rem, 2.6vw, 1.85rem);
  font-weight: 700;
  color: #ffffff;
  margin-top: 10px;
}

/* Guide Placeholder Notice */
.draft-banner {
  background: rgba(250, 204, 21, 0.10);
  border: 1px dashed rgba(250, 204, 21, 0.42);
  border-radius: 14px;
  padding: 14px 18px;
  margin: 18px 0 24px;
  color: #fef08a;
  font-size: 0.92rem;
}

/* Pre-Footer App Store Conversion Banner */
.app-banner {
  margin-top: 56px;
  background: linear-gradient(135deg, #0e1a2f 0%, #10243b 60%, #0d2b38 100%);
  border: 1px solid rgba(56, 189, 248, 0.30);
  border-radius: 26px;
  padding: 32px;
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 28px;
  align-items: center;
  box-shadow: var(--shadow);
}
.app-banner-points {
  list-style: none;
  padding: 0;
  margin: 16px 0 22px;
  display: grid;
  gap: 8px;
}
.app-banner-points li {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-size: 0.94rem;
  color: #e2e8f0;
}
.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(45, 212, 191, 0.18);
  color: var(--safe);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  flex-shrink: 0;
}
.store-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.app-store-badge {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 11px 20px;
  border-radius: 14px;
  background: #000000;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-decoration: none !important;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.app-store-badge:hover { transform: translateY(-1px); border-color: #ffffff; }
.app-store-badge small { display: block; font-size: 0.68rem; line-height: 1; opacity: 0.85; }
.app-store-badge strong { display: block; font-size: 1.06rem; line-height: 1.15; letter-spacing: -0.01em; }

.app-preview-card {
  background: rgba(8, 14, 24, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 20px;
  padding: 20px;
}
.app-preview-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.app-preview-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.app-preview-num { font-size: 2.35rem; font-weight: 800; color: #ffffff; line-height: 1; }
.app-preview-bars {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 46px;
}
.app-preview-bars span {
  flex: 1;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--safe), var(--accent));
}

/* Global Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #080d16;
  padding: 46px 0 36px;
  margin-top: 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}
.footer-col h4 {
  margin: 0 0 12px;
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--heading);
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; font-size: 0.9rem; }
.footer-col a { color: var(--muted); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--muted);
}

/* FAQ Accordion */
details.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 15px 18px;
  margin-bottom: 10px;
}
details.faq-item summary {
  font-weight: 600;
  color: var(--heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
details.faq-item summary::after { content: "+"; color: var(--accent); font-size: 1.2rem; }
details.faq-item[open] summary::after { content: "−"; }
details.faq-item p { margin: 10px 0 0; font-size: 0.94rem; }

/* Utility & Preview Classes (Zero inline styles for strict CSP) */
.m-0 { margin: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.mb-28 { margin-bottom: 28px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-14 { margin-top: 14px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-24 { margin-top: 24px !important; }
.cal-val { min-width: 56px; text-align: right; color: var(--heading); }
.warn-val { min-width: 48px; color: var(--warn); font-weight: 700; }
.danger-val { min-width: 48px; color: var(--danger); font-weight: 700; }
.heading-text { color: var(--heading); }
.sub-block { color: var(--muted); font-size: 0.9rem; display: block; }
.card-p { margin-bottom: 0; font-size: 0.92rem; }
.btn-group { display: flex; gap: 10px; flex-wrap: wrap; }
.prev-next { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.guide-card { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.guide-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.guide-link { font-weight: 600; font-size: 0.9rem; }
.footer-desc { font-size: 0.88rem; margin: 12px 0 16px; }
.two-col-list { columns: 2; column-gap: 16px; }
.app-preview-unit { font-size: 1rem; color: var(--muted); }
.app-preview-alert { font-size: 0.82rem; color: var(--warn); font-weight: 600; margin-top: 4px; }
.app-preview-stats { text-align: right; font-size: 0.78rem; color: var(--muted); }
.app-preview-foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: 0.76rem; color: var(--muted); }
.is-hidden { display: none !important; }

/* WHO Day/Night Toggle */
.who-toggle {
  display: inline-flex;
  background: rgba(11, 17, 27, 0.75);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}
.who-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.who-btn.active {
  background: rgba(56, 189, 248, 0.22);
  color: var(--heading);
}

/* Moment-of-Proof Exceedance Banner */
.proof-alert {
  margin-top: 16px;
  background: linear-gradient(135deg, rgba(251, 113, 133, 0.14), rgba(250, 204, 21, 0.08));
  border: 1px solid rgba(251, 113, 133, 0.44);
  border-radius: 18px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.proof-alert-title {
  display: block;
  margin-top: 8px;
  color: var(--heading);
  font-size: 1rem;
}

/* Modal Desktop QR Code */
.modal-qr-row {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(11, 17, 27, 0.65);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.modal-qr-box {
  width: 96px;
  height: 96px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
  padding: 4px;
}
.qr-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Printable Noise Complaint Log Sheet */
.log-sheet {
  background: #ffffff;
  color: #0f172a;
  border-radius: 18px;
  padding: 28px 30px;
  margin-top: 18px;
  box-shadow: var(--shadow);
}
.log-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 2px solid #0f172a;
  margin-bottom: 18px;
}
.log-sheet-title { color: #0f172a; margin: 0 0 4px; font-size: 1.45rem; }
.log-sheet-sub { color: #475569; margin: 0; font-size: 0.9rem; }
.log-sheet-meta { font-size: 0.86rem; color: #1e293b; display: grid; gap: 5px; }
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.log-table th, .log-table td {
  border: 1px solid #cbd5e1;
  padding: 9px 10px;
  text-align: left;
  color: #0f172a;
}
.log-table th {
  background: #f1f5f9;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
}
.log-table tr.sample-row td { background: #f8fafc; color: #475569; font-style: italic; }
.log-table tr.blank-row td { height: 34px; }
.col-date { width: 12%; }
.col-time { width: 15%; }
.col-db { width: 15%; }
.col-source { width: 29%; }
.col-impact { width: 29%; }

.log-sheet-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #cbd5e1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.log-sheet-qr {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 460px;
  font-size: 0.8rem;
  color: #334155;
}
.log-sheet-qr p { color: #475569; font-size: 0.78rem; margin-top: 3px; }
.log-sheet-qr .qr-svg { width: 68px; height: 68px; flex-shrink: 0; border: 1px solid #cbd5e1; border-radius: 6px; }
.log-sheet-sign { font-size: 0.84rem; color: #0f172a; display: grid; gap: 8px; }

.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  box-shadow: 0 4px 12px rgba(2, 8, 20, 0.45);
  flex-shrink: 0;
}

.meter-primary-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.meter-primary-actions .btn-primary { flex: 1; min-width: 180px; }

/* Clickable Classroom Threshold Presets */
.preset-row { cursor: pointer; transition: background 0.14s ease; }
.preset-row:hover td { background: rgba(56, 189, 248, 0.08) !important; }
.preset-row.preset-active td { background: rgba(45, 212, 191, 0.10) !important; }
.preset-apply-btn {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-2);
  color: var(--heading);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}
.preset-row.preset-active .preset-apply-btn {
  background: rgba(45, 212, 191, 0.18);
  border-color: rgba(45, 212, 191, 0.45);
  color: var(--safe);
}

/* App Store Screenshot Showcase */
.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.shot-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 10px;
  text-align: center;
}
.shot-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
}
.shot-card figcaption {
  margin-top: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted);
}

/* Online Tone Generator */
.tone-panel { padding: 26px 28px; }
.tone-readout {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

@media (max-width: 860px) {
  .meter-grid, .app-banner, .footer-grid, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .shot-grid { grid-template-columns: repeat(2, 1fr); }
  .app-banner { padding: 24px 20px; }
  .modal-qr-row { display: none; }
}

@media print {
  body { background: #ffffff !important; color: #000000 !important; }
  .no-print { display: none !important; }
  main { padding: 0 !important; }
  .container { max-width: 100% !important; padding: 0 !important; }
  .log-sheet { box-shadow: none !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; }
}
