/* === 0a. self-hosted fonts (latin primary; CJK/Arabic via system stacks on [data-locale]) === */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/poppins-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* === 0. tokens (forced light — beat Pico CDN color-scheme) === */
:root,
:root[data-theme="light"],
:root:not([data-theme="dark"]),
html,
html[data-theme="light"] {
  color-scheme: light;
  --color-ink: #111827;
  --color-muted: #4b5563;
  --color-faint: #e5e7eb;
  --color-surface: #fafafa;
  --color-surface-elevated: #ffffff;
  --color-zebra: #f3f4f6;
  --color-zebra-mint: #f0fdf4;
  --color-zebra-mint-border: #bbf7d0;
  --color-tint-brand: #eef0ff;
  --radius-card: 0.75rem;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-section: 1.75rem;
  --font-weight-semibold: 600;
  --site-header-offset: calc(var(--mast-height) + 1px);
  --mast-bg: #ffffff;
  --mast-ink: #111827;
  --mast-muted: #4b5563;
  --mast-border: #e5e7eb;
  --mast-accent: #3344ef;
  --mast-accent-end: #1d2fd4;
  --mast-height: 3.5rem;
  /* Single site rail: header, body (.container), footer */
  --mast-rail: 80rem;
  --sole-bg: #111827;
  --sole-muted: #9ca3af;
  --pico-container-max-width: var(--mast-rail);
  --pico-font-family: "Inter", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-cjk-sc: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", sans-serif;
  --font-cjk-jp: "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  --font-arabic: "Segoe UI", "Tahoma", "Noto Naskh Arabic", "Arial Unicode MS", sans-serif;
  /*
    Pico scales --pico-font-size with viewport (125% at 1280px, 131.25% at 1536+).
    That makes desktop body 20–21px and headings 40–54px. Keep a 16px rem
    (WCAG / iOS input zoom) and scale display type with clamp() instead.
  */
  --pico-font-size: 100%;
  --pico-line-height: 1.55;
  --text-display: clamp(1.625rem, 1.05rem + 1.85vw, 2.125rem);
  --text-h1: 1.75rem;
  --text-h2: 1.375rem;
  --text-h3: 1.125rem;
  --text-lede: clamp(1rem, 0.94rem + 0.2vw, 1.0625rem);
  --pico-background-color: var(--color-surface);
  --pico-color: var(--color-ink);
  --pico-muted-color: var(--color-muted);
  --pico-primary: #3344ef;
  --pico-primary-underline: #3344ef;
  --pico-primary-background: #3344ef;
  --pico-primary-border: #3344ef;
  --pico-primary-hover: #2536d4;
  /* Pico :hover/:active/:focus on buttons use these — not --pico-primary-hover alone */
  --pico-primary-hover-background: #2536d4;
  --pico-primary-hover-border: #2536d4;
  --pico-primary-focus: rgba(51, 68, 239, 0.45);
  --pico-primary-inverse: #fff;
  --pico-card-background-color: var(--color-surface-elevated);
  --pico-border-radius: 0.625rem;
  --pico-code-background-color: #15803d;
  --pico-code-color: #fff;
}

/* Inline code/kbd chips: half Pico’s .375rem padding; soft rect, not pill. pre keeps dark terminal look. */
code,
kbd,
samp {
  padding: 0.1875rem;
  border-radius: 0.3rem;
}

pre {
  background: #111827;
  color: #e8e4dc;
}

/* === 1. base + skip === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  font-size: 100%;
}

@media (min-width: 576px) {
  :root,
  :root[data-theme="light"],
  :host,
  html {
    --pico-font-size: 100%;
  }
}

h1,
h2,
h3 {
  text-wrap: balance;
}

h1 {
  --pico-font-size: var(--text-h1);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h2 {
  --pico-font-size: var(--text-h2);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

h3 {
  --pico-font-size: var(--text-h3);
  line-height: 1.3;
}

body {
  background: var(--color-surface);
  color: var(--color-ink);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip;
}

.results-panel,
.hero {
  color: var(--color-ink);
}

/* Kill Pico nav li padding / ::before float — they cause overlap + phantom scrollbars */
.tool-strip li,
.tool-methods li,
.section-subnav li,
.sole__list li,
.tool-strip ul li,
.tool-methods ul li {
  display: block !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.tool-strip li::before,
.tool-methods li::before,
.section-subnav li::before,
.sole__list li::before,
.tool-strip li::after,
.tool-methods li::after,
:where(.tool-strip li)::before,
:where(.tool-methods li)::before {
  content: none !important;
  display: none !important;
  float: none !important;
}

/* Avoid left:-9999px — in RTL it expands document scrollWidth (~11k px). */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  position: fixed;
  inset-inline-start: 1rem;
  top: 1rem;
  z-index: 50;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  overflow: visible;
  white-space: normal;
  background: var(--color-surface-elevated);
  color: var(--color-ink);
  border: 2px solid var(--pico-primary);
  border-radius: var(--pico-border-radius);
  padding: 0.5rem 1rem;
  outline: none;
}

/* === 2. mast (ReplyAgent-style chrome) === */
.mast {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--mast-bg);
  border-bottom: 1px solid var(--mast-border);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  margin-bottom: var(--space-section);
  overflow: visible;
}

.mast__rail {
  position: relative;
  z-index: 62;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  height: var(--mast-height);
  max-width: var(--mast-rail);
  margin: 0 auto;
  padding: 0 1rem;
  overflow: visible;
}

.mast__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--mast-ink);
}

/* picture must not become the flex item — keep .mast__mark / .sole__mark sizing */
.mast__brand > picture,
.sole__brand-link > picture {
  display: contents;
}

.mast__brand:hover {
  text-decoration: none;
  color: var(--mast-ink);
}

.mast__mark {
  /* ×2 vs previous 2.25rem; rail stays ~3.5rem — mark may spill slightly */
  width: 4.5rem;
  height: 4.5rem;
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  margin-block: calc((4.5rem - var(--mast-height)) / -2);
}

.mast__brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  min-width: 0;
  line-height: 1.1;
}

.mast__name {
  font-family: "Poppins", var(--pico-font-family);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--mast-ink);
  line-height: 1.15;
}

.mast__tagline {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #6b7280;
  white-space: nowrap;
  line-height: 1.2;
}

@media (max-width: 1180px) {
  .mast__tagline {
    display: none;
  }
}

@media (max-width: 1023px) {
  :root {
    /* Must fit logo without spill — drawer starts at this offset */
    --mast-height: 3.5rem;
  }

  .mast__mark {
    width: 2.75rem;
    height: 2.75rem;
    margin-block: 0;
  }

  .mast__name {
    font-size: 1.05rem;
  }

  .mast__tagline {
    display: none;
  }
}

.mast__nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex: 1 1 auto;
  justify-content: flex-end;
  margin: 0;
}

.mast__link {
  color: var(--mast-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.mast__link:hover,
.mast__link[aria-current="page"],
.mast__link[aria-current="true"] {
  color: var(--mast-ink);
  text-decoration: none;
}

.mast__drop {
  position: relative;
}

.mast__nav-star {
  display: inline-block;
  margin: 0 0.2rem 0 0;
  font-size: 1.56em;
  line-height: 1;
  color: var(--mast-accent, #3344ef);
  vertical-align: -0.08em;
}

.mast__drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mast-muted) !important;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  cursor: pointer;
  min-height: 2.75rem;
  width: auto;
  transition: color 0.15s ease;
}

.mast__drop-btn:hover,
.mast__drop.is-current > .mast__drop-btn,
.mast__drop-btn[aria-current="true"] {
  color: var(--mast-ink);
}

.mast__drop-chevron {
  flex: 0 0 auto;
  opacity: 0.75;
}

.mast__drop-panel {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% - 0.15rem);
  z-index: 60;
  width: 16rem;
  padding: 0.5rem 0;
  background: #fff;
  border: 1px solid var(--mast-border);
  border-radius: 0.5rem;
  box-shadow: 0 12px 28px -12px rgba(17, 24, 39, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.mast__drop:hover > .mast__drop-panel,
.mast__drop:focus-within > .mast__drop-panel {
  display: block;
  opacity: 1;
  visibility: visible;
}

.mast__drop-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--mast-ink);
  transition: background 0.15s ease;
}

.mast__drop-item:hover,
.mast__drop-item[aria-current="page"] {
  background: #f9fafb;
  text-decoration: none;
  color: var(--mast-ink);
}

.mast__drop-title {
  font-size: 0.875rem;
  font-weight: 500;
}

.mast__drop-desc {
  display: block;
  font-size: 0.75rem;
  color: #6b7280;
  line-height: 1.35;
}

.mast__drop-all {
  display: block;
  margin-top: 0.35rem;
  padding: 0.5rem 1rem;
  border-top: 1px solid #f3f4f6;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--mast-accent);
  text-decoration: none;
}

.mast__drop-all:hover {
  background: #eef0ff;
  color: var(--mast-accent-end);
  text-decoration: none;
}

.mast__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.5rem;
  padding: 0.5rem 1.1rem;
  border: 0;
  border-radius: 0.375rem;
  background: linear-gradient(90deg, var(--mast-accent), var(--mast-accent-end));
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
  white-space: nowrap;
  box-shadow: none;
}

.mast__cta:hover,
.mast__cta:focus {
  filter: brightness(1.05);
  color: #fff !important;
  text-decoration: none !important;
}

.mast__cta--in-nav {
  display: none;
}

/* Language switcher */
.mast__lang {
  position: relative;
  flex: 0 0 auto;
  margin-inline-start: 0.25rem;
}

.mast__lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 !important;
  padding: 0.35rem 0.5rem !important;
  min-height: 2.25rem;
  border: 1px solid var(--mast-border) !important;
  border-radius: 0.375rem !important;
  background: #fff !important;
  box-shadow: none !important;
  color: var(--mast-ink) !important;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.mast__lang-btn:hover,
.mast__lang-btn[aria-expanded="true"] {
  border-color: #c7cdd8 !important;
  background: #f9fafb !important;
}

.mast__lang-flag {
  display: block;
  width: 1.25rem;
  height: 0.875rem;
  object-fit: cover;
  border-radius: 0.1rem;
  flex: 0 0 auto;
}

.mast__lang-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mast__lang-chevron {
  flex: 0 0 auto;
  opacity: 0.65;
}

