/* ============================================================
   adsbird — automation boutique
   Design language: technical, dark, precise. Inspired by Linear, Vercel, Plain.
   ============================================================ */

:root {
  /* Palette — dark first */
  --bg:          #0a0c0d;
  --bg-1:        #11141a;
  --bg-2:        #1a1f27;
  --bg-3:        #232a35;
  --line:        rgba(255,255,255,0.08);
  --line-bright: rgba(255,255,255,0.16);
  --text:        #e8eaed;
  --text-soft:   #a8b0bb;
  --text-dim:    #6f7782;
  --accent:      #b7ff5a;          /* electric lime — signal */
  --accent-dim:  #84c83a;
  --warn:        #ffb84d;
  --danger:      #ff5d6e;

  /* Type */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-display: "Instrument Serif", "Editorial New", "Cormorant Garamond", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  /* Layout */
  --container: 1280px;
  --gutter: clamp(1.25rem, 3vw, 2.5rem);
  --radius: 10px;
  --radius-lg: 18px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:  cubic-bezier(0.65, 0, 0.35, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--bg);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: "ss01" 1, "cv11" 1;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--accent); }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--bg); }

/* ============================================================
   Type primitives
   ============================================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}
.eyebrow-accent { color: var(--accent); }

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 0.96;
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}
.h1 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.022em;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.018em;
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
}
.h3 {
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.005em;
}
.italic { font-family: var(--font-display); font-style: italic; }
.accent { color: var(--accent); }
.mono { font-family: var(--font-mono); }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 60ch;
}
.muted { color: var(--text-dim); }
p + p { margin-top: 1em; }

/* ============================================================
   Container & sections
   ============================================================ */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: 920px; margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: min(1600px, calc(100vw - 2rem)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.section-head {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head .lead { margin-top: 1rem; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; } }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-3.keep-2, .grid-4.keep-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-3.keep-2, .grid-4.keep-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover {
  background: #c7ff7a;
  color: var(--bg);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -12px rgba(183, 255, 90, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-bright);
}
.btn-ghost:hover { border-color: var(--text); color: var(--text); background: var(--bg-1); }

.btn-sm { padding: 0.55rem 1rem; font-size: 0.85rem; }
.btn .arrow { transition: transform 0.25s var(--ease-out); }
.btn:hover .arrow { transform: translate(3px, -1px); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-weight: 500;
  color: var(--accent);
  font-size: 0.95rem;
}
.link-arrow .arrow { transition: transform 0.2s var(--ease-out); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ============================================================
   Header / Nav (Skalator-style mega-dropdown)
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 12, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.brand .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 14px var(--accent);
  animation: brandPulse 2.4s ease-in-out infinite;
}
@keyframes brandPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.main-nav {
  display: flex; align-items: center; gap: 0.5rem;
}
.nav-item { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-soft);
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.nav-link:hover { color: var(--text); background: var(--bg-1); }

/* Live-Demo nav pill (Ads-Manager) — pulsing lime dot, distinguishable */
.nav-link-live {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
  color: var(--text) !important;
  background: linear-gradient(180deg, rgba(183,255,90,0.06) 0%, rgba(183,255,90,0.02) 100%);
  border: 1px solid rgba(183,255,90,0.2);
  font-weight: 500;
}
.nav-link-live:hover {
  background: linear-gradient(180deg, rgba(183,255,90,0.12) 0%, rgba(183,255,90,0.05) 100%) !important;
  border-color: rgba(183,255,90,0.4) !important;
  color: var(--accent) !important;
}
.nav-link-live .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: liveDotPulse 1.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes liveDotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.55; transform: scale(1.25); }
}
/* Mobile-menu variant */
.mobile-menu nav a.nav-link-live {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0.85rem;
  margin: 0.5rem 0;
  border-radius: 10px;
  font-size: 1.35rem;
}
.mobile-menu nav a.nav-link-live .live-dot { width: 10px; height: 10px; }
.nav-link.has-dropdown::after {
  content: "";
  width: 8px; height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-bottom: 3px;
  margin-left: 0.1rem;
  opacity: 0.55;
  transition: transform 0.2s ease;
}
.nav-item:hover .nav-link.has-dropdown::after { transform: rotate(-135deg); margin-bottom: -3px; }

/* Mega dropdown */
.dropdown {
  /* The dropdown box sits flush against the parent .nav-link (top: 100%)
     so hover-intent never crosses an empty gap. The previous 0.5rem visual
     offset is now expressed as INTERNAL padding-top so it's part of the
     dropdown's hover-area. */
  position: absolute; top: 100%; left: 0;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  padding-top: 0.5rem;
  display: none;
  width: max-content;
  min-width: 320px;
  box-shadow: 0 20px 60px -20px rgba(0,0,0,0.5);
}
.dropdown-wide { min-width: 640px; }
.dropdown-mega { min-width: 920px; }
.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { display: block; }
.dropdown-grid { display: grid; gap: 1.5rem 2rem; }
.dropdown-grid.cols-2 { grid-template-columns: 1fr 1fr; }
.dropdown-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.dropdown-group h5 {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.75rem;
}
.dropdown-group ul { display: flex; flex-direction: column; gap: 0.15rem; }
.dropdown-group a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-soft);
  transition: all 0.15s ease;
}
.dropdown-group a:hover { background: var(--bg-2); color: var(--text); }
.dropdown-group a strong { display: block; color: var(--text); font-weight: 500; font-size: 0.9rem; }
.dropdown-group a span { display: block; font-size: 0.78rem; color: var(--text-dim); margin-top: 0.1rem; }

.header-cta { display: flex; align-items: center; gap: 0.6rem; }
.menu-toggle {
  display: none;
  width: 40px; height: 40px;
  border-radius: 8px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  align-items: center; justify-content: center;
}

@media (max-width: 1180px) {
  .main-nav, .header-cta .btn-text { display: none; }
  .menu-toggle { display: inline-flex; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 200;
  padding: 1.25rem var(--gutter) 3rem;
  transform: translateX(100%);
  transition: transform 0.4s var(--ease-io);
  overflow-y: auto;
  display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.mobile-menu nav { display: flex; flex-direction: column; padding: 1rem 0; }
.mobile-menu nav details { border-bottom: 1px solid var(--line); }
.mobile-menu nav summary {
  list-style: none;
  padding: 1rem 0;
  font-family: var(--font-display); font-size: 1.6rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.mobile-menu nav summary::-webkit-details-marker { display: none; }
.mobile-menu nav summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.5rem; color: var(--accent); }
.mobile-menu nav details[open] summary::after { content: "−"; }
.mobile-menu nav details ul { padding: 0 0 1rem 0.5rem; display: flex; flex-direction: column; gap: 0.6rem; }
.mobile-menu nav details ul a { color: var(--text-soft); font-size: 1rem; }
.mobile-menu nav > a {
  padding: 1rem 0;
  font-family: var(--font-display); font-size: 1.6rem;
  border-bottom: 1px solid var(--line);
}

/* ============================================================
   Hero — 2-column with live terminal
   ============================================================ */
.hero-split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 1000px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-terminal-wrap { order: -1; max-width: 560px; }
}

/* ============================================================
   Live Terminal (Hero right column)
   ============================================================ */
.terminal {
  background: linear-gradient(180deg, #0d1116 0%, #0a0c10 100%);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.7),
    0 0 0 1px rgba(183, 255, 90, 0.06),
    inset 0 1px 0 rgba(255,255,255,0.05);
  position: relative;
}
.terminal::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(183, 255, 90, 0.08) 0%, transparent 55%);
  pointer-events: none;
  border-radius: 14px;
}
.terminal-head {
  display: flex; align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--line);
  gap: 0.85rem;
  background: rgba(0,0,0,0.25);
}
.terminal-head .dots { display: flex; gap: 0.4rem; }
.terminal-head .dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: #2a2f37;
}
.terminal-head .dots span:nth-child(1) { background: #ff5d6e; opacity: 0.85; }
.terminal-head .dots span:nth-child(2) { background: #ffb84d; opacity: 0.85; }
.terminal-head .dots span:nth-child(3) { background: var(--accent); opacity: 0.85; }
.terminal-head .title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  margin-left: auto;
  margin-right: auto;
}
.terminal-head .live-tag {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.terminal-head .live-tag::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: livePulse 1.6s ease-in-out infinite;
}

.terminal-body {
  padding: 1.1rem 1.25rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-soft);
  min-height: 340px;
  position: relative;
  z-index: 1;
}
.terminal-body .line { display: block; min-height: 1.3em; white-space: pre-wrap; }
.terminal-body .ts { color: var(--text-dim); }
.terminal-body .ok { color: var(--accent); }
.terminal-body .arrow { color: var(--text-dim); }
.terminal-body .kw { color: #c47dff; }
.terminal-body .str { color: var(--accent); }
.terminal-body .num { color: var(--warn); }
.terminal-body .dim { color: var(--text-dim); }
.terminal-body .cmd { color: var(--text); }
.terminal-body .prompt { color: var(--accent); }

.terminal-body .cursor {
  display: inline-block;
  width: 7px; height: 1em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: cursorBlink 0.9s steps(2) infinite;
}
@keyframes cursorBlink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ============================================================
   AdsManager 2.0 — proper SaaS-style dashboard UI
   ============================================================ */
.adsmgr {
  background: #07090b;
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  overflow: hidden;
  box-shadow:
    0 40px 100px -40px rgba(0,0,0,0.85),
    inset 0 1px 0 rgba(255,255,255,0.04);
  font-family: var(--font-sans);
}

/* Top bar */
.adsmgr-topbar {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, #0d1117 0%, #0a0d12 100%);
  border-bottom: 1px solid var(--line);
}
.adsmgr-topbar .traffic { display: flex; gap: 0.4rem; }
.adsmgr-topbar .traffic span {
  width: 10px; height: 10px; border-radius: 50%;
  opacity: 0.75;
}
.adsmgr-topbar .traffic span:nth-child(1) { background: #ff5d6e; }
.adsmgr-topbar .traffic span:nth-child(2) { background: #ffb84d; }
.adsmgr-topbar .traffic span:nth-child(3) { background: var(--accent); }
.adsmgr-topbar .brand {
  font-family: var(--font-display); font-size: 1rem;
  color: var(--text); letter-spacing: -0.01em;
}
.adsmgr-topbar .brand .accent { color: var(--accent); font-style: italic; }
.adsmgr-topbar .search {
  flex: 1; max-width: 420px;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 0.55rem;
}
.adsmgr-topbar .search::before {
  content: "⌘K"; font-size: 0.65rem; padding: 0.1rem 0.35rem;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 3px; color: var(--text-soft);
}
.adsmgr-topbar .user {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #c47dff, var(--accent));
  border-radius: 50%;
  margin-left: auto;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  color: var(--bg);
}
.adsmgr-topbar .live-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  background: rgba(183,255,90,0.08);
  border: 1px solid rgba(183,255,90,0.2);
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent);
}
.adsmgr-topbar .live-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 6px var(--accent);
  animation: livePulse 1.8s ease-in-out infinite;
}

