/*
 * ============================================================================
 * Apache OpenJPA Documentation Site - Custom Styling
 * ============================================================================
 * Modern redesign using a navy/gold OpenJPA-adjacent identity.
 * All selectors remapped to the new semantic class names in base.html/page.html.
 */

/* ============================================================================
 * Palette & design tokens
 * ========================================================================== */
:root {
  /* Brand primary - Midnight navy + warm gold (Apache-inspired deep indigo
     header with a golden accent; the navy header pairs with a white logo). */
  --oj-navy:        #0F1B3B;   /* midnight navy (header, active, tiles, buttons) */
  --oj-navy-deep:   #070F24;   /* deeper midnight (gradient end) */
  --oj-gold:        #E6B53C;   /* warm gold - primary accent/pop */
  --oj-gold-deep:   #D19821;   /* deeper gold (hover) */
  --oj-slate:       #1E2B4E;   /* blue-slate */
  --oj-bg:          #FBFCFF;   /* soft near-white */
  --oj-bg-soft:     #EEF1F8;   /* blue-grey panel */
  --oj-border:      #D9DFED;   /* cool border */
  --oj-text:        #1B2230;   /* near-black */
  --oj-muted:       #5E6880;   /* cool grey-blue */
  --oj-link:        #E6B53C;   /* light gold links */
  --oj-link-hover:  #D19821;   /* deeper gold on hover */
  --oj-code-bg:     #EEF1F8;   /* code block */
  --oj-accent:      #E6B53C;   /* gold - small energetic accents */
  --oj-lavender:    #FBF3DC;   /* soft cream - fills */
  --oj-header-h: 4rem;

  /* Bootstrap alignment */
  --bs-body-bg: var(--oj-bg);
  --bs-body-color: var(--oj-text);
  --bs-border-color: var(--oj-border);
  --bs-link-color: var(--oj-link);
  --bs-link-hover-color: var(--oj-link-hover);
}

/* ============================================================================
 * Base typography
 * ========================================================================== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--oj-text);
  background-color: var(--oj-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 650;
  line-height: 1.25;
  color: var(--oj-text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; margin-top: 2rem; }
h3 { font-size: 1.3rem; margin-top: 1.5rem; }
h4 { font-size: 1.1rem; }

a { color: var(--oj-link); font-weight: 600; text-decoration: none; }
a:hover { color: var(--oj-link-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--oj-gold); outline-offset: 2px; }

/* Skip link */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  z-index: 2000;
  background: var(--oj-navy);
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* ============================================================================
 * Header
 * ========================================================================== */
