/* =========================================================
   Pastel mint + white theme (light only). Mobile-first.
   ========================================================= */
:root {
  --page: #f5fcf8;
  --surface: #ffffff;
  --m50: #edf9f3;
  --m100: #dcf4e9;
  --m200: #c2ebd9;
  --m300: #a8e2c9;
  --m400: #7fd1b0;   /* decorative only */
  --m600: #2f8f71;   /* focus rings, active bars (4:1 on white) */
  --m700: #1d6b56;   /* links / text accents (6.4:1 on white) */
  --m800: #145443;   /* link hover (8.8:1 on white) */
  --field-line: #4c9a80;    /* input / select borders (3.4:1 on white) */
  --accent: #9fe3c6;        /* pastel mint fill: buttons, chips, step numbers */
  --accent-hover: #86d9b6;
  --on-accent: #0f3a2e;     /* dark text on mint (7:1+) */
  --sky: #d9ecff;           /* pastel sky, used for GET pills */
  --on-sky: #1d4a7a;
  --ink: #17302a;
  --muted: #4f665f;
  --border: #d5efe3;

  --code-bg: #f2fbf6;
  --code-head: #e3f6ec;
  --code-ink: #17302a;
  --code-muted: #4f665f;
  --code-line: #cdeadc;

  --ok: #157a4f;
  --ok-bg: #e3f7ec;
  --ok-line: #b5e0cb;
  --bad: #b42318;
  --bad-bg: #fdecea;
  --bad-line: #f4bdb7;
  --warn-bg: #fff7e8;
  --warn-line: #f1d7a3;

  --font: "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 48, 42, .04), 0 8px 24px rgba(31, 122, 96, .08);
  --shadow-lg: 0 2px 6px rgba(23, 48, 42, .05), 0 20px 44px rgba(31, 122, 96, .16);

  --wrap: 1120px;
  --gutter: 16px;
  --header-h: 60px;
  --chipbar-h: 61px; /* docs chip bar on small screens (44px chips + padding + border) */
}
@media (min-width: 768px) {
  :root { --header-h: 64px; --gutter: 24px; }
}
@media (min-width: 1280px) {
  :root { --gutter: 32px; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h2, h3 { scroll-margin-top: calc(var(--header-h) + 16px); }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--m700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--m800); text-decoration-thickness: 2px; }
strong { font-weight: 650; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

[hidden] { display: none !important; }
.hidden { display: none !important; }

code {
  font-family: var(--mono);
  font-size: .88em;
  color: var(--m700);
  background: var(--m50);
  border: 1px solid var(--m100);
  padding: .08em .4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
pre code {
  font-size: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  border-radius: 0;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--m600);
  outline-offset: 2px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; color: var(--on-accent); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.narrow { max-width: calc(720px + 2 * var(--gutter)); }

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--m700);
  margin-bottom: 10px;
}
.lead { font-size: 1.125rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .95rem; }

/* ---------- header ---------- */
header.top {
  position: sticky; top: 0; z-index: 50;
  background: #f5fcf8;
  border-bottom: 1px solid var(--border);
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  header.top {
    background: rgba(245, 252, 248, .86);
    -webkit-backdrop-filter: saturate(1.4) blur(14px);
    backdrop-filter: saturate(1.4) blur(14px);
  }
}
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: var(--header-h); }
.logo {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; min-width: 0; margin-right: auto;
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em;
}
.logo:hover { color: var(--ink); }
.logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mark { flex: none; width: 32px; height: 32px; border-radius: 10px; box-shadow: 0 4px 12px rgba(31, 122, 96, .28); }

.nav-toggle {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--m200); border-radius: 12px;
  background: var(--surface); color: var(--m700);
}
.nav-toggle .bars,
.nav-toggle .bars::before,
.nav-toggle .bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform .2s ease, background-color .2s ease;
}
.nav-toggle .bars { position: relative; }
.nav-toggle .bars::before, .nav-toggle .bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle .bars::before { top: -6px; }
.nav-toggle .bars::after { top: 6px; }
.top.open .nav-toggle { background: var(--m50); }
.top.open .nav-toggle .bars { background: transparent; }
.top.open .nav-toggle .bars::before { transform: translateY(6px) rotate(45deg); }
.top.open .nav-toggle .bars::after { transform: translateY(-6px) rotate(-45deg); }

