@import url('couleurs.css');
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,300;0,400;0,600;0,700;1,400&family=Syne:wght@400;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

:root {
  --bg:          #050a05;
  --bg2:         #030803;
  --surface:     #071007;
  --card:        #040904;
  --card2:       #001e00;
  --text:        #c8ffc8;
  --muted:       #80cc80;
  --dim:         #3a6b3a;
  --cyan:        #39ff14;
  --cyan-soft:   rgba(57, 255, 20, 0.10);
  --cyan-glow:   rgba(57, 255, 20, 0.25);
  --violet:      #1aff7a;
  --violet-soft: rgba(26, 255, 122, 0.10);
  --emerald:     #39ff14;
  --amber:       #ff3030;
  --border:      rgba(57, 255, 20, 0.08);
  --border-hi:   rgba(57, 255, 20, 0.25);
  --mono:    'IBM Plex Mono', 'Consolas', monospace;
  --display: 'Syne', sans-serif;
  --body:    'DM Sans', sans-serif;
  --radius:    14px;
  --radius-sm: 8px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  min-height: 100vh;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(57, 255, 20, 0.008) 2px,
      rgba(57, 255, 20, 0.008) 4px
    );
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ═══════════════════════════════════════
   COVER
═══════════════════════════════════════ */
.cover {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(32px, 5vw, 64px);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 15% 80%, rgba(57, 255, 20, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(26, 255, 122, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(57, 255, 20, 0.03) 0%, transparent 70%),
    var(--bg2);
}

.cover::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(57, 255, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 255, 20, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  animation: gridScroll 20s linear infinite;
  pointer-events: none;
}

.cover::after {
  content: '';
  position: absolute;
  top: -120px; right: -80px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(26, 255, 122, 0.08), transparent 65%);
  animation: orb 8s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes gridScroll {
  from { transform: translateY(0); }
  to   { transform: translateY(60px); }
}

@keyframes orb {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-30px, 20px) scale(1.08); }
}

.cover-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
  position: relative;
  z-index: 1;
  animation: fadeSlideDown 0.6s ease both;
}

.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.5);
  animation: ripple 2s infinite;
}

@keyframes ripple {
  0%   { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(57, 255, 20, 0); }
  100% { box-shadow: 0 0 0 0 rgba(57, 255, 20, 0); }
}

.cover-title-wrap {
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.7s 0.15s ease both;
}

.cover-pre {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--violet);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
  opacity: 0.85;
}

.cover-title {
  font-family: var(--display);
  font-size: clamp(52px, 9vw, 110px);
  font-weight: 800;
  line-height: 0.92;
  letter-spacing: -0.03em;
  display: block;
  background: linear-gradient(160deg, #c8ffc8 0%, #80cc80 35%, var(--cyan) 65%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cover-title .t2 {
  display: block;
  -webkit-text-fill-color: transparent;
  background: linear-gradient(160deg, var(--cyan) 0%, var(--violet) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.cover-title .t3 {
  display: block;
  font-size: clamp(12px, 1.5vw, 16px);
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0.08em;
  -webkit-text-fill-color: var(--muted);
  margin-top: 20px;
}

.cover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  z-index: 1;
  animation: fadeSlideUp 0.7s 0.3s ease both;
}

.cover-cell {
  background: var(--surface);
  padding: 16px 20px;
  transition: background 0.2s;
}

.cover-cell:hover { background: var(--card); }

.cover-cell .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 5px;
}

.cover-cell .val {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.cover-corner {
  position: absolute;
  bottom: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 48px);
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.06em;
  text-align: right;
  line-height: 1.8;
  z-index: 1;
}

/* ═══════════════════════════════════════
   NAV
═══════════════════════════════════════ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;

  z-index: 9000;

  display: flex;
  align-items: center;
  gap: 0;

  padding: 0 clamp(16px, 3vw, 40px);
  height: 56px;

  background: rgba(5, 10, 5, 0.92);

  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);

  border-bottom: 1px solid var(--border);

  box-shadow: 0 1px 40px rgba(0, 0, 0, 0.5);
}
body {
  padding-top: 56px;
}
nav::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.4;
}

.nav-brand {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--cyan);
  letter-spacing: 0.06em;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  white-space: nowrap;
  text-shadow: 0 0 8px var(--cyan);
}

.dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
  animation: blink 2s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  display: block;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
  letter-spacing: 0.01em;
}

.nav-links a:hover {
  color: var(--cyan);
  background: var(--cyan-soft);
  border-color: var(--border-hi);
  text-shadow: 0 0 8px var(--cyan);
}

/* ═══════════════════════════════════════
   TABLE OF CONTENTS
═══════════════════════════════════════ */
.toc-wrap {
  margin: 48px auto;
  max-width: 900px;
  padding: 0 clamp(16px, 3vw, 32px);
  animation: fadeSlideUp 0.5s ease both;
}

.toc-header {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 6px;
}

.toc-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.toc-item a::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
  transform: scaleY(0);
  transition: transform 0.2s;
  transform-origin: bottom;
}

