:root {
  --void: #05070f;
  --paper: #0a0e1f;
  --surface: #10162d;
  --surface-2: #161d3a;
  --ink: #eef1fa;
  --ink-2: #c3cbe3;
  --muted: #8a94b8;
  --line: rgba(167, 166, 255, .18);
  --line-strong: rgba(167, 166, 255, .38);
  --accent: #a8a6ff;
  --accent-dark: #7771dd;
  --blue: #6ea8ff;
  --teal: #4fd8b0;
  --gold: #e3b65c;
  --rose: #ff8aaf;
  --danger: #ff8585;
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--accent);
  --shadow: 0 18px 48px rgba(3, 5, 12, .44), 0 0 32px rgba(139, 135, 244, .07);
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-ui: 'Outfit', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink-2);
  font-family: var(--font-ui);
  background-color: var(--paper);
  background-image:
    radial-gradient(900px 540px at 10% -8%, rgba(107, 86, 217, .17), transparent 62%),
    radial-gradient(760px 460px at 95% 6%, rgba(46, 92, 214, .13), transparent 62%),
    repeating-linear-gradient(to right, rgba(167, 166, 255, .035) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(to bottom, rgba(167, 166, 255, .035) 0 1px, transparent 1px 34px);
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 47%, rgba(227, 182, 92, .035) 50%, transparent 53%);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button, a, select { touch-action: manipulation; -webkit-tap-highlight-color: rgba(168, 166, 255, .18); }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 99; padding: .75rem 1rem; background: var(--ink); color: var(--paper); border-radius: .55rem; }
.skip-link:focus { top: 1rem; }
.shell { width: min(1480px, calc(100% - 2rem)); margin: 0 auto; padding: 1.2rem 0 4rem; position: relative; }
.shell--narrow { width: min(850px, calc(100% - 2rem)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 0 1.3rem; border-bottom: 1px solid var(--line); }
.brand { min-height: 46px; display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand strong { color: var(--ink); display: block; letter-spacing: .01em; }
.brand small, .eyebrow { color: var(--gold); font: 600 .68rem/1.3 var(--font-mono); letter-spacing: .13em; text-transform: uppercase; }
.topnav { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; }
.topnav a { min-height: 46px; display: inline-flex; align-items: center; padding: .55rem .7rem; color: var(--ink-2); text-decoration: none; border-radius: .55rem; }
.topnav a:hover, .topnav a[aria-current="page"] { color: var(--ink); background: rgba(168, 166, 255, .09); }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 2rem; padding: clamp(2.2rem, 6vw, 5.5rem) 0 2.2rem; }
.hero--public { grid-template-columns: 1fr; max-width: 780px; }
h1, h2, h3 { color: var(--ink); margin-top: 0; }
h1, h2, h3 { text-wrap: balance; scroll-margin-top: 1rem; }
h1 { margin-bottom: .6rem; font: 700 clamp(2.4rem, 6vw, 5rem)/.95 var(--font-display); letter-spacing: -.035em; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
.lede { max-width: 720px; margin: 0; color: var(--ink-2); font-size: clamp(1rem, 2vw, 1.15rem); line-height: 1.65; }
.constellation { display: grid; grid-template-columns: repeat(3, 72px); gap: 9px; transform: rotate(-3deg); }
.constellation span { display: grid; place-items: center; height: 72px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: rgba(16, 22, 45, .68); font: 700 .67rem var(--font-mono); text-transform: uppercase; }
.constellation span:nth-child(2) { color: var(--gold); transform: translateY(-14px); }
.constellation span:nth-child(3) { color: var(--teal); }
.toolbar { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .8rem; padding: 1rem; border: 1px solid var(--line); background: rgba(16, 22, 45, .78); border-radius: 1rem; box-shadow: var(--shadow); }
.toolbar__group { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; }
.field { display: grid; gap: .35rem; }
.field > span, label > span { color: var(--muted); font: 600 .7rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
input, select, textarea { min-height: 44px; width: 100%; padding: .7rem .8rem; color: var(--ink); background: var(--void); border: 1px solid var(--line-strong); border-radius: .6rem; }
textarea { min-height: 132px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #737d9f; }
.button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .65rem 1rem; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: .65rem; text-decoration: none; font-weight: 700; }
.button:hover { border-color: var(--accent); transform: translateY(-1px); }
.button--primary { color: #080b18; border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--blue)); }
.button--quiet { background: transparent; }
.button--danger { border-color: rgba(255,133,133,.45); color: #ffc3c3; }
.button--small { min-height: 44px; padding: .45rem .7rem; font-size: .85rem; }
.status { display: inline-flex; align-items: center; gap: .4rem; padding: .26rem .55rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font: 650 .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--published, .status--resolved, .status--open { color: var(--teal); }
.status--reviewing, .status--scheduled { color: var(--gold); }
.status--closed, .status--declined { color: var(--muted); }
.status--error { color: var(--danger); }
.tabs { display: flex; gap: .35rem; margin: 1.2rem 0; overflow-x: auto; scrollbar-width: thin; }
.tab { min-height: 46px; flex: 0 0 auto; padding: .72rem 1rem; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; font-weight: 700; }
.tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.panel[hidden] { display: none; }
.grid { display: grid; gap: 1rem; }
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { position: relative; overflow: hidden; min-height: 148px; padding: 1.15rem; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg, rgba(22,29,58,.92), rgba(10,14,31,.94)); }
.kpi::after { content: ''; position: absolute; right: -30px; bottom: -32px; width: 92px; height: 92px; border: 1px solid var(--line); border-radius: 50%; }
.kpi__label { color: var(--muted); font: 600 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.kpi__value { display: block; margin: .5rem 0 .25rem; color: var(--ink); font: 700 clamp(2rem, 4vw, 3.1rem)/1 var(--font-display); font-variant-numeric: tabular-nums; }
.kpi__trend { color: var(--teal); font-size: .8rem; }
.kpi__trend--down { color: var(--rose); }
.split { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, .75fr); gap: 1rem; margin-top: 1rem; }
.card { border: 1px solid var(--line); border-radius: 1rem; background: rgba(16, 22, 45, .86); box-shadow: 0 12px 32px rgba(3,5,12,.28); }
.card__head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1rem 1rem .7rem; border-bottom: 1px solid var(--line); }
.card__head h2, .card__head h3 { margin-bottom: .2rem; }
.card__head p { margin: 0; color: var(--muted); font-size: .85rem; }
.card__body { padding: 1rem; }
.chart { min-height: 270px; display: grid; place-items: center; }
.chart svg { width: 100%; height: 260px; overflow: visible; }
.chart text { fill: var(--muted); font: 11px var(--font-mono); }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 3; vector-effect: non-scaling-stroke; }
.chart .area { fill: url(#areaFill); }
.chart .point { fill: var(--paper); stroke: var(--accent); stroke-width: 2; }
.funnel { display: grid; gap: .7rem; }
.funnel__row { display: grid; grid-template-columns: 130px 1fr 60px; gap: .7rem; align-items: center; }
.funnel__bar { width: 100%; height: 12px; appearance: none; border: 0; border-radius: 999px; overflow: hidden; background: var(--void); }
.funnel__bar::-webkit-progress-bar { background: var(--void); border-radius: 999px; }
.funnel__bar::-webkit-progress-value { background: linear-gradient(90deg, var(--accent-dark), var(--blue)); border-radius: 999px; }
.funnel__bar::-moz-progress-bar { background: linear-gradient(90deg, var(--accent-dark), var(--blue)); border-radius: 999px; }
.list { display: grid; gap: .75rem; }
.list-item { padding: 1rem; border: 1px solid var(--line); border-radius: .8rem; background: rgba(5, 7, 15, .36); overflow-wrap: anywhere; }
.list-item__top { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.list-item h3 { margin-bottom: .2rem; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; color: var(--muted); font-size: .77rem; }
.list-item p { line-height: 1.55; }
.list-item__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .7rem; }
.empty, .notice { padding: 1.2rem; text-align: center; border: 1px dashed var(--line-strong); border-radius: .8rem; color: var(--muted); }
.notice { text-align: left; border-style: solid; }
.notice--privacy { border-left: 3px solid var(--teal); }
.notice--error { border-color: rgba(255,133,133,.45); color: #ffc3c3; }
.notice--success { border-color: rgba(79,216,176,.45); color: #a9f0d8; }
.state { min-height: 48vh; display: grid; place-items: center; text-align: center; }
.state__inner { max-width: 560px; }
.state h1 { font-size: clamp(2.5rem, 7vw, 4.5rem); }
.loader { width: 34px; height: 34px; margin: 0 auto 1rem; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-grid { display: grid; gap: .9rem; }
.form-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.counter { justify-self: end; color: var(--muted); font: .7rem var(--font-mono); }
.question-builder { display: grid; gap: .7rem; }
.builder-row { display: grid; grid-template-columns: 1fr 150px auto; gap: .6rem; align-items: end; padding: .75rem; border: 1px solid var(--line); border-radius: .7rem; }
.builder-row__wide { grid-column: 1 / -1; }
.selection-field { min-width: 0; margin: 0; padding: .8rem; border: 1px solid var(--line-strong); border-radius: .7rem; }
.selection-field legend { padding: 0 .35rem; color: var(--muted); font: 600 .7rem var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.selection-list { display: grid; gap: .55rem; }
.selection-option { min-height: 44px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .65rem; padding: .65rem; border: 1px solid var(--line); border-radius: .6rem; cursor: pointer; }
.selection-option:hover, .selection-option:focus-within { border-color: var(--accent); background: rgba(168, 166, 255, .06); }
.selection-option input { width: 20px; min-height: 20px; height: 20px; margin: 0; }
.selection-option span { min-width: 0; overflow-wrap: anywhere; }
.compact { margin: 0; padding: .75rem; }
.toast-region { position: fixed; z-index: 80; right: 1rem; bottom: 1rem; display: grid; gap: .5rem; width: min(390px, calc(100% - 2rem)); }
.toast { padding: .85rem 1rem; color: var(--ink); background: #1b2346; border: 1px solid var(--line-strong); border-radius: .7rem; box-shadow: var(--shadow); }
.dialog { width: min(620px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow: auto; overscroll-behavior: contain; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 1rem; box-shadow: var(--shadow); }
.dialog::backdrop { background: rgba(2, 4, 12, .78); backdrop-filter: blur(5px); }
.dialog__body { padding: 1.2rem; }
.dialog__actions { display: flex; justify-content: flex-end; gap: .6rem; padding: 1rem 1.2rem; border-top: 1px solid var(--line); }
.timeline { position: relative; display: grid; gap: 1rem; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 12px; bottom: 12px; width: 1px; background: var(--line-strong); }
.change { position: relative; margin-left: 46px; padding: 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: rgba(16,22,45,.9); overflow-wrap: anywhere; }
.change::before { content: ''; position: absolute; left: -38px; top: 21px; width: 12px; height: 12px; background: var(--paper); border: 3px solid var(--accent); border-radius: 50%; }
.change__category { color: var(--gold); font: 600 .68rem var(--font-mono); text-transform: uppercase; letter-spacing: .1em; }
.change__thanks { padding: .65rem .75rem; border-left: 2px solid var(--teal); background: rgba(79,216,176,.07); color: #bdebdc; font-size: .88rem; }
.receipt { padding: 1.1rem; border: 1px solid rgba(79,216,176,.45); border-radius: .8rem; background: rgba(79,216,176,.07); }
.tracking-code { display: block; margin: .6rem 0; color: var(--ink); font: 700 1.35rem var(--font-mono); letter-spacing: .09em; overflow-wrap: anywhere; }
.survey-question { border: 1px solid var(--line); }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.space-top-1 { margin-top: 1rem; }
.space-top-12 { margin-top: 1.2rem; }
.text-center { text-align: center; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; padding-inline: .25rem; color: var(--ink-2); }
[hidden] { display: none !important; }

@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .constellation { display: none; }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .shell, .shell--narrow { width: min(100% - 1rem, 1480px); }
  .topbar { align-items: flex-start; }
  .topnav { justify-content: flex-end; }
  .brand small { display: none; }
  .hero { padding-top: 2.5rem; }
  .kpi-grid, .form-grid--two { grid-template-columns: 1fr; }
  .toolbar, .toolbar__group { align-items: stretch; }
  .toolbar__group, .toolbar__group .field { width: 100%; }
  .funnel__row { grid-template-columns: 100px 1fr 44px; }
  .builder-row { grid-template-columns: 1fr; }
  .list-item__top { display: grid; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .button:hover { transform: none; }
}
@media (forced-colors: active) {
  .card, .kpi, .toolbar, .list-item, input, select, textarea, .button { border-color: CanvasText; }
}
