/* ==========================================================================
   Yetlix — site styles
   Plain CSS, no framework. Sections are in page order.
   ========================================================================== */

:root {
  --paper: #ffffff;
  --surface: #f3f5f8;
  --surface-2: #e9edf2;
  --ink: #18202b;
  --ink-2: #3a4554;
  --muted: #5b6676;
  --line: #dce1e8;
  --line-strong: #c4ccd6;

  --brand: #e8590c;        /* from the logo */
  --brand-ink: #b8430a;    /* for text on white, passes AA */
  --brand-soft: #fff1e8;
  --ok: #12805c;
  --ok-soft: #e5f5ee;
  --bad: #c62a2a;
  --bad-soft: #fdecec;

  --code-bg: #142033;
  --code-line: #24334a;
  --code-text: #d7e0ec;
  --code-dim: #8796ab;
  --code-key: #8cc4ff;
  --code-str: #a6e3b8;
  --code-num: #ffc58a;

  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --header-h: 68px;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 3px; }
button { font: inherit; color: inherit; }
code, pre, kbd { font-family: var(--mono); font-size: .86em; }
:not(pre) > code { background: var(--surface); border: 1px solid var(--line); padding: .08em .35em; border-radius: 4px; color: var(--ink-2); }
address { font-style: normal; }
abbr[title] { text-decoration: none; color: var(--bad); }