#siteNav {
  display: none;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 30px rgba(23, 48, 42, .10);
  padding: 8px var(--gutter) 16px;
}
.top.open #siteNav { display: grid; gap: 4px; }
#siteNav a {
  display: flex; align-items: center;
  min-height: 52px; padding: 0 16px; border-radius: 12px;
  color: var(--ink); font-weight: 600; font-size: 1.05rem; text-decoration: none;
}
#siteNav a:hover { background: var(--m50); color: var(--m700); }
#siteNav a.on, #siteNav a[aria-current="page"] { background: var(--m100); color: var(--m700); }
#siteNav a.nav-cta { margin-top: 6px; justify-content: center; background: var(--accent); color: var(--on-accent); }
#siteNav a.nav-cta:hover { background: var(--accent-hover); color: var(--on-accent); }
/* current page: an underline (not only a colour), and a ring on the mint button */
#siteNav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
#siteNav a.nav-cta[aria-current="page"] { text-decoration: none; box-shadow: inset 0 0 0 2px var(--m700); } /* a button: the ring is the marker */

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  #siteNav, .top.open #siteNav {
    display: flex; align-items: center; gap: 4px;
    position: static; padding: 0; background: none; border: 0; box-shadow: none;
  }
  #siteNav a { min-height: 44px; padding: 0 14px; font-size: .97rem; color: var(--muted); }
  #siteNav a.on, #siteNav a[aria-current="page"] { color: var(--m700); }
  #siteNav a.nav-cta {
    margin: 0 0 0 8px; padding: 0 18px; border-radius: 999px;
    background: var(--accent); color: var(--on-accent); box-shadow: 0 4px 14px rgba(31, 122, 96, .16);
  }
  #siteNav a.nav-cta.on, #siteNav a.nav-cta[aria-current="page"] {
    background: var(--accent-hover); color: var(--on-accent);
    box-shadow: inset 0 0 0 2px var(--m700), 0 4px 14px rgba(31, 122, 96, .16);
  }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 1px solid var(--m200); border-radius: 12px;
  background: var(--surface); color: var(--m700);
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn:hover { background: var(--m50); border-color: var(--m300); color: var(--m700); text-decoration: none; }
.btn.primary {
  background: var(--accent); border-color: var(--accent-hover); color: var(--on-accent);
  box-shadow: 0 6px 18px rgba(31, 122, 96, .16);
}
.btn.primary:hover { background: var(--accent-hover); border-color: var(--m400); color: var(--on-accent); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; box-shadow: none; }
.btn .arr { transition: transform .15s ease; }
@media (hover: hover) {
  .btn.primary:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(31, 122, 96, .22); }
  .btn:hover .arr { transform: translateX(3px); }
}

.cta { display: flex; flex-direction: column; gap: 12px; }
.cta .btn { width: 100%; }
@media (min-width: 600px) {
  .cta { flex-direction: row; flex-wrap: wrap; }
  .cta .btn { width: auto; }
}

/* ---------- copy buttons (done/fail states are at the end of the code-block section) ---------- */
.copy {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; min-width: 5.75em; padding: 0 16px;
  border: 1px solid var(--m200); border-radius: 10px;
  background: var(--surface); color: var(--m700);
  font-weight: 650; font-size: .92rem; line-height: 1;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.copy:hover { background: var(--m50); border-color: var(--m300); }
.copy:disabled { opacity: .45; cursor: default; }
/* touch screens (any width) and small screens get 44px tap targets */
@media (pointer: coarse), (max-width: 767px) { .copy { min-height: 44px; } }

/* ---------- base URL pill ---------- */
.urlpill {
  display: flex; flex-direction: column; gap: 10px;
  max-width: 620px; margin: 0 0 24px;
  padding: 14px;
  background: var(--surface);
  border: 1.5px solid var(--m300);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(31, 122, 96, .12);
}
.urlpill .label {
  margin: 0;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--m700);
}
.urlpill code {
  display: block; min-width: 0;
  padding: 0; background: none; border: 0;
  font-size: 1rem; color: var(--ink); line-height: 1.5;
  word-break: break-all; overflow-wrap: anywhere;
}
.urlpill .copy {
  width: 100%; min-height: 46px;
  background: var(--accent); border-color: var(--accent-hover); color: var(--on-accent); border-radius: 12px;
}
.urlpill .copy:hover { background: var(--accent-hover); border-color: var(--m400); }
@media (min-width: 600px) {
  .urlpill {
    flex-direction: row; align-items: center; gap: 14px;
    padding: 6px 6px 6px 20px; border-radius: 28px; /* a full pill on one line, a soft box if a long URL wraps */
  }
  .urlpill .label { flex: none; padding-right: 14px; border-right: 1px solid var(--m200); line-height: 1.6; }
  .urlpill code { flex: 1 1 auto; } /* long URLs wrap (overflow-wrap: anywhere) instead of being cut off */
  .urlpill .copy { width: auto; flex: none; min-height: 44px; min-width: 6.75em; padding: 0 22px; border-radius: 999px; }
}

