/* ═══════════════════════════════════════════
    [!] RESET
   ═══════════════════════════════════════════ */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

:root {
  font-optical-sizing: auto;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}


/*  example because i like these colors
    :root {
      --gap: 20px;
      --bg: #f5f2ed;
      --surface: #fff;
      --ink: #1a1a1a;
      --muted: #777;
      --accent: #2563eb;
      --code-bg: #f0eee9;
      --border: #ddd;
      --tag-bg: #e8e4dd;
      font-family: system-ui, -apple-system, sans-serif;
      color: var(--ink);
      background: var(--bg);
 */


/* ═══════════════════════════════════════════
   [!] 1. DESIGN TOKENS (CSS Variables)
   ═══════════════════════════════════════════ */

:root {

  --page-max: 960px;
  --page-pad: 24px;

  font-size: 14px;
  
  /* -- PRIMITIVE COLORS (The Palette) -- */
  --gray-000: #FAF9F6;
  --gray-100: #F0EFEA;
  --gray-200: #EDECE8;
  --gray-300: #E0DFD9;
  --gray-500: #6B6A68;
  --gray-900: #2C2C2B;
  
  --red-500:  #D95C50;
  --blue-500: #3B82F6;

  /* -- SEMANTIC COLORS (The Roles) -- */
  --bg-page:        var(--gray-000);
  --bg-surface:     var(--gray-100);
  --bg-surface-alt: var(--gray-200);
  
  --text-primary:   var(--gray-900);
  --text-secondary: var(--gray-500);
  --text-inverse:   var(--gray-000);
  
  --border-subtle:  var(--gray-300);
  --border-strong:  var(--gray-500);
  
  --color-accent:   var(--red-500);
  --focus-ring:     color-mix(in srgb, var(--blue-500) 50%, transparent);

  /* -- DELTA LOGIC -- */
  --delta-neg:      var(--color-accent); /* Action required */
  --delta-pos:      var(--text-secondary); /* Good, muted */

  /* -- TYPOGRAPHY -- */
  --font-mono:      'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
  --font-serif:     'Lora', ui-serif, Georgia, serif;
  
  --font-base:      var(--font-mono);
  --weight-light:   300;
  --weight-bold:    400;
  --weight-display: 100;
  --line-height:    1.6;

  /* Typographic Scale (Fluid) */
  --text-xs:        0.75rem;
  --text-sm:        0.875rem;
  --text-base:      1rem;
  --text-lg:        clamp(1.125rem, 2vw, 1.25rem);
  --text-xl:        clamp(1.5rem, 3.5vw, 2.5rem);
  --text-2xl:       clamp(2.5rem, 6vw, 4.5rem);
  --text-display:   clamp(3rem, 20vw, 6rem);

  /* -- SPACING (ch for Mono, rem fallback) -- */
  --space-2xs:      0.5ch;
  --space-xs:       1ch;
  --space-sm:       2ch;
  --space-md:       4ch;
  --space-lg:       8ch;
  --space-xl:       16ch;
  
  --layout-pad:     var(--space-lg);
  --layout-gap:     var(--space-md);
  --layout-text-width: 91ch;

  /* -- STRUCTURAL -- */
  --radius-none:    0px;
  --radius-sm:      2px;
  
  --transition-fast: 150ms ease;
  --transition-slow: 300ms ease;

  --z-base:         0;
  --z-elevated:     10;
  --z-overlay:      100;
}

/* -- THEME OVERRIDES -- */
[data-theme="dark"] {
  --gray-000: #1C1B1A;
  --gray-100: #262524;
  --gray-200: #2E2D2B;
  --gray-300: #333230;
  --gray-500: #A3A19E;
  --gray-900: #E6E5E3;
  --red-500:  #E07A5F;
}

[data-font="serif"] {
  --font-base:    var(--font-serif);
  --weight-light: 400;
  --weight-bold:  700;
  --line-height:  1.75;
  
  /* Convert ch spacing to rem for serif proportional width */
  --space-2xs:    0.25rem;
  --space-xs:     0.5rem;
  --space-sm:     1rem;
  --space-md:     2rem;
  --space-lg:     4rem;
  --space-xl:     8rem;
}


/* ═══════════════════════════════════════════
   [!] 2. BASE
   ═══════════════════════════════════════════ */

