:root {
  --bg: #0b0e14;
  --bg-2: #11151f;
  --panel: #141a26;
  --line: #232b3a;
  --fg: #e6ebf2;
  --fg-dim: #9aa7ba;
  --fg-faint: #64708a;
  --accent: #6ee7b7;      /* mint */
  --accent-2: #7aa2ff;    /* blue */
  --warn: #f0b866;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --maxw: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
code, pre, .mono { font-family: var(--mono); }
::selection { background: rgba(110,231,183,0.25); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(11,14,20,0.82); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
nav .wrap { display: flex; align-items: center; gap: 20px; height: 58px; }
nav .brand { font-family: var(--mono); font-weight: 600; color: var(--fg); letter-spacing: 0.5px; }
nav .brand b { color: var(--accent); }
nav .links { margin-left: auto; display: flex; gap: 20px; font-size: 14px; }
nav .links a { color: var(--fg-dim); }
nav .links a:hover { color: var(--fg); text-decoration: none; }
.tag {
  font-family: var(--mono); font-size: 11px; color: var(--warn);
  border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px;
}

/* hero */
header.hero { padding: 84px 0 56px; border-bottom: 1px solid var(--line);
  background: radial-gradient(1000px 400px at 70% -10%, rgba(122,162,255,0.10), transparent 60%); }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 18px 0 0; letter-spacing: -1px; }
.hero h1 .mono { color: var(--accent); }
.hero .lede { font-size: clamp(17px, 2.4vw, 21px); color: var(--fg-dim); max-width: 46ch; margin: 20px 0 0; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero .status { margin-top: 22px; font-size: 13px; color: var(--fg-faint); font-family: var(--mono); }

.btn {
  display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 600;
  padding: 11px 20px; border-radius: 8px; cursor: pointer; border: 1px solid transparent;
}
.btn.primary { background: var(--accent); color: #062018; }
.btn.primary:hover { filter: brightness(1.08); text-decoration: none; }
.btn.ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn.ghost:hover { border-color: var(--accent-2); text-decoration: none; }

/* sections */
section { padding: 62px 0; border-bottom: 1px solid var(--line); }
section h2 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin: 0 0 8px; }
section .h { font-size: clamp(24px, 3.4vw, 32px); margin: 0 0 16px; letter-spacing: -0.5px; }
section p.body { color: var(--fg-dim); max-width: 68ch; }
.muted { color: var(--fg-faint); }

/* grid of pillars */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 28px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 22px; }
.card .n { font-family: var(--mono); color: var(--fg-faint); font-size: 12px; }
.card h3 { margin: 6px 0 8px; font-size: 18px; }
.card p { color: var(--fg-dim); font-size: 15px; margin: 0; }
.card .k { color: var(--accent); }

/* code sample */
.code {
  background: #0a0d13; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-top: 22px;
}
.code .head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--fg-faint); }
.code .head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.code pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: 12.5px; line-height: 1.62; color: var(--fg); }
.code pre .c { color: var(--fg-faint); }         /* comment */
.code pre .k { color: var(--accent-2); }          /* key */
.code pre .s { color: var(--accent); }            /* string/value */
.code pre .f { color: var(--warn); }              /* function/type */

/* roadmap */
.road { margin-top: 26px; border-left: 2px solid var(--line); padding-left: 22px; }
.road .step { position: relative; padding: 0 0 20px; }
.road .step::before { content: ""; position: absolute; left: -29px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--line); }
.road .step.now::before { background: var(--accent); border-color: var(--accent); }
.road .step .v { font-family: var(--mono); color: var(--fg); font-weight: 600; }
.road .step.now .v { color: var(--accent); }
.road .step .d { color: var(--fg-dim); font-size: 15px; }

/* form */
form.signup { margin-top: 24px; max-width: 520px; }
form.signup .row { display: flex; gap: 10px; flex-wrap: wrap; }
input, select, textarea {
  font-family: var(--sans); font-size: 15px; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
form.signup .row input[type=email] { flex: 1 1 260px; }
form.signup .row select { flex: 0 0 150px; }
form.signup textarea { margin-top: 10px; min-height: 0; height: 44px; resize: vertical; }
form.signup .btn { margin-top: 12px; }
.msg { margin-top: 12px; font-family: var(--mono); font-size: 14px; min-height: 20px; }
.msg.ok { color: var(--accent); }
.msg.err { color: var(--warn); }

/* lists */
ul.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
ul.ticks li { padding: 6px 0 6px 26px; position: relative; color: var(--fg-dim); }
ul.ticks li::before { content: "▸"; position: absolute; left: 0; color: var(--accent); }
ul.ticks li b { color: var(--fg); font-weight: 600; }

/* footer */
footer { padding: 40px 0 60px; color: var(--fg-faint); font-size: 14px; }
footer .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
footer .links { display: flex; gap: 18px; margin-left: auto; }
footer a { color: var(--fg-dim); }

/* docs page */
.doc { padding: 40px 0 80px; }
.doc h1 { font-size: 30px; letter-spacing: -0.5px; }
.doc h2 { font-size: 13px; font-family: var(--mono); text-transform: uppercase; letter-spacing: 2px; color: var(--accent); margin-top: 40px; }
.doc h3 { font-size: 20px; margin-top: 28px; }
.doc p, .doc li { color: var(--fg-dim); }
.doc code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; font-size: 13px; color: var(--fg); }
.doc pre { background: #0a0d13; border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; overflow-x: auto; font-size: 13px; }
.doc .backlink { font-family: var(--mono); font-size: 13px; }

@media (max-width: 680px) {
  .grid { grid-template-columns: 1fr; }
  nav .links a:not(.tag-link) { display: none; }
  section { padding: 48px 0; }
}

/* ===================== interactive / flashy layer ===================== */

/* scroll progress */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; z-index: 20; }

/* reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* brand mark + tag pulse */
.brand { display: inline-flex; align-items: center; gap: 9px; }
/* The wordmark is a bare text node plus <b>era</b>. As flex items the gap falls BETWEEN
   them and the mark reads "tess era", so the mark itself must not be a flex container. */
nav .brand, footer .brand { display: inline; gap: 0; }
.brand-mark { width: 14px; height: 14px; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 0 3px rgba(110,231,183,0.12); transform: rotate(45deg); }
.tag.pulse { position: relative; }
.tag.pulse::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); margin-right: 7px; box-shadow: 0 0 0 0 rgba(240,184,102,0.7); animation: pl 2s infinite; }
@keyframes pl { 0%{box-shadow:0 0 0 0 rgba(240,184,102,.6)} 70%{box-shadow:0 0 0 7px rgba(240,184,102,0)} 100%{box-shadow:0 0 0 0 rgba(240,184,102,0)} }

/* hero canvas */
.hero { position: relative; overflow: hidden; }
#mesh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero-inner { position: relative; z-index: 2; }
.hero-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; z-index: 1;
  background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.hero h1 .grad { background: linear-gradient(90deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { transition: transform .18s ease, border-color .18s ease; }
.card[data-tilt]:hover { border-color: rgba(122,162,255,0.4); }

/* ticker */
.ticker { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; font-family: var(--mono); font-size: 13px; }
.ticker .tk { color: var(--fg-faint); }
.ticker .tk b { font-weight: 600; }
.ticker .up { color: var(--accent); } .ticker .dn { color: #f06868; }

/* playground */
.play { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 26px; align-items: start; }
/* let both fr tracks shrink to their share instead of the left column blowing out
   to the min-content width of the long YAML lines (which would starve the panel) */
.play-editor, .play-panel { min-width: 0; }
.play-editor .code { margin: 0; }
.code .validate { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--accent);
  background: rgba(110,231,183,0.08); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.code .validate:hover { background: rgba(110,231,183,0.16); }
.code pre .bad { color: #f06868; text-decoration: underline wavy #f06868; }
.code pre .err-line { background: rgba(240,104,104,0.08); display: inline-block; width: 100%; }
.validation { margin-top: 10px; font-size: 13px; line-height: 1.5; font-family: var(--mono);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--panel); }
.validation.ok { border-color: rgba(110,231,183,0.35); color: var(--fg-dim); }
.validation.err { border-color: rgba(240,104,104,0.4); color: #ffb4b4; }
.validation code { background: var(--bg-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; color: var(--fg); }

.play-panel { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  display: grid; grid-template-columns: 1fr; gap: 16px 22px; align-items: start; }
@media (min-width: 720px) {
  /* payoff + read-out on the left, the controls that drive them on the right */
  .play-panel { grid-template-columns: 1.15fr 1fr; }
  .play-panel canvas { grid-row: 1; grid-column: 1; }
  .play-panel .stats { grid-row: 2; grid-column: 1; align-self: end; }
  .play-panel .controls { grid-row: 1 / span 2; grid-column: 2; }
  .play-panel .mini { grid-row: 3; grid-column: 1 / -1; justify-self: start; }
}
#payoff { width: 100%; height: 200px; display: block; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 2px 4px; font-family: var(--mono); font-size: 12px; color: var(--fg-faint); }
.stats b { color: var(--fg); font-weight: 600; } .stats .g { color: var(--accent); } .stats .r { color: #f06868; }
.controls { margin-top: 12px; display: grid; gap: 12px; }
.controls label { font-family: var(--mono); font-size: 12px; color: var(--fg-dim); display: grid; gap: 6px; }
.controls output { color: var(--accent); float: right; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px;
  background: var(--line); padding: 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); cursor: pointer; box-shadow: 0 0 0 4px rgba(110,231,183,0.15); }
input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border: 0; border-radius: 50%; background: var(--accent); cursor: pointer; }
.mini { margin-top: 14px; font-family: var(--mono); font-size: 11px; color: var(--fg-dim);
  background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 5px 10px; cursor: pointer; }
.mini:hover { border-color: var(--warn); color: var(--warn); }

@media (max-width: 760px) { .play { grid-template-columns: 1fr; } }
