:root {
  --bg: #FAFAF7;
  --ink: #26292B;
  --ink-muted: #4A4A4A;
  --ink-subtle: #595959;
  --ink-dark: #1A1A1A;
  --ink-inverse: #F5F4EF;
  --heading: #101315;
  --accent: #106D7D;
  --accent-deep: #0C5A66;
  --accent-tint-05: rgba(16, 109, 125, 0.05);
  --accent-tint-08: rgba(16, 109, 125, 0.08);
  --accent-tint-10: rgba(16, 109, 125, 0.1);
  --accent-tint-20: rgba(16, 109, 125, 0.2);
  --accent-tint-25: rgba(16, 109, 125, 0.25);
  --accent-tint-35: rgba(16, 109, 125, 0.35);
  --rule: #E5E4DD;
  --surface: #F4F3EE;
  --white: #FFFFFF;
  --white-tint-22: rgba(255, 255, 255, 0.22);
  --alert: #B03826;
  --alert-tint-08: rgba(239, 99, 81, 0.08);
  --alert-tint-22: rgba(239, 99, 81, 0.22);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Visually hidden but available to screen readers — used to keep the
   heading outline complete (About/License sections) without changing
   the visual design. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

/* Editorial serif for display headings */
h1, h2 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  letter-spacing: -0.015em;
}

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

a:hover {
  color: var(--accent-deep);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a,
button,
.fp-starter,
.site-nav-cta,
.btn-hero,
.btn-hero-ghost,
.btn-framework,
.btn-buddy,
.kit-form button,
.fp-suggest {
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

a:active,
button:active,
.fp-starter:active,
.site-nav-cta:active,
.btn-hero:active,
.btn-hero-ghost:active,
.btn-framework:active,
.btn-buddy:active,
.kit-form button:active,
.fp-suggest:active {
  transform: translateY(1px);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Page layout ---- */
.frameworks-page {
  flex: 1;
  padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(4rem, 8vw, 6.5rem);
}

.frameworks-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--rule);
}

.frameworks-header h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}

.tagline {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- Connection banner ---- */
.frameworks-connection {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 1.5rem 2rem;
  background: var(--accent-tint-05);
  border: 1px solid var(--accent-tint-20);
  border-radius: 16px;
  text-align: center;
}

.connection-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-tint-10);
  border: 1px solid var(--accent-tint-25);
  border-radius: 50px;
  padding: 0.2rem 0.7rem;
  margin-bottom: 1rem;
}

.frameworks-connection p {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.65;
  margin: 0;
}

/* ---- Framework sections ---- */
.framework-section {
  max-width: 900px;
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

@supports (animation-timeline: view()) {
  .framework-section {
    animation: fp-rise both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }

  @keyframes fp-rise {
    from {
      opacity: 0.2;
      transform: translateY(18px);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

.framework-card {
  background: var(--white);
  border: 1px solid #E9E8E2;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16, 19, 21, 0.04), 0 16px 40px rgba(16, 19, 21, 0.05);
  padding: clamp(1.75rem, 4vw, 3rem);
}

.framework-card p,
.framework-card li {
  line-height: 1.65;
}

.framework-header {
  margin-bottom: 2.25rem;
}

.framework-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  margin-bottom: 0.5rem;
}

.past-badge {
  color: var(--accent);
  background: var(--accent-tint-10);
  border: 1px solid var(--accent-tint-25);
}

.shape-badge {
  color: var(--alert);
  background: var(--alert-tint-08);
  border: 1px solid var(--alert-tint-22);
}

.framework-header h2 {
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  line-height: 1.15;
  margin-bottom: 0.2rem;
}

.framework-subtitle {
  font-size: 1rem;
  color: var(--ink-muted);
  font-style: italic;
  margin: 0;
}

.framework-intro {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* ---- Element cards ---- */
/* Fixed 4-up grid so cards never wrap into an orphaned column */
.elements-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

/* 5 cards: centred flex-wrap keeps every row balanced (5 → 3+2 → 2+2+1) */
.elements-grid-5 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.elements-grid-5 .element-card {
  flex: 1 1 140px;
  min-width: 140px;
}

.element-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
}

.element-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  font-weight: 700;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.shape-letter {
  background: var(--alert);
}

.element-card h3 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.element-question {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin-bottom: 0.35rem;
}

.element-prevents {
  font-size: 0.72rem;
  color: var(--ink-subtle);
  font-style: italic;
  margin: 0;
}

/* ---- Exercise / callout ---- */
.framework-exercise {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.framework-exercise h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: var(--ink-dark);
}

.framework-exercise blockquote {
  font-size: 0.95rem;
  color: var(--ink-muted);
  border-left: 3px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1rem 0;
  font-style: italic;
  line-height: 1.65;
}

.framework-exercise p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0;
}

/* ---- Levels ---- */
.framework-levels {
  margin-bottom: 2rem;
}

.framework-levels h4 {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.framework-levels ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.framework-levels li {
  font-size: 0.9rem;
  color: var(--ink-muted);
  padding: 0.35rem 0;
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.5;
}

.framework-levels li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---- Links ---- */
.framework-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-framework {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint-08);
  border: 1px solid var(--accent-tint-25);
  border-radius: 8px;
  text-decoration: none;
}

.btn-framework:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* GitHub SVG icon */
.github-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  flex-shrink: 0;
}

/* ---- Framework Prompter ---- */
.buddy-badge {
  color: var(--accent);
  background: var(--accent-tint-10);
  border: 1px solid var(--accent-tint-25);
}

.buddy-label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.buddy-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-dark);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  line-height: 1.5;
  transition: border-color 150ms ease;
  resize: vertical;
  min-height: 70px;
}