.site-header {
  background: linear-gradient(90deg, var(--oj-navy) 0%, var(--oj-navy-deep) 100%);
  color: #fff;
  border-bottom: 3px solid var(--oj-gold);
  min-height: var(--oj-header-h);
}
.site-header .navbar { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.site-header .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  border-radius: 0.375rem;
  padding: 0.4rem 0.75rem;
}
.site-header .nav-link:hover,
.site-header .nav-link:focus { color: #fff; background: rgba(255, 255, 255, 0.12); }
.site-header .navbar-toggler {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
  border-radius: 0.375rem;
  font-size: 1.25rem;
  padding: 0.35rem 0.6rem;
}
.nav-brand-wrap { flex-shrink: 0; }
.brand-logo { max-height: 2.6rem; width: auto; }

/* Text wordmark in the header (replaces the raster logo) */
.text-logo {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.text-logo:hover, .text-logo:focus { text-decoration: none; }
.text-logo-name {
  font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  color: #fff;
  padding-top: 0.15rem; /* optical vertical centering for lowercase ascenders */
}
.text-logo-strong { color: var(--oj-gold); font-weight: 800; }
@media (max-width: 575.98px) {
  .text-logo-name { font-size: 1.3rem; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ============================================================================
 * Container / layout
 * ========================================================================== */
.site-container { padding-top: 1.5rem; padding-bottom: 2rem; }

/* Doc 3-column layout */
.bd-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 260px;
  gap: 2rem;
  min-width: 0;
}
.bd-sidebar { grid-column: 1; min-width: 0; }
.bd-main { grid-column: 2; min-width: 0; }
.bd-toc { grid-column: 3; min-width: 0; }

/* ============================================================================
 * Sidebar nav
 * ========================================================================== */
.bd-sidebar {
  position: sticky;
  top: calc(var(--oj-header-h) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--oj-header-h) - 3rem);
  overflow-y: auto;
}
.sidebar-collapse-btn {
  color: var(--oj-navy);
  font-weight: 600;
  width: 100%;
  text-align: left;
  display: none;
}
.sidebar-group { margin-bottom: 1.25rem; }
.sidebar-heading {
  display: block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--oj-muted);
  margin-bottom: 0.4rem;
}
.sidebar-link {
  display: block;
  padding: 0.3rem 0.5rem;
  color: var(--oj-text);
  text-decoration: none;
  border-radius: 0.375rem;
  font-size: 0.95rem;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { color: var(--oj-navy); background: var(--oj-bg-soft); }
.sidebar-link.active {
  color: var(--oj-navy);
  border-left-color: var(--oj-gold-deep);
  font-weight: 600;
  background: var(--oj-bg-soft);
}

/* ============================================================================
 * Main content / article
 * ========================================================================== */
.bd-main { min-width: 0; }
.page-title { margin-bottom: 1rem; }
.page-content { min-width: 0; }
.page-content img { max-width: 100%; height: auto; }
.edit-github {
  display: inline-flex;
  align-items: center;
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--oj-border);
  border-radius: 0.5rem;
  color: var(--oj-muted);
  text-decoration: none;
  white-space: nowrap;
  margin-bottom: 1rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.edit-github:hover { color: var(--oj-navy); border-color: var(--oj-gold-deep); }

/* Heading anchors (headerlink from asfgenid) */
.headerlink {
  color: var(--oj-link);
  text-decoration: none;
  opacity: 0;
  margin-left: 0.4rem;
  font-size: 0.85em;
  transition: opacity 0.15s ease;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink,
h4:hover .headerlink, h5:hover .headerlink, h6:hover .headerlink { opacity: 1; }

/* Breadcrumb */
.bd-breadcrumb { font-size: 0.9rem; }
.breadcrumb { --bs-breadcrumb-margin-bottom: 0.5rem; }
.breadcrumb-item a { text-decoration: none; }
.breadcrumb-item a:hover { text-decoration: underline; }

/* ============================================================================
 * Right TOC
 * ========================================================================== */
.bd-toc {
  position: sticky;
  top: calc(var(--oj-header-h) + 1rem);
  align-self: start;
  max-height: calc(100vh - var(--oj-header-h) - 3rem);
  overflow-y: auto;
  font-size: 0.9rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--oj-border);
}
.bd-toc-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--oj-muted);
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}
.toc-content { min-width: 0; }
.toc-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.toc-content li { margin-bottom: 0.2rem; }
.toc-content a {
  color: var(--oj-muted);
  text-decoration: none;
  display: block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  border-left: 2px solid transparent;
}
.toc-content a:hover { color: var(--oj-navy); background: var(--oj-bg-soft); }
.toc-content a.active {
  color: var(--oj-navy);
  font-weight: 600;
  border-left-color: var(--oj-gold-deep);
}
.toc-content ul ul { padding-left: 0.9rem; }

/* ============================================================================
 * Cards (homepage release/news cards and general use)
 * ========================================================================== */
.card {
  border: 1px solid var(--oj-border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15, 27, 59, 0.04);
  background: var(--oj-bg);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: 0 4px 14px rgba(15, 27, 59, 0.1); }