.toc-item a:hover {
  background: var(--card);
  border-color: var(--border-hi);
  color: var(--text);
  padding-left: 18px;
}

.toc-item a:hover::before { transform: scaleY(1); }

.toc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 6px;
  background: var(--cyan-soft);
  border: 1px solid var(--border-hi);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--cyan);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   PAGE / CONTENT WRAPPER
═══════════════════════════════════════ */
.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 32px) 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ═══════════════════════════════════════
   PART BLOCKS
═══════════════════════════════════════ */
.part-block {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 40px 0 20px;
  position: relative;
}

.part-block::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-hi), transparent);
  margin-left: 8px;
}

.part-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--cyan);
  text-transform: uppercase;
  white-space: nowrap;
  background: var(--cyan-soft);
  border: 1px solid var(--border-hi);
  padding: 3px 10px;
  border-radius: 20px;
}

.part-title {
  font-family: var(--display);
  font-size: clamp(22px, 4vw, 34px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   SUB-HEADINGS
═══════════════════════════════════════ */
.sh1 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sh1::before {
  content: '//';
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
  font-weight: 400;
}

.sh2 {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 600;
  color: var(--violet);
  margin: 20px 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sh2::before {
  content: '›';
  font-size: 18px;
  color: var(--violet);
}

/* ═══════════════════════════════════════
   SECTION PANELS
═══════════════════════════════════════ */
section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(18px, 3vw, 28px);
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
  animation: fadeSlideUp 0.45s ease both;
}

section::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: radial-gradient(circle at top left, rgba(57, 255, 20, 0.03), transparent 50%);
  pointer-events: none;
}

section:hover {
  border-color: var(--border-hi);
  box-shadow: 0 0 30px rgba(57, 255, 20, 0.06), 0 8px 32px rgba(0, 0, 0, 0.3);
}

section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--violet) 50%, transparent 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 2;
}

section:hover::before { opacity: 1; }

h2 {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

h2::before {
  content: '';
  width: 3px; height: 20px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--cyan), var(--violet));
  flex-shrink: 0;
  box-shadow: 0 0 6px var(--cyan-glow);
}

h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet);
  margin: 18px 0 8px;
  letter-spacing: 0.01em;
}

p {
  color: var(--text);
  margin: 10px 0;
  font-size: 14.5px;
  line-height: 1.75;
}

/* ═══════════════════════════════════════
   LISTS
═══════════════════════════════════════ */
ul.lst, ul {
  list-style: none;
  margin: 12px 0;
}

ul.lst li, ul li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid rgba(57, 255, 20, 0.04);
  line-height: 1.6;
}

ul.lst li:last-child, ul li:last-child { border-bottom: none; }

ul.lst li::before, ul li::before {
  content: '▸';
  color: var(--cyan);
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 3px;
}

/* ═══════════════════════════════════════
   TABLES
═══════════════════════════════════════ */
.tbl {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
  font-size: 13.5px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tbl thead tr { background: rgba(57, 255, 20, 0.05); }

.tbl th {
  padding: 11px 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  border-bottom: 1px solid var(--border-hi);
  text-align: left;
}

.tbl td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  line-height: 1.55;
}

.tbl tbody tr:hover td { background: rgba(57, 255, 20, 0.025); }

.tbl .cat {
  font-weight: 600;
  color: var(--violet);
  font-size: 13px;
  white-space: nowrap;
}

/* ═══════════════════════════════════════
   PILLS / TAGS
═══════════════════════════════════════ */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.18s;
  cursor: default;
}

.pill:hover {
  border-color: var(--border-hi);
  color: var(--text);
  background: var(--cyan-soft);
}