h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.12; font-weight: 600; font-stretch: 88%; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 4.2vw, 3.4rem); letter-spacing: -.03em; line-height: 1.04; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -.01em; line-height: 1.3; }
h4 { font-size: 1.05rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
.lead { font-size: 1.19rem; line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: var(--r-sm); }
.skip:focus { left: 8px; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }

/* ---------- icons ---------- */

.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: var(--r-sm); border: 1px solid transparent;
  font-weight: 600; font-size: .98rem; line-height: 1; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-sm { min-height: 38px; padding: 0 14px; font-size: .92rem; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #cf4f0a; color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #2a3442; color: #fff; }
.btn-line { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-line:hover { border-color: var(--ink); color: var(--ink); }
.btn[disabled], .btn.is-loading { opacity: .65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.text-link { font-weight: 600; text-decoration: none; color: var(--brand-ink); }
.text-link:hover { text-decoration: underline; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(6px)) { .site-header { background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px); } }

.header-row { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand img { height: 36px; width: auto; }

.main-nav { flex: 1; }
.main-nav > ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 8px 12px; border-radius: var(--r-sm);
  background: none; border: 0; cursor: pointer;
  color: var(--ink-2); font-size: .97rem; font-weight: 500; text-decoration: none;
}
.nav-link:hover, .nav-link[aria-expanded="true"] { color: var(--ink); background: var(--surface); }
.nav-link.is-current { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }
.nav-link .icon { transition: transform .15s; }
.nav-link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav-mobile-extra { display: none; }

.has-menu { position: relative; }
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: min(940px, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 18px 40px -18px rgba(24, 32, 43, .28);
  padding: 22px 24px 0;
  display: none;
}
.has-menu.is-open .mega { display: block; }
.mega-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.mega-title { font-size: .82rem; font-weight: 600; color: var(--muted); margin: 0 0 8px; }
.mega ul { list-style: none; margin: 0; padding: 0; }
.mega li a { display: block; padding: 5px 0; font-size: .92rem; color: var(--ink); text-decoration: none; line-height: 1.35; }
.mega li a:hover { color: var(--brand-ink); }
.mega-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 18px -24px 0; padding: 14px 24px; border-top: 1px solid var(--line); background: var(--surface); border-radius: 0 0 var(--r-lg) var(--r-lg); font-size: .9rem; }
.mega-foot a { font-weight: 600; }
.mega-foot span { color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-phone { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); text-decoration: none; font-size: .93rem; font-weight: 500; white-space: nowrap; }
.header-phone:hover { color: var(--brand-ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--r-sm); width: 42px; height: 42px; align-items: center; justify-content: center; cursor: pointer; }

@media (max-width: 1080px) {
  .header-phone span { display: none; }
}
@media (max-width: 920px) {
  .header-actions { margin-left: auto; gap: 10px; }
  .nav-toggle { display: inline-flex; }
  .header-phone { display: none; }
  /* The header's backdrop blur makes it the containing block for fixed children,
     so the panel is positioned against the header and given an explicit height. */
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    background: #fff; padding: 8px 20px 40px; overflow-y: auto; overscroll-behavior: contain;
    display: none; border-top: 1px solid var(--line);
  }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: var(--line); }
  body.nav-open .main-nav { display: block; }
  .main-nav > ul { flex-direction: column; gap: 0; }
  .main-nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav-link { width: 100%; justify-content: space-between; padding: 15px 2px; font-size: 1.08rem; border-radius: 0; }
  .nav-link:hover, .nav-link[aria-expanded="true"] { background: none; }
  .nav-link.is-current { box-shadow: none; color: var(--brand-ink); }
  .mega { position: static; width: auto; box-shadow: none; border: 0; padding: 0 0 14px; }
  .mega-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .mega-foot { margin: 12px 0 0; border-radius: var(--r-sm); }
  .nav-mobile-extra { display: grid; gap: 14px; margin-top: 24px; }
  .nav-mobile-extra a { display: flex; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-weight: 500; }
  .nav-mobile-extra .btn { justify-content: center; color: #fff; }
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-menu { display: none; }
@media (max-width: 520px) {
  .header-actions .btn { display: none; }
  .mega-grid { grid-template-columns: 1fr; }
}

/* ---------- sections ---------- */

.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--ink-2); font-size: 1.08rem; margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.section-head-row .section-head { margin-bottom: 0; }
@media (max-width: 700px) { .section { padding: 68px 0; } }

/* ---------- hero ---------- */

.hero { padding: 64px 0 88px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 13em; margin-bottom: 22px; }
.hero .lead { margin-bottom: 30px; }
.hero-points { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 9px; color: var(--ink-2); font-size: .98rem; }
.hero-points li { display: flex; gap: 10px; align-items: flex-start; }
.hero-points .icon { color: var(--ok); margin-top: 3px; }
@media (max-width: 980px) { .hero-grid { grid-template-columns: 1fr; gap: 44px; } .hero { padding-top: 40px; } }

/* ---------- live console (hero) ---------- */

.console {
  background: var(--code-bg); color: var(--code-text);
  border-radius: var(--r-lg);
  box-shadow: 0 30px 60px -30px rgba(20, 32, 51, .55);
  overflow: hidden;
  font-size: .86rem;
}
.console-tabs { display: flex; gap: 2px; padding: 10px 10px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--code-line); }
.console-tabs::-webkit-scrollbar { display: none; }
.console-tab {
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  color: var(--code-dim); padding: 9px 13px 11px; font-size: .86rem; font-weight: 500;
  border-radius: 7px 7px 0 0;
}
.console-tab:hover { color: var(--code-text); }
.console-tab[aria-selected="true"] { color: #fff; background: #1c2b42; box-shadow: inset 0 2px 0 var(--brand); }
.console-body { padding: 18px 20px 6px; min-height: 352px; }
.console-label { display: flex; justify-content: space-between; align-items: center; color: var(--code-dim); font-size: .78rem; margin-bottom: 6px; font-family: var(--mono); }
.console pre { margin: 0 0 16px; font-size: .82rem; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.console .req { color: var(--code-text); }
.console .method { color: var(--code-num); font-weight: 500; }
.console .res { min-height: 150px; }
.console .k { color: var(--code-key); }
.console .s { color: var(--code-str); }
.console .n { color: var(--code-num); }
.console .b { color: #f0a6ff; }
.console .caret { display: inline-block; width: 7px; height: 1.05em; background: var(--code-text); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.console-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px 12px 20px; border-top: 1px solid var(--code-line); background: #111c2d;
}
.stamp {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .9rem;
  color: var(--code-dim);
}
.stamp .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--code-dim); }
.stamp.is-running .dot { background: var(--code-num); animation: pulse 0.9s ease-in-out infinite; }
.stamp.is-ok { color: #7fe0b1; }
.stamp.is-ok .dot { background: #2fbf86; box-shadow: 0 0 0 4px rgba(47, 191, 134, .18); }
@keyframes pulse { 50% { opacity: .35; } }
.console-run { background: #fff; color: var(--code-bg); border: 0; border-radius: var(--r-sm); padding: 8px 14px; font-weight: 600; font-size: .86rem; cursor: pointer; }
.console-run:hover { background: var(--brand-soft); }
.console-note { margin: 10px 2px 0; font-size: .82rem; color: var(--muted); }

/* ---------- logos / trust strip ---------- */

.strip { padding: 26px 0; border-bottom: 1px solid var(--line); }
.strip-row { display: flex; gap: 14px 40px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .94rem; }
.strip-row strong { color: var(--ink); font-weight: 600; }

/* ---------- catalogue ---------- */

.catalogue-tools { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 26px; }
.search {
  position: relative; flex: 1 1 280px; max-width: 420px;
}
.search .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 40px !important; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  border-radius: 999px; padding: 7px 14px; font-size: .9rem; font-weight: 500; cursor: pointer;
}
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.api-group { margin-bottom: 36px; }
.api-group-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
.api-group-head h3 { font-size: 1.15rem; }
.api-group-head p { margin: 0; color: var(--muted); font-size: .94rem; }

.api-list { list-style: none; margin: 0; padding: 0; }
.api-row {
  display: grid; grid-template-columns: minmax(220px, 1.1fr) 2fr 150px 24px; gap: 20px; align-items: center;
  padding: 16px 4px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
}
a.api-row:hover { background: var(--surface); }
a.api-row:hover .api-name { color: var(--brand-ink); }
.api-name { font-weight: 600; color: var(--ink); line-height: 1.35; }
.api-short { color: var(--ink-2); font-size: .96rem; line-height: 1.45; }
.api-mode { font-size: .84rem; color: var(--muted); }
.api-go { color: var(--line-strong); }
.api-go .icon { transform: rotate(-90deg); }
a.api-row:hover .api-go { color: var(--brand); }
.api-empty { padding: 28px 4px; color: var(--muted); }
@media (max-width: 760px) {
  .api-row { grid-template-columns: 1fr 20px; gap: 4px 12px; }
  .api-short { grid-column: 1; }
  .api-mode { grid-column: 1; }
  .api-go { grid-row: 1 / span 3; grid-column: 2; }
}

/* ---------- steps (real sequence) ---------- */

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: step; border-top: 1px solid var(--line-strong); }
.steps li { counter-increment: step; padding: 26px 26px 0 0; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line-strong); color: var(--ink);
  font-weight: 600; font-size: .92rem; margin: -43px 0 18px;
}
.steps li:last-child::before { background: var(--ok); color: #fff; border-color: var(--ok); }
.steps h3 { font-size: 1.08rem; margin-bottom: 8px; }
.steps p { color: var(--ink-2); font-size: .97rem; margin: 0; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-strong); margin-left: 16px; }
  .steps li { padding: 0 0 30px 34px; }
  .steps li::before { position: absolute; left: -17px; top: -4px; margin: 0; }
}

