:root {
  --ink: #1b1f26;
  --muted: #5b6572;
  --line: #e3e7ec;
  --bg: #ffffff;
  --bg-alt: #f5f7fa;
  --accent: #0f2f5b;
  --accent-ink: #ffffff;
  --ok: #1d6f42;
  --warn: #9a5b00;
  --code-bg: #f0f3f7;
  --maxw: 1080px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.01em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.45rem; margin-top: 2.2rem; }
h3 { font-size: 1.1rem; margin-top: 1.4rem; }
p, ul, ol { margin: 0 0 1rem; }
code, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}
code { background: var(--code-bg); padding: .1em .35em; border-radius: 4px; }
pre {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.45;
  max-width: 100%;
}
/* Grid and flex children must be allowed to shrink below their content width,
   otherwise a wide <pre> pushes the whole page wider than the viewport. */
.grid > *, .example > *, .plans > *, .cols > * { min-width: 0; }
body { overflow-x: hidden; }
pre code { background: none; padding: 0; }
table { border-collapse: collapse; width: 100%; margin: 0 0 1.2rem; font-size: .95rem; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; background: var(--bg-alt); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: .5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 1rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: .95rem; }
.site-header nav a[aria-current="page"] { font-weight: 600; text-decoration: underline; text-underline-offset: .35em; }
.button, .site-header nav a.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .55rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
}
.button.secondary { background: transparent; color: var(--accent); }
.button:hover { filter: brightness(1.1); }

/* Main content */
main { padding: 2.5rem 0 3.5rem; }
main.narrow .wrap { max-width: 760px; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 44rem; }
.hero { padding: 1.5rem 0 1rem; }
.hero h1 { font-size: 2.5rem; max-width: 40rem; }
.hero .actions { margin: 1.5rem 0 0; display: flex; gap: .75rem; flex-wrap: wrap; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 1.5rem 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; background: var(--bg); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
.band { background: var(--bg-alt); padding: 2.2rem 0; margin: 2.5rem 0; }
.band h2 { margin-top: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.2rem 0; }
.steps li { position: relative; padding-left: 2.6rem; margin-bottom: .9rem; }
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: .05rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
}
.example { display: grid; gap: 1.25rem; grid-template-columns: 1fr 1fr; align-items: start; }
.example pre { margin: 0; font-size: .82rem; max-height: 30rem; }
.callout { border-left: 4px solid var(--accent); background: var(--bg-alt); padding: .9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.callout.warn { border-color: var(--warn); }
.meta { color: var(--muted); font-size: .92rem; }
.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); }

/* Pricing */
.plans { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin: 1.5rem 0 1rem; }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan h3 { margin: 0 0 .25rem; }
.plan .quota { font-size: 1.35rem; font-weight: 700; margin: .25rem 0 .75rem; }
.plan ul { padding-left: 1.1rem; margin-bottom: 1rem; flex: 1; }
.plan .button { align-self: flex-start; }

/* Forms */
form.stack { display: grid; gap: 1rem; max-width: 620px; }
label { font-weight: 600; display: block; margin-bottom: .3rem; }
.hint { font-weight: 400; color: var(--muted); font-size: .9rem; display: block; margin-top: .15rem; }
input[type="text"], input[type="email"], select, textarea {
  width: 100%; padding: .6rem .7rem; border: 1px solid #c3cad3; border-radius: var(--radius);
  font: inherit; color: var(--ink); background: #fff;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; }
.check input { margin-top: .3rem; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.button { font: inherit; cursor: pointer; }

/* Docs / legal prose */
.prose h2 { border-top: 1px solid var(--line); padding-top: 1.4rem; }
.prose h1 + p { color: var(--muted); }
.prose li { margin-bottom: .35rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-alt); padding: 2.2rem 0 1.5rem; font-size: .93rem; color: var(--muted); }
.site-footer .cols { display: grid; gap: 1.5rem; grid-template-columns: 2fr 1fr 1fr 1fr; }
.site-footer a { display: block; color: var(--ink); text-decoration: none; margin: .25rem 0; }
.site-footer a:hover { text-decoration: underline; }
.brand-foot { font-weight: 700; color: var(--ink); margin-bottom: .4rem; }
.foot-title { font-weight: 600; color: var(--ink); margin-bottom: .4rem; }
.fine { margin: 1.8rem 0 0; font-size: .82rem; }

@media (max-width: 760px) {
  .hero h1 { font-size: 2rem; }
  .example { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .site-header nav { gap: .8rem; font-size: .9rem; }
}
@media (max-width: 480px) {
  .site-footer .cols { grid-template-columns: 1fr; }
}

/* Guides */
.crumbs { font-size: .9rem; margin: 0 0 .4rem; }
.byline { color: var(--muted); font-size: .92rem; margin: -.4rem 0 1.6rem; }
.prose h1 + .byline { color: var(--muted); }
.guide-list { list-style: none; padding: 0; }
.guide-list li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.guide-list a { font-weight: 600; font-size: 1.08rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
