/* ==========================================================================
   Portal — portal.css
   The public site on mailtender.net (spec 2026-10-25-004 §6): home, product
   pages, pricing, legal pages and the blog. Standalone: it does not load
   core.css, but its tokens copy core.css values and names so the portal and
   the panels stay one brand. Fonts come from assets/vendor/fonts (Geist,
   Geist Mono), linked by each page.

   Sections
   01. Design tokens (light / dark)
   02. Base & typography
   03. Layout: container, sections, section headings
   04. Buttons, badges, chips, icons
   05. Header, navigation, mobile menu, theme toggle
   06. Hero, page hero
   07. Send gate demo (home hero)
   08. Pillars, feature grid, feature rows
   09. Flow (how a reply travels)
   10. Modes
   11. Checklist (safety baseline)
   12. Split blocks, mailbox mock, client list, steps
   13. Code block
   14. Pricing: notice, period switch, plan cards, compare table, empty
   15. FAQ
   16. Call-to-action band
   17. Footer
   18. Legal pages, prose
   19. Blog: hero, toolbar, tag filter, search, cards, pagination, empty
   20. Blog post: header, table of contents, body, callout, figure, related
   21. Utilities, motion
   22. Responsive
   ========================================================================== */

/* 01. Design tokens ------------------------------------------------------ */
:root,
[data-theme="light"] {
  color-scheme: light;

  --color-bg: #ffffff;
  --color-bg-subtle: #f7f8fa;
  --color-surface: #ffffff;
  --color-surface-muted: #f2f4f7;
  --color-surface-hover: #eef0f4;
  --color-border: #e3e6eb;
  --color-border-strong: #cfd4dc;
  --color-text: #111827;
  --color-text-muted: #4b5466;
  --color-text-subtle: #5f6878;

  --color-primary: #3550dc;
  --color-primary-hover: #2a43c4;
  --color-primary-soft: #ebeefd;
  --color-primary-text: #2b44c2;
  --color-on-primary: #ffffff;

  --color-accent: #e9a23b;
  --color-accent-soft: #fdf1dc;
  --color-accent-text: #8a4f05;

  --color-success: #127a4b;
  --color-success-soft: #e5f4ec;
  --color-warning: #9a5806;
  --color-warning-soft: #fdf1dc;
  --color-danger: #c0352b;
  --color-danger-soft: #fbe8e6;
  --color-info: #0b6aa2;
  --color-info-soft: #e3f1fa;

  /* Code samples stay dark in both themes. */
  --color-code-bg: #0f1219;
  --color-code-bar: #161a23;
  --color-code-border: #0f1219;
  --color-code-text: #e3e6ee;

  /* The call-to-action band. */
  --color-band-bg: #1c2a8f;
  --color-band-border: #1c2a8f;

  --color-header-bg: rgba(255, 255, 255, 0.86);
  --color-grid-line: rgba(17, 24, 39, 0.055);

  --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.06);
  --shadow-md: 0 6px 20px rgba(17, 24, 39, 0.07);
  --shadow-lg: 0 24px 60px -12px rgba(17, 24, 39, 0.18), 0 2px 6px rgba(17, 24, 39, 0.05);
  --focus-ring: 0 0 0 3px rgba(53, 80, 220, 0.28);
}

[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #0c0e13;
  --color-bg-subtle: #10131a;
  --color-surface: #14171e;
  --color-surface-muted: #1a1e27;
  --color-surface-hover: #1f2430;
  --color-border: #252a35;
  --color-border-strong: #343a48;
  --color-text: #e7e9ee;
  --color-text-muted: #a7aebd;
  --color-text-subtle: #939bad;

  --color-primary: #4a64e6;
  --color-primary-hover: #3d57de;
  --color-primary-soft: #1d2445;
  --color-primary-text: #a9b8ff;
  --color-on-primary: #ffffff;

  --color-accent: #e9a23b;
  --color-accent-soft: #2e2312;
  --color-accent-text: #f3c37a;

  --color-success: #4cc38a;
  --color-success-soft: #12291f;
  --color-warning: #e9a23b;
  --color-warning-soft: #2e2312;
  --color-danger: #f07167;
  --color-danger-soft: #33191a;
  --color-info: #5bb5ec;
  --color-info-soft: #112634;

  --color-code-bg: #0a0c11;
  --color-code-bar: #11141b;
  --color-code-border: #252a35;
  --color-code-text: #e3e6ee;

  --color-band-bg: #151b3d;
  --color-band-border: #2a3570;

  --color-header-bg: rgba(12, 14, 19, 0.82);
  --color-grid-line: rgba(231, 233, 238, 0.045);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, 0.7), 0 2px 6px rgba(0, 0, 0, 0.3);
  --focus-ring: 0 0 0 3px rgba(112, 136, 255, 0.4);
}

