/* ==========================================================================
   Public site design system.
   Hand-written. One accent, system fonts, no build step.
   Palette lives in custom properties below; everything derives from it.
   ========================================================================== */

:root {
  --ink: #0c1425;          /* near-black navy: headings, dark bands */
  --ink-soft: #16203a;     /* dark band panels */
  --text: #3a4457;         /* body copy */
  --muted: #5b6678;        /* secondary copy (AA on white) */
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --border: #e3e8ef;
  --border-strong: #cdd5e0;
  --accent: #3b5bdb;       /* the one accent */
  --accent-hover: #3050c8;
  --accent-soft: #eef2fe;
  --accent-border: #c9d4f6;
  --local: #1d7a33;        /* "runs on your hardware" green */
  --local-soft: #e8f6ec;
  --cloud: #b35309;        /* "escalated to cloud" amber */
  --cloud-soft: #fdf1e3;
  --error: #c0392b;
  --error-soft: #fdecea;
  --on-dark: #c3cddd;      /* body copy on --ink */
  --on-dark-strong: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(12, 20, 37, .05), 0 8px 24px -12px rgba(12, 20, 37, .12);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

/* --- Reset & base ------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

h1, h2, h3, h4 {
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(2.1rem, 5.5vw, 3.3rem); letter-spacing: -0.025em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.15rem); }
h3 { font-size: 1.17rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

ul, ol { margin: 0 0 1em; padding-left: 1.3em; }
li { margin-bottom: .4em; }

code {
  font-family: var(--mono);
  font-size: .88em;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1em .35em;
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* --- Layout ------------------------------------------------------------- */

.container {
  max-width: 71rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container-narrow { max-width: 46rem; }

.section { padding: 4rem 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section-dark { background: var(--ink); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: var(--on-dark-strong); }
.section-dark a:not(.btn) { color: #9db1f5; }

.section-head { max-width: 42rem; margin-bottom: 2.5rem; }
.section-head.centered { margin-inline: auto; text-align: center; }

.eyebrow {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.section-dark .eyebrow { color: #9db1f5; }

.lede { font-size: 1.2rem; color: var(--muted); }
.section-dark .lede { color: var(--on-dark); }

@media (min-width: 800px) {
  .section { padding: 5.5rem 0; }
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem .9rem;
  min-height: 4rem;
  padding-block: .5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 1.7rem; height: 1.7rem; flex: none; color: var(--ink); }
.brand-light { color: #fff; }

.site-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .3rem .4rem;
}
.site-nav > a:not(.btn) {
  color: var(--text);
  font-weight: 500;
  font-size: .95rem;
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
}
.site-nav > a:not(.btn):hover { color: var(--ink); background: var(--bg-alt); text-decoration: none; }
.site-nav .btn { margin-left: .35rem; }

@media (max-width: 700px) {
  .nav-signin { display: none; } /* still available in the footer */
}
@media (max-width: 420px) {
  .site-nav > a:not(.btn) { padding: .35rem .45rem; font-size: .9rem; }
}

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

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  padding: .78rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--accent-soft); }

.btn-sm { padding: .5rem .95rem; font-size: .9rem; }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.06rem; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  margin-top: 1.6rem;
}
.cta-note { font-size: .88rem; color: var(--muted); margin-top: .9rem; }
.section-dark .cta-note { color: var(--on-dark); }

/* --- Badge / pills ------------------------------------------------------ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  padding: .32rem .85rem;
  margin-bottom: 1.3rem;
}
.badge::before {
  content: "";
  width: .5rem;
  height: .5rem;
  border-radius: 50%;
  background: var(--accent);
}
/* Live vs roadmap must differ by word AND shape, not by hue alone — a
   colour-only distinction disappears for a colourblind reader and in every
   screenshot. Live: solid border, filled dot. Roadmap: dashed border, hollow
   dot, rhyming with the dashed grammar already used for roadmap cards. */
.badge-soon {
  color: var(--cloud);
  background: var(--cloud-soft);
  border-style: dashed;
  border-color: #e5c49b;
}
.badge-soon::before {
  background: transparent;
  border: 1.5px solid var(--cloud);
}

/* A small pill on a nav item whose destination is a roadmap surface, so the
   status is visible before the click rather than after it. */
.nav-chip {
  display: inline-block;
  margin-left: .3rem;
  padding: .05rem .38rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--cloud);
  background: var(--cloud-soft);
  border: 1px dashed #e5c49b;
  border-radius: 999px;
  vertical-align: middle;
}

/* --- Price table -------------------------------------------------------- */

/* The trial is not a plan, so it does not look like one. Set apart rather than
   sitting in the band list as if it were a fourth tier a customer might stay
   on. */
.price-trial { background: var(--accent-soft); }
.price-trial th, .price-trial td { border-bottom-color: var(--accent-border); }

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}
.price-table th,
.price-table td {
  padding: .85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.price-table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom-width: 2px;
}
.price-table tbody th {
  font-weight: 600;
  white-space: nowrap;
}
.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td { border-bottom: none; }
@media (max-width: 34rem) {
  .price-table th, .price-table td { padding: .6rem .5rem; font-size: .88rem; }
}

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

.hero {
  padding: 4rem 0 4.5rem;
  background:
    radial-gradient(42rem 22rem at 85% -10%, rgba(59, 91, 219, .07), transparent 70%),
    linear-gradient(180deg, #f8faff 0%, #ffffff 78%);
}
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}
.hero h1 { max-width: 15em; }
.hero .lede { max-width: 34em; }
.hero-visual { min-width: 0; }

@media (min-width: 920px) {
  .hero { padding: 5.5rem 0 6rem; }
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; }
}

