/* ============================================================
   Change Yourself, Change the World (Chapter 3) — style additions
   Loaded AFTER styles.css and styles2.css.
   ============================================================ */

/* ---- The capstone chain (the whole machine, stage by stage) ---- */
.chain { display: flex; flex-direction: column; align-items: stretch; gap: 0; max-width: 640px; margin: 0 auto; }
.chain .stage2 {
  display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: center;
  background: oklch(0.4 0.05 262 / 0.5); border: 1px solid oklch(0.7 0.04 255 / 0.25); border-radius: 16px;
  padding: 18px 22px; opacity: 0.4; transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease, background 0.5s ease, border-color 0.5s ease;
}
.chain .stage2.lit { opacity: 1; transform: none; background: oklch(0.32 0.07 262); border-color: oklch(0.6 0.08 255 / 0.5); }
.chain .stage2.final.lit {
  background: linear-gradient(110deg, oklch(0.45 0.11 255), oklch(0.5 0.12 280));
  border-color: var(--amber);
  box-shadow: 0 0 0 1px var(--amber), 0 12px 40px oklch(0.5 0.12 270 / 0.4);
}
.chain .ic2 {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none;
  background: oklch(0.5 0.09 258); color: white; transition: background 0.5s;
}
.chain .stage2.final.lit .ic2 { background: var(--amber); color: oklch(0.25 0.05 60); }
.chain .ic2 svg { width: 28px; height: 28px; }
.chain .lab2 { font-family: var(--serif); font-weight: 600; font-size: 20px; color: white; line-height: 1.15; }
.chain .sub2 { font-size: 13.5px; color: oklch(0.82 0.03 255); margin-top: 3px; }
.chain .stage2.final.lit .sub2 { color: oklch(0.95 0.04 80); }
.chain .link2 {
  width: 2px; height: 26px; margin: 4px 0 4px 50px; background: oklch(0.6 0.06 255 / 0.4);
  position: relative;
}
.chain .link2::after {
  content: ""; position: absolute; left: -4px; bottom: -1px; width: 10px; height: 10px;
  border-right: 2px solid oklch(0.6 0.06 255 / 0.5); border-bottom: 2px solid oklch(0.6 0.06 255 / 0.5);
  transform: rotate(45deg);
}

/* ---- Mechanism callout (numbered big) ---- */
.mech {
  display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start;
  background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: clamp(22px,3vw,32px);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 560px){ .mech { grid-template-columns: 1fr; gap: 12px; } }
.mech .mnum {
  font-family: var(--serif); font-weight: 600; font-size: clamp(40px,6vw,64px); line-height: 0.9;
  color: var(--blue); opacity: 0.5; flex: none;
}
.mech h3 { margin: 0 0 8px; }
.mech p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* ---- Warning callout (talker vs doer) ---- */
.warnbox {
  display: flex; gap: 16px; align-items: flex-start; margin-top: 22px;
  background: var(--warn-tint); border-radius: 16px; padding: 20px 22px;
}
.warnbox svg { width: 30px; height: 30px; flex: none; color: var(--warn); }
.warnbox p { margin: 0; font-size: 15.5px; color: oklch(0.4 0.08 40); }
.warnbox strong { color: var(--warn); }

/* ---- Trilogy map (3-chapter recap with links) ---- */
.trilogy { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
@media (max-width: 760px){ .trilogy { grid-template-columns: 1fr; } }
.tcard {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--hair); border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative; overflow: hidden;
}
.tcard:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--blue-tint-2); }
.tcard .tc-ch { font-size: 12.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terra); }
.tcard h3 { margin: 8px 0 6px; font-size: 22px; }
.tcard .tc-d { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.tcard .tc-go { margin-top: 16px; font-weight: 700; font-size: 14px; color: var(--blue); display: inline-flex; align-items: center; gap: 7px; }
.tcard .tc-go svg { width: 16px; height: 16px; transition: transform 0.2s; }
.tcard:hover .tc-go svg { transform: translateX(3px); }
.tcard.current { border-color: var(--blue); background: var(--blue-tint); }
.tcard.current .tc-go { color: var(--ink-faint); }

/* ---- Final close buttons ---- */
.closeline { display:flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 30px; }
.closeline a {
  display:inline-flex; align-items:center; gap:9px; font-weight:700; font-size:15px; text-decoration:none;
  padding: 13px 24px; border-radius: 999px; transition: transform 0.15s, background 0.2s, filter 0.15s;
}
.closeline a svg { width: 17px; height: 17px; }
.closeline a.ghost { color: oklch(0.9 0.02 250); border: 1px solid oklch(0.7 0.04 250 / 0.4); }
.closeline a.ghost:hover { background: oklch(0.7 0.04 250 / 0.15); transform: translateY(-1px); }
.closeline a.solid { background: var(--amber); color: oklch(0.25 0.05 60); }
.closeline a.solid:hover { transform: translateY(-1px); filter: brightness(1.05); }
