/* score-centering — dark editorial system.
   Local system fonts only; no scripts, imports or external assets. */

:root {
  color-scheme: dark;
  --canvas: #080b0c;
  --panel: #0d1213;
  --panel-alt: #111718;
  --ink: #f2f6f4;
  --muted: #a2b2ad;
  --line: #263431;
  --line-bright: #3c514b;
  --signal: #7fe3bf;
  --signal-cyan: #86d9e6;
  --signal-wash: rgba(127, 227, 191, .08);
  --danger: #ff9c9c;
  --focus: #b9f5dd;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --gutter: clamp(1rem, 4vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--canvas);
  background-image:
    linear-gradient(rgba(127, 227, 191, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 227, 191, .035) 1px, transparent 1px);
  background-size: 64px 64px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--signal); text-decoration: none; text-underline-offset: .2em; }
a:hover { text-decoration: underline; text-decoration-color: var(--signal-cyan); }
p { margin: 0 0 1rem; }
h1, h2, h3 { margin: 0 0 .75rem; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 3vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 2rem); }
h3 { font-size: 1rem; }
code { font-family: var(--mono); }

:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: absolute; top: 0; left: -9999px; z-index: 10;
  padding: .55rem .8rem;
  background: var(--signal); color: var(--canvas);
  font: 600 .75rem/1.2 var(--mono); letter-spacing: .06em;
}
.skip-link:focus { left: var(--gutter); top: .5rem; }

/* Masthead and footer */
.site-header, .site-footer {
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding: 1rem var(--gutter);
}
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 12, .92);
}
.site-header .brand {
  font: 600 .95rem/1 var(--mono); letter-spacing: -.01em;
  color: var(--ink); text-transform: lowercase;
}
.site-header .brand::before {
  content: ""; display: inline-block;
  width: .5rem; height: .5rem; margin-right: .6rem;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(127, 227, 191, .5);
}
.site-header nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-header nav a, .site-footer a, .app-nav a, .breadcrumb a {
  font: 500 .72rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
.site-header nav a:hover, .site-footer a:hover, .app-nav a:hover, .breadcrumb a:hover { color: var(--signal); }
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font: 500 .75rem/1.6 var(--mono);
}
.footer-links { display: flex; gap: 1.25rem; }

/* Essential-cookie notice — pinned to the bottom of every page. The neutral
   class name is deliberate: common ad-blocker lists hide `.cookie-*` bars. */