.buddy-textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.buddy-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 1.25rem;
}

/* Vendor alignment strip */
.fp-vendors {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  background: var(--accent-tint-05);
  border: 1px solid var(--accent-tint-20);
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.fp-vendors strong { color: var(--ink-dark); }

.fp-vendor-updated {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--ink-subtle);
  font-style: italic;
}

.fp-starters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

.fp-starter,
#fp-expand-all,
.fp-next {
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint-05);
  border: 1px solid var(--accent-tint-25);
  border-radius: 50px;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
}

.fp-starter:hover,
#fp-expand-all:hover,
.fp-next:hover { background: var(--accent-tint-10); }

.fp-starter:focus-visible,
#fp-expand-all:focus-visible,
.fp-next:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fp-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.5rem 0 0.75rem;
}

#fp-step {
  color: var(--ink-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Format toggle */
.fp-format {
  display: inline-flex;
  border: 1px solid var(--accent-tint-35);
  border-radius: 8px;
  overflow: hidden;
}

.fp-format button {
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
}

.fp-format button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--white);
}

.fp-format button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.fp-format-note { font-size: 0.72rem; color: var(--ink-subtle); font-style: italic; }

/* Workbench cards */
.fp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 700px) {
  .fp-grid { grid-template-columns: 1fr; }
}

.fp-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
  transition: max-height 220ms ease, opacity 180ms ease;
}

.fp-card-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: inherit;
  background: transparent;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.fp-card-head:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.fp-card-head .element-letter {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  border-radius: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
}

.fp-card-title { color: var(--heading); font-size: 1rem; font-weight: 700; flex: 1; }

.fp-card-body {
  display: grid;
  grid-template-rows: auto;
  gap: 0.5rem;
  max-height: 800px;
  visibility: visible;
  opacity: 1;
  padding-top: 0.5rem;
  transition: grid-template-rows 220ms ease, max-height 220ms ease, opacity 180ms ease, visibility 0s linear;
}

.fp-card.fp-collapsed {
  max-height: 70px;
  opacity: 0.78;
}

.fp-card.fp-collapsed .fp-card-body {
  grid-template-rows: 0fr;
  max-height: 0;
  visibility: hidden;
  opacity: 0;
  padding-top: 0;
  overflow: hidden;
  transition: grid-template-rows 220ms ease, max-height 220ms ease, opacity 120ms ease, visibility 0s linear 220ms;
}

.fp-count {
  font-size: 0.7rem;
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
}

.fp-question {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0;
}

.fp-card .buddy-textarea {
  background: var(--white);
  min-height: 88px;
  font-size: 0.9rem;
}

