/* mcp.4degrees.ai public pages — v3
   Brand: Satoshi (display) + Inter (body), purple #8753d4.
   Light + dark mode tokens. Motion via CSS only. No JS framework. */

/* --- Tokens (light) --- */

:root {
  /* Surfaces */
  --color-bg: #ffffff;
  --color-bg-elevated: #ffffff;
  --color-surface-soft: #faf9fc;
  --color-surface-band: #f1eafa;
  --color-surface-deep: #f8f5fb;

  /* Text */
  --color-text: #120920;
  --color-text-body: #1a1a1a;
  --color-text-muted: #5d6c7b;
  --color-text-dim: #8b95a3;

  /* Brand */
  --color-primary: #8753d4;
  --color-primary-hover: #7a47c8;
  --color-primary-deep: #461f7f;
  --color-primary-darker: #2c104f;
  --color-primary-tint: #eadff8;
  --color-primary-tint-soft: #f3eafa;

  /* Accents (semantic) */
  --color-success: #15803d;
  --color-warn: #b45309;
  --color-info: #1d4ed8;

  /* Borders */
  --color-border: #e7e3ee;
  --color-border-soft: #efedf3;
  --color-divider: #ece6f4;

  /* Code */
  --color-code-bg: #f3f1f9;
  --color-code-text: #461f7f;
  --color-code-block-bg: #1a1130;
  --color-code-block-text: #e8e0f5;
  --color-code-block-comment: #9b8db8;
  --color-code-block-string: #c5b3e6;
  --color-code-block-keyword: #d6a3ff;

  /* Layout */
  --max-content: 760px;
  --max-wide: 1180px;
  --max-docs: 1280px;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(18, 9, 32, 0.04), 0 1px 1px rgba(18, 9, 32, 0.02);
  --shadow-card-hover: 0 16px 36px rgba(135, 83, 212, 0.14), 0 4px 12px rgba(18, 9, 32, 0.06);
  --shadow-cta: 0 6px 20px rgba(135, 83, 212, 0.32);
  --shadow-cta-hover: 0 10px 28px rgba(135, 83, 212, 0.44);

  /* Motion */
  --t-fast: 140ms cubic-bezier(0.4, 0, 0.2, 1);
  --t: 220ms cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 380ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Tokens (dark, opt-in via prefers-color-scheme) --- */

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0c0717;
    --color-bg-elevated: #14102a;
    --color-surface-soft: #1a1330;
    --color-surface-band: #1a1230;
    --color-surface-deep: #221842;

    --color-text: #f4f0fc;
    --color-text-body: #ddd5ee;
    --color-text-muted: #9b91b3;
    --color-text-dim: #6f6685;

    --color-primary: #a87dee;
    --color-primary-hover: #b790f0;
    --color-primary-deep: #d6a3ff;
    --color-primary-darker: #ebc7ff;
    --color-primary-tint: #2a1e4e;
    --color-primary-tint-soft: #1d1338;

    --color-border: #2a1f48;
    --color-border-soft: #1f1639;
    --color-divider: #1f1639;

    --color-code-bg: #1d1338;
    --color-code-text: #d6a3ff;

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 16px 36px rgba(168, 125, 238, 0.18), 0 4px 12px rgba(0, 0, 0, 0.5);
    --shadow-cta: 0 6px 20px rgba(168, 125, 238, 0.34);
  }
}

/* --- Reset --- */

* { box-sizing: border-box; }

html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text-body);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: "ss01", "cv01", "cv11";
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}

a:hover { border-bottom-color: var(--color-primary); }

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

::selection {
  background: var(--color-primary-tint);
  color: var(--color-primary-deep);
}

/* --- Typography --- */

h1, h2, h3, h4, h5 {
  font-family: "Satoshi", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 20px;
}

