/* Marketing site and guide typography. Loads after taki.css and uses
   only the tokens defined there, plus a few marketing-only tokens. */

:root {
  --mkt-max: 1120px;
  --mkt-narrow: 780px;
  --glow-a: #38bdf81f;
  --glow-b: #38bdf812;
  --hairline: #ffffff0d;
}

.mkt { display: block; }
.mkt-inner { max-width: var(--mkt-max); margin: 0 auto; padding: 0 24px; }
.mkt-narrow { max-width: var(--mkt-narrow); margin: 0 auto; padding: 0 24px; }
.mkt-section { padding: 84px 0; position: relative; }
.mkt-section.tight { padding: 56px 0; }
.mkt-section.alt { background: var(--bg-canvas); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; color: var(--text-faint); margin: 0 0 14px;
}
.eyebrow.muted { color: var(--text-faint); }

h1.display {
  font-size: clamp(34px, 5.6vw, 60px); line-height: 1.08;
  letter-spacing: -.02em; font-weight: 800; margin: 0 0 20px;
}
h2.display {
  font-size: clamp(24px, 3.2vw, 36px); line-height: 1.2;
  letter-spacing: -.015em; font-weight: 700; margin: 0 0 16px;
  max-width: 22ch;
}
h2.display.wide { max-width: 34ch; }
.accent-text { color: var(--accent); }
.lede { font-size: clamp(15.5px, 1.5vw, 18px); color: var(--text-dim); max-width: 62ch; margin: 0 0 28px; line-height: 1.65; }
.lede.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head { margin-bottom: 44px; }
.section-head.center { text-align: center; }
.section-head.center h2.display, .section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---- buttons ------------------------------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-row.center { justify-content: center; }
.btn-lg, .btn-outline {
  display: inline-block; font-size: 15px; font-weight: 600;
  padding: 12px 22px; border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: filter .12s, border-color .12s, color .12s, background .12s;
}
.btn-lg {
  background: var(--accent-strong);
  color: #06121b;
}
.btn-lg:hover { filter: brightness(1.08); text-decoration: none; }
.btn-outline { border-color: var(--border-strong); color: var(--text); background: #ffffff08; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cta-note { font-size: 13px; color: var(--text-faint); margin: 14px 0 0; }

/* ---- hero ---------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  padding: 78px 0 84px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 460px at 76% 4%, var(--glow-a), transparent 62%),
    radial-gradient(700px 420px at 6% 96%, var(--glow-b), transparent 60%),
    var(--bg-page);
}
.hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 78%);
}
/* The hero gets a wider container than the rest of the site so the
   node graph can actually use big screens. */
.hero .mkt-inner { max-width: min(1560px, 100%); }
.hero-grid {
  position: relative; display: grid; gap: clamp(40px, 4vw, 72px);
  grid-template-columns: minmax(0, 4.5fr) minmax(0, 7.5fr); align-items: center;
}
.hero-points { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 9px; }
.hero-points li { color: var(--text-dim); font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; }
.hero-points li::before {
  content: ''; flex: none; width: 6px; height: 6px; margin-top: 8px;
  border-radius: 1px; background: var(--accent);
}

/* ---- node graph illustration --------------------------------- */
.node-art { width: 100%; height: auto; display: block; overflow: visible; }
.node-art .n-body { fill: var(--bg-panel); stroke: var(--border-strong); stroke-width: 1; }
.node-art .n-head { stroke: none; }
.node-art .n-title { fill: #0d0d12; font-size: 10.5px; font-weight: 700; font-family: var(--font); }
.node-art .n-sub { fill: var(--text-faint); font-size: 9px; font-family: var(--mono); }
.node-art .n-row { fill: var(--bg-raised); }
.node-art .port { fill: var(--bg-canvas); stroke: var(--text-faint); stroke-width: 1.2; }
.node-art .port.live { fill: var(--accent); stroke: var(--accent); }
.node-art .edge { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .75; filter: url(#edgeGlow); }
.node-art .edge.dim { stroke: var(--node-gray); opacity: .38; filter: none; }
.node-art .flowdash {
  fill: none; stroke: #eaf7ff; stroke-width: 1.6; stroke-dasharray: 5 190;
  opacity: .9; animation: dashflow 3.4s linear infinite;
}
@keyframes dashflow { to { stroke-dashoffset: -195; } }
@media (prefers-reduced-motion: reduce) { .node-art .flowdash { animation: none; opacity: 0; } }

/* ---- browser frame + mock canvas ----------------------------- */
.frame {
  border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden;
  background: var(--bg-canvas); box-shadow: var(--shadow);
}
.frame-bar {
  display: flex; align-items: center; gap: 8px; padding: 9px 12px;
  background: var(--bg-panel); border-bottom: 1px solid var(--border);
}
.frame-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bg-raised); border: 1px solid var(--border-strong); }
.frame-url {
  flex: 1; margin-left: 8px; font-family: var(--mono); font-size: 11.5px;
  color: var(--text-faint); background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 5px; padding: 3px 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.mock {
  position: relative; min-height: 320px; padding: 26px;
  background-color: var(--bg-canvas);
  background-image: radial-gradient(#ffffff12 1px, transparent 1px);
  background-size: 22px 22px;
}
.mock-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 46px 34px; align-items: start; }
.mock-node {
  background: var(--bg-panel); border: 1px solid var(--border-strong);
  border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px #00000055;
  position: relative; z-index: 2;
}
.mock-node.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 6px 22px #38bdf833; }
.mock-node .mh {
  font-size: 11.5px; font-weight: 700; color: #0d0d12;
  padding: 5px 10px; letter-spacing: .01em;
}
.mock-node .mb { padding: 8px 10px 10px; display: grid; gap: 6px; }
.mock-node .mrow {
  font-size: 10.5px; color: var(--text-dim); background: var(--bg-raised);
  border-radius: 4px; padding: 3px 8px; display: flex; justify-content: space-between; gap: 10px;
}
.mock-node .mrow b { color: var(--text); font-weight: 600; }
.mock-node .mport {
  font-size: 10px; color: var(--text-faint); font-family: var(--mono);
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
}
.mock-node .mport::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--bg-canvas); border: 1.5px solid var(--text-faint);
}
.mock-node .mport.on::after { background: var(--accent); border-color: var(--accent); }
.mh-green { background: var(--node-green); }
.mh-blue { background: var(--node-blue); }
.mh-purple { background: var(--node-purple); }
.mh-cyan { background: var(--node-cyan); }
.mh-orange { background: var(--node-orange); }
.mh-red { background: var(--node-red); }
.mock-wires { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.mock-wires path { fill: none; stroke: var(--accent); stroke-width: 1.5; opacity: .6; }

/* ---- cards --------------------------------------------------- */
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: border-color .14s, box-shadow .14s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 28%, transparent);
}
.card h3 { font-size: 16px; margin: 0 0 8px; font-weight: 700; }
.card p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.62; }
.card-icon {
  width: 34px; height: 34px; border-radius: 9px; margin-bottom: 14px;
  display: grid; place-items: center; background: var(--bg-raised);
  border: 1px solid var(--border-strong);
}
.card-icon svg { width: 18px; height: 18px; stroke-width: 1.7; fill: none; stroke: var(--accent); }

