/* PULS design system: black stage, white type, one hot accent. */
:root {
  --bg: #000;
  --bg-1: #0b0b0b;
  --bg-2: #141414;
  --bg-3: #1d1d1d;
  --line: #262626;
  --line-2: #333;
  --ink: #fafafa;
  --ink-2: #bdbdbd;
  --ink-3: #8a8a8a;
  --accent: #ff5a1f;
  --accent-ink: #000;
  --good: #3ddc84;
  --bad: #ff4d4d;
  --warn: #ffc53d;
  --r: 14px;
  --r-sm: 9px;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace;
  --sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { font-size: 15px; line-height: 1.5; min-height: 100vh; }
a { color: inherit; }
img { max-width: 100%; }
::selection { background: var(--accent); color: #000; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 760px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(0,0,0,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 58px; }
.logo { font-weight: 900; letter-spacing: -.04em; font-size: 22px; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(255,90,31,.7); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,90,31,.6); } 70% { box-shadow: 0 0 0 10px rgba(255,90,31,0); } 100% { box-shadow: 0 0 0 0 rgba(255,90,31,0); } }
.nav nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav nav a { text-decoration: none; color: var(--ink-2); padding: 7px 11px; border-radius: 8px; font-size: 14px; white-space: nowrap; }
.nav nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav nav a.on { color: var(--ink); background: var(--bg-3); }
.lang { font-size: 12px; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px 10px; background: none; color: var(--ink-2); cursor: pointer; }