.fp-tips {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fp-tips li {
  font-size: 0.72rem;
  color: var(--ink-subtle);
  line-height: 1.45;
  padding-left: 1rem;
  position: relative;
}

.fp-tips li::before {
  content: '💡';
  position: absolute;
  left: 0;
  font-size: 0.6rem;
  top: 0.15em;
}

.fp-example {
  color: var(--ink-muted);
  font-size: 0.75rem;
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
}

.fp-example summary { color: var(--accent); font-weight: 600; cursor: pointer; }
.fp-example p { margin: 0.45rem 0 0; line-height: 1.5; }

.fp-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.fp-next { margin-left: auto; }

.fp-suggest {
  align-self: flex-start;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent-tint-35);
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  cursor: pointer;
}

.fp-suggest:hover:not(:disabled) { background: var(--accent-tint-08); }
.fp-suggest:disabled { opacity: 0.55; cursor: wait; }
.fp-suggest:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.fp-meter {
  font-size: 0.8rem;
  color: var(--ink-subtle);
  margin-bottom: 1rem;
}

.fp-meter strong { color: var(--accent); }

.fp-teams-note {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.82rem;
  color: var(--ink-subtle);
  line-height: 1.6;
}

.fp-teams-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--alert);
  background: var(--alert-tint-08);
  border: 1px solid var(--alert-tint-22);
  border-radius: 50px;
  padding: 0.15rem 0.6rem;
  margin-right: 0.5rem;
}

.fp-howto {
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ---- About strip ---- */
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto 4rem;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

.about-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 1.5rem;
}

.about-card h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.about-card p {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin: 0;
}

.btn-buddy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 1px 2px var(--accent-tint-25);
}

.btn-buddy:hover:not(:disabled) { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-buddy:disabled { opacity: 0.55; cursor: wait; }
.btn-buddy:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.btn-buddy-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent-tint-35);
}

.btn-buddy-ghost:hover:not(:disabled) { background: var(--accent-tint-08); color: var(--accent-deep); }

.buddy-status {
  font-size: 0.875rem;
  color: var(--ink-subtle);
  margin-top: 1rem;
  min-height: 1.4em;
}

.buddy-status.is-error { color: #C0392B; }

.buddy-status.is-thinking::after {
  content: '…';
  animation: buddy-pulse 1.2s ease-in-out infinite;
}

@keyframes buddy-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.buddy-prompt-wrap {
  position: relative;
  margin-bottom: 1.5rem;
}

.buddy-prompt {
  background: var(--heading);
  color: var(--ink-inverse);
  font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 1.75rem;
  padding-top: 3rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 420px;
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.btn-copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-inverse);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--white-tint-22);
  border-radius: 6px;
  padding: 0.3rem 0.9rem;
  cursor: pointer;
}

.btn-copy:hover { background: var(--white-tint-22); }
.btn-copy:focus-visible { outline: 2px solid #F7F4EA; outline-offset: 2px; }

.buddy-read ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.buddy-read li {
  font-size: 0.9rem;
  color: var(--ink-muted);
  padding: 0.35rem 0 0.35rem 1.2rem;
  position: relative;
  line-height: 1.55;
}

.buddy-read li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

/* ---- License ---- */
.license-note {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.license-note p {
  font-size: 0.85rem;
  color: var(--ink-subtle);
  line-height: 1.6;
}

.license-note a {
  color: var(--accent);
}

/* ---- Footer ---- */
footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.85rem;
  color: var(--ink-subtle);
  border-top: 1px solid var(--rule);
}

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

footer a:hover {
  text-decoration: underline;
}

.footer-sep {
  margin: 0 0.5rem;
  color: var(--rule);
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .elements-grid { grid-template-columns: repeat(2, 1fr); } /* clean 2×2 */
  /* Wider basis → SHAPE wraps 3+2 instead of 4+1 */
  .elements-grid-5 .element-card { flex-basis: 170px; }
}

@media (max-width: 768px) {
  html { font-size: 15px; }
  .fp-grid { grid-template-columns: 1fr; }
  .fp-progress { align-items: flex-start; }
  /* Touch targets ≥44px on small screens */
  .fp-suggest { padding: 0.65rem 1rem; }
  .site-nav-cta { padding: 0.6rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .framework-section {
    animation: none !important;
  }
  html { scroll-behavior: auto; }
}

/* ---------- Site nav ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
}

.site-nav-brand {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
  text-decoration: none;
  margin-right: auto;
}

.site-nav-links {
  display: flex;
  gap: 1.25rem;
}

.site-nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
}

.site-nav-links a:hover {
  color: var(--accent);
}

.site-nav-cta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint-08);
  border: 1px solid var(--accent-tint-25);
  border-radius: 50px;
  padding: 0.45rem 1.1rem;
  text-decoration: none;
}

.site-nav-cta:hover {
  background: var(--accent);
  color: var(--white);
}

/* ---------- Hero CTAs ---------- */
.hero-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-hero,
.btn-hero-ghost {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 1.7rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50px;
  text-decoration: none;
}

.btn-hero {
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-hero:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

.btn-hero-ghost {
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent-tint-35);
}

.btn-hero-ghost:hover {
  background: var(--accent-tint-08);
  border-color: var(--accent);
}

.hero-support {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--ink-subtle);
}

/* ---------- Before / after ---------- */
.ba-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 1.25rem;
  align-items: stretch;
  margin: 1.5rem 0;
}

