/* ============================================================
   Content To Clients — playbook
   Ported from the "Tribe Playbooks" Claude Design canvas.
   ============================================================ */

:root {
  --ink: #171C26;
  --muted: #6B7280;
  --faint: #9CA3AF;
  --blue: #2463EB;
  --blue-dark: #1D4FBC;
  --blue-light: #8AB0F5;
  --purple: #7C3AED;
  --green: #22C55E;
  --border: #E2E4E9;
  --border-strong: #DCE1EA;
  --surface: #F5F6F8;
  --bg: #F8F9FC;
  --white: #FFFFFF;

  --hairline: 0.67px;
  --radius: 16px;
  --nav-h: 54px;

  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06);
  --shadow-md: 0 6px 12px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.18);

  --grad-brand: linear-gradient(90deg, #2463EB, #7C3AED);
  --grad-email: linear-gradient(to bottom right, #22C55E, #10B981);
  --grad-video: linear-gradient(to bottom right, #F59E0B, #EF4444);
  --grad-social: linear-gradient(to bottom right, #0EA5E9, #6366F1);
  --grad-ppc: linear-gradient(to bottom right, #3B82F6, #0EA5E9);
  --grad-training: linear-gradient(to bottom right, #F59E0B, #EAB308);
  --grad-ai: linear-gradient(to bottom right, #7C3AED, #D946EF);
  --grad-more: linear-gradient(to bottom right, #6B7280, #9CA3AF);
  --grad-doc: linear-gradient(to bottom right, #3B82F6, #0EA5E9);
  --grad-chat: linear-gradient(to bottom right, #0EA5E9, #6366F1);
  --grad-chart: linear-gradient(to bottom right, #7C3AED, #D946EF);
  --grad-check: linear-gradient(to bottom right, #22C55E, #10B981);
}

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

/* The hidden attribute must beat author display rules (flex/grid) on toggled elements. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }

h1, h2 { font-weight: 500; letter-spacing: -0.025em; text-wrap: balance; margin: 0; }

.shell { max-width: 1140px; margin: 0 auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* ---------------- animations ---------------- */

@keyframes ccFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ccDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ccChipFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

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

/* ---------------- shared atoms ---------------- */

.icon-box {
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: var(--shadow-sm);
}
.icon-box svg { display: block; }
.icon-box path { fill: none; stroke: var(--white); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

.icon-box--sm { width: 40px; height: 40px; border-radius: 14px; }
.icon-box--md { width: 44px; height: 44px; }
.icon-box--lg { width: 48px; height: 48px; }
.icon-box--xl { width: 52px; height: 52px; }

.icon-email    { background: var(--grad-email); }
.icon-video    { background: var(--grad-video); }
.icon-social   { background: var(--grad-social); }
.icon-ppc      { background: var(--grad-ppc); }
.icon-training { background: var(--grad-training); }
.icon-ai       { background: var(--grad-ai); }
.icon-more     { background: var(--grad-more); }
.icon-doc      { background: var(--grad-doc); }
.icon-chat     { background: var(--grad-chat); }
.icon-chart    { background: var(--grad-chart); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 5px 14px;
  flex: none;
}

.btn-round {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  width: 30px;
  height: 30px;
  border-radius: 9999px;
  border: var(--hairline) solid var(--border);
  background: var(--white);
  color: var(--ink);
  font-size: 15px;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1;
}
.btn-round:hover { border-color: var(--blue); color: var(--blue); }

.dot {
  appearance: none;
  cursor: pointer;
  border: none;
  padding: 0;
  height: 7px;
  border-radius: 9999px;
  width: 7px;
  background: #D3DFF5;
  transition: all 0.25s;
}
.dot[aria-selected="true"] { width: 22px; background: var(--blue); }
.dot--done { background: var(--green); }

.dot-row { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }

/* ---------------- chapter heading rule ---------------- */

.chapter-rule { display: flex; align-items: center; gap: 16px; }
.chapter-rule .line { height: var(--hairline); flex: 1; background: var(--border); }
.chapter-rule .eyebrow {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  flex: none;
  text-transform: capitalize;
}
.chapter-rule .pill {
  color: var(--blue);
  border: var(--hairline) solid rgba(36, 99, 235, 0.3);
}

.chapter-rule--dark .line { background: rgba(255, 255, 255, 0.14); }
.chapter-rule--dark .eyebrow { color: rgba(255, 255, 255, 0.55); }
.chapter-rule--dark .pill {
  color: var(--blue-light);
  border-color: rgba(138, 176, 245, 0.35);
}

/* ---------------- section bands ---------------- */

section[id] { scroll-margin-top: 72px; }

.band {
  padding: 96px 24px;
  background: var(--white);
}
.band--rule-top { border-top: var(--hairline) solid var(--border); }
.band--rule-both {
  border-top: var(--hairline) solid var(--border);
  border-bottom: var(--hairline) solid var(--border);
}
.band--tint { background: var(--bg); }

.band--dark {
  background: var(--ink);
  background-image:
    radial-gradient(900px 560px at 15% -20%, rgba(59, 130, 246, 0.16), transparent 60%),
    radial-gradient(760px 480px at 105% 110%, rgba(124, 58, 237, 0.13), transparent 60%);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  gap: 32px 64px;
  margin-top: 44px;
  align-items: flex-end;
  justify-content: space-between;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.08;
  flex: 1 1 380px;
  min-width: 300px;
  max-width: 560px;
}
.section-head p {
  font-size: 16.5px;
  line-height: 27px;
  color: var(--muted);
  margin: 0;
  text-wrap: pretty;
  flex: 0 1 420px;
  min-width: 280px;
}
.band--dark .section-head h2 { color: var(--white); }
.band--dark .section-head p { color: rgba(255, 255, 255, 0.6); }

/* ---------------- hero ---------------- */

.hero {
  background-image:
    radial-gradient(960px 640px at 10% -10%, rgba(92, 139, 240, 0.14), transparent 60%),
    radial-gradient(800px 640px at 110% 10%, rgba(179, 125, 232, 0.12), transparent 60%),
    radial-gradient(960px 640px at 50% 120%, rgba(62, 186, 244, 0.10), transparent 60%);
  padding: 48px 24px;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero__orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__orb--1 {
  width: 560px; height: 560px; left: -140px; top: -180px;
  background: radial-gradient(circle, rgba(92, 139, 240, 0.16), transparent 65%);
}
.hero__orb--2 {
  width: 520px; height: 520px; right: -120px; top: -60px;
  background: radial-gradient(circle, rgba(179, 125, 232, 0.14), transparent 65%);
}

.hero__chips { position: absolute; inset: 0; pointer-events: none; }
@media (max-width: 1020px) { .hero__chips { display: none; } }

.hero__chip-wrap {
  position: absolute;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  animation: ccFadeUp 0.6s ease both;
}
.hero__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: var(--hairline) solid var(--border);
  border-radius: 9999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #4B5563;
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
  white-space: nowrap;
  animation: ccChipFloat 8s ease-in-out infinite;
}
.hero__chip .swatch { width: 7px; height: 7px; border-radius: 50%; }

.hero__inner { max-width: 1140px; margin: 0 auto; width: 100%; position: relative; }
.hero__col { text-align: center; max-width: 780px; margin: 0 auto; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: var(--hairline) solid rgba(36, 99, 235, 0.25);
  border-radius: 9999px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  animation: ccFadeUp 0.5s ease both;
}

.hero h1 {
  font-size: clamp(40px, 5.6vw, 66px);
  letter-spacing: -0.03em;
  line-height: 1.04;
  margin: 22px 0 0;
  animation: ccFadeUp 0.5s 0.05s ease both;
}

.grad-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  font-size: 19px;
  line-height: 30px;
  color: var(--muted);
  max-width: 600px;
  margin: 22px auto 0;
  text-wrap: pretty;
  animation: ccFadeUp 0.5s 0.1s ease both;
}

.hero__actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
  flex-wrap: wrap;
  animation: ccFadeUp 0.5s 0.15s ease both;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border: var(--hairline) solid rgba(36, 99, 235, 0.85);
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 16px 12px 26px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 6px 12px -2px rgba(36, 99, 235, 0.35);
}
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-primary .glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  margin-left: 6px;
  font-size: 13px;
  line-height: 1;
}

/* ---------------- sticky chapter nav ---------------- */

.chapternav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: var(--hairline) solid var(--border);
  border-bottom: var(--hairline) solid var(--border);
}
.chapternav__bar {
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 32px;
  height: var(--nav-h);
  position: relative;
}
.chapternav__brand { flex: none; font-size: 14px; font-weight: 600; color: var(--ink); }
.chapternav__brand span { color: var(--blue); }
.chapternav__divider { flex: none; width: 1px; height: 18px; background: var(--border); }

.chapternav__current {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}
.chapternav__num {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.chapternav__label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapternav__toggle {
  flex: none;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  border: var(--hairline) solid rgba(0, 0, 0, 0.1);
  border-radius: 9999px;
  padding: 7px 16px;
}
.chapternav__toggle:hover { border-color: var(--blue); color: var(--blue); }
.chapternav__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.chapternav__toggle .chev { font-size: 10px; }

.chapternav__cta {
  flex: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--white);
  background: var(--blue);
  padding: 8px 16px;
  border-radius: 9999px;
}
.chapternav__cta:hover { background: var(--blue-dark); color: var(--white); }

.chapternav__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 20px;
  width: min(640px, calc(100vw - 40px));
  background: var(--white);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 2px;
  animation: ccDrop 0.18s ease both;
}
.chapternav__menu[hidden] { display: none; }

.chapternav__link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 400;
  padding: 9px 12px;
  border-radius: 10px;
  background: transparent;
}
.chapternav__link:hover { background: rgba(36, 99, 235, 0.06); color: var(--ink); }
.chapternav__link[aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
  background: rgba(36, 99, 235, 0.06);
}
.chapternav__link .n {
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}

.chapternav__track { height: 2px; background: transparent; margin-top: -2px; position: relative; }
.chapternav__progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 2px;
  background: var(--grad-brand);
  width: 0%;
  transition: width 0.1s linear;
}

/* ---------------- ch 01 · why ---------------- */

.why__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  margin-top: 44px;
  align-items: center;
}
.why__copy { flex: 1 1 420px; min-width: 300px; }
.why__copy h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; }
.why__copy p {
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
  margin: 20px 0 0;
  text-wrap: pretty;
}
.why__copy p + p { margin-top: 14px; }
.why__copy strong { font-weight: 500; color: var(--ink); }

.why__steps { flex: 1 1 400px; min-width: 300px; }

.kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.steps-stack {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.step-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--white);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 24px;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s, box-shadow 0.2s;
}
.step-card:hover { transform: translateX(4px); }
.step-card--1:hover {
  border-color: rgba(36, 99, 235, 0.4);
  box-shadow: 0 10px 24px -8px rgba(36, 99, 235, 0.25);
}
.step-card--2:hover {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 10px 24px -8px rgba(99, 102, 241, 0.25);
}
.step-card--3 {
  background: linear-gradient(to bottom right, #F5F6F8, #F4EEFC);
  border-color: rgba(124, 58, 237, 0.3);
  box-shadow: 0 12px 24px -8px rgba(124, 58, 237, 0.18);
}

.step-card__ghost {
  position: absolute;
  right: -6px;
  bottom: -24px;
  font-size: 88px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  pointer-events: none;
  color: rgba(36, 99, 235, 0.06);
}
.step-card--2 .step-card__ghost { color: rgba(99, 102, 241, 0.06); }
.step-card--3 .step-card__ghost { color: rgba(124, 58, 237, 0.08); }

.step-card__n {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.step-card--3 .step-card__n { color: var(--purple); }
.step-card__title { font-size: 18px; font-weight: 500; line-height: 1.3; margin-top: 3px; }

/* ---------------- ch 02 · proof ---------------- */

.proof__panel {
  margin-top: 56px;
  background: rgba(255, 255, 255, 0.04);
  border: var(--hairline) solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 48px);
}
.proof__slide {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.proof__quote-col { flex: 1.15 1 420px; min-width: 300px; animation: ccFadeUp 0.3s ease both; }
.proof__quote {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--white);
  margin: 26px 0 0;
  text-wrap: balance;
}
.proof__quote .hl {
  background: linear-gradient(90deg, #5C9DFF, #B37DE8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.proof__story {
  font-size: 16.5px;
  line-height: 27px;
  color: rgba(255, 255, 255, 0.65);
  margin: 24px 0 0;
  text-wrap: pretty;
}
.proof__byline { display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.proof__avatar {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  flex: none;
  background: var(--white) center top / cover no-repeat;
}
.proof__initials {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: var(--grad-ppc);
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  flex: none;
}
.proof__name { font-size: 16px; font-weight: 500; color: var(--white); }
.proof__business { font-size: 13.5px; color: rgba(255, 255, 255, 0.5); margin-top: 2px; }

.proof__shot-col {
  flex: 1 1 380px;
  min-width: 300px;
  position: relative;
  padding-bottom: 22px;
  animation: ccFadeUp 0.3s 0.05s ease both;
}

.browser {
  border-radius: var(--radius);
  overflow: hidden;
  border: var(--hairline) solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.55);
  background: #0B0F17;
}
.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: var(--hairline) solid rgba(255, 255, 255, 0.1);
  padding: 10px 14px;
}
.browser__dot {
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  flex: none;
}
.browser__url {
  flex: 1;
  margin-left: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 12px;
  text-align: center;
}
.browser__shot { height: 420px; background: #0B0F17 top center / 100% auto no-repeat; }
.browser__placeholder {
  height: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: repeating-linear-gradient(
    -45deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.03) 12px,
    transparent 12px,
    transparent 24px
  );
  text-align: center;
  padding: 36px;
}
.browser__placeholder .ini {
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 15px;
  font-weight: 600;
}
.browser__placeholder .cap {
  font-family: ui-monospace, monospace;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

.result-chip {
  position: absolute;
  bottom: 0;
  left: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.45);
  padding: 12px 18px;
}
.result-chip__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--grad-check);
  display: grid;
  place-items: center;
  flex: none;
}
.result-chip__icon path { fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.result-chip__title { font-size: 15px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
.result-chip__sub { font-size: 12px; color: var(--muted); margin-top: 1px; }

.proof__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  border-top: var(--hairline) solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
}
.proof__dots { display: flex; gap: 7px; }
.proof__dot {
  appearance: none;
  border: none;
  cursor: pointer;
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.25);
  padding: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.proof__dot:hover { opacity: 0.8; }
.proof__dot[aria-selected="true"] { width: 24px; background: var(--blue-light); }

.proof__nav { display: flex; align-items: center; gap: 14px; }
.proof__counter {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
  font-variant-numeric: tabular-nums;
}
.proof__arrows { display: flex; gap: 8px; }
.proof__arrow {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: var(--hairline) solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  font-size: 15px;
  color: var(--white);
  display: grid;
  place-items: center;
  font-family: inherit;
}
.proof__arrow:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------------- ch 03 · problem ---------------- */

.problem__intro { max-width: 720px; margin: 44px auto 0; text-align: center; }
.problem__intro h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.1; }
.problem__intro p {
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
  margin: 20px 0 0;
  text-wrap: pretty;
}

.compare {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 48px;
  justify-content: center;
}
.compare__col {
  flex: 1 1 380px;
  min-width: 300px;
  max-width: 540px;
  background: var(--white);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.compare__col--good {
  border: 1.5px solid var(--blue);
  box-shadow: 0 12px 24px -4px rgba(36, 99, 235, 0.15);
}

.compare__head { display: flex; align-items: center; gap: 10px; }
.compare__head .swatch { width: 8px; height: 8px; border-radius: 9999px; background: var(--faint); flex: none; }
.compare__head .label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.compare__col--good .compare__head .swatch { background: var(--blue); }
.compare__col--good .compare__head .label { color: var(--blue); }

.compare__list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; flex: 1; }

.compare__item { background: hsl(220 14% 96%); border-radius: 12px; padding: 16px 18px; }
.compare__col--good .compare__item {
  background: rgba(36, 99, 235, 0.05);
  border: var(--hairline) solid rgba(36, 99, 235, 0.12);
}
.compare__item-head { display: flex; align-items: center; gap: 8px; }
.compare__item-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #D1D5DB;
  display: grid;
  place-items: center;
  flex: none;
}
/* Beat the base grey at higher specificity so the gradient classes apply. */
.compare__item-icon.icon-doc { background: var(--grad-doc); }
.compare__item-icon.icon-chat { background: var(--grad-chat); }
.compare__item-icon path { fill: none; stroke: var(--white); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.compare__item-kind {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.compare__col--good .compare__item-kind { color: var(--blue); }
.compare__item-title { font-size: 15px; font-weight: 500; line-height: 22px; color: var(--muted); margin-top: 10px; }
.compare__col--good .compare__item-title { color: var(--ink); }
.compare__item p { font-size: 13.5px; line-height: 20px; color: var(--faint); margin: 6px 0 0; }
.compare__col--good .compare__item p { color: var(--muted); }

.compare__foot { font-size: 14px; font-weight: 500; color: var(--muted); margin-top: 20px; }
.compare__col--good .compare__foot { color: var(--blue); }

/* ---------------- ch 04 · framework ---------------- */

.framework__panel {
  margin-top: 48px;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: clamp(28px, 4vw, 52px);
}

.framework__parent-wrap { display: flex; flex-direction: column; align-items: center; }
.framework__parent {
  position: relative;
  max-width: 380px;
  width: 100%;
  background: var(--ink);
  background-image:
    radial-gradient(420px 220px at 50% -40%, rgba(59, 130, 246, 0.35), transparent 70%),
    radial-gradient(320px 180px at 100% 120%, rgba(124, 58, 237, 0.25), transparent 70%);
  border: var(--hairline) solid rgba(138, 176, 245, 0.3);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: 0 16px 32px -8px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  overflow: hidden;
}
.framework__parent .icon-box { box-shadow: 0 8px 16px -4px rgba(59, 130, 246, 0.5); }
.framework__parent-title { font-size: 20px; font-weight: 500; color: var(--white); margin-top: 2px; }
.framework__parent-sub { font-size: 13.5px; color: rgba(255, 255, 255, 0.6); margin-top: 4px; }
.framework__tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 2px; }
.framework__tag {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--blue-light);
  background: rgba(59, 130, 246, 0.15);
  border: var(--hairline) solid rgba(138, 176, 245, 0.25);
  border-radius: 9999px;
  padding: 4px 12px;
}