/* page wrapper */
/* [!] [todo] apply to book-list.html */
/* [!] [todo] apply to base.html  */
.page {
  max-width: var(--page-max);
  margin-inline: auto;          /* centers horizontally */
  padding-inline: var(--page-pad);
  padding-block: 32px;
  transition: max-width 0.4s ease;
}

/* Wide mode — just change the cap */
.page.wide {
  --page-max: 1400px;
}

/* page settings and controls */

  .settings-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  /* check vars */
  .settings-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    background: var(--bg);
    color: var(--ink);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    /* opacity: 1; if later need to turn this on or off*/ 
    transition: opacity 0.5s ease 0.15s, transform 0.3s ease, background-color 0.6s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  }

  .settings-btn:hover {
    transform: scale(1.06);
  }

  .settings-btn:active {
    transform: scale(0.95);
  }

  .settings-panel {
    background: #fff;
    border: 0.5px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    padding: 14px 16px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    opacity: 0;
    transform: translateY(6px) scale(0.96);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    min-width: 180px;
    /* why 
    bottom: calc(100% + 0.5rem);
    right: 0; 
    display: none; */

  }

  .settings-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    /* display: block; */
  }
  
  .settings-header {
    /* redundant?
    font-family: var(--font-body); */
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 12px;
  }  
 
  .setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .setting-label {
    font-size: 13px;
    color: var(--text-primary);
  }

  .setting-controls {
    display: flex;
    gap: 4px;
  }

  .mode-btn {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
  }

  .mode-btn:hover { border-color: var(--accent); color: var(--accent); }

  .mode-btn.active {
    background: var(--ink);
    color: var(--surface);
    border-color: var(--ink);
  }

/*  */


/* [!] continue from here */

body {
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-base);
  font-weight: var(--weight-light);
  font-size: var(--text-base);
  line-height: var(--line-height);
  transition: background-color var(--transition-slow), color var(--transition-slow);
}

/* section,  */
footer {
  padding: var(--space-md) var(--space-md);
}

/* Accessibility: Global Focus Ring */
*:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* ══════════════════════════════════════════════════════════════
   3. TYPOGRAPHY PRIMITIVES
   ══════════════════════════════════════════════════════════════ */


p { margin-bottom: var(--space-xs); }

blockquote {
  border-left: 1px solid var(--border-subtle);
  padding-left: var(--space-md);
  margin-left: 0;
  margin-bottom: var(--space-sm);
  font-style: italic;
}

blockquote cite {
  display: block;
  margin-top: var(--space-xs);
  padding-left: var(--space-xl);
  font-style: normal;
  color: var(--text-secondary);
}

h2, h3, h4 { font-weight: var(--weight-bold); }
strong, b { font-weight: var(--weight-bold); }

a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-color: var(--text-secondary);
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}
a:hover {
  color: var(--color-accent);
  text-decoration-color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

ul {
  padding-left: 3ch;

}

/* ═══════════════════════════════════════════════════════
   4. COMPONENT ARCHITECTURE
   ═══════════════════════════════════════════════════════ */


/* --- Layout Utilities --- */

.layout-pad {
  padding-inline: var(--space-lg);
}
.layout-pad-t-lg {
  padding-top: var(--space-lg);
}
.layout-pad-t-xl {
  padding-top: 6ch;
}
.layout-pad-b-md {
  padding-bottom: var(--space-md);
}

/* --- Typography Components --- */

/* [!] display header */

  .display-header {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--layout-gap);
    align-items: flex-start;
  }

  @media (max-width: 900px) {
    .display-header {
      grid-template-columns: 1fr;
    }
  }

  .col-span-1 { grid-column: span 1; }
  .col-span-2 { grid-column: span 2; }
  .col-span-3 { grid-column: span 3; }
  .col-span-4 { grid-column: span 4; }

  .display-title {
    white-space: wrap;   /* keeps BIG TEXT on one line */
    flex: 0 1 auto;        /* grow no, shrink no, size auto */
    margin: 0;
      /* container-type: inline-size; */
      /* [!] container type breaking some shit */
  }

  .display-title h1 {
    font-weight: var(--weight-display);  
    font-size: var(--text-display); 

    line-height: 0.70;      
    /* "cuts" the ascendants of the display text, forcing the paragraph on the left to align to the top of the "x height" */
    /* [!] very custom to ibm plex mono */

    letter-spacing: -0.04em;
    transform: translateY(-0.13em);
    /* this is relative to line height and aligning the display text with the textinho by hte top of the x height */

    display: flex;
    align-items: center;
    gap: var(--space-md);
    width: 100%;
  }

  .display-title h1::after {
    content: '';
    flex-grow: 1;
    height: 3px;
    background: var(--color-accent);
    opacity: 0.3;
  }

  /* ∨∨∨ title with node intro ∨∨∨ */

  .title-with-node-intro {
    display: grid; 
    grid-template-columns: minmax(0, max-content);
    /* for generated pages that have node-intro */
  }

  .title-with-node-intro #title {
    grid-column: 1; 
    margin: 0;
  }

  .title-with-node-intro #node-intro {
    grid-column: 1; 
    width: 0; 
    min-width: 100%; 
    margin-top: var(--space-md); 
    margin-bottom: var(--space-lg);
    /* makes the node-intro respect the title width */
  }

  /* ∧∧∧ title with node intro ∧∧∧ */


  .display-sidetext {
    flex: 1 1 52ch;     /* grow yes, shrink yes, size defined */
                           /* min-width: 28ch; no needus */
    max-width: var(--layout-text-width);
    max-height: calc(var(--text-display) * 0.80 );
    /* [!] also very custom to ibm plex mono and --text-display */
    overflow-y: auto;
    scrollbar-width: none;
  }

  .display-sidetext p { margin: 0; }


