/* ============================================================
   Frequency Advanced Advertising — Shared Design System
   Migrated from reference CTV Integration Guide theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* ── Design Tokens ────────────────────────────────────────── */
:root {
  /* Brand */
  --freq-cyan:       #00D4FF;
  --freq-cyan-dim:   #00A8CC;
  --freq-cyan-glow:  rgba(0, 212, 255, 0.15);
  --freq-green:      #00E5A0;
  --freq-purple:     #7B5CF6;
  --freq-orange:     #FF6B35;

  /* Surfaces */
  --bg-base:         #070B12;
  --bg-surface:      #0D1117;
  --bg-card:         #121820;
  --bg-card-hover:   #171F2A;
  --bg-elevated:     #1A2234;
  --bg-border:       #1E2A3A;
  --bg-border-light: #253044;

  /* Text */
  --text-primary:    #E8EDF5;
  --text-secondary:  #8B9BB4;
  --text-muted:      #4A5568;
  --text-accent:     #00D4FF;

  /* Typography */
  --font-display:  'Sora', sans-serif;
  --font-body:     'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  /* Spacing */
  --nav-h: 68px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:  cubic-bezier(0.4, 0, 1, 1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--freq-cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(7, 11, 18, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--bg-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  z-index: 1000;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover { text-decoration: none; }

.nav-logo svg { width: 32px; height: 32px; }

.nav-logo-divider {
  width: 1px;
  height: 20px;
  background: var(--bg-border-light);
}

.nav-logo-sub {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
  align-self: center;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
}

.nav-links::-webkit-scrollbar { display: none; }

.nav-links li { flex-shrink: 0; }

.nav-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
  white-space: nowrap;
}

.nav-links a:hover { color: var(--text-primary); background: var(--bg-card); }
.nav-links a.active { color: var(--freq-cyan); background: var(--freq-cyan-glow); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--freq-cyan);
  color: #070B12;
}
.btn-primary:hover {
  background: #29DEFF;
  box-shadow: 0 0 24px rgba(0,212,255,0.4);
  transform: translateY(-1px);
  text-decoration: none;
  color: #070B12;
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--bg-border-light);
}
.btn-secondary:hover {
  background: var(--bg-card);
  border-color: var(--freq-cyan);
  color: var(--freq-cyan);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--freq-cyan);
  padding: 8px 0;
}
.btn-ghost:hover { text-decoration: underline; color: #29DEFF; }

.btn-lg { padding: 14px 32px; font-size: 1rem; border-radius: var(--radius-md); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* ── Section Layout ───────────────────────────────────────── */
.section {
  padding: 96px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Section Headers ──────────────────────────────────────── */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--freq-cyan);
  margin-bottom: 16px;
}

.section-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--freq-cyan);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 600px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: border-color 0.2s, transform 0.2s;
}

.card:hover {
  border-color: var(--bg-border-light);
  transform: translateY(-2px);
}