/* Body grid */
.adsmgr-body {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 280px;
  min-height: 720px;
}
@media (max-width: 1280px) {
  .adsmgr-body { grid-template-columns: 210px minmax(0, 1fr) 270px; }
}
@media (max-width: 1180px) {
  .adsmgr-body { grid-template-columns: 210px minmax(0, 1fr); }
  .adsmgr-aichat { display: none; }
}
@media (max-width: 760px) {
  .adsmgr-body { grid-template-columns: 1fr; min-height: auto; }
  .adsmgr-sidebar {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 0.6rem;
    gap: 0.4rem;
  }
  .adsmgr-sidebar h6 { display: none; }
  .adsmgr-acct { flex: 0 0 auto; width: auto; padding: 0.5rem 0.7rem; }
  .adsmgr-acct .pct { display: none; }
}

/* Sidebar */
.adsmgr-sidebar {
  border-right: 1px solid var(--line);
  background: #0a0d12;
  padding: 1rem 0.6rem;
  display: flex; flex-direction: column; gap: 0.15rem;
  overflow-y: auto;
}
.adsmgr-sidebar h6 {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.55rem 0.6rem 0.3rem;
  font-weight: 500;
}
.adsmgr-acct {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
  color: var(--text-soft);
  transition: all 0.18s ease;
  font-size: 0.86rem;
}
.adsmgr-acct:hover { background: rgba(255,255,255,0.025); color: var(--text); }
.adsmgr-acct.active {
  background: rgba(183,255,90,0.06);
  border-color: rgba(183,255,90,0.2);
  color: var(--text);
}
.adsmgr-acct .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
  flex-shrink: 0;
}
.adsmgr-acct.live .dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.adsmgr-acct.paused .dot { background: var(--warn); }
.adsmgr-acct.alert .dot { background: var(--danger); }
.adsmgr-acct .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
}
.adsmgr-acct .pct {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  flex-shrink: 0;
}
.adsmgr-acct.active .pct { color: var(--accent); }
.adsmgr-acct:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Main content */
.adsmgr-main {
  background: #07090b;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.adsmgr-tabbar {
  display: flex; align-items: center; gap: 0.15rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #0a0d12;
}
.adsmgr-tab {
  padding: 0.45rem 0.85rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-dim);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
}
.adsmgr-tab .count {
  font-family: var(--font-mono); font-size: 0.7rem;
  margin-left: 0.4rem;
  color: var(--text-dim);
  background: var(--bg-2);
  padding: 0.05rem 0.35rem;
  border-radius: 3px;
}
.adsmgr-tab:hover { color: var(--text); }
.adsmgr-tab.active { color: var(--text); }
.adsmgr-tab.active::after {
  content: "";
  position: absolute; bottom: -9px; left: 0.85rem; right: 0.85rem;
  height: 2px; background: var(--accent);
  border-radius: 2px 2px 0 0;
}
.adsmgr-tabbar .seg {
  margin-left: auto;
  display: flex; gap: 0.25rem;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 2px;
}
.adsmgr-tabbar .seg span {
  padding: 0.3rem 0.65rem;
  font-family: var(--font-mono); font-size: 0.7rem;
  color: var(--text-soft);
  border-radius: 4px;
  cursor: pointer;
}
.adsmgr-tabbar .seg span.active { background: var(--accent); color: var(--bg); font-weight: 600; }
.adsmgr-tabbar .seg span:hover:not(.active) { color: var(--text); background: rgba(255,255,255,0.04); }
.adsmgr-chart-head .metrics span { cursor: pointer; transition: color 0.18s ease; }
.adsmgr-chart-head .metrics span:hover { color: var(--text); }
.adsmgr-table tbody tr { transition: background 0.16s ease; }
.adsmgr-table tbody tr:hover { background: rgba(255,255,255,0.025); }
.adsmgr-table tbody tr.row-active {
  background: rgba(183,255,90,0.05);
  outline: 1px solid rgba(183,255,90,0.18);
  outline-offset: -1px;
}

/* Hide less-important trailing columns on tighter viewports */
@media (max-width: 1400px) {
  .adsmgr-table thead th:last-child,
  .adsmgr-table tbody td:last-child { display: none; }
}
@media (max-width: 1180px) {
  /* When chat-sidebar is gone, more room — show all columns */
  .adsmgr-table thead th:last-child,
  .adsmgr-table tbody td:last-child { display: table-cell; }
}
@media (max-width: 960px) {
  /* Tight again: drop Freq + CTR */
  .adsmgr-table thead th:nth-last-child(-n+2),
  .adsmgr-table tbody td:nth-last-child(-n+2) { display: none; }
}

