/* =============================================================
   Enterprise Product Design & Management
   Shared Stylesheet — styles.css
   Swiss Modernist Redesign · v2.0
   © 2026 Richard Sturman. All rights reserved.

   This stylesheet keeps all original class names from v1, so no
   chapter HTML needs to change. Only the visual styling is updated:
   IBM Plex typography, Yellow × Blue palette, 8pt spacing grid.

   To roll back: replace this file with the v1 stylesheet.
   ============================================================= */


/* ─────────────────────────────────────────────
   FONT IMPORT
───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Serif:ital,wght@0,400;0,600;1,400&display=swap');


/* ─────────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────────── */
:root {
  /* Accent — Yellow */
  --yellow:       #FFE55C;
  --yellow-pale:  #FFF6C2;
  --yellow-deep:  #E6C800;

  /* Accent — Blue */
  --blue:         #A8D8EA;
  --blue-pale:    #E3F4FB;
  --blue-deep:    #5BAABF;

  /* Neutrals */
  --ink:          #0D0D0D;
  --ink-mid:      #4A4A4A;
  --ink-light:    #9A9A9A;
  --paper:        #FAFAF7;
  --rule:         #E0E0DC;

  /* Type families */
  --font-sans:    'IBM Plex Sans', Helvetica, Arial, sans-serif;
  --font-serif:   'IBM Plex Serif', Georgia, serif;
  --font-mono:    'IBM Plex Mono', 'Courier New', monospace;

  /* Spacing — 8pt grid */
  --s1: 0.5rem;   /*   8px */
  --s2: 1rem;     /*  16px */
  --s3: 1.5rem;   /*  24px */
  --s4: 2rem;     /*  32px */
  --s5: 3rem;     /*  48px */
  --s6: 4rem;     /*  64px */
  --s7: 6rem;     /*  96px */
}


/* ─────────────────────────────────────────────
   NAV VISIBILITY TOGGLE
   While building / sharing individual chapter
   links, navigation is hidden. To re-enable:
   delete this block.
───────────────────────────────────────────── */
.nav,
.nav-toggle,
.footer-nav {
  display: none !important;
}


/* ─────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  font-weight: 300;
  line-height: 1.7;
}


/* ─────────────────────────────────────────────
   LAYOUT (nav hidden, full-width main)
───────────────────────────────────────────── */
.page {
  display: block;
}

.main {
  max-width: 100%;
}


/* ─────────────────────────────────────────────
   CHAPTER OPENER (.comp-chapter-opener)
   New design system — used by regenerated chapters.
   Full-bleed dark band, but content inside is
   constrained to the body column width and
   left-aligned with body paragraphs below.
   The original .hero block below is retained for
   any chapters not yet regenerated.
───────────────────────────────────────────── */
.comp-chapter-opener {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s7) var(--s4);
}

.comp-chapter-opener-inner {
  max-width: 760px;
  margin: 0 auto;
}

.comp-chapter-num {
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: var(--s3);
}

.comp-chapter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  display: block;
  margin-bottom: var(--s2);
}

.comp-chapter-title {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--paper);
  margin: 0 0 var(--s3) 0;
  max-width: 18ch;
}

.comp-chapter-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250, 250, 247, 0.6);
}

.comp-chapter-meta::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}


/* ─────────────────────────────────────────────
   HERO BANNER (LEGACY — for chapters not yet
   regenerated. Kept until all chapters use the
   new .comp-chapter-opener)
───────────────────────────────────────────── */
.hero {
  width: 100%;
  height: 380px;
  background: var(--ink);
  display: flex;
  align-items: flex-end;
  padding: var(--s6);
  position: relative;
  overflow: hidden;
  color: var(--paper);
}

.hero-tall {
  height: 420px;
}

.hero-grid,
.hero-grid-v,
.hero-grid-h {
  display: none;
}

.hero-decoration {
  position: absolute;
  right: var(--s6);
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.08;
}

