/* MHP Data Engineer Masterclass 2026 */

/* ── Google Fonts: Source Sans Pro ──────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap');

:root {
  --mhp-blue: #0057b8;
  --mhp-dark: #1a1a2e;
  /* Main content column width — fluid on wide screens, capped for readability */
  --mhp-content-max: 1100px;
  --mhp-content-gutter: 22rem;
  --mhp-page-padding: 1.25rem;
  --mhp-touch-min: 44px;
}

body, .navbar, .sidebar, .quarto-sidebar, h1, h2, h3, h4, h5, h6 {
  font-family: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
}

.callout-time {
  border-left: 4px solid var(--mhp-blue);
  padding: 0.5rem 1rem;
  background: #f0f7ff;
  margin-bottom: 1rem;
}
.quarto-dark .callout-time {
  background: rgba(0, 87, 184, 0.15);
}

.callout-reflect {
  border-left: 4px solid #2563eb;
  padding: 0.75rem 1rem;
  background: #eff6ff;
  margin: 1rem 0;
}
.quarto-dark .callout-reflect {
  background: rgba(37, 99, 235, 0.15);
}

.callout-priya {
  border-left: 4px solid #107c10;
  padding: 0.75rem 1rem;
  background: #f0fff4;
  margin: 1rem 0;
}
.quarto-dark .callout-priya {
  background: rgba(16, 124, 16, 0.15);
}

.callout-story {
  border-left: 4px solid #7c3aed;
  padding: 0.75rem 1rem;
  background: #f5f3ff;
  margin: 1rem 0;
}
.quarto-dark .callout-story {
  background: rgba(124, 58, 237, 0.15);
}

.callout-best-practice {
  border-left: 4px solid #059669;
  padding: 0.75rem 1rem;
  background: #ecfdf5;
  margin: 1rem 0;
}
.quarto-dark .callout-best-practice {
  background: rgba(5, 150, 105, 0.15);
}

.callout-pitfall {
  border-left: 4px solid #d97706;
  padding: 0.75rem 1rem;
  background: #fffbeb;
  margin: 1rem 0;
}
.quarto-dark .callout-pitfall {
  background: rgba(217, 119, 6, 0.15);
}

.callout-selfcheck {
  border-left: 4px solid #6366f1;
  padding: 0.75rem 1rem;
  background: #eef2ff;
  margin: 1rem 0;
}
.quarto-dark .callout-selfcheck {
  background: rgba(99, 102, 241, 0.15);
}

.video-placeholder {
  border: 2px dashed #94a3b8;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  background: #f8fafc;
  margin: 1rem 0;
}
.quarto-dark .video-placeholder {
  background: rgba(148, 163, 184, 0.08);
  border-color: #64748b;
}