.ba-card {
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  background: var(--white);
}

.ba-before {
  background: var(--surface);
}

.ba-before p {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 1.15rem;
  color: var(--ink-muted);
  margin-top: 0.75rem;
}

.ba-after {
  border-color: var(--accent-tint-25);
  box-shadow: 0 1px 0 var(--accent-tint-08), 0 12px 32px -18px var(--accent-tint-20);
}

.ba-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.ba-past {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.5rem;
}

.ba-past div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 0.75rem;
  align-items: baseline;
}

.ba-past dt {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
}

.ba-past dd {
  margin: 0;
  font-size: 0.925rem;
  color: var(--ink);
}

.ba-caption {
  font-size: 0.9rem;
  color: var(--ink-subtle);
  margin-top: 0.5rem;
}

.ba-caption a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.ba-caption a:hover {
  text-decoration: underline;
}

/* ---------- Demo video ---------- */
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--surface);
  margin-top: 1rem;
}

/* ---------- Trust list ---------- */
.trust-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.5rem;
}

.trust-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.trust-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}

/* ---------- Prompter privacy line ---------- */
.fp-privacy {
  font-size: 0.85rem;
  color: var(--ink-subtle);
  margin: -0.25rem 0 1.25rem;
}

/* ---------- Newsletter / Kit form ---------- */
.newsletter-card {
  border-color: var(--accent-tint-25);
}

.kit-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 1.25rem 0 0.75rem;
}

.kit-form input[type="email"] {
  flex: 1 1 260px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--ink-dark);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 50px;
  padding: 0.7rem 1.2rem;
}

.kit-form input[type="email"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.kit-form button {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--white);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 50px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
}