.framework__stem { width: 2px; height: 18px; background: #B9CDF5; }
.framework__stem-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(36, 99, 235, 0.07);
  border: var(--hairline) solid rgba(36, 99, 235, 0.2);
  border-radius: 9999px;
  padding: 5px 14px;
}

.framework__bus {
  height: 2px;
  background: #B9CDF5;
  margin: 0 calc(100% / 14);
  border-radius: 9999px;
}
.framework__drops { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.framework__drop { width: 2px; height: 16px; background: #B9CDF5; margin: 0 auto; }

.framework__channels {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}
.channel-card {
  background: var(--white);
  border: var(--hairline) solid var(--border-strong);
  border-radius: var(--radius);
  padding: 18px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.05);
}
.channel-card__label { font-size: 13.5px; font-weight: 500; color: var(--ink); }
.channel-card__tagline { font-size: 12px; line-height: 17px; color: var(--muted); }

.framework__foot {
  max-width: 640px;
  margin: 32px auto 0;
  text-align: center;
  font-size: 16px;
  line-height: 26px;
  color: var(--muted);
  text-wrap: pretty;
}
.framework__foot em { font-style: normal; color: var(--ink); font-weight: 500; }

@media (max-width: 900px) {
  .framework__bus { margin: 0 calc(100% / 8); }
  .framework__drops, .framework__channels { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .framework__bus { margin: 0 calc(100% / 4); }
  .framework__drops, .framework__channels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------------- ch 05/06 · split layout ---------------- */

.split {
  display: flex;
  flex-wrap: wrap;
  gap: 56px;
  margin-top: 44px;
  align-items: flex-start;
}
.split__aside { flex: 1 1 380px; min-width: 300px; position: sticky; top: 84px; }
.split__aside h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; }
.split__aside > p {
  font-size: 18px;
  line-height: 29px;
  color: var(--muted);
  margin: 20px 0 0;
  text-wrap: pretty;
}
.split__main { flex: 1.2 1 440px; min-width: 300px; display: flex; flex-direction: column; }

@media (max-width: 860px) {
  .split__aside { position: static; }
}

.widget { margin-top: 28px; }
.widget__head { display: flex; align-items: center; gap: 12px; }
.widget__head .kicker { flex: 1; }
.widget__arrows { display: flex; gap: 6px; }

/* flip card — each face rotates on its own with an opacity handoff at the
   midpoint, so the inactive face can never bleed through mirrored. */
.flip { margin-top: 14px; perspective: 1400px; }
.flip__inner { position: relative; height: 200px; }
.flip__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 22px 24px;
  transition:
    transform 0.55s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0s linear 0.275s;
}
.flip__face--front {
  background: var(--surface);
  border: var(--hairline) solid #DDE0E6;
  transform: rotateY(0deg);
  opacity: 1;
}
.flip__face--back {
  background: rgba(124, 58, 237, 0.06);
  border: var(--hairline) solid rgba(124, 58, 237, 0.25);
  transform: rotateY(180deg);
  opacity: 0;
  pointer-events: none;
}
.flip__inner[data-flipped="true"] .flip__face--front {
  transform: rotateY(-180deg);
  opacity: 0;
  pointer-events: none;
}
.flip__inner[data-flipped="true"] .flip__face--back {
  transform: rotateY(0deg);
  opacity: 1;
  pointer-events: auto;
}
.flip__title { font-size: 17px; font-weight: 500; color: var(--ink); }
.flip__desc { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; text-wrap: pretty; }
.flip__eyebrow {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--purple);
}
.flip__sample {
  font-size: 13.5px;
  line-height: 21px;
  color: var(--ink);
  margin: 10px 0 0;
  font-style: italic;
  overflow: auto;
}
.flip__btn {
  margin-top: auto;
  align-self: flex-start;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
  border: none;
  padding: 12px 0 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--blue);
}
.flip__btn:hover { color: var(--blue-dark); }
.flip__face--back .flip__btn { color: var(--purple); }
.flip__face--back .flip__btn:hover { color: #5B21B6; }

/* numbered process */
.process__row { display: flex; gap: 20px; }
.process__gutter { display: flex; flex-direction: column; align-items: center; flex: none; }
.process__n {
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  background: var(--white);
  border: var(--hairline) solid var(--border);
  color: var(--blue);
  font-size: 14px;
  font-weight: 600;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: var(--shadow-sm);
}
.process__line { width: 2px; flex: 1; background: var(--border); min-height: 16px; }
.process__row:last-child .process__line { display: none; }
.process__body {
  background: var(--white);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 24px;
  margin-bottom: 14px;
  flex: 1;
}
.process__title { font-size: 16.5px; font-weight: 500; }
.process__desc { font-size: 14.5px; line-height: 22px; color: var(--muted); margin: 8px 0 0; }

.process__row--highlight .process__n {
  background: var(--grad-ai);
  border: none;
  color: var(--white);
}
.process__row--highlight .process__body {
  border: 1.5px solid var(--purple);
  box-shadow: 0 6px 12px -2px rgba(124, 58, 237, 0.15);
}
.process__flag {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124, 58, 237, 0.08);
  border: var(--hairline) solid rgba(124, 58, 237, 0.2);
  color: var(--purple);
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 9999px;
  padding: 5px 12px;
}

