/* ==============================================================
   THE HEAVENS' COVENANT — Custom Theme
   Dark fantasy aesthetic. Gold, purple, arcane blue.
   ============================================================== */

/* =========================
   1. VARIABLES
   ========================= */
:root {
  --thc-gold: #d4a857;
  --thc-gold-dim: #b8923f;
  --thc-gold-pale: #f5e6c4;
  --thc-gold-glow: rgba(212, 168, 87, 0.25);
  --thc-blue-arcane: #4fc3f7;
  --thc-purple-veil: #9c77db;
  --thc-red-erythium: #e74c6f;
  --thc-green-nature: #66bb6a;
  --thc-void-black: #0d0d12;
  --thc-deep-navy: #0f1118;
  --thc-text-glow: rgba(212, 168, 87, 0.15);
  --thc-veil-shimmer: linear-gradient(135deg, rgba(156, 119, 219, 0.06), rgba(79, 195, 247, 0.04));
  --thc-parchment-bg: rgba(212, 168, 87, 0.06);
  --thc-parchment-border: rgba(212, 168, 87, 0.5);
  --thc-font-display: 'Cinzel', Georgia, 'Times New Roman', serif;
  --thc-card-bg: rgba(255, 255, 255, 0.03);
  --thc-card-border: rgba(212, 168, 87, 0.12);
  --thc-card-hover-border: rgba(212, 168, 87, 0.5);
  --thc-card-hover-bg: rgba(212, 168, 87, 0.06);
  --thc-card-hover-shadow: 0 8px 32px rgba(212, 168, 87, 0.12);
}

/* Light mode overrides */
[data-md-color-scheme="default"] {
  --thc-card-bg: rgba(0, 0, 0, 0.02);
  --thc-card-border: rgba(160, 130, 60, 0.15);
  --thc-card-hover-border: rgba(160, 130, 60, 0.4);
  --thc-card-hover-bg: rgba(212, 168, 87, 0.06);
  --thc-card-hover-shadow: 0 8px 32px rgba(160, 130, 60, 0.1);
}

/* =========================
   2. BASE / GLOBAL
   ========================= */
html {
  scroll-behavior: smooth;
}

/* Smooth transitions on everything interactive */
a,
button,
.md-nav__link,
.md-tabs__link,
.md-search__input,
.md-toggle,
.md-button,
summary {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    box-shadow 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

/* =========================
   3. TYPOGRAPHY
   ========================= */

/* Cinzel display font for all headings */
.md-content h1,
.md-content h2,
.md-content h3 {
  font-family: var(--thc-font-display);
}

/* H1 — page title */
.md-content h1 {
  font-weight: 700;
  letter-spacing: 0.03em;
  border-bottom: 2px solid var(--thc-gold);
  padding-bottom: 0.35em;
  margin-bottom: 0.6em;
  animation: headingSlideIn 0.5s ease-out;
}

[data-md-color-scheme="slate"] .md-content h1 {
  text-shadow: 0 0 30px rgba(212, 168, 87, 0.12), 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* H2 — section headers */
.md-content h2 {
  font-weight: 600;
  letter-spacing: 0.02em;
  border-left: 3px solid var(--thc-gold-dim);
  padding-left: 0.6em;
  margin-top: 2em;
  animation: headingSlideIn 0.45s ease-out 0.05s both;
}

/* H3 — subsection headers */
.md-content h3 {
  font-weight: 500;
  animation: headingSlideIn 0.4s ease-out 0.1s both;
}

/* =========================
   4. HEADER & NAVIGATION
   ========================= */

/* Header bar — subtle bottom glow */
[data-md-color-scheme="slate"] .md-header {
  background: linear-gradient(180deg, rgba(15, 17, 24, 0.98), rgba(15, 17, 24, 0.95));
  border-bottom: 1px solid rgba(212, 168, 87, 0.08);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4);
}

/* Site title in header */
.md-header__title {
  font-family: var(--thc-font-display);
  letter-spacing: 0.05em;
}

/* Navigation tabs — gold underline on active */
.md-tabs {
  border-bottom: 1px solid rgba(212, 168, 87, 0.06);
}

.md-tabs__link {
  font-family: var(--thc-font-display);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.md-tabs__link--active,
.md-tabs__item--active .md-tabs__link {
  border-bottom: 2px solid var(--thc-gold);
  color: var(--thc-gold) !important;
}

.md-tabs__link:hover {
  color: var(--thc-gold) !important;
  opacity: 1;
}

/* Sidebar nav */
.md-nav__link {
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.md-nav__link:hover {
  padding-left: 4px;
}

.md-nav__item--active > .md-nav__link {
  font-weight: 600;
  color: var(--thc-gold) !important;
}

/* =========================
   5. HOMEPAGE HERO
   ========================= */

/* The homepage wrapper (injected by main.html) */
.thc-homepage .md-content__inner {
  max-width: 960px;
  margin: 0 auto;
}


/* Hero intro paragraph — larger, more dramatic */
.thc-homepage .md-content__inner > p:first-of-type {
  font-size: 1.08em;
  line-height: 1.75;
  color: rgba(220, 220, 220, 0.9);
  margin-bottom: 1.5em;
}

[data-md-color-scheme="default"] .thc-homepage .md-content__inner > p:first-of-type {
  color: rgba(40, 40, 40, 0.85);
}

/* Homepage H1 — dramatic Cinzel title */
.thc-homepage .md-content h1 {
  font-size: 2.4em;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0.15em;
  margin-bottom: 0.2em;
  position: relative;
}

/* Decorative underline for homepage title */
.thc-homepage .md-content h1::after {
  content: '';
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--thc-gold), transparent);
  margin: 0.4em auto 0;
}

[data-md-color-scheme="slate"] .thc-homepage .md-content h1 {
  text-shadow: 0 0 40px rgba(212, 168, 87, 0.2), 0 0 80px rgba(156, 119, 219, 0.08);
}

/* Center the reading time on homepage */
.thc-homepage #thc-reading-time {
  justify-content: center;
  margin-bottom: 2em;
}

