/* The guide (generated by docs/build_docs.py): one page that scrolls, in the landing page's comic
   look. legal.css brings the palette, header, footer and buttons; this adds the hero with its six
   idea cards, the chapter chips that stay on top, and each chapter as a comic panel. */
:root {
  --ink: #101218;
  --navy-2: #1b2740;
  --slate: #2a2e3a;
  --cream: #e9e4d8;
  --blue: #2f5fb3;
  --link-cream: #1d4ed8;
}

html { scroll-padding-top: 116px; scroll-behavior: smooth; }
body { overflow-x: clip; }

.caption {
  display: inline-block; background: var(--sand); color: var(--ink); border: 3px solid var(--ink);
  padding: 6px 10px; font-family: var(--cond); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.08em; font-size: 14px; line-height: 1; box-shadow: 3px 3px 0 #000; white-space: nowrap;
}
.btn-cream { background: var(--cream); color: var(--ink); border-color: var(--ink); }
.btn-cream:hover { color: var(--ink); }

/* ───── Hero ───── */
.guide-hero {
  position: relative;
  border-bottom: 4px solid var(--cream);
  background-image: repeating-conic-gradient(from 0deg at 80% 0%, rgba(233, 228, 216, 0.07) 0deg 3deg, transparent 3deg 9deg);
}
.guide-hero .wrap { position: relative; padding-top: 56px; padding-bottom: 72px; }
.guide-hero h1 {
  margin: 18px 0 20px; font-size: clamp(52px, 9vw, 112px);
  text-shadow: 4px 4px 0 #000, 8px 8px 0 var(--blue);
}
.guide-star {
  position: absolute; top: 40px; right: 24px; width: 150px; height: 150px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--blue); color: var(--cream); font-size: 24px; line-height: 0.95;
  transform: rotate(10deg);
  clip-path: polygon(50% 0%, 61% 12%, 78% 5%, 80% 22%, 97% 25%, 89% 40%, 100% 50%, 89% 60%, 97% 75%, 80% 78%, 78% 95%, 61% 88%, 50% 100%, 39% 88%, 22% 95%, 20% 78%, 3% 75%, 11% 60%, 0% 50%, 11% 40%, 3% 25%, 20% 22%, 22% 5%, 39% 12%);
}
.guide-intro > p { max-width: 68ch; color: var(--text-dim); font-size: 16px; margin: 0 0 14px; }
.guide-intro > p.lead { font-size: 19px; line-height: 1.55; color: var(--text); }
.guide-intro h3 {
  margin: 48px 0 26px; font-family: var(--comic); font-weight: 400; font-size: 36px;
  letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; text-shadow: 3px 3px 0 #000;
}
.guide-intro strong { color: inherit; }