h1 em {
  font-style: italic;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 { font-size: clamp(28px, 3.5vw, 40px); margin: 64px 0 16px; letter-spacing: -0.025em; }
h3 { font-size: 20px; margin: 28px 0 8px; letter-spacing: -0.015em; }
h4 { font-size: 16px; margin: 20px 0 6px; letter-spacing: -0.01em; }

p, li { margin: 8px 0; }
ul, ol { padding-left: 24px; }

.lede {
  font-size: clamp(17px, 1.6vw, 21px);
  color: var(--color-text-muted);
  margin: 0 0 28px;
  max-width: 60ch;
  line-height: 1.45;
}

.lede strong { color: var(--color-text); font-weight: 600; }
.lede .accent { color: var(--color-primary-deep); font-weight: 600; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
  background: var(--color-primary-tint);
  border-radius: 999px;
  margin-bottom: 24px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(135, 83, 212, 0.18);
}

.effective-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.effective-date::before {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>") center/contain no-repeat;
}

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--color-code-bg);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  color: var(--color-code-text);
  font-weight: 500;
}

pre {
  background: var(--color-code-block-bg);
  color: var(--color-code-block-text);
  padding: 18px 22px;
  border-radius: var(--radius);
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  position: relative;
  margin: 16px 0;
  border: 1px solid rgba(135, 83, 212, 0.2);
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

pre .tok-comment { color: var(--color-code-block-comment); font-style: italic; }
pre .tok-string  { color: var(--color-code-block-string); }
pre .tok-keyword { color: var(--color-code-block-keyword); }
pre .tok-key     { color: #f0c8ff; }

pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-code-block-comment);
  font-family: "Inter", sans-serif;
  font-weight: 600;
}

blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-surface-soft);
  color: var(--color-text-muted);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* --- Top navigation --- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
}

@media (prefers-color-scheme: dark) {
  .topnav { background: rgba(12, 7, 23, 0.86); }
}

.topnav-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Satoshi", "Inter", sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.topnav-brand:hover { border-bottom-color: transparent; color: var(--color-primary); }

.topnav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.topnav-brand .badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary-deep);
  background: var(--color-primary-tint);
  border-radius: 999px;
}

.topnav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

.topnav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
}

.topnav-link:hover {
  color: var(--color-text);
  border-bottom-color: transparent;
}

.topnav-cta {
  padding: 8px 16px;
  background: var(--color-primary);
  color: #ffffff !important;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid var(--color-primary);
  transition: background var(--t), transform var(--t);
}

.topnav-cta:hover {
  background: var(--color-primary-hover);
  border-bottom-color: transparent;
  transform: translateY(-1px);
}

@media (max-width: 720px) {
  .topnav-links { gap: 12px; }
  .topnav-link { display: none; }
  .topnav-link.always-visible { display: inline; }
}

/* --- Layout --- */

main {
  max-width: var(--max-content);
  margin: 0 auto;
  padding: 56px 24px 96px;
}

main.wide   { max-width: var(--max-wide); padding-left: 16px; padding-right: 16px; }
main.docs   { max-width: var(--max-docs); padding-left: 0; padding-right: 0; }

.section {
  padding: 80px 0;
  position: relative;
}

.section--band {
  background: var(--color-surface-band);
  margin: 80px 0;
}

.section--dark {
  background: linear-gradient(140deg, var(--color-primary-darker) 0%, var(--color-primary-deep) 60%, var(--color-primary) 100%);
  color: #ffffff;
  padding: 96px 0;
}

.section--dark h1, .section--dark h2, .section--dark h3 { color: #ffffff; }
.section--dark p, .section--dark .lede { color: rgba(255, 255, 255, 0.84); }
.section--dark .lede strong { color: #ffffff; }

.section-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Hero --- */

.hero {
  position: relative;
  isolation: isolate;
  text-align: center;
  padding: 96px 24px 64px;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: drift 24s ease-in-out infinite alternate;
}

.hero::before {
  top: -160px;
  left: -120px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(135, 83, 212, 0.55), transparent 60%);
}

.hero::after {
  top: -80px;
  right: -100px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(168, 125, 238, 0.45), transparent 60%);
  animation-delay: -8s;
  animation-duration: 28s;
}

@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(40px, -20px, 0) scale(1.06); }
  100% { transform: translate3d(-30px, 20px, 0) scale(0.96); }
}