/* =========================
   6. HOMEPAGE CARD GRID
   ========================= */
.thc-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2em;
  margin: 2em 0;
}

/* Markdown parser wraps <a> cards in <p> — make them transparent to grid */
.thc-section-grid > p {
  display: contents;
}

@media (max-width: 900px) {
  .thc-section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .thc-section-grid {
    grid-template-columns: 1fr;
  }
}

.thc-section-card {
  display: flex;
  flex-direction: column;
  padding: 1.4em 1.3em;
  background: var(--thc-card-bg);
  border: 1px solid var(--thc-card-border);
  border-radius: 10px;
  text-decoration: none !important;
  color: inherit !important;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease, background 0.25s ease;
  position: relative;
  overflow: hidden;
}

.thc-section-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--thc-gold-dim), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.thc-section-card:hover {
  transform: translateY(-4px);
  border-color: var(--thc-card-hover-border);
  box-shadow: var(--thc-card-hover-shadow);
  background: var(--thc-card-hover-bg);
}

.thc-section-card:hover::before {
  opacity: 1;
}

.thc-card-icon {
  font-size: 1.8em;
  margin-bottom: 0.3em;
  display: block;
}

.thc-card-title {
  font-family: var(--thc-font-display);
  font-size: 1.15em;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--thc-gold);
  margin-bottom: 0.5em;
  display: block;
}

.thc-card-desc {
  font-size: 0.88em;
  line-height: 1.55;
  opacity: 0.75;
  flex: 1;
  display: block;
}

.thc-card-action {
  font-family: var(--thc-font-display);
  font-size: 0.75em;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--thc-gold-dim);
  margin-top: 1em;
  display: block;
  transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.thc-section-card:hover .thc-card-action {
  color: var(--thc-gold);
  letter-spacing: 0.08em;
}

/* Minor links section at bottom of homepage */
.thc-minor-section {
  margin-top: 1em;
}

.thc-minor-section h2 {
  font-size: 1em;
  font-family: var(--thc-font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-left: none;
  padding-left: 0;
  opacity: 0.6;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.thc-minor-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.5em;
}

.thc-minor-section li {
  font-size: 0.88em;
}

/* =========================
   7. CONTENT AREA
   ========================= */

/* Page fade-in */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.md-content__inner {
  animation: fadeInUp 0.4s ease-out;
}

/* Links — gold with subtle glow on hover */
.md-content a:not(.md-button):not(.md-nav__link):not(.thc-section-card):not(.headerlink) {
  color: var(--thc-gold);
  text-decoration: none;
  transition: color 0.2s ease, text-shadow 0.2s ease;
  border-bottom: 1px solid rgba(212, 168, 87, 0.15);
}

.md-content a:not(.md-button):not(.md-nav__link):not(.thc-section-card):not(.headerlink):hover {
  color: #f0d080;
  text-shadow: 0 0 8px var(--thc-text-glow);
  border-bottom-color: rgba(212, 168, 87, 0.4);
}

/* Blockquotes — parchment feel */
.md-content blockquote {
  border-left: 3px solid var(--thc-parchment-border);
  background: var(--thc-parchment-bg);
  padding: 1em 1.4em;
  margin: 1.2em 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  position: relative;
  overflow: hidden;
}

[data-md-color-scheme="slate"] .md-content blockquote {
  background: rgba(212, 168, 87, 0.04);
  border-left-color: var(--thc-gold-dim);
}

[data-md-color-scheme="default"] .md-content blockquote {
  background: rgba(212, 168, 87, 0.08);
  border-left-color: var(--thc-gold);
}

.md-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.15em;
  left: 0.15em;
  font-size: 3.5em;
  color: var(--thc-gold);
  opacity: 0.08;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1;
  pointer-events: none;
}