/* ---------- "works with" line (plain text, not buttons) ---------- */
.works {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px;
  margin: 22px 0 0; color: var(--muted); font-size: .95rem;
}
.works-label { font-weight: 700; color: var(--ink); }
.works-list { display: flex; flex-wrap: wrap; column-gap: 8px; min-width: 0; list-style: none; margin: 0; padding: 0; }
.works-list li { white-space: nowrap; }
.works-list li:not(:last-child)::after {
  content: "·"; content: "·" / "";
  margin-left: 8px; color: var(--m600); font-weight: 800;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  overflow: clip;
  background: #edf9f3;
  background: linear-gradient(180deg, #e6f7ef 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
  padding: 36px 0 44px;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(31, 122, 96, .16) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 30%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 75% 30%, #000 0%, transparent 75%);
}
.blob {
  position: absolute; border-radius: 50%; pointer-events: none;
  filter: blur(60px); opacity: .6;
}
.hero .b1 { width: 320px; height: 320px; top: -140px; right: -120px; background: #bdebd6; animation: drift 18s ease-in-out infinite alternate; }
.hero .b2 { width: 260px; height: 260px; bottom: -140px; left: -110px; background: #d3f2f0; animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-30px, 24px) scale(1.08); }
}
.hero-grid { position: relative; display: grid; gap: 40px; }
.hero-text { min-width: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px 5px 10px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--m200);
  color: var(--m700); font-size: .86rem; font-weight: 650;
  box-shadow: 0 2px 10px rgba(31, 122, 96, .10);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--m400); box-shadow: 0 0 0 4px var(--m100); }
.hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.05rem, 1.35rem + 3.4vw, 3.6rem);
  line-height: 1.07; letter-spacing: -.035em; font-weight: 750;
}
.grad { color: var(--m700); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .grad {
    background: linear-gradient(100deg, #2f8f71 0%, #23866a 50%, #1a6652 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
  }
}
.hero .lead { max-width: 34em; margin: 0 0 24px; }

.hero-visual { display: none; position: relative; }
.mock {
  background: var(--surface);
  border: 1px solid var(--m200);
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(31, 107, 86, .14), 0 2px 6px rgba(23, 48, 42, .06);
  overflow: hidden;
}
.mock-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 12px 16px; background: var(--m50); border-bottom: 1px solid var(--border);
  font-size: .82rem; font-weight: 600; color: var(--muted);
}
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--m200); }
.mock-bar span { margin-left: 8px; }
.mock-body { padding: 20px; display: grid; gap: 14px; }
.mock-field { display: grid; gap: 5px; min-width: 0; }
.mock-field > span { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.mock-field b {
  font-family: var(--mono); font-weight: 500; font-size: .86rem; color: var(--ink);
  background: var(--page); border: 1px solid var(--m200); border-radius: 10px; padding: 9px 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-field.hl b { border-color: var(--m600); box-shadow: 0 0 0 3px rgba(31, 122, 96, .16); background: var(--surface); }
.mock-chat { display: grid; gap: 8px; margin-top: 4px; padding-top: 16px; border-top: 1px dashed var(--m200); }
.bubble { margin: 0; max-width: 85%; padding: 9px 14px; border-radius: 16px; font-size: .94rem; line-height: 1.45; }
.bubble.me { justify-self: end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 5px; }
.bubble.ai { justify-self: start; background: var(--m100); color: var(--ink); border-bottom-left-radius: 5px; }
.float-tag {
  position: absolute; top: -14px; right: 22px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--ok-line); color: var(--ok);
  font-size: .85rem; font-weight: 650;
  box-shadow: 0 8px 20px rgba(21, 122, 79, .14);
}
.ok-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); }

/* tablets: the text is centred (no preview), so the hero isn't half empty and the
   next section still starts on the first screen */
@media (min-width: 768px) and (max-width: 959px) {
  .hero { padding: 56px 0 64px; }
  .hero-text { max-width: 640px; margin: 0 auto; text-align: center; }
  .hero .lead, .hero .urlpill { margin-left: auto; margin-right: auto; }
  .hero .urlpill { text-align: left; }
  .hero .cta, .hero .works, .hero .works-list { justify-content: center; }
}
@media (min-width: 960px) {
  .hero { padding: 72px 0 84px; }
  .hero-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 56px; }
  .hero-visual { display: block; }
  .hero .b1 { width: 460px; height: 460px; top: -180px; right: -140px; }
  .hero .b2 { width: 360px; height: 360px; }
}

/* ---------- sections ---------- */
.section { padding: 52px 0; }
.hero + .section { padding-top: 44px; }
.section.steps-sec { padding-bottom: 44px; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section.alt:last-child { border-bottom: 0; }
.section-head { max-width: 640px; margin: 0 0 28px; }
.section-head h2 { font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.25rem); letter-spacing: -.025em; margin: 0 0 10px; }
.section-head p { margin: 0; color: var(--muted); font-size: 1.05rem; }
@media (min-width: 960px) {
  .section { padding: 84px 0; }
  .hero + .section { padding-top: 72px; }
  .section.steps-sec { padding-bottom: 64px; }
  .section-head { margin-bottom: 36px; }
}

