/* ═══════════════════════════════════════════════════════
   style.css — OpticalFlow 作品集网站
   ═══════════════════════════════════════════════════════ */

/* ─────────── CSS RESET & BASE ─────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Noto Sans SC', 'Manrope', system-ui, sans-serif;
  background: #ffffff;
  color: #0f172a;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }


/* ─────────── CSS VARIABLES ─────────── */
:root {
  --bg: #ffffff;
  --bg2: #f5f7fb;
  --border: #e8ecf2;
  --blue: #1a6fc4;
  --blue-dark: #1554a0;
  --blue-bg: #eaf2ff;
  --blue-mid: #b8d4f8;
  --green: #1a7a4a;
  --green-bg: #e6f6ed;
  --green-mid: #a8d9bc;
  --ink: #0f172a;
  --mid: #3d4f6a;
  --muted: #6b7a99;
  --small: #94a3be;
  --r: 14px;
  --r-sm: 8px;
  --container: min(92vw, 1160px);
  /* wave glow spots (light) */
  --glow-a: rgba(100,160,255,0.22);
  --glow-b: rgba(80,200,140,0.18);
  --glow-c: rgba(160,130,255,0.14);
  /* nav bg */
  --nav-bg: rgba(255,255,255,.88);
}

/* ── Dark mode overrides ── */
html.dark {
  --bg: #0d1117;
  --bg2: #161b22;
  --border: #21262d;
  --blue: #58a6ff;
  --blue-dark: #79b8ff;
  --blue-bg: #0d2038;
  --blue-mid: #1c3d60;
  --green: #3fb950;
  --green-bg: #0d2a16;
  --green-mid: #1a4a28;
  --ink: #e6edf3;
  --mid: #8b949e;
  --muted: #6e7681;
  --small: #484f58;
  /* dark glow spots */
  --glow-a: rgba(58,130,246,0.28);
  --glow-b: rgba(34,197,94,0.18);
  --glow-c: rgba(139,92,246,0.22);
  --nav-bg: rgba(13,17,23,.90);
}

html.dark body { background: var(--bg); color: var(--ink); }

/* ── Global dark-mode transitions ── */
body, nav, footer, .nav-dropdown, .badge, .btn-secondary, .social-icon {
  transition: background .3s, color .3s, border-color .3s;
}


/* ─────────── LAYOUT ─────────── */
.container { width: var(--container); margin: 0 auto; }


/* ─────────── WAVE BACKGROUND ─────────── */
.wave-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Ambient light orbs */
.wave-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
}
.wave-orb-a {
  width: 520px; height: 420px;
  bottom: 60px; left: -60px;
  background: var(--glow-a);
  animation: orbDrift 18s ease-in-out infinite alternate;
}
.wave-orb-b {
  width: 400px; height: 360px;
  bottom: 40px; right: 10%;
  background: var(--glow-b);
  animation: orbDrift 14s ease-in-out infinite alternate-reverse;
}
.wave-orb-c {
  width: 300px; height: 280px;
  bottom: 80px; left: 40%;
  background: var(--glow-c);
  animation: orbDrift 22s ease-in-out infinite alternate;
}
@keyframes orbDrift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(30px, -20px) scale(1.08); }
  100% { transform: translate(-20px, 15px) scale(0.95); }
}

/* SVG wave layers */
.wave-layer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 200%;
  height: 300px;
  display: flex;
}
.wave-layer svg { flex-shrink: 0; width: 50%; height: 100%; }
.wave-1 { animation: waveX 14s linear infinite; }
.wave-2 { animation: waveX 11s linear infinite reverse; bottom: 24px; }
.wave-3 { animation: waveX 17s linear infinite; bottom: 12px; }

/* Shimmer highlight on top wave edge */
.wave-shimmer {
  position: absolute;
  bottom: 168px;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--glow-a) 25%,
    var(--glow-c) 50%,
    var(--glow-b) 75%,
    transparent 100%);
  opacity: 0.6;
  filter: blur(1px);
  animation: shimmerSlide 8s ease-in-out infinite alternate;
}
@keyframes shimmerSlide {
  0%   { opacity: 0.4; transform: scaleX(0.9) translateX(-2%); }
  100% { opacity: 0.8; transform: scaleX(1.05) translateX(2%); }
}