.mast__lang-panel {
  position: absolute;
  top: calc(100% + 0.35rem);
  inset-inline-end: 0;
  z-index: 80;
  min-width: 13.5rem;
  /* 9 locales fit without a scrollbar on normal desktop/mobile viewports */
  max-height: none;
  overflow: visible;
  padding: 0.35rem 0;
  border: 1px solid var(--mast-border);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

/* Only if the viewport is too short to show the full list */
@media (max-height: 28rem) {
  .mast__lang-panel {
    max-height: calc(100dvh - var(--mast-height) - 1.25rem);
    overflow-x: hidden;
    overflow-y: auto;
  }
}

.mast__lang-panel[hidden] {
  display: none !important;
}

.mast__lang-list,
.mast__lang-list > li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

.mast__lang-list > li::marker {
  content: none;
  display: none;
}

.mast__lang-option {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.75rem;
  color: var(--mast-ink);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

.mast__lang-option:hover {
  background: #f3f4f6;
  text-decoration: none;
  color: var(--mast-ink);
}

.mast__lang-option.is-current {
  background: var(--color-tint-brand);
  color: var(--mast-accent-end);
}

.mast__burger {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0.5rem !important;
  min-width: 2.75rem;
  min-height: 2.75rem;
  border: 0 !important;
  border-radius: 0.375rem !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--mast-muted) !important;
  cursor: pointer;
  flex: 0 0 auto;
  width: auto;
}

.mast__burger:hover {
  color: var(--mast-ink);
  background: #f3f4f6;
}

.mast__burger-icon--close {
  display: none;
}

body.is-mast-open .mast__burger-icon--open {
  display: none;
}

body.is-mast-open .mast__burger-icon--close {
  display: block;
}

.mast__overlay {
  display: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible,
.dropzone:focus-within {
  outline: 2px solid var(--pico-primary);
  outline-offset: 2px;
}

:is(button, [type="submit"], [type="button"], [role="button"]):not(.outline, .secondary, .contrast, .glossary-chip, .mast__burger, .mast__drop-btn, .mast__lang-btn, .gen-presets button) {
  color: #fff;
}

:is(button, [type="submit"], [type="button"], [role="button"]):not(.outline, .secondary, .contrast, .glossary-chip) .icon {
  color: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .mast,
  .mast__drop-panel,
  .mast__link,
  .test-result,
  .toast,
  .dl-links .file-badge,
  .dropzone {
    transition: none !important;
    animation: none !important;
  }
}

.hero-brand {
  display: none;
}

.section-subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 1.25rem;
  padding: 0.55rem 0.75rem;
  background: var(--color-zebra);
  border: 1px solid var(--color-faint);
  border-radius: var(--pico-border-radius);
}

.section-subnav-label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--pico-primary);
  white-space: nowrap;
}

.section-subnav ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
  list-style: none;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible;
}

.section-subnav a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 2.25rem;
  margin: 0 !important; /* Pico nav a negative margin → pill overlap */
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--color-muted);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  font-size: 0.92rem;
  line-height: 1.2;
  white-space: nowrap;
}

.section-subnav a[aria-current="page"] {
  background: var(--color-tint-brand);
  border-color: #a5b4fc;
  color: var(--color-ink);
  font-weight: 600;
}

.home-section {
  margin: 2.5rem 0 1.5rem;
}

.home-section--band {
  /* Full-bleed bg; inner rail = parent .container content box (not hardcoded max-width) */
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 1.5rem max(var(--pico-spacing, 1rem), calc(50vw - 50%));
  background: var(--color-zebra);
  border-block: 1px solid var(--color-faint);
  box-sizing: border-box;
}

.home-section-head {
  margin-bottom: 1.25rem;
}

.home-section-head h2 {
  margin-bottom: 0.25rem;
}

.lede-inline {
  max-width: none;
  font-size: 1.05rem;
}

.field-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin: 0.75rem 0 0.35rem;
}

.field-head-label {
  margin: 0;
  font-weight: 600;
}

.field-head + textarea {
  margin-top: 0;
}

.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 8.5rem;
  margin: 0.35rem 0 1rem;
  padding: 1.25rem 1rem;
  border: 1.5px dashed #d1d5db;
  border-radius: var(--radius-card);
  background: var(--color-surface-elevated);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  user-select: none;
}

.dropzone-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--pico-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 68, 239, 0.15);
}

.dropzone--drag {
  border-color: var(--pico-primary);
  border-style: solid;
  background: var(--color-tint-brand);
  box-shadow: 0 0 0 3px rgba(51, 68, 239, 0.18);
}

.dropzone--has-file {
  border-style: solid;
  border-color: #a5b4fc;
  background: var(--color-tint-brand);
}

.dropzone--error {
  border-color: #c62828;
  background: rgba(198, 40, 40, 0.06);
}

.dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone-title {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  color: var(--pico-primary);
}

.dropzone-hint,
.dropzone-name {
  margin: 0;
  font-size: 0.9rem;
}

.dropzone-name {
  font-family: ui-monospace, Consolas, monospace;
  word-break: break-all;
}

.dropzone-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  width: 100%;
  max-width: 28rem;
  text-align: left;
  font-size: 0.85rem;
}

.dropzone-list li {
  margin: 0.15rem 0;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--color-zebra);
  word-break: break-all;
}

.dropzone-list code {
  font-size: 0.85em;
}

.dropzone-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.35rem;
}

.dropzone-actions button {
  margin-bottom: 0;
}

/* Pico zeros .container side padding from 576px — keep gutters site-wide */
.container,
.container-fluid {
  padding-left: var(--pico-spacing, 1rem) !important;
  padding-right: var(--pico-spacing, 1rem) !important;
}

/*
  Pico sets .container max-width per breakpoint (1200 / 1450…).
  That made body narrower or wider than header/footer (--mast-rail).
  One rail for the whole site.
*/
.container {
  max-width: var(--mast-rail) !important;
}

/* === 9. sole (dark footer) === */
.sole {
  margin-top: 3rem;
  background: var(--sole-bg);
  color: #fff;
  padding-top: 3rem;
  padding-bottom: 2.5rem;
}

.sole__rail {
  max-width: var(--mast-rail);
  margin: 0 auto;
  padding: 0 1rem;
}

.sole__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

.sole__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: #fff;
  text-decoration: none;
}

.sole__brand-link:hover {
  color: #fff;
  text-decoration: none;
}

.sole__mark {
  width: 2rem;
  height: 2rem;
  display: block;
}

.sole__name {
  font-family: "Poppins", var(--pico-font-family);
  font-weight: 700;
  font-size: 1.125rem;
}