:root {
  --font-sans: "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 999px;

  --container: 1200px;
  --container-narrow: 760px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-height: 64px;
  --section-space: clamp(72px, 9vw, 120px);

  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
}

/* 02. Base & typography -------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body,
.portal {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--color-text);
}

p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

ul[class],
ol[class],
nav ul,
nav ol {
  padding: 0;
  list-style: none;
}

a {
  color: var(--color-primary-text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

img,
svg {
  display: block;
  max-width: 100%;
}

/* Width and height attributes reserve the space; the image keeps its ratio when it shrinks. */
img {
  height: auto;
}

code,
kbd,
.mono {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--color-primary-soft);
  color: var(--color-text);
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform var(--transition-fast);
}

.skip-link:focus {
  transform: translateY(0);
  text-decoration: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.display {
  font-size: clamp(2.375rem, 1.6rem + 2.4vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.038em;
  font-weight: 600;
  text-wrap: balance;
}

.h1 {
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem);
  line-height: 1.07;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(1.875rem, 1.45rem + 1.7vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

.h3 {
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
}

.h4 {
  font-size: 1.0625rem;
  line-height: 1.35;
}

.lead {
  max-width: 62ch;
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-text-muted);
  text-wrap: pretty;
}

/* A link inside running text is underlined, not told apart by colour alone (WCAG 1.4.1). */
.lead a:not(.btn),
.faq-answer a,
.legal-meta a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.text-muted {
  color: var(--color-text-muted);
}

.text-small {
  font-size: 0.875rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--color-accent);
}

/* 03. Layout ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container-narrow {
  max-width: calc(var(--container-narrow) + 2 * var(--gutter));
}

.section {
  padding-block: var(--section-space);
}

.section-tight {
  padding-block: calc(var(--section-space) * 0.6);
}

.section-subtle {
  background: var(--color-bg-subtle);
  border-block: 1px solid var(--color-border);
}

.section + .section:not(.section-subtle) {
  border-top: 1px solid var(--color-border);
}

.section-subtle + .section {
  border-top: 0;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head-center {
  align-items: center;
  margin-inline: auto;
  text-align: center;
}

.section-head-center .lead {
  margin-inline: auto;
}

.section-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-head-row .section-head {
  margin-bottom: 0;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }

/* 04. Buttons, badges, chips, icons -------------------------------------- */
.icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }
.icon-lg { width: 24px; height: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 1rem;
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.875rem;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.12) inset, 0 1px 2px rgba(17, 24, 39, 0.18);
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  color: var(--color-on-primary);
}

.btn-secondary {
  background: var(--color-surface);
  border-color: var(--color-border-strong);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-surface-hover);
  color: var(--color-text);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
}

.btn-ghost:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

/* On the call-to-action band. */
.btn-light {
  background: #ffffff;
  color: #111827;
}

.btn-light:hover {
  background: #eef0f6;
  color: #111827;
}

.btn-outline-light {
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.btn-outline-light:hover {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.btn-block {
  width: 100%;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: var(--color-primary-text);
}

.link-arrow .icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}

.link-arrow:hover .icon {
  transform: translateX(2px);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.icon-btn:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
}

.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.badge-primary { background: var(--color-primary-soft); color: var(--color-primary-text); }
.badge-accent { background: var(--color-accent-soft); color: var(--color-accent-text); }
.badge-success { background: var(--color-success-soft); color: var(--color-success); }
.badge-danger { background: var(--color-danger-soft); color: var(--color-danger); }
.badge-outline { background: transparent; border: 1px solid var(--color-border-strong); }

.badge-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.chip-mono {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface-muted);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.icon-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
}

.icon-tile-accent {
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
}

/* 05. Header, navigation, mobile menu, theme toggle ---------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-border);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  border-radius: 6px;
}

.brand img {
  width: auto;
  height: 28px;
}

.brand:hover {
  text-decoration: none;
}

/* The wordmark has a dark and a light version; the theme picks one. */
.logo-for-dark { display: none !important; }
[data-theme="dark"] .logo-for-light { display: none !important; }
[data-theme="dark"] .logo-for-dark { display: block !important; }

