/* Hugo Panel — GitHub Pages landing page.
   Hand-written CSS, no build step, no external fonts or scripts. */

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial,
    "Noto Sans", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f4f5f7;
  --bg-soft: #fafbfc;
  --panel: #ffffff;
  --ink: #111318;
  --ink-2: #3f4652;
  --muted: #6b7280;
  --border: #e7e9ee;
  --border-strong: #d8dbe2;
  --accent: #111318;
  --on-accent: #ffffff;
  --glow: rgba(17, 19, 24, .07);

  --code-bg: #0b0b0d;
  --code-ink: #e8e8ec;
  --code-border: #202024;

  --radius: 22px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 22px 60px rgba(16, 24, 40, .08);
  --maxw: 1180px;
}

[data-theme="dark"] {
  --bg: #000000;
  --bg-soft: #08080a;
  --panel: #0d0d10;
  --ink: #f4f4f5;
  --ink-2: #c7c7cc;
  --muted: #9b9ba4;
  --border: #1d1d20;
  --border-strong: #2b2b30;
  --accent: #f4f4f5;
  --on-accent: #09090b;
  --glow: rgba(255, 255, 255, .08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .7);
  --shadow: 0 1px 2px rgba(0, 0, 0, .7), 0 26px 70px rgba(0, 0, 0, .65);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* `clip` avoids turning <body> into a scroll container, which would break
     the sticky navigation. `hidden` stays as the fallback. */
  overflow-x: hidden;
  overflow-x: clip;
  transition: opacity .18s ease;
}

/* While another language's dictionary is loading, keep the Chinese markup out
   of sight so visitors never see a flash of the wrong language. */