.sole__tagline,
.sole__stats {
  margin: 0 0 0.75rem;
  color: var(--sole-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.sole__label {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.sole__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sole__list a {
  color: var(--sole-muted);
  font-size: 0.875rem;
  text-decoration: none;
  line-height: 1.4;
  white-space: normal;
  padding-block: 0.15rem;
  transition: color 0.15s ease;
}

.sole__list a:hover {
  color: #fff;
  text-decoration: none;
}

.sole__bar {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #1f2937;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.sole__copy {
  margin: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  color: var(--sole-muted);
  font-size: 0.875rem;
}

.sole__author {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--sole-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.sole__author:hover {
  color: #fff;
  text-decoration: none;
}

.sole__reddit {
  width: 1.125rem;
  height: 1.125rem;
  display: block;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.muted { color: var(--color-muted); }
.small { font-size: 0.875rem; }

/* === 4. home === */
.hero h1 {
  font-family: "Poppins", var(--pico-font-family);
  font-size: var(--text-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: var(--color-ink);
}

.hero .lede {
  font-size: var(--text-lede);
  line-height: 1.55;
  max-width: none;
  color: var(--color-muted);
}

.hero .lede.home-intro {
  max-width: none;
  width: 100%;
  color: var(--color-ink);
}

.hero .lede.home-intro p,
.home-section-head .home-intro p {
  margin: 0 0 0.75rem;
}

.hero .lede.home-intro p:last-child,
.home-section-head .home-intro p:last-child {
  margin-bottom: 0;
}

.home-section-head .home-intro {
  margin-top: 0.5rem;
  margin-bottom: 0.25rem;
  max-width: none;
  width: 100%;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-ink);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.cta-row > a,
.cta-row > button {
  margin: 0;
}

@media (max-width: 767px) {
  .hero .cta-row .btn-icon .icon {
    display: none;
  }
}

/* Terminal / curl highlighting */
.code-panel {
  border-radius: 0.45rem;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid #0b5f4b; /* LOCK: curl accent literal, not --pico-primary */
  font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  box-shadow: 0 16px 36px -20px rgba(0, 0, 0, 0.45);
  margin: 0.75rem 0 0.35rem;
}

.code-panel-chrome {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  position: relative;
  background: linear-gradient(#1c2128 0%, #161b22 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.code-panel-chrome > span:not(.code-panel-title) {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3f48;
}

.code-panel-chrome > span:first-child { background: #ff5f57; }
.code-panel-chrome > span:nth-child(2) { background: #febc2e; }
.code-panel-chrome > span:nth-child(3) { background: #28c840; }

.code-panel-title {
  color: #8b949e;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  margin-left: auto;
  margin-right: auto;
  padding-right: 1.85rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

button.code-panel-copy,
.code-panel-copy {
  --pico-background-color: transparent;
  --pico-border-color: transparent;
  --pico-color: #8b949e;
  --pico-box-shadow: none;
  --pico-form-element-spacing-vertical: 0;
  --pico-form-element-spacing-horizontal: 0;
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  width: 2.25rem;
  min-width: 2.25rem;
  max-width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #8b949e;
  cursor: pointer;
  line-height: 0;
}

.code-panel-copy:hover,
.code-panel-copy:focus-visible,
button.code-panel-copy:hover,
button.code-panel-copy:focus-visible {
  --pico-background-color: rgba(255, 255, 255, 0.08);
  --pico-color: #e6edf3;
  background: rgba(255, 255, 255, 0.08);
  color: #e6edf3;
}

.code-panel-copy svg {
  width: 1rem;
  height: 1rem;
  display: block;
}

.curl-examples {
  min-width: 0;
  max-width: 100%;
  margin-top: 2.5rem; /* ~два переноса после «Принятые файлы» / формы */
}

.curl-examples .code-panel {
  margin-top: 0;
  min-width: 0;
  height: 100%;
}

.curl-examples .code-panel + .code-panel {
  margin-top: 0.85rem;
}

@media (min-width: 900px) {
  .curl-examples--row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.85rem 1rem;
    align-items: stretch;
  }

  .curl-examples--row > h2 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .curl-examples--row .code-panel + .code-panel {
    margin-top: 0;
  }
}

pre.code-block {
  color: #c9d1d9;
  background: #0d1117;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.45rem;
  margin: 0;
  padding: 1.05rem 1.15rem 1.2rem;
  overflow-x: hidden;
  font-size: 0.85rem;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  box-shadow: none;
}

.code-panel > pre.code-block {
  background: transparent;
  border: 0;
  border-radius: 0;
}

pre.code-block .t-prompt { color: #58a6ff; font-weight: 600; }
pre.code-block .t-cmd { color: #7ee787; font-weight: 600; }
pre.code-block .t-str { color: #a5d6ff; }
pre.code-block .t-url { color: #79c0ff; }
pre.code-block .t-flag { color: #ffa657; }
pre.code-block .t-ok { color: #3fb950; font-weight: 600; }
pre.code-block .t-comment { color: #8b949e; font-style: italic; }

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: stretch;
  margin: 0.5rem 0 1rem;
}

.copy-row > button,
.copy-row > a {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin-bottom: 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
  padding: 0;
}

.table-wrap table {
  margin-bottom: 0;
}

.table-wrap code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-wrap--zebra thead th,
.results-table thead th {
  background: var(--color-zebra);
}

.table-wrap--zebra tbody tr:nth-child(even),
.results-table tbody tr:nth-child(even) {
  background: var(--color-zebra);
}

.table-wrap--zebra tbody tr:hover,
.results-table tbody tr:hover {
  background: #e5e7eb;
}

/* Avoid double card frame: tool-main is already the elevated surface */
.tool-main .table-wrap {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  left: auto;
  z-index: 30;
  max-width: min(90vw, 20rem);
  background: #111827;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: var(--pico-border-radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.toast.show { opacity: 1; }

.gen-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.gen-toolbar button {
  margin-bottom: 0;
  width: auto;
}

.gen-hint { margin: 0 0 0.75rem; }

.gen-add-row {
  margin: 0.5rem 0 0.85rem;
}

.gen-add-row button {
  margin: 0;
  width: auto;
  min-height: 2.15rem;
  padding: 0.3rem 0.85rem;
}

.gen-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin: 0 0 1rem;
}
.gen-actions-run {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}
.gen-actions-run label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}
.gen-actions-run input {
  margin: 0;
  width: 4.5rem;
  padding: 0.35rem 0.5rem;
  min-height: 2.35rem;
  font-size: 0.9rem;
}
.gen-actions-export {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.compare-panel:has(#gen-fields) {
  margin: 0.5rem 0 0;
  overflow: visible;
}

.compare-panel #gen-fields {
  min-width: 0;
}

/* Compact field editor table */
#gen-fields th,
#gen-fields td {
  padding: 0.3rem 0.4rem;
  vertical-align: middle;
}

#gen-fields th {
  font-size: 0.8rem;
  white-space: nowrap;
}

#gen-fields input,
#gen-fields select {
  box-sizing: border-box;
  margin: 0;
  width: 100%;
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0 0.55rem;
  font-size: 0.88rem;
  line-height: 1.25;
  vertical-align: middle;
}

#gen-fields td:first-child {
  white-space: nowrap;
  width: 1%;
}

#gen-fields td:first-child button,
#gen-fields td:last-child button,
#gen-fields .gen-cell-move button,
#gen-fields .gen-cell-del button {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  min-height: 2.35rem;
  margin: 0 0.1rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1;
}

#gen-fields td:last-child {
  width: 1%;
  white-space: nowrap;
}

#gen-fields .gen-opt-empty {
  color: var(--color-muted);
  font-size: 0.9rem;
}

mark.warn {
  background: rgba(180, 120, 20, 0.15);
  padding: 0.1em 0.35em;
}

mark.ok {
  background: rgba(46, 125, 50, 0.14);
  padding: 0.1em 0.35em;
}

.feedback-form {
  max-width: 36rem;
  margin-top: 1.25rem;
  padding: 1.15rem 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

/* Same clip technique as .skip-link — left:-10000px expands scrollWidth under RTL. */
.feedback-hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dl-links--tight {
  margin-bottom: 0.5rem;
}

/* Keep flex off <td> — stretched anchors fill the tall row and flicker under badges */
.sample-dl {
  vertical-align: middle;
}

.dl-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.dl-links a {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  line-height: 0;
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0;
  border-radius: 0.4rem;
}

.dl-links a:hover,
.dl-links a:focus,
.dl-links a:active {
  text-decoration: none !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none;
}

.dl-links a:hover .file-badge,
.dl-links a:focus-visible .file-badge {
  filter: brightness(0.96);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.08);
}

.dl-links .file-badge {
  transition: filter 0.12s ease, box-shadow 0.12s ease;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  line-height: 0;
  color: var(--pico-primary);
}

.icon svg,
.icon img {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
}

.icon--sm svg,
.icon--sm img {
  width: 1.15rem;
  height: 1.15rem;
}

.icon--lg svg,
.icon--lg img {
  width: 1.75rem;
  height: 1.75rem;
}

.file-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem 0.3rem 0.35rem;
  border-radius: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid transparent;
  background: #f4f5f4;
  color: #2a2a28;
}

.file-badge .icon {
  color: inherit;
}

.file-badge--csv {
  background: #eef8f0;
  border-color: #c5e6c8;
  color: #1b5e20;
}

.file-badge--xlsx {
  background: #eaf6ef;
  border-color: #b7dfc4;
  color: #0d5c2e;
}

.file-badge--pdf {
  background: #fdecea;
  border-color: #f5c6c2;
  color: #8b1e1e;
}

.file-badge--txt {
  background: #f0f2f3;
  border-color: #d0d5d8;
  color: #3d474d;
}

.file-badge--jpg,
.file-badge--png,
.file-badge--webp {
  background: #f3f4f6;
  border-color: #e5e7eb;
  color: #374151;
}

.file-badge--xml {
  background: #e8f4fc;
  border-color: #b9dcf0;
  color: #01579b;
}

.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1.75rem;
}

.doc-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: var(--pico-card-background-color);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.doc-card-preview {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--color-zebra);
  border-bottom: 1px solid var(--color-faint);
}

.doc-card-thumb-link {
  position: absolute;
  inset: 0;
  display: block;
}

.doc-card-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.doc-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 100%;
  min-height: 8rem;
  color: var(--color-muted);
  font-size: 0.85rem;
  border: 1.5px dashed #d1d5db;
  margin: 0.65rem;
  border-radius: 0.5rem;
}

.doc-card-placeholder .icon {
  color: var(--pico-primary);
  opacity: 0.55;
}

.doc-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 0.45rem;
  padding: 0.85rem 0.9rem 1rem;
}

.doc-card-body h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
  min-height: 2.6em; /* две строки заголовка — выравнивает ряд */
}

.doc-card-body > .muted.small {
  margin: 0;
  flex: 1 1 auto;
  line-height: 1.4;
  min-height: 4.2em; /* три строки описания */
}

.doc-card-body .dl-links {
  margin: 0;
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

.doc-card-id {
  margin: 0;
  font-size: 0.8rem;
}

.doc-card--pending {
  opacity: 0.92;
}

.set-title {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
}

.set-title .icon {
  margin-top: 0.15rem;
  color: #374151;
  background: var(--color-zebra);
  border-radius: 0.5rem;
  width: 2rem;
  height: 2rem;
}

.set-title .icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

/* Pico sets [role=button]{display:block} — must beat that or align-items is a no-op */
a.btn-icon,
button.btn-icon,
[role="button"].btn-icon,
.btn-icon {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  line-height: 1.25;
  vertical-align: middle;
}

.btn-icon .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  translate: none;
  flex: 0 0 auto;
}

.btn-icon .icon svg,
.btn-icon .icon img {
  display: block;
  width: 1.35rem;
  height: 1.35rem;
}

.gen-toolbar button[aria-pressed="true"] {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

code.small {
  font-size: 0.8em;
}

/* === 10. responsive — tablet/mobile ≤1023 === */
@media (max-width: 1023px) {
  /* Keep bar CTA visible like ReplyAgent (Get Started + burger) */
  .mast__cta--bar {
    display: inline-flex;
    margin-left: auto;
    min-height: 2.25rem;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
  }

  /* Brand | … | lang + burger clustered at the end (cancel rail gap between them) */
  .mast__lang {
    margin-inline-start: auto;
    margin-inline-end: calc(0.2rem - 0.65rem);
  }

  .mast__burger {
    display: inline-flex;
  }

  /* Drawer attached to bottom of .mast__rail (top: 100%) — not a guessed rem offset */
  .mast__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 55;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 0 -50vw;
    max-height: calc(100dvh - var(--mast-height) - 1px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.35rem 0.5rem calc(1rem + env(safe-area-inset-bottom, 0px));
    background: var(--mast-bg);
    border-bottom: 1px solid var(--mast-border);
    box-shadow: 0 12px 32px -16px rgba(17, 24, 39, 0.4);
  }

  body.is-mast-open .mast__nav {
    display: flex;
  }

  .mast__overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 54;
    width: 100vw;
    max-width: 100vw;
    margin: 0 0 0 -50vw;
    height: 100dvh;
    background: rgba(17, 24, 39, 0.4);
    border: 0;
    padding: 0;
  }

  body.is-mast-open .mast__overlay {
    display: block;
  }

  body.is-mast-open {
    overflow: hidden;
  }

  .mast__drop {
    width: 100%;
    margin: 0 0 0.25rem;
    padding: 0 0 0.25rem;
    border-bottom: 1px solid rgba(17, 24, 39, 0.1);
  }

  .mast__drop-btn {
    width: 100%;
    justify-content: flex-start;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem !important;
    font-weight: 600;
    color: var(--mast-ink) !important;
    cursor: default;
    pointer-events: none;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06) !important;
    border-radius: 0 !important;
  }

  .mast__drop-chevron {
    display: none;
  }

  .mast__drop-panel {
    display: flex !important;
    flex-direction: column;
    position: static;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
  }

  .mast__drop-desc {
    display: none;
  }

  .mast__drop-item {
    min-height: 2.75rem;
    justify-content: center;
    padding: 0.65rem 0.85rem 0.65rem 1.85rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  }

  .mast__drop-item:last-child {
    border-bottom: 0;
  }

  .mast__drop-item:active,
  .mast__drop-item[aria-current="page"] {
    background: #eef0ff;
  }

  .mast__drop-all {
    margin: 0.15rem 0 0.35rem;
    padding: 0.55rem 0.75rem;
    border-top: 0;
    border-radius: 0.375rem;
  }

  .mast__link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0;
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
  }

  .mast__link:last-child {
    border-bottom: 0;
  }

  .mast__link:active,
  .mast__link[aria-current="page"],
  .mast__link[aria-current="true"] {
    background: #eef0ff;
  }

  .mast__link:hover,
  .mast__drop-item:hover {
    background: #f3f4f6;
  }

  .mast__cta--in-nav {
    display: inline-flex;
    width: 100%;
    margin-top: 0.75rem;
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-main {
    order: 0;
  }

  .materials-panel {
    position: static;
    order: 1;
  }
}

@media (max-width: 767px) {
  .section-subnav {
    flex-direction: column;
    align-items: stretch;
  }

  .section-subnav ul {
    flex-wrap: wrap;
  }

  .cta-row > a,
  .cta-row > button {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }

  .gen-toolbar button {
    min-height: 2.75rem;
  }

  .copy-row {
    flex-direction: column;
  }

  .copy-row > button,
  .copy-row > a {
    flex: 1 1 auto;
    width: 100%;
  }

  .code-panel-chrome {
    padding: 0.35rem 0.55rem 0.35rem 0.7rem;
    padding-right: 3.1rem;
    min-height: 2.85rem;
  }

  button.code-panel-copy,
  .code-panel-copy {
    width: 2.75rem;
    min-width: 2.75rem;
    max-width: 2.75rem;
    height: 2.75rem;
    min-height: 2.75rem;
    right: 0.15rem;
  }

  .code-panel-title {
    padding-right: 0.25rem;
    font-size: 0.7rem;
  }

  pre.code-block {
    font-size: 0.78rem;
    padding: 0.85rem 0.75rem 1rem;
  }

  .gen-params {
    grid-template-columns: 1fr;
  }

  .toast {
    right: 0;
    left: 0;
    bottom: 0;
    max-width: none;
    text-align: center;
    border-radius: 0;
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 30;
  }

  /* Mobile cards: [↑↓] | name/type | [×] — one compact block */
  .table-wrap:has(#gen-fields) {
    background: transparent;
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .table-wrap:has(#gen-fields) tbody tr:nth-child(even),
  .table-wrap:has(#gen-fields) tbody tr:hover {
    background: transparent;
  }

  #gen-fields thead {
    display: none;
  }

  #gen-fields,
  #gen-fields tbody {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #gen-fields tr {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "move name del"
      "move type del"
      "move opt  del";
    gap: 0.4rem 0.45rem;
    align-items: center;
    background: var(--pico-card-background-color);
    border: 1px solid var(--color-faint);
    border-radius: var(--radius-card);
    padding: 0.55rem 0.6rem;
    margin-bottom: 0.5rem;
    max-width: 100%;
    box-sizing: border-box;
  }

  #gen-fields td {
    display: block;
    padding: 0;
    border: 0;
    min-width: 0;
  }

  #gen-fields .gen-cell-move {
    grid-area: move;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-self: center;
  }

  #gen-fields .gen-cell-move button,
  #gen-fields .gen-cell-del button {
    margin: 0;
    width: 2.35rem;
    min-width: 2.35rem;
    height: 2.35rem;
    min-height: 2.35rem;
    padding: 0;
  }

  #gen-fields .gen-cell-name {
    grid-area: name;
  }

  #gen-fields .gen-cell-type {
    grid-area: type;
  }

  #gen-fields .gen-cell-opt {
    grid-area: opt;
  }

  #gen-fields .gen-cell-opt.gen-opt-empty {
    display: none;
  }

  #gen-fields .gen-cell-del {
    grid-area: del;
    display: flex;
    align-items: center;
    align-self: center;
  }

  #gen-fields input,
  #gen-fields select {
    max-width: 100%;
  }

  .sole {
    padding-bottom: 2rem;
  }
}