/* [!] section - at glance */

  .at-glance-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 6ch;
    /* align-items: flex-start; */
  }

  .at-glance-list {
    padding-left: 3ch;
    list-style-position: outside;
    word-break:break-all;
    hyphens:auto;
  }
  .at-glance-list li::marker {
    content: "❁ ";
    font-size: 1.5rem;
    line-height: 0.75rem;
  }

  .at-glance-metrics {
    display: flex;
    flex-direction: column;
    flex: 1 1 52ch;     /* grow yes, shrink yes, size defined */
    max-width: var(--layout-text-width);
    gap: var(--space-sm);
  }

  /* [!] metric card stuff */

  .metric-card {
    background: var(--bg-surface);
    padding: var(--space-sm) var(--space-sm);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
  }

  .metric-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--gray-500);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .metric-card:hover::before { opacity: 1; }
  
  .metric-card-row {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
  }

  .metric-card-actual {
    font-size: var(--text-display); 
    /* font-size: clamp(2.5rem, 6vw, 6rem) */
    font-weight: var(--weight-light);
    letter-spacing: -0.04em;
    line-height: 1;
  } 

  .metric-card-meta-column {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: var(--space-xs);
  }

  .metric-card-label {
    font-size: var(--text-xs);
    font-weight: var(--weight-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
  }
  
  .metric-card-meta {
    font-size: var(--text-sm);
    color: var(--text-secondary);
  }

  .metric-card-stat-group {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  .metric-card-stat-text {
    font-size: 0.875em;
    white-space: nowrap;
    color: var(--text-secondary);
  }

  .metric-progress-strip {
    height: 3px;
    background: var(--border-subtle);
    margin-top: var(--space-sm);
    margin-left: 1ch;
    margin-right: 1ch;
    position: relative;
  }
  
  .progress-strip__fill {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    background: var(--text-primary);
    transition: width 0.9s cubic-bezier(0.25, 1, 0.5, 1);
  }
  
  .progress-strip__expected {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 11px;
    background: var(--color-accent);
  }

  .progress-strip__labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7em;
    margin-left: 1ch;
    margin-right: 1ch;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
  }

  /* women auth and global south auth cards row */

  .at-glance-cards-row {
    display: flex;
    /* flex: 1 1 calc(50% - 0.5rem); */
    flex-wrap: wrap;
    gap: var(--space-sm);
  }

  .at-glance-cards-row > .metric-card {
    flex: 1 1 37ch;
  }

/* next part */
/* wip wipzaço from here */

/* [!] continue main grid from here */

.section-label {
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: var(--text-xs);
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
}

.num-display {
  font-size: var(--text-display);
  font-weight: var(--weight-light);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
}

/* --- Interactive Components --- */
.btn-reset {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--text-sm);
  cursor: pointer;
  padding: var(--space-2xs) var(--space-xs);
  transition: color var(--transition-fast), background var(--transition-fast);
  border-radius: var(--radius-sm);
}