.hero-inner {
  max-width: 920px;
  margin: 0 auto;
}

.hero h1 { margin: 0 0 24px; }

.hero .tagline {
  font-size: clamp(18px, 1.7vw, 22px);
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 36px;
  line-height: 1.45;
}

.hero .tagline .accent { color: var(--color-primary-deep); font-weight: 600; }
.hero .tagline strong { color: var(--color-text); font-weight: 600; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

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

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
}

.cta:hover {
  transform: translateY(-1px);
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  color: var(--color-primary);
}

.cta.primary {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-cta);
}

.cta.primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  color: #ffffff;
  box-shadow: var(--shadow-cta-hover);
  transform: translateY(-2px);
}

.cta.on-dark {
  background: #ffffff;
  color: var(--color-primary-deep);
  border-color: #ffffff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.cta.on-dark:hover {
  background: #f4ecff;
  color: var(--color-primary-darker);
  border-color: #f4ecff;
}

.cta-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform var(--t);
}

.cta:hover .cta-arrow { transform: translateX(3px); }

/* --- Logo strip / social proof --- */

.logo-strip {
  margin: 32px auto 0;
  max-width: 720px;
  text-align: center;
}

.logo-strip-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-dim);
  margin-bottom: 14px;
}

.logo-strip-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
  opacity: 0.7;
}

.logo-strip-marks > * {
  font-family: "Satoshi", "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--color-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.logo-strip-marks svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
}

/* --- Hero screenshot carousel --- */

.hero-carousel {
  max-width: 920px;
  margin: 56px auto 0;
  padding: 0;
  text-align: left;
}

.hero-carousel-frame {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
}

.hero-carousel-frame::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(135, 83, 212, 0.5), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.hero-carousel-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--color-surface-soft);
  border-bottom: 1px solid var(--color-border-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-dim);
}

.hero-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-border);
}

.hero-carousel-dot:nth-child(1) { background: #ff5f57; }
.hero-carousel-dot:nth-child(2) { background: #febc2e; }
.hero-carousel-dot:nth-child(3) { background: #28c840; }

.hero-carousel-label {
  margin-left: auto;
}

.hero-carousel-viewport {
  position: relative;
  /* Ratio matches the avg native aspect of the 5 captures (~1090×830 = 1.31:1).
     Keeps the frame steady so slide swaps don't jump the page. */
  aspect-ratio: 1090 / 830;
  background: var(--color-bg);
  overflow: hidden;
}

.hero-carousel-track {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  /* JS sets --carousel-index (0..n-1); slides translate as a unit. */
  transform: translate3d(calc(var(--carousel-index, 0) * -100%), 0, 0);
  transition: transform 700ms cubic-bezier(0.5, 0.05, 0.2, 0.95);
  will-change: transform;
}

.hero-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
}

.hero-carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* Progress bar — visibly fills during the auto-advance interval, so the
   carousel reads as "alive" even between slide transitions. */
.hero-carousel-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 2;
  pointer-events: none;
}

.hero-carousel-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-deep));
  transform-origin: left center;
}

.hero-carousel-progress-bar.is-running {
  animation: hero-carousel-progress var(--carousel-interval, 5500ms) linear forwards;
}

.hero-carousel-progress-bar.is-paused {
  animation-play-state: paused;
}

@keyframes hero-carousel-progress {
  from { width: 0%; }
  to { width: 100%; }
}

.hero-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  transition: opacity 200ms ease, background 200ms ease;
}

.hero-carousel-arrow svg { width: 18px; height: 18px; }

.hero-carousel-arrow.prev { left: 10px; }
.hero-carousel-arrow.next { right: 10px; }

.hero-carousel-frame:hover .hero-carousel-arrow,
.hero-carousel-arrow:focus-visible {
  opacity: 1;
}

.hero-carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.75);
}

.hero-carousel-arrow:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.hero-carousel-caption {
  margin: 14px 4px 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-body);
  text-align: center;
  min-height: 1.5em;
}