.site-nav {
  flex: 1;
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 450;
  color: var(--color-text-muted);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  color: var(--color-text);
  font-weight: 550;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Theme toggle: needs JavaScript, hidden without it. */
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
html:not(.js) .theme-toggle { display: none; }

/* Mobile menu: a <details> element, so it opens without JavaScript. */
.mobile-menu {
  display: none;
}

.mobile-menu > summary {
  list-style: none;
}

.mobile-menu > summary::-webkit-details-marker {
  display: none;
}

.mobile-menu .icon-close { display: none; }
.mobile-menu[open] .icon-close { display: block; }
.mobile-menu[open] .icon-menu { display: none; }

.mobile-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 12px var(--gutter) 24px;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.mobile-menu-panel ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu-panel .nav-link {
  display: flex;
  min-height: 48px;
  font-size: 1.0625rem;
}

.mobile-menu-panel .btn-row {
  flex-direction: column;
  align-items: stretch;
}

/* 06. Hero, page hero ---------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(64px, 8vw, 112px);
}

/* A faint grid behind the hero, fading out towards the edges. */
.hero::before,
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 65% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 65% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero,
.page-hero {
  isolation: isolate;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 5vw, 72px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-copy .lead {
  max-width: 54ch;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 0.875rem;
  color: var(--color-text-muted);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.hero-pill:hover {
  border-color: var(--color-border-strong);
  text-decoration: none;
  color: var(--color-text);
}

.hero-pill .badge {
  padding: 2px 10px;
}

.hero-pill .icon {
  width: 14px;
  height: 14px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

.hero-note .icon {
  width: 16px;
  height: 16px;
  color: var(--color-success);
}

.page-hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(56px, 8vw, 104px);
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--color-border);
}

.page-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  max-width: 780px;
}

.page-hero-center .page-hero-inner {
  align-items: center;
  margin-inline: auto;
  text-align: center;
}

.page-hero-center .lead {
  margin-inline: auto;
}

/* 07. Send gate demo ----------------------------------------------------- */
.gate-demo {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
}

/* A second card peeking out behind the first: the next thread in the queue. */
.gate-demo::before {
  content: "";
  position: absolute;
  inset: 18px -14px -14px 18px;
  z-index: -1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-muted);
}

.gate-card {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
}

.gate-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.gate-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.gate-card-title .icon {
  width: 16px;
  height: 16px;
}

.status-held {
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
}

.status-held::before {
  animation: pulse-dot 1.8s ease-in-out infinite;
}

.gate-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.gate-msg {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
}

.gate-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.gate-avatar-agent {
  border-radius: 9px;
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
}

.gate-avatar-agent .icon {
  width: 18px;
  height: 18px;
}

.gate-msg-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 4px;
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.gate-msg-meta strong {
  font-weight: 600;
  color: var(--color-text);
}

.gate-msg-text {
  color: var(--color-text-muted);
  line-height: 1.55;
}

.gate-bubble {
  padding: 12px 14px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 12px;
  background: var(--color-bg-subtle);
  color: var(--color-text);
  line-height: 1.55;
}

.untrusted-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--color-danger-soft);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  line-height: 1.6;
  color: var(--color-danger);
}

.gate-checks {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.gate-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.gate-check-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-success-soft);
  color: var(--color-success);
}

.gate-check-icon .icon {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

.gate-check-label strong {
  font-weight: 600;
  color: var(--color-text);
}

.gate-check-hold {
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.gate-check-hold .gate-check-icon {
  background: var(--color-accent);
  color: #111827;
}

.gate-check-kind {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.gate-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

/* Illustration buttons: they look like the real controls but are not interactive. */
.demo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 8px;
  background: var(--color-surface);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-text);
}

.demo-btn .icon {
  width: 14px;
  height: 14px;
}

.demo-btn-primary {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-on-primary);
}

.gate-actions-note {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

/* 08. Pillars, feature grid, feature rows -------------------------------- */
.pillars {
  border-block: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pillar {
  display: flex;
  gap: 16px;
  padding: 32px clamp(16px, 3vw, 32px);
}

.pillar:first-child {
  padding-left: 0;
}

.pillar:last-child {
  padding-right: 0;
}

.pillar + .pillar {
  border-left: 1px solid var(--color-border);
}

.pillar h2,
.pillar h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.pillar p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
}

.feature-card p {
  color: var(--color-text-muted);
}

.feature-card .chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
}

/* Numbered feature rows: the five layers of the send gate on /agents. */
.layer-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
}

.layer {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: start;
  padding: 28px;
}

.layer + .layer {
  border-top: 1px solid var(--color-border);
}

.layer-num {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--color-text-subtle);
  padding-top: 2px;
}

.layer h3 {
  font-size: 1.125rem;
  margin-bottom: 6px;
}

.layer-lead {
  color: var(--color-text-muted);
}

.layer-points {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.layer-points li,
.check-list li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
}

.layer-points .icon,
.check-list .icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--color-success);
}

/* Explainer row: text on one side, a visual or code on the other. */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}

.feature-row-reverse > :first-child {
  order: 2;
}

.feature-row-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.feature-row-copy .lead {
  font-size: 1.0625rem;
}

/* 09. Flow --------------------------------------------------------------- */
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  counter-reset: flow;
}