/* Creatives gallery (gallery view, not table) */
.adsmgr-creatives-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  padding: 1rem 1.1rem;
}
@media (max-width: 1100px) { .adsmgr-creatives-gallery { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .adsmgr-creatives-gallery { grid-template-columns: repeat(2, 1fr); padding: 0.85rem; gap: 0.7rem; } }
@media (max-width: 420px)  { .adsmgr-creatives-gallery { grid-template-columns: 1fr; } }
.adsmgr-creative-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.adsmgr-creative-card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.adsmgr-creative-card.card-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 8px 24px -10px rgba(183,255,90,0.3);
}
.adsmgr-creative-card .thumb {
  aspect-ratio: 4/5;
  position: relative;
  display: flex; align-items: flex-start; justify-content: flex-end;
  padding: 0.55rem;
}
.adsmgr-creative-card .thumb .badge {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 0.22rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.adsmgr-creative-card .thumb .badge.active::before  { content: "● "; color: var(--accent); }
.adsmgr-creative-card .thumb .badge.paused::before  { content: "● "; color: var(--warn); }
.adsmgr-creative-card .thumb .badge.review::before  { content: "● "; color: #c47dff; }
.adsmgr-creative-card .thumb .plus {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; color: var(--accent); font-family: var(--font-display);
  opacity: 0.85;
}
.adsmgr-creative-card .meta {
  padding: 0.7rem 0.8rem 0.85rem;
  border-top: 1px solid var(--line);
}
.adsmgr-creative-card .meta .t { font-size: 0.84rem; color: var(--text); font-weight: 500; line-height: 1.3; }
.adsmgr-creative-card .meta .s {
  font-family: var(--font-mono); font-size: 0.66rem;
  letter-spacing: 0.04em; color: var(--text-dim);
  margin-top: 0.15rem;
}
.adsmgr-creative-card .meta .kpis {
  margin-top: 0.55rem;
  display: flex; justify-content: space-between; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.7rem; color: var(--text-soft);
}
.adsmgr-creative-card .meta .kpis .gain  { color: var(--accent); }
.adsmgr-creative-card .meta .kpis .loss  { color: var(--danger); }
.adsmgr-creative-card .meta .kpis .accent { color: var(--accent); font-weight: 500; }
.adsmgr-creative-card .meta .kpis .muted  { color: var(--text-dim); }
.adsmgr-creative-card.add-new {
  border-style: dashed;
  background: transparent;
}
.adsmgr-creative-card.add-new .thumb { background: rgba(183,255,90,0.03); }

/* Creative thumb gradients (placeholder visuals) */
.c-grad-1 .thumb { background: linear-gradient(135deg, #ff6b8a 0%, #ffb84d 100%); }
.c-grad-2 .thumb { background: linear-gradient(135deg, #6e8aff 0%, #c47dff 100%); }
.c-grad-3 .thumb { background: linear-gradient(135deg, #ffb84d 0%, #ff5d6e 100%); }
.c-grad-4 .thumb { background: linear-gradient(135deg, #4dd5ff 0%, #6e8aff 100%); }
.c-grad-5 .thumb { background: linear-gradient(135deg, #84c83a 0%, #b7ff5a 100%); }
.c-grad-6 .thumb { background: linear-gradient(135deg, #c47dff 0%, #ff6b8a 100%); }
.c-grad-7 .thumb { background: linear-gradient(135deg, #4dd5ff 0%, #84c83a 100%); }
.c-grad-8 .thumb { background: linear-gradient(135deg, rgba(183,255,90,0.12) 0%, rgba(183,255,90,0.04) 100%); }

/* KPI row */
.adsmgr-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--line);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 1200px) { .adsmgr-kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .adsmgr-kpis { grid-template-columns: repeat(2, 1fr); } }
.adsmgr-kpi {
  background: #07090b;
  padding: 0.85rem 1rem;
}
.adsmgr-kpi .lbl {
  font-family: var(--font-mono); font-size: 0.62rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
}
.adsmgr-kpi .val {
  font-family: var(--font-display); font-size: 1.5rem;
  letter-spacing: -0.015em;
  color: var(--text); margin-top: 0.25rem; line-height: 1;
}
.adsmgr-kpi .chg {
  font-family: var(--font-mono); font-size: 0.7rem;
  margin-top: 0.3rem;
}
.adsmgr-kpi .chg.up { color: var(--accent); }
.adsmgr-kpi .chg.down { color: var(--danger); }
.adsmgr-kpi .chg .ico { display: inline-block; margin-right: 0.15rem; }

/* Chart section */
.adsmgr-chart-wrap {
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid var(--line);
}
.adsmgr-chart-head {
  display: flex; align-items: center; gap: 0.75rem;
  justify-content: space-between; flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.adsmgr-chart-head .title {
  font-size: 0.95rem; font-weight: 500; color: var(--text);
}
.adsmgr-chart-head .metrics {
  display: flex; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.72rem;
}
.adsmgr-chart-head .metrics span {
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 0.4rem;
  cursor: pointer;
}
.adsmgr-chart-head .metrics span::before {
  content: ""; width: 9px; height: 2px; border-radius: 2px;
  background: var(--text-dim);
}
.adsmgr-chart-head .metrics span.m-roas::before { background: var(--accent); }
.adsmgr-chart-head .metrics span.m-cpl::before { background: #c47dff; }
.adsmgr-chart-head .metrics span.m-spend::before { background: var(--warn); }
.adsmgr-chart-head .metrics span.active { color: var(--text); }

.adsmgr-chart svg { width: 100%; height: 220px; display: block; }

/* Ads table */
.adsmgr-table-wrap {
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.adsmgr-table-wrap::-webkit-scrollbar { height: 6px; }
.adsmgr-table-wrap::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 3px; }
.adsmgr-table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  font-family: var(--font-sans);
}
.adsmgr-table thead th {
  background: #0a0d12;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0.55rem;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  white-space: nowrap;
}
.adsmgr-table thead th:nth-child(n+3) { text-align: right; }
.adsmgr-table tbody td {
  padding: 0.62rem 0.55rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.78rem;
  color: var(--text);
  vertical-align: middle;
  white-space: nowrap;
}
.adsmgr-table tbody td:nth-child(n+3) { text-align: right; font-family: var(--font-mono); font-size: 0.74rem; }
/* First column (campaign name): allow shrinking with ellipsis */
.adsmgr-table tbody td:first-child {
  max-width: 280px;
  overflow: hidden;
}
.adsmgr-table .row-name .title {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.adsmgr-table tbody tr:hover { background: rgba(255,255,255,0.02); cursor: pointer; }
.adsmgr-table .row-name { display: flex; align-items: center; gap: 0.6rem; }
.adsmgr-table .row-name input[type=checkbox] {
  width: 14px; height: 14px;
  accent-color: var(--accent);
  background: var(--bg-2);
}
.adsmgr-table .row-name .title { color: var(--text); }
.adsmgr-table .row-name .sub { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); margin-left: 0.4rem; }
.adsmgr-table .badge {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.18rem 0.55rem;
  border-radius: 4px;
  font-family: var(--font-mono); font-size: 0.65rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.adsmgr-table .badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
}
.adsmgr-table .badge.active { background: rgba(183,255,90,0.08); color: var(--accent); }
.adsmgr-table .badge.active::before { background: var(--accent); }
.adsmgr-table .badge.paused { background: rgba(255,184,77,0.08); color: var(--warn); }
.adsmgr-table .badge.paused::before { background: var(--warn); }
.adsmgr-table .badge.review { background: rgba(196,125,255,0.08); color: #c47dff; }
.adsmgr-table .badge.review::before { background: #c47dff; }
.adsmgr-table .badge.error { background: rgba(255,93,110,0.08); color: var(--danger); }
.adsmgr-table .badge.error::before { background: var(--danger); }
.adsmgr-table .gain { color: var(--accent); }
.adsmgr-table .loss { color: var(--danger); }

/* AI Chat panel */
.adsmgr-aichat {
  border-left: 1px solid var(--line);
  background: #0a0d12;
  display: flex; flex-direction: column;
}
.adsmgr-aichat-head {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
}
.adsmgr-aichat-head .icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--accent), #84c83a);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: var(--bg);
  font-family: var(--font-mono); font-weight: 700; font-size: 0.85rem;
}
.adsmgr-aichat-head .title { font-size: 0.9rem; font-weight: 500; color: var(--text); }
.adsmgr-aichat-head .sub { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim); letter-spacing: 0.08em; text-transform: uppercase; }
.adsmgr-aichat-head .right { margin-left: auto; }

.adsmgr-aichat-body {
  flex: 1; padding: 1rem; overflow-y: auto;
  display: flex; flex-direction: column; gap: 0.7rem;
  font-size: 0.86rem; line-height: 1.5;
}
.adsmgr-msg {
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  max-width: 92%;
}
.adsmgr-msg.user {
  align-self: flex-end;
  background: var(--accent);
  color: var(--bg);
  font-weight: 500;
  border-bottom-right-radius: 3px;
}
.adsmgr-msg.ai {
  align-self: flex-start;
  background: #11151c;
  border: 1px solid var(--line);
  color: var(--text-soft);
  border-bottom-left-radius: 3px;
}
.adsmgr-msg.ai .line { display: block; }
.adsmgr-msg.ai .step {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-dim);
  margin: 0.2rem 0;
}
.adsmgr-msg.ai .step .ok { color: var(--accent); }
.adsmgr-msg.ai .step .running {
  width: 11px; height: 11px;
  border: 1.5px solid var(--accent);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.adsmgr-msg.ai .preview {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 0.3rem;
  margin-top: 0.6rem;
}
.adsmgr-msg.ai .preview .creative {
  aspect-ratio: 1/1;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: rgba(255,255,255,0.6);
  display: flex; align-items: flex-end;
  padding: 0.3rem;
}
.adsmgr-msg.ai .preview .creative.c1 { background: linear-gradient(135deg, #ff6b8b 0%, #ff9966 100%); }
.adsmgr-msg.ai .preview .creative.c2 { background: linear-gradient(135deg, #5b8def 0%, #9b4dff 100%); }
.adsmgr-msg.ai .preview .creative.c3 { background: linear-gradient(135deg, #ffd56b 0%, #ff8a5b 100%); }
.adsmgr-msg.ai .preview .creative.c4 { background: linear-gradient(135deg, #4dd5ff 0%, #5b8def 100%); }
.adsmgr-msg.ai .preview .creative.c5 { background: linear-gradient(135deg, #b7ff5a 0%, #4dd5ff 100%); }
.adsmgr-msg.ai .preview .creative.c6 { background: linear-gradient(135deg, #c47dff 0%, #ff6b8b 100%); }
.adsmgr-msg.ai .preview .creative .label {
  background: rgba(0,0,0,0.5);
  padding: 0.12rem 0.3rem;
  border-radius: 3px;
  backdrop-filter: blur(4px);
}

.adsmgr-aichat-input {
  border-top: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  display: flex; gap: 0.5rem; align-items: center;
}
.adsmgr-aichat-input input {
  flex: 1; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.55rem 0.85rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
}
.adsmgr-aichat-input button {
  background: var(--accent); color: var(--bg);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

/* ============================================================
   Breadcrumbs (semantic, schema-backed, mute by default)
   ============================================================ */
.breadcrumbs {
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.15);
}
.breadcrumbs ol {
  list-style: none;
  margin: 0;
  padding: 0.85rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s var(--ease-out);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep {
  margin: 0 0.55rem;
  color: var(--text-dim);
  opacity: 0.55;
}
.breadcrumbs [aria-current="page"] {
  color: var(--text);
  opacity: 0.85;
}

/* ============================================================
   Cookie banner (bottom-right, dismissible, DSGVO-friendly)
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  left: 1.25rem;
  max-width: 480px;
  margin-left: auto;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 30px 80px -30px rgba(0,0,0,0.7);
  z-index: 300;
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}
.cookie-banner.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.cookie-banner .head {
  display: flex; align-items: center; gap: 0.55rem;
  margin-bottom: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.cookie-banner .head::before {
  content: ""; width: 7px; height: 7px; border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
}
.cookie-banner p { margin-bottom: 1rem; }
.cookie-banner a { color: var(--accent); border-bottom: 1px solid currentColor; }
.cookie-banner-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.cookie-banner .btn { padding: 0.45rem 0.95rem; font-size: 0.82rem; }
@media (max-width: 520px) {
  .cookie-banner { left: 0.75rem; right: 0.75rem; bottom: 0.75rem; padding: 1rem 1.15rem; }
}

/* ============================================================
   "So könnte es bei dir aussehen" CTA-card (teaser to /dashboard-demo/)
   ============================================================ */
.demo-teaser {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  background:
    radial-gradient(ellipse at 80% 30%, rgba(183,255,90,0.12) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-bright);
  border-radius: 22px;
  padding: clamp(2rem, 4vw, 3rem);
  align-items: center;
  overflow: hidden;
}
@media (max-width: 900px) { .demo-teaser { grid-template-columns: 1fr; } }

/* Preview frame on the right side */
.demo-teaser-preview {
  position: relative;
  background: #0a0c10;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  overflow: hidden;
}
.demo-teaser-preview::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,12,13,0.7) 100%);
  pointer-events: none;
}
.demo-teaser-preview .head {
  display: flex; align-items: center; gap: 0.75rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}
.demo-teaser-preview .dots { display: flex; gap: 0.35rem; }
.demo-teaser-preview .dots span { width: 9px; height: 9px; border-radius: 50%; opacity: 0.7; }
.demo-teaser-preview .dots span:nth-child(1) { background: #ff5d6e; }
.demo-teaser-preview .dots span:nth-child(2) { background: #ffb84d; }
.demo-teaser-preview .dots span:nth-child(3) { background: var(--accent); }
.demo-teaser-preview .head .lab {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.06em;
  color: var(--text-dim);
}
.demo-teaser-preview .mini-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
.demo-teaser-preview .mini-tile {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}
.demo-teaser-preview .mini-tile .lbl {
  font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
}
.demo-teaser-preview .mini-tile .val {
  font-family: var(--font-display); font-size: 1.15rem; color: var(--text);
  margin-top: 0.2rem; line-height: 1;
}
.demo-teaser-preview .mini-tile .delta {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent);
  margin-top: 0.2rem;
}

/* ============================================================
   Full Dashboard Demo page styles
   ============================================================ */
.demo-page {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-1) 100%);
}
.demo-toolbar {
  display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.85rem 1.15rem;
}
.demo-toolbar .seg {
  display: flex; gap: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.25rem;
}
.demo-toolbar .seg button {
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  font-family: var(--font-mono); font-size: 0.74rem;
  color: var(--text-soft);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}
.demo-toolbar .seg button.active {
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}
.demo-toolbar .label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
}

.demo-row { display: grid; gap: 1rem; }
.demo-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
.demo-row.cols-2 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 900px) { .demo-row.cols-4 { grid-template-columns: repeat(2, 1fr); } .demo-row.cols-2 { grid-template-columns: 1fr; } }

.demo-table {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.demo-table .head, .demo-table .row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 0.9fr 1fr 1fr 0.8fr;
  gap: 0.5rem;
  padding: 0.85rem 1.15rem;
  align-items: center;
  font-family: var(--font-mono); font-size: 0.82rem;
}
.demo-table .head {
  background: rgba(255,255,255,0.02);
  border-bottom: 1px solid var(--line);
  font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
}
.demo-table .row { border-bottom: 1px solid var(--line); color: var(--text); }
.demo-table .row:last-child { border-bottom: 0; }
.demo-table .row:hover { background: rgba(255,255,255,0.02); }
.demo-table .row .stat-up { color: var(--accent); }
.demo-table .row .stat-down { color: var(--danger); }
.demo-table .row .badge {
  display: inline-flex; padding: 0.18rem 0.5rem;
  border-radius: 4px;
  font-size: 0.65rem; letter-spacing: 0.04em;
}
.demo-table .row .badge.ok { background: rgba(183,255,90,0.12); color: var(--accent); }
.demo-table .row .badge.warn { background: rgba(255,184,77,0.12); color: var(--warn); }
.demo-table .row .badge.paused { background: rgba(255,93,110,0.12); color: var(--danger); }
@media (max-width: 900px) {
  .demo-table .head, .demo-table .row { grid-template-columns: 1fr 1fr 1fr; font-size: 0.74rem; }
  .demo-table .head .hide-sm, .demo-table .row .hide-sm { display: none; }
}

/* ============================================================
   Live-Metrics strip (above terminal in hero) — kept available for other uses
   ============================================================ */
.live-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1rem;
}
.live-metric {
  background: var(--bg-1);
  padding: 0.85rem 1rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  position: relative;
  overflow: hidden;
}
.live-metric .lm-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 0.4rem;
}
.live-metric .lm-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  flex-shrink: 0;
  animation: livePulse 1.8s ease-in-out infinite;
}
.live-metric .lm-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.018em;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.live-metric .lm-value .delta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--accent);
  margin-left: 0.4rem;
  vertical-align: super;
  letter-spacing: 0;
}
@media (max-width: 600px) {
  .live-metrics { grid-template-columns: 1fr; }
  .live-metric .lm-value { font-size: 1.25rem; }
}

/* ============================================================
   Try-It-Yourself form
   ============================================================ */
.tryit {
  background: linear-gradient(160deg, var(--bg-1) 0%, rgba(183,255,90,0.04) 100%);
  border: 1px solid var(--line-bright);
  border-radius: 22px;
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
}
.tryit::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(183,255,90,0.10) 0%, transparent 55%);
  pointer-events: none;
}
.tryit > * { position: relative; z-index: 1; }
.tryit-form {
  display: flex; flex-direction: column; gap: 1rem;
  margin-top: 1.5rem;
}
.tryit-textarea {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-sans);
  line-height: 1.5;
  resize: vertical;
  min-height: 130px;
  outline: none;
  transition: border-color 0.2s ease;
}
.tryit-textarea:focus { border-color: var(--accent); }
.tryit-textarea::placeholder { color: var(--text-dim); }
.tryit-hint {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
}
.tryit-output {
  display: none;
  margin-top: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-height: 600px;
  overflow-y: auto;
}
.tryit-output.active { display: block; animation: panelIn 0.4s var(--ease-out); }
.tryit-output h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
  color: var(--text);
}
.tryit-output h5 {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.2rem 0 0.5rem;
}
.tryit-output p { margin-bottom: 0.85rem; }
.tryit-output ul { padding-left: 1.2rem; margin-bottom: 0.85rem; list-style: disc; }
.tryit-output strong { color: var(--text); }
.tryit-output .arch-tools {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  margin: 0.85rem 0;
}
.tryit-output .arch-tools span {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-soft);
}
.tryit-loading {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--text-soft);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-top: 1rem;
}
.tryit-loading .spinner {
  width: 14px; height: 14px;
  border: 2px solid var(--line-bright);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   Performance Dashboard Mockup
   ============================================================ */
.dash-mockup {
  background: linear-gradient(180deg, #0d1116 0%, #0a0c10 100%);
  border: 1px solid var(--line-bright);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 30px 80px -30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
}
.dash-head {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.3);
}
.dash-head .dots { display: flex; gap: 0.4rem; }
.dash-head .dots span { width: 10px; height: 10px; border-radius: 50%; background: #2a2f37; }
.dash-head .dots span:nth-child(1) { background: #ff5d6e; opacity: 0.7; }
.dash-head .dots span:nth-child(2) { background: #ffb84d; opacity: 0.7; }
.dash-head .dots span:nth-child(3) { background: var(--accent); opacity: 0.7; }
.dash-head .title {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.dash-head .live {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 0.4rem;
}
.dash-head .live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px var(--accent);
  animation: livePulse 1.8s ease-in-out infinite;
}
.dash-body {
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 900px) {
  .dash-body { grid-template-columns: 1fr 1fr; }
}
.dash-kpi {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.1rem;
}
.dash-kpi .label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.dash-kpi .value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: -0.018em;
  color: var(--text);
  margin-top: 0.35rem;
  line-height: 1;
}
.dash-kpi .change {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-top: 0.4rem;
  display: flex; align-items: center; gap: 0.3rem;
}
.dash-kpi .change.up { color: var(--accent); }
.dash-kpi .change.down { color: var(--danger); }

.dash-chart {
  grid-column: span 4;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 0.25rem;
  display: flex; flex-direction: column; gap: 1rem;
}
@media (max-width: 900px) { .dash-chart { grid-column: span 2; } }
.dash-chart-head {
  display: flex; align-items: center; gap: 0.85rem; justify-content: space-between; flex-wrap: wrap;
}
.dash-chart-head .lab {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
}
.dash-chart-head .seg {
  display: flex; gap: 0.4rem;
  font-family: var(--font-mono); font-size: 0.7rem;
}
.dash-chart-head .seg span {
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: var(--bg-2);
  color: var(--text-soft);
}
.dash-chart-head .seg span.act { background: var(--accent); color: var(--bg); }
.dash-chart svg { width: 100%; height: 140px; }

.dash-creatives {
  grid-column: span 4;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 0.85rem;
}
@media (max-width: 900px) { .dash-creatives { grid-column: span 2; } }
.dash-creatives .grid6 {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem;
}
@media (max-width: 700px) { .dash-creatives .grid6 { grid-template-columns: repeat(3, 1fr); } }
.dash-creatives .creative {
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #1a1f27 0%, #2a2f37 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.08em;
}
.dash-creatives .creative.gen {
  background: linear-gradient(135deg, rgba(183,255,90,0.08) 0%, rgba(183,255,90,0.02) 100%);
  border-color: var(--accent);
}
.dash-creatives .creative .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--accent); color: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ============================================================
   Interactive Process (4 phases)
   ============================================================ */
.process-int {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.55fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: stretch;
}
.process-int-steps {
  display: flex; flex-direction: column; gap: 0.6rem;
}
.process-int-step {
  text-align: left;
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.1rem 1.25rem;
  background: var(--bg-1);
  display: flex; flex-direction: column; gap: 0.3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.35s var(--ease-out);
  width: 100%;
}
.process-int-step:hover { border-color: var(--line-bright); }
.process-int-step .step-num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.35s var(--ease-out);
}
.process-int-step h4 {
  font-size: 1.02rem; font-weight: 500;
  color: var(--text-soft);
  transition: color 0.35s var(--ease-out);
}
.process-int-step .step-teaser {
  font-size: 0.84rem;
  color: var(--text-dim);
  display: none;
  margin-top: 0.15rem;
}
.process-int-step.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-1) 0%, rgba(183,255,90,0.05) 100%);
}
.process-int-step.active .step-num { color: var(--accent); }
.process-int-step.active h4 { color: var(--text); }
.process-int-step.active .step-teaser { display: block; }

.step-progress {
  position: absolute; bottom: 0; left: 0;
  height: 2px;
  background: var(--accent);
  width: 0;
  pointer-events: none;
}
.process-int-step.active .step-progress {
  animation: stepFill 5.4s linear forwards;
}
.process-int.is-paused .process-int-step.active .step-progress {
  animation-play-state: paused;
}
@keyframes stepFill { from { width: 0; } to { width: 100%; } }

.process-int-detail {
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 18px;
  padding: clamp(1.75rem, 3vw, 2.75rem);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
  min-height: 360px;
}
.process-int-detail::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at top right, rgba(183,255,90,0.08) 0%, transparent 60%);
  pointer-events: none;
}
.process-int-detail-panel {
  display: none;
  flex-direction: column; gap: 1.25rem;
  position: relative; z-index: 1;
}
.process-int-detail-panel.active {
  display: flex;
  animation: panelIn 0.45s var(--ease-out);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.process-int-detail-panel h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.6vw, 2rem);
  line-height: 1.06;
  font-weight: 400;
  letter-spacing: -0.018em;
}
.process-int-detail-panel .body { color: var(--text-soft); font-size: 1.02rem; line-height: 1.55; }
.process-int-detail-panel .row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem;
  padding-top: 0.5rem;
}
@media (max-width: 600px) { .process-int-detail-panel .row { grid-template-columns: 1fr; } }
.process-int-detail-panel .row .stat {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
}
.process-int-detail-panel .row .stat .label {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
}
.process-int-detail-panel .row .stat .value {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-top: 0.25rem;
  color: var(--text);
}

@media (max-width: 900px) {
  .process-int { grid-template-columns: 1fr; }
  .process-int-steps {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.6rem;
    padding: 0.25rem 0 1rem;
    margin: 0 calc(-1 * var(--gutter));
    padding-left: var(--gutter);
    padding-right: var(--gutter);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .process-int-steps::-webkit-scrollbar { display: none; }
  .process-int-step {
    flex: 0 0 75%;
    scroll-snap-align: start;
  }
}

/* ============================================================
   Calculator
   ============================================================ */
.calc {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg) 100%);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(2rem, 4vw, 3rem);
  align-items: stretch;
}
@media (max-width: 900px) { .calc { grid-template-columns: 1fr; } }

.calc-controls { display: flex; flex-direction: column; gap: 1.5rem; }
.calc-controls .field { display: flex; flex-direction: column; gap: 0.45rem; }
.calc-controls label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.calc-controls select,
.calc-controls input[type=number] {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s ease;
  width: 100%;
}
.calc-controls select:focus,
.calc-controls input:focus { border-color: var(--accent); }

.calc-slider-wrap { display: flex; flex-direction: column; gap: 0.6rem; }
.calc-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--bg-3); border-radius: 2px;
  outline: none;
}
.calc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px;
  background: var(--accent); border-radius: 50%;
  box-shadow: 0 0 16px rgba(183, 255, 90, 0.5);
  cursor: pointer; border: 3px solid var(--bg);
}
.calc-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  background: var(--accent); border-radius: 50%;
  border: 3px solid var(--bg);
  cursor: pointer;
}
.calc-slider-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
}
.calc-slider-val .unit { font-size: 0.85rem; color: var(--text-dim); margin-left: 0.3rem; }