.hero-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.hero-carousel-pip {
  width: 28px;
  height: 4px;
  border-radius: 999px;
  background: var(--color-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 200ms ease, width 200ms ease;
}

.hero-carousel-pip:hover {
  background: var(--color-text-dim);
}

.hero-carousel-pip.is-active {
  background: var(--color-primary);
  width: 36px;
}

.hero-carousel-pip:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .hero-carousel-track {
    transition: none;
  }
  .hero-carousel-progress-bar.is-running {
    animation: none;
    width: 100%;
  }
}

@media (max-width: 640px) {
  .hero-carousel { margin-top: 40px; }
  .hero-carousel-arrow { display: none; }
  .hero-carousel-pip { width: 22px; }
  .hero-carousel-pip.is-active { width: 30px; }
}

/* --- Trust strip (full-bleed band) --- */

.trust-strip {
  background: var(--color-primary-tint-soft);
  border-block: 1px solid var(--color-border-soft);
  padding: 20px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--color-text);
}

.trust-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.trust-strip-item svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
  flex: none;
}

.trust-strip-item strong { font-weight: 600; color: var(--color-text); }

/* --- Tabbed prompt panel --- */

.tabs {
  margin: 24px 0;
}

.tabs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--color-border-soft);
  margin-bottom: 0;
  padding: 0 4px;
  overflow-x: auto;
}

.tab-toggle {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 8px 8px 0 0;
  transition: color var(--t), border-color var(--t), background var(--t);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.tab-toggle svg { width: 16px; height: 16px; flex: none; }

.tab-toggle:hover {
  color: var(--color-text);
  background: var(--color-surface-soft);
}

input[name="prompt-tab"] { position: absolute; opacity: 0; pointer-events: none; }

input[name="prompt-tab"]:checked + .tab-toggle {
  color: var(--color-primary-deep);
  border-bottom-color: var(--color-primary);
}

.tab-panels { position: relative; padding-top: 28px; }

.tab-panel { display: none; }

#tab-rel:checked    ~ .tab-panels #panel-rel,
#tab-pipe:checked   ~ .tab-panels #panel-pipe,
#tab-triage:checked ~ .tab-panels #panel-triage,
#tab-prep:checked   ~ .tab-panels #panel-prep,
#tab-report:checked ~ .tab-panels #panel-report,
#tab-net:checked    ~ .tab-panels #panel-net   { display: block; }

.prompt-hero {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 18px;
  align-items: center;
}

.prompt-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-deep) 100%);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prompt-hero-icon svg { width: 28px; height: 28px; }

.prompt-hero-prompt {
  font-size: 17px;
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 500;
}

.prompt-hero-prompt::before {
  content: "“";
  display: inline-block;
  margin-right: 4px;
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 0;
  position: relative;
  top: 6px;
}

.prompt-hero-prompt::after {
  content: "”";
  margin-left: 2px;
  color: var(--color-primary);
  font-size: 28px;
  font-weight: 700;
  line-height: 0;
  position: relative;
  top: 6px;
}