/* type */
h1, h2, h3, h4 { margin: 0; letter-spacing: -.025em; line-height: 1.08; }
.display { font-size: clamp(38px, 6.4vw, 78px); font-weight: 900; letter-spacing: -.04em; line-height: 1.1; padding-top: .04em; }
h1 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 850; }
h2 { font-size: 28px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 750; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--accent); }
.muted { color: var(--ink-2); }
.dim { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.accent { color: var(--accent); }
.num { font-variant-numeric: tabular-nums; }

/* layout */
.section { padding: 56px 0; }
.section.tight { padding: 30px 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .wrap { padding: 0 16px; } }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.sp { height: 14px; }

/* surfaces */
.card { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.card.hl { border-color: var(--accent); }
.card.flat { background: transparent; }
.card h3 + p { margin-top: 6px; }
.panel { background: var(--bg-2); border-radius: var(--r-sm); padding: 14px; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }

/* buttons + inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--ink); padding: 11px 18px; border-radius: 99px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; transition: transform .08s, background .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.white { background: #fff; color: #000; border-color: #fff; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 13px; font-size: 13px; }
.btn.lg { padding: 15px 26px; font-size: 17px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
input, textarea, select { font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 110px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); padding: 0; }
label.f { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.field + .field { margin-top: 12px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 4px 10px; border-radius: 99px; background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line-2); }
.pill.ok { color: var(--good); border-color: rgba(61,220,132,.35); background: rgba(61,220,132,.08); }
.pill.bad { color: var(--bad); border-color: rgba(255,77,77,.35); background: rgba(255,77,77,.08); }
.pill.warn { color: var(--warn); border-color: rgba(255,197,61,.35); background: rgba(255,197,61,.08); }
.pill.acc { color: var(--accent); border-color: rgba(255,90,31,.4); background: rgba(255,90,31,.08); }

/* switch */
.switch { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); cursor: pointer; user-select: none; border: 1px solid transparent; }
.switch:hover { border-color: var(--line-2); }
.switch input { display: none; }
.switch .k { width: 38px; height: 22px; border-radius: 99px; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; flex: none; transition: background .15s; }
.switch .k::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-3); transition: transform .15s, background .15s; }
.switch input:checked + .k { background: var(--bad); border-color: var(--bad); }
.switch input:checked + .k::after { transform: translateX(16px); background: #fff; }
.switch .t { font-size: 14px; line-height: 1.3; }
.switch .t small { display: block; color: var(--ink-3); font-size: 12px; }

/* stat */
.stat .v { font-size: 34px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.05; }
.stat .l { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.stat.big .v { font-size: clamp(40px, 6vw, 64px); }

/* bars */
.bar { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .4s; }
.bar.white > i { background: #fff; }

/* log */
.log { font-family: var(--mono); font-size: 12.5px; line-height: 1.55; background: #050505; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; max-height: 420px; overflow: auto; }
.log div { padding: 3px 0; border-bottom: 1px dashed #1a1a1a; }
.log .ts { color: var(--ink-3); margin-right: 8px; }
.log .c-ok { color: var(--good); }
.log .c-bad { color: var(--bad); }
.log .c-warn { color: var(--warn); }
.log .c-acc { color: var(--accent); }

/* table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-3); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* toast */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #fff; color: #000; padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .2s; z-index: 99; max-width: calc(100vw - 32px); box-shadow: 0 10px 40px rgba(0,0,0,.5); pointer-events: none; }
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--bad); color: #fff; }

/* event hero */
.hero-ev { position: relative; border-radius: 22px; overflow: hidden; padding: 44px 34px; background: radial-gradient(120% 140% at 100% 0%, var(--ev, var(--accent)) 0%, rgba(0,0,0,0) 55%), linear-gradient(180deg, #111 0%, #050505 100%); border: 1px solid var(--line); }
.hero-ev .display { max-width: 820px; }
.ev-card { text-decoration: none; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); background: var(--bg-1); transition: border-color .15s, transform .15s; }
.ev-card:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.ev-card .top { height: 120px; background: radial-gradient(140% 140% at 100% 0%, var(--ev, var(--accent)) 0%, rgba(0,0,0,0) 60%), #0d0d0d; padding: 16px; display: flex; align-items: flex-end; }
.ev-card .body { padding: 16px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-3); font-size: 13px; margin-top: 40px; }

/* chart */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .axis { stroke: var(--line-2); stroke-width: 1; }
.chart .gridl { stroke: #1c1c1c; stroke-width: 1; }
.chart text { fill: var(--ink-3); font-size: 11px; font-family: var(--sans); }
.tip { position: fixed; pointer-events: none; background: #fff; color: #000; font-size: 12px; padding: 6px 9px; border-radius: 7px; font-weight: 600; z-index: 50; display: none; white-space: nowrap; }

/* misc */
.kbd { font-family: var(--mono); font-size: 12px; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.chip-tier { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--bg-2); cursor: pointer; }
.chip-tier.on { border-color: var(--accent); background: rgba(255,90,31,.07); }
.chip-tier.off { opacity: .45; cursor: not-allowed; }
.center { text-align: center; }
.hide { display: none !important; }
.qr { background: #fff; border-radius: 14px; padding: 12px; display: inline-block; line-height: 0; }
.qr svg { width: 220px; height: 220px; }
.ring { width: 22px; height: 22px; }
.note { border-left: 3px solid var(--accent); padding: 8px 12px; background: var(--bg-1); border-radius: 0 8px 8px 0; font-size: 14px; color: var(--ink-2); }
.badge-sim { font-size: 11px; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: 6px; padding: 1px 6px; }
.verdict { border-radius: 18px; padding: 26px; text-align: center; font-weight: 850; font-size: 28px; letter-spacing: -.02em; }
.verdict.ok { background: rgba(61,220,132,.12); border: 2px solid var(--good); color: var(--good); }
.verdict.bad { background: rgba(255,77,77,.1); border: 2px solid var(--bad); color: var(--bad); }
.verdict small { display: block; font-size: 15px; font-weight: 600; color: var(--ink-2); margin-top: 6px; letter-spacing: 0; }
video { width: 100%; border-radius: 14px; background: #000; }
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 360px; overflow: auto; padding-right: 4px; }
.msg { padding: 10px 13px; border-radius: 13px; max-width: 88%; font-size: 14px; }
.msg.me { align-self: flex-end; background: #fff; color: #000; border-bottom-right-radius: 4px; }
.msg.ai { align-self: flex-start; background: var(--bg-2); border: 1px solid var(--line-2); border-bottom-left-radius: 4px; }
.msg .src { display: block; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.drop-zone { border: 1.5px dashed var(--line-2); border-radius: var(--r); padding: 22px; text-align: center; cursor: pointer; transition: border-color .15s; }
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; }
.steps span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--bg-2); color: var(--ink-3); border: 1px solid var(--line); }
.steps span.on { background: #fff; color: #000; border-color: #fff; font-weight: 700; }
.steps span.done { color: var(--good); border-color: rgba(61,220,132,.35); }
.pos { font-size: clamp(54px, 10vw, 104px); font-weight: 900; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