/* ---------------- ch 06 · test widget ---------------- */

.test { margin-top: 14px; position: relative; min-height: 200px; }
.test__card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--hairline) solid #DDE0E6;
  border-radius: var(--radius);
  padding: 22px 24px;
  animation: ccFadeUp 0.25s ease both;
}
.test__n {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.test__title { font-size: 17px; font-weight: 500; color: var(--ink); margin-top: 10px; }
.test__desc { margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; text-wrap: pretty; }

.test__toggle {
  align-self: flex-start;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 9999px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 16px;
  background: var(--white);
  border: var(--hairline) solid #CBD5E1;
  color: var(--ink);
}
.test__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.test__toggle[aria-pressed="true"] {
  background: var(--green);
  border-color: #16A34A;
  color: var(--white);
}
.test__box {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--white);
  border: var(--hairline) solid #CBD5E1;
}
.test__toggle[aria-pressed="true"] .test__box {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}
.test__box svg { opacity: 0; transition: opacity 0.15s; }
.test__toggle[aria-pressed="true"] .test__box svg { opacity: 1; }
.test__box path { fill: none; stroke: var(--white); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.test__done {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--white);
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 6px 12px -2px rgba(34, 197, 94, 0.2);
  animation: ccFadeUp 0.35s ease both;
}
.test__done-icon {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: var(--grad-check);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 12px -2px rgba(34, 197, 94, 0.35);
}
.test__done-icon path { fill: none; stroke: var(--white); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.test__done-title { font-size: 19px; font-weight: 500; letter-spacing: -0.02em; margin-top: 14px; }
.test__done p { font-size: 13.5px; line-height: 21px; color: var(--muted); margin: 8px 0 0; }
.test__reset {
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  background: none;
  border: none;
  padding: 12px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
}
.test__reset:hover { color: var(--blue-dark); }

/* ---------------- ch 06 · remix column ---------------- */

.article-card {
  background: var(--surface);
  border: var(--hairline) solid #DDE0E6;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 26px 28px;
}
.article-card__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--blue);
  border-radius: 9999px;
  padding: 3px 10px;
}
.article-card__title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-top: 14px;
}
.article-card p {
  font-size: 14.5px;
  line-height: 23px;
  color: var(--muted);
  margin: 12px 0 0;
  text-wrap: pretty;
}

