:root {
  --ed-bg: #05060a;
  --ed-line: rgba(255,255,255,.08);
  --ed-text: #f4f4f7;
  --ed-muted: #8d8d9b;
  --ed-accent: #dc2626;
  --ed-accent-soft: rgba(220, 38, 38, .16);
  --ed-ease: cubic-bezier(.22, 1, .36, 1);
  --ed-top: 58px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  overflow-x: clip;
  background: var(--ed-bg);
}
html, body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  background: var(--ed-bg);
  color: var(--ed-text);
  font-family: Lexend, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
  color: #ffd0d0;
  background: rgba(255,255,255,.04);
  padding: .08em .35em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
button, input { font: inherit; }
.ed-glow {
  pointer-events: none;
  position: fixed;
  inset: 0 auto auto 0;
  width: 100%;
  height: 48vh;
  background: radial-gradient(70% 80% at 50% -10%, rgba(220,38,38,.16), transparent 70%);
}
.ed-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(5,6,10,.92);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--ed-line);
}
.ed-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  min-height: var(--ed-top);
  padding: 10px 16px;
}
.ed-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  min-width: 0;
}
.ed-mark { width: 26px; height: 26px; flex-shrink: 0; }
.ed-word { font-weight: 650; font-size: 14px; }
.ed-badge {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #ffd4d4;
  background: var(--ed-accent-soft);
  border: 1px solid rgba(220,38,38,.28);
  padding: 3px 7px;
  border-radius: 999px;
}
.ed-nav {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--ed-line);
}
.ed-nav a {
  position: relative;
  z-index: 1;
  text-decoration: none;
  font-size: 13px;
  color: var(--ed-muted);
  padding: 7px 14px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .2s;
}
.ed-nav a:hover, .ed-nav a.is-on { color: #fff; }
.ed-sub {
  display: none;
  border-top: 1px solid var(--ed-line);
}
.ed-top.is-docs .ed-sub {
  display: block;
  animation: edRise .35s var(--ed-ease);
}
.ed-pills {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 14px 12px;
}
.ed-pills::-webkit-scrollbar { display: none; }
.ed-pills a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 550;
  color: var(--ed-muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--ed-line);
  padding: 8px 14px;
  border-radius: 999px;
  transition: color .25s var(--ed-ease), background .25s var(--ed-ease), border-color .25s var(--ed-ease), transform .25s var(--ed-ease);
}
.ed-pills a:hover { color: #fff; background: rgba(255,255,255,.1); }
.ed-pills a.is-on {
  color: #fff;
  background: var(--ed-accent-soft);
  border-color: rgba(220,38,38,.4);
}
.ed-wrap {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 72px;
  min-width: 0;
}
.ed-view { display: none; min-width: 0; }
.ed-view.is-on { display: block; animation: edRise .45s var(--ed-ease); }
@keyframes edRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.ed-hero { text-align: center; margin: 0 auto 22px; max-width: 36rem; }
.ed-kicker {
  margin: 0 0 8px;
  color: #f87171;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.ed-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 650;
  letter-spacing: -.04em;
  line-height: 1.1;
}
.ed-lead { color: var(--ed-muted); margin: 0 auto; max-width: 40ch; font-size: 14.5px; }
.ed-play {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--ed-line);
  border-radius: 20px;
  background: rgba(255,255,255,.03);
  padding: 12px;
}
.ed-play-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  min-width: 0;
}
.ed-tabs, .ed-size {
  position: relative;
  display: flex;
  min-width: 0;
  max-width: 100%;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--ed-line);
}
.ed-tabs button, .ed-size button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ed-muted);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.ed-tabs button.is-on, .ed-size button.is-on { color: #fff; }
.ed-tab-mark {
  position: absolute;
  top: 3px;
  left: 3px;
  height: calc(100% - 6px);
  width: 64px;
  border-radius: 999px;
  background: rgba(255,255,255,.1);
  transition: transform .34s var(--ed-ease), width .34s var(--ed-ease);
  pointer-events: none;
}
.ed-window {
  min-width: 0;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.1);
  background: #07080c;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  margin-inline: auto;
  transition: max-width .45s var(--ed-ease);
}
.ed-window.is-small { max-width: 420px; }
.ed-window-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: linear-gradient(180deg, #16171d, #101117);
  border-bottom: 1px solid var(--ed-line);
}
.ed-dots { display: flex; gap: 5px; flex-shrink: 0; }
.ed-dots i {
  width: 8px; height: 8px; border-radius: 50%; display: block;
  background: #3a3b44;
}
.ed-dots i:nth-child(1) { background: #ff5f57; }
.ed-dots i:nth-child(2) { background: #febc2e; }
.ed-dots i:nth-child(3) { background: #28c840; }
.ed-window-url {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #9a9aa6;
  background: rgba(0,0,0,.35);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.ed-stage {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
  overflow: hidden;
  background: #000;
  isolation: isolate;
  contain: layout paint;
}
.ed-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.ed-veil {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  background: #08090d;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s var(--ed-ease);
}
.ed-veil.is-on { opacity: 1; }
.ed-spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.15);
  border-top-color: var(--ed-accent);
  animation: edSpin .7s linear infinite;
}
@keyframes edSpin { to { transform: rotate(360deg); } }
.ed-window-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  height: 32px;
  padding: 0 12px;
  font-size: 11px;
  color: var(--ed-muted);
  border-top: 1px solid var(--ed-line);
  background: #0b0c11;
}
.ed-window-foot span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#eventCount { color: #fff; font-variant-numeric: tabular-nums; }
.ed-bar { display: grid; gap: 10px; margin-top: 12px; min-width: 0; }
.ed-bar-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  min-width: 0;
}
.ed-field {
  display: grid;
  gap: 5px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ed-muted);
  min-width: 0;
}
.ed-field.is-off, .ed-tog.is-off { display: none; }
.ed-field input, #fieldColor {
  width: 100%;
  min-width: 0;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--ed-line);
  color: #fff;
  border-radius: 11px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.ed-field input:focus {
  outline: none;
  border-color: rgba(220,38,38,.5);
}
.ed-color { display: flex; gap: 6px; min-width: 0; }
.ed-color input[type="color"] {
  width: 42px;
  height: 40px;
  padding: 0;
  flex-shrink: 0;
  border-radius: 11px;
  cursor: pointer;
}
.ed-togs, .ed-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ed-tog {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: #d8d8e2;
  cursor: pointer;
  padding: 6px 10px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--ed-line);
}
.ed-tog:has(input:checked) {
  background: var(--ed-accent-soft);
  border-color: rgba(220,38,38,.3);
}
.ed-tog input { position: absolute; opacity: 0; width: 0; height: 0; }
.ed-tog-ui {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: #2a2b34;
  position: relative;
  flex-shrink: 0;
}
.ed-tog-ui::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  transition: transform .25s var(--ed-ease);
}
.ed-tog input:checked + .ed-tog-ui { background: var(--ed-accent); }
.ed-tog input:checked + .ed-tog-ui::after { transform: translateX(12px); }
.ed-btn {
  appearance: none;
  border: 0;
  background: var(--ed-accent);
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ed-btn.is-ok { background: #16a34a; }
.ed-btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--ed-line); }
.ed-code {
  position: relative;
  margin: 12px 0 0;
  padding: 12px 14px;
  max-width: 100%;
  background: rgba(0,0,0,.4);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  font-size: 12px;
  line-height: 1.55;
  color: #d5d5e0;
  border: 1px solid var(--ed-line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.ed-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.ed-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 8px;
  cursor: pointer;
}
.ed-copy.is-ok { background: #16a34a; }
.ed-docs { max-width: 720px; margin: 0 auto; }
.ed-doc-kicker {
  margin: 0 0 8px;
  color: #f87171;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.ed-docs h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 6vw, 36px);
  letter-spacing: -.03em;
}
.ed-docs article { display: none; }
.ed-docs article.is-on {
  display: block;
  animation: edDocIn .4s var(--ed-ease);
}
.ed-docs article.is-on.from-left { animation-name: edDocInLeft; }
.ed-docs article.is-on.from-right { animation-name: edDocInRight; }
@keyframes edDocIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes edDocInRight {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: none; }
}
@keyframes edDocInLeft {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: none; }
}
.ed-docs p { color: var(--ed-muted); margin: 0 0 12px; font-size: 14.5px; }
.ed-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--ed-line);
  font-size: 13px;
}
.ed-routes {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.ed-route {
  margin: 0;
  padding: 12px 12px 10px;
  border: 1px solid var(--ed-line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.ed-route-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.ed-route-top strong {
  font-size: 14px;
  font-weight: 650;
}
.ed-route-top span {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ed-muted);
}
.ed-route-path {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.4);
  border: 1px solid var(--ed-line);
  min-width: 0;
}
.ed-route-path code {
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0;
  color: #d5d5e0;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.ed-route-path em {
  font-style: normal;
  color: #f87171;
}
.ed-route-path .ed-copy {
  position: static;
  flex-shrink: 0;
}
.ed-table-wrap { overflow-x: auto; max-width: 100%; margin: 10px 0; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; vertical-align: top; padding: 10px 10px 10px 0; border-bottom: 1px solid var(--ed-line); }
th { color: var(--ed-muted); font-weight: 500; }
.ed-foot {
  border-top: 1px solid var(--ed-line);
  padding: 24px 16px 40px;
  color: var(--ed-muted);
  font-size: 12px;
  text-align: center;
}
.ed-foot a { color: #d4d4dc; text-decoration: none; }
@media (max-width: 760px) {
  .ed-top-row {
    flex-direction: column;
    align-items: stretch;
    padding: 10px 0 8px;
    gap: 8px;
  }
  .ed-brand { padding: 0 14px; }
  .ed-nav {
    margin: 0 12px;
    justify-content: stretch;
  }
  .ed-nav a { flex: 1; text-align: center; padding: 8px 10px; }
  .ed-play { padding: 10px; border-radius: 16px; }
  .ed-window, .ed-stage, .ed-code { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ed-view.is-on, .ed-tab-mark, .ed-window, .ed-veil, .ed-spinner, .ed-sub, .ed-docs article.is-on {
    animation: none !important;
    transition: none !important;
  }
}
