/* Secondary marketing pages: pricing, security, docs, contact, legal, 404.
   Page-specific styles only. Tokens, buttons, cards, type and reveal come from base.css. */

[hidden] { display: none !important; }
.ico { width: 20px; height: 20px; flex: none; }
.btn .ico { width: 18px; height: 18px; }

/* ---------- Hero band (every page) ---------- */
.page-hero { position: relative; overflow: hidden; isolation: isolate; padding: 48px 0 56px; }
@media (min-width: 768px) { .page-hero { padding: 88px 0 80px; } }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero > .bg-grid { z-index: -1; }
.page-hero > .orb { z-index: -1; }
.page-hero .display { margin: 14px 0 18px; }
.page-hero .lead { max-width: 640px; }
.page-hero.is-center .lead { margin-left: auto; margin-right: auto; }
.page-hero.is-center .eyebrow { justify-content: center; }
.page-hero .hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.page-hero.is-center .hero-actions { justify-content: center; }
.page-hero .meta-line { margin-top: 18px; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.orb-hero { width: 420px; height: 420px; top: -200px; right: -160px; }
@media (min-width: 768px) { .orb-hero { width: 640px; height: 640px; top: -280px; right: -200px; } }

/* ---------- Pricing ---------- */
.pricing-section, .section--flush { padding-top: 0; }
.billing-wrap { display: flex; justify-content: center; margin-bottom: 36px; }
.billing-toggle { display: inline-flex; max-width: 100%; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); }
.billing-toggle button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--text-2); font-size: 15px; font-weight: 560; transition: background .2s var(--ease), color .2s var(--ease);
}
.billing-toggle button:hover { color: var(--text); }
.billing-toggle button[aria-pressed="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.save-tag {
  font-family: var(--mono); font-size: 12px; line-height: 1; padding: 5px 8px; border-radius: 999px;
  color: var(--ok); background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3);
}

.pricing-grid { display: grid; gap: 20px; }
@media (min-width: 960px) { .pricing-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: stretch; } }
.plan { display: flex; flex-direction: column; min-width: 0; }
.plan--featured { border-color: var(--brand-line); background: linear-gradient(180deg, rgba(255,144,41,.12), rgba(255,255,255,.01) 55%); box-shadow: var(--glow); }
.plan .h3 { margin-top: 16px; }
.plan > p { margin-top: 8px; }
.plan > .btn { margin-top: 26px; }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 22px; }
.price-amount { font-family: var(--serif); font-size: clamp(3.6rem, 13vw, 5rem); font-weight: 400; line-height: .9; letter-spacing: -.03em; color: var(--text); }
.price-amount--text { font-size: clamp(2.6rem, 9vw, 3.4rem); letter-spacing: -.02em; }
.price-unit { font-size: 15px; color: var(--muted); }
.price-note { margin-top: 8px; font-size: 14px; color: var(--muted); }

.seat-field { margin-top: 26px; }
.seat-field > label { display: block; font-size: 14px; font-weight: 500; color: var(--text-2); }
.stepper { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.stepper button {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,.03); color: var(--text); transition: background .2s var(--ease);
}
.stepper button:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.seat-input {
  width: 96px; height: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface);
  text-align: center; font-family: var(--mono); font-size: 18px; font-weight: 500; -moz-appearance: textfield; appearance: textfield;
}
.seat-input::-webkit-outer-spin-button, .seat-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.seat-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,144,41,.25); }
.seat-hint { margin-top: 10px; font-size: 14px; }
.seat-hint a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }

.calc { margin-top: 20px; padding: 18px; border-radius: var(--r); border: 1px solid var(--border); background: rgba(6,7,11,.55); }
.calc-main { font-size: 24px; font-weight: 650; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.calc-sub { margin-top: 6px; font-size: 15px; color: var(--text-2); }
.calc-save { margin-top: 10px; font-size: 14px; color: var(--ok); }
.plan-note { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.plan-divider { height: 1px; border: 0; background: var(--border); margin: 26px 0 22px; }
.plan-subhead { margin-bottom: 14px; font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; color: var(--text-2); }
.checklist .ico { margin-top: 3px; color: var(--ok); }
.checklist--brand .ico { color: var(--brand-2); }
.checklist li.is-off, .checklist li.is-off .ico { color: var(--muted); }

.compare-wrap { margin-top: 8px; }
.compare-note { margin-top: 18px; font-size: 14px; color: var(--muted); text-align: center; }

/* ---------- Stacked tables: cards on mobile, real table from 768px ---------- */
.stack-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 15px; }
.stack-table caption { caption-side: top; text-align: left; padding-bottom: 12px; color: var(--muted); }
.stack-table thead { display: none; }
.stack-table tbody tr { display: block; margin-bottom: 12px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.stack-table th, .stack-table td {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 12px 16px;
  border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; text-align: left;
}
.stack-table tr > :last-child { border-bottom: 0; }
.stack-table th[scope="row"] { display: block; color: var(--text); font-weight: 600; background: rgba(255,255,255,.025); }
.stack-table td::before {
  content: attr(data-label); flex: none; max-width: 45%; padding-top: 3px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
}
.stack-table td > .ico { margin-left: auto; }
@media (min-width: 768px) {
  .stack-table tbody tr { display: table-row; margin: 0; border: 0; border-radius: 0; background: none; overflow: visible; }
  .stack-table thead { display: table-header-group; }
  .stack-table th, .stack-table td { display: table-cell; padding: 14px 16px; }
  .stack-table thead th {
    font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); background: none; border-bottom-color: var(--border-strong);
  }
  .stack-table th[scope="row"] { background: none; font-weight: 550; }
  .stack-table td::before { display: none; }
  .stack-table td > .ico { margin-left: 0; }
}

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; margin: 0 auto; }
.faq details { border: 1px solid var(--border); border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01)); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 14px 18px;
  cursor: pointer; list-style: none; font-size: 16px; font-weight: 560; color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2);
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .faq-body { padding: 0 18px 18px; }
.faq .faq-body p { font-size: 15.5px; }
.faq .faq-body p + p { margin-top: 10px; }