/* ---------- grids ---------- */
.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { gap: 20px; }
}
@media (min-width: 1024px) {
  .grid { gap: 24px; }
}

/* ---------- cards ---------- */
.card {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card h3 { margin: 14px 0 6px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
@media (min-width: 960px) { .card { padding: 26px; } }
@media (hover: hover) {
  .card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--m200); }
}
.icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: var(--m100); color: var(--m700);
}
.icon svg { width: 23px; height: 23px; }

/* step number in a solid mint circle */
.num {
  flex: none;
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: .95rem; line-height: 1;
  box-shadow: 0 0 0 5px var(--m100);
}

/* ---------- how it works ---------- */
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px; }
/* each step is its own box (icon beside the text until there is room for 3 columns) */
.flow li {
  position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr); gap: 16px;
  align-items: start; align-content: start; min-width: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
@media (hover: hover) {
  .flow li:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--m200); }
}
.flow h3 { font-size: 1.15rem; margin: 6px 0 6px; }
.flow p { margin: 0; color: var(--muted); }
.flow-icon {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px;
  background: linear-gradient(145deg, #e6f7ef, #cdeedf); color: var(--m700);
  border: 1px solid var(--m200);
  box-shadow: 0 8px 20px rgba(31, 122, 96, .14);
}
.flow-icon svg { width: 26px; height: 26px; }
.flow-icon .num {
  position: absolute; top: -8px; right: -8px;
  width: 26px; height: 26px; font-size: .8rem;
  box-shadow: 0 0 0 3px var(--surface);
}
/* arrow chip between the boxes (points down when stacked, right in 3 columns); decorative, so empty alt text */
.flow li:not(:last-child)::after {
  content: "↓"; content: "↓" / "";
  position: absolute; z-index: 2;
  left: 50%; bottom: -30px; transform: translateX(-50%);
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-size: .9rem; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 4px var(--page, #f5fcf8);
}
.steps-sec { background: linear-gradient(180deg, var(--m50), var(--page)); border-top: 1px solid var(--border); }
@media (min-width: 960px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
  .flow li { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 26px; }
  .flow li:not(:last-child)::after {
    content: "→"; content: "→" / "";
    left: auto; bottom: auto;
    right: -30px; top: 50%; transform: translateY(-50%);
  }
  .flow h3 { margin-top: 0; }
}

/* ---------- code blocks ---------- */
.code {
  position: relative;
  margin: 20px 0;
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px rgba(31, 107, 86, .08);
  overflow: hidden;
  color: var(--code-ink);
}
/* header bar: tabs (or a label) on the left, Copy pinned right, always one row */
.code .tabs {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--code-head);
  border-bottom: 1px solid var(--code-line);
}
.code .tablist {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 2px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  /* scroll hint: soft edge only when more tabs are off-screen */
  background:
    linear-gradient(to right, var(--code-head) 40%, rgba(227, 246, 236, 0)) left center / 24px 100% no-repeat local,
    linear-gradient(to left, var(--code-head) 40%, rgba(227, 246, 236, 0)) right center / 24px 100% no-repeat local,
    linear-gradient(to right, rgba(31, 122, 96, .16), rgba(31, 122, 96, 0)) left center / 12px 100% no-repeat scroll,
    linear-gradient(to left, rgba(31, 122, 96, .16), rgba(31, 122, 96, 0)) right center / 12px 100% no-repeat scroll;
}
.code .tablist::-webkit-scrollbar { display: none; }
.code .tabs [role="tab"] {
  position: relative; flex: none;
  min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 8px; background: none;
  color: var(--code-muted); font-weight: 600; font-size: .92rem;
  white-space: nowrap;
}
.code .tabs [role="tab"]:hover { color: var(--ink); background: rgba(31, 122, 96, .08); }
@media (max-width: 599px) { .code .tabs [role="tab"] { padding: 0 11px; } }
/* active tab: aria-selected="true" (set by app.js); `.on` is the pre-JS state */
.code .tabs [role="tab"].on:not([aria-selected="false"]),
.code .tabs [role="tab"][aria-selected="true"] { color: var(--m700); }
.code .tabs [role="tab"].on:not([aria-selected="false"])::after,
.code .tabs [role="tab"][aria-selected="true"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 5px;
  height: 3px; border-radius: 3px; background: var(--m600);
}
/* .code clips its children (rounded corners), so these rings sit inside the element */
.code .tabs [role="tab"]:focus-visible,
.code .pane:focus-visible,
.code pre:focus-visible { outline-offset: -3px; }
.code .code-label {
  flex: none;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px;
  color: var(--code-muted); font-weight: 600; font-size: .9rem;
}
.code .tabs .copy {
  flex: none; margin-left: auto;
  min-height: 38px; padding: 0 14px;
  background: var(--surface);
  border-color: var(--m200); color: var(--m700);
}
.code .tabs .copy:hover { background-color: var(--m50); border-color: var(--m300); }
@media (pointer: coarse), (max-width: 767px) { .code .tabs .copy { min-height: 44px; } }
/* phones: tabbed blocks give the whole header to the tabs (so none hide off-screen)
   and Copy sits in the code's bottom-right corner, over extra bottom padding */
@media (max-width: 599px) {
  .code .tabs .tablist ~ .copy { position: absolute; right: 10px; bottom: 10px; z-index: 1; margin: 0; }
  .code .pane pre { padding-bottom: 66px; }
}

/* copy states: after every Copy rule (and with :hover) so "Copied" / "Press Ctrl+C" always show */
.copy.done, .copy.done:hover,
.urlpill .copy.done, .urlpill .copy.done:hover,
.code .tabs .copy.done, .code .tabs .copy.done:hover {
  background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok);
}
.copy.fail, .copy.fail:hover,
.urlpill .copy.fail, .urlpill .copy.fail:hover,
.code .tabs .copy.fail, .code .tabs .copy.fail:hover {
  background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad);
}