.prompt-supporting {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.prompt-supporting li {
  background: var(--color-bg);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--color-text-body);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.prompt-supporting li:hover {
  border-color: var(--color-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.prompt-supporting li::before {
  content: "›";
  color: var(--color-primary);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  flex: none;
}

@media (max-width: 540px) {
  .prompt-hero { grid-template-columns: 1fr; }
}

/* --- Card grid (3-up) --- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 32px 0;
}

.card {
  display: block;
  padding: 28px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text-body);
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

a.card { text-decoration: none; }

a.card:hover {
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card h3 { margin: 0 0 8px; font-size: 18px; color: var(--color-text); }

.card p { margin: 0; font-size: 14.5px; color: var(--color-text-muted); line-height: 1.55; }

.card-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary-tint), var(--color-primary-tint-soft));
  color: var(--color-primary-deep);
  margin-bottom: 18px;
  position: relative;
}

.card-icon svg { width: 22px; height: 22px; }

.card-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(135, 83, 212, 0.16);
  pointer-events: none;
}

/* --- Brand card (Anthropic / OpenAI / MCP) --- */

.brand-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  background: var(--color-bg);
  box-shadow: var(--shadow-card);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

a.brand-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-mark svg { width: 100%; height: 100%; }

.brand-card h3 { margin: 0; font-size: 17px; color: var(--color-text); }
.brand-card p  { margin: 0; font-size: 14px; color: var(--color-text-muted); line-height: 1.55; }
.brand-card .brand-badge {
  display: inline-block;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--color-surface-deep);
  color: var(--color-primary-deep);
  border-radius: 4px;
  align-self: flex-start;
}

/* --- Stats band --- */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  padding: 48px 0;
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-family: "Satoshi", "Inter", sans-serif;
  font-size: clamp(40px, 4vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-deep));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Step list (numbered, with rail) --- */

.steps {
  list-style: none;
  padding: 0;
  margin: 32px 0;
  counter-reset: step;
  position: relative;
}

.steps::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 19px;
  width: 1px;
  background: linear-gradient(180deg, var(--color-primary), var(--color-divider));
  opacity: 0.5;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 6px 0 28px 64px;
  font-size: 15.5px;
  color: var(--color-text-body);
  line-height: 1.55;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
  color: var(--color-primary-deep);
  border-radius: 50%;
  font-weight: 700;
  font-size: 14px;
  font-family: "Satoshi", "Inter", sans-serif;
  box-shadow: 0 0 0 4px var(--color-primary-tint);
}

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

/* --- Security card (icon-led, semantically correct) --- */

.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 32px 0;
}

.security-card {
  padding: 22px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.security-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-deep));
  opacity: 0.7;
}

.security-card .card-icon {
  background: linear-gradient(135deg, var(--color-primary-tint), var(--color-primary-tint-soft));
}

.security-card h3 { margin: 0; font-size: 15px; color: var(--color-text); }
.security-card p  { margin: 0; font-size: 13.5px; color: var(--color-text-muted); line-height: 1.55; }

/* --- Stack docs sidebar / right rail --- */

.docs-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 220px;
  gap: 48px;
  max-width: var(--max-docs);
  margin: 0 auto;
  padding: 32px 24px 96px;
}

.docs-nav {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 14px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-right: 8px;
}

.docs-nav-search {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 13.5px;
  color: var(--color-text);
  background: var(--color-bg);
  margin-bottom: 16px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
  background-repeat: no-repeat;
  background-position: 8px center;
  background-size: 16px;
}

.docs-nav-search:focus { outline: 2px solid var(--color-primary); outline-offset: 2px; border-color: var(--color-primary); }

.docs-nav-section {
  margin-bottom: 18px;
}

.docs-nav-section-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  padding: 6px 8px;
}

.docs-nav-link {
  display: block;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--color-text-muted);
  font-weight: 500;
  border-bottom: none;
}

.docs-nav-link:hover {
  color: var(--color-text);
  background: var(--color-surface-soft);
  border-bottom-color: transparent;
}

.docs-nav-link[aria-current="page"] {
  color: var(--color-primary-deep);
  background: var(--color-primary-tint);
  font-weight: 600;
}

.docs-content { min-width: 0; }

.docs-breadcrumbs {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.docs-breadcrumbs a { color: var(--color-text-muted); }
.docs-breadcrumbs a:hover { color: var(--color-primary); border-bottom-color: transparent; }
.docs-breadcrumbs span { margin: 0 8px; color: var(--color-text-dim); }

.docs-anchors {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 13px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
  padding-left: 16px;
  border-left: 1px solid var(--color-border-soft);
}

.docs-anchors-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  margin-bottom: 12px;
}

.docs-anchors a {
  display: block;
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--color-text-muted);
  border-bottom: none;
  border-left: 2px solid transparent;
  margin-left: -10px;
  padding-left: 8px;
}

.docs-anchors a:hover {
  color: var(--color-text);
}

.docs-anchors a.is-active {
  color: var(--color-primary-deep);
  border-left-color: var(--color-primary);
  font-weight: 600;
}

@media (max-width: 1024px) {
  .docs-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .docs-anchors { display: none; }
}