/* ---------- Icons, cards and CTA blocks ---------- */
.icon-box {
  display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 14px;
  color: #DCD5FF; background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.icon-box .ico { width: 22px; height: 22px; }
.icon-box--cyan { color: #A5F3FC; background: rgba(255,144,41,.1); border-color: rgba(255,144,41,.3); }
.sec-card h3 { font-size: 1.15rem; }
.sec-card p { margin-top: 10px; font-size: 15px; }
.cta-card { display: grid; gap: 20px; align-items: center; padding: 24px; }
@media (min-width: 768px) { .cta-card { grid-template-columns: minmax(0, 1fr) auto; padding: 32px; } }
.cta-card p { margin-top: 8px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Security: data flow ---------- */
.flow { display: grid; gap: 0; }
.flow-node { position: relative; min-width: 0; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--border-strong); background: var(--surface); }
.flow-node--hub { border-color: var(--brand-line); background: linear-gradient(180deg, rgba(255,144,41,.14), rgba(255,255,255,.01)); box-shadow: var(--glow); }
.flow-step { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.flow-node h3 { margin: 8px 0 10px; font-size: 1.1rem; }
.flow-node p { font-size: 15px; }
.flow-node ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.tag { font-family: var(--mono); font-size: 12px; line-height: 1.4; padding: 4px 9px; border-radius: 8px; color: var(--text-2); background: rgba(255,255,255,.04); border: 1px solid var(--border-strong); }
.flow-arrow { display: grid; place-items: center; height: 44px; color: var(--brand-2); }
.flow-arrow .ico { width: 22px; height: 22px; transform: rotate(90deg); }
.flow-return { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; font-size: 15px; color: var(--muted); text-align: center; }
.flow-return .ico { color: var(--ok); }
@media (min-width: 960px) {
  .flow { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr); align-items: stretch; }
  .flow-arrow { height: auto; }
  .flow-arrow .ico { transform: none; }
}

/* ---------- Docs and legal: layout, TOC, prose ---------- */
.doc-layout { display: grid; gap: 28px; }
.doc-toc { position: relative; min-width: 0; }
.toc-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 0 16px;
  border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 15px; font-weight: 560;
}
.toc-toggle::after {
  content: ""; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .25s var(--ease);
}
.doc-toc.is-open .toc-toggle::after { transform: rotate(-135deg); }
.toc-list { display: none; list-style: none; margin: 8px 0 0; padding: 6px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.doc-toc.is-open .toc-list { display: block; }
.toc-list a {
  display: flex; align-items: center; min-height: 44px; padding: 6px 12px; border-left: 2px solid transparent; border-radius: 10px;
  font-size: 15px; color: var(--muted); transition: color .2s, background .2s, border-color .2s;
}
.toc-list a:hover { color: var(--text); background: rgba(255,255,255,.03); }
.toc-list a.is-active { color: var(--text); background: rgba(255,255,255,.05); border-left-color: var(--brand-2); }
.no-js .toc-toggle { display: none; }
.no-js .toc-list { display: block; }
@media (min-width: 960px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 760px); gap: 64px; justify-content: center; align-items: start; }
  .doc-toc { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; }
  .toc-toggle { display: none; }
  .toc-list { display: block; margin: 0; padding: 0; border: 0; background: none; }
}