@keyframes waveX {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ─────────── NAV ─────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 56px;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  transition: background .3s;
}
.nav-inner {
  width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-logo {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-right: 16px;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  transition: background .15s;
}
.nav-logo:hover { background: var(--bg2); }

.nav-items { display: flex; align-items: center; gap: 2px; flex: 1; }

.nav-item { position: relative; }

.nav-item > button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--mid);
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.nav-item > button:hover,
.nav-item > button.active {
  background: var(--blue-bg);
  color: var(--blue);
}
.nav-item > button .chevron {
  width: 12px; height: 12px;
  opacity: .5;
  transition: transform .2s;
}
.nav-item:hover > button .chevron { transform: rotate(180deg); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 200px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: 0 8px 32px rgba(15,23,42,.10);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
  z-index: 200;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--mid);
  transition: background .12s;
}
.nav-dropdown a:hover { background: var(--bg2); color: var(--ink); }
.nav-dropdown .dd-icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.nav-dropdown .sep {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.nav-dropdown .dd-label {
  display: flex;
  flex-direction: column;
}
.nav-dropdown .dd-label span { color: var(--small); font-size: 0.75rem; font-weight: 400; }

.nav-contact {
  margin-left: auto;
  padding: 5px 14px;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.nav-contact:hover { background: var(--bg2); color: var(--ink); }

/* Dark mode toggle */
#theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--muted);
  margin-left: 8px;
  flex-shrink: 0;
  transition: background .15s, border-color .15s, color .15s;
}
#theme-toggle:hover { background: var(--blue-bg); border-color: var(--blue-mid); color: var(--blue); }
#theme-toggle svg { width: 16px; height: 16px; }
/* show sun in dark mode, moon in light mode */
#theme-toggle .icon-moon { display: block; }
#theme-toggle .icon-sun  { display: none; }
html.dark #theme-toggle .icon-moon { display: none; }
html.dark #theme-toggle .icon-sun  { display: block; }


/* ─────────── HERO ─────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -80px; right: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(26,111,196,.06) 0%, transparent 70%);
  pointer-events: none;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 100px;
  background: var(--bg2);
  border: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .03em;
  margin-bottom: 24px;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--blue);
}
.hero-title {
  font-family: 'Manrope', 'Noto Sans SC', sans-serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: normal;
  color: var(--blue);
}
.hero-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--mid);
  max-width: 520px;
  margin-bottom: 36px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--mid);
}
.badge-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-blue   { background: var(--blue); }
.dot-green  { background: var(--green); }
.dot-purple { background: #7c5cfc; }


/* ─────────── PRODUCT SECTION ─────────── */
.products {
  position: relative;
  z-index: 1;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Product head */
.product-head {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
}
.product-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.tag-blue  { background: var(--blue-bg); color: var(--blue); }
.tag-green { background: var(--green-bg); color: var(--green); }

.product-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.product-name {
  font-family: 'Manrope', 'Noto Sans SC', sans-serif;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 8px;
}
.product-tagline {
  font-size: 0.97rem;
  color: var(--muted);
  line-height: 1.6;
}
.product-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  padding-top: 4px;
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--blue);
  color: #fff;
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background .15s, transform .12s;
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-primary.green { background: var(--green); }
.btn-primary.green:hover { background: #155c38; }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mid);
  background: var(--bg);
  transition: background .15s, border-color .15s;
}
.btn-secondary:hover { background: var(--bg2); border-color: var(--blue-mid); }

/* App Store style Frameless Screenshot Carousel Section */
.screenshot-section {
  position: relative;
  margin: 48px 0;
  width: 100%;
}
.screenshot-gallery-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
.screenshot-gallery {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 10px 0; /* Align perfectly with page container bounds */
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Hide default scrollbar on Firefox */
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-behavior: smooth;
}
.screenshot-gallery.active {
  cursor: grabbing;
}
.screenshot-gallery::-webkit-scrollbar {
  display: none; /* Hide scrollbar on Chrome/Safari */
}
.screenshot-item {
  scroll-snap-align: start;
  flex-shrink: 0;
  /* Exactly 4 items on one screen: (100% width - 3 gaps of 24px) / 4 */
  width: calc((100% - 72px) / 4);
  max-width: 272px;
  height: 590px;
  border-radius: 20px; /* Softer, native bezel curve */
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
  background: var(--bg2);
  transition: box-shadow 0.3s ease;
}
html.dark .screenshot-item {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.screenshot-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none; /* Crucial to prevent native image dragging */
}

/* Nav buttons style - Floating OUTSIDE */
.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background 0.2s, transform 0.2s, box-shadow 0.2s;
}
/* Show buttons on section hover on desktop */
.screenshot-section:hover .gallery-nav-btn {
  opacity: 1;
  visibility: visible;
}
.gallery-nav-btn:hover {
  background: var(--bg2);
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}
.gallery-nav-btn svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}
.gallery-nav-btn.prev { left: -64px; }
.gallery-nav-btn.next { right: -64px; }

/* Single-column product content sections */
.two-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 0 64px;
}
.two-col > div {
  padding: 36px 0;
  border-bottom: 1px solid var(--border);
}
.two-col > div:last-child { border-bottom: none; }

.col-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

/* Feature list */
.feature-list { list-style: none; }
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.feature-item:last-child { border-bottom: none; }
.feature-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  margin-top: 1px;
}
.feature-text { flex: 1; }
.feature-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.feature-desc {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.6;
}