@media (max-width: 720px) {
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .docs-nav {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--color-border-soft);
    padding-bottom: 16px;
  }
}

/* --- Anchor heading (#) on hover --- */

/* Docs h1 sized down vs landing/marketing h1 — a docs page title shouldn't
   command the same visual weight as a hero headline. */
.docs-content h1 {
  font-size: clamp(28px, 3.6vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 12px;
}

/* Per-client meta line under each "Connect from X" h3 — a one-line
   positioning note ("Best UX. No JSON…") that orients the reader before
   they commit to following the steps. */
.client-meta {
  font-size: 13.5px;
  color: var(--color-text-muted);
  margin: -4px 0 14px;
  font-style: italic;
}

.docs-content h2,
.docs-content h3 {
  position: relative;
  scroll-margin-top: 96px;
}

.heading-anchor {
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  opacity: 0;
  border-bottom: none;
  font-size: 18px;
  font-weight: 700;
  transition: opacity var(--t);
}

.docs-content h2:hover .heading-anchor,
.docs-content h3:hover .heading-anchor {
  opacity: 0.7;
}

.heading-anchor:hover { opacity: 1 !important; border-bottom-color: transparent; }

/* --- Callouts --- */

.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  margin: 20px 0;
  border: 1px solid;
  background: var(--color-bg-elevated);
  font-size: 14.5px;
  line-height: 1.55;
}

.callout-icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 1px;
}

.callout-tip  { border-color: rgba(135, 83, 212, 0.3); background: var(--color-primary-tint-soft); color: var(--color-text); }
.callout-tip .callout-icon { color: var(--color-primary); }
.callout-warn { border-color: rgba(180, 83, 9, 0.3); background: #fff7ed; color: #7c2d12; }
.callout-warn .callout-icon { color: var(--color-warn); }
.callout-note { border-color: rgba(29, 78, 216, 0.25); background: #eff6ff; color: #1e3a8a; }
.callout-note .callout-icon { color: var(--color-info); }

@media (prefers-color-scheme: dark) {
  .callout-warn { background: #2a1607; color: #fbbf76; }
  .callout-note { background: #0f1933; color: #93b8ff; }
}

.callout strong { font-weight: 600; }

/* --- Tool reference table --- */

.tool-reference {
  margin: 24px 0 32px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-bg);
}

.tool-reference summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  list-style: none;
  background: linear-gradient(180deg, var(--color-surface-soft), var(--color-bg));
  border-bottom: 1px solid transparent;
  transition: border-color var(--t);
}

.tool-reference summary::-webkit-details-marker { display: none; }

.tool-reference[open] summary { border-bottom-color: var(--color-border-soft); }

.tool-reference summary > code {
  font-size: 14.5px;
  padding: 4px 10px;
  background: var(--color-primary-tint);
  color: var(--color-primary-deep);
  font-weight: 600;
}

.tool-reference summary .tool-summary {
  flex: 1;
  font-size: 14px;
  color: var(--color-text-muted);
}

.tool-reference summary::after {
  content: "+";
  font-size: 22px;
  color: var(--color-primary);
  width: 24px;
  text-align: center;
  font-weight: 400;
}

.tool-reference[open] summary::after { content: "−"; }

.tool-reference-body { padding: 20px 22px 24px; }

.tool-params {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 13.5px;
}

.tool-params th,
.tool-params td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--color-border-soft);
  vertical-align: top;
}

.tool-params th {
  font-weight: 700;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-dim);
}

.tool-params code { font-size: 12.5px; }

.tool-params .req {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--color-primary-tint);
  color: var(--color-primary-deep);
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-params .opt {
  display: inline-block;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--color-surface-deep);
  color: var(--color-text-muted);
  border-radius: 3px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- OAuth flow diagram --- */

.flow-diagram {
  margin: 24px 0;
  padding: 28px 24px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
  overflow-x: auto;
}

.flow-diagram svg {
  width: 100%;
  min-width: 640px;
  max-width: 920px;
  display: block;
  margin: 0 auto;
  height: auto;
}

/* --- Screenshot placeholder --- */

.figure {
  margin: 24px 0;
}