.doc-article { min-width: 0; max-width: 760px; overflow-wrap: break-word; }
.doc-section + .doc-section { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--border); }
.doc-article h2 { margin-bottom: 16px; font-size: clamp(1.5rem, 4.4vw, 1.95rem); letter-spacing: -.025em; }
.doc-article h3 { margin: 28px 0 8px; font-size: 1.08rem; color: var(--text); letter-spacing: -.01em; }
.doc-article p, .doc-article li { font-size: 16px; line-height: 1.7; color: var(--text-2); }
.doc-article p + p, .doc-article p + ul, .doc-article p + ol, .doc-article ul + p, .doc-article ol + p { margin-top: 14px; }
.doc-article ul, .doc-article ol { margin: 14px 0 0; padding-left: 22px; }
.doc-article li + li { margin-top: 8px; }
.doc-article strong { color: var(--text); font-weight: 600; }
.doc-article a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.doc-article code {
  font-family: var(--mono); font-size: .9em; padding: 2px 6px; border-radius: 6px; color: #DCD5FF;
  background: var(--surface-2); border: 1px solid var(--border);
}
.doc-article a.btn { color: var(--text); text-decoration: none; }
.doc-article a.btn-primary { color: #fff; }
.doc-article .btn { margin-top: 6px; }

.h-num { margin-right: 8px; font-family: var(--mono); font-size: .8em; font-weight: 500; color: var(--brand-2); }
.h-anchor { margin-left: 8px; font-size: .62em; font-weight: 400; color: var(--muted); opacity: .45; text-decoration: none !important; }
.doc-article h2:hover .h-anchor, .doc-article .h-anchor:focus-visible { opacity: 1; }

.clause { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px; margin: 14px 0 0; }
.clause-no { padding-top: 3px; font-family: var(--mono); font-size: 14px; color: var(--muted); }
.clause-title { font-weight: 600; color: var(--text); }
.clause-list { margin: 14px 0 0; padding-left: 22px; }

.steps { list-style: none; margin: 18px 0 0; padding: 0; counter-reset: step; display: grid; gap: 12px; }
.steps li { position: relative; counter-increment: step; margin: 0; padding: 16px 16px 16px 62px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-size: 13px; color: #DCD5FF; background: var(--brand-soft); border: 1px solid var(--brand-line);
}
.steps li strong { display: block; margin-bottom: 2px; font-size: 16px; color: var(--text); }
.steps li p { font-size: 15px; line-height: 1.6; }
.doc-article .steps li + li { margin-top: 0; }

.callout { display: grid; gap: 6px; margin: 22px 0 0; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); }
.callout strong { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); }
.callout p { font-size: 15px; }
.callout--warn { border-color: rgba(251,191,36,.35); background: rgba(251,191,36,.05); }
.callout--warn strong { color: var(--warn); }

kbd.kbd + kbd.kbd { margin-left: 2px; }
.doc-article .stack-table td code { font-size: 13px; }

/* ---------- Contact ---------- */
.contact-layout { display: grid; gap: 24px; }
@media (min-width: 960px) { .contact-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; } }
.form-card { padding: 22px; }
@media (min-width: 768px) { .form-card { padding: 32px; } }
.form-grid { display: grid; gap: 18px; }
@media (min-width: 600px) { .form-grid--2 { grid-template-columns: 1fr 1fr; } }
.field .input { min-width: 0; }
.field.has-error .input { border-color: var(--bad); }
.field.has-error .input:focus { box-shadow: 0 0 0 3px rgba(248,113,113,.25); }
.field-error { font-size: 14px; color: var(--bad); }
.field-hint { font-size: 13px; color: var(--muted); }
.char-count { justify-self: end; font-family: var(--mono); font-size: 13px; color: var(--muted); }
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237D8398' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
}
.form-alert { padding: 14px 16px; border-radius: var(--r); border: 1px solid rgba(248,113,113,.4); background: rgba(248,113,113,.08); color: #FECACA; font-size: 15px; }
.form-alert a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.form-actions { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 600px) { .form-actions { flex-direction: row; align-items: center; justify-content: space-between; } }
.form-actions .btn { min-width: 200px; }
.form-fine { font-size: 13px; color: var(--muted); }
.form-fine a { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.btn[aria-busy="true"] { opacity: .85; pointer-events: none; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.success:focus { outline: none; }
.success .icon-box { color: var(--ok); background: rgba(52,211,153,.12); border-color: rgba(52,211,153,.35); }
.success h2 { margin-bottom: 12px; font-size: clamp(1.5rem, 4vw, 1.9rem); }
.success p + p { margin-top: 12px; }
.side-stack { display: grid; gap: 20px; }
.side-card { padding: 22px; }
.side-card h2 { margin-bottom: 14px; font-size: 1.1rem; }
.side-card ul { margin: 12px 0 0; padding-left: 20px; }
.side-card ul li + li { margin-top: 8px; }
.side-card a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
.topic-hint { margin-top: 16px; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); font-size: 14px; }

/* ---------- Legal and docs: meta ---------- */
.legal-note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* ---------- 404 ---------- */
.nf-code { margin: 6px 0 0; font-size: clamp(6rem, 32vw, 15rem); line-height: .9; font-weight: 750; letter-spacing: -.07em; }
.nf h1 { margin-top: 18px; }
.nf .clause-chip { margin-top: 20px; }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
  .faq summary::after, .toc-toggle::after { transition: none; }
}
