:root {
  color-scheme: dark;
  --bg: #07090f;
  --bg2: #0c111b;
  --panel: rgba(15, 23, 42, 0.72);
  --border: rgba(148, 163, 184, 0.18);
  --text: #e8ecf4;
  --muted: #94a3b8;
  --dim: #64748b;
  --accent: #38bdf8;
  --accent2: #a78bfa;
  --steel: #f59e0b;
  --ok: #34d399;
  --danger: #f87171;
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.bg {
  position: fixed; inset: -20%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 50% 40% at 15% 20%, rgba(56,189,248,.16), transparent 60%),
    radial-gradient(ellipse 45% 35% at 85% 75%, rgba(167,139,250,.14), transparent 55%),
    radial-gradient(ellipse 35% 30% at 50% 50%, rgba(245,158,11,.06), transparent 50%),
    linear-gradient(180deg, #07090f 0%, #0a0e16 100%);
}
.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Nav */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 0; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.logo {
  width: 2.1rem; height: 2.1rem; border-radius: .65rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; color: #07090f; font-weight: 800; font-size: .95rem;
  box-shadow: 0 0 24px rgba(56,189,248,.3);
}
.nav-links { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: .9rem; text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .7rem 1.15rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .92rem; cursor: pointer; text-decoration: none;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #07090f; box-shadow: 0 8px 28px rgba(56,189,248,.25);
}
.btn-ghost {
  background: rgba(15,23,42,.55); border-color: var(--border); color: var(--text);
}
.btn-steel {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  color: #111; box-shadow: 0 8px 28px rgba(245,158,11,.25);
}
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* Hero */
.hero { padding: 3.5rem 0 2.5rem; text-align: center; }
.pill {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .35rem .85rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--panel);
  font-size: .75rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 1.25rem;
}
.pill .dot { width: .45rem; height: .45rem; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1.12;
  max-width: 18ch; margin: 0 auto;
}
.hero h1 span {
  background: linear-gradient(90deg, var(--accent), var(--accent2), var(--steel));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .lead {
  margin: 1.15rem auto 0; max-width: 38rem; color: var(--muted); font-size: 1.08rem;
}
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; margin-top: 1.75rem; }
.hero-meta { margin-top: 1rem; color: var(--dim); font-size: .85rem; }

/* Cards / sections */
.section { padding: 2.75rem 0; }
.section h2 { font-size: 1.55rem; letter-spacing: -.02em; margin-bottom: .5rem; }
.section .sub { color: var(--muted); margin-bottom: 1.5rem; max-width: 40rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
@media (max-width: 800px) { .grid-3 { grid-template-columns: 1fr; } }
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.3rem;
  backdrop-filter: blur(10px);
}
.card h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .92rem; }
.icon { font-size: 1.35rem; margin-bottom: .55rem; }

/* Demo */
.demo-box {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px); padding: 1rem;
}
@media (max-width: 860px) { .demo-box { grid-template-columns: 1fr; } }
.demo-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin-bottom: .4rem; }
.demo-in {
  font-family: var(--mono); font-size: .88rem; color: #fde68a;
  background: #0a0f18; border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; white-space: pre-wrap; min-height: 7rem;
}
.demo-out {
  font-family: var(--mono); font-size: .82rem; color: #a7f3d0;
  background: #0a0f18; border: 1px solid var(--border); border-radius: 10px;
  padding: 1rem; white-space: pre-wrap; min-height: 7rem;
}