.steps-vertical { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line-strong); margin: 24px 0 0 16px; }
.steps-vertical li { padding: 0 0 28px 34px; }
.steps-vertical li:last-child { padding-bottom: 0; }
.steps-vertical li::before { position: absolute; left: -17px; top: -4px; margin: 0; }

/* ---------- code tabs ---------- */

.dev-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.dev-copy h2 { margin-bottom: 14px; }
.dev-stack { display: grid; gap: 14px; }
.dev-copy ul { list-style: none; padding: 0; margin: 26px 0 30px; display: grid; gap: 16px; }
.dev-copy li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.dev-copy li .icon { color: var(--brand); margin-top: 2px; }
.dev-copy li strong { display: block; font-weight: 600; }
.dev-copy li span { color: var(--ink-2); font-size: .97rem; }
@media (max-width: 940px) { .dev-grid { grid-template-columns: 1fr; gap: 36px; } }

.codebox { background: var(--code-bg); border-radius: var(--r-md); overflow: hidden; color: var(--code-text); }
.codebox-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--code-line); padding: 0 8px 0 4px; }
.codebox-tabs { display: flex; overflow-x: auto; scrollbar-width: none; }
.codebox-tab { background: none; border: 0; color: var(--code-dim); padding: 12px 14px; font-size: .86rem; font-weight: 500; cursor: pointer; white-space: nowrap; }
.codebox-tab:hover { color: var(--code-text); }
.codebox-tab[aria-selected="true"] { color: #fff; box-shadow: inset 0 -2px 0 var(--brand); }
.codebox-title { color: var(--code-dim); font-size: .84rem; padding: 12px 14px; font-family: var(--mono); }
.copy-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--code-line); color: var(--code-dim); border-radius: var(--r-sm); padding: 5px 10px; font-size: .8rem; cursor: pointer; }
.copy-btn:hover { color: #fff; border-color: var(--code-dim); }
.codebox pre { margin: 0; padding: 18px 20px; overflow-x: auto; font-size: .83rem; line-height: 1.7; tab-size: 2; }
.codebox pre[hidden] { display: none; }

/* ---------- industries ---------- */

.industries { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 40px; }
.industry { padding: 24px 0; border-top: 1px solid var(--line-strong); }
.industry h3 { margin-bottom: 6px; }
.industry p { color: var(--ink-2); font-size: .97rem; margin: 0 0 10px; }
.industry .uses { font-size: .88rem; color: var(--muted); margin: 0; }
.industry .uses a { color: var(--ink-2); }
@media (max-width: 900px) { .industries { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .industries { grid-template-columns: 1fr; } }

/* ---------- safeguards ---------- */

.safeguards { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.guard-list { list-style: none; margin: 0; padding: 0; }
.guard-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.guard-list li:first-child { padding-top: 0; }
.guard-icon { width: 40px; height: 40px; border-radius: var(--r-md); background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.guard-list h3 { font-size: 1.04rem; margin-bottom: 4px; }
.guard-list p { margin: 0; color: var(--ink-2); font-size: .96rem; }
@media (max-width: 900px) { .safeguards { grid-template-columns: 1fr; gap: 36px; } }

.consent-sample { border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; padding: 22px; }
.consent-sample pre { background: var(--surface); border-radius: var(--r-sm); padding: 14px; margin: 12px 0 0; font-size: .8rem; line-height: 1.6; overflow-x: auto; color: var(--ink-2); }

/* ---------- pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line-strong); border-radius: var(--r-lg); overflow: hidden; background: #fff; }
.plan { padding: 30px 28px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.plan:last-child { border-right: 0; }
.plan.is-featured { background: var(--ink); color: #fff; }
.plan.is-featured h3, .plan.is-featured .plan-for { color: #fff; }
.plan.is-featured .plan-for { opacity: .75; }
.plan.is-featured li { color: #d9e0e9; }
.plan.is-featured li .icon { color: #7fe0b1; }
.plan h3 { font-size: 1.3rem; margin-bottom: 6px; }
.plan-for { color: var(--muted); font-size: .96rem; margin-bottom: 22px; min-height: 3em; }
.plan-price { font-size: 1.05rem; font-weight: 600; margin-bottom: 20px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 10px; flex: 1; align-content: start; }
.plan li { display: flex; gap: 10px; font-size: .96rem; color: var(--ink-2); }
.plan li .icon { color: var(--ok); margin-top: 3px; }
.plan .btn { align-self: flex-start; }
.plan.is-featured .btn-line { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.plan.is-featured .btn-line:hover { border-color: #fff; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; } .plan { border-right: 0; border-bottom: 1px solid var(--line); } }

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

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-weight: 600; font-size: 1.06rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 12px; height: 12px; border-right: 2px solid var(--ink-2); border-bottom: 2px solid var(--ink-2); transform: translateY(-75%) rotate(45deg); transition: transform .15s; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:hover { color: var(--brand-ink); }
.faq .answer { padding: 0 40px 22px 0; color: var(--ink-2); max-width: 64ch; }
.faq .answer p:last-child { margin: 0; }
.faq-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- CTA + form panel ---------- */

.cta-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-strong); background: #fff; }
.cta-copy { padding: 44px; background: var(--brand); color: #fff; }
.cta-copy h2 { color: #fff; margin-bottom: 16px; }
.cta-copy p { color: #fff3ea; }
.cta-copy ul { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.cta-copy li { display: flex; gap: 12px; align-items: flex-start; }
.cta-copy li a { color: #fff; font-weight: 600; text-decoration: none; }
.cta-copy li a:hover { text-decoration: underline; }
.cta-copy li span { display: block; font-size: .88rem; color: #ffe2cf; }
.cta-copy .icon { margin-top: 3px; }
.cta-form { padding: 40px 44px; }
@media (max-width: 900px) { .cta-panel { grid-template-columns: 1fr; } .cta-copy, .cta-form { padding: 30px 24px; } }

/* ---------- forms ---------- */

.form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-size: .92rem; font-weight: 600; color: var(--ink); }
.field .hint { font-size: .84rem; color: var(--muted); font-weight: 400; }
input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 13px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%233a4554' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 38px; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(232, 89, 12, .18); }
.is-invalid input, .is-invalid select, .is-invalid textarea, input.is-invalid { border-color: var(--bad); }
.field-error { margin: 0; color: var(--bad); font-size: .86rem; }

.phone-input { display: flex; }
.phone-input span { display: grid; place-items: center; padding: 0 12px; background: var(--surface); border: 1px solid var(--line-strong); border-right: 0; border-radius: var(--r-sm) 0 0 var(--r-sm); color: var(--ink-2); font-size: .95rem; }
.phone-input input { border-radius: 0 var(--r-sm) var(--r-sm) 0; }

.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px 16px; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .94rem; line-height: 1.45; color: var(--ink-2); }
.check input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }

.consent { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-sm); background: var(--surface); border: 1px solid var(--line); }
.consent .check { font-size: .88rem; color: var(--ink-2); }
.consent .check-soft { color: var(--muted); }
.consent.is-invalid { border-color: var(--bad); background: var(--bad-soft); }
.form-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-foot .small { margin: 0; }

.form-status { padding: 12px 14px; border-radius: var(--r-sm); font-size: .95rem; line-height: 1.45; }
.form-status.is-ok { background: var(--ok-soft); color: #0b5c41; border: 1px solid #b8e3cf; }
.form-status.is-error { background: var(--bad-soft); color: #922020; border: 1px solid #f3c2c2; }

.form.is-sent .form-body { display: none; }
.form-done { text-align: left; padding: 8px 0; }
.form-done .done-icon { width: 46px; height: 46px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin-bottom: 14px; }
.form-done h3 { margin-bottom: 6px; }

/* ---------- page hero (inner pages) ---------- */

.page-hero { padding: 56px 0 48px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.1rem, 4vw, 3.1rem); margin-bottom: 16px; max-width: 18em; }
.page-hero .lead { margin: 0; }
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 20px; font-size: .9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- API detail ---------- */

.api-hero-meta { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 22px; font-size: .94rem; color: var(--ink-2); }
.api-hero-meta div { display: flex; gap: 8px; align-items: center; }
.api-hero-meta .icon { color: var(--muted); }
.api-hero-meta strong { font-weight: 600; color: var(--ink); }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 56px; align-items: start; }
.detail-main > section { margin-bottom: 52px; }
.detail-main h2 { font-size: 1.55rem; margin-bottom: 16px; }
.detail-aside { position: sticky; top: calc(var(--header-h) + 20px); }
.aside-card { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 26px; background: #fff; }
.aside-card h2 { font-size: 1.3rem; margin-bottom: 6px; }
.aside-card > p { color: var(--ink-2); font-size: .95rem; }
.aside-card .form { gap: 14px; }
@media (max-width: 1000px) { .detail-grid { grid-template-columns: 1fr; } .detail-aside { position: static; } }

.spec { width: 100%; border-collapse: collapse; font-size: .96rem; }
.spec th, .spec td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { font-weight: 600; width: 34%; }
.spec td { color: var(--ink-2); }
.spec code { white-space: normal; overflow-wrap: anywhere; }
.spec th, .spec td { overflow-wrap: anywhere; }

.tick-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tick-list li { display: flex; gap: 10px; color: var(--ink-2); }
.tick-list .icon { color: var(--ok); margin-top: 3px; }
.two-col { columns: 2; column-gap: 32px; }
.two-col li { break-inside: avoid; margin-bottom: 10px; }
@media (max-width: 600px) { .two-col { columns: 1; } }

.endpoint { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .88rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; max-width: 100%; overflow-x: auto; }
.endpoint b { color: var(--brand-ink); font-weight: 500; }

.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 28px; }
.related a { display: block; padding: 18px 0; border-top: 1px solid var(--line-strong); text-decoration: none; color: inherit; }
.related a strong { display: block; color: var(--ink); margin-bottom: 4px; }
.related a span { color: var(--ink-2); font-size: .94rem; }
.related a:hover strong { color: var(--brand-ink); }
@media (max-width: 800px) { .related { grid-template-columns: 1fr; } }

/* ---------- docs ---------- */

.docs-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); font-size: .94rem; }
.docs-nav p { font-weight: 600; margin: 0 0 8px; }
.docs-nav ul { list-style: none; margin: 0 0 22px; padding: 0; border-left: 1px solid var(--line); }
.docs-nav a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.docs-nav a:hover { color: var(--ink); }
.docs-nav a.is-active { border-left-color: var(--brand); color: var(--ink); font-weight: 500; }
.docs-body > section { padding-bottom: 44px; margin-bottom: 44px; border-bottom: 1px solid var(--line); }
.docs-body > section:last-child { border-bottom: 0; }
.docs-body h2 { font-size: 1.7rem; margin-bottom: 14px; }
.docs-body h3 { margin: 28px 0 10px; }
.docs-body p, .docs-body li { color: var(--ink-2); max-width: 68ch; }
.docs-body .codebox { margin: 18px 0; }
.docs-body .spec { margin: 14px 0; }
.note { border-left: 3px solid var(--brand); background: var(--brand-soft); padding: 14px 16px; border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink-2); font-size: .96rem; margin: 18px 0; }
.note p:last-child { margin: 0; }
@media (max-width: 900px) { .docs-grid { grid-template-columns: 1fr; gap: 24px; } .docs-nav { position: static; } .docs-nav ul { display: flex; flex-wrap: wrap; border: 0; gap: 4px; } .docs-nav a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0; } }

/* ---------- prose (legal, about, blog) ---------- */

.prose { max-width: 70ch; color: var(--ink-2); }
.prose h2 { font-size: 1.45rem; margin: 40px 0 12px; }
.prose h3 { margin: 28px 0 10px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose img { border-radius: var(--r-md); margin: 24px 0; }
.updated { font-size: .92rem; color: var(--muted); }

/* ---------- about ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-strong); }
.facts div { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .88rem; color: var(--muted); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- contact page ---------- */

.side-title { font-size: 1.35rem; margin-bottom: 14px; }
.contact-cards.spaced { margin-top: 36px; }
.fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.fieldset legend { padding: 0; margin-bottom: 6px; }

.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.contact-cards { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.contact-cards > div { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.contact-cards .ci { width: 44px; height: 44px; border-radius: var(--r-md); background: var(--brand-soft); color: var(--brand-ink); display: grid; place-items: center; }
.contact-cards a, .contact-cards address { font-weight: 600; color: var(--ink); text-decoration: none; font-size: 1.04rem; line-height: 1.5; }
.contact-cards a:hover { color: var(--brand-ink); }
.contact-cards span { display: block; color: var(--muted); font-size: .9rem; margin-top: 2px; }
.map-frame { margin-top: 26px; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
.form-card { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 32px; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } .form-card { padding: 24px 20px; } }

/* ---------- blog ---------- */

.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.post-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.post-card img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; border-radius: var(--r-md); background: var(--surface); margin-bottom: 16px; }
.post-card .cat { font-size: .84rem; color: var(--brand-ink); font-weight: 600; }
.post-card h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.post-card:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
.post-card p { color: var(--ink-2); font-size: .95rem; margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card time { font-size: .86rem; color: var(--muted); margin-top: auto; }
@media (max-width: 900px) { .posts { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .posts { grid-template-columns: 1fr; } }
.empty { border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 40px; text-align: center; color: var(--ink-2); }

/* ---------- footer ---------- */

.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 64px 0 28px; font-size: .95rem; }
.footer-top { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding-bottom: 44px; border-bottom: 1px solid var(--line); }
.footer-brand img { height: 34px; width: auto; margin-bottom: 16px; }
.footer-brand > p { color: var(--ink-2); max-width: 44ch; }
.footer-heading { font-weight: 600; color: var(--ink); margin: 0 0 14px; font-size: .95rem; }
.newsletter { margin-top: 26px; max-width: 460px; gap: 10px; }
.newsletter-label { font-weight: 600; font-size: .92rem; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; min-width: 0; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.contact-list li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; }
.contact-list .icon { color: var(--brand); margin-top: 3px; }
.contact-list a, .contact-list address { color: var(--ink); text-decoration: none; font-weight: 600; line-height: 1.5; }
.contact-list a:hover { color: var(--brand-ink); text-decoration: underline; }
.contact-list span { display: block; color: var(--muted); font-size: .88rem; margin-top: 1px; }
.footer-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; padding: 40px 0; border-bottom: 1px solid var(--line); }
.footer-links ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.footer-links a { color: var(--ink-2); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; padding-top: 22px; font-size: .84rem; color: var(--muted); }
.footer-bottom p { margin: 0; max-width: 70ch; }
@media (max-width: 1000px) { .footer-links { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr; gap: 40px; } .footer-links { grid-template-columns: 1fr 1fr; } }

/* ---------- 404 ---------- */
.notfound { padding: 110px 0; }
.notfound h1 { margin-bottom: 14px; }

/* Grid children default to min-width:auto, which lets long code lines push the page wider than the phone. */
.hero-grid > *, .detail-grid > *, .docs-grid > *, .dev-grid > *, .contact-grid > *, .safeguards > *, .faq-grid > *, .about-grid > * { min-width: 0; }


/* ==========================================================================
   v2 additions: dropdown menus, API detail sections, solutions, playground, guides
   ========================================================================== */

/* ---------- small dropdowns ---------- */
.mega-sm { width: 320px; padding: 10px 10px 0; }
.menu-list { display: grid; gap: 2px; }
.menu-list a { display: block; padding: 9px 12px !important; border-radius: var(--r-sm); }
.menu-list a:hover { background: var(--surface); }
.menu-list strong { display: block; font-weight: 600; color: var(--ink); font-size: .95rem; }
.menu-list span { display: block; color: var(--muted); font-size: .84rem; margin-top: 1px; }
.mega-sm .mega-foot { margin: 10px -10px 0; padding: 12px 22px; justify-content: flex-start; gap: 18px; }
.mega-foot a + a { font-weight: 500; }
@media (max-width: 920px) {
  .mega-sm { width: auto; padding: 0 0 12px; }
  .mega-sm .mega-foot { margin: 8px 0 0; }
  .menu-list a { padding: 8px 4px !important; }
}

/* ---------- inner page bits ---------- */
.hero-actions { margin-top: 26px; }
.page-hero-slim { padding-bottom: 36px; }
h3.sub { margin: 26px 0 12px; font-size: 1.08rem; }
.prose h2.first { margin-top: 0; }

/* in-page section menu */
.subnav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.subnav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a { display: block; padding: 13px 12px; white-space: nowrap; font-size: .92rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); }
.subnav a.is-active { color: var(--ink); border-bottom-color: var(--brand); }
.page-api .detail-aside { top: calc(var(--header-h) + 66px); }
html:has(.subnav) { scroll-padding-top: calc(var(--header-h) + 64px); }

/* numbered flow inside API pages (a real sequence) */
.flow-list { list-style: none; counter-reset: f; margin: 0; padding: 0; border-left: 1px solid var(--line-strong); margin-left: 14px; }
.flow-list li { counter-increment: f; position: relative; padding: 0 0 18px 30px; color: var(--ink-2); }
.flow-list li:last-child { padding-bottom: 0; }
.flow-list li::before { content: counter(f); position: absolute; left: -14px; top: 0; width: 28px; height: 28px; border-radius: 50%; background: #fff; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: .82rem; font-weight: 600; color: var(--ink); }

.spec-3 th { width: 28%; }
.spec-3 td.type { width: 14%; font-family: var(--mono); font-size: .82rem; color: var(--muted); white-space: nowrap; }
.spec thead th { font-size: .84rem; color: var(--muted); font-weight: 600; border-bottom-color: var(--line-strong); }
.detail-main .codebox { margin-top: 22px; }
@media (max-width: 640px) {
  .spec-3 thead { display: none; }
  .spec-3 tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .spec-3 th, .spec-3 td { border: 0; padding: 2px 0; width: auto !important; }
  .spec-3 td:last-child { grid-column: 1 / -1; }
}

/* outcomes */
.outcomes { display: grid; gap: 0; border-top: 1px solid var(--line-strong); }
.outcome { display: grid; grid-template-columns: 220px 1fr; gap: 4px 24px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.outcome p { margin: 0; color: var(--ink-2); }
.outcome-value { grid-row: span 2; font-family: var(--mono); font-size: .86rem; color: var(--ink) !important; font-weight: 500; }
.outcome-action { font-size: .95rem; }
.outcome-action strong { color: var(--ok); font-weight: 600; }
@media (max-width: 640px) { .outcome { grid-template-columns: 1fr; } .outcome-value { grid-row: auto; } }

/* ---------- solutions ---------- */
.sol-list { border-top: 1px solid var(--line-strong); }
.sol-row { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 28px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.sol-row h2 { font-size: 1.4rem; margin-bottom: 8px; }
.sol-row:hover h2 { color: var(--brand-ink); }
.sol-row p { color: var(--ink-2); margin: 0; }
.sol-chain { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.sol-chain li { font-size: .84rem; padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); background: #fff; position: relative; }
.sol-chain li + li { margin-left: 14px; }
.sol-chain li + li::before { content: ""; position: absolute; left: -15px; top: 50%; width: 10px; height: 1px; background: var(--line-strong); }
@media (max-width: 800px) { .sol-row { grid-template-columns: 1fr; gap: 16px; } }

.pipeline { list-style: none; margin: 0; padding: 0; counter-reset: p; display: grid; gap: 0; }
.pipe-step { counter-increment: p; position: relative; display: grid; grid-template-columns: 1fr; padding: 20px 0 20px 64px; border-top: 1px solid var(--line-strong); }
.pipe-step::before { content: counter(p); position: absolute; left: 0; top: 18px; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 600; }
.pipe-step:last-child::before { background: var(--ok); }
.pipe-head { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; margin-bottom: 6px; }
.pipe-head a { font-weight: 600; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.pipe-head a:hover { color: var(--brand-ink); text-decoration: underline; }
.pipe-mode { font-size: .84rem; color: var(--muted); }
.pipe-step p { margin: 0 0 6px; color: var(--ink-2); max-width: 70ch; }
.pipe-fallback { font-size: .93rem; }
.pipe-fallback strong { color: var(--brand-ink); font-weight: 600; }

.rule-op { color: var(--code-num); }
.regs { border-top: 1px solid var(--line-strong); }
.reg { padding: 20px 0; border-bottom: 1px solid var(--line); }
.reg h3 { font-size: 1.08rem; margin-bottom: 6px; }
.reg p { margin: 0; color: var(--ink-2); }

/* ---------- playground ---------- */
.playground { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 36px; align-items: start; }
.playground > * { min-width: 0; }
.pg-panel { border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: 22px; display: grid; gap: 18px; position: sticky; top: calc(var(--header-h) + 16px); }
.pg-panel .label { font-size: .92rem; font-weight: 600; margin: 0 0 8px; }
.pg-endpoint { margin: -4px 0 0; }
.pg-tests .chips { gap: 6px; }
.pg-tests .chip { font-size: .84rem; padding: 6px 12px; }
.pg-fields { display: grid; gap: 12px; }
.pg-fields input { font-family: var(--mono); font-size: .88rem; min-height: 42px; }
.pg-fields label code { background: none; border: 0; padding: 0; font-size: .86rem; color: var(--ink); }
.pg-actions { display: flex; gap: 10px; align-items: center; }
.pg-output { display: grid; gap: 18px; }
.pg-console .console-body { min-height: 300px; }
.pg-console a.console-run { text-decoration: none; }
.stamp.is-bad { color: #ff9b9b; }
.stamp.is-bad .dot { background: #e5484d; box-shadow: 0 0 0 4px rgba(229, 72, 77, .2); }
.pg-history ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .86rem; color: var(--ink-2); }
.pg-history code { font-size: .78rem; }
.h-code { display: inline-block; min-width: 36px; text-align: center; font-family: var(--mono); font-size: .76rem; padding: 1px 6px; border-radius: 4px; }
.h-code.ok { background: var(--ok-soft); color: var(--ok); }
.h-code.bad { background: var(--bad-soft); color: var(--bad); }
@media (max-width: 960px) { .playground { grid-template-columns: 1fr; } .pg-panel { position: static; } }

/* ---------- guides ---------- */
.guide-list { border-top: 1px solid var(--line-strong); }
.guide-row { display: block; padding: 26px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.guide-row h2 { font-size: 1.35rem; margin-bottom: 8px; max-width: 34em; }
.guide-row:hover h2 { color: var(--brand-ink); }
.guide-row p { color: var(--ink-2); margin: 0 0 8px; max-width: 70ch; }
.guide-meta { font-size: .86rem; color: var(--muted); }
.glossary-cta { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding: 28px; background: var(--surface); border-radius: var(--r-lg); }
.glossary-cta h2 { font-size: 1.3rem; margin-bottom: 6px; }
.glossary-cta p { margin: 0; color: var(--ink-2); }
.guide-title { max-width: 22em !important; }
.guide-body { font-size: 1.04rem; line-height: 1.7; }
.guide-body h2 { scroll-margin-top: calc(var(--header-h) + 20px); }
.guide-body table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 18px 0 24px; display: block; overflow-x: auto; }
.guide-body th, .guide-body td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.guide-body thead th { color: var(--ink); font-weight: 600; border-bottom-color: var(--line-strong); }
.guide-body tbody td:first-child { color: var(--ink); font-weight: 500; }
.guide-body blockquote { margin: 14px 0 22px; padding: 14px 18px; background: var(--surface); border-left: 3px solid var(--ok); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--ink); font-size: .98rem; }
.note-inline { font-size: .94rem; color: var(--muted); border-left: 3px solid var(--line-strong); padding-left: 14px; }
.guide-end { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }

.letters { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 28px; }
.letters a { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: var(--r-sm); text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.letters a:hover { border-color: var(--ink); color: var(--ink); }
.gl-group { padding-top: 8px; scroll-margin-top: calc(var(--header-h) + 16px); }
.gl-group h2 { font-size: 1.5rem; color: var(--brand-ink); padding-bottom: 6px; border-bottom: 2px solid var(--ink); }
.gl-group dl { margin: 0 0 28px; }
.gl-item { display: grid; grid-template-columns: 200px 1fr; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.gl-item dt { font-weight: 600; }
.gl-item dd { margin: 0; color: var(--ink-2); }
@media (max-width: 640px) { .gl-item { grid-template-columns: 1fr; gap: 4px; } }
.industry h3 a { color: var(--ink); text-decoration: none; }
.industry h3 a:hover { color: var(--brand-ink); text-decoration: underline; }

/* ---------- small-phone tightening (320–420px) ---------- */
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .spec th { width: 40%; padding-right: 10px; }
  .console-body, .codebox pre { padding-left: 14px; padding-right: 14px; }
  .console pre, .codebox pre { font-size: .76rem; }
  .btn { padding: 0 16px; }
  .btn-row .btn { flex: 1 1 auto; }
  .page-hero { padding: 40px 0 36px; }
  .cta-copy, .cta-form, .form-card, .aside-card, .pg-panel { padding: 22px 16px; }
  .newsletter-row { flex-direction: column; }
}