@media (max-width: 767px) {
  .sole__grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 1.25rem;
  }

  .sole__bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .sole__brand {
    grid-column: 1 / -1;
  }

  .mast__name {
    font-size: 1rem;
  }
}

@media (max-width: 420px) {
  .cta-row > a,
  .cta-row > button {
    flex: 1 1 100%;
  }

  .hero h1 {
    font-size: 1.625rem;
  }
}

@media (min-width: 1024px) {
  .mast__burger {
    display: none !important;
  }

  .mast__nav {
    display: flex !important;
    position: static;
    top: auto;
    left: auto;
    width: auto;
    max-width: none;
    margin: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .mast__overlay {
    display: none !important;
  }
}

/* --- Tool shell (channels) --- */
.tool-shell {
  position: relative;
  margin: 0 0 1.5rem;
}

/* Verdict: reached target=green (delivery ok); blocked/failed=red */
.test-result-host {
  margin: 1rem 0 0;
}

.test-result {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  animation: result-in 0.15s ease-out;
}

@keyframes result-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .test-result {
    animation: none;
  }
}

.test-result--error {
  background: rgba(198, 40, 40, 0.08);
  border-color: rgba(198, 40, 40, 0.35);
  color: #8b1e1e;
}

.is-empty {
  margin: 0.5rem 0;
}

.test-result--pending,
.test-result--info {
  display: block;
  padding: 0.35rem 0;
  border: 0;
}

.test-result-icon {
  flex: 0 0 auto;
  line-height: 0;
  margin-top: 0.1rem;
}

.test-result-body {
  flex: 1 1 auto;
  min-width: 0;
}

.test-result-msg {
  margin: 0;
  font-weight: 600;
  line-height: 1.35;
}

.test-result-detail {
  margin: 0.35rem 0 0;
}

.test-result-actions {
  margin: 0.65rem 0 0;
}

.test-result--leaked {
  background: rgba(46, 125, 50, 0.1);
  border-color: rgba(46, 125, 50, 0.35);
  color: #1b5e20;
}

.test-result--leaked .test-result-icon {
  color: #2e7d32;
}

.test-result--blocked {
  background: rgba(198, 40, 40, 0.08);
  border-color: rgba(198, 40, 40, 0.35);
  color: #8b1e1e;
}

.test-result--blocked .test-result-icon {
  color: #c62828;
}

.results-panel {
  margin: 1.5rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--color-faint);
}

.results-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.results-panel-title {
  margin: 0;
  font-size: 1.15rem;
}

.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 0.85rem;
  margin: 0.65rem 0 0.55rem;
}

.results-toolbar [data-results-refresh] {
  flex: 0 0 auto;
  min-height: 2.75rem;
  color: #fff;
}

.results-toolbar [data-results-refresh] .icon {
  color: #fff;
}

.results-toolbar-meta {
  flex: 1 1 12rem;
  min-width: 0;
  padding-top: 0.35rem;
}

.results-toolbar-meta p {
  margin: 0;
}

.results-toolbar-meta p + p {
  margin-top: 0.15rem;
}

.results-toolbar-meta [data-results-status]:empty {
  display: none;
}

.results-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.results-table {
  width: 100%;
  font-size: 0.92rem;
}

.results-table th,
.results-table td {
  vertical-align: middle;
}

code.results-name,
.results-name {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
  background: var(--pico-primary);
  color: #fff;
}

.results-readme-row .results-name,
.results-card--readme .results-name,
.results-name--readme,
.results-readme-row a.results-name-link .results-name,
.results-card--readme a.results-name-link .results-name,
a.results-name-link .results-name--readme {
  background: #d8d6d1;
  color: #111827;
}

a.results-name-link {
  color: inherit;
  text-decoration: none;
}

a.results-name-link .results-name:not(.results-name--readme) {
  color: #fff;
}

a.results-name-link:hover .results-name:not(.results-name--readme) {
  background: var(--pico-primary-hover);
  color: #fff;
}

.results-readme-row a.results-name-link:hover .results-name,
.results-card--readme a.results-name-link:hover .results-name,
a.results-name-link:hover .results-name--readme {
  background: #c4c2bd;
  color: #111827;
}

.results-actions {
  white-space: nowrap;
}

.results-actions a,
.results-actions button {
  margin: 0 0.15rem;
  min-height: 2.75rem;
}

.results-cards {
  list-style: none;
  padding: 0;
  margin: 0;
}

.results-card {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.1);
}

.results-card-name code {
  word-break: break-all;
}

.results-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.results-card-actions a,
.results-card-actions button {
  flex: 1 1 auto;
  min-height: 2.75rem;
}

.results-view {
  margin-top: 0.75rem;
  max-height: 16rem;
  overflow: auto;
}

.results-email-from {
  display: block;
  margin: 0.75rem 0;
}

.results-email-from input {
  width: 100%;
  max-width: 28rem;
}

.results-email-body.code-block,
.results-view.code-block,
pre.code-block.results-email-body,
pre.code-block.results-view {
  margin-top: 0.75rem;
  max-height: 18rem;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 767px) {
  .results-email-from input {
    max-width: none;
  }

  .results-toolbar [data-results-refresh] {
    width: auto;
  }
}

.tool-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tool-skip:focus-within {
  position: static;
  width: auto;
  height: auto;
  margin: 0 0 0.5rem;
  clip: auto;
  overflow: visible;
  white-space: normal;
}