@keyframes nag-in {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
.sc-session-bar {
  position: fixed; inset: auto 0 0 0; z-index: 50;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
  padding: .8rem var(--gutter);
  background: rgba(13, 18, 19, .97);
  border-top: 1px solid var(--line-bright);
  box-shadow: 0 -10px 32px rgba(0, 0, 0, .5);
  backdrop-filter: blur(8px);
  animation: nag-in .45s cubic-bezier(.2, .7, .2, 1) both;
}
/* Leave room so the pinned notice never covers the footer's last line. */
body { padding-bottom: 5rem; }
.sc-session-bar[hidden] { display: none; }
.sc-session-bar p {
  margin: 0; color: var(--muted);
  font: 500 .78rem/1.5 var(--mono);
}
.sc-session-bar .sc-session-accept { flex: 0 0 auto; }

main { max-width: 1160px; margin: 0 auto; padding: 0 var(--gutter) 4rem; }

/* Hero and decorative telemetry panel */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero-copy { max-width: 760px; }
.eyebrow {
  margin: 0 0 1.25rem;
  font: 600 .72rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--signal);
}
.eyebrow::before { content: "// "; color: var(--signal-cyan); opacity: .75; }
.hero h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 5.6vw, 4.75rem);
  letter-spacing: -.05em; line-height: .98;
  margin-bottom: 1.5rem;
}
.lede { font-size: clamp(1rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 64ch; }
.cta-row { display: flex; gap: .75rem; flex-wrap: wrap; margin: 2rem 0 .75rem; }
.fineprint { color: var(--muted); font-size: .85rem; }

.telemetry {
  margin: 0;
  border: 1px solid var(--line-bright);
  background: linear-gradient(180deg, rgba(127, 227, 191, .05), transparent 45%), var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.telemetry-head {
  display: flex; align-items: center; gap: .4rem;
  padding: .75rem 1rem; border-bottom: 1px solid var(--line);
}
.telemetry-head span {
  width: .45rem; height: .45rem;
  background: var(--signal); opacity: .35;
}
.telemetry-head span:first-child { opacity: 1; }
.telemetry-head span:nth-child(3) { background: var(--signal-cyan); }
.telemetry svg { display: block; width: 100%; height: auto; }
.telemetry .grid-line { stroke: var(--line); stroke-width: 1; }
.telemetry .trace {
  fill: none; stroke: var(--signal); stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.telemetry .trace.cyan { stroke: var(--signal-cyan); }
.telemetry .trace.faint { opacity: .38; }
.telemetry .marker { fill: var(--signal); }
.telemetry-legend {
  display: flex; flex-wrap: wrap; gap: .4rem .85rem;
  padding: .85rem 1rem;
  border-top: 1px solid var(--line);
  font: 500 .65rem/1.5 var(--mono);
  text-transform: uppercase; letter-spacing: .09em;
  color: var(--muted);
}
.telemetry-legend span::before {
  content: ""; display: inline-block;
  width: .35rem; height: .35rem; margin-right: .35rem;
  vertical-align: middle; background: var(--signal);
}
.telemetry-legend span:nth-child(even)::before { background: var(--signal-cyan); }

/* Sections, feature channels and pricing panels */
.section { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 1.75rem; }
.section > h2::before {
  content: ""; display: block;
  width: 2.5rem; height: 2px; margin-bottom: 1rem;
  background: var(--signal);
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.grid article { position: relative; padding: 1.5rem; background: var(--panel); }
.grid article::before {
  content: ""; display: block; height: 2px; width: 100%;
  margin-bottom: 1.25rem; opacity: .5;
  background: linear-gradient(90deg,
    var(--signal) 0 18%, transparent 18% 23%,
    var(--signal) 23% 41%, transparent 41% 47%,
    var(--signal-cyan) 47% 64%, transparent 64% 69%,
    var(--signal) 69% 85%, transparent 85%);
}
.grid article:nth-child(even)::before { opacity: .3; }
.grid article h3 {
  font: 600 .78rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
}
.grid article p { color: var(--muted); font-size: .92rem; margin-bottom: 0; }

.grid.pricing .plan { display: flex; flex-direction: column; }
.plan h3 { color: var(--signal-cyan); }
.plan .price {
  margin: .5rem 0;
  font: 600 clamp(2rem, 4vw, 2.75rem)/1 var(--mono);
  letter-spacing: -.04em;
}
.plan .price span { font-size: .8rem; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.plan .annual { font: .8rem/1.5 var(--mono); color: var(--muted); }
.plan ul { padding-left: 1.15rem; margin: 1rem 0 1.5rem; color: var(--muted); font-size: .9rem; }
.plan li + li { margin-top: .35rem; }
.plan .button { margin-top: auto; }
.grid.pricing article.featured {
  background: var(--panel-alt);
  box-shadow: inset 0 2px 0 var(--signal);
}

/* Code, buttons and forms */
pre {
  margin: 0; padding: 1.25rem 1.4rem;
  border: 1px solid var(--line-bright);
  border-left: 2px solid var(--signal);
  background: var(--panel); color: #dcefe8;
  overflow-x: auto;
  font: .85rem/1.7 var(--mono);
}
.button {
  display: inline-block;
  padding: .7rem 1.15rem;
  border: 1px solid var(--line-bright); border-radius: 0;
  background: transparent; color: var(--ink);
  font: 600 .78rem/1.2 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.button:hover {
  text-decoration: none;
  border-color: var(--signal);
  background: var(--signal-wash);
  transform: translateY(-1px);
}
.button.primary { background: var(--signal); border-color: var(--signal); color: #06100d; }
.button.primary:hover { background: #a5f0d2; border-color: #a5f0d2; }
button:not(.button) {
  padding: .5rem .8rem;
  border: 1px solid var(--line-bright);
  background: var(--panel); color: var(--ink);
  font: 600 .72rem/1.2 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  cursor: pointer;
}
button:not(.button):hover { border-color: var(--signal); color: var(--signal); }
form { max-width: 40rem; }
form label {
  display: block; margin: 1rem 0 .35rem;
  font: 600 .7rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
input, select, textarea {
  width: 100%; padding: .65rem .75rem;
  border: 1px solid var(--line-bright); border-radius: 0;
  background: var(--canvas); color: var(--ink);
  font: .95rem/1.4 var(--mono);
}
input:focus, select:focus, textarea:focus { border-color: var(--signal); }
.inline-form { display: inline-flex; max-width: none; align-items: center; gap: .35rem; margin: 0; }

.auth-card {
  max-width: 460px; margin: clamp(2rem, 6vw, 4rem) auto;
  padding: 2rem;
  border: 1px solid var(--line-bright);
  background: var(--panel);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.auth-card h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }
.auth-card form { display: flex; flex-direction: column; gap: .5rem; margin: 1.5rem 0; max-width: none; }
.auth-card form label { margin: .25rem 0 0; }
.error { color: var(--danger); font: 600 .85rem/1.5 var(--mono); }
.flash {
  padding: .8rem 1rem; margin: 1rem 0;
  border: 1px solid var(--signal);
  border-left-width: 3px;
  background: var(--signal-wash); color: var(--ink);
}

/* Workspace */
.app-head {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  justify-content: space-between; align-items: flex-end;
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
}
.app-head h1 { margin-bottom: .5rem; }
.page-title {
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.page-title::before {
  content: ""; display: block;
  width: 2rem; height: 2px; margin-bottom: .75rem;
  background: var(--signal);
}
.app-org-switch { min-width: 220px; }
.app-org-switch form { max-width: none; }
.app-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--line);
}
.app-nav .button { padding: .45rem .8rem; }
.breadcrumb { margin: 1.5rem 0; font: .75rem/1.5 var(--mono); color: var(--muted); }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { text-align: left; padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  font: 600 .7rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted);
}
tbody tr:hover { background: var(--panel); }
.badge {
  display: inline-block; padding: .15rem .5rem;
  border: 1px solid var(--line-bright);
  background: var(--panel); color: var(--muted);
  font: 500 .7rem/1.5 var(--mono);
}
.alert {
  padding: .6rem 1rem; margin: .6rem 0;
  border-left: 3px solid var(--danger);
  background: rgba(255, 156, 156, .07); color: var(--ink);
}

/* Legacy dashboard shell (base.html): uPlot charts keep their own asset. */
body.dashboard { margin: 0 auto; padding: 2rem var(--gutter) 4rem; max-width: 1000px; }
.chart {
  margin: 1.5rem 0; padding: 1rem;
  border: 1px solid var(--line);
  background: var(--panel);
  font: 600 .72rem/1.4 var(--mono);
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted);
}
.uplot, .uplot .u-title, .uplot .u-legend, .uplot .u-value { color: var(--muted); }

/* Motion: entrance, ambient telemetry, scroll reveals and hover feedback. */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes trace-drift {
  to { stroke-dashoffset: -48; }
}
@keyframes marker-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

.hero-copy > .eyebrow,
.hero-copy > h1,
.hero-copy > .lede,
.hero-copy > .cta-row,
.hero-copy > .fineprint {
  animation: rise-in .7s cubic-bezier(.2, .7, .2, 1) both;
}
.hero-copy > .eyebrow { animation-delay: .04s; }
.hero-copy > h1 { animation-delay: .12s; }
.hero-copy > .lede { animation-delay: .2s; }
.hero-copy > .cta-row { animation-delay: .28s; }
.hero-copy > .fineprint { animation-delay: .36s; }

.telemetry .trace {
  stroke-dasharray: 10 6;
  animation: trace-drift 3.1s linear infinite;
}
.telemetry .trace.cyan { animation-duration: 2.2s; }
.telemetry .trace.faint { stroke-dasharray: 4 8; animation-duration: 4.4s; }
.telemetry .marker { animation: marker-pulse 2.6s ease-in-out infinite; }
.telemetry .marker + .marker { animation-delay: 1.3s; }

@supports (animation-timeline: view()) {
  .section > h2 {
    animation: rise-in .65s ease-out both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
}

.button:hover,
.grid article:hover {
  box-shadow: 0 0 0 1px rgba(127, 227, 191, .22), 0 12px 28px rgba(0, 0, 0, .35);
}
.grid article { transition: transform .18s ease, box-shadow .18s ease; }
.grid article:hover { transform: translateY(-3px); }
.button:hover { transform: translateY(-2px); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .telemetry { max-width: 540px; }
}
@media (max-width: 640px) {
  body { padding-bottom: 7rem; }
  .site-header, .site-footer { padding: 1rem var(--gutter); }
  .site-header nav { gap: .75rem 1rem; }
  .hero { padding-top: 2.5rem; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
  .grid { grid-template-columns: 1fr; }
  .app-head { flex-direction: column; align-items: stretch; }
  .auth-card { padding: 1.5rem; }
  table { display: block; overflow-x: auto; }
}
/* Bold editorial hero: aurora, drift grid, spotlight, gradient headline. */
.landing .hero {
  position: relative; isolation: isolate; overflow: hidden;
  background:
    radial-gradient(360px circle at var(--mx, 50%) var(--my, 30%), rgba(127, 227, 191, .12), transparent 70%),
    radial-gradient(50% 60% at 18% 25%, rgba(127, 227, 191, .16), transparent 70%),
    radial-gradient(45% 55% at 82% 15%, rgba(134, 217, 230, .12), transparent 70%);
}
.landing .hero::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(127, 227, 191, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 227, 191, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000, transparent);
  animation: aurora-drift 18s linear infinite;
}
.landing .hero-copy, .landing .telemetry { position: relative; z-index: 1; }
@keyframes aurora-drift { to { background-position: 48px 48px, 48px 48px; } }
.landing .hero h1 { font-size: clamp(2.75rem, 7vw, 5.4rem); max-width: 20ch; }
.landing .hero h1 .gradient {
  background: linear-gradient(90deg, var(--signal), var(--signal-cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.status-dot {
  display: inline-block; width: .5rem; height: .5rem; margin-right: .6rem;
  border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
  animation: status-pulse 1.8s ease-in-out infinite;
}
@keyframes status-pulse { 50% { opacity: .35; box-shadow: 0 0 4px var(--signal); } }

/* Live signal ticker (decorative). */
.signal-ticker {
  overflow: hidden; border-block: 1px solid var(--line);
  background: var(--panel); padding: .7rem 0;
}
.ticker-track {
  display: flex; width: max-content;
  animation: ticker-scroll 22s linear infinite;
  font: 600 .7rem/1.4 var(--mono); letter-spacing: .12em; color: var(--muted);
}
.ticker-half { display: flex; flex: 0 0 auto; }
.ticker-half span { margin: 0 1.6rem; }
.ticker-track b { color: var(--signal); }
@keyframes ticker-scroll { to { transform: translateX(-50%); } }

/* Numbered, sparkline feature cards with cursor spotlight. */
.card-num {
  position: absolute; top: .4rem; right: .9rem; pointer-events: none;
  font: 700 2.2rem/1 var(--mono); color: rgba(127, 227, 191, .10);
}
.sparkline {
  display: block; width: 100%; height: 2.2rem; margin-top: 1rem;
  fill: none; stroke: var(--signal); stroke-width: 1.5;
  vector-effect: non-scaling-stroke; opacity: .85;
}
.grid article {
  background-image: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(127, 227, 191, .07), transparent 70%);
}

/* Terminal quickstart. */
.terminal { border: 1px solid var(--line-bright); border-left: 2px solid var(--signal); background: var(--panel); }
.terminal-bar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.terminal-bar > span { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-bright); }
.terminal-bar > span:first-child { background: var(--signal); }
.terminal-bar .copy-btn { margin-left: auto; }
.terminal pre { border: 0; }
.terminal { animation: panel-in .8s ease-out .3s both; }

/* Featured plan badge + corrected hover specificity/glow. */
.plan-badge {
  position: absolute; top: -1px; right: 1rem; padding: .25rem .6rem;
  background: var(--signal); color: #06100d;
  font: 700 .6rem/1.4 var(--mono); letter-spacing: .1em;
}
.grid.pricing article.featured:hover {
  box-shadow: inset 0 2px 0 var(--signal), 0 0 0 1px rgba(127, 227, 191, .5), 0 18px 40px rgba(0, 0, 0, .5);
  transform: translateY(-3px);
}

/* JS-driven scroll reveals. Animate `translate` (not `transform`) so the
   persistent fill never overrides hover's transform lift. */
@keyframes reveal-in {
  from { opacity: 0; translate: 0 18px; }
  to { opacity: 1; translate: 0 0; }
}
/* Content is visible by default. Only the JS that is guaranteed to run adds
   `reveals-ready`, which arms the hidden pre-state. If JS never runs, or the
   tab is hidden at load (where IntersectionObserver callbacks are suppressed),
   every element stays fully visible. */
.reveal { opacity: 1; translate: 0 0; }
.reveals-ready .reveal { opacity: 0; translate: 0 18px; }
.reveals-ready .reveal.is-visible {
  animation: reveal-in .6s cubic-bezier(.2, .7, .2, 1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* Telemetry parallax (free of animation transform now). */
.telemetry { transform: translateY(var(--py, 0px)); transition: transform .25s ease-out; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero-copy > *, .telemetry, .terminal,
  #features .grid article, #pricing .grid article,
  .reveal { opacity: 1 !important; translate: 0 0 !important; transform: none !important; }
  .telemetry .trace { stroke-dasharray: none; }
  .button:hover, .grid article:hover, .grid.pricing article.featured:hover { transform: none; }
  .status-dot, .landing .hero::before, .ticker-track { animation: none !important; transform: none !important; }
}