/* ---- split section ------------------------------------------- */
.split { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: 48px; align-items: center; }
.split.reverse .split-art { order: -1; }
.check-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.check-list li { display: flex; gap: 11px; color: var(--text-dim); font-size: 14.5px; line-height: 1.55; }
.check-list li svg { flex: none; width: 17px; height: 17px; margin-top: 2px; stroke: var(--ok); fill: none; stroke-width: 2.2; }

/* ---- steps --------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 22px; border-top: 2px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -15px; left: 0;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-page); border: 2px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.62; }

/* ---- pricing ------------------------------------------------- */
.price-toggle {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px;
  background: var(--bg-panel); border: 1px solid var(--border); border-radius: 999px;
}
.price-toggle button {
  border: 0; background: none; color: var(--text-dim); cursor: pointer;
  font-family: var(--font); font-size: 13.5px; font-weight: 600;
  padding: 7px 18px; border-radius: 999px;
}
.price-toggle button[aria-pressed="true"] { background: var(--bg-raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.toggle-badge {
  margin-left: 10px; font-size: 12px; font-weight: 700; color: var(--ok);
  background: #4ade8018; border: 1px solid #4ade8040; border-radius: 999px; padding: 3px 10px;
}

.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.plan {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 26px 24px; position: relative; display: flex; flex-direction: column;
}
.plan.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.plan-badge {
  position: absolute; top: -11px; left: 24px; font-size: 11.5px; font-weight: 600;
  color: #06121b;
  background: var(--accent); border-radius: var(--radius-sm); padding: 3px 10px;
}
.plan h3 { font-size: 17px; margin: 0 0 4px; }
.plan .plan-tag { color: var(--text-faint); font-size: 13px; margin: 0 0 20px; min-height: 38px; line-height: 1.45; }
.plan .amount { display: flex; align-items: baseline; gap: 4px; }
.plan .amount .cur { font-size: 20px; font-weight: 700; color: var(--text-dim); }
.plan .amount .num { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.plan .amount .per { font-size: 13.5px; color: var(--text-faint); }
.plan .amount-note { font-size: 12.5px; color: var(--text-faint); margin: 8px 0 20px; min-height: 18px; }
.plan .btn-lg, .plan .btn-outline { width: 100%; text-align: center; }
.plan-features { list-style: none; padding: 20px 0 0; margin: 20px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.plan-features li { display: flex; gap: 10px; font-size: 13.5px; color: var(--text-dim); }
.plan-features li svg { flex: none; width: 15px; height: 15px; margin-top: 3px; stroke: var(--accent); fill: none; stroke-width: 2.4; }
.plan-limits { list-style: none; padding: 0; margin: 0 0 4px; display: grid; gap: 8px; }
.plan-limits li { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--text-dim); }
.plan-limits li b { color: var(--text); font-weight: 600; }
.plan-foot { margin-top: auto; }

table.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
table.compare th, table.compare td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: center; }
table.compare th:first-child, table.compare td:first-child { text-align: left; }
table.compare thead th {
  color: var(--text); font-size: 13px; font-weight: 700;
  border-bottom: 1px solid var(--border-strong); white-space: nowrap;
}
table.compare thead th span { display: block; font-size: 12px; font-weight: 500; color: var(--text-faint); }
table.compare tbody td { color: var(--text-dim); }
table.compare tbody tr:hover td { background: var(--bg-raised); }
table.compare .grp td {
  color: var(--text-faint); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .07em; font-weight: 700; padding-top: 20px; background: none;
}
.yes { color: var(--ok); font-weight: 700; }
.no { color: var(--text-faint); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
.usage-item { background: var(--bg-panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; }
.usage-item .k { font-size: 12.5px; color: var(--text-faint); margin-bottom: 6px; }
.usage-item .v { font-size: 15px; font-weight: 700; color: var(--text); }
.note-box {
  border: 1px solid var(--border);
  background: var(--bg-panel); border-radius: var(--radius);
  padding: 18px 20px; color: var(--text-dim); font-size: 14px; line-height: 1.65;
}
.note-box h3 { margin: 0 0 8px; font-size: 15px; color: var(--text); }

/* ---- faq ----------------------------------------------------- */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 17px 52px 17px 20px;
  font-weight: 600; font-size: 15px; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ''; position: absolute; right: 22px; top: 24px;
  width: 9px; height: 9px; border-right: 2px solid var(--text-faint);
  border-bottom: 2px solid var(--text-faint); transform: rotate(45deg);
  transition: transform .15s;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 27px; }
.faq .answer { padding: 0 24px 20px; color: var(--text-dim); font-size: 14px; line-height: 1.7; }

/* ---- final cta ----------------------------------------------- */
.final-cta {
  text-align: center; padding: 72px 32px; border-radius: 16px;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
}

/* ---- footer -------------------------------------------------- */
.mkt-footer { border-top: 1px solid var(--border); background: var(--bg-canvas); padding: 52px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-grid h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 0 0 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--text-dim); font-size: 14px; }
.footer-grid a:hover { color: var(--text); }
.footer-tagline { color: var(--text-dim); font-size: 14px; margin: 12px 0 0; max-width: 34ch; }
.dewble-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--bg-raised); border: 1px solid var(--border-strong);
  color: var(--text); font-weight: 700; font-size: 15px;
}
.footer-legal {
  margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border);
  color: var(--text-faint); font-size: 12.5px; line-height: 1.7; max-width: 82ch;
}