/* ── Navbar: single-row flex layout ────────────────────────── */
.navbar {
  height: 70px;
  padding: 0 1.5rem !important;
  margin-bottom: 1.5rem;
  background: linear-gradient(to right, #01065c, #110fdd) !important;
}

/* Single row: [title] [spacer] [nav-items] [logo] */
.navbar > .container-fluid {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  height: 100%;
  gap: 1rem;
}

/* Title: fixed, no shrink */
.navbar .navbar-brand {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Nav items: pushed right, no wrap */
.navbar .navbar-collapse {
  display: flex !important;
  flex-wrap: nowrap !important;
  flex: 1;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

/* MHP logo: fixed size on far right */
.navbar > .container-fluid::after {
  content: '';
  display: block;
  width: 110px;
  height: 45px;
  flex-shrink: 0;
  background: url('assets/images/mhp-logo.png') center/contain no-repeat;
}

/* Right-side nav elements */
.navbar .navbar-nav.ms-auto {
  gap: 0.25rem;
  position: relative;
  z-index: 2;
  flex-direction: row !important;
}

/* Keep search button visible and not overlapped */
#quarto-search {
  position: relative;
  z-index: 2;
}

.navbar .navbar-nav .nav-link .bi-github {
  margin-left: 0.5rem;
}

/* Trainer nav link — distinct style for trainer-only access */
.navbar .nav-link[href*="trainer"] {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75) !important;
  transition: color 0.2s;
}
.navbar .nav-link[href*="trainer"]:hover {
  color: #fff !important;
}

/* Trainer dropdown — right-align to prevent overflow */
.navbar-nav.ms-auto .dropdown-menu {
  right: 0;
  left: auto;
}

/* ── Responsive breakpoints ─────────────────────────────────── */

/* Scale content width on very wide monitors */
@media (min-width: 1200px) {
  :root {
    --mhp-content-max: 1240px;
    --mhp-content-gutter: 20rem;
  }
}
@media (min-width: 1600px) {
  :root {
    --mhp-content-max: 1480px;
    --mhp-content-gutter: 18rem;
  }
}
@media (min-width: 1920px) {
  :root {
    --mhp-content-max: 1680px;
    --mhp-content-gutter: 14rem;
  }
}

/* Wide screens (≥992px): widen main content area */
/* Quarto floating sidebar (default) caps content at ~750px — expand it */
@media (min-width: 992px) {
  body.floating .page-columns {
    grid-template-columns:
      [screen-start] 1.5em
      [screen-start-inset] 0px
      [page-start] minmax(15px, 35px)
      [page-start-inset] minmax(50px, 130px)
      [body-start-outset] minmax(15px, 35px)
      [body-start] 1.5em
      [body-content-start] minmax(500px, calc(100vw - var(--mhp-content-gutter)))
      [body-content-end] 1.5em
      [body-end] minmax(15px, 35px)
      [body-end-outset] minmax(50px, 120px)
      [page-end-inset] minmax(15px, 35px)
      [page-end] 0px
      [screen-end-inset] 1.5em
      [screen-end] !important;
  }

  /* Sidebar collapsed: reclaim left gutter for content */
  body.floating.sidebar-collapsed .page-columns {
    grid-template-columns:
      [screen-start] 1.5em
      [screen-start-inset] 0px
      [page-start page-start-inset body-start-outset body-start] 1.5em
      [body-content-start] minmax(500px, calc(100vw - var(--mhp-content-gutter)))
      [body-content-end] 1.5em
      [body-end] 35px
      [body-end-outset] minmax(75px, 145px)
      [page-end-inset] 25px
      [page-end] 0px
      [screen-end-inset] 1.5em
      [screen-end] !important;
  }

  /* Non-floating layouts (fallback) */
  body:not(.floating):not(.docked) .page-columns {
    grid-template-columns:
      [screen-start] 1.5em
      [screen-start-inset] 1fr
      [page-start page-start-inset] 25px
      [body-start-outset] 35px
      [body-start] 1.5em
      [body-content-start] minmax(500px, min(calc(var(--mhp-content-max) - 3em), calc(100vw - var(--mhp-content-gutter) - 3em)))
      [body-content-end] 1.5em
      [body-end] 35px
      [body-end-outset] minmax(75px, 145px)
      [page-end-inset] 25px
      [page-end] 1fr
      [screen-end-inset] 1.5em
      [screen-end] !important;
  }
}

/* Tablet (≤1200px): hide right TOC, give main content more space */
@media (max-width: 1200px) {
  #quarto-margin-sidebar,
  .toc-actions {
    display: none !important;
  }

  @media (min-width: 992px) {
    body.floating .page-columns {
      grid-template-columns:
        [screen-start] 1.5em
        [screen-start-inset] 0px
        [page-start] minmax(25px, 50px)
        [page-start-inset] minmax(50px, 150px)
        [body-start-outset] minmax(25px, 50px)
        [body-start] 1.5em
        [body-content-start] minmax(500px, calc(100vw - var(--mhp-content-gutter)))
        [body-content-end] 1.5em
        [body-end] minmax(25px, 50px)
        [body-end-outset] 35px
        [page-end-inset page-end] 0px
        [screen-end-inset] 1.5em
        [screen-end] !important;
    }

    body.floating.sidebar-collapsed .page-columns {
      grid-template-columns:
        [screen-start] 1.5em
        [screen-start-inset] 0px
        [page-start page-start-inset body-start-outset body-start] 1.5em
        [body-content-start] minmax(500px, calc(100vw - var(--mhp-content-gutter)))
        [body-content-end] 1.5em
        [body-end] 35px
        [body-end-outset] 35px
        [page-end-inset page-end] 0px
        [screen-end-inset] 1.5em
        [screen-end] !important;
    }

    body:not(.floating):not(.docked) .page-columns {
      grid-template-columns:
        [screen-start] 1.5em
        [screen-start-inset] 1fr
        [page-start page-start-inset] 25px
        [body-start-outset] 35px
        [body-start] 1.5em
        [body-content-start] minmax(500px, min(calc(var(--mhp-content-max) - 3em), calc(100vw - var(--mhp-content-gutter) - 3em)))
        [body-content-end] 1.5em
        [body-end] 35px
        [body-end-outset] 35px
        [page-end-inset page-end] 1fr
        [screen-end-inset] 1.5em
        [screen-end] !important;
    }
  }
}

/* Tablet (≤991px): hide logo, shrink title */
@media (max-width: 991px) {
  .navbar > .container-fluid::after {
    display: none;
  }
  .navbar .navbar-brand {
    font-size: 0.9rem;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Mobile (≤768px): allow wrapping to 2 rows */
@media (max-width: 768px) {
  .navbar {
    height: auto;
    min-height: 56px;
    padding: 0.5rem 1rem !important;
  }
  .navbar > .container-fluid {
    flex-wrap: wrap !important;
    gap: 0.5rem;
  }
  /* Force left nav items to horizontal row */
  .navbar .navbar-nav.me-auto {
    flex-direction: row !important;
    align-items: center;
    gap: 0.25rem;
  }
  .navbar .navbar-brand {
    font-size: 0.85rem;
    max-width: none;
    overflow: visible;
    white-space: normal;
  }
  .navbar .navbar-collapse {
    flex-basis: auto;
    flex-grow: 0;
    flex-wrap: wrap !important;
    align-items: center;
  }
  /* Compact footer on mobile */
  .mhp-disclaimer-footer {
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
    padding: 3px 1rem;
    font-size: 0.65rem;
  }
  .mhp-disclaimer-footer .mhp-df-version {
    font-size: 0.6rem;
  }
}

/* Small mobile (≤576px): stack vertically */
@media (max-width: 575px) {
  .navbar > .container-fluid {
    justify-content: center;
  }
  .navbar .navbar-brand {
    font-size: 0.8rem;
    text-align: center;
    flex: 1 1 100%;
  }
  .navbar .navbar-collapse {
    flex: 1 1 auto;
    justify-content: center;
  }
  .navbar .nav-link[href*="trainer"] {
    font-size: 0.75em;
  }
  .mhp-disclaimer-footer {
    font-size: 0.6rem;
    gap: 0.35rem;
  }
  .mhp-disclaimer-footer .mhp-df-rights {
    display: none;
  }
}

/* ── Responsive content (all screen sizes) ─────────────────── */

/* Videos — Quarto emits .quarto-video.ratio-16x9; reinforce on small screens */
.quarto-video,
.video-responsive {
  max-width: 100%;
  margin: 1rem 0;
}
.quarto-video iframe,
.video-responsive iframe {
  width: 100%;
  border: 0;
}

/* Wide tables — scroll horizontally instead of breaking layout */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
  max-width: 100%;
}

/* Mermaid — allow pan on narrow screens; tap opens zoom modal */
.mermaid,
svg.mermaid-js {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tablet — content inset when sidebar is a drawer (≤991px) */
@media (max-width: 991px) {
  :root {
    --mhp-content-gutter: 3rem;
  }

  main.content,
  #quarto-document-content {
    padding-inline: var(--mhp-page-padding);
  }
}

/* ── Mobile content hardening (≤768px) ─────────────────────── */
@media (max-width: 768px) {
  :root {
    --mhp-page-padding: 1rem;
    --mhp-content-gutter: 2rem;
  }

  #quarto-document-content {
    overflow-wrap: break-word;
  }

  /* Slightly smaller headings for narrow viewports */
  #quarto-document-content h1 { font-size: 1.65rem; }
  #quarto-document-content h2 { font-size: 1.35rem; }
  #quarto-document-content h3 { font-size: 1.15rem; }

  /* Tables — horizontal scroll within the content area */
  #quarto-document-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.875rem;
  }

  /* Code blocks — contain long lines without page-level scroll */
  #quarto-document-content pre {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 0.8rem;
  }

  /* Embeds & diagrams */
  #quarto-document-content .quarto-video,
  #quarto-document-content .mermaid,
  #quarto-document-content svg.mermaid-js {
    margin-inline: 0;
  }

  /* Gallery grids — single column on phones */
  .whats-new-grid {
    grid-template-columns: 1fr;
  }

  .slides-gallery {
    grid-template-columns: 1fr;
  }

  /* Navbar touch targets */
  .navbar .navbar-toggler,
  .navbar .nav-link,
  .navbar .btn,
  #quarto-search button {
    min-height: var(--mhp-touch-min);
    min-width: var(--mhp-touch-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* Collapsed navbar (≤991px): hamburger meets touch-target minimum */
@media (max-width: 991px) {
  .navbar .navbar-toggler {
    min-height: var(--mhp-touch-min);
    min-width: var(--mhp-touch-min);
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── Tool logos ─────────────────────────────────────────────── */

/* Inline logo (small, within text or tables) */
.tool-logo {
  height: 24px;
  width: auto;
  vertical-align: middle;
  margin-right: 4px;
}

/* Module header logo (larger, next to module title) */
.module-logo {
  height: 36px;
  width: auto;
  vertical-align: middle;
  margin-bottom: 8px;
}

/* Logo row — flex container for a group of logos */
.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0.5rem 0;
}

/* Tool badge: logo icon + text pill */
.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 4px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 0.85em;
  background: #f1f5f9;
  color: #334155;
}
.tool-badge img {
  height: 20px;
  width: auto;
}

/* Dark mode logo adjustments */
.quarto-dark .tool-logo,
.quarto-dark .module-logo {
  filter: brightness(0) invert(1);
}
.quarto-dark .tool-badge {
  background: #1e293b;
  color: #e2e8f0;
}
/* Colorful logos (Databricks red, Snowflake blue, dbt orange) don't need inversion */
.quarto-dark .logo-color {
  filter: none;
}

/* Tech stack row on index page — slightly larger badges */
.tech-stack-row {
  gap: 16px;
  margin: 1rem 0 1.5rem 0;
}
.tech-stack-row .tool-badge {
  font-size: 0.95em;
  padding: 4px 14px 4px 6px;
}
.tech-stack-row .tool-badge img {
  height: 24px;
}

/* ── Mermaid diagram dark mode ───────────────────────────────── */
.quarto-dark .mermaid {
  color: #e2e8f0;
}
/* Override Mermaid SVG fill/stroke in dark mode for better contrast */
.quarto-dark .mermaid svg .node rect,
.quarto-dark .mermaid svg .node circle,
.quarto-dark .mermaid svg .node polygon {
  fill: #334155;
  stroke: #64748b;
}
.quarto-dark .mermaid svg .nodeLabel {
  color: #e2e8f0;
  fill: #e2e8f0;
}
.quarto-dark .mermaid svg .edgeLabel {
  color: #cbd5e1;
  fill: #cbd5e1;
}
.quarto-dark .mermaid svg .edgePath path {
  stroke: #94a3b8;
}
.quarto-dark .mermaid svg .label {
  color: #e2e8f0;
}


/* ── Slide screenshot embeds ── */
.slide-embed {
  margin: 1.5rem 0 1rem 0;
}

.slide-embed.hero-slide {
  margin-top: 0.5rem;
}

.slide-embed figure {
  margin: 0;
  display: inline-block;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  max-width: 100%;
}

.slide-embed figure:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

.slide-embed img {
  display: block;
  max-width: 640px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.slide-embed figcaption {
  font-size: 0.85rem;
  color: var(--bs-secondary, #6c757d);
  padding: 6px 0 0 0;
  text-align: center;
}

.slide-embed a {
  text-decoration: none;
}

.slide-embed .slide-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #00B294;
  margin-bottom: 6px;
}

/* ── Slide thumbnail embed (click → opens full HTML) ────────── */
.slide-iframe {
  margin: 1.5rem 0 1rem 0;
}
.slide-iframe .slide-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #00B294;
  margin-bottom: 8px;
}
.slide-iframe .thumb-link {
  display: inline-block;
  position: relative;
  max-width: 560px;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.25s ease, transform 0.2s ease;
  text-decoration: none;
}
.slide-iframe .thumb-link:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
}
.slide-iframe .thumb-link img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.slide-iframe .thumb-link .open-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.slide-iframe .thumb-link:hover .open-hint {
  opacity: 1;
}
.slide-iframe figcaption {
  font-size: 0.85rem;
  color: var(--bs-secondary, #6c757d);
  padding: 6px 0 0 0;
}

/* ── Slide Lightbox Viewer ─────────────────────────────────────── */
#slide-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
#slide-lightbox.open {
  pointer-events: auto;
  opacity: 1;
}
.slb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}
.slb-dialog {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.slb-stage {
  position: relative;
  width: 1280px;
  height: 740px;
  transform-origin: center center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.slb-frame {
  width: 1280px;
  height: 720px;
  border: none;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  display: block;
}
.slb-counter {
  margin-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 1px;
}
.slb-close {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 2;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px 12px;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.slb-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.slb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.85);
  font-size: 2.8rem;
  font-weight: 300;
  width: 52px;
  height: 72px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}
.slb-nav:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}
.slb-prev { left: 12px; }
.slb-next { right: 12px; }
@media (max-width: 768px) {
  .slb-nav {
    width: 40px;
    height: 56px;
    font-size: 2rem;
  }
  .slb-prev { left: 4px; }
  .slb-next { right: 4px; }
  .slb-stage { transform: scale(0.6); }
}