.figure-frame {
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--color-surface-soft), var(--color-surface-soft) 12px, var(--color-bg) 12px, var(--color-bg) 24px);
  padding: 48px 24px;
  text-align: center;
  color: var(--color-text-dim);
  font-size: 13px;
  font-style: italic;
  line-height: 1.55;
}

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

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

.faq {
  margin: 24px 0;
  border-top: 1px solid var(--color-border-soft);
}

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

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 36px 18px 0;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--color-text);
  position: relative;
  transition: color var(--t);
}

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

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238753d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transform: translateY(-50%);
  transition: transform var(--t);
}

.faq details[open] summary::after { transform: translateY(-50%) rotate(180deg); }

.faq summary:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 4px; }

.faq-body {
  padding: 0 0 18px;
  color: var(--color-text-muted);
  font-size: 14.5px;
  line-height: 1.65;
}

.faq-body p { margin: 8px 0; }

/* --- Legal pages: TOC + key clause --- */

.toc {
  margin: 16px 0 32px;
  padding: 18px 22px;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius);
}

.toc-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-dim);
  margin-bottom: 12px;
}

.toc-label::before {
  content: "";
  width: 14px;
  height: 14px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2'><line x1='8' y1='6' x2='21' y2='6'/><line x1='8' y1='12' x2='21' y2='12'/><line x1='8' y1='18' x2='21' y2='18'/><line x1='3' y1='6' x2='3.01' y2='6'/><line x1='3' y1='12' x2='3.01' y2='12'/><line x1='3' y1='18' x2='3.01' y2='18'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' fill='none' stroke='currentColor' stroke-width='2'><line x1='8' y1='6' x2='21' y2='6'/><line x1='8' y1='12' x2='21' y2='12'/><line x1='8' y1='18' x2='21' y2='18'/><line x1='3' y1='6' x2='3.01' y2='6'/><line x1='3' y1='12' x2='3.01' y2='12'/><line x1='3' y1='18' x2='3.01' y2='18'/></svg>") center/contain no-repeat;
}

.toc ol {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 28px;
}

.toc li {
  counter-increment: toc;
  break-inside: avoid;
  margin: 4px 0;
  font-size: 14px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.toc li::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-dim);
  letter-spacing: 0.04em;
  flex: none;
}

.toc a { color: var(--color-text-body); border-bottom: none; }
.toc a:hover { color: var(--color-primary); }

.key-clause {
  margin: 18px 0;
  padding: 14px 16px 14px 18px;
  border-left: 3px solid var(--color-primary);
  background: var(--color-primary-tint-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  gap: 12px;
}

.key-clause-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--color-primary-deep);
}

.key-clause-body { font-size: 14.5px; color: var(--color-text); line-height: 1.55; }

.key-clause-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-primary-deep);
  margin-bottom: 4px;
}

hr.section-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-divider), transparent);
  margin: 40px 0;
}

/* --- Footer --- */

.site-footer {
  border-top: 1px solid var(--color-border-soft);
  padding: 56px 24px 32px;
  background: var(--color-surface-soft);
  font-size: 14px;
  color: var(--color-text-muted);
}

.site-footer-inner {
  max-width: var(--max-wide);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
}

.footer-brand .topnav-brand { margin-bottom: 12px; }

.footer-brand p {
  margin: 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer-col-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 13.5px;
  border-bottom: none;
}

.footer-links a:hover { color: var(--color-primary); }

.footer-meta {
  grid-column: 1 / -1;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-soft);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.footer-meta .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.footer-meta .status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #15803d;
  box-shadow: 0 0 0 3px rgba(21, 128, 61, 0.15);
}

@media (max-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .site-footer-inner { grid-template-columns: 1fr; }
}

/* --- Motion: fade-up on scroll --- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Responsive tweaks --- */

@media (max-width: 720px) {
  main { padding: 32px 16px 64px; }
  .hero { padding: 56px 20px 40px; }
  .section, .section--dark { padding: 48px 0; }
  .section-inner { padding: 0 20px; }
  .toc ol { columns: 1; }
}