/* Guide list */
.guide-list { list-style: none; }
.guide-item {
  display: flex;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.guide-item:last-child { border-bottom: none; }
.guide-num {
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--small);
  min-width: 18px;
  margin-top: 2px;
  flex-shrink: 0;
}
.guide-content { flex: 1; }
.guide-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3px;
}
.guide-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.65;
}

/* Coming soon panel */
.coming-soon {
  padding: 80px 0;
  text-align: center;
}
.coming-soon .cs-icon { font-size: 3rem; margin-bottom: 16px; }
.coming-soon h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}
.coming-soon p { color: var(--muted); font-size: 0.95rem; }


/* ─────────── FOOTER ─────────── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
  background: var(--bg);
}
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--small);
  margin-bottom: 16px;
}
.footer-contact a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--mid);
  margin-bottom: 10px;
  transition: color .12s;
}
.footer-contact a:hover { color: var(--blue); }
.footer-contact .fc-icon { font-size: 0.95rem; opacity: .6; }

.social-icons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.social-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--mid);
  font-weight: 700;
  transition: background .15s, border-color .15s, color .15s;
}
.social-icon:hover { background: var(--blue-bg); border-color: var(--blue-mid); color: var(--blue); }
.social-icon svg { width: 18px; height: 18px; fill: currentColor; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copyright {
  font-size: 0.8rem;
  color: var(--small);
  line-height: 1.6;
}
.footer-icp {
  font-size: 0.78rem;
  color: var(--small);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-icp a { color: var(--small); transition: color .12s; }
.footer-icp a:hover { color: var(--muted); }


/* ─────────── SCROLL-TO TOP ─────────── */
#scroll-top {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 99;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(26,111,196,.3);
  opacity: 0; visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
  cursor: pointer;
  border: none;
}
#scroll-top.visible { opacity: 1; visibility: visible; }
#scroll-top:hover { transform: translateY(-2px); }
#scroll-top svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }


/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 1300px) {
  /* Bring buttons inside when viewport is narrow */
  .gallery-nav-btn.prev { left: 16px; }
  .gallery-nav-btn.next { right: 16px; }
  .gallery-nav-btn {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 1;
    visibility: visible;
  }
  html.dark .gallery-nav-btn {
    background: rgba(22, 27, 34, 0.85);
  }
}

@media (max-width: 900px) {
  /* Show 2.5 items on smaller desktop/tablet */
  .screenshot-item {
    width: calc((100% - 24px) / 2.5);
    height: 480px;
  }
}

@media (max-width: 720px) {
  .nav-dropdown { display: none !important; }
  .hero { padding: 56px 0 44px; }
  .product-head-row { flex-direction: column; gap: 16px; }
  .product-actions { padding-top: 0; }
  
  .screenshot-section {
    margin: 24px 0;
  }
  .screenshot-gallery {
    gap: 16px;
    padding: 10px 0;
  }
  /* Show 1.5 items on mobile so they see there is more */
  .screenshot-item {
    width: calc((100% - 16px) / 1.5);
    height: 380px;
    border-radius: 18px;
  }
  .gallery-nav-btn {
    display: none; /* Hide nav buttons on mobile touch screens */
  }
  
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .hero-title { letter-spacing: -0.03em; }
}

/* ─────────── LEGAL MODAL STYLES ─────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  padding: 20px;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-content {
  background: var(--bg);
  width: min(900px, 95vw);
  max-height: 85vh;
  border-radius: var(--r);
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  position: relative;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.3s;
}
.modal-overlay.active .modal-content {
  transform: translateY(0);
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
  z-index: 10;
  border-radius: 50%;
  transition: background 0.2s;
}
.modal-close:hover {
  background: var(--bg2);
  color: var(--ink);
}
.modal-body {
  padding: 40px;
  overflow-y: auto;
  line-height: 1.7;
  color: var(--mid);
}
.modal-body h1 {
  font-size: 1.8rem;
  color: var(--ink);
  margin-bottom: 8px;
  text-align: center;
}
.modal-body h2 {
  font-size: 1.25rem;
  color: var(--ink);
  margin: 32px 0 16px;
  padding-left: 12px;
  border-left: 4px solid var(--blue);
}
.modal-body h3 {
  font-size: 1rem;
  color: var(--ink);
  margin: 24px 0 12px;
}
.modal-body p {
  margin-bottom: 16px;
}
.modal-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}
.modal-body ul, .modal-body ol {
  margin-bottom: 24px;
  padding-left: 20px;
}
.modal-body li {
  margin-bottom: 8px;
}
.modal-body .modal-meta {
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.modal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  font-size: 0.88rem;
}
.modal-table th, .modal-table td {
  padding: 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.modal-table th {
  background: var(--bg2);
  color: var(--ink);
  font-weight: 700;
}

/* ── Global dark-mode transitions ── */
body, nav, footer, .nav-dropdown, .badge, .btn-secondary, .social-icon, .modal-content, .modal-table th {
  transition: background .3s, color .3s, border-color .3s;
}