/* ── Slides gallery grid ──────────────────────────────────────── */
.slides-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.slides-gallery .slide-embed {
  margin: 0;
}
.slides-gallery .slide-embed figure {
  width: 100%;
}
.slides-gallery .slide-embed img {
  max-width: 100%;
}

/* ── What's New grid (index page) ──────────────────────────────── */
.whats-new-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.whats-new-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s ease;
}
.whats-new-card:hover {
  border-color: var(--mhp-blue);
}
.whats-new-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--mhp-blue);
}
.whats-new-card p {
  font-size: 0.92rem;
  line-height: 1.55;
  margin-bottom: 0.5rem;
}
.quarto-dark .whats-new-card {
  background: #1e293b;
  border-color: #334155;
}
.quarto-dark .whats-new-card:hover {
  border-color: #60a5fa;
}
.quarto-dark .whats-new-card h3 {
  color: #93c5fd;
}

/* ── MHP Disclaimer Footer (single line: copyright + version) ──── */
.mhp-disclaimer-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 101;
  background: var(--mhp-dark, #1a1a2e);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.7rem;
  text-align: center;
  padding: 4px 1rem;
  line-height: 1.3;
  letter-spacing: 0.2px;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}
.mhp-disclaimer-footer .mhp-df-company {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}
.mhp-disclaimer-footer .mhp-df-rights {
  color: rgba(255, 255, 255, 0.55);
}
.mhp-disclaimer-footer .mhp-df-version {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  font-family: monospace;
  white-space: nowrap;
}
.mhp-disclaimer-footer .mhp-df-version a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
}
.mhp-disclaimer-footer .mhp-df-version a:hover {
  text-decoration: underline;
  color: rgba(255, 255, 255, 0.7);
}
.mhp-disclaimer-footer .mhp-df-sep {
  margin: 0 0.25rem;
  opacity: 0.4;
}