.calc-result {
  background:
    radial-gradient(ellipse at bottom right, rgba(183,255,90,0.14) 0%, transparent 55%),
    var(--bg-2);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  padding: clamp(1.5rem, 3vw, 2rem);
  display: flex; flex-direction: column; gap: 1rem;
  position: relative; overflow: hidden;
}
.calc-result .head {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.calc-result .big {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1.05;
  color: var(--text);
  letter-spacing: -0.025em;
}
.calc-result .big .accent {
  display: block;
  font-style: italic;
  color: var(--accent);
  font-size: 1em;
}
.calc-result .row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 0.85rem; border-top: 1px solid var(--line);
  font-size: 0.92rem;
}
.calc-result .row .lbl { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; }
.calc-result .row .val { font-family: var(--font-display); font-size: 1.1rem; color: var(--text); }
.calc-result small { color: var(--text-dim); font-size: 0.8rem; line-height: 1.5; }


.hero {
  position: relative;
  padding: clamp(4rem, 9vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(183,255,90,0.10) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 80%, rgba(183,255,90,0.06) 0%, transparent 55%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 { max-width: 18ch; margin: 1.5rem 0 1.75rem; }
.hero .lead { margin-bottom: 2.5rem; max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

/* Hero status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.4rem 0.85rem;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.status-pill .pulse {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  position: relative;
}
.status-pill .pulse::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.4;
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ============================================================
   Stack proof-strip — endless marquee with brand-colored chips
   ============================================================ */
.proof-strip {
  position: relative;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 0;
  overflow: hidden;
  z-index: 1;
}
.proof-strip::before,
.proof-strip::after {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: 140px; z-index: 3; pointer-events: none;
}
.proof-strip::before { left: 0;  background: linear-gradient(to right, var(--bg) 0%, transparent 100%); }
.proof-strip::after  { right: 0; background: linear-gradient(to left,  var(--bg) 0%, transparent 100%); }

.proof-label {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  z-index: 4;
  display: inline-flex; align-items: center; gap: 0.55rem;
  background: var(--bg);
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
}
.proof-label .live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  position: relative;
}
.proof-label .live::after {
  content: ""; position: absolute; inset: -2px;
  border-radius: 50%; background: var(--accent);
  opacity: 0.4;
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%   { transform: scale(0.7); opacity: 0.6; }
  100% { transform: scale(2.2); opacity: 0; }
}

.proof-track {
  display: flex; align-items: center;
  width: max-content;
  gap: 1rem;
  animation: scrollX 38s linear infinite;
}
.proof-strip:hover .proof-track { animation-play-state: paused; }

.proof-chip {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.45rem 0.95rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-soft);
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
  flex-shrink: 0;
}
.proof-chip:hover {
  color: var(--text);
  border-color: var(--line-bright);
  background: rgba(255,255,255,0.04);
  transform: translateY(-1px);
}
.proof-chip .brand-dot {
  width: 9px; height: 9px;
  border-radius: 2px;                         /* leicht eckig — wirkt techig */
  box-shadow: 0 0 10px currentColor;
  flex-shrink: 0;
}
.proof-arrow {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  opacity: 0.4;
  flex-shrink: 0;
}

@keyframes scrollX {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .proof-track { animation: none; }
}

/* ============================================================
   Card primitives
   ============================================================ */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: all 0.3s var(--ease-out);
  display: flex; flex-direction: column; gap: 0.85rem;
  height: 100%;
}
.card:hover { border-color: var(--line-bright); transform: translateY(-2px); }
.card-link { cursor: pointer; }
.card-link:hover .card-arrow { color: var(--accent); transform: translateX(4px); }
.card .icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: var(--bg-2);
  border-radius: 10px;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.card .icon svg { width: 20px; height: 20px; }
