/* ==========================================================================
   Jana Christelle — Warm Tech stylesheet
   ========================================================================== */

:root {
  --cream: #f6f0e6;
  --paper: #fbf7f0;
  --sand: #ece1cf;
  --sand-deep: #dccbb0;
  --ink: #2a1e18;
  --ink-soft: #5b4a3f;
  --ink-mute: #76655a;
  --terracotta: #c75a30;
  --terracotta-deep: #a3431d;
  --terracotta-soft: #f3d9c9;
  --sage: #9db297;
  --sage-deep: #48654c;
  --sage-soft: #dfe7d8;
  --espresso: #1f1612;
  --espresso-2: #2d211b;
  --line: rgba(42, 30, 24, .12);
  --line-strong: rgba(42, 30, 24, .22);
  --error: #b3261e;
  --success: #2f6b3a;

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(42, 30, 24, .06), 0 2px 8px rgba(42, 30, 24, .05);
  --shadow: 0 2px 4px rgba(42, 30, 24, .05), 0 12px 32px -8px rgba(42, 30, 24, .14);
  --shadow-lg: 0 4px 10px rgba(42, 30, 24, .06), 0 30px 60px -20px rgba(42, 30, 24, .28);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(64px, 9vw, 120px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
  opacity: .32;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .25 0 0 0 0 .18 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--terracotta-deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 0 0 .5em;
  font-variation-settings: "SOFT" 50, "opsz" 96;
  color: var(--ink);
}
h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.25; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
em.accent, .accent { font-style: italic; color: var(--terracotta-deep); }
code, kbd, pre { font-family: var(--font-mono); font-size: .88em; }
:not(pre) > code { background: var(--sand); padding: .1em .4em; border-radius: 6px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

:focus-visible {
  outline: 3px solid var(--terracotta);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 2000;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; color: var(--paper); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 820px; }
.section { padding: var(--section) 0; position: relative; }
.section--tight { padding: calc(var(--section) * .6) 0; }
.section--sand { background: var(--sand); }
.section--paper { background: var(--paper); }
.section--dark { background: var(--espresso); color: #efe5d6; }
.section--dark h2, .section--dark h3 { color: #fbf3e6; }
.section--dark p { color: #d9cbb8; }
.section-head { max-width: 720px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.125rem; }
.section--dark .section-head p { color: #d0c1ac; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--terracotta-deep);
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(199, 90, 48, .16);
}
.section--dark .eyebrow { color: #f0a37f; }

.grid { display: grid; gap: clamp(16px, 2.4vw, 28px); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } .split--rev > :first-child { order: 0; } }

/* ---------- Buttons ---------- */
.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: .8em 1.4em;
  border-radius: 999px;
  border: 1.5px solid var(--bg);
  background: var(--bg);
  color: var(--fg);
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  line-height: 1.2;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn:hover { color: var(--fg); transform: translateY(-2px); box-shadow: 0 10px 24px -10px rgba(42, 30, 24, .5); }
.btn:active { transform: translateY(0); }
.btn--primary { --bg: var(--terracotta-deep); --fg: #fff; }
.btn--primary:hover { --bg: #8f3714; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { color: var(--ink); background: var(--paper); }
.btn--light { --bg: var(--paper); --fg: var(--ink); }
.btn--sm { min-height: 38px; padding: .5em 1em; font-size: .88rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: progress; transform: none; box-shadow: none; }
.btn .arrow { transition: transform .2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

.spinner {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.text-link {
  font-weight: 600;
  color: var(--terracotta-deep);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .35em;
}
.text-link:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(246, 240, 230, .82);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(42, 30, 24, .5); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--ink);
  color: #f6c9b0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  font-weight: 600;
  box-shadow: inset 0 -3px 0 var(--terracotta);
}
.brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; letter-spacing: -.01em; line-height: 1; }
.brand-name small { display: block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); margin-top: 5px; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block;
  padding: .55em .75em;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .93rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s;
}
.nav-list a:hover { background: var(--sand); color: var(--ink); }
.nav-list a[aria-current="page"] { color: var(--ink); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.nav-list a[aria-current="page"]::after {
  content: ""; display: block; width: 14px; height: 2px; background: var(--terracotta); border-radius: 2px; margin: 2px auto 0;
}
.nav-cta { margin-left: 10px; }
.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  align-items: center; justify-content: center;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed;
    inset: 74px 0 auto 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -20px rgba(42, 30, 24, .35);
    padding: 12px var(--gutter) 24px;
    max-height: calc(100vh - 74px);
    overflow-y: auto;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, transform .25s var(--ease), visibility 0s .25s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s, transform .25s var(--ease); }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; }
  .nav-list a { padding: .85em 1em; border-radius: 12px; font-size: 1.05rem; }
  .nav-list a[aria-current="page"]::after { display: none; }
  .nav-list a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--terracotta); }
  .nav-cta { margin: 10px 0 0; }
  .nav-cta .btn { width: 100%; }
}
body.nav-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 110px); overflow: hidden; }
.hero::after {
  content: "";
  position: absolute;
  width: 680px; height: 680px;
  right: -180px; top: -180px;
  background: radial-gradient(circle, rgba(199, 90, 48, .22), transparent 62%);
  pointer-events: none;
  z-index: -1;
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px; height: 520px;
  left: -220px; bottom: -260px;
  background: radial-gradient(circle, rgba(157, 178, 151, .35), transparent 65%);
  pointer-events: none;
  z-index: -1;
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin-bottom: .35em; }
.hero h1 em { font-style: italic; color: var(--terracotta-deep); font-variation-settings: "SOFT" 100, "opsz" 144; }
.hero-lead { font-size: clamp(1.1rem, 1.6vw, 1.28rem); color: var(--ink-soft); max-width: 36em; margin-bottom: 1.8em; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: .92rem; color: var(--ink-mute); }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--sage-deep); flex: none; }