/* ── Login Gate ─────────────────────────────────────────────────────── */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(1, 6, 92, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: loginFadeIn 0.35s ease both;
}
.login-gate--exit {
  animation: loginFadeOut 0.35s ease both;
}
@keyframes loginFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes loginFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.login-gate-card {
  background: #fff;
  border-radius: 16px;
  padding: 2.5rem 2.5rem 2rem;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  text-align: center;
  animation: loginSlideUp 0.4s ease both;
}
@keyframes loginSlideUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-gate-logo {
  color: var(--mhp-blue, #0057b8);
  margin-bottom: 1rem;
}
.login-gate-logo svg {
  display: inline-block;
}

.login-gate-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: #0f172a;
}
.login-gate-desc {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0 0 1.25rem;
}

.login-gate-error {
  font-size: 0.82rem;
  color: #dc2626;
  min-height: 1.2em;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}

.login-gate-field {
  position: relative;
  margin-bottom: 1rem;
}
.login-gate-input {
  width: 100%;
  padding: 0.7rem 2.8rem 0.7rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.login-gate-input:focus {
  border-color: var(--mhp-blue, #0057b8);
  box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.15);
}
.login-gate-input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  animation: loginShake 0.4s ease;
}
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}

.login-gate-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background 0.15s;
}
.login-gate-toggle:hover {
  color: #475569;
  background: #f1f5f9;
}
.login-gate-toggle.active {
  color: var(--mhp-blue, #0057b8);
}

.login-gate-btn {
  width: 100%;
  padding: 0.7rem 1rem;
  background: var(--mhp-blue, #0057b8);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.3px;
}
.login-gate-btn:hover:not(:disabled) {
  background: #004a9e;
  transform: translateY(-1px);
}
.login-gate-btn:active:not(:disabled) {
  transform: translateY(0);
}
.login-gate-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-gate-hint {
  margin-top: 1rem;
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Dark mode */
.quarto-dark .login-gate-card {
  background: #1e293b;
  color: #e2e8f0;
}
.quarto-dark .login-gate-title { color: #f1f5f9; }
.quarto-dark .login-gate-desc  { color: #94a3b8; }
.quarto-dark .login-gate-input {
  background: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}
.quarto-dark .login-gate-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}
.quarto-dark .login-gate-toggle       { color: #64748b; }
.quarto-dark .login-gate-toggle:hover { color: #94a3b8; background: #334155; }
.quarto-dark .login-gate-hint         { color: #64748b; }

/* ── Ensure page body doesn't hide behind fixed footers ────────────── */
body { padding-bottom: 4rem !important; }