/* ── Code blocks ──────────────────────────────────────────── */
.code-block {
  background: #050810;
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--bg-border);
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #FF5F57; }
.code-dots span:nth-child(2) { background: #FFBD2E; }
.code-dots span:nth-child(3) { background: #28CA41; }

.code-lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

pre {
  padding: 24px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.75;
  color: #A8B8D8;
}

pre .kw  { color: #7B5CF6; }
pre .str { color: #00E5A0; }
pre .num { color: #FF9060; }
pre .cmt { color: #4A5568; font-style: italic; }
pre .tag { color: #00D4FF; }

/* ── Tables ───────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table thead th {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 20px;
  text-align: left;
  border-bottom: 1px solid var(--bg-border);
}

.data-table thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

.data-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--bg-border);
  color: var(--text-primary);
  vertical-align: top;
}

.data-table tbody tr:hover td { background: var(--bg-card-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .mono { font-family: var(--font-mono); font-size: 0.8rem; color: var(--freq-cyan); white-space: nowrap; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--bg-border);
  margin-bottom: 32px;
  gap: 4px;
}

.tab-btn {
  padding: 12px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--freq-cyan); border-bottom-color: var(--freq-cyan); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Callout boxes ────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border-left: 3px solid;
  margin: 24px 0;
}

.callout-info    { background: rgba(0,212,255,0.06); border-color: var(--freq-cyan); }
.callout-warning { background: rgba(255,180,50,0.06); border-color: #FFB432; }
.callout-success { background: rgba(0,229,160,0.06); border-color: var(--freq-green); }

.callout-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }

.callout-body strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.callout-body p { font-size: 0.875rem; color: var(--text-secondary); line-height: 1.6; }

/* ── Pills / Tags ─────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pill-cyan   { background: rgba(0,212,255,0.12);  color: var(--freq-cyan);   border: 1px solid rgba(0,212,255,0.25); }
.pill-green  { background: rgba(0,229,160,0.12);  color: var(--freq-green);  border: 1px solid rgba(0,229,160,0.25); }
.pill-orange { background: rgba(255,107,53,0.12); color: var(--freq-orange); border: 1px solid rgba(255,107,53,0.25); }
.pill-purple { background: rgba(123,92,246,0.12); color: var(--freq-purple); border: 1px solid rgba(123,92,246,0.25); }
.pill-gray   { background: rgba(139,155,180,0.1); color: var(--text-secondary); border: 1px solid rgba(139,155,180,0.2); }
.pill-pink   { background: rgba(255,71,133,0.12);  color: #FF4785;  border: 1px solid rgba(255,71,133,0.25); }

/* ── Dividers ─────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bg-border-light), transparent);
  margin: 64px 0;
}

/* ── Grid helpers ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* ── Gradient backgrounds ─────────────────────────────────── */
.hero-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(0,212,255,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(123,92,246,0.08) 0%, transparent 50%),
    var(--bg-base);
}

/* ── Quick links ──────────────────────────────────────────── */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quick-link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.quick-link-card:hover {
  border-color: var(--freq-cyan);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  text-decoration: none;
  color: var(--text-primary);
}

.quick-link-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--freq-cyan-glow);
  border: 1px solid rgba(0,212,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.quick-link-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.quick-link-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Doc link cards (supporting docs) ─────────────────────── */
.doc-link-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.2s;
}

.doc-link-card:hover {
  border-color: var(--freq-cyan);
  background: var(--bg-card-hover);
  text-decoration: none;
  color: var(--text-primary);
}

.doc-link-card .link-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--freq-cyan-glow);
  border: 1px solid rgba(0,212,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.doc-link-card strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.doc-link-card span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── FAQ accordion ────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-item.open {
  margin-bottom: 24px;
}

.faq-question {
  width: 100%;
  background: var(--bg-card);
  border: none;
  padding: 16px 24px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

.faq-question:hover { background: var(--bg-card-hover); }

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--text-secondary);
  font-weight: 300;
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after {
  content: '\2212';
}

.faq-answer {
  padding: 16px 24px 20px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
  display: none;
}

.faq-item.open .faq-answer { display: block; }

.faq-answer ul {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.faq-answer ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  line-height: 1.7;
}

.faq-answer ul li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--freq-cyan);
}

/* ── Architecture components ──────────────────────────────── */
.arch-component-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.arch-component {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 24px;
}

.arch-component h4 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.arch-component p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0;
}

.arch-component .comp-icon {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.icon-blue   { background: rgba(0,212,255,0.12);  border: 1px solid rgba(0,212,255,0.25); }
.icon-green  { background: rgba(0,229,160,0.12);  border: 1px solid rgba(0,229,160,0.25); }
.icon-purple { background: rgba(123,92,246,0.12);  border: 1px solid rgba(123,92,246,0.25); }
.icon-orange { background: rgba(255,107,53,0.12); border: 1px solid rgba(255,107,53,0.25); }

/* Flow steps */
.flow-steps {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.flow-step {
  flex: 1;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  position: relative;
}

.flow-step::after {
  content: '\2192';
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.2rem;
}

.flow-step:last-child::after { display: none; }

.flow-step .step-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(0,212,255,0.15);
  border: 1px solid rgba(0,212,255,0.3);
  color: var(--freq-cyan);
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 8px;
}

.flow-step h5 {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.flow-step p {
  font-size: 0.7rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
}

/* Architecture placeholder */
.arch-placeholder {
  background: var(--bg-card);
  border: 2px dashed var(--bg-border);
  border-radius: var(--radius-md);
  padding: 80px 32px;
  text-align: center;
  color: var(--text-muted);
}

/* ── Scroll offset for anchors ────────────────────────────── */
[id] { scroll-margin-top: calc(var(--nav-h) + 24px); }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-cyan {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,212,255,0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(0,212,255,0); }
}

@keyframes slide-in-right {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes slide-in-bottom {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes slide-in-left {
  from { transform: translateX(-100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.animate-fade-up  { animation: fadeUp  0.6s var(--ease-out) both; }
.animate-fade-in  { animation: fadeIn  0.4s ease both; }

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links { flex-wrap: wrap; }

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--text-secondary); }

/* ── Page header (for inner pages) ───────────────────────── */
.page-header {
  padding: calc(var(--nav-h) + 56px) 0 56px;
  background: linear-gradient(180deg, rgba(0,212,255,0.04) 0%, transparent 100%);
  border-bottom: 1px solid var(--bg-border);
}

.page-header .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.page-header .breadcrumb a { color: var(--text-muted); text-decoration: none; }
.page-header .breadcrumb a:hover { color: var(--freq-cyan); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .quick-links { grid-template-columns: 1fr 1fr; }
  .arch-component-grid { grid-template-columns: 1fr; }
  .flow-steps { flex-direction: column; }
  .flow-step::after { display: none; }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .quick-links { grid-template-columns: 1fr; }
  .container, .container-wide { padding: 0 20px; }
  .section { padding: 64px 0; }
  .nav { padding: 0 20px; }
  .nav-links { display: none; }
}

.nav-mobile-toggle { display: none; }
@media (max-width: 768px) {
  .nav-mobile-toggle { display: flex; }
}

/* ── Mock Creative Builder ─────────────────────────────────── */
.mock-builder-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

.mock-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mock-preview-col {
  position: sticky;
  top: calc(var(--nav-h) + 16px);
}

.mock-format-header {
  text-align: center;
  margin-bottom: 10px;
}

.mock-format-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--freq-cyan);
  margin-bottom: 4px;
}

.mock-format-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.mock-field-card {
  padding: 22px;
}

.mock-field-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.mock-field-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mock-required-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--freq-orange);
  flex-shrink: 0;
}

.mock-field-card.is-complete .mock-required-dot {
  background: var(--freq-green);
}

.mock-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 22px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.mock-field-label:first-child { margin-top: 0; }

.mock-char-count {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
}

/* Segmented toggle (e.g. Upload vs Text) */
.seg-control {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 3px;
  margin-bottom: 14px;
}

.seg-btn {
  flex: 1;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.seg-btn.active { background: var(--freq-cyan-glow); color: var(--freq-cyan); }
.seg-btn:hover:not(.active) { color: var(--text-primary); }

/* Upload dropzone */
.mock-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed var(--bg-border-light);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.mock-upload-zone:hover,
.mock-upload-zone.is-dragover {
  border-color: var(--freq-cyan);
  background: var(--freq-cyan-glow);
  color: var(--text-secondary);
}

.mock-upload-zone.has-file {
  border-style: solid;
  border-color: var(--freq-green);
  color: var(--text-secondary);
}

.mock-upload-zone input[type="file"] { display: none; }

.mock-upload-filename {
  font-size: 0.75rem;
  color: var(--freq-green);
  margin-top: 6px;
  word-break: break-all;
}

/* Color inputs */
.mock-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mock-color-row + .mock-color-row { margin-top: 16px; }

.mock-color-swatch {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-border-light);
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.mock-hex-input,
.mock-text-input,
.mock-select {
  flex: 1;
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 9px 12px;
  min-width: 0;
  box-sizing: border-box;
}

.mock-select { font-family: var(--font-body); cursor: pointer; }

.mock-hex-input:focus,
.mock-text-input:focus,
.mock-select:focus {
  outline: none;
  border-color: var(--freq-cyan);
}

textarea.mock-text-input {
  font-family: var(--font-body);
  resize: vertical;
  min-height: 54px;
}

.mock-range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.mock-range-row input[type="range"] { flex: 1; accent-color: var(--freq-cyan); }
.mock-range-row span { font-size: 0.75rem; color: var(--text-muted); width: 34px; text-align: right; }

/* Canvas preview */
.mock-canvas-outer {
  position: relative;
  padding: 28px;
}

.mock-confetti-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.mock-canvas-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--bg-border-light);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  background: #05070c;
}

.mock-canvas-frame--transparent {
  background-image:
    linear-gradient(45deg, #3a4152 25%, transparent 25%),
    linear-gradient(-45deg, #3a4152 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #3a4152 75%),
    linear-gradient(-45deg, transparent 75%, #3a4152 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
  background-color: #23283a;
}

.mock-bg {
  position: absolute;
  inset: 0;
}

.mock-asset-box {
  position: absolute;
  border: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 10px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}

.mock-asset-box.has-content {
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.mock-asset-box.is-selected {
  border-color: var(--freq-cyan);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 14px rgba(0, 212, 255, 0.55);
}
.mock-asset-box.is-drag-over {
  border-color: var(--freq-green);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 0 18px rgba(0, 229, 160, 0.6);
}

.mock-asset-box-label {
  position: absolute;
  top: 6px;
  left: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 3px 7px;
  border-radius: 3px;
  pointer-events: none;
  z-index: 2;
}

.mock-asset-box.has-content .mock-asset-box-label { display: none; }

/* Reserved "Show Content" zone: a static, non-interactive guide the user
   can't upload into — never rendered in the exported PNG. */
.mock-asset-box--guide {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.5);
  background: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.06) 8px,
    transparent 8px,
    transparent 16px
  );
  pointer-events: none;
  cursor: not-allowed;
}

/* Overlay's Show Content zone is the whole transparent canvas — just a
   centered label, no bounded/hatched box. */
.mock-asset-box--label-only {
  border: none;
  background: none;
  box-shadow: none;
}
.mock-asset-box--label-only .mock-asset-box-label {
  position: static;
}

.mock-asset-box-label--guide {
  display: block !important;
  background: rgba(0, 0, 0, 0.6);
}

.mock-asset-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mock-asset-inner img,
.mock-asset-inner canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.mock-asset-inner--shadow img,
.mock-asset-inner--shadow canvas,
.mock-asset-inner--shadow .mock-tagline-text {
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
}

.mock-tagline-text {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  line-height: 1.15;
  padding: 0 6px;
  word-break: break-word;
  pointer-events: none;
}

.mock-resize-handle {
  position: absolute;
  right: -7px;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--freq-cyan);
  border: 2px solid #05070c;
  cursor: nwse-resize;
  display: none;
  z-index: 3;
}

.mock-asset-box.is-selected .mock-resize-handle { display: block; }

/* Progress bar */
.mock-progress-wrap { margin-top: 8px; }

.mock-progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.mock-progress-label strong { color: var(--text-primary); }

.mock-progress-track {
  height: 14px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  overflow: hidden;
}

.mock-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--freq-cyan), var(--freq-green));
  transition: width 0.5s var(--ease-out);
}

