/* Portal/report parity with the main web's #page_end (index.css).
   The root page scale now owns desktop density, just as on the main web. */
body:is([data-page="portal"], [data-page="report"]) #page_end {
  --footer-primary: var(--text-primary, #f8fafc);
  --footer-secondary: var(--text-secondary, #94a3b8);
  --footer-muted: var(--text-muted, #64748b);
  --footer-focus: var(--glow-focus, #b5d8ff);
  --footer-line: rgba(255, 255, 255, .12);
  --footer-hover-line: rgba(255, 255, 255, .12);
  --footer-hover-fill: rgba(255, 255, 255, .04);
  position: relative;
  margin-top: auto;
  padding: 3.5rem 0 3rem;
  border-top: none;
  font: 400 1rem/1.6 "Inter", system-ui, -apple-system, sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.light-mode:is([data-page="portal"], [data-page="report"]) #page_end {
  --footer-primary: var(--text-primary, #0f172a);
  --footer-secondary: var(--text-secondary, #475569);
  --footer-focus: var(--glow-focus, #155ab0);
  --footer-line: rgba(0, 0, 0, .08);
  --footer-hover-line: rgba(0, 0, 0, .12);
  --footer-hover-fill: rgba(0, 0, 0, .04);
}
#page_end::before {
  content: "";
  position: absolute;
  top: .5rem;
  left: 0;
  right: 0;
  border-top: 1px solid var(--footer-line);
  pointer-events: none;
}
#page_end .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}
#page_end .footer-copyright { flex: 1; }
#page_end .footer-copyright p {
  margin: 0;
  color: var(--footer-muted);
  font-size: .8rem;
  line-height: 1.6;
}
#page_end .footer-links {
  flex: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem .5rem;
}
#page_end .footer-links a {
  color: var(--footer-secondary);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  padding: .3rem .7rem;
  border-radius: 9999px;
  border: 1px solid transparent;
  transition: all .3s cubic-bezier(.25, .8, .25, 1);
}
#page_end .footer-links a:hover {
  color: var(--footer-primary);
  border-color: var(--footer-hover-line);
  background: var(--footer-hover-fill);
}
#page_end .footer-links .separator { display: none; }
#page_end .footer-social { display: flex; justify-content: center; align-items: center; }
#page_end .footer-social__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--footer-secondary);
  border: 1px solid transparent;
  transition: all .3s cubic-bezier(.25, .8, .25, 1);
}
#page_end .footer-social__link:hover {
  color: var(--footer-primary);
  border-color: rgba(96, 165, 250, .4);
  background: rgba(96, 165, 250, .08);
  box-shadow: 0 0 12px rgba(96, 165, 250, .2);
}
#page_end a:focus-visible {
  outline: 2px solid var(--footer-focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(96, 165, 250, .18);
}
@media (max-width: 900px) {
  #page_end .footer-content { flex-direction: column; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  #page_end a { transition: none; }
}
