/* TSVOBF — monochrome product site. No gradients, no decorative pills. */

:root {
  --bg: #08090a;
  --surface: #0d0f11;
  --surface-2: #121417;
  --line: #1d2024;
  --line-strong: #2b2f35;
  --text: #f1f2f4;
  --muted: #8d939c;
  --faint: #5b6169;
  --ok: #3ecf8e;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Consolas, monospace;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 8px;
  --shell: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: #2a2e34; color: #fff; }

a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
img, svg { display: block; }

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 28px;
}

section[id], div[id="tokens"] { scroll-margin-top: 80px; }

/* Grid and flex children must be allowed to shrink below their content width,
   otherwise long code lines widen the whole page on small screens. */
.hero-copy, .artifact, .step, .boundary-col, .pane, .plan, .doc-block,
.footer-brand, .footer-col, .limit, .balance, .account { min-width: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 9, 10, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font: 700 14px/1 var(--sans);
}

.brand-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
}

.brand-tag {
  font: 500 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  border-left: 1px solid var(--line-strong);
  padding-left: 10px;
}

.main-nav {
  display: flex;
  gap: 28px;
  flex: 1;
}

.main-nav a {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s ease;
}

.main-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.link {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s ease;
}

.link:hover { color: var(--text); }

.account {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.account-id {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--muted);
  max-width: 240px;
}