/* ═══════════════════════════════════════
   CODE / INLINE CODE
═══════════════════════════════════════ */
.ic {
  display: inline;
  font-family: var(--mono);
  font-size: 12.5px;
  background: rgba(57, 255, 20, 0.08);
  border: 1px solid rgba(57, 255, 20, 0.18);
  color: var(--cyan);
  padding: 1px 7px;
  border-radius: 5px;
}

.code {
  display: block;
  background: #020602;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cyan);
  overflow-x: auto;
  margin: 14px 0;
  line-height: 1.65;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3), 0 0 10px rgba(57, 255, 20, 0.03);
}

pre, code {
  font-family: var(--mono);
  font-size: 13px;
  background: #020602;
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--cyan);
  display: block;
  overflow-x: auto;
  margin: 12px 0;
  line-height: 1.65;
}

/* ═══════════════════════════════════════
   COMMAND / IPROW TABLES
═══════════════════════════════════════ */
.iptbl {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.iptbl th {
  background: rgba(26, 255, 122, 0.06);
  padding: 9px 13px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.iptbl td { padding: 9px 13px; border-bottom: 1px solid var(--border); }
.iptbl tr:last-child td { border-bottom: none; }
.iptbl .ipk { font-family: var(--mono); font-size: 12.5px; color: var(--cyan); }
.iptbl .ipv { color: var(--violet); font-family: var(--mono); font-size: 12.5px; }

/* ═══════════════════════════════════════
   CARDS / CCARD
═══════════════════════════════════════ */
.cgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.ccard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.22s;
  position: relative;
}

.ccard::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--violet));
  transform: scaleX(0);
  transition: transform 0.25s;
}

.ccard:hover {
  border-color: var(--border-hi);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 16px rgba(57, 255, 20, 0.06);
}

.ccard:hover::after { transform: scaleX(1); }

.ccard-head {
  padding: 12px 15px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--cyan);
  text-transform: uppercase;
  background: rgba(57, 255, 20, 0.04);
  border-bottom: 1px solid var(--border);
  text-shadow: 0 0 6px var(--cyan);
}

.ccard-body {
  padding: 14px 15px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
}

/* ═══════════════════════════════════════
   BOXES (note / warn)
═══════════════════════════════════════ */
.box {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  margin: 14px 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.box.note {
  background: rgba(57, 255, 20, 0.05);
  border: 1px solid rgba(57, 255, 20, 0.2);
}

.box.warn {
  background: rgba(255, 48, 48, 0.05);
  border: 1px solid rgba(255, 48, 48, 0.2);
}

.box-icon { font-size: 17px; flex-shrink: 0; margin-top: 1px; line-height: 1; }
.box.note .box-icon { color: var(--cyan); }
.box.warn .box-icon { color: var(--amber); }

.box-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.box-title { font-family: var(--display); font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.box.note .box-title { color: var(--cyan); }
.box.warn .box-title { color: var(--amber); }

.box-body p { font-size: 14px; line-height: 1.65; color: var(--text); }
.box.note .box-body p { color: #c8ffc8; }
.box.warn .box-body p { color: #ffb3b3; }

.box-body .code { font-size: 12.5px; margin: 8px 0 0; }

/* ═══════════════════════════════════════
   TREE
═══════════════════════════════════════ */
.tree {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  background: #020602;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  line-height: 1.9;
  margin: 14px 0;
  overflow-x: auto;
}

/* ═══════════════════════════════════════
   LESSON BLOCKS
═══════════════════════════════════════ */
.lgrid { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }

.lesson {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.lesson:hover { border-color: var(--border-hi); }

.lesson-title {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  background: rgba(57, 255, 20, 0.04);
  text-shadow: 0 0 6px var(--cyan);
}

.lesson-body {
  padding: 12px 14px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.65;
}

/* ═══════════════════════════════════════
   MISC
═══════════════════════════════════════ */
.br { font-weight: 600; color: var(--text); }
.bt { font-weight: 700; color: var(--cyan); }
.c  { font-family: var(--mono); font-size: 12.5px; color: var(--cyan); background: rgba(57, 255, 20, 0.07); padding: 1px 6px; border-radius: 4px; }
.lf { font-size: 12px; color: var(--muted); font-style: italic; }

/* ═══════════════════════════════════════
   FOOTNOTES
═══════════════════════════════════════ */
.footnotes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 16px;
}

.fn-title {
  padding: 13px 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(57, 255, 20, 0.04);
  border-bottom: 1px solid var(--border);
}

.fn {
  display: flex;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  transition: background 0.15s;
}

.fn:last-child { border-bottom: none; }
.fn:hover { background: rgba(57, 255, 20, 0.015); }

.fn-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--violet);
  white-space: nowrap;
  padding-top: 2px;
  flex-shrink: 0;
  min-width: 40px;
}

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 28px clamp(20px, 4vw, 48px);
  margin-top: 60px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--dim);
  font-family: var(--mono);
  letter-spacing: 0.04em;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--violet), transparent);
  opacity: 0.3;
}