/* --- Cards & grids ------------------------------------------------------ */

.grid-2, .grid-3, .grid-4 { display: grid; gap: 1.15rem; }
@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .45rem; }
.card p { color: var(--muted); font-size: .97rem; }

.card-plain { box-shadow: none; }
.section-dark .card {
  background: var(--ink-soft);
  border-color: #2a3654;
  box-shadow: none;
}
.section-dark .card p { color: var(--on-dark); }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .9rem;
}

.tier-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-radius: 6px;
  padding: .18rem .55rem;
  margin-bottom: .8rem;
}
.tier-basic    { background: var(--local-soft); color: var(--local); }
.tier-standard { background: var(--accent-soft); color: var(--accent); }
.tier-frontier { background: var(--cloud-soft); color: var(--cloud); }

/* --- Status markers ------------------------------------------------------
   Card-level siblings of .tier-tag, for cards that mix shipped capability
   with roadmap capability. .badge-soon is hero-sized and too loud here.
   The status is always a word, never colour alone — the dashed border and
   the amber are reinforcement, not the signal. */

.now-tag,
.soon-tag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: .14rem .6rem;
  margin-bottom: .8rem;
}
.now-tag  { color: var(--local); background: var(--local-soft); border: 1px solid var(--local); }
.soon-tag { color: var(--cloud); background: var(--cloud-soft); border: 1px dashed var(--cloud); }

.card-roadmap {
  border-style: dashed;
  border-color: var(--border-strong);
  box-shadow: none;
}