/* ============================================================================
 * Homepage: feature cards + specification card
 * ========================================================================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.feature-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--oj-border);
  border-radius: 0.9rem;
  background: var(--oj-bg);
  color: var(--oj-text);
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(15, 27, 59, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 27, 59, 0.16);
  border-color: var(--oj-gold-deep);
  color: var(--oj-text);
  text-decoration: none;
}
.feature-icon {
  flex-shrink: 0;
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--oj-navy), var(--oj-navy-deep));
  color: var(--oj-lavender);
  font-size: 1.3rem;
}
.feature-body { display: flex; flex-direction: column; min-width: 0; }
.feature-title { font-weight: 650; font-size: 1rem; color: var(--oj-navy); letter-spacing: -0.01em; }
.feature-desc { font-size: 0.85rem; color: var(--oj-muted); line-height: 1.4; margin-top: 0.1rem; }
.feature-arrow { margin-left: auto; color: var(--oj-accent); opacity: 0.8; transition: transform 0.18s ease, opacity 0.18s ease; }
.feature-card:hover .feature-arrow { transform: translateX(3px); opacity: 1; }

/* Specification support card */
.spec-card {
  border: 1px solid var(--oj-border);
  border-radius: 0.9rem;
  background: var(--oj-bg);
  overflow: hidden;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 1px 2px rgba(15, 27, 59, 0.06);
}
.spec-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--oj-border);
  font-size: 0.95rem;
}
.spec-item:first-child { border-top: none; }
.spec-item a { font-weight: 600; color: var(--oj-navy); }
.spec-item .spec-detail { color: var(--oj-muted); }
.spec-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--oj-navy);
  background: var(--oj-lavender);
  border: 1px solid var(--oj-gold);
  border-radius: 2rem;
  padding: 0.15rem 0.6rem;
}

/* ============================================================================
 * Homepage: events and news feed
 * ========================================================================== */
.blog-post-listing { display: flex; flex-direction: column; gap: 0.9rem; }
.blog-post-listing .card {
  border-left: 4px solid var(--oj-gold);
  transition: box-shadow 0.15s ease, border-left-color 0.15s ease, transform 0.15s ease;
}
.blog-post-listing .card:hover {
  border-left-color: var(--oj-gold-deep);
  box-shadow: 0 6px 18px rgba(15, 27, 59, 0.12);
  transform: translateY(-2px);
}
.blog-post-listing .card-title { margin-bottom: 0.35rem; margin-top: 0.1rem; }
.blog-post-listing .card-title a {
  color: var(--oj-navy);
  font-weight: 650;
  text-decoration: none;
}
.blog-post-listing .card-title a:hover { color: var(--oj-link-hover); text-decoration: underline; }
.blog-post-listing .card-text { color: var(--oj-text); margin-bottom: 0.6rem; }
.blog-post-listing .blockquote-footer {
  font-size: 0.82rem;
  color: var(--oj-muted);
  margin-top: 0;
}
.blog-post-listing .blockquote-footer a { color: var(--oj-link); text-decoration: none; }
.blog-post-listing .blockquote-footer a:hover { text-decoration: underline; }
.news-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.news-head .card-title { margin: 0; }
.news-date {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--oj-navy);
  background: var(--oj-lavender);
  border: 1px solid var(--oj-gold);
  border-radius: 0.4rem;
  padding: 0.25rem 0.55rem;
  line-height: 1.2;
  margin-top: 0.15rem;
  white-space: nowrap;
}
.news-date time { text-transform: none; }
@media (max-width: 575.98px) {
  .news-head { flex-direction: column; gap: 0.35rem; }
}

@media (max-width: 575.98px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { padding: 0.95rem 1rem; }
}

/* ============================================================================
 * Documentation page: latest manual showcase + version tables
 * ========================================================================== */
.latest-doc-grid { margin: 1rem 0 1.5rem; }
.latest-doc-card {
  border: 1px solid var(--oj-border);
  border-radius: 0.9rem;
  background:
    linear-gradient(135deg, rgba(15, 27, 59, 0.05), rgba(124, 41, 125, 0.08)) no-repeat,
    var(--oj-bg);
  padding: 1.25rem 1.25rem 1.4rem;
  box-shadow: 0 2px 8px rgba(15, 27, 59, 0.06);
}
.latest-doc-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1rem; }
.latest-doc-head > i {
  font-size: 2.2rem;
  color: var(--oj-lavender);
  background: linear-gradient(135deg, var(--oj-gold), var(--oj-gold-deep));
  padding: 0.7rem;
  border-radius: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}