.card h3 { font-size: 1.1rem; font-weight: 500; }
.card p { color: var(--text-soft); font-size: 0.95rem; line-height: 1.55; }
.card .meta {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text-dim);
}
.card .tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.85rem; }
.card .tags span {
  font-family: var(--font-mono); font-size: 0.7rem;
  background: var(--bg-2); color: var(--text-soft);
  padding: 0.3rem 0.55rem; border-radius: 4px;
}
.card .card-arrow {
  margin-top: auto; padding-top: 0.85rem;
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.85rem; color: var(--text-soft);
  transition: all 0.2s var(--ease-out);
}

/* Numbered service cards */
.card.numbered { padding-top: 3rem; position: relative; }
.card.numbered::before {
  content: attr(data-num);
  position: absolute; top: 1.25rem; left: 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}

/* ============================================================
   Stats / Metrics
   ============================================================ */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat-cell {
  background: var(--bg-1);
  padding: 1.75rem 1.5rem;
}
.stat-cell .num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat-cell .num .small { font-size: 0.55em; color: var(--text-dim); margin-left: 0.1em; }
.stat-cell .lbl {
  margin-top: 0.65rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-dim);
}

/* ============================================================
   Tool / Stack chips (für /stack page und proof)
   ============================================================ */
.stack-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stack-cell {
  background: var(--bg-1);
  padding: 1.5rem 1rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.55rem;
  text-align: center;
  min-height: 120px;
  transition: background 0.2s ease;
}
.stack-cell:hover { background: var(--bg-2); }
.stack-cell .name { font-weight: 500; font-size: 0.92rem; }
.stack-cell .role { font-family: var(--font-mono); font-size: 0.68rem; color: var(--text-dim); letter-spacing: 0.08em; }
@media (max-width: 1100px) { .stack-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 700px)  { .stack-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px)  { .stack-grid { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   Process / Steps
   ============================================================ */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); }