/* Images — constrained, centered, framed */
.md-content img:not([src*="twemoji"]) {
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  max-width: min(100%, 600px);
  display: block;
  margin: 1em auto;
}

.md-content img:not([src*="twemoji"]):hover {
  transform: scale(1.01);
  box-shadow: 0 6px 24px rgba(212, 168, 87, 0.15), 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-md-color-scheme="slate"] .md-content img:not([src*="twemoji"]) {
  border: 1px solid rgba(212, 168, 87, 0.1);
}

/* Tables — polished */
.md-content table {
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

[data-md-color-scheme="slate"] .md-content table thead {
  background: rgba(212, 168, 87, 0.1);
}

.md-content table th {
  font-family: var(--thc-font-display);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.78em;
  letter-spacing: 0.05em;
}

.md-content table tbody tr {
  transition: background-color 0.15s ease;
}

[data-md-color-scheme="slate"] .md-content table tbody tr:hover {
  background-color: rgba(212, 168, 87, 0.04);
}

[data-md-color-scheme="default"] .md-content table tbody tr:hover {
  background-color: rgba(212, 168, 87, 0.06);
}

/* Lists — subtle hover interaction */
.md-content li {
  transition: transform 0.15s ease;
}

.md-content li:hover {
  transform: translateX(2px);
}

/* Horizontal rules — animated decorative gold gradient */
@keyframes dividerPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

.md-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--thc-purple-veil) 20%, var(--thc-gold) 50%, var(--thc-blue-arcane) 80%, transparent 100%);
  margin: 2.5em 0;
  animation: dividerPulse 4s ease-in-out infinite;
  border-radius: 1px;
}

[data-md-color-scheme="slate"] .md-content hr {
  box-shadow: 0 0 8px rgba(212, 168, 87, 0.15);
}

/* Code blocks */
.md-typeset code {
  border-radius: 4px;
}

/* =========================
   8. ADMONITIONS
   ========================= */

/* Note — arcane blue */
.md-typeset .admonition.note,
.md-typeset details.note {
  border-color: var(--thc-blue-arcane);
}
.md-typeset .note > .admonition-title,
.md-typeset .note > summary {
  background-color: rgba(79, 195, 247, 0.1);
}
.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before {
  background-color: var(--thc-blue-arcane);
}

/* Quote — gold parchment */
.md-typeset .admonition.quote,
.md-typeset details.quote,
.md-typeset .admonition.cite,
.md-typeset details.cite {
  border-color: var(--thc-gold);
}
.md-typeset .quote > .admonition-title,
.md-typeset .quote > summary,
.md-typeset .cite > .admonition-title,
.md-typeset .cite > summary {
  background-color: rgba(212, 168, 87, 0.1);
}
.md-typeset .quote > .admonition-title::before,
.md-typeset .quote > summary::before,
.md-typeset .cite > .admonition-title::before,
.md-typeset .cite > summary::before {
  background-color: var(--thc-gold);
}
[data-md-color-scheme="slate"] .md-typeset .admonition.quote,
[data-md-color-scheme="slate"] .md-typeset details.quote,
[data-md-color-scheme="slate"] .md-typeset .admonition.cite,
[data-md-color-scheme="slate"] .md-typeset details.cite {
  background-color: rgba(212, 168, 87, 0.03);
}

/* Warning — erythium red */
.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-color: var(--thc-red-erythium);
}
.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  background-color: rgba(231, 76, 111, 0.1);
}
.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
  background-color: var(--thc-red-erythium);
}