.breadcrumbs {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  color: var(--color-muted, #5c5a57);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2rem 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  color: var(--color-muted, #5c5a57);
  opacity: 0.7;
  speak: never;
}

.breadcrumbs a {
  color: var(--pico-primary);
  text-decoration: none;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs [aria-current="page"] {
  color: var(--color-ink);
}

.home-section-head h2 a {
  color: inherit;
  text-decoration: none;
}

.home-section-head h2 a:hover {
  color: var(--pico-primary);
}

.tool-methods-blurb {
  margin: 0 0 1rem;
}

.results-readme-row td {
  background: var(--color-zebra);
}

/* Fill site .container — do not shrink FAQ/legal vs tool pages */
.prose,
.legal-doc,
.feedback-page {
  max-width: none;
  width: 100%;
}

main.container > .prose,
main.container > .legal-doc,
main.container > .feedback-page,
main.container > .tool-shell,
main.container > h1,
main.container > .breadcrumbs {
  max-width: none;
}

.prose,
.legal-doc {
  font-size: 1.0625rem;
  line-height: 1.65;
}

.prose p,
.legal-doc p,
.prose li,
.legal-doc li {
  text-wrap: pretty;
}

/* Long URLs / paths in inline <code> must wrap on narrow screens */
main.container > p > code,
.prose code,
.legal-doc code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.prose h2,
.legal-doc h2 {
  margin-top: 1.75rem;
}
.prose > ul {
  margin: 0.75rem 0 1.25rem;
  padding-left: 1.25rem;
}
.prose > ul > li {
  margin: 0.35rem 0;
}
.prose > .article-meta {
  margin: -0.35rem 0 1.1rem;
  font-size: 0.875rem;
  line-height: 1.4;
}
.prose > .article-meta time {
  white-space: nowrap;
}

/* Longread: /what-is-dlp/ */
.thesis-band-text {
  margin: 0;
  font-size: 1.125rem;
  line-height: 1.55;
  font-weight: 600;
}
.prose .toc {
  /* Pico styles bare <nav> as flex row — force block stack */
  display: block;
  box-sizing: border-box;
  padding: 0.9rem 1rem;
  background: var(--color-zebra);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
}
.prose .toc-label {
  display: block;
  margin: 0 0 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pico-muted-color, #6b7280);
}
.prose .toc ol {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: 1.25rem;
  list-style: decimal;
  list-style-position: outside;
  box-sizing: border-box;
}
.prose .toc li {
  /* Pico also sets li to inline-block */
  display: list-item;
  float: none;
  width: auto;
  max-width: 100%;
  margin: 0.15rem 0;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 0.92rem;
  line-height: 1.35;
}
.prose .toc a {
  display: inline;
  text-decoration: none;
  color: var(--pico-primary);
}
.prose .toc a:hover {
  text-decoration: underline;
}

/* Inline glossary on the longread */
.prose .glossary-inline {
  margin: 0.75rem 0 1.5rem;
  padding: 0;
}
.prose .glossary-inline dt {
  margin: 1rem 0 0.2rem;
  font-weight: 700;
  scroll-margin-top: 6rem;
}
.prose .glossary-inline dt:first-child {
  margin-top: 0;
}
.prose .glossary-inline dd {
  margin: 0;
  padding: 0;
  color: var(--pico-muted-color, #374151);
}

/* Desktop: compact TOC, article text wraps around it */
@media (min-width: 768px) {
  .prose .toc {
    float: right;
    width: min(20.5rem, 38%);
    max-width: 20.5rem;
    margin: 0.15rem 0 1.25rem 1.5rem;
  }
  /* Keep the next heading/panels from sitting under a leftover float awkwardly */
  .prose .compare-panel,
  .prose .compare-caption,
  .prose > h2 {
    clear: none;
  }
}

@media (max-width: 767px) {
  .prose .toc {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 1rem 0 1.35rem;
  }
}
.prose .compare-caption {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--pico-muted-color, #6b7280);
}
.archetype-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}
.archetype-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-faint);
  border-radius: 1rem;
  background: #fff;
  min-width: 0;
}
.archetype-card-media {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--color-zebra);
}
.archetype-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 1.1rem 1.15rem;
  flex: 1 1 auto;
  min-width: 0;
}
.archetype-eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #3344ef;
}
.archetype-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.3;
}
.archetype-card p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--color-ink);
  overflow-wrap: anywhere;
}
.archetype-card .archetype-check {
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.88rem;
  color: var(--pico-muted-color, #6b7280);
}
.archetype-note {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
}
.page-band .home-section-head > h2 {
  margin-top: 0;
}
.page-band > p {
  max-width: none;
  width: 100%;
  line-height: 1.55;
}
@media (max-width: 900px) {
  .archetype-grid {
    grid-template-columns: 1fr;
  }
}

/* Legal pages: readable hierarchy, not a raw markdown dump */
.legal-doc > h1 {
  margin: 0 0 0.35rem;
  font-size: var(--text-h1);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.legal-doc .legal-updated {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-muted);
}

.legal-doc > h1 + .legal-updated + p,
.legal-doc > .legal-updated + p {
  margin-top: 0;
  font-size: var(--text-lede);
  color: var(--color-ink);
}

.legal-doc > h2 {
  margin: 2rem 0 0.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--color-faint);
  font-size: var(--text-h2);
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.legal-doc > h2:first-of-type {
  margin-top: 1.75rem;
}

.legal-doc > h3 {
  margin: 1.35rem 0 0.35rem;
  font-size: var(--text-h3);
  line-height: 1.35;
  font-weight: var(--font-weight-semibold);
}

.legal-doc > h3 + p,
.legal-doc > h3 + ul,
.legal-doc > h3 + ol {
  margin-top: 0.25rem;
}

.legal-doc > ul,
.legal-doc > ol {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc > ul > li,
.legal-doc > ol > li {
  margin: 0.35rem 0;
}

.legal-doc > ul > li::marker,
.legal-doc > ol > li::marker {
  color: var(--color-muted);
}

.legal-doc .legal-callout {
  margin: 1rem 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-faint);
  border-left: 3px solid var(--mast-accent);
  border-radius: var(--radius-card);
  background: var(--color-tint-brand);
}

.legal-doc .legal-callout p {
  margin: 0.2rem 0;
}

.legal-doc .legal-callout p:first-child {
  margin-top: 0;
}

.legal-doc .legal-callout p:last-child {
  margin-bottom: 0;
}

@media (max-width: 575px) {
  .legal-doc .legal-callout {
    padding: 0.8rem 0.85rem;
  }
}

.curl-examples h2 {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.tool-strip,
.tool-methods {
  display: block;
  margin: 0 0 0.85rem;
  padding: 0.15rem 0 0.55rem;
  border-bottom: 1px solid var(--color-faint);
  overflow: visible !important;
  height: auto;
  max-height: none;
  scrollbar-width: none;
}

.tool-strip::-webkit-scrollbar,
.tool-methods::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.tool-strip ul,
.tool-methods ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none;
  overflow: visible;
}

.tool-strip a,
.tool-methods a {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 2.25rem;
  margin: 0 !important; /* Pico nav a negative margin */
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  color: var(--color-ink);
}

.tool-methods a {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--color-muted);
  background: var(--color-zebra);
  border-color: var(--color-faint);
}

.tool-strip a:hover,
.tool-methods a:hover {
  background: var(--color-tint-brand);
  color: var(--color-ink);
  border-color: #a5b4fc;
}

.tool-strip a[aria-current="page"],
.tool-methods a[aria-current="page"] {
  background: var(--color-tint-brand);
  border-color: #a5b4fc;
  color: var(--color-ink);
  font-weight: 600;
}

@media (max-width: 1023px) {
  .tool-strip,
  .tool-methods {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .tool-strip ul,
  .tool-methods ul {
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
  }
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, 17rem);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

.tool-main {
  min-width: 0;
  padding: 1rem 1.1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.tool-layout--solo {
  grid-template-columns: 1fr;
}

.materials-panel {
  position: sticky;
  top: var(--site-header-offset);
  margin: 0;
  padding: 0;
  color: var(--color-ink);
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.materials-panel .muted,
.materials-panel .materials-h {
  color: var(--color-muted);
}

.materials-panel-details {
  margin: 0;
}

.materials-panel-summary {
  cursor: pointer;
  min-height: 2.75rem;
  padding: 0.75rem 0.9rem;
  font-weight: var(--font-weight-semibold);
  list-style: none;
  color: var(--color-ink);
  display: flex;
  align-items: center;
}

.materials-panel-summary::-webkit-details-marker {
  display: none;
}

.materials-panel-body {
  padding: 0 0.9rem 0.9rem;
}

.materials-h {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-muted);
}

.materials-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.materials-list li {
  margin: 0.2rem 0;
  padding: 0;
}

aside.materials-panel button.materials-item,
aside.materials-panel a.materials-item {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.5rem;
  border: 0;
  border-radius: 0.25rem;
  box-shadow: none;
  background: transparent;
  background-color: transparent;
  color: var(--color-ink) !important;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

aside.materials-panel .materials-item .icon {
  flex: 0 0 auto;
}

aside.materials-panel .materials-item span {
  min-width: 0;
}

aside.materials-panel button.materials-item:hover,
aside.materials-panel a.materials-item:hover {
  background: rgba(51, 68, 239, 0.1);
  color: var(--pico-primary) !important;
}

.materials-item--pending {
  opacity: 1;
  border-style: dashed;
  color: var(--color-muted);
  pointer-events: none;
  cursor: default;
}

.materials-more {
  margin: 0.85rem 0 0;
  font-size: 0.85rem;
}

.link-dotted,
.materials-more a {
  color: var(--pico-primary);
  text-decoration: none;
  border-bottom: 1px dotted currentColor;
}

.link-dotted:hover,
.materials-more a:hover {
  border-bottom-style: solid;
}

@media (min-width: 1024px) {
  details.materials-panel-details:not([open]) > .materials-panel-body,
  details.materials-panel-details > .materials-panel-body {
    display: block !important;
  }
}

@media (max-width: 1023px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }

  .tool-main {
    order: 0;
    min-width: 0;
  }

  .materials-panel {
    position: static;
    order: 1;
    width: 100%;
    max-width: 100%;
  }
}

/* Glossary */
.glossary-term h1,
.glossary-card h3 {
  overflow-wrap: anywhere;
}

.glossary-term-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  margin: 0 0 1rem;
}

.glossary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.glossary-chips a {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid var(--color-faint);
  border-radius: var(--pico-border-radius);
  text-decoration: none;
}

.glossary-chips a:hover {
  border-color: var(--pico-primary);
}

.glossary-cta {
  margin: 1.75rem 0;
  padding: 1.15rem 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.glossary-cta h2 {
  margin-top: 0;
}

.glossary-cta .cta-row {
  margin-bottom: 0;
}

.glossary-search {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  margin: 1.25rem 0 1rem;
  padding: 0.85rem 1rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.glossary-search-label {
  display: block;
  width: 100%;
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.glossary-search input[type="search"] {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0;
  border-radius: 999px;
}

.glossary-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  width: 100%;
}

button.glossary-chip,
.glossary-chip {
  --pico-background-color: transparent;
  --pico-border-color: var(--color-faint);
  --pico-color: var(--color-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: static !important;
  width: auto !important;
  height: auto;
  min-width: 0;
  min-height: 2.1rem;
  margin: 0 !important;
  padding: 0.2rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.2;
  background: transparent;
  border: 1px solid var(--color-faint);
  border-radius: 999px;
  color: var(--color-ink);
  box-shadow: none;
  cursor: pointer;
}

button.glossary-chip.is-active,
button.glossary-chip[aria-pressed="true"],
.glossary-chip.is-active,
.glossary-chip[aria-pressed="true"] {
  --pico-background-color: var(--pico-primary);
  --pico-border-color: var(--pico-primary);
  --pico-color: var(--pico-primary-inverse);
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: var(--pico-primary-inverse);
}

.glossary-az {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.45rem;
  width: 100%;
  margin: 0.15rem 0 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--color-faint);
}

.glossary-az a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.65rem;
  min-height: 1.85rem;
  padding: 0 0.25rem;
  border: 1px solid var(--color-faint);
  border-radius: 0.4rem;
  background: var(--color-surface-elevated);
  color: var(--color-ink);
  text-align: center;
  text-decoration: none;
  font-weight: 600;
}

.glossary-az a:hover {
  border-color: #a5b4fc;
  color: var(--pico-primary);
  text-decoration: none;
}

.glossary-letter {
  grid-column: 1 / -1;
  margin: 1.25rem 0 0.35rem;
  font-size: 1.05rem;
  scroll-margin-top: var(--glossary-letter-scroll-margin, 12rem);
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
  gap: 0.75rem 1rem;
}

.glossary-card {
  min-width: 0;
  margin: 0;
  padding: 1.15rem 1.1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.glossary-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 8px 20px -12px rgba(17, 24, 39, 0.16);
}

.glossary-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.55rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, #3344ef, #1d2fd4);
  color: #fff;
}
.glossary-card-icon .icon,
.glossary-card-icon .icon svg {
  color: #fff;
  width: 1.25rem;
  height: 1.25rem;
}

.glossary-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.glossary-card-cat {
  margin: 0 0 0.4rem;
}

.glossary-card > p:last-of-type {
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
  overflow: hidden;
}

.glossary-empty {
  margin: 1rem 0;
}

.glossary-empty button {
  display: inline-flex;
  width: auto;
  margin: 0 0 0 0.35rem;
  min-height: 2.1rem;
  padding: 0.25rem 0.7rem;
}

@media (min-width: 1024px) {
  .glossary-search {
    position: sticky;
    /* Clear sticky .mast (measured via --site-header-offset, fallback mast-height) */
    top: calc(var(--site-header-offset, var(--mast-height)) + 0.5rem);
    z-index: 40;
    margin: 0 0 1rem;
    box-shadow: 0 10px 28px -18px rgba(17, 24, 39, 0.4);
  }
}

@media (max-width: 767px) {
  .glossary-cta .cta-row > a {
    flex: 1 1 100%;
  }

  .glossary-chip {
    min-height: 2.25rem;
  }
}

/* === regex tester === */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Play / mobile card load: clear sticky mast when scrolling to tester or preview */
#regex-app,
#regex-preview {
  scroll-margin-top: calc(var(--site-header-offset, 3.5rem) + 0.75rem);
}