.btn-reset:hover {
  color: var(--color-accent);
  background: var(--bg-surface);
}

.btn-reset.is-active {
  color: var(--text-primary);
  font-weight: var(--weight-bold);
}

/* --- Surface Components (Cards) --- */
.card {
  background: var(--bg-surface-alt);
  padding: var(--space-sm) var(--space-md);
  position: relative;
  border: 1px solid transparent;
  transition: border-color var(--transition-fast);
  border-radius: var(--radius-none); /* Brutalist by default */
}

/* Elevation via borders, not shadows */
.card:hover {
  border-color: var(--border-subtle);
}

/* Accent edge card */
.card--accented::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.card--accented:hover::before {
  opacity: 1;
}

/* --- Status Indicators --- */
.delta-badge {
  display: inline-flex;
  align-items: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  padding: 0.15em 0.6em;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.delta-badge--neutral {
  color: var(--delta-pos);
  border: 1px solid var(--border-subtle);
  background: transparent;
}

.delta-badge--negative {
  background: color-mix(in srgb, var(--delta-neg) 15%, transparent);
  color: var(--delta-neg);
  border: 1px solid transparent;
}

/* ══════════════════════════════════════════════════════════════
   5. READING DASHBOARD / BOOK LIST COMPONENTS
   ══════════════════════════════════════════════════════════════ */

.book-index-list {
  list-style: none;
  margin: 0 0 var(--space-lg, 2rem) 0;
  padding: 0;
}
.book-index-list li {
  margin-bottom: var(--space-xs, 0.25rem);
}
.book-index-list li:last-child {
  border-bottom: none;
}
.book-index-list a {
  color: var(--text-primary);
  text-decoration: none;
}
.book-index-list a:hover {
  text-decoration: underline;
}
.book-author {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  margin-left: var(--space-sm);
}
.section-grid {
  display: grid;
  grid-template-columns: 12ch 1fr;
  gap: var(--space-sm);
  align-items: start;
}
.section-grid h2 {
  margin: 0;
  padding: 0 2ch;
  text-align: center;
  font-size: var(--text-lg);
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
}



.header-title {
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: var(--weight-light);
  letter-spacing: -0.02em;
  line-height: 1;
}

.header-year {
  color: var(--accent);
}


.main-grid {
  display: grid;
  grid-template-columns: 0.75fr 2fr 1fr;
  gap: 0;
  margin-bottom: var(--space-xl);
  font-family: var(--font-base);
  color: var(--text-primary);
}

.main-grid a {
  color: inherit;
  text-decoration: none;
  text-underline-offset: 4px;
  text-decoration-color: var(--text-secondary);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.main-grid a:hover { color: var(--color-accent); text-decoration-color: var(--color-accent); 
  text-decoration: underline;
}


.main-grid .section-label {
  font-weight: var(--weight-bold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75em;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid var(--border-subtle);
}
.main-grid .delta {
  display: inline-block;
  font-size: 0.75em;
  font-weight: var(--weight-bold);
  padding: 0.15em 0.6em;
  border-radius: 2px;
  white-space: nowrap;
}
.main-grid .delta--pos, .main-grid .delta--neutral {
  color: var(--delta-pos);
  border: 1px solid var(--border-subtle);
  background: transparent;
}
.main-grid .delta--neg {
  background: color-mix(in srgb, var(--delta-neg) 15%, transparent);
  color: var(--delta-neg);
  border: 1px solid transparent;
}

.main-grid .tab-btn {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  background: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  border: none;
}
.main-grid .tab-btn:hover { color: var(--color-accent); }
.main-grid .tab-btn.active { color: var(--text-primary); }
.main-grid .tab-btn.active::before { content: "["; }
.main-grid .tab-btn.active::after { content: "]"; }

.main-grid .col {
  padding: 0 var(--space-md);
}
.main-grid .col:first-child { padding-left: 0; }
.main-grid .col:last-child  { padding-right: 0; }

.main-grid .col--ytd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-content: start;
}

.main-grid .col--context,
.main-grid .col--reads {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.main-grid .metric-card {
  background: var(--bg-surface);
  padding: var(--space-sm) var(--space-md);
  position: relative;
  overflow: hidden;
}
.main-grid .metric-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--color-accent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.main-grid .metric-card:hover::before { opacity: 1; }

.main-grid .metric-card__label {
  font-size: 0.7em;
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.main-grid .card--wide { grid-column: span 2; }
.main-grid .card-wide-row {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}
.main-grid .card-actual {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: var(--weight-light);
  letter-spacing: -0.04em;
  line-height: 1;
}
.main-grid .card-wide-meta {
  font-size: 0.875em;
  color: var(--text-secondary);
}

.main-grid .progress-strip {
  height: 3px;
  background: var(--border-subtle);
  margin-top: var(--space-sm);
  position: relative;
}
.main-grid .progress-strip__fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: var(--text-primary);
  transition: width 0.9s cubic-bezier(0.25, 1, 0.5, 1);
}
.main-grid .progress-strip__expected {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 11px;
  background: var(--color-accent);
}
.main-grid .progress-strip__labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7em;
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.main-grid .reads-list {
  list-style: disc;
  padding-left: 1rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}
.main-grid .reads-list li {
  color: var(--text-secondary);
}
.main-grid .reads-list a {
  text-decoration: none;
  font-weight: inherit;
  color: inherit;
}
.main-grid .reads-list a:hover {
  text-decoration: underline;
  color: var(--color-accent);
}
.main-grid .reads-list .title {
  color: var(--text-primary);
}

.main-grid .context-block {
  opacity: 1;
  transition: opacity 0.2s ease;
}
.main-grid .context-block__title {
  font-weight: var(--weight-bold);
  margin-bottom: var(--space-2xs);
  font-size: 0.875em;
}
.main-grid .context-block__body {
  color: var(--text-secondary);
  font-size: 0.8em;
  line-height: 1.55;
  margin-bottom: var(--space-xs);
}
.main-grid .context-block__body em {
  font-style: normal;
  color: var(--text-primary);
  font-weight: var(--weight-bold);
}
.main-grid .context-dynamic {
  padding: var(--space-sm);
  background: var(--bg-surface);
  transition: opacity 0.2s ease;
}
.main-grid .context-dynamic__text {
  font-size: 0.8em;
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 4em;
}
.main-grid .context-dynamic__text strong { color: var(--text-primary); }

.main-grid .proj-card {
  padding-top: var(--space-sm);
  border-top: 2px solid var(--border-subtle);
  transition: border-color 0.2s ease;
}
.main-grid .proj-card:hover { border-color: var(--text-secondary); }
.main-grid .proj-card__label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}
.main-grid .proj-card__value {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: var(--weight-light);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: var(--space-xs);
}
.main-grid .proj-card__action {
  font-size: 0.8em;
  color: var(--text-secondary);
  line-height: 1.4;
}
.main-grid .proj-card__action strong { color: var(--text-primary); }

@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
  .main-grid .col { padding: 0; border-left: none !important; }
  .main-grid .col--ytd {
    grid-template-columns: 1fr 1fr;
  }
  .main-grid .card--wide { grid-column: span 2; }
}

@media (max-width: 550px) {
  .main-grid .col--ytd { grid-template-columns: 1fr; }
  .main-grid .card--wide { grid-column: span 1; }
  .main-grid { gap: var(--space-md); }
}

/* ══════════════════════════════════════════════════════════════
   6. MARKDOWN SECTIONS
   ══════════════════════════════════════════════════════════════ */

.content-sections {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.content-section {
  display: grid;
  grid-template-columns: 1fr minmax(0, var(--layout-text-width)) 1fr;
  gap: var(--space-lg);
  align-items: baseline;
}

.section-heading {
  grid-column: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

@media (max-width: 768px) {
  .content-section {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  .section-heading {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }
}

.section-heading-text {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  line-height: 1.2;
  color: var(--text-primary);
  /* stylish addition */
  position: relative;
  display: inline-block;
}

.section-heading-text::after {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  margin-top: var(--space-xs);
  opacity: 0.3;
}

.section-body {
  grid-column: 2;
  max-width: var(--layout-text-width);
}

@media (max-width: 768px) {
  .section-body {
    grid-column: 1;
  }
}

.section-body > *:first-child {
  margin-top: 0;
}