.mock-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
}

.mock-remove-btn {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
}

/* Show Content background picker */
.mock-hint-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

.mock-thumb-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.mock-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  border: 2px solid var(--bg-border);
  background-color: var(--bg-surface);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  transition: border-color 0.15s;
}

.mock-thumb span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 3px 5px;
  font-size: 0.62rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  text-align: center;
}

.mock-thumb--none {
  display: flex;
  align-items: center;
  justify-content: center;
}
.mock-thumb--none span {
  position: static;
  background: none;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.mock-thumb:hover { border-color: var(--bg-border-light); }
.mock-thumb.active { border-color: var(--freq-cyan); box-shadow: 0 0 0 1px var(--freq-cyan); }

.mock-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.mock-checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--freq-cyan);
  cursor: pointer;
  flex-shrink: 0;
}

@media (max-width: 1000px) {
  .mock-builder-layout { grid-template-columns: 1fr; }
  .mock-preview-col { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 640px) {
  .mock-canvas-outer { padding: 24px 0; }
}

/* ── Tools hub (index.html) ────────────────────────────────── */
.tools-hero {
  position: relative;
  overflow: hidden;
  padding: calc(var(--nav-h) + 72px) 0 24px;
}

.tools-hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 50% 40%, black 30%, transparent 80%);
  pointer-events: none;
}