.connector { display: flex; flex-direction: column; align-items: center; }
.connector__line { width: 2px; height: 22px; background: #D3DFF5; }
.connector__label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  border: var(--hairline) solid rgba(36, 99, 235, 0.3);
  border-radius: 9999px;
  padding: 5px 14px;
  background: var(--white);
}

.remix-list { display: flex; flex-direction: column; gap: 14px; }
.remix-card {
  background: var(--white);
  border: var(--hairline) solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px 26px;
}
.remix-card__head { display: flex; align-items: center; gap: 14px; }
.remix-card__meta { display: flex; flex-direction: column; gap: 3px; }
.remix-card__kicker {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
}
.remix-card__title { font-size: 17px; font-weight: 500; line-height: 1.35; }
.remix-card p {
  font-size: 14px;
  line-height: 22px;
  color: var(--muted);
  margin: 14px 0 0;
  text-wrap: pretty;
}

/* ---------------- workshop ---------------- */

.workshop {
  background: var(--ink);
  background-image:
    radial-gradient(900px 500px at 50% -30%, rgba(36, 99, 235, 0.3), transparent 65%),
    radial-gradient(700px 500px at 100% 120%, rgba(124, 58, 237, 0.25), transparent 60%);
  padding: 104px 24px 88px;
}
.workshop__shell { max-width: 1040px; margin: 0 auto; }
.workshop__grid { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.workshop__copy { flex: 1.2 1 380px; min-width: 280px; }
.workshop__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.15);
  border: var(--hairline) solid rgba(138, 176, 245, 0.3);
  color: var(--blue-light);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 6px 14px;
}
.workshop__copy h2 {
  font-size: clamp(32px, 4.4vw, 50px);
  letter-spacing: -0.03em;
  line-height: 1.07;
  margin: 20px 0 0;
  color: var(--white);
}
.workshop__copy > p {
  font-size: 18px;
  line-height: 29px;
  color: rgba(255, 255, 255, 0.6);
  margin: 20px 0 0;
  text-wrap: pretty;
}
.workshop__actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.workshop__cta {
  background: var(--blue);
  color: var(--white);
  border: var(--hairline) solid rgba(36, 99, 235, 0.85);
  border-radius: 18px;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 28px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 12px -2px rgba(36, 99, 235, 0.4);
}
.workshop__cta:hover { background: var(--blue-dark); color: var(--white); }
.workshop__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--blue-light);
  padding: 13px 4px;
  display: inline-flex;
  align-items: center;
}
.workshop__link:hover { color: var(--white); text-decoration: underline; }