/* Existing chapters use background-image inline — keep them muted */
.hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(0.1) contrast(0.9) brightness(0.4);
  opacity: 0.5;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-chapter-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--blue);
  margin-bottom: var(--s2);
}

.hero-title {
  font-family: var(--font-sans);
  font-size: 3rem;
  font-weight: 700;
  color: var(--paper);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-title-lg {
  font-size: 3.5rem;
  line-height: 1.05;
}

.hero-accent {
  width: 56px;
  height: 4px;
  background: var(--yellow);
  margin-top: var(--s3);
}


/* ─────────────────────────────────────────────
   CONTENT AREA
───────────────────────────────────────────── */
.content {
  max-width: 760px;
  margin: 0 auto;
  padding: var(--s6) var(--s4) var(--s7);
}


/* ─────────────────────────────────────────────
   META BAR
───────────────────────────────────────────── */
.meta {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-light);
}

.meta-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
  margin-right: var(--s1);
  vertical-align: middle;
}


/* ─────────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────────── */
.subtitle {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1.5;
  color: var(--ink-mid);
  margin: 0 0 var(--s5) 0;
  font-style: normal;
  max-width: 60ch;
}

h2, .h2 {
  font-family: var(--font-sans);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--s3) 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h3, .h3 {
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
  margin: var(--s5) 0 var(--s2) 0;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

p {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 var(--s2) 0;
  max-width: 68ch;
}


/* ─────────────────────────────────────────────
   LISTS (default body lists — bullets and numbered)
   Match body paragraph styling: IBM Plex Serif,
   standard indent, comfortable spacing.
───────────────────────────────────────────── */
.content ul,
.content ol {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 var(--s3) 0;
  padding-left: 2rem;
  max-width: 68ch;
}

.content li {
  margin-bottom: var(--s1);
}

.content li > p {
  margin-bottom: var(--s1);
}

/* Nested lists — slightly tighter */
.content li ul,
.content li ol {
  margin-top: var(--s1);
  margin-bottom: var(--s1);
}

.cite {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--ink-mid);
}

em { font-style: italic; }
strong { font-weight: 700; }


/* ─────────────────────────────────────────────
   SECTION LABEL (What / Why / How)
───────────────────────────────────────────── */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-mid);
  margin-bottom: var(--s2);
  border-bottom: 3px solid var(--yellow);
  padding-bottom: 4px;
}


/* ─────────────────────────────────────────────
   DIVIDER
───────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 2px;
  background: var(--ink);
  margin: var(--s5) 0;
}


/* ─────────────────────────────────────────────
   CALLOUT (yellow highlighter quote)
───────────────────────────────────────────── */
.callout {
  margin: var(--s5) 0;
  padding: var(--s4) 0;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  font-family: var(--font-sans);
}

.callout-highlight {
  font-size: 1.4rem;
  font-weight: 500;
  font-style: normal;
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, transparent 60%, var(--yellow) 60%, var(--yellow) 92%, transparent 92%);
  padding: 0 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}


/* ─────────────────────────────────────────────
   LEARNING OUTCOMES BOX
───────────────────────────────────────────── */
.learning-outcomes {
  margin: var(--s5) 0;
  padding: var(--s4) var(--s5);
  background: var(--blue-pale);
  border-left: 4px solid var(--blue-deep);
  border-radius: 0;
}

.learning-outcomes h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--s3) 0;
}

.outcome-item {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s2);
  align-items: flex-start;
}

.outcome-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--paper);
  font-weight: 500;
}

.outcome-item p {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}


/* ─────────────────────────────────────────────
   NUMBERED STEPS
───────────────────────────────────────────── */
.step {
  margin-bottom: var(--s4);
  display: grid;
  grid-template-columns: 4px 64px 1fr;
  gap: var(--s2);
}

.step::before {
  content: '';
  background: var(--yellow-deep);
  align-self: stretch;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
  padding-top: 4px;
}