.flow-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
}

.flow-step:first-child {
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.flow-step:last-child {
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.flow-step + .flow-step {
  border-left: 0;
}

/* The arrow between two steps. */
.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  top: 40px;
  left: -13px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a93a5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.flow-step-gate {
  background: var(--color-primary-soft);
  border-color: color-mix(in srgb, var(--color-primary) 30%, var(--color-border));
}

.flow-step-gate + .flow-step {
  border-left: 0;
}

.flow-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-subtle);
}

.flow-step h3 {
  font-size: 1.125rem;
}

.flow-step p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.flow-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.875rem;
  color: var(--color-text);
}

.flow-list li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-list .icon {
  width: 16px;
  height: 16px;
  color: var(--color-primary-text);
}

/* 10. Modes -------------------------------------------------------------- */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.mode-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.mode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mode-meter {
  display: inline-flex;
  gap: 4px;
}

.mode-meter span {
  width: 18px;
  height: 6px;
  border-radius: 3px;
  background: var(--color-border);
}

.mode-meter .is-on {
  background: var(--color-primary);
}

.mode-card h3 {
  font-size: 1.25rem;
}

.mode-card > p {
  color: var(--color-text-muted);
}

.mode-use {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.mode-use strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.modes-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
  margin-top: 32px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* 11. Checklist (safety baseline) --------------------------------------- */
.baseline {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.baseline-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.check-item .icon {
  width: 20px;
  height: 20px;
  margin-top: 1px;
  color: var(--color-success);
}

.check-item strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.check-item span {
  display: block;
  margin-top: 2px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* 12. Split blocks, mailbox mock, client list, steps -------------------- */
.panel-frame {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.mailbox-mock {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 360px;
  font-size: 0.8125rem;
}

.mailbox-side {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 10px;
  border-right: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.mailbox-side-label {
  padding: 10px 10px 6px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.mailbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--color-text-muted);
}

.mailbox-item .icon {
  width: 15px;
  height: 15px;
}

.mailbox-item.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 550;
  box-shadow: var(--shadow-sm);
}

.mailbox-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.mailbox-count-held {
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: var(--color-accent-soft);
  color: var(--color-accent-text);
}

.mailbox-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mailbox-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  font-weight: 600;
  color: var(--color-text);
}

.mail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--color-border);
}

.mail-row:last-child {
  border-bottom: 0;
}

.mail-row-from {
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mail-row-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
}

.mail-row-subject {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--color-text-muted);
}

.mail-row-subject span:first-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mail-row.is-unread .mail-row-from::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  vertical-align: 1px;
}

.client-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 500;
}

.client .icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-subtle);
}

/* Numbered steps (start on a subdomain, then move the root). */
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  counter-reset: step;
}

.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--color-text);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-bg);
}

.step p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.step .chip-mono {
  align-self: flex-start;
  margin-top: auto;
}

/* What an agent credential can and can't do (on /agents). */
.scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.scope-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
}

.scope-col + .scope-col {
  border-left: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.scope-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.check-list-no .icon {
  color: var(--color-danger);
}

/* Mailbox import progress (on /mail). */
.import-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.import-list {
  display: flex;
  flex-direction: column;
}

.import-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.import-row:last-child {
  border-bottom: 0;
}

.import-name {
  font-weight: 600;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.import-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-subtle);
  text-align: right;
}

.import-state {
  min-width: 52px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: right;
}

.progress {
  display: block;
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--color-surface-muted);
}

.progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-primary);
}

.progress-0 { width: 0; }
.progress-64 { width: 64%; }
.progress-100 { width: 100%; background: var(--color-success); }

/* Decision snapshot (on /agents): a timeline of one reply. */
.snapshot {
  padding: 8px 24px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.snapshot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 12px 0;
  font-size: 0.875rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  top: 36px;
  bottom: -12px;
  left: 11px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-surface-muted);
  color: var(--color-text-muted);
}

.timeline-dot .icon {
  width: 13px;
  height: 13px;
  stroke-width: 2.5;
}

.timeline-dot-ok { background: var(--color-success-soft); color: var(--color-success); }
.timeline-dot-hold { background: var(--color-accent-soft); color: var(--color-accent-text); }
.timeline-dot-primary { background: var(--color-primary-soft); color: var(--color-primary-text); }

.timeline-item strong {
  display: block;
  font-weight: 600;
}

.timeline-item p {
  color: var(--color-text-muted);
}

.timeline-time {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--color-text-subtle);
  padding-top: 3px;
}

/* Developer surface list (home, /agents). */
.dev-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.dev-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
}

.dev-item .icon {
  margin-top: 2px;
  color: var(--color-primary-text);
}

.dev-item strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
}