@media (max-width: 900px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .process { grid-template-columns: 1fr; } }
.process-cell {
  background: var(--bg-1);
  padding: 2rem 1.75rem;
  position: relative;
}
.process-cell .step-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}
.process-cell h4 { font-size: 1.05rem; font-weight: 500; margin-bottom: 0.5rem; }
.process-cell p { font-size: 0.9rem; color: var(--text-soft); }

/* ============================================================
   Editorial split
   ============================================================ */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split.reverse > *:first-child { order: 2; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .split.reverse > *:first-child { order: 0; }
}

/* Code-style block (for premium / techie feel) */
.codeblock {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--text-soft);
  overflow-x: auto;
}
.codeblock .kw  { color: #c47dff; }
.codeblock .str { color: #b7ff5a; }
.codeblock .num { color: #ffb84d; }
.codeblock .com { color: var(--text-dim); }

/* ============================================================
   Big quote
   ============================================================ */
.quote {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  background:
    radial-gradient(ellipse at top right, rgba(183,255,90,0.08) 0%, transparent 60%),
    var(--bg-1);
  position: relative;
}
.quote .quote-text {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  line-height: 1.25;
  font-weight: 400;
  max-width: 32ch;
}
.quote .attr {
  margin-top: 1.5rem;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim);
}

/* ============================================================
   FAQ (details/summary)
   ============================================================ */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.4rem 0; cursor: pointer; list-style: none;
  font-size: 1.05rem;
  transition: color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-family: var(--font-mono); font-size: 1.4rem; color: var(--accent);
  transition: transform 0.25s var(--ease-out);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--accent); }
.faq-item .answer { padding-bottom: 1.4rem; color: var(--text-soft); max-width: 75ch; }

/* ============================================================
   CTA Band
   ============================================================ */