/* Pricing */
.price-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  background: linear-gradient(160deg, rgba(56,189,248,.12), rgba(167,139,250,.08));
  border: 1px solid rgba(56,189,248,.35);
  border-radius: calc(var(--radius) + 6px); padding: 2rem 1.5rem;
}
.price-card .amount { font-size: 3rem; font-weight: 800; letter-spacing: -.03em; }
.price-card .amount small { font-size: 1rem; color: var(--muted); font-weight: 600; }
.price-card ul { list-style: none; text-align: left; margin: 1.25rem 0 1.5rem; color: var(--muted); }
.price-card li { padding: .35rem 0; padding-left: 1.4rem; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* Footer */
footer {
  border-top: 1px solid var(--border); margin-top: 2rem;
  padding: 1.5rem 0 2rem; color: var(--dim); font-size: .85rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}

/* Tool page */
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; padding: 1.5rem 0 3rem; }
@media (max-width: 900px) { .tool-layout { grid-template-columns: 1fr; } }
textarea.inquiry {
  width: 100%; min-height: 180px; resize: vertical;
  background: #0a0f18; color: var(--text); border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem; font-family: var(--mono); font-size: .92rem;
  line-height: 1.5;
}
textarea.inquiry:focus { outline: 2px solid rgba(56,189,248,.35); border-color: var(--accent); }
.samples { display: flex; flex-wrap: wrap; gap: .4rem; margin: .75rem 0 1rem; }
.chip {
  font-size: .75rem; padding: .3rem .65rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(15,23,42,.6);
  color: var(--muted); cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
@media (max-width: 500px) { .field-grid { grid-template-columns: 1fr; } }
.field {
  background: #0a0f18; border: 1px solid var(--border); border-radius: 10px; padding: .7rem .8rem;
}
.field label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); margin-bottom: .2rem; }
.field .val { font-size: .92rem; font-weight: 600; word-break: break-word; min-height: 1.3em; }
.field .val.empty { color: var(--dim); font-weight: 500; }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .85rem; }
.email-box, .q-box {
  margin-top: 1rem; background: #0a0f18; border: 1px solid var(--border);
  border-radius: 12px; padding: 1rem; white-space: pre-wrap;
  font-family: var(--mono); font-size: .82rem; color: #cbd5e1; max-height: 280px; overflow: auto;
}
.q-box { color: #fde68a; }
.badge {
  display: inline-block; font-size: .7rem; padding: .15rem .5rem; border-radius: 999px;
  background: rgba(52,211,153,.15); color: var(--ok); border: 1px solid rgba(52,211,153,.3);
}
.badge.warn { background: rgba(245,158,11,.15); color: var(--steel); border-color: rgba(245,158,11,.3); }
.paywall {
  display: none; margin-top: 1rem; padding: 1.1rem 1.2rem;
  border: 1px solid rgba(245,158,11,.4); border-radius: 12px;
  background: rgba(245,158,11,.08); color: #fde68a;
}
.paywall.show { display: block; }
.usage { font-size: .8rem; color: var(--dim); margin-top: .5rem; }
.status { font-size: .85rem; color: var(--muted); min-height: 1.2em; margin-top: .5rem; }
.err { color: var(--danger); }

/* ---- Nav active + price lookup ---- */
.nav-links a.active { color: var(--text); font-weight: 600; border-bottom: 2px solid var(--steel); padding-bottom: .15rem; }
.h-sub { font-size: .85rem; font-weight: 600; color: var(--steel); margin-left: .5rem; letter-spacing: 0; vertical-align: middle;
  border: 1px solid rgba(245,158,11,.35); background: rgba(245,158,11,.08); border-radius: 999px; padding: .1rem .55rem; }
.btn-sm { padding: .4rem .8rem; font-size: .8rem; }
.price-input-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.1rem; }
@media (max-width: 860px) { .price-input-grid { grid-template-columns: 1fr; } }
.help-box { background: #0a0f18; border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1rem; font-size: .84rem; color: var(--muted); }
.help-box ul { list-style: none; margin: .2rem 0 .6rem; }
.help-box li { padding: .18rem 0; }
.help-box b { color: var(--text); font-weight: 600; }
.help-box code, .alts code, .disclaimer code { font-family: var(--mono); font-size: .78rem; color: #fde68a; background: rgba(245,158,11,.08); padding: .05rem .3rem; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin-top: .85rem; border: 1px solid var(--border); border-radius: 12px; background: #0a0f18; }
.ptable { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 860px; }
.ptable th { text-align: left; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dim); font-weight: 600;
  padding: .7rem .7rem; border-bottom: 1px solid var(--border); background: rgba(15,23,42,.8); position: sticky; top: 0; }
.ptable th small { text-transform: none; letter-spacing: 0; color: var(--steel); font-weight: 600; }
.ptable td { padding: .65rem .7rem; border-bottom: 1px solid rgba(148,163,184,.08); vertical-align: top; }
.ptable tbody tr:hover { background: rgba(56,189,248,.04); }
.ptable .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ptable .mono { font-family: var(--mono); font-size: .82rem; white-space: nowrap; }
.ptable .price { font-family: var(--mono); font-size: 1.02rem; font-weight: 700; color: var(--ok); }
.ptable .sub { font-size: .72rem; color: var(--dim); }
.ptable .sub.cn { color: #94a3b8; }
.ptable .dim { color: var(--dim); }
.ptable .notes { font-size: .78rem; color: var(--muted); min-width: 220px; }
.ptable .notes a { font-size: .78rem; }
.ptable .notes ul { margin: .25rem 0 0 1rem; }
.ptable .notes li { margin: .1rem 0; }
.ptable .alts { margin-top: .3rem; color: #cbd5e1; }
.ptable tfoot td { border-top: 1px solid var(--border); border-bottom: 0; background: rgba(15,23,42,.6); font-family: var(--mono); }
.empty-row { text-align: center; color: var(--dim); padding: 2rem 1rem !important; }
.tag { display: inline-block; font-size: .72rem; padding: .12rem .5rem; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.tag.warn { background: rgba(245,158,11,.15); color: var(--steel); border: 1px solid rgba(245,158,11,.35); }
.tag.bad { background: rgba(248,113,113,.12); color: var(--danger); border: 1px solid rgba(248,113,113,.3); }
.asof { text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: .35rem; }
.disclaimer { margin-top: 1rem; padding: .9rem 1rem; border-left: 3px solid var(--steel); background: rgba(245,158,11,.06);
  border-radius: 0 10px 10px 0; font-size: .82rem; color: var(--muted); }
.disclaimer strong { color: #fde68a; display: block; margin-bottom: .2rem; }
.contact-line { margin-top: .45rem; color: var(--text); }
.spinner { display: inline-block; width: .9rem; height: .9rem; border: 2px solid var(--border); border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; margin-right: .35rem; }
@keyframes spin { to { transform: rotate(360deg); } }
/* landing feature split */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 860px) { .feature-split { grid-template-columns: 1fr; } }
.feature-split .card { display: flex; flex-direction: column; gap: .5rem; }
.feature-split .card .btn { align-self: flex-start; margin-top: .5rem; }
.mini-table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .78rem; margin-top: .35rem; }
.mini-table td, .mini-table th { padding: .35rem .4rem; border-bottom: 1px solid rgba(148,163,184,.1); text-align: left; }
.mini-table th { color: var(--dim); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; }
.mini-table .num { text-align: right; color: var(--ok); }

@media (max-width: 700px) {
  .table-wrap { border: 0; background: transparent; overflow: visible; }
  .ptable { min-width: 0; }
  .ptable thead { display: none; }
  .ptable, .ptable tbody, .ptable tfoot, .ptable tr, .ptable td { display: block; width: 100%; }
  .ptable tbody tr { background: #0a0f18; border: 1px solid var(--border); border-radius: 12px; margin-bottom: .7rem; padding: .35rem .2rem; }
  .ptable td { display: flex; justify-content: space-between; gap: .75rem; border: 0; padding: .3rem .7rem; text-align: right; }
  .ptable td::before { content: attr(data-label); font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); text-align: left; flex: 0 0 auto; padding-top: .15rem; }
  .ptable td.c-line { display: none; }
  .ptable td.c-prod { font-weight: 600; }
  .ptable td .cv { text-align: right; min-width: 0; }
  .ptable td.notes { display: block; text-align: left; border-top: 1px dashed rgba(148,163,184,.15); margin-top: .25rem; padding-top: .5rem; }
  .ptable td.notes::before { display: block; margin-bottom: .2rem; }
  .ptable .num { white-space: normal; }
  .ptable tfoot tr { border: 1px solid rgba(245,158,11,.35); border-radius: 12px; background: rgba(245,158,11,.06); padding: .35rem .2rem; }
  .ptable tfoot td { background: transparent; border: 0; }
  .ptable tfoot td.hide-m { display: none; }
  .ptable tfoot td[colspan]::before { content: ""; }
  .empty-row { display: block !important; }
  .empty-row::before { content: none !important; }
  .h-sub { display: inline-block; margin: .35rem 0 0; }
}