.dev-item code {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  overflow-wrap: anywhere;
}

/* Pricing teaser (home). */
.teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.teaser-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.teaser-copy p {
  max-width: 60ch;
  color: var(--color-text-muted);
}

/* 13. Code block --------------------------------------------------------- */
.code-block {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-code-border);
  border-radius: var(--radius-lg);
  background: var(--color-code-bg);
  color: var(--color-code-text);
  box-shadow: var(--shadow-lg);
}

.code-block-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 0 8px 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-code-bar);
}

.code-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #a7aebd;
}

.code-dots {
  display: inline-flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2c3240;
}

.code-block pre {
  margin: 0;
  padding: 18px 20px 22px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.75;
  tab-size: 2;
}

.code-block pre:focus-visible {
  outline: 2px solid #7088ff;
  outline-offset: -2px;
}

.code-block code {
  font-size: inherit;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  color: #c6ccd8;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.copy-btn:focus-visible {
  outline: 2px solid #7088ff;
  outline-offset: 1px;
}

.copy-btn .icon {
  width: 14px;
  height: 14px;
}

.copy-btn .icon-done { display: none; }
.copy-btn.is-copied .icon-done { display: block; color: #4cc38a; }
.copy-btn.is-copied .icon-copy { display: none; }

html:not(.js) .copy-btn { display: none; }

/* Syntax colours: hand-written spans in the templates, a highlighter in Blade later. */
.tok-k { color: #a9b8ff; }
.tok-s { color: #f3c37a; }
.tok-c { color: #7d8597; font-style: italic; }
.tok-f { color: #7fd8be; }
.tok-p { color: #e7e9ee; }
.tok-n { color: #f0a05a; }
.tok-u { color: #f4908a; }

/* 14. Pricing ------------------------------------------------------------ */
.pricing-notice {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 720px;
  margin: 0 auto clamp(32px, 4vw, 48px);
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
  border-radius: var(--radius-lg);
  background: var(--color-accent-soft);
  color: var(--color-text);
}

.pricing-notice .icon {
  width: 22px;
  height: 22px;
  color: var(--color-accent-text);
}

.pricing-notice p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.pricing-notice strong {
  color: var(--color-text);
}

.period-switch {
  display: flex;
  justify-content: center;
  margin-bottom: clamp(32px, 4vw, 48px);
}

.period-switch-group {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface-muted);
}

.period-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.period-option[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.period-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

html:not(.js) .period-switch { display: none; }

/* Price per interval: [data-pricing] starts at data-period="year", so the annual
   price shows without JavaScript. */
[data-period="year"] [data-period-show="month"],
[data-period="month"] [data-period-show="year"] {
  display: none;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface);
}

.plan-card.is-featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-lg);
}

.plan-flag {
  position: absolute;
  top: -12px;
  left: 28px;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-on-primary);
}

.plan-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-name {
  font-size: 1.25rem;
}

.plan-desc {
  min-height: 3.2em;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.plan-price {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 92px;
}

.plan-amount {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.plan-amount-value {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
}

.plan-amount-unit {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.plan-price-note {
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.plan-price-free {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.plan-saving {
  align-self: flex-start;
}

.plan-limits {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
}

.plan-limit {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9375rem;
}

.plan-limit dt {
  color: var(--color-text-muted);
}

.plan-limit dd {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: right;
}

.plan-included-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.plan-card .check-list {
  font-size: 0.875rem;
}

.plan-card .check-list .icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

.plan-cta {
  margin-top: auto;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.table-scroll:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.compare-table caption {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
}

.compare-table th,
.compare-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.compare-table thead th {
  background: var(--color-bg-subtle);
  font-size: 0.875rem;
  font-weight: 600;
}

.compare-table tbody th {
  font-weight: 450;
  color: var(--color-text-muted);
}

/* The limit names stay in view while the plans scroll sideways on small screens. */
.compare-table thead th:first-child,
.compare-table tbody th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 34%;
  background: var(--color-surface);
  box-shadow: inset -1px 0 0 var(--color-border);
}

.compare-table thead th:first-child {
  background: var(--color-bg-subtle);
}

.compare-table .row-group span {
  position: sticky;
  left: 20px;
}

.compare-table td {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.compare-table tr:last-child th,
.compare-table tr:last-child td {
  border-bottom: 0;
}

.compare-table .is-featured {
  background: color-mix(in srgb, var(--color-primary-soft) 55%, transparent);
}

.compare-table .row-group th {
  padding-top: 22px;
  background: var(--color-bg-subtle);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.compare-table .icon {
  width: 18px;
  height: 18px;
  color: var(--color-success);
}

/* 15. FAQ ---------------------------------------------------------------- */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.faq-list {
  border-top: 1px solid var(--color-border);
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 16px 0;
  font-size: 1.0625rem;
  font-weight: 550;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--color-primary-text);
}

.faq-item summary .icon {
  width: 20px;
  height: 20px;
  color: var(--color-text-subtle);
  transition: transform var(--transition-base);
}

.faq-item[open] summary .icon {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 40px 24px 0;
  color: var(--color-text-muted);
}

.faq-answer p + p {
  margin-top: 12px;
}

/* 16. Call-to-action band ----------------------------------------------- */
.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--color-band-border);
  border-radius: var(--radius-xl);
  background: var(--color-band-bg);
  color: #ffffff;
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
}

.cta-band h2 {
  color: #ffffff;
}

.cta-band p {
  margin-top: 12px;
  max-width: 56ch;
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.82);
}

.cta-band .btn-row {
  justify-content: flex-end;
}

/* 17. Footer ------------------------------------------------------------- */
.site-footer {
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg-subtle);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  max-width: 320px;
}

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.footer-col h2 {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.footer-col a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-col .icon {
  width: 16px;
  height: 16px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

.footer-promise {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer-promise .icon {
  width: 16px;
  height: 16px;
  color: var(--color-success);
}

/* 18. Legal pages, prose ------------------------------------------------- */
.legal-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}

.legal-layout .toc {
  order: 0;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.draft-note {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-info-soft);
  font-size: 0.9375rem;
  color: var(--color-text);
}

.draft-note .icon {
  margin-top: 2px;
  color: var(--color-info);
}

.prose {
  max-width: 70ch;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--color-text);
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.prose h3 {
  margin-top: 1.8em;
  font-size: 1.1875rem;
  line-height: 1.35;
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 + *,
.prose h3 + * {
  margin-top: 0.6em;
}

.prose p,
.prose li {
  color: var(--color-text-muted);
}

.prose strong {
  font-weight: 600;
  color: var(--color-text);
}

.prose a {
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-underline-offset: 3px;
}

.prose a:hover {
  text-decoration-color: currentColor;
}

.prose ul,
.prose ol {
  padding-left: 1.4em;
}

.prose li + li {
  margin-top: 0.4em;
}

.prose li::marker {
  color: var(--color-text-subtle);
}

.prose :not(pre) > code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-surface-muted);
  font-size: 0.86em;
  color: var(--color-text);
}

.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--color-accent);
  font-size: 1.125rem;
  color: var(--color-text);
}

.prose blockquote p {
  color: var(--color-text);
}

.prose hr {
  height: 1px;
  margin: 2.4em 0;
  border: 0;
  background: var(--color-border);
}

.prose .table-scroll,
.prose .code-block,
.prose .callout,
.prose .post-figure {
  margin-block: 1.6em;
}

.prose .code-block {
  box-shadow: none;
}

.prose table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.prose th,
.prose td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

.prose thead th {
  background: var(--color-bg-subtle);
  font-weight: 600;
  color: var(--color-text);
}

.prose tbody tr:last-child td {
  border-bottom: 0;
}

.prose td {
  color: var(--color-text-muted);
}

/* 19. Blog --------------------------------------------------------------- */
.blog-hero-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.feed-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.feed-link .icon {
  width: 16px;
  height: 16px;
  color: var(--color-accent);
}

.blog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.tag-filter ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: border-color var(--transition-fast), color var(--transition-fast), background-color var(--transition-fast);
}

.tag-link:hover {
  border-color: var(--color-border-strong);
  color: var(--color-text);
  text-decoration: none;
}

.tag-link[aria-current="page"] {
  border-color: var(--color-text);
  background: var(--color-text);
  color: var(--color-bg);
}

.blog-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 340px;
}

.blog-search .icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-subtle);
  pointer-events: none;
}

.input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font: inherit;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.input::placeholder {
  color: var(--color-text-subtle);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring);
}