.cta-band {
  background:
    radial-gradient(ellipse at bottom left, rgba(183,255,90,0.14) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line-bright);
  border-radius: var(--radius-lg);
  padding: clamp(3rem, 6vw, 5rem);
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; align-items: center;
  position: relative; overflow: hidden;
}
.cta-band h2 { max-width: 18ch; }
@media (max-width: 900px) { .cta-band { grid-template-columns: 1fr; } }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  padding: clamp(4rem, 7vw, 5rem) 0 2rem;
  color: var(--text-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 1000px) { .footer-grid { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 600px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-grid h5 {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-grid ul { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-grid ul a { font-size: 0.9rem; color: var(--text-soft); }
.footer-grid ul a:hover { color: var(--accent); }
.footer-brand-block .brand { font-size: 1.4rem; margin-bottom: 1rem; }
.footer-brand-block p { max-width: 32ch; font-size: 0.9rem; color: var(--text-soft); }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding-top: 2rem;
  font-size: 0.82rem; color: var(--text-dim);
}
.footer-bottom .legal-links { display: flex; gap: 1.25rem; }

/* ============================================================
   Reveal animations
   ============================================================ */
.reveal { opacity: 0; transform: translateY(20px); transition: all 0.7s var(--ease-out); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Page-hero (für sub-pages)
   ============================================================ */
.page-hero {
  padding: clamp(4rem, 8vw, 6rem) 0 clamp(2.5rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(183,255,90,0.06) 0%, transparent 45%);
  pointer-events: none;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { margin-top: 1rem; max-width: 20ch; }
.page-hero .lead { margin-top: 1.25rem; max-width: 60ch; }

/* ============================================================
   Prose (für service/branchen/legal pages)
   ============================================================ */
.prose { max-width: 75ch; }
.prose h2 { font-family: var(--font-display); font-size: 1.8rem; font-weight: 400; margin: 2.5rem 0 1rem; letter-spacing: -0.015em; }
.prose h3 { font-size: 1.15rem; font-weight: 500; margin: 1.75rem 0 0.5rem; }
.prose p, .prose li { color: var(--text-soft); line-height: 1.7; }
.prose p, .prose ul, .prose ol { margin-bottom: 1rem; }
.prose ul { padding-left: 1.2rem; list-style: disc; }
.prose ol { padding-left: 1.2rem; list-style: decimal; }
.prose a { color: var(--accent); border-bottom: 1px solid currentColor; }
.prose a:hover { color: #c7ff7a; }
.prose strong { color: var(--text); }
.prose code {
  background: var(--bg-1);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* Inline check list */
.check-list { display: flex; flex-direction: column; gap: 0.75rem; list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding-left: 2rem;
  color: var(--text);
  line-height: 1.55;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 6px;
  width: 18px; height: 18px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5'><polyline points='20 6 9 17 4 12'/></svg>") center/12px no-repeat;
  border-radius: 4px;
}
.check-list li code {
  word-break: break-word;
  white-space: normal;
}

/* ============================================================
   RESPONSIVE OVERHAUL — mobile-first overrides (appended)
   Breakpoints:
     1024px  · tablet landscape down
      900px  · tablet portrait down
      640px  · phone landscape down
      420px  · small phone
   ============================================================ */

/* --- Global tweaks: tighter sections + smaller gaps on mobile --- */
@media (max-width: 900px) {
  :root { --gutter: 1.1rem; }
  .section { padding: clamp(3rem, 8vw, 5rem) 0; }
  .grid { gap: 1rem; }
}
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  :root { --gutter: 1rem; }
  .section { padding: 2.5rem 0; }
  .display { font-size: clamp(2.1rem, 9vw, 3.2rem); line-height: 1.02; }
  .h1 { font-size: clamp(1.7rem, 6.5vw, 2.4rem); }
  .h2 { font-size: clamp(1.35rem, 5vw, 1.9rem); }
  .lead { font-size: 1rem; }
  /* Buttons: full-width within their container for thumbable tap targets */
  .btn { padding: 0.8rem 1.2rem; font-size: 0.92rem; }
  .btn-sm { padding: 0.55rem 0.95rem; font-size: 0.82rem; }
}

/* --- Hero split: stack vertically + scale terminal --- */
@media (max-width: 1000px) {
  .hero-split {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .hero-terminal-wrap { max-width: 100%; }
}
@media (max-width: 640px) {
  .hero-terminal,
  .hero-terminal-wrap {
    font-size: 0.78rem;
  }
  /* Hide the terminal on the smallest screens — it's noise without context */
  .hero-terminal-wrap { display: none; }
}

/* --- Page hero (sub-pages): tighter padding on phone --- */
@media (max-width: 640px) {
  .page-hero { padding: 2.5rem 0 1.5rem; }
}

/* --- Header: nav already collapses at 1180px; make CTA tighter --- */
@media (max-width: 640px) {
  .site-header .header-inner { padding-top: 0.85rem; padding-bottom: 0.85rem; }
  .brand { font-size: 1.3rem; }
  .header-cta .btn { padding: 0.55rem 0.95rem; font-size: 0.82rem; }
}

/* --- Mobile menu nav typography --- */
@media (max-width: 480px) {
  .mobile-menu nav summary,
  .mobile-menu nav a {
    font-size: 1.35rem !important;
  }
}

/* --- Breadcrumbs: keep on one line, scroll horizontally if too long --- */
@media (max-width: 640px) {
  .breadcrumbs ol {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0.65rem 0;
    font-size: 0.65rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .breadcrumbs ol::-webkit-scrollbar { display: none; }
  .breadcrumbs li { white-space: nowrap; }
}

/* --- CTA band: stack + center on mobile --- */
@media (max-width: 640px) {
  .cta-band { padding: 1.75rem 1.25rem; gap: 1.5rem !important; }
  .cta-band > div:last-child { width: 100%; }
  .cta-band .btn { width: 100%; justify-content: center; }
}

/* --- Cards: shrink padding on phone (override inline styles too) --- */
@media (max-width: 640px) {
  .card,
  .card[style*="padding"] { padding: 1.5rem 1.25rem !important; }
  .card h3 { font-size: 1rem; }
  .card h2 { font-size: 1.85rem !important; }
}

/* --- Stats row: 2-col, then 1-col on tiny --- */
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
}

/* --- Stack grid: 2 cols on phone --- */
@media (max-width: 420px) {
  .stack-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .stack-cell { padding: 0.85rem 0.6rem; font-size: 0.78rem; }
}

/* --- Process steps: full stack on small phones --- */
@media (max-width: 420px) {
  .process-int-tabs { flex-wrap: wrap; }
  .process-int-tab { flex: 1 1 calc(50% - 0.4rem); }
}

/* --- Try-it-yourself form: stack buttons + adjust textarea --- */
@media (max-width: 640px) {
  .tryit-form textarea {
    min-height: 120px;
    font-size: 0.95rem;
  }
  .tryit-actions { flex-direction: column; align-items: stretch !important; gap: 0.85rem !important; }
  .tryit-actions .btn { width: 100%; justify-content: center; }
  .tryit-result-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
}

/* --- Cookie banner: full width on phone --- */
@media (max-width: 520px) {
  .cookie-banner {
    left: 0.75rem; right: 0.75rem; bottom: 0.75rem;
    max-width: none;
    padding: 1.1rem;
  }
  .cookie-banner-actions { flex-direction: column; }
  .cookie-banner-actions .btn { width: 100%; justify-content: center; }
}

/* --- Footer: full stack on small phones --- */
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr !important; gap: 2rem; }
  .footer-grid h5 { margin-bottom: 0.6rem; }
}

/* --- Calculator: prevent overflow --- */
@media (max-width: 640px) {
  .calc { padding: 1.5rem 1.2rem; }
  .calc-output .val { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}

/* --- Dashboard demo: horizontal scroll on small screens, tighter --- */
@media (max-width: 760px) {
  .adsmgr { border-radius: 10px; }
  .adsmgr-topbar { padding: 0.5rem 0.7rem; }
  .adsmgr-topbar .search { display: none; }
  .adsmgr-topbar .brand { font-size: 0.92rem; }
  .adsmgr-tabbar { padding: 0.4rem 0.5rem; overflow-x: auto; flex-wrap: nowrap; }
  .adsmgr-tabbar::-webkit-scrollbar { display: none; }
  .adsmgr-tab { flex-shrink: 0; padding: 0.4rem 0.7rem; font-size: 0.78rem; }
  .adsmgr-tabbar .seg { display: none; }
  .adsmgr-kpis { grid-template-columns: repeat(2, 1fr) !important; }
  .adsmgr-kpi { padding: 0.85rem 0.85rem; }
  .adsmgr-kpi .val { font-size: 1.35rem; }
  .adsmgr-kpi .lbl { font-size: 0.65rem; }
  .adsmgr-chart-head .metrics { gap: 0.4rem; font-size: 0.72rem; }
  .adsmgr-chart { height: 180px; }
  .adsmgr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .adsmgr-table { min-width: 640px; font-size: 0.78rem; }
  .adsmgr-table th, .adsmgr-table td { padding: 0.55rem 0.5rem; }
}
@media (max-width: 420px) {
  .adsmgr-topbar .live-tag { display: none; }
  .adsmgr-kpis { grid-template-columns: 1fr !important; }
}

/* --- Demo teaser preview: simpler grid on phone --- */
@media (max-width: 520px) {
  .demo-teaser { padding: 1.5rem 1.25rem; gap: 1.5rem; }
  .demo-teaser-preview .mini-grid { grid-template-columns: 1fr 1fr !important; }
}

/* --- Tags / pills: wrap properly + shrink on phone --- */
@media (max-width: 640px) {
  .tags { gap: 0.4rem; }
  .tags span { font-size: 0.7rem !important; padding: 0.3rem 0.55rem !important; }
}

/* --- FAQ: tighter spacing on phone --- */
@media (max-width: 640px) {
  .faq-item summary { font-size: 1rem; padding: 1rem 0; }
  .faq-item .answer { font-size: 0.92rem; padding-bottom: 1rem; }
}

/* --- Tables in prose / articles: horizontal scroll --- */
@media (max-width: 640px) {
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose pre { overflow-x: auto; font-size: 0.78rem; padding: 0.9rem 1rem; }
}

/* --- Article hero meta wraps better --- */
@media (max-width: 640px) {
  .article-meta { flex-wrap: wrap; gap: 0.45rem 0.85rem; font-size: 0.74rem; }
}

/* --- Pricing tiers (preise page): stack to single column --- */
@media (max-width: 900px) {
  .pricing-tiers { grid-template-columns: 1fr !important; gap: 1.25rem; }
  .pricing-tier.featured { transform: none !important; }
}

/* --- Standorte: lists wrap --- */
@media (max-width: 640px) {
  .standorte-list { grid-template-columns: 1fr !important; gap: 0.6rem; }
}

/* --- Generic: prevent any overflow-x on body --- */
html, body { max-width: 100vw; overflow-x: clip; }

/* --- Flagship card: 2-col desktop, stacks on tablet+phone --- */
.flagship-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0;
  align-items: stretch;
}
@media (max-width: 900px) {
  .flagship-grid { grid-template-columns: 1fr; }
  .flagship-grid > div:last-child {
    border-left: none !important;
    border-top: 1px solid var(--line) !important;
  }
}
@media (max-width: 640px) {
  /* Hide the terminal demo on phone — too noisy without context */
  .flagship-grid > div:last-child { display: none; }
}

/* --- Override inline grid-template-columns on phone (cases.html, leistungen.html etc.) --- */
@media (max-width: 900px) {
  /* 2-col layouts with fr-units stack on tablet+phone */
  [style*="grid-template-columns:1.1fr 1fr"],
  [style*="grid-template-columns: 1.1fr 1fr"],
  [style*="grid-template-columns:1.2fr 1fr"],
  [style*="grid-template-columns: 1.2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 640px) {
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  [style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 420px) {
  [style*="grid-template-columns:repeat(2"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns:repeat(3"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] {
    grid-template-columns: 1fr !important;
  }
}

/* --- Override inline flex with wrap=nowrap on mobile (CTA rows etc.) --- */
@media (max-width: 640px) {
  [style*="display:flex"][style*="flex-wrap:wrap"] .btn,
  [style*="display:flex"][style*="gap"]:has(> .btn + .btn) .btn {
    width: 100%;
    justify-content: center;
  }
}

/* --- Touch-friendly tap targets: minimum 44×44 buttons on touch devices --- */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-link, .faq-item summary, .adsmgr-acct, .adsmgr-tab,
  .mobile-menu nav a, .mobile-menu nav summary {
    min-height: 44px;
  }
}

/* --- Reduce dramatic animations on mobile (perf + battery) --- */
@media (max-width: 640px) {
  .reveal { transition-duration: 0.4s !important; }
  .reveal.delay-1, .reveal.delay-2, .reveal.delay-3 { transition-delay: 0s !important; }
}

/* ============================================================
   CMD+K Command Palette (global search)
   ============================================================ */
.cmdk-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem 0.45rem 0.6rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}
.cmdk-trigger:hover { color: var(--text); border-color: var(--line-bright); background: var(--bg-2); }
.cmdk-trigger kbd {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text-dim);
}
@media (max-width: 1180px) { .cmdk-trigger { display: none; } }

.cmdk {
  position: fixed; inset: 0; z-index: 250;
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: clamp(4rem, 12vh, 10rem);
  pointer-events: none;
}
.cmdk.open {
  display: flex;
  pointer-events: auto;
  animation: cmdkFadeIn 0.18s ease-out;
}
@keyframes cmdkFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.cmdk-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 7, 9, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cmdk-panel {
  position: relative;
  width: min(640px, calc(100vw - 2rem));
  max-height: min(560px, calc(100vh - 8rem));
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow:
    0 30px 80px -20px rgba(0,0,0,0.7),
    0 0 0 1px rgba(183,255,90,0.08);
  animation: cmdkSlideIn 0.22s var(--ease-out);
}
@keyframes cmdkSlideIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.cmdk-icon { color: var(--text-dim); display: flex; }
#cmdk-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--text);
}
#cmdk-input::placeholder { color: var(--text-dim); }
.cmdk-kbd, .cmdk-footer kbd {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  color: var(--text-soft);
  margin-right: 0.15rem;
}
.cmdk-results {
  overflow-y: auto;
  padding: 0.4rem;
  flex: 1;
  scrollbar-width: thin;
}
.cmdk-results::-webkit-scrollbar { width: 6px; }
.cmdk-results::-webkit-scrollbar-thumb { background: var(--line-bright); border-radius: 3px; }
.cmdk-group {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 0.85rem 0.85rem 0.4rem;
  font-weight: 500;
}
.cmdk-item {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}
.cmdk-item:hover, .cmdk-item.active {
  background: rgba(183,255,90,0.06);
  color: var(--text);
}
.cmdk-item .cmdk-item-icon {
  width: 28px; height: 28px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  text-transform: uppercase;
}
.cmdk-item.active .cmdk-item-icon { border-color: rgba(183,255,90,0.3); color: var(--accent); }
.cmdk-item-body { flex: 1; min-width: 0; }
.cmdk-item-title { font-size: 0.94rem; color: var(--text); font-weight: 500; }
.cmdk-item-title mark { background: rgba(183,255,90,0.22); color: var(--accent); padding: 0 0.1rem; border-radius: 2px; }
.cmdk-item-desc {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical;
}
.cmdk-item-cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}
.cmdk-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.cmdk-empty .accent { color: var(--accent); }
.cmdk-footer {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.7rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-wrap: wrap;
}
.cmdk-footer .cmdk-brand {
  margin-left: auto;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  color: var(--text-soft);
}
@media (max-width: 600px) {
  .cmdk { padding-top: 4rem; }
  .cmdk-panel { max-height: calc(100vh - 5rem); width: calc(100vw - 1.5rem); }
  .cmdk-footer { font-size: 0.66rem; gap: 0.5rem; }
  .cmdk-footer .cmdk-brand { display: none; }
}

/* ============================================================
   Compare-Grid — Before/After cards (Dashboard-Demo)
   ============================================================ */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.compare-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.compare-card:hover { border-color: var(--line-bright); }
.compare-card-head {
  display: flex; align-items: baseline; gap: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.compare-card-head .num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  color: var(--text-dim);
  font-weight: 500;
}
.compare-card-head h3 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
}
.compare-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  position: relative;
}
.compare-card-body::after {
  content: "";
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: var(--line);
  transform: translateX(-50%);
  pointer-events: none;
}
.compare-card-body .col {
  display: flex; flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}
.compare-card-body .col .lbl {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.compare-card-body .col.before .lbl { color: var(--danger); opacity: 0.85; }
.compare-card-body .col.after  .lbl { color: var(--accent); }
.compare-card-body .col .metric {
  font-family: var(--font-display);
  font-size: 1.65rem;
  line-height: 1.1;
  color: var(--text-soft);
  font-weight: 400;
}
.compare-card-body .col .metric.gain { color: var(--accent); }
.compare-card-body .col .desc {
  font-size: 0.92rem;
  color: var(--text-soft);
  line-height: 1.55;
}
.compare-card .impact {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.01em;
}
.compare-card-human {
  background: linear-gradient(135deg, var(--bg) 0%, rgba(196,125,255,0.04) 100%);
  border-color: rgba(196,125,255,0.2);
}
.compare-card-human .compare-card-head .num { color: #c47dff; }
.compare-card-human .compare-card-body::after { display: none; }

@media (max-width: 720px) {
  .compare-card-body { grid-template-columns: 1fr; }
  .compare-card-body::after { display: none; }
  .compare-card-body .col.before { padding-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
}

/* ============================================================
   Glossar-Link auto-highlight in articles (build-time linked)
   ============================================================ */
.prose .glossar-link {
  color: var(--accent);
  background: linear-gradient(transparent 60%, rgba(183,255,90,0.12) 60%);
  text-decoration: none;
  border-bottom: 1px dotted rgba(183,255,90,0.4);
  padding: 0 1px;
  transition: background 0.2s ease;
  cursor: help;
}
.prose .glossar-link:hover {
  background: linear-gradient(transparent 60%, rgba(183,255,90,0.25) 60%);
  border-bottom-color: var(--accent);
}

/* Glossar hover preview card */
.glossar-tooltip {
  position: fixed;
  z-index: 300;
  max-width: 340px;
  background: var(--bg-1);
  border: 1px solid var(--line-bright);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: 0 20px 50px -15px rgba(0,0,0,0.6);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.glossar-tooltip.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.glossar-tooltip .tt-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.glossar-tooltip .tt-term {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.45rem;
  line-height: 1.25;
}
.glossar-tooltip .tt-short {
  font-size: 0.85rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.glossar-tooltip .tt-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

/* ============================================================
   Reading progress bar (long articles)
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 110;
  pointer-events: none;
}
.reading-progress .bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent) 0%, #84c83a 100%);
  box-shadow: 0 0 8px var(--accent);
  transition: width 0.08s ease-out;
  border-radius: 0 2px 2px 0;
}

/* ============================================================
   Custom scrollbar (subtle, on-brand)
   ============================================================ */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-bright) transparent;
}
*::-webkit-scrollbar {
  width: 10px; height: 10px;
}
*::-webkit-scrollbar-track {
  background: transparent;
}
*::-webkit-scrollbar-thumb {
  background: var(--line-bright);
  border-radius: 5px;
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* ============================================================
   View Transitions API — smooth crossfade between pages
   ============================================================ */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 260ms;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
::view-transition-old(root) {
  animation-name: vt-fade-out;
}
::view-transition-new(root) {
  animation-name: vt-fade-in;
}
@keyframes vt-fade-out {
  to { opacity: 0; transform: translateY(-4px); }
}
@keyframes vt-fade-in {
  from { opacity: 0; transform: translateY(4px); }
}

/* Don't animate hero brand-dot during transitions (already animates) */
::view-transition-image-pair(brand) {
  animation: none;
}

/* ============================================================
   SEO-Audit-Fix: replaced <h5> in nav/footer with <p> labels
   ============================================================ */
.dropdown-group-label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.footer-col-label {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--text-dim);
  margin-bottom: 0.9rem;
  font-weight: 500;
}

/* Replaced <h4> in process-int-step buttons with <span class="step-title"> */
.step-title {
  display: block;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-top: 0.5rem;
}
