/* ==========================================================================
   cpo.se – Design System & Stylesheet
   ========================================================================== */

:root {
  --bg-page: #f7f6f2;
  --bg-surface: #ffffff;
  --bg-subtle: #eff2f6;
  --bg-dark: #09121f;
  --bg-dark-elevated: #111e33;
  --bg-dark-card: rgba(255, 255, 255, 0.05);

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --text-on-dark: #f8fafc;
  --text-on-dark-muted: #cbd5e1;

  --accent: #059669;
  --accent-bright: #10b981;
  --accent-light: #34d399;
  --accent-soft: #ecfdf5;
  --accent-border: #a7f3d0;

  --warn: #d97706;
  --warn-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;

  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-dark: rgba(255, 255, 255, 0.12);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 30px -10px rgba(15, 23, 42, 0.08), 0 4px 10px -4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 24px 50px -15px rgba(9, 18, 31, 0.2);

  --font-sans: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --container: 1180px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-main);
  background-color: var(--bg-page);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

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

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

a:hover {
  color: #047857;
}

h1, h2, h3, h4 {
  margin: 0 0 0.6em;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text-main);
  font-weight: 800;
}

p {
  margin: 0 0 1rem;
}

ul, ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 1000;
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(9, 18, 31, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-dark);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-on-dark);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--text-on-dark);
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
}

.brand-sub {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--accent-light);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 10px;
  margin-left: 2px;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-desktop a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-desktop a.nav-cta {
  margin-left: 6px;
  background: var(--accent);
  color: #ffffff;
  padding: 8px 14px;
}

.nav-desktop a.nav-cta:hover {
  background: var(--accent-bright);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-dark);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

.nav-mobile {
  display: none;
  background: #0b1627;
  border-bottom: 1px solid var(--border-dark);
  padding: 12px 24px 20px;
}

.nav-mobile.open {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.nav-mobile a {
  color: var(--text-on-dark-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.94rem;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
}

.nav-mobile a.nav-cta {
  grid-column: 1 / -1;
  background: var(--accent);
  color: #fff;
  text-align: center;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  background:
    radial-gradient(820px 520px at 82% 18%, rgba(16, 185, 129, 0.18), transparent 70%),
    radial-gradient(640px 420px at 10% 85%, rgba(14, 116, 144, 0.18), transparent 70%),
    linear-gradient(160deg, #070e19 0%, #0b1627 55%, #0c212b 100%);
  color: var(--text-on-dark);
  padding: 64px 0 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 20px;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.25);
}

.hero h1 {
  color: #ffffff;
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1.09;
  margin-bottom: 18px;
}

.hero h1 .hl {
  color: var(--accent-light);
}

.hero-lead {
  font-size: 1.12rem;
  line-height: 1.6;
  color: var(--text-on-dark-muted);
  margin-bottom: 28px;
  max-width: 58ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.96rem;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent-bright);
  color: #042218;
}

.btn-primary:hover {
  background: var(--accent-light);
  color: #042218;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  color: #f8fafc;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.btn-outline-dark {
  background: #ffffff;
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-outline-dark:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.hero-fact {
  background: var(--bg-dark-card);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.hero-fact-label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-light);
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-fact-val {
  font-size: 0.92rem;
  font-weight: 600;
  color: #e2e8f0;
  line-height: 1.35;
}

.hero-visual {
  position: relative;
}

.hero-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #08101c;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
}

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

.hero-frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(15, 25, 43, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-metric-pill {
  display: flex;
  flex-direction: column;
}

.hero-metric-pill span {
  font-size: 0.74rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-metric-pill strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #ffffff;
}

.hero-metric-pill strong.green {
  color: var(--accent-light);
}

.tag-exempel {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  background: rgba(52, 211, 153, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

.tag-exempel-light {
  background: var(--accent-soft);
  color: #065f46;
  border-color: var(--accent-border);
}

/* ==========================================================================
   Generic Section Rhythm
   ========================================================================== */
.section {
  padding: 76px 0;
}

.section-white {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}

.section-dark h2,
.section-dark h3 {
  color: #ffffff;
}

.section-dark p {
  color: var(--text-on-dark-muted);
}

.section-head {
  max-width: 720px;
  margin-bottom: 42px;
}

.section-kicker {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-dark .section-kicker {
  color: var(--accent-light);
}

.section-head h2 {
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  margin-bottom: 12px;
}

.section-lead {
  font-size: 1.06rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ==========================================================================
   Split Content & Visual Cards
   ========================================================================== */
.split-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 44px;
  align-items: center;
}

.split-grid.reverse .media-card {
  order: -1;
}

.media-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.media-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.media-caption {
  padding: 14px 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: #fbfcfd;
}

.callout {
  margin-top: 22px;
  padding: 20px 22px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}

.callout h3 {
  font-size: 1.04rem;
  color: #064e3b;
  margin-bottom: 6px;
}

.callout p {
  margin: 0;
  color: #065f46;
  font-size: 0.95rem;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 12px;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-muted);
}

.check-list li strong {
  color: var(--text-main);
}

.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Formula & Examples
   ========================================================================== */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 36px;
}

.formula-box {
  background: var(--bg-dark);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-md);
}

.formula-box-label {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-light);
  margin-bottom: 10px;
}

.formula-math {
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 1.8vw, 1.32rem);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  color: #ecfdf5;
}