/* Danger — void-black with red accents */
.md-typeset .admonition.danger,
.md-typeset details.danger {
  border-color: var(--thc-red-erythium);
}
[data-md-color-scheme="slate"] .md-typeset .admonition.danger,
[data-md-color-scheme="slate"] .md-typeset details.danger {
  background-color: rgba(13, 13, 18, 0.6);
  box-shadow: inset 0 0 20px rgba(231, 76, 111, 0.05);
}
.md-typeset .danger > .admonition-title,
.md-typeset .danger > summary {
  background-color: rgba(231, 76, 111, 0.12);
  color: var(--thc-red-erythium);
}
.md-typeset .danger > .admonition-title::before,
.md-typeset .danger > summary::before {
  background-color: var(--thc-red-erythium);
}

/* Tip — arcane blue */
.md-typeset .admonition.tip,
.md-typeset details.tip,
.md-typeset .admonition.hint,
.md-typeset details.hint {
  border-color: var(--thc-blue-arcane);
}
.md-typeset .tip > .admonition-title,
.md-typeset .tip > summary,
.md-typeset .hint > .admonition-title,
.md-typeset .hint > summary {
  background-color: rgba(79, 195, 247, 0.1);
}
.md-typeset .tip > .admonition-title::before,
.md-typeset .tip > summary::before,
.md-typeset .hint > .admonition-title::before,
.md-typeset .hint > summary::before {
  background-color: var(--thc-blue-arcane);
}

/* Info — purple veil */
.md-typeset .admonition.info,
.md-typeset details.info {
  border-color: var(--thc-purple-veil);
}
.md-typeset .info > .admonition-title,
.md-typeset .info > summary {
  background-color: rgba(156, 119, 219, 0.1);
}
.md-typeset .info > .admonition-title::before,
.md-typeset .info > summary::before {
  background-color: var(--thc-purple-veil);
}

/* Success — nature green */
.md-typeset .admonition.success,
.md-typeset details.success {
  border-color: var(--thc-green-nature);
}
.md-typeset .success > .admonition-title,
.md-typeset .success > summary {
  background-color: rgba(102, 187, 106, 0.1);
}
.md-typeset .success > .admonition-title::before,
.md-typeset .success > summary::before {
  background-color: var(--thc-green-nature);
}

/* Shared: smooth open/close for collapsible */
.md-typeset details {
  transition: box-shadow 0.2s ease;
}
.md-typeset details[open] {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.md-typeset details > summary {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

/* =========================
   9. WIDGETS
   ========================= */

/* Progress bar — tri-color gradient */
#thc-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--thc-purple-veil), var(--thc-gold), var(--thc-blue-arcane));
  z-index: 9999;
  transition: width 0.1s linear;
  width: 0%;
}

/* Reading time */
#thc-reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.78em;
  color: rgba(160, 160, 160, 0.6);
  margin-bottom: 1.5em;
  font-style: italic;
}

/* Word counter (bottom-right) */
#thc-word-counter {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(212, 168, 87, 0.2);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.62em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: rgba(212, 168, 87, 0.7);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: default;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  opacity: 0.5;
  display: flex;
  align-items: center;
  gap: 6px;
}

#thc-word-counter:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(212, 168, 87, 0.5);
  box-shadow: 0 4px 20px rgba(212, 168, 87, 0.08);
}

#thc-word-counter .thc-wc-icon { font-size: 1.1em; }
#thc-word-counter .thc-wc-divider {
  width: 1px;
  height: 12px;
  background: rgba(212, 168, 87, 0.2);
}

[data-md-color-scheme="default"] #thc-word-counter {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(100, 80, 40, 0.15);
  color: rgba(100, 80, 40, 0.7);
}
[data-md-color-scheme="default"] #thc-word-counter .thc-wc-divider {
  background: rgba(100, 80, 40, 0.15);
}

/* Lore Guardian Status Badge */
#thc-lore-status {
  position: fixed;
  bottom: 46px;
  right: 16px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(102, 187, 106, 0.2);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 0.65em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: rgba(102, 187, 106, 0.7);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0.5;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
#thc-lore-status:hover {
  opacity: 1;
  transform: translateY(-2px);
}
#thc-lore-status.status-ok { border-color: rgba(102, 187, 106, 0.2); color: rgba(102, 187, 106, 0.7); }
#thc-lore-status.status-warn { border-color: rgba(212, 168, 87, 0.2); color: rgba(212, 168, 87, 0.7); }
#thc-lore-status.status-error { border-color: rgba(231, 76, 111, 0.2); color: rgba(231, 76, 111, 0.7); }