.fa { color: var(--cyan); font-weight: 700; text-shadow: 0 0 8px var(--cyan); }
.fb { color: var(--violet); }

/* ═══════════════════════════════════════
   ANIMATIONS
═══════════════════════════════════════ */
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeSlideLeft {
  from { opacity: 0; transform: translateX(-14px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.page > div { animation: fadeSlideUp 0.45s ease both; }
.page > div:nth-child(1) { animation-delay: 0.05s; }
.page > div:nth-child(2) { animation-delay: 0.10s; }
.page > div:nth-child(3) { animation-delay: 0.15s; }
.page > div:nth-child(4) { animation-delay: 0.20s; }
.page > div:nth-child(5) { animation-delay: 0.25s; }
.page > div:nth-child(6) { animation-delay: 0.30s; }

/* ═══════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════ */
@media (max-width: 768px) {
  .cover-grid { grid-template-columns: 1fr 1fr; }
  .cover-title { font-size: clamp(44px, 11vw, 70px); }
  .cgrid { grid-template-columns: 1fr; }
  .tbl { font-size: 12.5px; }
  .tbl th, .tbl td { padding: 8px 10px; }
  nav { height: auto; padding: 10px 14px; flex-wrap: wrap; }
  .nav-links { gap: 1px; }
  .nav-links a { font-size: 11.5px; padding: 5px 8px; }
  footer { grid-template-columns: 1fr; text-align: center; gap: 6px; }
  .part-title { font-size: clamp(18px, 5vw, 26px); }
}

@media (max-width: 520px) {
  .cover-grid { grid-template-columns: 1fr; }
  .toc-grid { grid-template-columns: 1fr; }
  .pills { gap: 5px; }
  .pill { font-size: 11.5px; padding: 4px 10px; }
}

/* ═══════════════════════════════════════
   VERTICAL TREE COMPONENT
═══════════════════════════════════════ */
.vtree-wrap {
  margin: 18px 0;
  padding: 24px 28px;
  background: #020602;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.vtree-wrap::before {
  content: '';
  position: absolute;
  top: -40px; left: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 255, 20, 0.04), transparent 70%);
  pointer-events: none;
}

.vtree { position: relative; }

.vt-root {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: rgba(57, 255, 20, 0.07);
  border: 1px solid rgba(57, 255, 20, 0.3);
  border-radius: 10px;
  margin-bottom: 6px;
  width: fit-content;
  animation: fadeSlideLeft 0.4s ease both;
}

.vt-root-icon { font-size: 20px; color: var(--cyan); line-height: 1; filter: drop-shadow(0 0 6px var(--cyan)); }
.vt-root-label { font-family: var(--display); font-size: 17px; font-weight: 800; color: var(--cyan); letter-spacing: 0.04em; text-shadow: 0 0 8px var(--cyan); }
.vt-root-sub { font-family: var(--mono); font-size: 10.5px; color: var(--dim); letter-spacing: 0.04em; }

.vt-children { padding-left: 20px; position: relative; margin-top: 4px; }

.vt-children::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 28px;
  width: 2px;
  background: linear-gradient(to bottom, var(--cyan), rgba(57, 255, 20, 0.1));
  border-radius: 2px;
}

.vt-group { position: relative; margin-top: 6px; animation: fadeSlideLeft 0.4s ease both; }
.vt-group:nth-child(1) { animation-delay: 0.05s; }
.vt-group:nth-child(2) { animation-delay: 0.10s; }
.vt-group:nth-child(3) { animation-delay: 0.15s; }
.vt-group:nth-child(4) { animation-delay: 0.20s; }
.vt-group:nth-child(5) { animation-delay: 0.25s; }
.vt-group:nth-child(6) { animation-delay: 0.30s; }
.vt-group:nth-child(7) { animation-delay: 0.35s; }
.vt-group:nth-child(8) { animation-delay: 0.40s; }
.vt-group:nth-child(9) { animation-delay: 0.45s; }