.formula-box p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-on-dark-muted);
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.example-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.example-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.example-card h3 {
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.example-rows {
  margin: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.example-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
}

.example-row strong {
  font-family: var(--font-mono);
  color: var(--text-main);
}

.example-result {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
}

/* ==========================================================================
   Interactive CPO Calculator
   ========================================================================== */
.calc-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.calc-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 18px 28px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.calc-presets-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 4px;
}

.preset-btn {
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-btn:hover,
.preset-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #065f46;
}

.calc-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.calc-inputs {
  padding: 30px 28px;
  display: grid;
  gap: 18px;
  border-right: 1px solid var(--border);
}

.field-group {
  display: grid;
  gap: 6px;
}

.field-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.field-group label {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.field-hint {
  font-size: 0.78rem;
  color: var(--text-light);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 600;
  padding: 11px 56px 11px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: #ffffff;
  color: var(--text-main);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-wrap input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.input-unit {
  position: absolute;
  right: 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-light);
  pointer-events: none;
}

.calc-outputs {
  padding: 30px 28px;
  background: linear-gradient(180deg, #0b1423 0%, #0f1d32 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.calc-kpi-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.calc-kpi-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 18px;
}

.calc-kpi-box.primary {
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(16, 185, 129, 0.1);
}

.calc-kpi-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 6px;
}

.calc-kpi-value {
  font-family: var(--font-mono);
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.calc-kpi-box.primary .calc-kpi-value {
  color: var(--accent-light);
}

.calc-subgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.calc-mini {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.calc-mini span {
  display: block;
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 3px;
}

.calc-mini strong {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  color: #f8fafc;
}

.calc-meter-wrap {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 16px 18px;
}

.calc-meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-badge.good {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

.status-badge.warn {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.status-badge.bad {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
}

.meter-track {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  margin-bottom: 10px;
}

.meter-fill {
  height: 100%;
  width: 50%;
  border-radius: var(--radius-full);
  background: var(--accent-bright);
  transition: width 0.25s ease, background-color 0.25s ease;
}

.calc-verdict {
  margin: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ==========================================================================
   Comparison Table (CPO vs CPA/CPC/CPM/CPL/ROAS)
   ========================================================================== */
.table-scroll {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.kpi-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  text-align: left;
}

.kpi-table th,
.kpi-table td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  font-size: 0.93rem;
}

.kpi-table thead th {
  background: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 800;
}

.kpi-table tbody tr:last-child td {
  border-bottom: none;
}

.kpi-table tbody tr.row-highlight {
  background: #f0fdf7;
}

.kpi-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.85rem;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--bg-subtle);
  color: var(--text-main);
}

.row-highlight .kpi-badge {
  background: var(--accent);
  color: #ffffff;
}

.vs-cards {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

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

.info-card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.info-card p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Channels Grid & Filter
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-pill {
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--bg-dark);
  border-color: var(--bg-dark);
  color: #ffffff;
}

.channels-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.channel-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.channel-card.is-hidden {
  display: none;
}

.channel-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.channel-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.channel-tag {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.channel-meta {
  display: grid;
  gap: 8px;
  font-size: 0.91rem;
  color: var(--text-muted);
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.channel-meta strong {
  color: var(--text-main);
}

/* ==========================================================================
   Optimization Tips Grid
   ========================================================================== */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.tip-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.tip-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.88rem;
  margin-bottom: 14px;
}

.tip-card h3 {
  font-size: 1.03rem;
  margin-bottom: 8px;
}

.tip-card p {
  margin: 0;
  font-size: 0.91rem;
  color: var(--text-muted);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-list {
  display: grid;
  gap: 12px;
  max-width: 880px;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  list-style: none;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, background-color 0.15s ease;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--accent-soft);
  color: var(--accent);
}

.faq-answer {
  padding: 0 22px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Glossary
   ========================================================================== */
.glossary-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  max-width: 340px;
  font-family: inherit;
  font-size: 0.94rem;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-main);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.glossary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.glossary-card.is-hidden {
  display: none;
}

.glossary-term {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.glossary-term h3 {
  margin: 0;
  font-size: 1.05rem;
}

.glossary-cat {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
}

.glossary-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.glossary-empty {
  display: none;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  text-align: center;
}

/* ==========================================================================
   Contact / CTA & Footer
   ========================================================================== */
.cta-panel {
  background: linear-gradient(135deg, #0b1423 0%, #0f2534 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 40px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  box-shadow: var(--shadow-lg);
}

.cta-panel h2 {
  color: #ffffff;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
}

.cta-panel p {
  color: var(--text-on-dark-muted);
}

.contact-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(110, 231, 183, 0.35);
  border-radius: var(--radius-md);
  padding: 24px;
}

.contact-kicker {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6ee7b7;
  margin-bottom: 12px;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
  color: #e2e8f0;
}

.contact-list a {
  color: #6ee7b7;
  font-weight: 700;
  text-decoration: none;
}

.contact-list a:hover {
  color: #a7f3d0;
  text-decoration: underline;
}

.site-footer {
  background: #070d17;
  color: #94a3b8;
  padding: 44px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

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

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 1040px) {
  .nav-desktop {
    display: none;
  }
  .menu-toggle {
    display: inline-flex;
  }
  .hero-grid,
  .split-grid,
  .calc-body,
  .cta-panel {
    grid-template-columns: 1fr;
  }
  .split-grid.reverse .media-card {
    order: 0;
  }
  .calc-inputs {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .examples-grid,
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .container {
    padding: 0 18px;
  }
  .section {
    padding: 54px 0;
  }
  .hero {
    padding: 42px 0 50px;
  }
  .brand-sub {
    display: none;
  }
  .hero-facts,
  .formula-grid,
  .examples-grid,
  .vs-cards,
  .channels-grid,
  .tips-grid,
  .glossary-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .calc-kpi-hero,
  .calc-subgrid {
    grid-template-columns: 1fr;
  }
  .calc-presets,
  .calc-inputs,
  .calc-outputs,
  .cta-panel {
    padding: 22px 18px;
  }
  .hero-frame-bar {
    flex-wrap: wrap;
  }
}

.hero-grid > *,
.split-grid > *,
.formula-grid > *,
.examples-grid > *,
.channels-grid > *,
.tips-grid > *,
.glossary-grid > *,
.cta-panel > * {
  min-width: 0;
}