[data-md-color-scheme="default"] #thc-lore-status {
  background: rgba(255, 255, 255, 0.92);
}

/* Random Lore Button */
#thc-random-lore {
  position: fixed;
  bottom: 78px;
  right: 16px;
  background: rgba(20, 20, 28, 0.92);
  border: 1px solid rgba(79, 195, 247, 0.2);
  border-radius: 8px;
  padding: 5px 14px;
  font-size: 0.65em;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: rgba(79, 195, 247, 0.7);
  z-index: 1000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
  opacity: 0.5;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

#thc-random-lore:hover {
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(79, 195, 247, 0.5);
  box-shadow: 0 4px 20px rgba(79, 195, 247, 0.08);
}

[data-md-color-scheme="default"] #thc-random-lore {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(40, 80, 120, 0.15);
  color: rgba(40, 80, 120, 0.7);
}

/* Back to top — no hover transform (causes layout jump) */

/* =========================
   10. AMBIENT EFFECTS
   ========================= */

/* Particle canvas */
#thc-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.3;
}

/* Subtle vignette on dark mode */
[data-md-color-scheme="slate"] .md-main::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle background shimmer pattern */
[data-md-color-scheme="slate"] .md-main {
  background: linear-gradient(180deg,
    rgba(15, 17, 24, 1) 0%,
    rgba(18, 15, 28, 1) 30%,
    rgba(12, 14, 22, 1) 70%,
    rgba(15, 17, 24, 1) 100%
  );
}

/* =========================
   11. SCROLLBAR
   ========================= */
[data-md-color-scheme="slate"] ::-webkit-scrollbar {
  width: 6px;
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.15);
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb {
  background: rgba(212, 168, 87, 0.15);
  border-radius: 3px;
}
[data-md-color-scheme="slate"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(212, 168, 87, 0.35);
}

/* =========================
   12. FOOTER
   ========================= */
.thc-footer {
  border-top: 1px solid rgba(212, 168, 87, 0.08);
  padding: 1.2em 1.6em;
  text-align: center;
  font-size: 0.78em;
  opacity: 0.6;
}

.thc-footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  flex-wrap: wrap;
}

.thc-footer-brand {
  font-family: var(--thc-font-display);
  letter-spacing: 0.04em;
  color: var(--thc-gold-dim);
}

.thc-footer-sep {
  opacity: 0.3;
}

.thc-footer-tagline {
  font-style: italic;
  opacity: 0.7;
}

.thc-footer-tech a {
  color: var(--thc-gold-dim) !important;
  border-bottom: none !important;
}

/* =========================
   13. GLOSSARY TOOLTIP
   ========================= */
.thc-term {
  border-bottom: 1px dotted var(--thc-gold-dim);
  cursor: help;
  position: relative;
}

.thc-term:hover::after {
  content: attr(data-definition);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20, 20, 28, 0.96);
  color: #e0e0e0;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.82em;
  max-width: 300px;
  white-space: normal;
  z-index: 10000;
  border: 1px solid rgba(212, 168, 87, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  animation: fadeInUp 0.2s ease-out;
}

/* =========================
   14. BREADCRUMBS
   ========================= */
.md-path {
  font-family: var(--thc-font-display);
  font-size: 0.7em;
  letter-spacing: 0.03em;
  opacity: 0.5;
}

/* =========================
   15. SEARCH OVERLAY
   ========================= */
[data-md-color-scheme="slate"] .md-search__form {
  background: rgba(30, 30, 40, 0.95);
}

[data-md-color-scheme="slate"] .md-search-result__link:hover {
  background: rgba(212, 168, 87, 0.06);
}

/* Section 16 removed: scroll-reveal caused content to stay invisible
   on MkDocs instant navigation. Not worth the risk for a subtle effect. */

/* =========================
   17. ENHANCED IMAGE FRAMES
   ========================= */
[data-md-color-scheme="slate"] .md-content img:not([src*="twemoji"]) {
  border: 1px solid rgba(212, 168, 87, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(212, 168, 87, 0.05);
}

[data-md-color-scheme="slate"] .md-content img:not([src*="twemoji"]):hover {
  border-color: rgba(212, 168, 87, 0.25);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 168, 87, 0.1);
}

/* =========================
   18. PAGE TRANSITION
   ========================= */
.thc-page-entering .md-content__inner {
  animation: fadeInUp 0.35s ease-out;
}
