:root {
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --ink: #10202B;
  --ink-2: #4A5B66;
  --line: #C9D2DA;
  --accent: #1B4FD8;
  --accent-ink: #FFFFFF;
  --ok: #1F6B47;
  --warn: #B3402E;
  --ops-bg: #E4EBFB;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 1120px;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01";
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.015em; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(2rem, 4.6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
p { margin: 0 0 1em; max-width: 68ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.top {
  max-width: var(--max); margin: 0 auto; padding: 20px var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.top-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-size: 0.95rem; }
.top-nav a:hover { color: var(--ink); }

/* buttons */
.button {
  display: inline-block; background: var(--accent); color: var(--accent-ink) !important;
  padding: 12px 20px; border-radius: 4px; text-decoration: none; font-weight: 500; font-size: 1rem;
  border: 1px solid var(--accent); cursor: pointer; font-family: inherit; line-height: 1.2;
}
.button:hover { background: #163FB0; border-color: #163FB0; }
.button-small { padding: 8px 14px; font-size: 0.9rem; }
.button-secondary { background: transparent; color: var(--accent) !important; }
.button-secondary:hover { background: var(--ops-bg); }
.button[disabled] { opacity: 0.6; cursor: default; }
.link { color: var(--accent); font-weight: 500; }

/* hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 40px;
  display: grid; gap: 40px; grid-template-columns: 1fr; align-items: start;
}
@media (min-width: 960px) { .hero { grid-template-columns: 6fr 5fr; gap: 56px; padding-top: 72px; } }
.lede { font-size: 1.15rem; color: var(--ink-2); margin-top: 20px; }
.facts { list-style: none; padding: 0; margin: 20px 0 28px; color: var(--ink); }
.facts li { padding: 7px 0 7px 22px; position: relative; border-top: 1px solid var(--line); }
.facts li:last-child { border-bottom: 1px solid var(--line); }
.facts li::before { content: ""; position: absolute; left: 4px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cta-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }

/* event log */
.log {
  margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--mono); font-size: 0.86rem; line-height: 1.5; overflow: hidden;
}
.log figcaption { padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; overflow-x: auto; }
.log .prompt { color: var(--accent); margin-right: 8px; }
.log ol { list-style: none; margin: 0; padding: 8px 0; }
.log li { display: grid; grid-template-columns: 28px auto minmax(0, 1fr); gap: 12px; padding: 4px 16px; align-items: baseline; }
.log .meta { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.log .n { color: var(--ink-2); text-align: right; }
.log .ev { white-space: nowrap; }
.log .meta { color: var(--ink-2); white-space: nowrap; }
.log .meta.ok { color: var(--ok); }
.log li.ops { background: var(--ops-bg); }
.log li.ops .ev { color: var(--accent); font-weight: 500; }
.log li.ops .n { color: var(--accent); }
.log-note { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 0.9rem; color: var(--ink-2); }
@media (max-width: 480px) { .log li { grid-template-columns: 22px minmax(0, 1fr); } .log .meta { grid-column: 2; font-size: 0.8rem; } }

/* sections */
.section { max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter); border-top: 1px solid var(--line); }
.section-lede { color: var(--ink-2); font-size: 1.1rem; margin-top: 10px; }
.section h2 + .table-wrap, .section h2 + .two-col, .section h2 + .arch, .section h2 + .trust-list { margin-top: 28px; }
.section-lede + .table-wrap { margin-top: 24px; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; min-width: 640px; background: var(--surface); border: 1px solid var(--line); font-size: 0.97rem; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px; border-top: 1px solid var(--line); }
thead th { border-top: 0; font-weight: 600; background: #F6F8FA; }
tbody th { font-weight: 500; color: var(--ink-2); width: 22%; }
.compare td:last-child, .compare thead th:last-child { background: var(--ops-bg); }
.compare thead th:last-child { color: var(--accent); }
.pricing td strong { font-weight: 600; white-space: nowrap; }
.fine { font-size: 0.9rem; color: var(--ink-2); margin-top: 14px; }

/* architecture */
.arch { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 960px) { .arch { grid-template-columns: 7fr 4fr; align-items: start; } }
.arch-svg { width: 100%; height: auto; display: block; font-family: var(--sans); font-size: 15px; }
.arch-svg text { fill: var(--ink); font-weight: 500; }
.arch-svg .small { font-size: 13px; font-weight: 400; fill: var(--ink-2); }
.arch-svg .mono { font-family: var(--mono); }
.arch-svg .box rect:first-child { fill: var(--surface); stroke: var(--line); }
.arch-svg .box.us rect:first-child { stroke: var(--accent); }
.arch-svg .inner { fill: var(--bg); stroke: var(--line); }
.arch-svg .az rect:first-child { fill: #F6F8FA; stroke: var(--line); }
.arch-svg .db { fill: var(--ops-bg); stroke: none; }
.arch-svg .link line { stroke: var(--accent); stroke-width: 2; stroke-dasharray: 4 4; }
.arch-svg .link text { fill: var(--accent); }
.arch-notes p { font-size: 1rem; }

.two-col { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* request + cassandra sections */
.request .cta-row { margin-top: 24px; }
.cassandra { display: grid; gap: 24px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 960px) { .cassandra { grid-template-columns: 7fr 4fr; } }
.cassandra h2 { font-size: 1.4rem; }
.cassandra p { color: var(--ink-2); margin-top: 10px; }
.cassandra .cta-row { justify-content: flex-start; }
@media (min-width: 960px) { .cassandra .cta-row { justify-content: flex-end; } }

/* modal */
.modal { border: 1px solid var(--line); border-radius: 8px; padding: 0; width: min(760px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(16, 32, 43, 0.25); }
.modal-small { width: min(480px, calc(100vw - 32px)); }
.modal::backdrop { background: rgba(16, 32, 43, 0.55); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 24px 0; }
.modal-title { font-size: 1.35rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0; max-width: none; }
.modal-close { background: none; border: 0; font: inherit; font-size: 1.6rem; line-height: 1; color: var(--ink-2); cursor: pointer; padding: 0 4px; margin: -4px -4px 0 0; }
.modal-close:hover { color: var(--ink); }
.modal-lede { color: var(--ink-2); padding: 8px 24px 0; margin-bottom: 8px; }
.modal form { padding: 16px 24px 24px; }

/* forms */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.lead-form { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .lead-form { grid-template-columns: 1fr 1fr; } .field-wide { grid-column: 1 / -1; } }
.mini-form { display: grid; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { font-size: 0.92rem; font-weight: 500; color: var(--ink); }
.field legend { padding: 0; margin-bottom: 6px; }
.field .radio { font-weight: 400; display: flex; gap: 8px; align-items: center; padding: 2px 0; }
input[type="text"], input[type="email"], select, textarea {
  font: inherit; font-size: 1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: var(--surface); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--warn); }
textarea { resize: vertical; }
.turnstile-slot { min-height: 65px; }
.form-actions { display: flex; flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.form-status { margin: 0; font-size: 0.95rem; color: var(--ink-2); }
.form-status.ok { color: var(--ok); }
.form-status.err { color: var(--warn); }

/* trust */
.trust-list { margin: 0; display: grid; gap: 0; }
.trust-list > div { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 18px 0; border-top: 1px solid var(--line); }
@media (min-width: 720px) { .trust-list > div { grid-template-columns: 160px 1fr; gap: 24px; } }
.trust-list dt { font-weight: 600; }
.trust-list dd { margin: 0; color: var(--ink-2); max-width: 68ch; }

/* faq */
.faq-list { margin: 28px 0 0; }
.faq-list > div { padding: 18px 0; border-top: 1px solid var(--line); }
.faq-list dt { font-weight: 600; margin-bottom: 6px; }
.faq-list dd { margin: 0; color: var(--ink-2); max-width: 68ch; }

/* footer */
.foot { max-width: var(--max); margin: 0 auto; padding: 32px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: 0.9rem; }
.foot p { max-width: none; }

@media (prefers-reduced-motion: no-preference) {
  .button, input, select, textarea { transition: background-color 120ms, border-color 120ms; }
}