.code .pane { display: none; }
.code .pane.on { display: block; }
.code pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  font-family: var(--mono); font-size: .875rem; line-height: 1.65; tab-size: 2;
  color: var(--code-ink);
  /* scroll hint: mint glow at an edge only when there is more to scroll */
  background:
    linear-gradient(to right, var(--code-bg) 40%, rgba(242, 251, 246, 0)) left center / 36px 100% no-repeat local,
    linear-gradient(to left, var(--code-bg) 40%, rgba(242, 251, 246, 0)) right center / 36px 100% no-repeat local,
    linear-gradient(to right, rgba(31, 122, 96, .14), rgba(31, 122, 96, 0)) left center / 18px 100% no-repeat scroll,
    linear-gradient(to left, rgba(31, 122, 96, .14), rgba(31, 122, 96, 0)) right center / 18px 100% no-repeat scroll,
    var(--code-bg);
  scrollbar-color: var(--m300) transparent;
  scrollbar-width: thin;
}
@media (min-width: 768px) { .code pre { padding: 20px 24px; font-size: .9rem; } }
/* example responses (read, not run) wrap on phones instead of scrolling sideways */
@media (max-width: 599px) {
  .code.response pre code { white-space: pre-wrap; overflow-wrap: anywhere; }
}

/* chat app steps pane inside a code block */
.pane.howto { padding: 20px 20px 22px; }
.pane.howto ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: s; }
.pane.howto li {
  counter-increment: s;
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start;
  color: var(--code-ink); max-width: 72ch;
}
.pane.howto li::before {
  content: counter(s);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .88rem;
}
.pane.howto li > span { padding-top: 2px; }
.pane.howto strong { color: var(--ink); }
.pane.howto a { color: var(--m700); }
.pane.howto a:hover { color: var(--ink); }
.pane.howto code { background: var(--surface); border-color: var(--m200); color: var(--m700); }
.howto-tip { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--code-line); color: var(--code-muted); font-size: .95rem; }
@media (min-width: 768px) { .pane.howto { padding: 24px 28px 26px; } }

/* a short line that belongs to the code block right above it */
.code-note { margin: -8px 0 20px; color: var(--muted); font-size: .95rem; }

/* support links (filled in by app.js) */
.links { display: inline-flex; flex-wrap: wrap; gap: 8px; vertical-align: middle; }
.links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--m200);
  color: var(--m700); font-weight: 600; font-size: .92rem; text-decoration: none;
}
.links a:hover { background: var(--m50); border-color: var(--m300); }
@media (pointer: coarse), (max-width: 767px) { .links a { min-height: 44px; } }
.support { display: inline; }
.foot-note .support { display: block; margin-top: 10px; }
.links:empty { display: none; }

/* ---------- footer ---------- */
/* a slim closing line — no logo or menu, so it can't be mistaken for a second header */
.site-foot {
  margin-top: auto; padding: 20px 0;
  background: var(--m100); border-top: 1px solid var(--m200);
  color: var(--muted); font-size: .95rem;
}
.site-foot .wrap { display: flex; flex-direction: column; gap: 6px; }
.foot-note, .foot-copy { margin: 0; }
@media (min-width: 768px) {
  .site-foot .wrap { flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; }
  .foot-copy { flex: none; }
}