/* --- Feature list (checks) --------------------------------------------- */

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li {
  position: relative;
  padding-left: 1.9em;
  margin-bottom: .65em;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .34em;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: var(--local-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8.4 2.7 2.7L12 5.6' fill='none' stroke='%231d7a33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100%;
}

/* --- Tables ------------------------------------------------------------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); box-shadow: var(--shadow); }
table.compare {
  width: 100%;
  border-collapse: collapse;
  font-size: .97rem;
  min-width: 34rem;
}
table.compare th, table.compare td {
  text-align: left;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.compare thead th {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border-strong);
}
table.compare tbody tr:last-child th,
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare tbody th { font-weight: 600; color: var(--ink); }
table.compare td.num { font-family: var(--mono); font-size: .92rem; white-space: nowrap; }
table.compare .highlight { background: var(--local-soft); color: var(--local); font-weight: 700; }

.note {
  font-size: .86rem;
  color: var(--muted);
  margin-top: .9rem;
}

/* --- Diagrams & decision record ----------------------------------------- */

.diagram {
  display: block;
  width: 100%;
  height: auto;
}
.diagram-frame {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
}
.section-alt .diagram-frame { box-shadow: none; }

.decision-record {
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  overflow-x: auto;
  margin: 0;
}
.decision-record .dr-head { color: #8fa3c8; }
.decision-record .dr-win { color: #7dd88f; }
.decision-record .dr-skip { color: #8fa3c8; }
.decision-record .dr-cost { color: #f0b429; }

/* --- Code comparison & callout strip (Bedrock migration) ---------------- */

.code-compare { display: grid; gap: 1.15rem; }
@media (min-width: 880px) { .code-compare { grid-template-columns: 1fr 1fr; } }

.code-panel {
  margin: 0;
  background: var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.code-panel figcaption {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: #8fa3c8;
  background: var(--ink-soft);
  border-bottom: 1px solid #2a3654;
  padding: .65rem 1.4rem;
}
.code-panel figcaption::before {
  content: "";
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #f0b429;
  flex: none;
}
.code-panel.is-after figcaption::before { background: #7dd88f; }
.code-panel pre {
  margin: 0;
  padding: 1.2rem 1.4rem;
  font-family: var(--mono);
  font-size: .84rem;
  line-height: 1.7;
  color: var(--on-dark);
  overflow-x: auto;
}
.code-panel .c-comment { color: #8fa3c8; }
.code-panel .c-change { color: #7dd88f; }

.callout-strip {
  margin-top: 2rem;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 1rem 1.3rem;
}
.callout-strip p { margin: 0; color: var(--text); font-size: .97rem; }
.callout-strip strong { color: var(--ink); }

/* --- FAQ ---------------------------------------------------------------- */

.faq { max-width: 48rem; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  margin-bottom: .7rem;
  padding: 0 1.25rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  padding: 1rem 0;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: .2rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--muted);
}
.faq details[open] summary::after { content: "–"; }
.faq details > p, .faq details > div { padding-bottom: 1.1rem; color: var(--muted); }

/* --- Forms -------------------------------------------------------------- */

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.8rem;
}
@media (min-width: 640px) { .form-card { padding: 2.2rem; } }

.field { margin-bottom: 1.15rem; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .93rem;
  color: var(--ink);
  margin-bottom: .35rem;
}
.field .hint { font-size: .85rem; color: var(--muted); margin: .3rem 0 0; }

input[type="text"], input[type="email"], input[type="password"],
input[type="url"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
}
textarea { min-height: 6.2rem; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.field-hidden { display: none; }

/* Honeypot: parked far off-screen, never display:none on the input itself. */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.errorlist {
  list-style: none;
  padding: 0;
  margin: .35rem 0 0;
  color: var(--error);
  font-size: .9rem;
  font-weight: 500;
}
.form-errors, .flash-error, .flash-warning {
  background: var(--error-soft);
  border: 1px solid #f2c4bd;
  color: var(--error);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .95rem;
}
.form-errors .errorlist { margin: 0; }
.flash-region { padding-top: 1rem; }
.flash {
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  margin-bottom: .6rem;
  font-size: .95rem;
}
.flash-success { background: var(--local-soft); border: 1px solid #bfe3c8; color: var(--local); }
.flash-info { background: var(--accent-soft); border: 1px solid var(--accent-border); color: var(--accent-hover); }

.divider {
  display: flex;
  align-items: center;
  gap: .9rem;
  color: var(--muted);
  font-size: .85rem;
  margin: 1.4rem 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-signin { display: flex; justify-content: center; }

/* --- Simple pages (thanks, confirm, legal, invites) ---------------------- */

.page-simple { padding: 4.5rem 0 5.5rem; }
.page-simple .icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  height: 3.4rem;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 1.3rem;
}
.icon-circle.ok { background: var(--local-soft); color: var(--local); }
.icon-circle.warn { background: var(--cloud-soft); color: var(--cloud); }
.icon-circle svg { width: 1.6rem; height: 1.6rem; }

.prose { max-width: 44rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.doc-meta { color: var(--muted); font-size: .92rem; margin-bottom: 2rem; }

.invite-message {
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .9rem 1.1rem;
  color: var(--ink);
  font-style: italic;
  margin: 1.2rem 0;
}

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

.site-footer {
  background: var(--ink);
  color: var(--on-dark);
  padding: 3.5rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 3rem; }
}
.footer-tagline { max-width: 26em; margin-top: 1rem; font-size: .95rem; }
.footer-status {
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8fa3c8;
}
.footer-h {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #8fa3c8;
  margin-bottom: 1rem;
}
.footer-col { display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; }
.footer-col a { color: var(--on-dark); font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #2a3654;
  margin-top: 3rem;
  padding-top: 1.5rem;
  font-size: .85rem;
  color: #8fa3c8;
}

/* --- API docs (/developers/) --------------------------------------------- */

.docs-hero {
  padding: 3.6rem 0 2.6rem;
  background:
    radial-gradient(42rem 22rem at 85% -10%, rgba(59, 91, 219, .07), transparent 70%),
    linear-gradient(180deg, #f8faff 0%, #ffffff 78%);
  border-bottom: 1px solid var(--border);
}
.docs-hero h1 { max-width: 20em; }

.docs-layout { display: grid; gap: 2.5rem; align-items: start; padding-block: 2.5rem 4rem; }
@media (min-width: 960px) {
  .docs-layout { grid-template-columns: 13rem minmax(0, 1fr); gap: 3.5rem; }
}

.docs-nav { display: none; }
@media (min-width: 960px) {
  .docs-nav {
    display: block;
    position: sticky;
    top: 5rem;
    padding-top: 2.4rem;
    font-size: .92rem;
  }
}
.docs-nav-title {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .6rem .8rem;
}
.docs-nav a {
  display: block;
  color: var(--muted);
  font-weight: 500;
  padding: .3rem .8rem;
  border-left: 2px solid var(--border);
}
.docs-nav a:hover {
  color: var(--accent);
  border-left-color: var(--accent);
  text-decoration: none;
}

.docs-main { min-width: 0; }
.docs-section {
  padding-top: 2.6rem;
  scroll-margin-top: 5.5rem;
}
.docs-section + .docs-section {
  margin-top: 2.8rem;
  border-top: 1px solid var(--border);
}
.docs-section h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); }
.docs-section h3 { margin-top: 1.9rem; }

.api-split { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 1100px) {
  .api-split { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); }
  .api-split .code-panel, .api-split .sticky-code { position: sticky; top: 5.5rem; }
}

.endpoint-list { list-style: none; padding: 0; margin: 0 0 1.2em; }
.endpoint-list li { margin-bottom: .5rem; }
.endpoint {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .7rem;
  font-family: var(--mono);
  font-size: .88rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .55rem .85rem;
}
.endpoint .path { color: var(--ink); font-weight: 600; word-break: break-all; }
.endpoint .what {
  font-family: var(--font);
  font-size: .88rem;
  color: var(--muted);
  flex-basis: 100%;
}
@media (min-width: 640px) {
  .endpoint .what { flex-basis: auto; margin-left: auto; text-align: right; }
}

.method {
  flex: none;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  border-radius: 5px;
  padding: .14rem .5rem;
}
.method-get { background: var(--accent-soft); color: var(--accent); }
.method-post { background: var(--ink); color: #fff; }

table.compare code { background: transparent; border: none; padding: 0; font-size: .86em; }

/* Standalone dark code block (no before/after framing). */
.code-panel.is-plain figcaption::before { display: none; }

/* Lifecycle diagram: green = local lane, amber = cloud lane, per the brand. */
.lifecycle { position: relative; }
.lifecycle .lc-local { color: #4cc36a; }
.lifecycle .lc-cloud { color: #f2a33c; }
.lifecycle .lc-dim { color: #8fa3c8; }

/* --- Earnings calculator (/providers/calculator/) ------------------------ */

.calc-grid { display: grid; gap: 1.4rem; align-items: start; }
@media (min-width: 920px) {
  .calc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem; }
}

input[type="number"] {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .65rem .8rem;
}
input[type="number"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

/* The result reads like an instrument: dark panel, mono money, green = your hardware. */
.calc-result {
  background: var(--ink);
  color: var(--on-dark);
  border-radius: var(--radius);
  padding: 1.8rem 1.9rem;
  box-shadow: var(--shadow);
}
.calc-kicker {
  font-family: var(--mono);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: #8fa3c8;
  margin-bottom: 1rem;
}
.calc-figure {
  font-family: var(--mono);
  font-size: clamp(1.75rem, 4.5vw, 2.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #4cc36a; /* local green, dark-surface value: this is your hardware earning */
  margin: 0 0 .3rem;
  word-break: break-word;
}
.calc-figure .per { font-size: .5em; font-weight: 600; color: var(--on-dark); }
.calc-sub { font-size: .95rem; color: var(--on-dark); margin-bottom: 1.4rem; }
.calc-sub strong { color: #fff; font-family: var(--mono); font-weight: 600; }

.calc-readout {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem 1rem;
  margin: 0 0 1.4rem;
  padding: .9rem 1.1rem;
  background: var(--ink-soft);
  border: 1px solid #2a3654;
  border-radius: var(--radius-sm);
  font-size: .9rem;
}
.calc-readout dt { color: #8fa3c8; }
.calc-readout dd { margin: 0; font-family: var(--mono); color: #fff; text-align: right; }

.calc-disclaimer {
  /* Neutral on purpose: amber means "cloud" here, never "warning". */
  border-left: 3px solid #8fa3c8;
  background: var(--ink-soft);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .85rem 1.05rem;
  font-size: .88rem;
  color: var(--on-dark);
}
.calc-disclaimer strong { color: #fff; }

.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 0; }
.chip {
  font: inherit;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: .32rem .85rem;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--local); color: var(--local); }
.chip strong { color: var(--local); font-weight: 600; }

/* --- Utilities ----------------------------------------------------------- */

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* --- "or" rule between auth options ------------------------------------- */

.or-rule {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: 1.4rem 0;
  color: var(--muted);
  font-size: .82rem;
}
.or-rule::before,
.or-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-invite { margin: 0; }

.google-verified {
  font-size: .9rem;
  color: var(--local);
  background: var(--local-soft);
  border: 1px solid var(--local);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
  margin-bottom: 1.1rem;
}
.google-verified strong { color: var(--ink); }