.vt-branch { display: flex; align-items: center; gap: 0; }

.vt-connector { display: flex; align-items: center; flex-shrink: 0; position: relative; }

.vt-line { width: 32px; height: 2px; background: linear-gradient(90deg, var(--cyan), rgba(57, 255, 20, 0.4)); border-radius: 2px; }
.vt-line.short { background: linear-gradient(90deg, rgba(57, 255, 20, 0.5), rgba(57, 255, 20, 0.1)); }

.vt-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--cyan);
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.vt-group:hover .vt-dot { background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }

.vt-folder {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: default;
  margin-left: 8px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.vt-folder::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px 0 0 2px;
}

.vt-folder[data-color="cyan"]::after    { background: var(--cyan); }
.vt-folder[data-color="violet"]::after  { background: var(--violet); }
.vt-folder[data-color="emerald"]::after { background: var(--cyan); }
.vt-folder[data-color="amber"]::after   { background: var(--amber); }

.vt-folder[data-color="cyan"]:hover    { border-color: rgba(57,255,20,0.3);  background: rgba(57,255,20,0.06); }
.vt-folder[data-color="violet"]:hover  { border-color: rgba(26,255,122,0.3); background: rgba(26,255,122,0.06); }
.vt-folder[data-color="emerald"]:hover { border-color: rgba(57,255,20,0.3);  background: rgba(57,255,20,0.06); }
.vt-folder[data-color="amber"]:hover   { border-color: rgba(255,48,48,0.3);  background: rgba(255,48,48,0.06); }

.vt-folder-icon { font-size: 11px; opacity: 0.6; transition: transform 0.2s; }
.vt-folder:hover .vt-folder-icon { transform: translateX(2px); }

.vt-folder-label { font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: 0.03em; }

.vt-folder[data-color="cyan"]    .vt-folder-label { color: var(--cyan); }
.vt-folder[data-color="violet"]  .vt-folder-label { color: var(--violet); }
.vt-folder[data-color="emerald"] .vt-folder-label { color: var(--cyan); }
.vt-folder[data-color="amber"]   .vt-folder-label { color: var(--amber); }

.vt-leaves { padding-left: 49px; position: relative; margin-top: 3px; }

.vt-leaves::before {
  content: '';
  position: absolute;
  left: 19px; top: 0; bottom: 18px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(57, 255, 20, 0.3), transparent);
  border-radius: 1px;
}

.vt-leaf {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px;
  position: relative;
  cursor: default;
  transition: background 0.15s;
  border-radius: 6px;
  margin-top: 2px;
}

.vt-leaf::before {
  content: '';
  position: absolute;
  left: -30px; top: 50%;
  width: 22px; height: 1px;
  background: rgba(57, 255, 20, 0.25);
}

.vt-leaf:hover { background: rgba(57, 255, 20, 0.03); }
.vt-leaf-icon { color: var(--dim); font-size: 12px; flex-shrink: 0; }
.vt-leaf:hover .vt-leaf-icon { color: var(--cyan); }
.vt-leaf-label { font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: 0.02em; transition: color 0.15s; }
.vt-leaf:hover .vt-leaf-label { color: var(--text); }

/* ─── scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }

/* ─── selection ─── */
::selection { background: rgba(57, 255, 20, 0.25); color: #fff; }

#scrollTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: rgba(5, 10, 5, 0.9);
  border: 1px solid var(--accent1);
  border-radius: 14px;
  color: var(--accent1);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(57, 255, 20, 0.3);
  backdrop-filter: blur(8px);
  z-index: 9999;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
  pointer-events: none;
}

#scrollTop.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

#scrollTop:hover {
  background: var(--accent1);
  color: var(--bg);
  box-shadow: 0 0 28px rgba(57, 255, 20, 0.6);
  transform: translateY(-3px);
}
.btn-experiences {
  position: fixed;
  top: 72px;
  right: 16px;
  z-index: 8000;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--cyan);
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-sm);
  text-decoration: none;
  background: rgba(5, 10, 5, 0.85);
  backdrop-filter: blur(8px);
  text-shadow: 0 0 6px var(--cyan);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-experiences:hover {
  background: rgba(57, 255, 20, 0.12);
  border-color: var(--cyan);
  box-shadow: 0 0 14px rgba(57, 255, 20, 0.2);
  transform: translateX(-2px);
}