.latest-doc-head h5 { margin: 0; font-weight: 650; color: var(--oj-navy); }
.latest-doc-head p { margin: 0.15rem 0 0; color: var(--oj-muted); font-size: 0.88rem; }
.latest-doc-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}
.doc-tile {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--oj-border);
  border-radius: 0.6rem;
  background: var(--oj-bg);
  color: var(--oj-text);
  font-size: 0.86rem;
  font-weight: 550;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.doc-tile i { color: var(--oj-accent); font-size: 1rem; }
.doc-tile:hover {
  border-color: var(--oj-navy);
  color: var(--oj-navy);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 27, 59, 0.12);
  text-decoration: none;
}

/* Version download tables -> modern link tiles */
.page-content table.table {
  background: var(--oj-bg);
  border: 1px solid var(--oj-border);
  border-radius: 0.6rem;
  box-shadow: 0 1px 2px rgba(15, 27, 59, 0.04);
}
.page-content table.table th {
  background: var(--oj-bg-soft);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--oj-muted);
  border-bottom: 2px solid var(--oj-gold);
}
.page-content table.table td.border:first-child {
  font-weight: 650;
  color: var(--oj-text);
  white-space: nowrap;
}
.page-content table.table td.border a {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--oj-border);
  border-radius: 2rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--oj-navy);
  background: var(--oj-bg);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.page-content table.table td.border a:hover {
  background: var(--oj-navy);
  border-color: var(--oj-navy);
  color: #fff;
}

/* ============================================================================
 * Tables (large manual/download tables get scroll container)
 * ========================================================================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap table { min-width: 600px; }
table { border-collapse: collapse; width: 100%; }
table th {
  background: var(--oj-bg-soft);
  font-weight: 650;
  text-align: left;
  vertical-align: top;
}
th, td { padding: 0.6rem 0.85rem; border: 1px solid var(--oj-border); }
.page-content table { margin-bottom: 1.5rem; font-size: 0.95rem; }

/* ============================================================================
 * Code blocks
 * ========================================================================== */
pre {
  background: var(--oj-code-bg);
  border: 1px solid var(--oj-border);
  border-radius: 0.5rem;
  padding: 0;
  overflow-x: auto;
  position: relative;
  font-size: 0.875rem;
  line-height: 1.55;
}
pre code {
  display: block;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  white-space: pre;
  background: transparent;
  border: 0;
  margin: 0;
  padding: 1rem;
  color: inherit;
}
code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.875em;
  background: var(--oj-code-bg);
  border: 1px solid var(--oj-border);
  border-radius: 0.3rem;
  padding: 0.1rem 0.3rem;
}
pre code { background: none; border: 0; }
/* Ensure highlighted code is transparent so the <pre> gray background shows
   through (highlight.css ships `.hljs { background:#fff }` which would paint
   the code area white and blend into the page). */
pre code.hljs { background: transparent !important; }
.lang-chip {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--oj-muted);
  background: var(--oj-bg-soft);
  border-left: 1px solid var(--oj-border);
  border-bottom: 1px solid var(--oj-border);
  border-radius: 0 0.5rem 0 0.45rem;
  padding: 0.2rem 0.6rem;
}

/* Copy button */
.copy-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--oj-bg);
  border: 1px solid var(--oj-border);
  border-radius: 0.375rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  color: var(--oj-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--oj-navy); }
@media (pointer: coarse) {
  .copy-btn { opacity: 1; }
}

/* Site search (header) */
.search-wrap { position: relative; }
.search-icon {
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--oj-muted);
  font-size: 0.85rem;
  pointer-events: none;
}
.site-search {
  padding-left: 1.6rem;
  min-width: 220px;
  width: 240px;
  border-radius: 2rem;
}
.search-results {
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  right: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--oj-bg);
  border: 1px solid var(--oj-border);
  border-radius: 0.5rem;
  z-index: 1080;
}
.search-result {
  display: block;
  padding: 0.6rem 1rem;
  color: var(--oj-text);
  text-decoration: none;
  border-bottom: 1px solid var(--oj-border);
}
.search-result:last-child { border-bottom: 0; }
.search-result:hover { background: var(--oj-bg-soft); }
.search-result-title { display: block; font-weight: 600; font-size: 0.9rem; }
.search-result-url {
  display: block;
  font-size: 0.75rem;
  color: var(--oj-muted);
  word-break: break-all;
}
.search-empty { color: var(--oj-muted); }

