/* Shared site footer + Home affordance. Scoped so it cannot clash with page CSS. */
footer.ugt-footer {
  display: block !important;
  position: static !important;
  margin: 0 !important;
  padding: 30px 18px calc(30px + env(safe-area-inset-bottom)) !important;
  background: #07111f !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  text-align: left !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #a8c4e0 !important;
}
footer.ugt-footer * { box-sizing: border-box; }
.ugt-footer-inner { max-width: 780px; margin: 0 auto; display: grid; gap: 14px; }
.ugt-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ugt-footer-logo {
  font-family: Georgia, serif; font-size: 1.15rem; font-weight: 700;
  color: #eef4fc !important; text-decoration: none !important; letter-spacing: 0;
}
.ugt-footer-logo span { color: #22c55e; }
.ugt-footer-home {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 8px 17px; border-radius: 999px;
  background: #22c55e; color: #062b16 !important;
  font-size: 0.86rem; font-weight: 800; text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.25);
  transition: background 0.15s, transform 0.15s;
}
.ugt-footer-home:hover, .ugt-footer-home:focus-visible { background: #4ade80; transform: translateY(-1px); }
.ugt-footer-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.ugt-footer-nav a {
  display: inline-flex; align-items: center; min-height: 40px;
  margin: 0 !important; color: #a8c4e0 !important;
  font-size: 0.84rem; text-decoration: none !important;
}
.ugt-footer-nav a:hover, .ugt-footer-nav a:focus-visible { color: #22c55e !important; }
.ugt-footer-copy {
  margin: 0 !important; padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.74rem; line-height: 1.65; color: #8ab4d4 !important;
}
.ugt-footer-copy a { color: #22c55e !important; text-decoration: none !important; }

/* Home link in breadcrumbs: visible pill instead of faint grey text. */
.bc a:first-child,
nav.breadcrumb a:first-child,
a.ugt-crumb-home {
  display: inline-flex !important; align-items: center; gap: 6px;
  min-height: 34px; padding: 4px 13px; margin: 0 4px 0 0;
  border: 1px solid #22c55e; border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e !important; font-weight: 700 !important;
  text-decoration: none !important; line-height: 1.2;
}
.bc a:first-child:hover,
nav.breadcrumb a:first-child:hover,
a.ugt-crumb-home:hover {
  background: #22c55e; color: #062b16 !important;
}

/* Home entry inside the mobile drawer. */
.drawer-link[href="/"] {
  background: rgba(34, 197, 94, 0.12) !important;
  border: 1px solid rgba(34, 197, 94, 0.38) !important;
  border-radius: 8px;
  color: #22c55e !important;
  font-weight: 700 !important;
}

@media (max-width: 420px) {
  footer.ugt-footer { padding: 26px 16px calc(26px + env(safe-area-inset-bottom)) !important; }
  .ugt-footer-top { align-items: flex-start; }
  .ugt-footer-nav { gap: 0 16px; }
}

/* ── One canonical top bar for every page ── */
header.ugt-header {
  display: block !important;
  position: sticky !important; top: 0 !important; z-index: 120 !important;
  width: 100% !important; max-width: none !important; height: auto !important;
  margin: 0 !important; border: 0 !important; border-bottom: 1px solid rgba(255,255,255,.12) !important;
  padding: env(safe-area-inset-top) 0 0 !important;
  background: rgba(7,17,31,.97) !important;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  text-align: left !important; font-family: inherit !important;
  box-shadow: 0 6px 20px rgba(0,0,0,.28);
}
.ugt-header-inner {
  display: flex !important; align-items: center !important; flex-wrap: nowrap !important;
  gap: 12px !important; max-width: 1100px !important; margin: 0 auto !important;
  padding: 0 18px !important; min-height: 60px;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif !important;
}
.ugt-header-logo {
  flex-shrink: 0; white-space: nowrap;
  font-family: Georgia, serif !important; font-size: 1.35rem !important; font-weight: 700 !important;
  line-height: 1 !important; color: #eef4fc !important; text-decoration: none !important;
}
.ugt-header-logo span { color: #22c55e !important; }
.ugt-header-nav {
  display: flex !important; align-items: center !important; flex-wrap: nowrap !important;
  gap: 2px !important; margin: 0 0 0 auto !important; padding: 0 !important;
  position: static !important; top: auto !important; z-index: auto !important;
  height: auto !important; max-width: none !important; min-height: 0 !important;
  background: none !important; border: 0 !important; font-size: 1rem !important;
}
.ugt-header-nav a {
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
  min-height: 40px !important; padding: 6px 12px !important; margin: 0 !important;
  border: 0 !important; border-radius: 999px !important; background: none !important;
  color: #c9dcf0 !important; font-family: inherit !important; font-size: .9rem !important;
  font-weight: 600 !important; line-height: 1.2 !important; text-decoration: none !important;
  white-space: nowrap;
}
.ugt-header-nav a:hover { background: rgba(255,255,255,.08) !important; color: #fff !important; }
.ugt-header-nav a.ugt-header-home {
  gap: 6px; background: #22c55e !important; color: #062b16 !important;
  font-weight: 800 !important; box-shadow: 0 3px 12px rgba(34,197,94,.28) !important;
}
.ugt-header-nav a.ugt-header-home:hover { background: #2ee06a !important; color: #062b16 !important; }
.ugt-header-badge {
  flex-shrink: 0; white-space: nowrap;
  font-size: .72rem !important; font-weight: 700 !important; line-height: 1.2 !important;
  color: #f0b942 !important; border: 1.5px solid #f0b942 !important; border-radius: 4px !important;
  padding: 3px 8px !important; letter-spacing: .06em !important; text-transform: uppercase !important;
}
.ugt-header-burger {
  display: inline-flex !important; flex-direction: column !important; justify-content: center !important;
  gap: 4px; width: 40px !important; height: 40px !important; flex-shrink: 0;
  margin: 0 !important; padding: 9px 8px !important;
  background: none !important; border: 1.5px solid rgba(255,255,255,.22) !important;
  border-radius: 8px !important; cursor: pointer;
}
.ugt-header-burger span { display: block; height: 1.5px; width: 100%; background: #c9dcf0; border-radius: 2px; }
.ugt-header-burger:hover { border-color: #22c55e !important; }

/* Content column for pages that used to pad <body>. */
.ugt-page { max-width: 800px !important; margin: 0 auto !important; padding: 26px 20px 10px !important; }

/* Pages without a global reset would otherwise size the bar with content-box. */
.ugt-header-inner, .ugt-header-inner *, .ugt-page { box-sizing: border-box !important; }

@media (max-width: 720px) {
  .ugt-header-badge { display: none !important; }
  .ugt-header-nav a.ugt-header-guides,
  .ugt-header-nav a.ugt-header-about { display: none !important; }
  .ugt-header-inner { gap: 8px !important; padding: 0 14px !important; }
  .ugt-header-logo { font-size: 1.15rem !important; }
  .ugt-header-nav a { min-height: 38px !important; padding: 6px 10px !important; font-size: .84rem !important; }
}
@media (max-width: 340px) {
  .ugt-header-nav a.ugt-header-calc { display: none !important; }
}
@media print {
  header.ugt-header { display: none !important; }
  footer.ugt-footer { display: none !important; }
  .bc a:first-child, nav.breadcrumb a:first-child, a.ugt-crumb-home { border: 0 !important; padding: 0 !important; background: none !important; color: #000 !important; }
}