.blog-search .input {
  padding-left: 42px;
}

.input[aria-invalid="true"] {
  border-color: var(--color-danger);
}

.field-error {
  margin-top: 8px;
  font-size: 0.875rem;
  color: var(--color-danger);
}

.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 24px;
}

.results-head h2 {
  font-size: 1.125rem;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  overflow: hidden;
  transition: border-color var(--transition-base), box-shadow var(--transition-base), transform var(--transition-base);
}

.post-card:hover {
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.post-card:focus-within {
  box-shadow: var(--focus-ring);
}

.post-cover {
  aspect-ratio: 1200 / 630;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-muted);
  overflow: hidden;
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* A post without a cover gets a quiet branded panel with its first tag, so the grid stays even. */
.post-cover-fallback {
  display: flex;
  align-items: flex-end;
  padding: 20px 22px;
  background-color: var(--color-primary-soft);
  background-image:
    linear-gradient(var(--color-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-line) 1px, transparent 1px);
  background-size: 32px 32px;
}

.post-cover-fallback span {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-text);
}

.post-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 22px 22px 20px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.post-card-title {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

/* The whole card opens the post: the title link stretches over it. */
.post-card-title a {
  color: var(--color-text);
}

.post-card-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.post-card-title a:hover {
  text-decoration: none;
}

.post-card-title a:focus-visible {
  outline: none;
}

.post-card-desc {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.8125rem;
  color: var(--color-text-subtle);
}

.post-meta .sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.post-card-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
}