.terminal-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--paper);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--ink-soft);
  margin-bottom: 26px;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}
.terminal-line b { background: var(--sage-soft); color: var(--sage-deep); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.cursor { display: inline-block; width: .55em; height: 1.1em; background: var(--terracotta); vertical-align: -.18em; margin-left: 2px; animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- 3D Book ---------- */
.book-stage { position: relative; display: grid; place-items: center; padding: 30px 0 40px; perspective: 1600px; }
.book-stage::before {
  content: "";
  position: absolute;
  width: 78%; aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--terracotta-soft), var(--sage-soft), var(--sand), var(--terracotta-soft));
  filter: blur(2px);
  opacity: .9;
}
.book {
  --w: min(300px, 64vw);
  --h: calc(var(--w) * 1.36);
  --d: 38px;
  position: relative;
  width: var(--w);
  height: var(--h);
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(6deg);
  transition: transform .8s var(--ease);
  animation: floaty 6s ease-in-out infinite;
}
.book:hover { transform: rotateY(-12deg) rotateX(3deg); }
@keyframes floaty { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.book-face, .book-spine, .book-pages, .book-back { position: absolute; top: 0; border-radius: 3px 10px 10px 3px; }
.book-face {
  inset: 0;
  transform: translateZ(calc(var(--d) / 2));
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(199, 90, 48, .55), transparent 55%),
    radial-gradient(90% 60% at 0% 100%, rgba(157, 178, 151, .35), transparent 60%),
    linear-gradient(160deg, #33251e 0%, #1f1612 70%);
  color: #f7ecdd;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: inset 4px 0 0 rgba(255, 255, 255, .06), inset 10px 0 18px -10px rgba(0, 0, 0, .7);
}
.book-face::before {
  content: "";
  position: absolute; inset: 12px;
  border: 1px solid rgba(246, 201, 176, .25);
  border-radius: 2px 6px 6px 2px;
  pointer-events: none;
}
.book-face::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .09) 48%, transparent 56%);
}
.book-kicker { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: #f0a37f; }
.book-title { font-family: var(--font-display); font-size: calc(var(--w) * .118); line-height: 1.02; margin: 14px 0 0; font-weight: 500; letter-spacing: -.02em; }
.book-title em { color: #f6c9b0; }
.book-prompt {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: .64rem;
  line-height: 1.55;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(246, 201, 176, .2);
  border-radius: 8px;
  padding: 10px 11px;
  color: #e8dccb;
}
.book-prompt span { color: #9db297; }
.book-author { margin-top: 14px; font-family: var(--font-display); font-style: italic; font-size: .95rem; color: #f6c9b0; display: flex; justify-content: space-between; align-items: baseline; }
.book-author small { font-family: var(--font-mono); font-style: normal; font-size: .58rem; letter-spacing: .1em; color: #b9a893; }
.book-spine {
  width: var(--d); height: 100%;
  left: 0;
  transform: rotateY(-90deg) translateZ(calc(var(--d) / 2));
  background: linear-gradient(90deg, #160f0c, #2f231c 40%, #1b1310);
  border-radius: 4px 0 0 4px;
}
.book-pages {
  width: calc(var(--d) - 4px); height: calc(100% - 8px);
  top: 4px;
  left: 2px;
  border-radius: 0;
  transform: rotateY(90deg) translateZ(calc(var(--w) - var(--d) / 2 - 3px));
  background: repeating-linear-gradient(90deg, #fbf5ea 0 2px, #e6dac6 2px 3px);
}
.book-back {
  inset: 0;
  transform: translateZ(calc(var(--d) / -2));
  background: #1a120e;
  box-shadow: 30px 40px 60px -10px rgba(42, 30, 24, .5);
}
.book-badge {
  position: absolute;
  z-index: 5;
  right: max(4%, calc(50% - 230px));
  top: 12%;
  width: 98px; height: 98px;
  border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  background: var(--terracotta-deep);
  color: #fff;
  font-family: var(--font-display);
  line-height: 1.05;
  font-size: .9rem;
  transform: rotate(10deg);
  box-shadow: var(--shadow);
}
.book-badge strong { display: block; font-size: 1.5rem; }
.book-note {
  position: absolute;
  z-index: 5;
  left: max(0%, calc(50% - 260px));
  bottom: 6%;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 14px;
  font-size: .82rem;
  box-shadow: var(--shadow);
  display: flex; gap: 10px; align-items: center;
  transform: rotate(-3deg);
}
.book-note .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--sage-deep); box-shadow: 0 0 0 4px var(--sage-soft); }
@media (max-width: 480px) { .book-badge { width: 80px; height: 80px; font-size: .78rem; } .book-badge strong { font-size: 1.2rem; } }

/* ---------- Strip / marquee ---------- */
.strip { border-block: 1px solid var(--line); background: var(--paper); overflow: hidden; }
.strip-track { display: flex; gap: 48px; padding: 18px 0; width: max-content; animation: marquee 40s linear infinite; }
.strip-track span { font-family: var(--font-mono); font-size: .85rem; color: var(--ink-soft); white-space: nowrap; display: inline-flex; align-items: center; gap: 12px; }
.strip-track span::before { content: "✦"; color: var(--terracotta); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Cards ---------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 2.6vw, 32px);
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
  position: relative;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card h3 { margin-bottom: .45em; }
.card p { color: var(--ink-soft); margin-bottom: .8em; }
.card p:last-child { margin-bottom: 0; }
.card--flat:hover { transform: none; box-shadow: var(--shadow-sm); }
.card-link { position: static; text-decoration: none; color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card-link:hover { color: inherit; }
.icon-badge {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: var(--terracotta-soft);
  color: var(--terracotta-deep);
  margin-bottom: 18px;
}
.icon-badge svg { width: 24px; height: 24px; }
.icon-badge--sage { background: var(--sage-soft); color: var(--sage-deep); }
.icon-badge--ink { background: var(--ink); color: #f6c9b0; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ink-soft);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.tag--terra { background: var(--terracotta-soft); color: var(--terracotta-deep); border-color: transparent; }
.tag--sage { background: var(--sage-soft); color: var(--sage-deep); border-color: transparent; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Chapters */
.chapters { counter-reset: ch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
@media (max-width: 760px) { .chapters { grid-template-columns: 1fr; } }
.chapters li {
  counter-increment: ch;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px;
  border-radius: var(--r);
  background: var(--paper);
  border: 1px solid var(--line);
  transition: border-color .25s, transform .25s var(--ease);
}
.chapters li:hover { border-color: var(--terracotta); transform: translateX(4px); }
.chapters li::before {
  content: counter(ch, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--terracotta-deep);
  background: var(--terracotta-soft);
  border-radius: 10px;
  padding: 6px 9px;
  line-height: 1;
}
.chapters h3 { font-size: 1.15rem; margin-bottom: .3em; }
.chapters p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.chapters .free { margin-left: 8px; vertical-align: 2px; }

/* Audience list */
.check-list { list-style: none; padding: 0; margin: 0 0 1.5em; display: grid; gap: 14px; }
.check-list li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.check-list li::before {
  content: "";
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--sage-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2348654c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 15px no-repeat;
  margin-top: 1px;
}
.x-list li::before { background: var(--terracotta-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a3431d' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E") center / 13px no-repeat; }

/* ---------- Terminal / prompt cards ---------- */
.term {
  background: var(--espresso);
  color: #eadfcf;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #3a2c24;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.term:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.term-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  background: var(--espresso-2);
  border-bottom: 1px solid #3a2c24;
}
.term-dots { display: flex; gap: 6px; }
.term-dots i { width: 10px; height: 10px; border-radius: 50%; background: #e0735a; display: block; }
.term-dots i:nth-child(2) { background: #e3b25a; }
.term-dots i:nth-child(3) { background: #8fb08a; }
.term-title { font-family: var(--font-mono); font-size: .74rem; color: #b8a794; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .74rem;
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(246, 201, 176, .1);
  color: #f6c9b0;
  border: 1px solid rgba(246, 201, 176, .25);
  transition: background .2s, color .2s;
  flex: none;
}
.copy-btn:hover { background: var(--terracotta); color: #fff; border-color: var(--terracotta); }
.copy-btn.is-copied { background: var(--sage-deep); border-color: var(--sage-deep); color: #fff; }
.copy-btn svg { width: 14px; height: 14px; }
.term-body { padding: 18px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.term-body h3 { color: #fbf3e6; font-size: 1.15rem; margin-bottom: .5em; }
.term-body .tag { background: rgba(157, 178, 151, .15); color: #b9cdb3; border-color: rgba(157, 178, 151, .25); }
.prompt-text {
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-wrap: break-word;
  color: #e6dac8;
  margin: 12px 0 0;
  padding: 0;
  background: none;
}
.prompt-text::before { content: "› "; color: var(--terracotta); font-weight: 700; }
.prompt-text .var { color: #f0a37f; }
.term-foot { margin-top: 14px; padding-top: 12px; border-top: 1px dashed #4a3a30; font-size: .82rem; color: #b8a794; }
.term-foot strong { color: #d9cbb8; font-weight: 600; }

/* ---------- Media ---------- */
.media {
  border-radius: var(--r-xl);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background: var(--sand);
}
.media img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.18) saturate(.92) contrast(1.02); }
.media--43 { aspect-ratio: 4 / 3; }
.media--34 { aspect-ratio: 3 / 4; }
.media--169 { aspect-ratio: 16 / 9; }
.media--wide { aspect-ratio: 21 / 9; }
.media figcaption, .media-caption {
  position: absolute; left: 14px; bottom: 14px;
  font-family: var(--font-mono); font-size: .7rem;
  background: rgba(31, 22, 18, .72); color: #f3e7d6;
  padding: 5px 10px; border-radius: 999px;
}
.media-stack { position: relative; }
.media-stack .media + .media {
  position: absolute; width: 46%; right: -4%; bottom: -10%;
  border: 6px solid var(--cream);
}
@media (max-width: 900px) { .media-stack .media + .media { right: 4%; } }

/* ---------- Category cards ---------- */
.cat-card { display: flex; flex-direction: column; gap: 6px; min-height: 100%; }
.cat-card .count { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; }
.cat-card .count .go { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); transition: background .2s, color .2s, transform .25s var(--ease); }
.cat-card:hover .go { background: var(--terracotta-deep); color: #fff; transform: rotate(-45deg); }

/* ---------- Author ---------- */
.monogram {
  width: 92px; height: 92px; border-radius: 28px;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--terracotta) 0%, var(--terracotta-deep) 100%);
  color: #fff7ef;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.2rem;
  box-shadow: var(--shadow), inset 0 -5px 0 rgba(0, 0, 0, .15);
  transform: rotate(-4deg);
}
.author-sign { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; color: var(--terracotta-deep); }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 26px 0; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.stat strong { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; line-height: 1; color: var(--terracotta-deep); }
.stat span { font-size: .85rem; color: var(--ink-mute); }
@media (max-width: 480px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .2s, box-shadow .2s;
}
.faq details[open] { border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 56px 20px 22px;
  font-weight: 600;
  position: relative;
  font-size: 1.04rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: 18px; top: 50%;
  width: 28px; height: 28px; margin-top: -14px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sand);
  font-family: var(--font-mono);
  font-weight: 400;
  transition: transform .25s var(--ease), background .2s;
}
.faq details[open] summary::after { transform: rotate(45deg); background: var(--terracotta-soft); color: var(--terracotta-deep); }
.faq .faq-body { padding: 0 22px 20px; color: var(--ink-soft); }
.faq .faq-body p:last-child { margin: 0; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--paper);
  border-radius: var(--r-xl);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  position: relative;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label, .field .label { font-weight: 600; font-size: .92rem; }
.field .opt { font-weight: 400; color: var(--ink-mute); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: #fffdf9;
  transition: border-color .2s, box-shadow .2s;
  font-size: 1rem;
}
.field textarea { min-height: 140px; resize: vertical; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a1e18' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 18px;
  padding-right: 42px;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-mute); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(199, 90, 48, .18); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); background: #fff7f6; }
.field.is-valid input, .field.is-valid select, .field.is-valid textarea { border-color: var(--sage-deep); }
.field-error { color: var(--error); font-size: .85rem; min-height: 0; display: none; align-items: center; gap: 6px; }
.field.has-error .field-error { display: flex; }
.field-error::before { content: "!"; width: 16px; height: 16px; border-radius: 50%; background: var(--error); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center; flex: none; }
.field-hint { font-size: .82rem; color: var(--ink-mute); }
.check { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: .9rem; color: var(--ink-soft); font-weight: 400; }
.check input { width: 22px; height: 22px; min-height: 0; margin: 1px 0 0; accent-color: var(--terracotta-deep); cursor: pointer; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: var(--ink-mute); margin: 14px 0 0; }
.form-status { font-size: .9rem; margin-top: 10px; }
.form-status.is-error { color: var(--error); }

.form-success {
  display: none;
  text-align: center;
  padding: clamp(10px, 3vw, 30px) 0;
  animation: pop .5s var(--ease);
}
.form-success .ok {
  width: 72px; height: 72px; margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  display: grid; place-items: center;
}
.form-success .ok svg { width: 34px; height: 34px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .2s forwards var(--ease); }
.form-success h3 { margin-bottom: .3em; }
.form-success p { color: var(--ink-soft); }
.is-sent .form-body { display: none; }
.is-sent .form-success { display: block; }
@keyframes pop { from { opacity: 0; transform: scale(.96); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Inline newsletter */
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 200px; }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(199, 90, 48, .45), transparent 60%),
    radial-gradient(50% 100% at 0% 100%, rgba(157, 178, 151, .25), transparent 60%),
    var(--espresso);
  color: #f3e7d6;
  border-radius: var(--r-xl);
  padding: clamp(32px, 6vw, 72px);
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 30px;
  align-items: center;
  overflow: hidden;
  position: relative;
}
.cta-band h2 { color: #fff7ee; margin-bottom: .3em; }
.cta-band p { color: #d7c8b4; margin: 0; }
.cta-band .btn-row { justify-content: flex-end; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; } .cta-band .btn-row { justify-content: flex-start; } }

/* ---------- Page hero ---------- */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(36px, 5vw, 64px); position: relative; overflow: hidden; }
.page-hero::after {
  content: "";
  position: absolute; right: -140px; top: -200px;
  width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 90, 48, .18), transparent 65%);
  z-index: -1;
}
.page-hero h1 { max-width: 16em; }
.page-hero .lead { font-size: clamp(1.08rem, 1.5vw, 1.24rem); color: var(--ink-soft); max-width: 40em; }
.breadcrumb { font-family: var(--font-mono); font-size: .78rem; color: var(--ink-mute); margin-bottom: 22px; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { color: var(--terracotta-deep); text-decoration: underline; }

/* ---------- Search / filter UI ---------- */
.toolbar {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
  position: sticky;
  top: 86px;
  z-index: 20;
}
.search {
  position: relative;
  flex: 1 1 280px;
}
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-mute); pointer-events: none; }
.search input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: #fffdf9;
  font-family: var(--font-mono);
  font-size: .9rem;
}
.search input:focus { outline: none; border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(199, 90, 48, .18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .86rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background .2s, color .2s, border-color .2s;
  min-height: 40px;
}
.chip:hover { background: var(--sand); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip .n { font-family: var(--font-mono); font-size: .72rem; opacity: .7; margin-left: 4px; }
.result-count { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-mute); margin: 0 0 18px; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-mute); display: none; }
.empty-state.is-visible { display: block; }
@media (max-width: 760px) { .toolbar { position: static; } }

.prompt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .prompt-grid { grid-template-columns: 1fr; } }
.prompt-grid .term:hover { transform: none; }

/* ---------- Knowledge base ---------- */
.kb-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .kb-layout { grid-template-columns: minmax(0, 1fr); } .kb-side { position: static !important; } }
.kb-side { position: sticky; top: 100px; }
.kb-side h2 { font-size: .78rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin-bottom: 12px; }
.kb-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.kb-side a { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-soft); font-size: .95rem; }
.kb-side a:hover { background: var(--paper); color: var(--ink); }
.kb-side a span { font-family: var(--font-mono); font-size: .75rem; color: var(--ink-mute); }
.kb-cat { margin-bottom: 56px; }
.kb-cat-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.kb-cat-head .icon-badge { margin: 0; }
.kb-cat-head h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 0; }
.kb-cat-head p { margin: 0; color: var(--ink-mute); font-size: .95rem; }
.article-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 700px) { .article-list { grid-template-columns: 1fr; } }
.article-card { display: flex; flex-direction: column; gap: 10px; }
.article-card h3 { font-size: 1.2rem; margin: 0; }
.article-card .meta { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-mute); display: flex; gap: 12px; flex-wrap: wrap; margin-top: auto; }
.article-card .status { font-family: var(--font-mono); font-size: .72rem; }
.article-card--feature { background: linear-gradient(160deg, var(--paper), #f8e9dd); border-color: rgba(199, 90, 48, .3); }

.featured-article { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; padding: 0; }
.featured-article .media { border-radius: 0; box-shadow: none; height: 100%; min-height: 260px; }
.featured-article .fa-body { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 10px; justify-content: center; }
@media (max-width: 760px) { .featured-article { grid-template-columns: 1fr; } }

/* ---------- Article prose ---------- */
.article-hero .meta-line { display: flex; flex-wrap: wrap; gap: 10px 20px; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); margin-top: 18px; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 64px; align-items: start; }
@media (max-width: 980px) { .article-layout { grid-template-columns: minmax(0, 1fr); } .toc { position: static !important; order: -1; } }
.toc { position: sticky; top: 100px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.toc h2 { font-size: .74rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-mute); margin-bottom: 10px; }
.toc ol { margin: 0; padding-left: 18px; font-size: .92rem; display: grid; gap: 6px; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--terracotta-deep); text-decoration: underline; }
.prose { font-size: 1.09rem; line-height: 1.78; max-width: 70ch; }
.prose h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); margin: 2.2em 0 .6em; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--terracotta); }
.prose blockquote { margin: 1.8em 0; padding: 18px 24px; border-left: 4px solid var(--terracotta); background: var(--paper); border-radius: 0 var(--r) var(--r) 0; font-family: var(--font-display); font-size: 1.25rem; font-style: italic; line-height: 1.45; }
.prose .term { margin: 1.6em 0; }
.prose .term:hover { transform: none; }
.prose figure { margin: 2em 0; }
.callout { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 20px; border-radius: var(--r); background: var(--sage-soft); color: #253a29; margin: 1.6em 0; font-size: 1rem; }
.callout--warn { background: var(--terracotta-soft); color: #5a2410; }
.callout svg { width: 26px; height: 26px; margin-top: 2px; }
.callout p:last-child { margin: 0; }
.callout strong { display: block; margin-bottom: 2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.6em 0; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
.compare > div { border-radius: var(--r); padding: 16px 18px; font-family: var(--font-mono); font-size: .82rem; line-height: 1.65; border: 1px solid var(--line); background: var(--paper); }
.compare .label { font-family: var(--font-body); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; display: block; margin-bottom: 8px; }
.compare .bad .label { color: var(--error); }
.compare .good .label { color: var(--success); }
.compare .good { border-color: rgba(72, 101, 76, .4); background: #f3f6ef; }
.article-foot { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .related { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); margin: 1.4em 0; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 560px; }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--sand); font-weight: 600; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td code { font-size: .82rem; }

/* ---------- Glossary ---------- */
.letters { display: flex; flex-wrap: wrap; gap: 6px; }
.letters a, .letters span {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: .88rem;
  text-decoration: none;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  background: var(--paper);
}
.letters a:hover { background: var(--ink); color: var(--paper); }
.letters span { opacity: .35; border-style: dashed; }
.letters a.is-dim { opacity: .35; pointer-events: none; }
.gloss-group { margin-bottom: 40px; }
.gloss-letter { font-family: var(--font-display); font-size: 3rem; font-style: italic; color: var(--terracotta-deep); line-height: 1; margin-bottom: 14px; display: flex; align-items: center; gap: 16px; }
.gloss-letter::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.gloss-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0; }
@media (max-width: 760px) { .gloss-list { grid-template-columns: 1fr; } }
.gloss-item { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; }
.gloss-item dt { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.gloss-item dt .tag { font-size: .66rem; }
.gloss-item dd { margin: 0; color: var(--ink-soft); font-size: .97rem; }
.gloss-item dd .ex { display: block; margin-top: 10px; font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); padding-left: 12px; border-left: 2px solid var(--terracotta-soft); }
mark { background: #f8d9a8; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- Pricing ---------- */
.price-card { position: relative; display: flex; flex-direction: column; gap: 14px; }
.price-card .price { font-family: var(--font-display); font-size: 3.2rem; line-height: 1; font-weight: 500; }
.price-card .price small { font-family: var(--font-body); font-size: 1rem; color: var(--ink-mute); font-weight: 400; }
.price-card--feature { background: var(--espresso); color: #efe5d6; border-color: #3a2c24; }
.price-card--feature h3, .price-card--feature .price { color: #fff7ee; }
.price-card--feature p, .price-card--feature li { color: #d9cbb8; }
.price-card--feature .check-list li::before { background-color: rgba(157, 178, 151, .25); }
.ribbon { position: absolute; top: 18px; right: 18px; }
.excerpt { background: #fffdf8; border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); position: relative; }
.excerpt::before { content: "Excerpt · Chapter 3"; position: absolute; top: -13px; left: 28px; font-family: var(--font-mono); font-size: .72rem; background: var(--terracotta-deep); color: #fff; padding: 4px 12px; border-radius: 999px; }
.excerpt p:first-of-type::first-letter { font-family: var(--font-display); float: left; font-size: 3.6em; line-height: .85; padding: 6px 10px 0 0; color: var(--terracotta-deep); }
.toc-book { list-style: none; padding: 0; margin: 0; counter-reset: c; }
.toc-book > li { counter-increment: c; border-bottom: 1px solid var(--line); padding: 18px 0; display: grid; grid-template-columns: 56px 1fr auto; gap: 14px; align-items: baseline; }
.toc-book > li::before { content: counter(c, decimal-leading-zero); font-family: var(--font-display); font-style: italic; font-size: 1.6rem; color: var(--terracotta-deep); }
.toc-book h3 { font-size: 1.2rem; margin: 0 0 4px; }
.toc-book p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.toc-book .pg { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-mute); }
@media (max-width: 560px) { .toc-book > li { grid-template-columns: 40px 1fr; } .toc-book .pg { grid-column: 2; } }

/* ---------- Timeline / principles ---------- */
.principles { counter-reset: p; display: grid; gap: 16px; }
.principle { counter-increment: p; display: grid; grid-template-columns: 70px 1fr; gap: 20px; padding: 24px; border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line); }
.principle::before { content: counter(p); font-family: var(--font-display); font-size: 3rem; line-height: .9; font-style: italic; color: var(--terracotta); }
.principle h3 { margin-bottom: .3em; }
.principle p { margin: 0; color: var(--ink-soft); }
@media (max-width: 520px) { .principle { grid-template-columns: 1fr; gap: 6px; } }

.credits { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.credits li { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; }
.credits img { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; }
.credits small { display: block; color: var(--ink-mute); }

/* ---------- Legal ---------- */
.legal { font-size: 1.02rem; }
.legal h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); margin-top: 2em; padding-top: .4em; }
.legal h3 { font-size: 1.15rem; margin-top: 1.5em; }
.legal .updated { font-family: var(--font-mono); font-size: .82rem; color: var(--ink-mute); }
.legal-summary { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 26px; margin-bottom: 2em; }
.legal-summary h2 { margin-top: 0 !important; font-size: 1.2rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--espresso); color: #d6c7b2; padding: clamp(56px, 7vw, 88px) 0 30px; margin-top: 0; position: relative; overflow: hidden; }
.site-footer::before {
  content: ""; position: absolute; right: -200px; top: -240px; width: 560px; height: 560px; border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 90, 48, .28), transparent 65%);
}
.site-footer a { color: #efe2d0; text-decoration: none; }
.site-footer a:hover { color: #f6c9b0; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; position: relative; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-about .brand { color: #fff7ee; margin-bottom: 18px; }
.footer-about .brand-name small { color: #a8957f; }
.footer-about p { font-size: .95rem; max-width: 36ch; }
.site-footer h2 { font-family: var(--font-mono); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; color: #a8957f; margin-bottom: 16px; font-weight: 500; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: .95rem; }
.footer-news { margin-top: 22px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); border-radius: var(--r); padding: 18px; }
.footer-news h3 { color: #fff7ee; font-size: 1.1rem; margin-bottom: .2em; }
.footer-news p { font-size: .85rem; margin-bottom: 12px; }
.footer-news .field input { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .18); color: #fff7ee; min-height: 46px; }
.footer-news .field input::placeholder { color: #a8957f; }
.footer-news .check { color: #cdbca5; font-size: .8rem; }
.footer-news .check a { text-decoration: underline; }
.footer-news .field-error { color: #ffb4a8; }
.footer-news .field-error::before { background: #ffb4a8; color: var(--espresso); }
.footer-news .form-success h3, .footer-news .form-success p { color: #efe2d0; }
.footer-news .form-success .ok { width: 52px; height: 52px; }
.footer-news .form-success .ok svg { width: 26px; height: 26px; }
.footer-news .btn { --bg: var(--terracotta-deep); --fg: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .1); display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: space-between; font-size: .85rem; color: #a8957f; position: relative; }
.footer-bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; padding: 0; }
.linklike { background: none; border: 0; padding: 0; color: #efe2d0; font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.linklike:hover { color: #f6c9b0; }
.footer-mono { font-family: var(--font-mono); font-size: .76rem; }

/* ---------- Cookie banner & modal ---------- */
.cookie-banner {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  margin: 0 auto;
  max-width: 980px;
  z-index: 900;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  transform: translateY(140%);
  transition: transform .5s var(--ease);
}
.cookie-banner.is-visible { transform: none; }
.cookie-banner .cookie-ico { width: 48px; height: 48px; border-radius: 14px; background: var(--terracotta-soft); color: var(--terracotta-deep); display: grid; place-items: center; }
.cookie-banner h2 { font-size: 1.1rem; margin: 0 0 .2em; }
.cookie-banner p { margin: 0; font-size: .9rem; color: var(--ink-soft); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 860px) {
  .cookie-banner { grid-template-columns: 1fr; }
  .cookie-banner .cookie-ico { display: none; }
  .cookie-actions { justify-content: stretch; }
  .cookie-actions .btn { flex: 1 1 auto; }
}

.modal {
  position: fixed; inset: 0; z-index: 950;
  display: none;
  align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(31, 22, 18, .55);
  backdrop-filter: blur(4px);
}
.modal.is-open { display: flex; animation: fade .25s; }
.modal-dialog {
  background: var(--cream);
  border-radius: var(--r-xl);
  max-width: 560px; width: 100%;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: rise .35s var(--ease);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--paper);
  display: grid; place-items: center; font-size: 1.3rem; line-height: 1;
}
.modal-dialog h2 { font-size: 1.7rem; padding-right: 40px; }
.modal-dialog > p { color: var(--ink-soft); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.pref { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.pref h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin: 0 0 2px; }
.pref p { margin: 0; font-size: .87rem; color: var(--ink-mute); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--sand-deep); transition: background .2s; }
.switch span::after { content: ""; position: absolute; left: 4px; top: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s var(--ease); }
.switch input:checked + span { background: var(--sage-deep); }
.switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.switch input:disabled { cursor: not-allowed; }
.switch input:disabled + span { opacity: .6; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; justify-content: flex-end; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 980;
  transform: translate(-50%, 30px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: .86rem;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--shadow-lg);
  transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgba(157, 178, 151, .3); }

/* ---------- 404 ---------- */
.notfound { min-height: 64vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.notfound .code { font-family: var(--font-display); font-style: italic; font-size: clamp(6rem, 22vw, 13rem); line-height: .9; color: var(--terracotta); letter-spacing: -.04em; }
.notfound .term { max-width: 560px; margin: 28px auto; text-align: left; }
.notfound .term:hover { transform: none; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- Misc ---------- */
.lede-quote { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.3; font-weight: 400; letter-spacing: -.01em; }
.lede-quote em { color: var(--terracotta-deep); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--ink-mute); }
.pill-note { display: inline-flex; gap: 8px; align-items: center; font-size: .86rem; background: var(--sage-soft); color: var(--sage-deep); padding: 6px 12px; border-radius: 999px; font-weight: 500; }
.contact-cards { display: grid; gap: 14px; }
.contact-card { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-items: start; }
.contact-card .icon-badge { margin: 0; }
.contact-card h3 { font-size: 1.1rem; margin-bottom: .2em; }
.contact-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .book { animation: none; }
  .strip-track { animation: none; }
  .cursor { animation: none; }
}

@media print {
  .site-header, .site-footer, .cookie-banner, .toast, .modal, body::before { display: none !important; }
}

/* ---------- Additions ---------- */
[hidden] { display: none !important; }
.quick { margin-top: 4px; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.quick summary {
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--terracotta-deep);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.quick summary::-webkit-details-marker { display: none; }
.quick summary::before { content: "+"; font-family: var(--font-mono); width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--terracotta-soft); transition: transform .25s var(--ease); }
.quick[open] summary::before { transform: rotate(45deg); }
.quick ol, .quick ul { margin: 12px 0 4px; padding-left: 1.2em; font-size: .94rem; color: var(--ink-soft); display: grid; gap: 6px; }
.quick li::marker { color: var(--terracotta); }
.letters a[aria-disabled="true"] { opacity: .35; pointer-events: none; }
.page-hero .term:hover, .notfound .term:hover { transform: none; }
.price-card .check-list { margin-bottom: 8px; }
.media-stack { padding-bottom: 12%; }
@media (max-width: 900px) { .media-stack .media:first-child { max-width: 78% !important; } }
.toast { white-space: nowrap; max-width: calc(100vw - 32px); }
.nav-list a.btn, .nav-list a.btn:hover { color: var(--fg); background: var(--bg); padding: .5em 1.1em; }
.nav-list a.btn:hover { --bg: #8f3714; }

/* Compact cookie bar on phones */
@media (max-width: 560px) {
  .cookie-banner { padding: 14px 16px !important; gap: 6px !important; grid-template-columns: 1fr !important; }
  .cookie-banner .cookie-icon, .cookie-banner .cookie-ico, .cookie-banner .cb-icon { display: none !important; }
  .cookie-banner h2 { font-size: 1rem !important; margin: 0 0 4px !important; }
  .cookie-banner p { font-size: .8rem !important; line-height: 1.45 !important; margin: 0 !important; }
  .cookie-banner .cookie-actions, .cookie-banner .btn-row { display: grid !important; grid-template-columns: 1fr 1fr; gap: 8px !important; margin-top: 8px !important; }
  .cookie-banner .btn { min-height: 40px !important; padding: 8px 10px !important; font-size: .8rem !important; width: auto !important; flex: none !important; }
  .cookie-banner .btn::after { display: none !important; }
  .cookie-banner [data-cookie="accept"] { order: 1; }
  .cookie-banner [data-cookie="reject"] { order: 2; }
  .cookie-banner [data-cookie="manage"] { order: 3; grid-column: 1 / -1; min-height: 28px !important; padding: 2px !important; background: none !important; border: 0 !important; box-shadow: none !important; color: inherit !important; text-decoration: underline; }
}