.step-body { flex: none; }

.step-title {
  font-family: var(--font-sans);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s1);
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.step-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}


/* ─────────────────────────────────────────────
   DOT ITEMS
───────────────────────────────────────────── */
.dot-item {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s2);
  align-items: flex-start;
  max-width: 68ch;
}

.dot-item-marker {
  width: 8px;
  height: 8px;
  background: var(--yellow);
  border: 1.5px solid var(--ink);
  margin-top: 10px;
  flex-shrink: 0;
  transform: rotate(45deg);
}

.dot-item-marker-solid {
  background: var(--ink);
  border-color: var(--ink);
}

.dot-item-label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
}

.dot-item-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}


/* ─────────────────────────────────────────────
   TIP ITEMS
───────────────────────────────────────────── */
.tip {
  margin-bottom: var(--s3);
  padding: var(--s2) var(--s3);
  background: var(--yellow-pale);
  border-left: 4px solid var(--yellow-deep);
}

.tip-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.tip-body {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  font-weight: 400;
}


/* ─────────────────────────────────────────────
   TOOL CARDS
───────────────────────────────────────────── */
.tool-card {
  margin-bottom: var(--s3);
  padding: var(--s4);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ink);
  border-radius: 0;
}

.tool-card-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--s1);
  letter-spacing: -0.01em;
}

.tool-card-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
  margin-bottom: var(--s2);
}

.tool-card-helps {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-mid);
  border-top: 1px solid var(--rule);
  padding-top: var(--s2);
}

.tool-card-helps strong {
  color: var(--ink);
  font-weight: 700;
}


/* ─────────────────────────────────────────────
   METHOD CARDS
───────────────────────────────────────────── */
.method-card {
  padding: var(--s3);
  background: var(--paper);
  border: 1px solid var(--rule);
  margin-bottom: var(--s2);
}

.method-card-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: var(--s2);
  letter-spacing: -0.01em;
}

.method-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s1) var(--s2);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink);
}

.method-card-grid strong {
  color: var(--ink);
  font-weight: 700;
}

.method-card-outputs {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--ink-mid);
  margin-top: var(--s2);
  padding-top: var(--s1);
  border-top: 1px solid var(--rule);
}


/* ─────────────────────────────────────────────
   ROLE CARDS
───────────────────────────────────────────── */
.role-card {
  margin-bottom: var(--s3);
  padding-left: var(--s2);
  border-left: 2px solid var(--yellow);
}

.role-card-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.role-card-desc {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--ink);
}

.roles-container {
  margin: var(--s4) 0 var(--s5);
  padding: var(--s4);
  background: var(--paper);
  border: 1px solid var(--rule);
}

.roles-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mid);
  margin-bottom: var(--s3);
}


/* ─────────────────────────────────────────────
   SYNTHESIS STEPS
───────────────────────────────────────────── */
.synthesis-step {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s2);
  align-items: flex-start;
}

.synthesis-num {
  width: 28px;
  height: 28px;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 0;
}


/* ─────────────────────────────────────────────
   COMPARISON TABLE
───────────────────────────────────────────── */
.comparison-table {
  margin: var(--s4) 0;
  overflow-x: auto;
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
}

.comparison-table th,
.comparison-table td {
  border-bottom: 1px solid var(--rule);
  padding: var(--s2);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.55;
  vertical-align: top;
  text-align: left;
}

.comparison-table thead tr {
  background: var(--ink);
}

.comparison-table th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper);
  border-bottom: none;
}

.comparison-table td.row-label {
  font-weight: 700;
  color: var(--ink);
  background: var(--yellow-pale);
  font-family: var(--font-sans);
}

.comparison-table .caption {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mid);
  font-style: normal;
  margin-top: var(--s1);
  letter-spacing: 0.05em;
}