html.i18n-pending body { opacity: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

img { max-width: 100%; height: auto; }
h1, h2, h3, p, figure { margin: 0; }
a { color: inherit; }
code {
  font-family: var(--mono);
  font-size: .88em;
  padding: .12em .42em;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-2);
}
pre code {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: inherit;
  color: inherit;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  text-decoration: none;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; }

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

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
@supports (background: color-mix(in srgb, #fff, #000)) {
  .nav {
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    border-bottom-color: color-mix(in srgb, var(--border) 75%, transparent);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
  }
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  min-width: 0;
}
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 11px;
  background: var(--accent);
  color: var(--on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-text strong { font-size: 16px; letter-spacing: -.02em; }
.brand-text small { font-size: 12.5px; color: var(--muted); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 14.5px;
  font-weight: 550;
  color: var(--ink-2);
}
.nav-links a {
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.nav-links a:hover { color: var(--ink); border-bottom-color: var(--border-strong); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.lang-wrap { display: inline-flex; }
.lang-select {
  height: 38px;
  max-width: 124px;
  padding: 0 26px 0 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background-color: var(--panel);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--ink-2);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease, color .15s ease;
}
.lang-select:hover { color: var(--ink); border-color: var(--border-strong); }
.lang-select:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.lang-select option { color: var(--ink); background: var(--panel); }

.icon-btn {
  width: 38px;
  height: 38px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--ink-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn .i-sun { display: none; }
[data-theme="dark"] .icon-btn .i-sun { display: block; }
[data-theme="dark"] .icon-btn .i-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding: 0 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { opacity: .88; }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 14px; }

/* ---------- Shared section bits ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; border-top: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 44px); }
.section-head h2 {
  margin-top: 10px;
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -.035em;
  font-weight: 700;
}
.section-lead { margin-top: 12px; color: var(--muted); font-size: 1rem; max-width: 60ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, .14);
  flex: none;
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -10% -20% auto -20%;
  height: 720px;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 20%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 55% at 50% 20%, #000 0%, transparent 78%);
  opacity: .7;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(28px, 5vw, 64px);
  padding-block: clamp(44px, 7vw, 88px) clamp(36px, 5vw, 60px);
}

.hero-copy h1 {
  margin-top: 18px;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  letter-spacing: -.032em;
  font-weight: 700;
}
.lead {
  margin-top: 18px;
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.7;
  color: var(--ink-2);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.badges li {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.hero-visual::before {
  content: "";
  position: absolute;
  top: 4%;
  left: 50%;
  width: 78%;
  height: 74%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
  filter: blur(6px);
  pointer-events: none;
}

.phone {
  position: relative;
  width: clamp(210px, 23vw, 292px);
  aspect-ratio: 1320 / 2868;
  border-radius: 44px;
  border: 9px solid #111318;
  background: #111318;
  overflow: hidden;
  box-shadow: var(--shadow);
}
[data-theme="dark"] .phone { border-color: #26262b; background: #26262b; }
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }

.phone-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.phone-caption .caption-title { font-size: 14px; font-weight: 650; color: var(--ink); }

/* ---------- Showcase ---------- */
.showcase .section-head { margin-inline: auto; text-align: center; }
.showcase .section-lead { margin-inline: auto; }
.browser {
  max-width: 1080px;
  margin-inline: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  padding: 0 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.traffic { display: inline-flex; gap: 6px; flex: none; }
.traffic i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}
.url {
  flex: 1;
  max-width: 340px;
  margin-inline: auto;
  text-align: center;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-spacer { width: 42px; flex: none; }
.browser img { display: block; width: 100%; }

.figure-note {
  margin-top: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.feature {
  padding: 22px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.feature:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink);
}
.feature-icon svg { width: 19px; height: 19px; }
.feature h3 {
  margin-top: 16px;
  font-size: 1rem;
  letter-spacing: -.015em;
  font-weight: 650;
}
.feature p { margin-top: 7px; font-size: .92rem; line-height: 1.65; color: var(--muted); }

/* ---------- Quick start ---------- */
.code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.code-card {
  border-radius: 16px;
  border: 1px solid var(--code-border);
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--code-border);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8b8b95;
}
.code-head-sub { border-top: 1px solid var(--code-border); }
.copy-btn {
  border: 1px solid rgba(255, 255, 255, .16);
  background: transparent;
  color: #c9c9d1;
  font: inherit;
  font-size: 11.5px;
  letter-spacing: .02em;
  padding: 4px 10px;
  border-radius: 7px;
  cursor: pointer;
  text-transform: none;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.copy-btn.is-copied { color: #34d399; border-color: rgba(52, 211, 153, .5); }
.code-card pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--code-ink);
  tab-size: 2;
}
.code-note {
  margin: 0;
  padding: 0 18px 16px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: .02em;
  color: #8b8b95;
}
.code-card-wide { grid-column: 1 / -1; }
.code-card-wide pre { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .code-card-wide { grid-column: auto; }
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.note {
  padding: 18px 20px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.note strong { display: block; font-size: .92rem; letter-spacing: -.01em; }
.note p { margin-top: 6px; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.note code { font-size: .82em; }

/* ---------- Guide ---------- */
.guide-hero { padding: clamp(40px, 6vw, 72px) 0 0; }
.guide-hero h1 {
  margin-top: 14px;
  font-size: clamp(2rem, 4.2vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.035em;
  font-weight: 700;
}
.guide-hero .lead { max-width: 64ch; }
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}
.guide-meta span,
.guide-meta-link {
  font-size: 12.5px;
  color: var(--muted);
  padding: 5px 11px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--panel);
  text-decoration: none;
}
.guide-meta-link { color: var(--ink); border-color: var(--border-strong); }
.guide-meta-link:hover { border-color: var(--ink); }

.guide-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  padding-block: clamp(24px, 4vw, 44px) clamp(56px, 8vw, 96px);
}
.guide-toc {
  position: sticky;
  top: 88px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.guide-toc p {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-toc nav { display: flex; flex-direction: column; }
.guide-toc a {
  padding: 5px 0;
  font-size: 13.5px;
  font-weight: 550;
  color: var(--ink-2);
  text-decoration: none;
}
.guide-toc a:hover { color: var(--ink); }

.guide-body { min-width: 0; }
.guide-section {
  scroll-margin-top: 88px;
  padding-top: 10px;
  margin-bottom: clamp(40px, 6vw, 64px);
}
.guide-section:last-of-type { margin-bottom: 0; }
.guide-section h2 {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  letter-spacing: -.03em;
}
.guide-section h3 {
  margin-top: 28px;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}
.guide-lead { margin-top: 14px; color: var(--ink-2); }
.guide-section p { margin-top: 12px; color: var(--ink-2); }
.guide-section ul,
.guide-section ol { margin: 12px 0 0; padding-left: 1.25em; color: var(--ink-2); }
.guide-section li { margin: 6px 0; }

.guide-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: .92rem;
}
.guide-table th,
.guide-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.guide-table th {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.guide-table td { color: var(--ink-2); }
.guide-table code { font-size: .86em; white-space: nowrap; }

.guide-code { margin-top: 16px; }
.guide-callout {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-left: 3px solid #10b981;
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink-2);
  font-size: .94rem;
  line-height: 1.7;
}
.guide-callout strong { color: var(--ink); }

.guide-steps { counter-reset: step; list-style: none; padding: 0; margin-top: 18px; }
.guide-steps li { position: relative; padding-left: 40px; margin: 16px 0; }
.guide-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.guide-steps strong { display: block; color: var(--ink); }
.guide-steps span { display: block; margin-top: 3px; color: var(--muted); font-size: .94rem; }

.guide-grid-2,
.guide-grid-3 { display: grid; gap: 14px; margin-top: 18px; }
.guide-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-mini {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.guide-mini h3 { margin: 0; font-size: .98rem; }
.guide-mini p { margin-top: 7px; font-size: .9rem; color: var(--muted); }

.guide-faq { margin-top: 10px; border-top: 1px solid var(--border); }
.guide-faq details { padding: 14px 0; border-bottom: 1px solid var(--border); }
.guide-faq summary { cursor: pointer; font-weight: 650; list-style: none; }
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::after { content: "+"; float: right; color: var(--muted); font-weight: 500; }
.guide-faq details[open] summary::after { content: "−"; }
.guide-faq p { margin-top: 10px; font-size: .94rem; color: var(--muted); }
.guide-help { margin-top: 0; }

/* ---------- Closing ---------- */
.closing { border-top: 1px solid var(--border); }
.closing-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(28px, 5vw, 46px);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.closing h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  line-height: 1.2;
  letter-spacing: -.035em;
}
.closing p { margin-top: 8px; color: var(--muted); font-size: .95rem; }
.closing .cta-row { margin-top: 0; flex: none; }

/* ---------- Footer ---------- */
.footer { padding: 26px 0 34px; border-top: 1px solid var(--border); }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--muted);
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; }
.footer-brand .brand-mark { color: var(--on-accent); }
.footer-links { display: inline-flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; transition: color .15s ease; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notes { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-block: 40px 48px;
  }
  .hero-copy { max-width: 620px; }
  .hero-visual { order: 2; }
  .phone { width: min(280px, 62vw); }
  .closing-inner { flex-direction: column; align-items: flex-start; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-toc {
    position: static;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .guide-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px 18px; }
  .guide-toc a { padding: 3px 0; }
}

@media (max-width: 760px) {
  .nav-links { display: none; }
  .code-grid { grid-template-columns: 1fr; }
  .browser-bar .url { max-width: none; }
  .guide-grid-2,
  .guide-grid-3 { grid-template-columns: 1fr; }
  /* Keep form controls at 16px on phones: iOS zooms the page otherwise. */
  .lang-select { font-size: 16px; max-width: 116px; }
}

@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
  .section { padding-block: 56px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm span { display: none; }
  .lang-select { max-width: 108px; padding-left: 8px; }
  .figure-note { font-size: 12.5px; }
  .guide-table { font-size: .86rem; }
  .guide-table th,
  .guide-table td { padding: 8px 9px; }
  .guide-table code { white-space: normal; word-break: break-all; }
}

@media (max-width: 420px) {
  .brand-text small { display: none; }
  .brand-mark { width: 34px; height: 34px; border-radius: 10px; }
  .brand-text strong { font-size: 15px; }
  .nav-actions { gap: 4px; }
  .lang-select { max-width: 100px; }
  .cta-row .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