/* ---------- docs ---------- */
.docs { padding-top: 0; padding-bottom: 64px; } /* keep .wrap's side gutters */
.side {
  position: sticky; top: var(--header-h); z-index: 40;
  display: flex; gap: 8px;
  margin: 0 calc(-1 * var(--gutter));
  padding: 8px var(--gutter);
  overflow-x: auto; overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid var(--border);
  /* scroll hint: soft mint edge when more chips are off-screen */
  background:
    linear-gradient(to right, var(--page) 40%, rgba(245, 252, 248, 0)) left center / 28px 100% no-repeat local,
    linear-gradient(to left, var(--page) 40%, rgba(245, 252, 248, 0)) right center / 28px 100% no-repeat local,
    linear-gradient(to right, rgba(31, 122, 96, .18), rgba(31, 122, 96, 0)) left center / 14px 100% no-repeat scroll,
    linear-gradient(to left, rgba(31, 122, 96, .18), rgba(31, 122, 96, 0)) right center / 14px 100% no-repeat scroll,
    var(--page);
}
.side::-webkit-scrollbar { display: none; }
.side .grp { display: none; }
.side a {
  flex: none;
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 1rem; text-decoration: none;
}
.side a:hover { border-color: var(--m300); color: var(--m700); }
.side a.active { background: var(--accent); border-color: var(--accent-hover); color: var(--on-accent); }

.doc { min-width: 0; }
.doc [id], .doc h2, .doc h3 { scroll-margin-top: calc(var(--header-h) + var(--chipbar-h) + 16px); }
.doc-intro { padding: 32px 0 8px; }
.doc-intro h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); letter-spacing: -.03em; margin: 0 0 12px; }
.doc-intro .lead { margin: 0; max-width: 40em; }
.doc-sec { padding-top: 44px; }
.doc-sec + .doc-sec { margin-top: 12px; border-top: 1px solid var(--border); }
.doc h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem); letter-spacing: -.025em; margin: 0 0 12px; }
.doc h3 { font-size: 1.15rem; margin: 30px 0 10px; }
.doc p, .doc li { max-width: 72ch; }
/* boxes and lines that span the column like the code blocks do */
.doc .dev-detail, .doc .howto-tip, .doc .note p, .doc .code-note { max-width: none; }
.doc .card h3 { margin: 12px 0 4px; }
.need { list-style: none; margin: 18px 0 8px; padding: 0; display: grid; gap: 14px; }
.need .card { padding: 18px; max-width: none; }
.doc .steps-list li, .doc .tick-list li { max-width: none; }
.need .num { margin: 2px 0 8px; }
@media (min-width: 600px) {
  .need .card { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 16px; padding: 22px; }
  .need .num { margin: 2px 0 0; }
}
.doc .need h3 { margin: 4px 0 4px; }
.need .urlpill { margin: 14px 0 0; box-shadow: none; max-width: none; }
.dev-detail {
  margin: 16px 0 0; padding: 12px 16px;
  border-left: 3px solid var(--m300); background: var(--surface); border-radius: 0 10px 10px 0;
  color: var(--muted); font-size: .95rem;
}
.dev-detail strong { color: var(--ink); }
@media (max-width: 767px) { .dev-detail { font-size: 1rem; } }