/* The cover fills the left column at the text's height instead of sizing from its ratio. */
.post-card-featured .post-cover {
  position: relative;
  aspect-ratio: auto;
  min-height: 320px;
  border-bottom: 0;
  border-right: 1px solid var(--color-border);
}

.post-card-featured .post-cover img {
  position: absolute;
  inset: 0;
}

.post-card-featured .post-card-body {
  justify-content: center;
  gap: 16px;
  padding: clamp(24px, 4vw, 48px);
}

.post-card-featured .post-card-title {
  font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.post-card-featured .post-card-desc {
  font-size: 1.0625rem;
  -webkit-line-clamp: 4;
}

.post-card-featured .post-meta {
  margin-top: 8px;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 56px;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

.pagination a:hover {
  background: var(--color-surface-muted);
  color: var(--color-text);
  text-decoration: none;
}

.pagination [aria-current="page"] {
  border-color: var(--color-border-strong);
  background: var(--color-surface);
  color: var(--color-text);
}

.pagination .is-disabled {
  color: var(--color-text-subtle);
  opacity: 0.55;
}

.pagination .icon {
  width: 16px;
  height: 16px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 520px;
  margin-inline: auto;
  padding: clamp(40px, 6vw, 72px) 24px;
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-xl);
  background: var(--color-bg-subtle);
  text-align: center;
}

.empty-state .icon-tile {
  width: 52px;
  height: 52px;
  margin-bottom: 4px;
}

.empty-state h2 {
  font-size: 1.25rem;
}

.empty-state p {
  color: var(--color-text-muted);
}

.empty-state .btn-row {
  justify-content: center;
  margin-top: 6px;
}

.empty-suggest {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

/* 20. Blog post ---------------------------------------------------------- */
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--color-text-subtle);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs li + li::before {
  content: "/";
  color: var(--color-border-strong);
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

.post-header {
  padding-top: clamp(40px, 6vw, 72px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.post-header-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 820px;
}

.post-title {
  font-size: clamp(2.125rem, 1.5rem + 2.6vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.post-byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  padding-top: 4px;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.post-author {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 550;
  color: var(--color-text);
}

.post-author img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.post-byline-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.post-byline-item .icon {
  width: 16px;
  height: 16px;
  color: var(--color-text-subtle);
}

.post-hero-cover {
  overflow: hidden;
  aspect-ratio: 1200 / 630;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  background: var(--color-surface-muted);
}

.post-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: clamp(40px, 6vw, 88px);
  align-items: start;
  padding-top: clamp(40px, 5vw, 64px);
}

.post-layout > .prose {
  max-width: 720px;
}

.toc {
  position: sticky;
  top: calc(var(--header-height) + 32px);
  order: 2;
}

.toc-title {
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
}

.toc ol {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--color-border);
}

.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 14px;
  border-left: 2px solid transparent;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.toc a:hover {
  color: var(--color-text);
  text-decoration: none;
}

.toc a[aria-current="true"] {
  border-left-color: var(--color-primary);
  color: var(--color-text);
  font-weight: 550;
}

.toc-foot {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
  font-size: 0.875rem;
}

.toc .toc-foot a {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--color-primary-text);
}

.callout {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg-subtle);
  font-size: 1rem;
  line-height: 1.65;
}

.callout .icon {
  width: 20px;
  height: 20px;
  margin-top: 3px;
}

.callout-title {
  display: block;
  margin-bottom: 2px;
  font-weight: 600;
  color: var(--color-text);
}

.callout p {
  color: var(--color-text-muted);
}

.callout-note { background: var(--color-info-soft); border-color: color-mix(in srgb, var(--color-info) 25%, var(--color-border)); }
.callout-note .icon { color: var(--color-info); }
.callout-tip { background: var(--color-success-soft); border-color: color-mix(in srgb, var(--color-success) 25%, var(--color-border)); }
.callout-tip .icon { color: var(--color-success); }
.callout-warning { background: var(--color-warning-soft); border-color: color-mix(in srgb, var(--color-warning) 30%, var(--color-border)); }
.callout-warning .icon { color: var(--color-warning); }

.post-figure img {
  width: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.post-figure figcaption {
  margin-top: 10px;
  font-size: 0.875rem;
  text-align: center;
  color: var(--color-text-subtle);
}

.post-footer {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.post-cta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-bg-subtle);
}

.post-cta h2 {
  font-size: 1.25rem;
}

.post-cta p {
  color: var(--color-text-muted);
}

.status-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border: 1px dashed currentColor;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.status-draft { color: var(--color-danger); }
.status-scheduled { color: var(--color-info); }

/* 21. Utilities, motion -------------------------------------------------- */
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* 22. Responsive --------------------------------------------------------- */
/* Touch screens: text links and chips get a 44px tall hit area without changing the layout. */
@media (pointer: coarse) {
  .brand,
  .link-arrow,
  .feed-link,
  .tag-link {
    min-height: 44px;
  }

  .hero-pill,
  .copy-btn {
    min-height: 40px;
  }
}

@media (max-width: 1199px) {
  .code-block pre {
    font-size: 0.75rem;
  }
}

@media (max-width: 1120px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
    max-width: 480px;
  }
}