/* ---- guides -------------------------------------------------- */
.guide-index { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-card {
  display: block; background: var(--bg-panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; color: var(--text);
  transition: border-color .14s, box-shadow .14s;
}
.guide-card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  text-decoration: none;
}
.guide-card h3 { margin: 0 0 7px; font-size: 16px; }
.guide-card p { margin: 0; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.guide-card .more { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); font-weight: 600; }

.guide-layout { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 44px; align-items: start; }
.guide-toc { position: sticky; top: 72px; }
.guide-toc h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-faint); margin: 0 0 12px; }
.guide-toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; border-left: 1px solid var(--border); }
.guide-toc a { color: var(--text-dim); font-size: 13px; display: block; padding-left: 14px; margin-left: -1px; border-left: 2px solid transparent; }
.guide-toc a:hover { color: var(--text); border-left-color: var(--accent); text-decoration: none; }
.guide-toc .lvl3 a { padding-left: 26px; font-size: 12.5px; color: var(--text-faint); }
.crumb { font-size: 13px; color: var(--text-faint); margin: 0 0 12px; }
.crumb a { color: var(--text-dim); }

.prose { font-size: 15px; line-height: 1.75; color: var(--text-dim); max-width: 72ch; }
.prose h2 { font-size: 22px; color: var(--text); margin: 40px 0 12px; letter-spacing: -.01em; scroll-margin-top: 72px; }
.prose h3 { font-size: 17px; color: var(--text); margin: 30px 0 10px; scroll-margin-top: 72px; }
.prose h4 { font-size: 15px; color: var(--text); margin: 24px 0 8px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--text-faint); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose code {
  font-family: var(--mono); font-size: .88em; background: var(--bg-input);
  border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--text);
}
.prose .guide-code {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; overflow-x: auto; margin: 0 0 18px;
}
.prose .guide-code code { background: none; border: 0; padding: 0; font-size: 13px; line-height: 1.6; }
.prose .guide-note {
  border: 1px solid var(--border); background: var(--bg-raised);
  border-radius: var(--radius-sm);
  padding: 14px 18px; margin: 0 0 18px; color: var(--text);
}
.prose .guide-rule { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
.guide-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.guide-nav a { font-size: 14px; font-weight: 600; }
.guide-nav .dir { display: block; font-size: 11.5px; color: var(--text-faint); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }

/* app-embedded guides reuse .prose inside the standard page shell */
.app-guide { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 40px; align-items: start; }

/* ---- responsive ---------------------------------------------- */
@media (max-width: 980px) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .split.reverse .split-art { order: 0; }
  .card-grid, .card-grid.two, .steps, .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout, .app-guide { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .guide-toc { position: static; order: -1; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-grid { gap: 26px 20px; }
}
@media (max-width: 660px) {
  .mkt-section { padding: 56px 0; }
  .hero { padding: 52px 0 60px; }
  .card-grid, .card-grid.two, .steps, .plan-grid, .guide-index, .usage-grid { grid-template-columns: minmax(0, 1fr); }
  .mock-grid { grid-template-columns: minmax(0, 1fr); }
  .mock-wires { display: none; }
  .final-cta { padding: 48px 20px; }
  .plan .plan-tag, .plan .amount-note { min-height: 0; }
}