.endpoint { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.endpoint code { font-size: 1rem; }
.method {
  display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-family: var(--mono); font-size: .82rem; font-weight: 700; letter-spacing: .04em;
}
.method.get { background: var(--sky); color: var(--on-sky); }

.steps-list { list-style: none; margin: 18px 0; padding: 0; counter-reset: st; display: grid; gap: 12px; }
.steps-list li {
  counter-increment: st; position: relative;
  padding: 14px 16px 14px 60px; min-height: 60px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(31, 122, 96, .05);
}
.steps-list li::before {
  content: counter(st);
  position: absolute; left: 14px; top: 14px;
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .9rem;
}
.steps-list strong { color: var(--ink); }

.tick-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 10px; }
.tick-list li { position: relative; padding-left: 34px; }
.tick-list li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--m100) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%231d6b56' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* tables */
.table-wrap {
  position: relative;
  margin: 14px 0;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: 0 2px 8px rgba(31, 122, 96, .05);
  background:
    linear-gradient(to right, #ffffff 40%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, #ffffff 40%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
    linear-gradient(to right, rgba(31, 122, 96, .16), rgba(31, 122, 96, 0)) left center / 14px 100% no-repeat scroll,
    linear-gradient(to left, rgba(31, 122, 96, .16), rgba(31, 122, 96, 0)) right center / 14px 100% no-repeat scroll,
    #ffffff;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
table:has(th:nth-child(3)) { min-width: 540px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--m50); color: var(--m700); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td:first-child { white-space: nowrap; }
.code-pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: var(--m100); color: var(--m700); font-family: var(--mono); font-weight: 700; font-size: .88rem;
}
@media (max-width: 767px) { table { font-size: 1rem; } }
/* phones: wide tables become a stack of rows, each cell shows its column name (data-label) */
@media (max-width: 599px) {
  .table-wrap table.stack { min-width: 0; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; }
  table.stack thead {
    position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
    overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  table.stack tr { padding: 14px 16px; border-bottom: 1px solid var(--border); }
  table.stack tbody tr:last-child { border-bottom: 0; }
  table.stack td { padding: 0; border: 0; white-space: normal; }
  table.stack td + td { margin-top: 10px; }
  table.stack td[data-label]::before {
    content: attr(data-label);
    display: block; margin: 0 0 3px;
    color: var(--m700); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  }
  /* shorter cards: the first cell (code or field name) is the card title and the
     second cell follows it without a label; only the later cells keep theirs */
  table.stack td:nth-child(-n+2)::before { display: none; }
  table.stack td:nth-child(2) { margin-top: 4px; }
  /* request fields: the type sits on the same line as the field name */
  table.stack.inline-2 tr { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
  table.stack.inline-2 td:nth-child(2) { margin-top: 0; color: var(--muted); }
  table.stack.inline-2 td:nth-child(n+3) { flex: 1 0 100%; }
}

/* notes */
.note {
  display: flex; gap: 12px; align-items: flex-start;
  margin: 18px 0; padding: 14px 16px;
  background: var(--m50); border: 1px solid var(--m200); border-radius: var(--radius-sm);
}
.note p { margin: 0; }
.note p + p { margin-top: 8px; }
.note-icon {
  flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%;
  background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: .85rem; font-family: Georgia, serif;
}
.note.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.note.warn .note-icon { background: #ffd98a; color: #5c3a00; font-family: var(--font); }

@media (min-width: 960px) {
  :root { --chipbar-h: 0px; }
  .docs {
    display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 56px;
    padding-top: 40px; padding-bottom: 96px;
  }
  .side {
    top: calc(var(--header-h) + 24px); align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow-y: auto; overflow-x: hidden;
    flex-direction: column; gap: 2px;
    margin: 0; padding: 14px;
    white-space: normal;
    background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow);
    scrollbar-width: thin;
  }
  .side .grp {
    display: block; margin: 14px 12px 4px;
    font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  }
  .side .grp:first-child { margin-top: 4px; }
  .side a {
    min-height: 38px; padding: 0 12px;
    border: 0; border-radius: 10px; background: none;
    color: var(--muted); font-size: .95rem;
  }
  .side a:hover { background: var(--m50); color: var(--ink); }
  .side a.active { background: var(--m100); color: var(--m700); box-shadow: inset 3px 0 0 var(--m600); }
  .doc { max-width: 800px; }
  .doc-intro { padding-top: 8px; }
  .doc-sec { padding-top: 52px; }
}
@media (min-width: 960px) and (pointer: coarse) { .side a { min-height: 44px; } }

/* ---------- test page ---------- */
.tester-main { position: relative; overflow: hidden; overflow: clip; padding-bottom: 56px; }
.tester-main .b1 { width: 380px; height: 380px; top: -200px; left: 50%; margin-left: -190px; background: #c9efdd; opacity: .7; }
.tester-main .wrap { position: relative; }
.page-head { text-align: center; max-width: 600px; margin: 0 auto; padding: 36px 0 24px; }
.page-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); letter-spacing: -.03em; margin: 0 0 10px; }
.page-head .lead { margin: 0; }

.tester { padding: 20px; box-shadow: var(--shadow-lg); }
@media (min-width: 600px) { .tester { padding: 32px; } }
.step-head { display: flex; gap: 16px; align-items: flex-start; margin: 0 0 18px; }
.step-head .num { margin-top: 2px; }
.step-head h2 { font-size: 1.25rem; margin: 2px 0 2px; }
.step-head p { margin: 0; color: var(--muted); }

label, .label { display: block; margin: 0 0 8px; font-weight: 650; font-size: .95rem; color: var(--ink); }
.field { margin: 0 0 18px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: .95rem; }
.hint.lead-in { margin: -4px 0 10px; }
/* .card p resets margins; keep the label / hint spacing inside cards too */
.card p.label { margin: 0 0 8px; color: var(--ink); }
.card p.hint { margin: 8px 0 0; }
.card p.hint.lead-in { margin: -4px 0 10px; }

input, select, textarea {
  display: block; width: 100%; min-width: 0;
  min-height: 48px; padding: 11px 14px;
  font-size: 16px; line-height: 1.4;
  color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--field-line); border-radius: 12px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: #5c736c; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--m700); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--m700); box-shadow: 0 0 0 4px rgba(31, 122, 96, .18); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
#key { font-family: var(--mono); }
select {
  -webkit-appearance: none; appearance: none;
  padding-right: 44px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%231d6b56' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 14px center / 16px no-repeat;
  text-overflow: ellipsis;
}
textarea { min-height: 96px; resize: vertical; }

.key-row { display: grid; gap: 10px; }
.key-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 10px; }
.key-actions .btn { width: 100%; padding: 0 16px; }
#showkey.on { background: var(--m100); border-color: var(--m300); }
@media (min-width: 600px) {
  .key-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .key-actions { display: flex; }
  .key-actions .btn { width: auto; }
  #showkey { min-width: 5.5em; } /* "Show" / "Hide" keep the same width */
}

.status {
  display: none; align-items: flex-start; gap: 12px;
  margin: 18px 0 0; padding: 14px 16px;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 600; overflow-wrap: anywhere;
}
.status, .reply { scroll-margin: calc(var(--header-h) + 12px) 0 16px; }
.status.show { display: flex; }
.status::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; }
.status.wait { background: var(--m50); border-color: var(--m200); color: var(--m700); }
.status.wait::before { border: 3px solid var(--m200); border-top-color: var(--m700); animation: spin .8s linear infinite; }
.status.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.status.ok::before {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.status.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.status.bad::before {
  background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6.5v7M12 17.5v.01' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
@keyframes spin { to { transform: rotate(360deg); } }

#chatbox { margin-top: 24px; padding-top: 24px; border-top: 1px dashed var(--m200); }
/* model chips: the picker for step 2 (padding leaves room for focus rings) */
.models {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 244px; overflow-y: auto;
  margin: -6px; padding: 6px;
}
.models:empty { display: none; }
.chip {
  display: inline-flex; align-items: center;
  min-height: 44px; max-width: 100%; padding: 6px 14px;
  border: 1px solid var(--m200); border-radius: 999px;
  background: var(--m50); color: var(--m700);
  font-family: var(--mono); font-size: .88rem; line-height: 1.3; text-align: left;
  overflow-wrap: anywhere;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { background: var(--m100); border-color: var(--m300); }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent); border-color: var(--m600); color: var(--on-accent); }
/* search box app.js adds above long model lists */
.model-filter {
  -webkit-appearance: none; appearance: none;
  margin: 0 0 12px; padding-left: 42px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='6.5' fill='none' stroke='%231d6b56' stroke-width='2'/%3E%3Cpath d='M16 16l4.5 4.5' fill='none' stroke='%231d6b56' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") 14px center / 18px no-repeat;
}
.model-filter::-webkit-search-decoration { -webkit-appearance: none; }

.btn.send { width: 100%; }
@media (min-width: 600px) { .btn.send { width: auto; } }

.reply {
  display: none;
  margin-top: 18px;
  border: 1px solid var(--m200); border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
  overflow-wrap: anywhere;
}
.reply.show { display: block; }
.reply-head {
  padding: 10px 16px; background: var(--m50); border-bottom: 1px solid var(--m200);
  color: var(--m700); font-size: .95rem; font-weight: 650;
}
.reply-body { padding: 14px 16px; white-space: pre-wrap; color: var(--ink); }
.reply.error { border-color: var(--bad-line); }
.reply.error .reply-head { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }

.nextstep {
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 20px;
  background: #edf9f3;
  background: linear-gradient(135deg, #e6f7ef 0%, #ffffff 100%);
  border-color: var(--m200);
}
.ns-icon {
  flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--ok); color: #fff; box-shadow: 0 0 0 6px var(--ok-bg);
}
.ns-icon svg { width: 24px; height: 24px; }
.ns-text h2 { font-size: 1.25rem; margin: 0 0 6px; }
.ns-text p { margin: 0 0 16px; color: var(--muted); }
@media (min-width: 600px) { .nextstep { flex-direction: row; align-items: flex-start; gap: 20px; padding: 28px; } }

.settings { margin-top: 20px; }
.settings h2 { font-size: 1.25rem; margin: 0 0 6px; }
.settings > p { color: var(--muted); }
.urlpill.compact { max-width: none; margin: 16px 0; box-shadow: none; }
.settings-list { display: grid; gap: 0; margin: 0 0 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.settings-list div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; }
.settings-list div + div { border-top: 1px solid var(--border); }
.settings-list dt { font-weight: 650; }
.settings-list dd { margin: 0; color: var(--muted); }
.settings-link { margin: 0; }
@media (min-width: 600px) { .settings { padding: 28px; } }

/* ---------- home: "where to go next" cards ---------- */
.go-card { display: flex; flex-direction: column; color: var(--ink); text-decoration: none; }
.go-card:hover, .go-card:focus-visible { text-decoration: none; color: var(--ink); }
.go-card .go { margin-top: auto; padding-top: 16px; font-weight: 700; color: var(--m700); }
.go-card:hover .go { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .blob { animation: none !important; }
  .card.lift:hover, .btn.primary:hover, .flow li:hover { transform: none !important; }
}