.regex-layout {
  display: grid;
  gap: 1.25rem;
  margin: 1rem 0 1.75rem;
}

@media (min-width: 1024px) {
  .regex-layout {
    grid-template-columns: minmax(0, 1fr) minmax(17rem, 21rem);
    align-items: start;
    gap: 1.5rem;
  }

  .regex-aside {
    position: sticky;
    top: calc(var(--site-header-offset) + 0.5rem);
  }
}

.regex-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.regex-copy-link {
  flex: 0 0 auto;
  width: auto !important;
  min-height: 2.25rem;
  margin: 0;
  padding: 0.3rem 0.7rem;
  font-size: 0.88rem;
}

/* Segmented controls — one track, no stretched Pico buttons */
.regex-seg {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.2rem;
  margin: 0;
  padding: 0.25rem;
  background: var(--color-zebra);
  border: 1px solid var(--color-faint);
  border-radius: 0.65rem;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.regex-seg button,
.regex-engine button,
.regex-flags button,
.regex-tabs button {
  width: auto !important;
  flex: 0 0 auto;
  margin: 0 !important;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-ink);
  box-shadow: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.regex-seg button.secondary,
.regex-engine button.secondary,
.regex-flags button.secondary,
.regex-tabs button.secondary {
  background: transparent;
  border-color: transparent;
  color: var(--color-muted);
}

.regex-seg button:hover,
.regex-engine button:hover,
.regex-flags button:hover,
.regex-tabs button:hover {
  background: var(--color-surface-elevated);
  border-color: #a5b4fc;
  color: var(--color-ink);
}

.regex-engine button[aria-pressed="true"],
.regex-flags button[aria-pressed="true"],
.regex-tabs button[aria-selected="true"] {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #fff;
}

.regex-flags button {
  min-width: 1.9rem;
  padding: 0.25rem 0.4rem;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.regex-flags button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.regex-compose {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  margin: 0.35rem 0 0.65rem;
  padding: 0.55rem 0.75rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
}

.regex-pattern-row {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.regex-slash {
  color: var(--color-muted);
  font-size: 1.15rem;
  line-height: 1;
  flex: 0 0 auto;
}

.regex-pattern-label {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.regex-pattern-label input,
#regex-subject,
#regex-repl,
#regex-repl-out {
  font-size: 0.95rem;
}

.regex-pattern-label input {
  margin: 0;
  font-family: inherit;
  border-radius: 0.45rem;
}

.regex-compose .regex-flags {
  flex: 0 0 auto;
  align-self: center;
  max-width: none;
}

.regex-meta-line {
  margin: 0.15rem 0 0.35rem;
}

.regex-error {
  color: #8a1f11;
  margin: 0 0 0.65rem;
}

.regex-tabs {
  margin: 0 0 0.75rem;
  display: inline-flex;
}

.regex-field {
  margin-bottom: 0.65rem;
}

.regex-subject-panel {
  margin: 0 0 0.85rem;
  padding: 0.85rem 1rem 1rem;
  background: var(--pico-primary);
  border: 1px solid var(--pico-primary-border, var(--pico-primary));
  border-radius: 0.75rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset;
}

.regex-field--subject {
  display: block;
  margin: 0;
}

.regex-field--subject .regex-field-label {
  display: block;
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

.regex-field--subject #regex-subject {
  margin: 0;
  background: #fff;
  color: var(--color-ink);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.55rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.06);
}

.regex-field--subject #regex-subject:focus {
  border-color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 1px;
}

.regex-preview {
  min-height: 2.75rem;
  max-height: 10rem;
  overflow: auto;
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.8rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.65rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.regex-preview mark {
  padding: 0.05em 0.12em;
  border-radius: 0.15rem;
}

.regex-preview .regex-m0 { background: rgba(51, 68, 239, 0.22); }
.regex-preview .regex-m1 { background: rgba(180, 120, 20, 0.28); }
.regex-preview .regex-m2 { background: rgba(40, 90, 160, 0.22); }
.regex-preview .regex-m3 { background: rgba(130, 50, 120, 0.2); }

.regex-matches td {
  font-size: 0.88rem;
  vertical-align: top;
}

.regex-explain-block {
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-faint);
}

.regex-explain-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
}

.regex-explain {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.regex-token {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.3rem;
  max-width: 100%;
  padding: 0.2rem 0.4rem 0.2rem 0.25rem;
  background: var(--color-zebra);
  border: 1px solid var(--color-faint);
  border-radius: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.25;
  color: var(--color-muted);
}

.regex-token code {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.12rem 0.35rem;
  font-size: 0.78rem;
  line-height: 1.2;
  color: #fff;
  background: #1f2937;
  border-radius: 0.3rem;
}

.regex-cheat {
  margin: 0;
  padding: 1rem 1rem 0.85rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 1rem;
}

.regex-cheat h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.regex-cheat-h {
  margin: 0.85rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.regex-cheat-h:first-of-type {
  margin-top: 0;
}

.regex-cheatsheet {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
}

.regex-cheatsheet td {
  padding: 0.4rem 0.25rem;
  font-size: 0.82rem;
  line-height: 1.35;
  vertical-align: top;
  border-bottom: 1px solid var(--color-faint);
}

.regex-cheatsheet tr:last-child td {
  border-bottom: 0;
}

.regex-cheatsheet td:first-child {
  width: 42%;
  padding-right: 0.5rem;
  white-space: nowrap;
}

.regex-cheatsheet code {
  display: inline-block;
  margin: 0 0.1rem 0.1rem 0;
  padding: 0.1rem 0.35rem;
  font-size: 0.78rem;
  color: #fff;
  background: #1f2937;
  border-radius: 0.3rem;
}

.regex-cheat #regex-cheat-note {
  margin: 0.65rem 0 0;
}

@media (max-width: 767px) {
  .regex-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .regex-engine {
    display: flex;
    width: 100%;
  }

  .regex-engine button {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.35rem 0.4rem;
    font-size: 0.8rem;
    text-align: center;
  }

  .regex-copy-link {
    width: 100% !important;
    justify-content: center;
  }

  .regex-tabs {
    display: flex;
    width: 100%;
  }

  .regex-tabs button {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .regex-main,
  .regex-toolbar,
  .regex-compose {
    max-width: 100%;
    min-width: 0;
  }

  .regex-compose {
    flex-wrap: wrap;
  }

  .regex-compose .regex-flags {
    flex: 1 1 auto;
    justify-content: flex-start;
  }

  .regex-field--subject #regex-subject {
    min-height: 7rem;
  }
}

/* Regex library — full-bleed mint zebra band */
.regex-lib {
  width: 100vw;
  max-width: 100vw;
  margin: 1.75rem 0 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 2.25rem max(var(--pico-spacing, 1rem), calc(50vw - 50%));
  background: var(--color-zebra-mint);
  border-block: 1px solid var(--color-zebra-mint-border);
  box-sizing: border-box;
  overflow-x: clip;
}

.regex-lib > h2:first-child {
  margin-top: 0;
}

.regex-lib-lede {
  max-width: 48rem;
}

.regex-lib-filters {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 1.25rem 0 0.75rem;
  padding: 0.85rem 1rem 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}

.regex-lib-search-label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin: 0;
}

.regex-lib-filters input[type="search"] {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0;
}

.regex-lib-empty {
  margin: 0.75rem 0;
}

.regex-lib-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
  margin-top: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

@media (min-width: 768px) {
  .regex-lib-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .regex-lib-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.regex-lib-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
  background: var(--color-surface-elevated);
  cursor: pointer;
  min-height: 2.25rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.regex-lib-card:hover,
.regex-lib-card:focus-visible {
  border-color: var(--pico-primary);
  outline: none;
}

.regex-lib-card.is-active {
  border-color: var(--pico-primary);
  box-shadow: inset 0 0 0 1px var(--pico-primary);
}

.regex-lib-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  min-width: 0;
}

.regex-lib-card-title {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.regex-lib-card-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.3rem;
}

.regex-lib-card-actions .regex-lib-copy,
.regex-lib-card-actions .regex-lib-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  min-height: 2.25rem;
  margin: 0;
  padding: 0;
  border-radius: 0.5rem;
  border: 1px solid var(--color-faint);
  background: var(--color-surface-elevated);
  color: var(--color-muted);
  box-shadow: none;
}
.regex-lib-card-actions .regex-lib-copy:hover,
.regex-lib-card-actions .regex-lib-play:hover {
  border-color: #a5b4fc;
  color: var(--pico-primary);
  background: var(--color-tint-brand);
}
.regex-lib-card-actions .regex-lib-copy:focus-visible,
.regex-lib-card-actions .regex-lib-play:focus-visible {
  border-color: var(--pico-primary);
  color: var(--pico-primary);
}
.regex-lib-card-actions .regex-lib-copy .icon,
.regex-lib-card-actions .regex-lib-play .icon,
.regex-lib-card-actions .regex-lib-copy .icon svg,
.regex-lib-card-actions .regex-lib-play .icon svg {
  color: inherit;
  width: 1.1rem;
  height: 1.1rem;
}

.regex-lib-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  font-size: 0.82rem;
}

.regex-lib-cat {
  color: var(--pico-muted-color, inherit);
}

.regex-lib-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--color-faint);
  font-size: 0.75rem;
  line-height: 1.2;
}

.regex-lib-badge--medium {
  border-color: rgba(180, 120, 20, 0.45);
  background: rgba(180, 120, 20, 0.12);
}

.regex-lib-badge--low {
  border-color: rgba(160, 50, 50, 0.4);
  background: rgba(160, 50, 50, 0.1);
}

.regex-lib-engine-tip {
  color: var(--pico-muted-color, inherit);
  font-size: 0.75rem;
}

.regex-lib-desc {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.regex-lib-pattern {
  display: block;
  margin: 0.15rem 0 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--color-ink);
  background: color-mix(in srgb, var(--color-ink) 7%, var(--color-surface-elevated));
  border-radius: 0.35rem;
}

.regex-lib-example {
  margin: 0.15rem 0 0;
  overflow-wrap: anywhere;
}



/* === Deep body components (brand blue axis) === */
/*
  Full-bleed background to the viewport edge.
  Inner pad via 50vw - 50% tracks parent .container (same rail as mast/sole).
*/
.page-band {
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 2.25rem max(var(--pico-spacing, 1rem), calc(50vw - 50%));
  border-block: 1px solid var(--color-faint);
  box-sizing: border-box;
}
.page-band--soft { background: var(--color-zebra); }
.page-band--mint { background: var(--color-zebra-mint); border-color: var(--color-zebra-mint-border); }
.page-band--tint { background: var(--color-tint-brand); border-color: #c7d2fe; }
/* Flush adjacent zebra bands — no white gutters */
.page-band + .page-band {
  border-top: 0;
  margin-top: 0;
}
main.container > .page-band {
  margin-top: 0;
  margin-bottom: 0;
}
main.container:has(> .page-band:last-child) ~ .sole {
  margin-top: 0;
}
.page-band .home-section-head,
.page-band > h2:first-child { margin-top: 0; }
.stub-eyebrow {
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16.5rem), 1fr));
  gap: 1.5rem;
  margin: 1.25rem 0;
  align-items: stretch;
}
.feature-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 1.35rem 1.25rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 1rem;
  color: var(--color-ink);
  text-decoration: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