.tools-hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.tools-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.tools-hero-headline .accent {
  background: linear-gradient(135deg, var(--freq-cyan) 0%, #4aecff 50%, var(--freq-purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tools-hero-sub {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 620px;
  margin: 0 auto;
}

/* Tool card grid */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-grid-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.tool-grid-row .tool-card {
  flex: 0 1 calc((100% - 40px) / 3);
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-lg);
  padding: 26px 26px 22px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out),
              background 0.2s var(--ease-out);
}

.tool-card:hover {
  border-color: var(--freq-cyan);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  text-decoration: none;
  color: var(--text-primary);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 18px;
}

.tool-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.tool-card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 20px;
  flex: 1;
}

.tool-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--freq-cyan);
}

.tool-card-cta::after {
  content: '\2192';
  transition: transform 0.2s var(--ease-out);
}

.tool-card:hover .tool-card-cta::after { transform: translateX(4px); }

@media (max-width: 980px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid-row .tool-card { flex: 0 1 calc((100% - 20px) / 2); }
}

@media (max-width: 640px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-grid-row { flex-direction: column; }
  .tool-grid-row .tool-card { flex: 1 1 auto; }
}

/* ── Revenue Model calculator (revenue-model.html) ─────────── */
.calc-wrapper {
  max-width: 1000px;
}

.calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.input-group {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color 0.2s;
}

.input-group:focus-within { border-color: var(--freq-cyan); }

.input-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-prefix {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--freq-cyan);
  flex-shrink: 0;
}


.input-group input[type="number"] {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
  -moz-appearance: textfield;
  appearance: textfield;
}

.input-group input[type="number"]::-webkit-inner-spin-button,
.input-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

/* A trailing unit (e.g. %) should sit against the value, not the card edge. */
.input-row--suffix input[type="number"] { width: 5ch; flex: 0 1 auto; }

.input-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Result card */
.result-card {
  background: var(--bg-elevated);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
  pointer-events: none;
}

.result-divider {
  width: 1px;
  background: var(--bg-border);
  align-self: stretch;
  flex-shrink: 0;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--freq-cyan);
  margin-bottom: 8px;
}

.result-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1;
}

.result-value--annual {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--freq-green);
}

.result-sub {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.result-badge {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
}

/* Formula breakdown */
.formula-bar {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.formula-bar .f-label {
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-right: 4px;
}

.formula-bar .f-val { color: var(--freq-cyan); font-weight: 600; }
.formula-bar .f-op  { color: var(--text-muted); margin: 0 2px; }

@media (max-width: 640px) {
  .calc-grid { grid-template-columns: 1fr; }
  .result-card { flex-direction: column; text-align: center; }
  .result-divider { display: none; }
}

/* Per-channel table (revenue-model.html) */
.channel-count { max-width: 224px; margin-bottom: 16px; }
.channel-select {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text-primary);
}
.channel-select option { background: var(--bg-card); color: var(--text-primary); font-size: 1rem; }
.channel-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: 24px;
}
.channel-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.channel-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 14px 16px;
}
.channel-table td { padding: 10px 16px; border-top: 1px solid var(--bg-border); white-space: nowrap; }
.channel-table input {
  background: transparent;
  border: none;
  outline: none;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  -moz-appearance: textfield;
  appearance: textfield;
}
.channel-table input:focus { border-bottom: 1px solid var(--freq-cyan); }
.channel-table input::-webkit-inner-spin-button,
.channel-table input::-webkit-outer-spin-button { -webkit-appearance: none; }
.channel-table .ch-cpm input { width: calc(100% - 20px); }
.ch-select {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 6px 8px;
  cursor: pointer;
}
.ch-select:focus { outline: none; border-color: var(--freq-cyan); }
.channel-table .ch-fill { width: 5ch; }
.channel-table .ch-suffix { text-align: right; }

/* Revenue by channel breakdown */
.breakdown-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-top: 24px;
}
.bd-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) 2fr auto 56px;
  gap: 16px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--bg-border);
  font-size: 0.85rem;
}
.bd-row:first-child { margin-top: 12px; }
.bd-name { color: var(--text-primary); }
.bd-dist { margin-left: 8px; font-size: 0.7rem; color: var(--text-muted); }
.bd-bar { height: 8px; background: var(--bg-border); border-radius: 4px; overflow: hidden; }
.bd-bar span { display: block; height: 100%; background: var(--freq-cyan); border-radius: 4px; }
.bd-val { font-family: var(--font-mono); color: var(--text-primary); text-align: right; }
.bd-pct { font-family: var(--font-mono); color: var(--text-muted); text-align: right; font-size: 0.78rem; }
@media (max-width: 640px) { .bd-row { grid-template-columns: 1fr auto; } .bd-bar { display: none; } .bd-pct { display: none; } }