@media (max-width: 1023px) {
  .site-nav,
  .header-actions .header-signin {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .hero-grid,
  .feature-row,
  .baseline,
  .faq,
  .teaser,
  .cta-band {
    grid-template-columns: minmax(0, 1fr);
  }

  .feature-row-reverse > :first-child {
    order: 0;
  }

  .cta-band .btn-row {
    justify-content: flex-start;
  }

  .gate-demo {
    max-width: 600px;
  }

  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .modes,
  .grid-3,
  .steps,
  .plan-grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin-inline: auto;
  }

  .plan-desc {
    min-height: 0;
  }

  .plan-price {
    min-height: 0;
  }

  .flow {
    grid-template-columns: minmax(0, 1fr);
    max-width: 640px;
    margin-inline: auto;
  }

  .flow-step:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .flow-step:last-child { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

  .flow-step + .flow-step,
  .flow-step-gate + .flow-step {
    border-left: 1px solid var(--color-border);
    border-top: 0;
  }

  .flow-step-gate + .flow-step {
    border-left-color: var(--color-border);
  }

  .flow-step + .flow-step::before {
    top: -13px;
    left: 28px;
    transform: rotate(90deg);
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-layout,
  .legal-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toc {
    position: static;
    order: 0;
    padding: 18px 20px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-bg-subtle);
  }

  .toc-foot {
    display: none;
  }

  .legal-layout .toc {
    max-width: 720px;
  }
}

@media (max-width: 767px) {
  .pillars-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .pillar + .pillar {
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }

  .pillar,
  .pillar:first-child,
  .pillar:last-child {
    padding: 24px 0;
  }

  .grid-2,
  .grid-4,
  .check-grid,
  .dev-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .layer {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 24px 20px;
  }

  .post-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card-featured {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card-featured .post-cover {
    aspect-ratio: 1200 / 630;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
  }

  .blog-search {
    max-width: none;
  }

  .tag-filter {
    width: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
  }

  .mailbox-mock {
    grid-template-columns: minmax(0, 1fr);
  }

  /* The mock is an illustration: its mailbox row is clipped with a fade, never scrolled. */
  .mailbox-side {
    flex-direction: row;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--color-border);
    mask-image: linear-gradient(to right, #000 80%, transparent);
  }

  .mailbox-side-label {
    display: none;
  }

  .mailbox-item {
    flex: none;
  }

  .faq-answer {
    padding-right: 0;
  }

  .feature-card,
  .mode-card,
  .step,
  .flow-step,
  .plan-card {
    padding: 24px 20px;
  }

  .gate-card-body {
    padding: 14px;
  }

  .gate-card-head {
    padding: 12px 14px;
  }

  .gate-check-kind {
    display: none;
  }

  .gate-check {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .gate-actions-note {
    width: 100%;
    margin-left: 0;
  }

  .gate-demo::before {
    inset: 12px -8px -8px 12px;
  }

  .header-actions .header-cta {
    display: none;
  }

  .btn-row-stack-sm {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-row-stack-sm .btn {
    width: 100%;
  }

  .cta-band .btn-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .snapshot {
    padding: 4px 16px;
  }

  .timeline-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .timeline-time {
    grid-column: 2;
    padding-top: 0;
  }

  .scope {
    grid-template-columns: minmax(0, 1fr);
  }

  .scope-col + .scope-col {
    border-left: 0;
    border-top: 1px solid var(--color-border);
  }

  .scope-col {
    padding: 24px 20px;
  }
}

@media (max-width: 420px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .period-option {
    padding: 0 14px;
  }
}

@media print {
  .site-header,
  .site-footer,
  .cta-band,
  .toc,
  .copy-btn {
    display: none !important;
  }
}