.account-id span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  display: grid;
  place-items: center;
  font: 600 11px/1 var(--sans);
  color: var(--text);
  flex: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.btn:hover { background: #171a1e; border-color: #3a3f46; }

.btn-solid {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.btn-solid:hover { background: #d8dade; border-color: #d8dade; }

.btn-quiet {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.btn-quiet:hover { background: var(--surface-2); color: var(--text); }

.btn-lg { height: 44px; padding: 0 22px; font-size: 14px; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn-block { width: 100%; }

.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Hero ---------- */

.hero { padding: 92px 0 84px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr .88fr;
  gap: 72px;
  align-items: center;
}

.hero-copy { min-width: 0; }

.eyebrow {
  margin: 0 0 18px;
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero h1 {
  margin: 0 0 24px;
  font-size: clamp(38px, 4.6vw, 58px);
  line-height: 1.05;
  letter-spacing: -.04em;
  font-weight: 600;
  text-wrap: balance;
}

.lead {
  margin: 0 0 30px;
  max-width: 48ch;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--muted);
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.hero-facts {
  display: flex;
  gap: 34px;
  margin: 46px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-facts div { display: flex; flex-direction: column; gap: 4px; }

.hero-facts dt {
  font: 500 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.hero-facts dd {
  margin: 0;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Artifact panel ---------- */

.artifact {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .45);
}

.artifact-bar,
.pane-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: #0a0c0e;
}

.file, .pane-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}

.tabs { display: flex; gap: 2px; margin-left: -9px; }

.tab {
  height: 28px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font: 500 11.5px/1 var(--mono);
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}

.tab:hover { color: var(--muted); }
.tab.is-active { color: var(--text); background: var(--surface-2); }

.meta {
  font: 400 11px/1 var(--mono);
  color: var(--faint);
}

.artifact-code {
  margin: 0;
  padding: 20px 18px;
  min-height: 404px;
  overflow-x: auto;
  font: 11.5px/1.85 var(--mono);
  color: #b9c0ca;
  tab-size: 2;
}

.artifact-code code { font: inherit; }

.t-key { color: #e7e9ec; }
.t-fn { color: #e7e9ec; }
.t-str { color: #9aa4b2; }
.t-comment { color: #5f6670; }

.artifact-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--faint);
}

.mono { font-family: var(--mono); }

/* ---------- Sections ---------- */

.section {
  padding: 82px 0;
  border-top: 1px solid var(--line);
}

.section-head { margin-bottom: 44px; max-width: 720px; }

.section-head h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -.03em;
  font-weight: 600;
}

.section-sub {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 64ch;
}

/* ---------- Pipeline ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  padding: 26px 32px 0 0;
  border-right: 1px solid var(--line);
}

.step + .step { padding-left: 32px; }
.step:last-child { border-right: 0; padding-right: 0; }

.step-num {
  font: 500 11px/1 var(--mono);
  letter-spacing: .1em;
  color: var(--faint);
}

.step h3 {
  margin: 16px 0 10px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.step p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}

.boundary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 56px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.boundary-col { padding: 26px 28px; background: var(--surface); }
.boundary-col + .boundary-col { border-left: 1px solid var(--line); }

.boundary-col h4 {
  margin: 0 0 16px;
  font: 500 11px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.boundary-col ul { margin: 0; padding: 0; list-style: none; }

.boundary-col li {
  position: relative;
  padding: 7px 0 7px 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.boundary-col li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 15px;
  width: 8px;
  height: 1px;
  background: var(--faint);
}

.boundary-col code {
  font: 12px/1 var(--mono);
  color: var(--text);
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ---------- Workspace ---------- */

.section-workspace { background: #0a0b0d; }

.workspace-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  max-width: none;
}

.balance {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 14px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  flex: none;
}

.balance-label, .balance-unit {
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.balance strong {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.pane {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pane-tools { display: flex; gap: 8px; }

.seed-field {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.seed-field input {
  width: 132px;
  height: 28px;
  padding: 0 8px;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  font: 11.5px/1 var(--mono);
  letter-spacing: 0;
  text-transform: none;
  color: var(--text);
  outline: none;
}

.seed-field input:focus { border-color: #4a5058; }

#source {
  width: 100%;
  height: 300px;
  padding: 18px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: var(--surface);
  color: #c9d1d9;
  font: 12.5px/1.7 var(--mono);
}

#source::placeholder { color: #4b5158; }

.pane-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.build-status { font-size: 12px; color: var(--faint); }

.output {
  margin: 0;
  padding: 18px;
  height: 360px;
  overflow: auto;
  font: 11.5px/1.7 var(--mono);
  color: #aeb6c0;
  white-space: pre;
}

/* ---------- Pricing ---------- */

.plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.plan.is-featured {
  border-color: #3b4048;
  background: #101215;
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 20px;
}

.plan h3 { margin: 0; font-size: 15px; font-weight: 600; }

.plan-note {
  font: 500 9.5px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

.plan.is-featured .plan-note { color: #aab1ba; }

.plan-price {
  margin: 0;
  font-size: 38px;
  line-height: 1;
  letter-spacing: -.035em;
  font-weight: 600;
}

.plan-tokens {
  margin: 8px 0 22px;
  font: 400 11.5px/1.4 var(--mono);
  color: var(--muted);
}

.plan-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  flex: 1;
}

.plan-list li {
  position: relative;
  padding: 6px 0 6px 18px;
  font-size: 13px;
  color: var(--muted);
}

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 7px;
  height: 1px;
  background: var(--faint);
}

/* ---------- Token table ---------- */

.token-table {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.token-row {
  display: grid;
  grid-template-columns: 1fr 120px 120px 80px;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.token-row:last-child { border-bottom: 0; }

.token-head {
  background: #0a0c0e;
  font: 500 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.token-name { color: var(--text); font-weight: 500; }

/* ---------- Docs ---------- */

.docs-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
}

.doc-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}

.doc-wide { margin-top: 18px; }

.code {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font: 12px/1.8 var(--mono);
  color: #b9c0ca;
}

.directives {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.directives th {
  padding: 11px 18px;
  text-align: left;
  font: 500 9.5px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
}

.directives td {
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.directives tr:last-child td { border-bottom: 0; }

.directives td code {
  font: 11.5px/1 var(--mono);
  color: var(--text);
}

/* ---------- Limits ---------- */

.limits {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.limit {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.status {
  font: 500 9.5px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 8px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  justify-self: start;
}

.status-done { color: var(--ok); border-color: rgba(62, 207, 142, .3); }
.status-known { color: #c9a227; border-color: rgba(201, 162, 39, .28); }

.limit-text {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}

.limit-text code {
  font: 12.5px/1 var(--mono);
  color: var(--text);
  background: var(--surface-2);
  padding: 2px 5px;
  border-radius: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}

.footer-brand p {
  margin: 16px 0 0;
  max-width: 34ch;
  font-size: 13px;
  line-height: 1.7;
  color: var(--faint);
}

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col h4 {
  margin: 0 0 4px;
  font: 500 10px/1 var(--mono);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.footer-col a {
  font-size: 13px;
  color: var(--muted);
  transition: color .15s ease;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--faint);
}

.system { display: inline-flex; align-items: center; gap: 7px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
}

/* ---------- Modal ---------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, .78);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #0e1012;
  box-shadow: 0 40px 100px rgba(0, 0, 0, .6);
}

.modal-card h2 {
  margin: 0 0 8px;
  font-size: 21px;
  letter-spacing: -.02em;
  font-weight: 600;
}

.modal-sub {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--faint);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover { background: var(--surface-2); color: var(--text); }

#auth-form { display: flex; flex-direction: column; gap: 14px; }

#auth-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font: 500 10px/1 var(--mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
}

#auth-form input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: 13.5px/1 var(--sans);
  letter-spacing: 0;
  text-transform: none;
  outline: none;
}

#auth-form input:focus { border-color: #4a5058; }
#auth-form input::placeholder { color: #4b5158; }

#auth-form .btn { margin-top: 6px; }

.modal-switch {
  margin: 18px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--faint);
}

.modal-switch a { color: var(--text); border-bottom: 1px solid var(--line-strong); }

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  max-width: 320px;
  padding: 12px 15px;
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--ok);
  border-radius: 7px;
  background: #14171a;
  font-size: 12.5px;
  color: var(--text);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

.toast.error { border-left-color: #e5484d; }

[hidden] { display: none !important; }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .workspace-grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .shell { padding: 0 20px; }
  .main-nav { display: none; }
  .brand-tag { display: none; }
  .header-inner { gap: 16px; }
  .hero { padding: 64px 0 60px; }
  .hero-facts { flex-wrap: wrap; gap: 22px 30px; }
  .pipeline { grid-template-columns: 1fr; border-top: 0; }
  .step {
    padding: 22px 0 !important;
    border-right: 0;
    border-top: 1px solid var(--line);
  }
  .boundary { grid-template-columns: 1fr; }
  .boundary-col + .boundary-col { border-left: 0; border-top: 1px solid var(--line); }
  .section { padding: 62px 0; }
  .plans { grid-template-columns: 1fr; }
  .token-row { grid-template-columns: 1fr 64px 64px 56px; gap: 10px; padding: 13px 16px; }
  .limit { grid-template-columns: 1fr; gap: 10px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 10px; }
  .workspace-head { flex-direction: column; align-items: flex-start; }
  .balance { align-self: stretch; justify-content: space-between; }
  .account-id span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