.pro {
  flex: 1 1 300px;
  min-width: 280px;
  background: rgba(255, 255, 255, 0.05);
  border: var(--hairline) solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 34px 32px;
}
.pro__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.07);
  border: var(--hairline) solid rgba(255, 255, 255, 0.14);
  border-radius: 9999px;
  padding: 6px 14px;
}
.pro__badge .name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white);
}
.pro__badge .sep { font-size: 12px; color: rgba(255, 255, 255, 0.35); }
.pro__badge .soon {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue-light);
}
.pro__title {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--white);
  margin-top: 18px;
  text-wrap: balance;
}
.pro__title span { color: var(--blue-light); }
.pro p {
  font-size: 15px;
  line-height: 24px;
  color: rgba(255, 255, 255, 0.6);
  margin: 16px 0 0;
  text-wrap: pretty;
}
.pro__link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--blue-light);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 20px;
}
.pro__link:hover { color: var(--white); text-decoration: underline; }

.colophon {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 64px;
  border-top: var(--hairline) solid rgba(255, 255, 255, 0.1);
  padding-top: 28px;
  text-align: center;
}
.colophon .heart { color: #EF4444; }

/* ---------------- small screens ---------------- */

@media (max-width: 720px) {
  .band, .workshop { padding-left: 20px; padding-right: 20px; }
  .chapternav__bar { padding: 0 16px; gap: 10px; }
  .chapternav__brand, .chapternav__divider, .chapternav__current { display: none; }
  .chapternav__toggle { margin-right: auto; }
}