.kit-form button:hover {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* ---------- New-section responsive ---------- */
@media (max-width: 768px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 1rem 1.25rem;
  }

  .site-nav-links {
    order: 3;
    width: 100%;
    gap: 1rem;
  }

  .ba-grid {
    grid-template-columns: 1fr;
  }

  .trust-list {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .btn-hero,
  .btn-hero-ghost {
    justify-content: center;
  }
}

/* ==========================================================================
   Scrollytelling (homepage) — every rule here is gated behind .has-scrollfx,
   a class scroll.js adds to <html> ONLY when GSAP has loaded AND the visitor
   allows motion. No JS, blocked CDN, or reduced-motion → none of this applies
   and the page reads exactly as before.
   ========================================================================== */

/* GSAP owns section reveals when active — kill the CSS-only fallback so
   sections don't animate twice. */
html.has-scrollfx .framework-section {
  animation: none;
}

/* ---- Hero: the prompt hoard ---- */
/* Chips overflow the 800px hero column on purpose; clip at the page edge. */
html.has-scrollfx .frameworks-page {
  overflow-x: clip;
}

html.has-scrollfx .frameworks-header {
  position: relative;
}

.hero-chips {
  display: none; /* decoration exists only for the scrollfx experience */
}

html.has-scrollfx .hero-chips {
  display: block;
  position: absolute;
  inset: -2rem -14vw 0;
  pointer-events: none;
  z-index: -1;
}

.hero-chip {
  position: absolute;
  width: 8.5rem;
  padding: 0.65rem 0.75rem 0.75rem;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  box-shadow: 0 6px 18px -8px rgba(16, 19, 21, 0.18);
  opacity: 0.55;
}

.hero-chip::before {
  content: '';
  display: block;
  height: 0.45rem;
  width: 55%;
  border-radius: 3px;
  background: var(--accent-tint-25);
  margin-bottom: 0.5rem;
}

.hero-chip::after {
  content: '';
  display: block;
  border-radius: 3px;
  /* fake "saved prompt" text lines */
  height: 1.7rem;
  background: repeating-linear-gradient(
    to bottom,
    var(--rule) 0 0.3rem,
    transparent 0.3rem 0.75rem
  );
}

.hero-chip--note {
  background: #FBF7E9; /* sticky-note warmth, still in the cream family */
  border-color: #EDE5C8;
}

.hero-chip--stamp::before {
  content: 'Saved.';
  height: auto;
  width: auto;
  display: inline-block;
  background: none;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent-tint-35);
  border-radius: 3px;
  padding: 0.1rem 0.35rem;
  transform: rotate(-4deg);
}

/* Hero entrance initial states. The h1 is the LCP element — transform only,
   never opacity, so first paint is unaffected. */
html.has-scrollfx .frameworks-header h1 {
  transform: translateY(26px);
}

html.has-scrollfx .frameworks-header .tagline,
html.has-scrollfx .frameworks-header .hero-ctas,
html.has-scrollfx .frameworks-header .hero-support {
  opacity: 0;
  transform: translateY(18px);
}

/* ---- Pinned before/after morph ---- */
html.has-scrollfx .ba-grid {
  perspective: 900px;
}

html.has-scrollfx .ba-past div {
  opacity: 0;
  transform: translateY(14px) scale(1.08);
  transform-origin: left center;
}

/* ---- PAST element cards fly-in ---- */
/* Like [data-reveal], the cards' hidden state is applied inline by scroll.js,
   not here: their tween ends with clearProps, and clearing must fall back to
   the resting state, not a rotated/offset one. */
html.has-scrollfx .elements-grid {
  perspective: 900px;
}

/* Calm-zone reveals ([data-reveal]) deliberately have NO stylesheet-hidden
   state: scroll.js hides them inline via gsap.set, because their tweens end
   with clearProps and clearing must land on the visible state, not a hidden
   one. */

/* Chips are not worth their pixels on small screens, and the pin never
   activates there (scroll.js matchMedia) — but the initial states above
   still apply, so the mobile GSAP branch must reveal everything hidden. */
@media (max-width: 768px) {
  html.has-scrollfx .hero-chips {
    display: none;
  }
}

/* ---- Before/after step rail (injected by scroll.js when the morph runs) ---- */
.ba-steps {
  margin-bottom: 1.25rem;
}

.ba-steps-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ba-step {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--white);
  border: 1px solid var(--accent-tint-25);
  border-radius: 50px;
  padding: 0.35rem 0.9rem 0.35rem 0.4rem;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}

.ba-step:hover {
  background: var(--accent-tint-08);
  border-color: var(--accent);
}

.ba-step:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ba-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  font-size: 0.75rem;
  background: var(--accent-tint-10);
}

/* Steps the sequence has passed */
.ba-step.is-done {
  background: var(--accent-tint-08);
  border-color: var(--accent-tint-35);
}

/* The beat currently landing */
.ba-step[aria-current="step"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.ba-step[aria-current="step"] .ba-step-num {
  background: var(--white-tint-22);
}

.ba-steps-hint {
  font-size: 0.8rem;
  color: var(--ink-subtle);
  margin-top: 0.6rem;
}

/* Touch targets ≥44px on small screens, matching the site's mobile pass */
@media (max-width: 768px) {
  .ba-step {
    padding: 0.55rem 1rem 0.55rem 0.5rem;
  }
}