/* The six ideas: an ordered list drawn as numbered comic cards. */
.guide-intro ol {
  counter-reset: idea; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 34px 28px;
}
.guide-intro ol > li {
  counter-increment: idea; position: relative; display: flex; flex-direction: column; gap: 10px;
  padding: 40px 20px 20px; font-size: 15px; line-height: 1.5;
  background: var(--navy-2); color: var(--text-dim); border: 4px solid var(--cream);
  box-shadow: 7px 7px 0 #000; transform: rotate(-0.8deg); transition: transform 0.12s;
}
.guide-intro ol > li:nth-child(3n+2) { background: var(--cream); color: var(--slate); border-color: var(--ink); transform: rotate(0.7deg); }
.guide-intro ol > li:nth-child(3n) { background: var(--blue); color: var(--cream); transform: rotate(-0.4deg); }
.guide-intro ol > li:hover { transform: rotate(0deg) translate(-2px, -3px); }
.guide-intro ol > li::before {
  content: counter(idea); position: absolute; top: -22px; left: 14px; width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: var(--sand); color: var(--ink); border: 4px solid var(--ink); border-radius: 50%;
  font-family: var(--comic); font-size: 30px; line-height: 1; box-shadow: 3px 3px 0 #000;
}
.guide-intro ol > li strong { display: block; font-family: var(--comic); font-weight: 400; font-size: 26px; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1.05; color: var(--cream); margin-bottom: 4px; }
.guide-intro ol > li:nth-child(3n+2) strong { color: var(--ink); }
.guide-intro ol > li > a:last-child {
  align-self: flex-start; margin-top: auto; padding: 5px 10px; border: 3px solid currentColor;
  font-family: var(--cond); font-weight: 800; font-size: 15px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cream);
}
.guide-intro ol > li:nth-child(3n+2) > a:last-child { color: var(--ink); }
.guide-intro ol > li > a:last-child:hover { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.guide-intro ol > li:nth-child(3n+2) > a:last-child:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.guide-intro a { color: var(--accent); }

/* ───── Chapter chips: stay on top while the page scrolls ───── */
.guide-chips {
  position: sticky; top: 0; z-index: 5; background: var(--ink);
  border-bottom: 4px solid var(--cream); box-shadow: 0 6px 0 rgba(0, 0, 0, 0.35);
}
.guide-chips .wrap { display: flex; gap: 10px; padding-top: 12px; padding-bottom: 12px; overflow-x: auto; scrollbar-width: thin; }
.guide-chips a {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; padding: 4px 10px 4px 4px;
  border: 3px solid var(--cream); color: var(--text); font-family: var(--cond); font-weight: 800;
  font-size: 15px; letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap;
  transition: background 0.08s, transform 0.08s;
}
.guide-chips a b { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; background: var(--sand); color: var(--ink); font-family: var(--comic); font-weight: 400; font-size: 19px; }
.guide-chips a:hover { background: var(--blue); color: var(--cream); transform: translateY(-2px); }

/* ───── Chapters: comic panels, ink and cream in turn ───── */
.guide-chapters { display: flex; flex-direction: column; gap: 72px; padding-top: 80px; padding-bottom: 88px; }
.chapter { position: relative; padding: 60px 44px 40px; border: 4px solid var(--cream); box-shadow: 10px 10px 0 #000; }
.chapter-ink { background: var(--navy-2); color: var(--text-dim); }
.chapter-cream { background: var(--cream); color: var(--slate); border-color: var(--ink); }
.chapter .caption-in { position: absolute; top: -18px; left: -12px; transform: rotate(-3deg); font-size: 16px; padding: 8px 12px; }
.chapter-cream .caption-in { background: var(--blue); color: var(--cream); }
.chapter > h2 { margin: 0 0 20px; font-size: clamp(36px, 5.4vw, 60px); color: var(--cream); text-shadow: 3px 3px 0 #000; }
.chapter-cream > h2 { color: var(--ink); text-shadow: 3px 3px 0 var(--sand); }

.chapter-body { max-width: 74ch; }
.chapter-body p, .chapter-body li { font-size: 16px; line-height: 1.6; }
.chapter-body p { margin: 0 0 14px; }
.chapter-body p.lead { font-size: 19px; line-height: 1.55; color: var(--text); }
.chapter-cream .chapter-body p.lead { color: var(--ink); }
.chapter-body strong { color: var(--text); font-weight: 700; }
.chapter-cream .chapter-body strong, .chapter-cream .chapter-body em { color: var(--ink); }
.chapter-body h3 {
  display: inline-block; margin: 40px 0 16px; padding: 7px 14px 6px; background: var(--sand); color: var(--ink);
  border: 3px solid var(--ink); box-shadow: 4px 4px 0 #000; transform: skewX(-6deg);
  font-family: var(--comic); font-weight: 400; font-size: 26px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
}
.chapter-body h4 { margin: 24px 0 8px; font-family: var(--cond); font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: 0.04em; }
.chapter-body ul, .chapter-body ol { margin: 0 0 16px; padding-left: 22px; }
.chapter-body li { margin-bottom: 9px; }
.chapter-body li::marker { color: var(--sand); }
.chapter-cream .chapter-body li::marker { color: var(--blue); }
.chapter-body a { color: var(--accent); }
.chapter-cream .chapter-body a { color: var(--link-cream); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }
.chapter-cream .chapter-body code { background: rgba(16, 18, 24, 0.1); color: var(--ink); }

.chapter-body .table-wrap { margin: 8px 0 20px; overflow-x: auto; }
.chapter-body table { border-collapse: collapse; min-width: 100%; font-size: 15px; border: 4px solid var(--cream); box-shadow: 6px 6px 0 #000; }
.chapter-cream .chapter-body table { border-color: var(--ink); }
.chapter-body th { padding: 10px 14px; text-align: left; font-family: var(--comic); font-weight: 400; font-size: 24px; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; color: var(--cream); }
.chapter-body th:first-child { background: var(--blue); }
.chapter-body th:first-child::after { content: " ✓"; }
.chapter-body th:last-child { background: var(--slate); }
.chapter-body td { padding: 9px 14px; vertical-align: top; border-top: 2px solid rgba(233, 228, 216, 0.25); }
.chapter-body td:first-child { border-right: 2px solid rgba(233, 228, 216, 0.25); }
.chapter-cream .chapter-body td { border-color: rgba(16, 18, 24, 0.25); }

/* The checklist: ticked boxes for markers. */
.chapter-check .chapter-body ul { list-style: none; padding-left: 0; }
.chapter-check .chapter-body li { position: relative; padding-left: 38px; }
.chapter-check .chapter-body li::before {
  content: "✓"; position: absolute; left: 0; top: 1px; width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center; border: 3px solid var(--ink);
  background: var(--cream); color: var(--blue); font-weight: 800; font-size: 16px; line-height: 1; box-shadow: 2px 2px 0 #000;
}
.chapter-check.chapter-ink .chapter-body li::before { border-color: var(--cream); background: var(--ink); color: var(--sand); }

/* ───── The end ───── */
.guide-end {
  border-top: 4px solid var(--cream); text-align: center;
  background-image: repeating-conic-gradient(from 0deg at 50% 100%, rgba(233, 228, 216, 0.08) 0deg 3deg, transparent 3deg 9deg);
}
.guide-end .wrap { padding-top: 72px; padding-bottom: 80px; }
.guide-end p { margin: 0 auto 28px; max-width: 18ch; font-size: clamp(36px, 5vw, 56px); text-shadow: 3px 3px 0 #000, 6px 6px 0 var(--blue); }
.guide-end-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }

@media (max-width: 900px) {
  .guide-star { display: none; }
}
@media (max-width: 600px) {
  .guide-hero .wrap { padding-top: 36px; padding-bottom: 48px; }
  .guide-intro ol > li, .guide-intro ol > li:nth-child(n) { transform: none; }
  .guide-chapters { gap: 56px; padding-top: 56px; }
  .chapter { padding: 48px 18px 24px; box-shadow: 6px 6px 0 #000; }
  .chapter .caption-in { left: -6px; }
  .chapter-body h3 { font-size: 22px; }
  .chapter-body th { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .guide-intro ol > li, .guide-chips a { transition: none; }
}