/* ─────────────────────────────────────────────
   BOOK PART OUTLINE
───────────────────────────────────────────── */
.book-part {
  margin-bottom: var(--s4);
  padding-left: var(--s3);
  border-left: 4px solid var(--yellow-deep);
}

.book-part-chs {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mid);
  margin-bottom: 4px;
}

.book-part-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 var(--s1) 0;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.book-part-desc {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--ink);
}


/* ─────────────────────────────────────────────
   DIAGRAM CONTAINERS
───────────────────────────────────────────── */
.diagram {
  margin: var(--s4) 0;
  border: 1px solid var(--rule);
  background: var(--paper);
  padding: var(--s4);
}

.diagram svg {
  display: block;
  margin: 0 auto;
}

.diagram-caption {
  border-top: 1px solid var(--rule);
  padding-top: var(--s1);
  margin-top: var(--s2);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mid);
  font-style: normal;
  letter-spacing: 0.04em;
}

.diagram-flush {
  padding: var(--s4) var(--s4) 0;
}

.diagram-flush .diagram-caption {
  padding: var(--s1) 0;
}


/* ─────────────────────────────────────────────
   FIGURE (real images)
───────────────────────────────────────────── */
.figure {
  margin: var(--s4) 0;
}

.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--rule);
}

.figure .diagram-caption {
  border-top: none;
  padding-top: var(--s1);
}


/* ─────────────────────────────────────────────
   IMAGE PLACEHOLDER
───────────────────────────────────────────── */
.image-placeholder {
  margin: var(--s4) 0;
  border: 1px solid var(--blue);
  background: var(--blue-pale);
}

.image-placeholder-inner {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--s1);
  padding: var(--s4);
}

.image-placeholder-desc {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--blue-deep);
  text-align: center;
  max-width: 400px;
  line-height: 1.5;
  letter-spacing: 0.04em;
}

.image-placeholder .diagram-caption {
  border-top: 1px solid var(--blue);
  padding: var(--s1) var(--s2);
}


/* ─────────────────────────────────────────────
   COPYRIGHT FOOTER
───────────────────────────────────────────── */
.copyright {
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.copyright p {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-mid);
  line-height: 1.6;
  margin: 0;
  letter-spacing: 0.05em;
  font-style: normal;
}

.copyright .notice {
  font-size: 0.65rem;
  color: var(--ink-light);
  margin-top: 4px;
}


/* ─────────────────────────────────────────────
   INLINE TEXT — yellow / blue highlights
───────────────────────────────────────────── */
mark.yellow,
.mark-yellow {
  background: var(--yellow);
  padding: 0.05em 0.15em;
  color: inherit;
}

mark.blue,
.mark-blue {
  background: var(--blue);
  padding: 0.05em 0.15em;
  color: inherit;
}


/* ─────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────── */
@media (max-width: 900px) {
  .comp-chapter-opener {
    padding: var(--s5) var(--s3);
  }

  .comp-chapter-num {
    font-size: 3.5rem;
  }

  .comp-chapter-title {
    font-size: 2.25rem;
  }

  .hero {
    height: 300px;
    padding: var(--s4);
  }

  .hero-title { font-size: 2.25rem; }
  .hero-title-lg { font-size: 2.5rem; }

  .content {
    padding: var(--s4) var(--s3) var(--s6);
  }

  .method-card-grid {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 4px 48px 1fr;
  }

  .step-num { font-size: 1.25rem; }
}

@media (max-width: 600px) {
  .comp-chapter-opener {
    padding: var(--s4) var(--s3);
  }

  .comp-chapter-num {
    font-size: 2.75rem;
  }

  .comp-chapter-title {
    font-size: 1.75rem;
  }

  .hero {
    height: 240px;
    padding: var(--s3);
  }

  .hero-title { font-size: 1.75rem; }
  .hero-title-lg { font-size: 2rem; }

  .hero-decoration { display: none; }

  .callout-highlight { font-size: 1.15rem; }

  .subtitle { font-size: 1.15rem; }

  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.2rem; }
}