/* ============================================================================
 * Prev / Next cards
 * ========================================================================== */
.bd-pagination {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--oj-border);
}
.bd-page-card {
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1.2rem;
  border: 1px solid var(--oj-border);
  border-radius: 0.6rem;
  text-decoration: none;
  color: var(--oj-text);
  background: var(--oj-bg);
  flex: 1 1 0;
  max-width: calc(50% - 0.5rem);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bd-page-card:hover {
  color: var(--oj-navy);
  border-color: var(--oj-gold-deep);
  box-shadow: 0 2px 8px rgba(15, 27, 59, 0.08);
}
.bd-page-card.next { margin-left: auto; }
.bd-page-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--oj-muted); }
.bd-page-title { font-weight: 600; margin-top: 0.25rem; }

/* ============================================================================
 * Buttons
 * ========================================================================== */
.btn-gold {
  background: var(--oj-gold);
  color: #fff;
  border: 1px solid var(--oj-gold-deep);
  font-weight: 600;
}
.btn-gold:hover { background: var(--oj-gold-deep); color: #fff; }
.btn-navy {
  background: var(--oj-navy);
  color: #fff;
  border: 1px solid var(--oj-navy);
  font-weight: 500;
}
.btn-navy:hover { background: var(--oj-navy-deep); color: #fff; }
.btn-outline-navy {
  border: 1px solid var(--oj-navy);
  color: var(--oj-navy);
  background: transparent;
  font-weight: 500;
}
.btn-outline-navy:hover { background: var(--oj-navy); color: #fff; }

/* ============================================================================
 * Footer
 * ========================================================================== */
.site-footer {
  background: var(--oj-bg-soft);
  border-top: 3px solid var(--oj-gold);
  color: var(--oj-text);
  padding: 2.5rem 0 1.5rem;
  margin-top: 3rem;
}
.site-footer h5 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--oj-text); }
.site-footer ul { margin-bottom: 0; }
.site-footer .footer-link { color: var(--oj-muted); text-decoration: none; }
.site-footer .footer-link:hover { color: var(--oj-navy); text-decoration: underline; }
.footer-hr { border-color: var(--oj-border); opacity: 1; }
.footer-legal { padding-top: 0.5rem; }

/* Scroll progress bar (enhanced by JS) */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--oj-accent);
  z-index: 3000;
}

/* ============================================================================
 * Responsive breakpoints
 * ========================================================================== */
@media (max-width: 1199.98px) {
  .bd-layout { grid-template-columns: 220px minmax(0, 1fr) 240px; gap: 1.5rem; }
}

@media (max-width: 991.98px) {
  .bd-layout { grid-template-columns: 1fr; }
  .bd-toc {
    display: none;
  }
  .bd-sidebar {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--oj-border);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }
  .sidebar-collapse-btn { display: block; }
  .sidebar-nav { padding-top: 0.75rem; }
  .sidebar-group { margin-bottom: 0.9rem; }
}

@media (max-width: 767.98px) {
  body { font-size: 0.98rem; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
  .bd-pagination { flex-direction: column; }
  .bd-page-card, .bd-page-card.next { max-width: 100%; margin-left: 0; }
  .brand-logo { max-height: 2.2rem; }
  .page-content table, th, td { font-size: 0.875rem; }
}

/* ============================================================================
 * Print
 * ========================================================================== */
@media print {
  .site-header, .bd-sidebar, .bd-toc, .bd-pagination, .copy-btn,
  .scroll-progress { display: none !important; }
  .site-footer { border-top: none; }
  .bd-layout { display: block; }
}