a.feature-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 16px 32px -18px rgba(17, 24, 39, 0.22);
  transform: translateY(-2px);
  color: var(--color-ink);
  text-decoration: none;
}
.feature-card--a { background: linear-gradient(180deg, #eef0ff, #fff); border-color: #c7d2fe; }
.feature-card--b { background: linear-gradient(180deg, #eff6ff, #fff); border-color: #bfdbfe; }
.feature-card--c { background: linear-gradient(180deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.feature-card--d { background: linear-gradient(180deg, #f5f3ff, #fff); border-color: #ddd6fe; }
.feature-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.35rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #374151;
}
.feature-card-icon .icon,
.feature-card-icon .icon svg {
  color: inherit;
  width: 1.35rem;
  height: 1.35rem;
}
.feature-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-ink);
}
.feature-card-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pico-muted-color, #6b7280);
  flex: 1 1 auto;
}
.feature-card .dl-links {
  margin: 0.25rem 0 0;
}
.feature-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pico-primary);
}
.feature-card-cta .icon,
.feature-card-cta .icon svg {
  width: 1rem;
  height: 1rem;
}
.feature-card.is-stub { opacity: 0.92; border-style: dashed; }

.channel-grid {
  display: grid;
  /* 7 home cards + longer blurbs: fixed 5-col crushed text on tablet/desktop */
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
  gap: 0.85rem;
  margin: 1.25rem 0;
  align-items: stretch;
}
.channel-grid > .method-card {
  height: 100%;
  min-height: 100%;
  min-width: 0;
  padding: 1rem 0.85rem 0.9rem;
  gap: 0.3rem;
}
.channel-grid .method-card-icon {
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.15rem;
}
.channel-grid .method-card-title {
  font-size: 0.98rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.channel-grid .method-card-text {
  font-size: 0.8rem;
  line-height: 1.4;
}
.channel-grid .method-card-cta {
  font-size: 0.82rem;
  padding-top: 0.4rem;
}
.channel-card {
  margin: 0;
  padding: 1.5rem 1.35rem;
  border-radius: 1rem;
  border: 1px solid transparent;
}
.channel-card--a { background: linear-gradient(180deg, #eef0ff, #fff); border-color: #c7d2fe; }
.channel-card--b { background: linear-gradient(180deg, #eff6ff, #fff); border-color: #bfdbfe; }
.channel-card--c { background: linear-gradient(180deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.channel-card--d { background: linear-gradient(180deg, #f5f3ff, #fff); border-color: #ddd6fe; }
.channel-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.65rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #374151;
}
.channel-card-title { margin: 0 0 0.35rem; font-size: 1.15rem; font-weight: 700; }
.channel-card-text { margin: 0 0 0.85rem; font-size: 0.92rem; line-height: 1.45; }

.faq { width: 100%; max-width: none; margin: 0; }
.faq-heading { margin: 0 0 1.25rem; text-align: left; }
.faq-item {
  margin: 0 0 1rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
  overflow: hidden;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item[open] { border-color: #a5b4fc; box-shadow: 0 8px 20px -14px rgba(51, 68, 239, 0.35); }
.faq-item[open] > summary.faq-q { margin-bottom: 0; }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 1rem 1.15rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-ink);
  line-height: 1.35;
}
.faq-q > span:first-child { flex: 1 1 auto; min-width: 0; text-align: left; }
/* Kill Pico accordion caret (::after chevron) — we use .faq-chevron */
.faq-q::-webkit-details-marker,
.faq-q::marker {
  display: none;
  content: none;
}
.faq-q::-moz-list-bullet { list-style-type: none; }
.faq-item > summary.faq-q::after,
.faq-q::after {
  display: none !important;
  content: none !important;
  float: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
}
.faq-chevron { flex: 0 0 auto; color: #9ca3af; transition: transform 0.15s, color 0.15s; }
.faq-item[open] .faq-chevron { transform: rotate(180deg); color: var(--pico-primary); }
.faq-a { padding: 0 1.15rem 1.15rem; color: var(--color-muted); font-size: 0.98rem; line-height: 1.55; }
.faq-a > :first-child { margin-top: 0; }
.faq-a > :last-child { margin-bottom: 0; }

.compare-panel {
  margin: 1rem 0 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 1rem;
  box-shadow: 0 16px 28px -18px rgba(17, 24, 39, 0.18);
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}
.compare-panel > .table-wrap,
.compare-panel .table-wrap {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  /* Keep wide matrices scrollable on phones */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.compare-table { width: 100%; margin: 0; }
.compare-panel > table,
.compare-panel table {
  margin: 0;
  width: 100%;
  min-width: 28rem;
  border-collapse: collapse;
}
@media (max-width: 480px) {
  .compare-panel > table,
  .compare-panel table {
    min-width: 0;
  }
  .compare-panel thead th,
  .compare-table thead th {
    white-space: normal;
  }
}
.compare-panel thead th,
.compare-table thead th {
  background: linear-gradient(90deg, #3344ef, #1d2fd4);
  color: #fff;
  font-weight: 600;
  border: 0;
  padding: 0.75rem 1rem;
  white-space: nowrap;
}
.compare-panel tbody tr:nth-child(even) { background: var(--color-zebra); }
.compare-panel tbody tr:hover { background: #e5e7eb; }
.compare-panel th[scope="row"] {
  font-weight: 600;
  width: 28%;
  min-width: 6.5rem;
  background: var(--color-zebra);
  vertical-align: top;
}
.compare-table--actions th[scope="row"] {
  width: 22%;
}
.compare-panel td.compare-action {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}
.compare-panel td.compare-action .btn-icon,
.compare-panel td.compare-action button {
  margin: 0;
  width: auto;
}
@media (max-width: 767px) {
  .compare-panel td.compare-action .compare-copy-label {
    display: none;
  }
  .compare-panel td.compare-action .compare-copy {
    padding-inline: 0.55rem;
  }
}
.compare-panel td, .compare-panel th {
  padding: 0.7rem 1rem;
  border-color: var(--color-faint);
  font-size: 0.95rem;
  line-height: 1.4;
}
@media (max-width: 767px) {
  .compare-panel td,
  .compare-panel th {
    padding: 0.55rem 0.7rem;
    font-size: 0.88rem;
  }
  .cta-stub .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .cta-stub .cta-row > a,
  .cta-stub .cta-row > button {
    flex: 1 1 auto;
    width: 100%;
  }
  .page-band .cta-row {
    flex-wrap: wrap;
  }
  .page-band .cta-row > a,
  .page-band .cta-row > button {
    flex: 1 1 calc(50% - 0.5rem);
    text-align: center;
  }
}

.email-mailbox-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.email-mailbox-row code {
  margin: 0;
  overflow-wrap: anywhere;
}
.email-mailbox-row .btn-icon,
.email-mailbox-row button {
  margin: 0;
  width: auto;
  flex: 0 0 auto;
}

.mode-switch {
  margin: 0 0 1rem;
  padding: 0.45rem;
  background: var(--color-zebra);
  border: 1px solid var(--color-faint);
  border-radius: 999px;
  border-bottom: 1px solid var(--color-faint);
}
.mode-switch ul { gap: 0.35rem; }
.mode-switch a {
  min-height: 2.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
  font-weight: 600;
}
.mode-switch a:hover {
  background: var(--color-surface-elevated);
  border-color: #a5b4fc;
  color: var(--color-ink);
}
.mode-switch a[aria-current="page"] {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #fff;
  font-weight: 700;
}

/* Method cards: Онлайн-форма / HTML5 / jQuery on POST tools */
.method-switch {
  display: block;
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
  overflow: visible;
}
.method-switch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.method-switch-grid > li {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 100%;
}
.method-switch-grid > li::before,
.method-switch-grid > li::after {
  content: none !important;
  display: none !important;
}
.method-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 1.25rem 1.15rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid transparent;
  text-decoration: none;
  color: var(--color-ink);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.method-card--a { background: linear-gradient(180deg, #eef0ff, #fff); border-color: #c7d2fe; }
.method-card--b { background: linear-gradient(180deg, #eff6ff, #fff); border-color: #bfdbfe; }
.method-card--c { background: linear-gradient(180deg, #ecfdf5, #fff); border-color: #a7f3d0; }
.method-card--d { background: linear-gradient(180deg, #f5f3ff, #fff); border-color: #ddd6fe; }
.method-card:hover {
  border-color: #a5b4fc;
  box-shadow: 0 16px 32px -18px rgba(17, 24, 39, 0.22);
  transform: translateY(-2px);
  color: var(--color-ink);
  text-decoration: none;
}
.method-card.is-active,
.method-card[aria-current="page"] {
  border-color: var(--pico-primary);
  box-shadow: inset 0 0 0 1px var(--pico-primary), 0 12px 28px -16px rgba(51, 68, 239, 0.35);
}
.method-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.35rem;
  border-radius: 0.65rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(17, 24, 39, 0.08);
  color: #374151;
}
.method-card-icon .icon,
.method-card-icon .icon svg {
  width: 1.35rem;
  height: 1.35rem;
}
.method-card-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}
.method-card-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--pico-muted-color, #6b7280);
  flex: 1 1 auto;
}
.method-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.55rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--pico-primary);
}
.method-card.is-active .method-card-cta,
.method-card[aria-current="page"] .method-card-cta {
  color: var(--pico-primary);
}
.method-card-cta .icon,
.method-card-cta .icon svg {
  width: 1rem;
  height: 1rem;
}
@media (max-width: 900px) {
  .method-switch-grid {
    grid-template-columns: 1fr;
  }
}
.section-subnav {
  background: var(--color-zebra);
  border-radius: var(--pico-border-radius);
}
.section-subnav a[aria-current="page"] {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #fff;
}

.cta-stub { text-align: center; max-width: 40rem; margin: 0 auto; }
.cta-stub-title { margin: 0 0 0.5rem; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.75rem); }
.cta-stub-text { margin: 0 0 1rem; }
.cta-stub .cta-row { justify-content: center; }

.steps {
  margin: 0.75rem 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.steps > li {
  position: relative;
  counter-increment: step;
  margin: 0 0 0.75rem;
  padding: 0.85rem 1rem 0.85rem 3.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: var(--radius-card);
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 0.85rem;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #3344ef, #1d2fd4);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
}

.steps--compact {
  margin: 0.65rem 0 0;
}
.steps--compact > li {
  margin: 0 0 0.4rem;
  padding: 0.45rem 0.65rem 0.45rem 2.5rem;
  font-size: 0.9rem;
  line-height: 1.4;
}
.steps--compact > li:last-child { margin-bottom: 0; }
.steps--compact > li::before {
  left: 0.55rem;
  top: 0.45rem;
  width: 1.4rem;
  height: 1.4rem;
  font-size: 0.75rem;
}

/* Clipboard paste targets */
.clip-paste-block {
  margin: 0 0 1.5rem;
}
.clip-paste-block > h2 {
  margin: 0 0 0.35rem;
  font-size: var(--text-h3);
}
.clip-paste-label {
  display: block;
  margin: 0.5rem 0 0.65rem;
}
.clip-paste-label textarea,
#clip-paste-text {
  margin: 0;
  min-height: 14rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.45;
}
.clip-file-drop {
  margin: 0.5rem 0 0.65rem;
  min-height: 12rem;
  padding: 0.75rem 1rem;
  border: 2px dashed var(--color-faint);
  border-radius: var(--radius-card);
  background: var(--color-surface-elevated);
  text-align: left;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.clip-paste-block > .test-result-host {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  margin-top: 0.75rem;
}

.clip-file-drop:focus-visible,
.clip-file-drop.is-drag {
  border-color: var(--pico-primary);
  background: var(--color-tint-brand);
}
.clip-file-drop.has-files {
  border-style: solid;
  border-color: #a5b4fc;
  text-align: left;
}
.clip-file-drop-hint {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}
.clip-file-drop.has-files .clip-file-drop-hint {
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
}
.clip-file-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.clip-file-list li {
  margin: 0 0 0.35rem;
  padding: 0.45rem 0.65rem;
  background: #fff;
  border: 1px solid var(--color-faint);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.clip-file-list li:last-child { margin-bottom: 0; }

/* FTP: FileZilla help collapsed — XML download lives inside */
.ftp-filezilla {
  margin: 0 0 1.25rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
  overflow: hidden;
}
.ftp-filezilla[open] { border-color: #a5b4fc; }
.ftp-filezilla-q {
  display: flex;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.65rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--color-ink);
}
.ftp-filezilla-q::-webkit-details-marker,
.ftp-filezilla-q::marker { display: none; content: none; }
.ftp-filezilla > summary.ftp-filezilla-q::after { display: none !important; content: none !important; }
.ftp-filezilla-q .faq-chevron { margin-left: auto; color: #9ca3af; transition: transform 0.15s, color 0.15s; }
.ftp-filezilla[open] .faq-chevron { transform: rotate(180deg); color: var(--pico-primary); }
.ftp-filezilla-a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0 1rem 0.9rem;
  border-top: 1px solid var(--color-faint);
}
.ftp-filezilla-a > .btn-icon,
.ftp-filezilla-a > a[role="button"],
.ftp-filezilla-a > a.outline {
  margin: 0.65rem 0 0;
  width: auto;
}

.results-panel--static { padding-top: 1rem; }
.chip-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}
.chip-strip button[aria-pressed="true"] {
  background: var(--pico-primary);
  border-color: var(--pico-primary);
  color: #fff;
}

/* Preset chips: same idle look — only aria-pressed / .is-active is primary */
.gen-presets {
  margin: 0 0 0.5rem;
}
.gen-presets button {
  --pico-background-color: var(--color-surface-elevated);
  --pico-border-color: var(--color-faint);
  --pico-color: var(--color-ink);
  width: auto;
  margin: 0;
  min-height: 2.15rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 600;
  background: var(--color-surface-elevated) !important;
  border: 1px solid var(--color-faint) !important;
  border-radius: 999px;
  color: var(--color-ink) !important;
  box-shadow: none;
}
.gen-presets button:hover {
  border-color: #a5b4fc !important;
  color: var(--color-ink) !important;
}
.gen-presets button[aria-pressed="true"],
.gen-presets button.is-active {
  --pico-background-color: var(--pico-primary);
  --pico-border-color: var(--pico-primary);
  --pico-color: #fff;
  background: var(--pico-primary) !important;
  border-color: var(--pico-primary) !important;
  color: #fff !important;
}

/* === MCP page structure === */
/* Reset Pico article-as-card chrome so bands share the main content rail */
.mcp-page {
  margin: 0 0 1rem;
  padding: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.mcp-hero { margin: 0 0 1.25rem; }
.mcp-hero > :last-child { margin-bottom: 0; }
.mcp-hero .lede {
  margin: 0 0 0.75rem;
  max-width: none;
  font-size: var(--text-lede);
  color: var(--color-ink);
}
.mcp-endpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem 0.85rem;
  margin: 1.1rem 0 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--color-tint-brand);
  border: 1px solid #a5b4fc;
  border-radius: 0.75rem;
}
.mcp-endpoint-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--pico-primary);
  white-space: nowrap;
}
.mcp-endpoint-url {
  margin: 0;
  padding: 0.4rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
  /* Override Pico dark-terminal --pico-code-* (pale on light) */
  color: var(--color-ink) !important;
  background: #fff !important;
  border: 1px solid var(--color-faint);
  border-radius: 0.4rem;
}
.mcp-endpoint [role="button"] {
  margin: 0;
  width: auto;
  white-space: nowrap;
}
.mcp-endpoint-note { margin: 0.45rem 0 0; }
.mcp-section { scroll-margin-top: calc(var(--site-header-offset, 3.25rem) + 0.75rem); }
.mcp-section .home-section-head { margin-bottom: 1rem; }
/* Double vertical rhythm after Подключение band */
#mcp-curl { margin-top: 3rem; }

/* Full content rail — same width as Tools/FAQ, not a floating half-column */
.mcp-clients {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  width: 100%;
  max-width: none;
}
.mcp-client {
  margin: 0;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
  overflow: hidden;
}
.mcp-client[open] { border-color: #a5b4fc; }
.mcp-client-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.85rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--color-ink);
}
.mcp-client-q::-webkit-details-marker,
.mcp-client-q::marker { display: none; content: none; }
.mcp-client > summary.mcp-client-q::after { display: none !important; content: none !important; }
.mcp-client[open] > summary.mcp-client-q { margin-bottom: 0; }
.mcp-client[open] .faq-chevron { transform: rotate(180deg); color: var(--pico-primary); }
.mcp-client-a { padding: 0 1rem 1rem; }
.mcp-client-a > :first-child { margin-top: 0; }
.mcp-client-a .code-block { margin-top: 0.5rem; }

.mcp-curl-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mcp-curl-step {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mcp-curl-step-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 0.5rem;
}
.mcp-curl-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--pico-primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.mcp-curl-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}
.mcp-curl-title code {
  color: var(--color-ink) !important;
  background: var(--color-zebra) !important;
  font-size: 0.95em;
}
.mcp-curl-hint {
  margin: 0;
  padding-left: 0.65rem;
  border-left: 2px solid var(--color-faint);
}

.mcp-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.85rem;
}
.mcp-tool-card {
  margin: 0;
  padding: 1rem 1.05rem;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.75rem;
}
.mcp-tool-name {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.mcp-tool-name code {
  color: var(--color-ink) !important;
  background: transparent !important;
  padding: 0;
}
.mcp-tool-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.mcp-watch-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
  width: 100%;
  max-width: none;
}
.mcp-watch-list li {
  position: relative;
  margin: 0;
  padding: 0.7rem 0.95rem 0.7rem 1.9rem;
  list-style: none;
  background: var(--color-surface-elevated);
  border: 1px solid var(--color-faint);
  border-radius: 0.65rem;
  font-size: 0.95rem;
  line-height: 1.45;
}
.mcp-watch-list li::marker {
  content: none;
  font-size: 0;
}
.mcp-watch-list li::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 1.05rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--pico-primary);
  box-shadow: none;
}

/* Inline code on MCP: light chips, not dark-terminal pills (those looked like 2nd bullets) */
.mcp-page p code,
.mcp-page li code,
.mcp-page .mcp-client-a code,
.mcp-page .faq-a code {
  color: var(--color-ink) !important;
  background: var(--color-zebra) !important;
  border: 1px solid var(--color-faint);
  border-radius: 0.35rem;
  padding: 0.05em 0.35em;
  font-size: 0.9em;
  font-weight: 600;
}

@media (max-width: 719px) {
  .mcp-endpoint {
    grid-template-columns: 1fr;
  }
  .mcp-endpoint [role="button"] {
    width: 100%;
    justify-content: center;
  }
}

.regex-lib-card {
  border-radius: 1rem;
  padding: 1.15rem 1.1rem;
}

.doc-card { border-radius: 1rem; }
.home-section--band {
  /* alias → page-band soft until markup migrated */
  background: var(--color-zebra);
}

@media (max-width: 1099px) and (min-width: 768px) {
  .channel-grid {
    gap: 0.75rem;
  }
  .channel-grid > .method-card {
    padding: 1rem 0.9rem 0.9rem;
  }
  .channel-grid .method-card-title {
    font-size: 0.98rem;
  }
  .channel-grid .method-card-text {
    font-size: 0.82rem;
    line-height: 1.45;
  }
}

@media (max-width: 767px) {
  .page-band { padding-block: 1.75rem; }
  .feature-grid { grid-template-columns: 1fr; gap: 1rem; }
  .channel-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }
  .channel-grid > .method-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    column-gap: 0.75rem;
    row-gap: 0.2rem;
    align-items: start;
    padding: 0.7rem 0.85rem;
    min-height: 0;
  }
  .channel-grid .method-card-icon {
    grid-row: 1 / span 3;
    align-self: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
  }
  .channel-grid .method-card-title {
    grid-column: 2;
    font-size: 0.95rem;
    margin: 0;
  }
  .channel-grid .method-card-text {
    grid-column: 2;
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
  }
  .channel-grid .method-card-cta {
    grid-column: 2;
    margin-top: 0.15rem;
    padding-top: 0;
    font-size: 0.82rem;
  }
  .mode-switch { border-radius: var(--pico-border-radius); }
  .mode-switch ul { flex-wrap: wrap; }
  .faq-q { font-size: 1rem; }
}

/* === Locale font stacks (system CJK/Arabic; Inter for Latin) === */
html[data-locale="zh"] {
  --pico-font-family: "Inter", var(--font-cjk-sc);
}
html[data-locale="ja"] {
  --pico-font-family: "Inter", var(--font-cjk-jp);
}
html[data-locale="ar"] {
  --pico-font-family: "Inter", var(--font-arabic);
}

/* === RTL (Arabic) === */
html[dir="rtl"] .mast__rail {
  flex-direction: row;
}
html[dir="rtl"] .mast__nav {
  justify-content: flex-end;
}
html[dir="rtl"] .mast__lang-panel {
  inset-inline-end: 0;
  inset-inline-start: auto;
}
html[dir="rtl"] .breadcrumbs ol {
  padding-inline-start: 0;
}
html[dir="rtl"] pre,
html[dir="rtl"] code,
html[dir="rtl"] .code-block,
html[dir="rtl"] [data-lang],
html[dir="rtl"] .results-table,
html[dir="rtl"] input[type="url"],
html[dir="rtl"] input[type="email"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}

@media (max-width: 640px) {
  .mast__lang-name {
    display: none;
  }
}
