:root {
  --red: #b11226;
  --blue: #1f3c88;
  --white: #ffffff;
  --gray: #f4f4f4;
  --text: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--gray);
  line-height: 1.6;
}

/* ========================= */
/* Header                    */
/* ========================= */

.flag-bar {
  height: 6px;
  background: linear-gradient(
    to right,
    var(--red) 0%,
    var(--red) 33%,
    var(--white) 33%,
    var(--white) 66%,
    var(--blue) 66%,
    var(--blue) 100%
  );
}

.site-header {
  background: var(--white);
  padding: 1.5rem 1rem 1rem;
  border-bottom: 3px solid var(--blue);
  text-align: center; /* ✅ ADDED */
}

.site-header h1 {
  margin: 0;
  color: var(--blue);
  font-size: 1.6rem;
}

.subtitle {
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
  color: #444;
}

/* ========================= */
/* Main Content              */
/* ========================= */

main {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--white);
  padding: 2rem;
  border-left: 5px solid var(--red);
}

h2 {
  color: var(--blue);
  border-bottom: 2px solid var(--red);
  padding-bottom: 0.25rem;
  margin-top: 2rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

.loading {
  font-style: italic;
  color: #666;
}

/* ========================= */
/* Definition Lists          */
/* ========================= */

dl {
  margin: 1rem 0 1.5rem;
}

dt {
  font-weight: 700;
  margin-top: 0.75rem;
  color: var(--blue);
}

dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
}

/* ========================= */
/* Overlay Iframe Nav        */
/* ========================= */

.iframe-nav {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;

  background: rgba(31, 60, 136, 0.92);
  border-radius: 6px;
  padding: 6px 8px;

  display: flex;
  gap: 6px;
}

.iframe-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0.75;
}

.iframe-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

.iframe-nav a.active {
  background: #ffffff;
  color: var(--blue);
  opacity: 1;
  font-weight: 600;
}

/* ========================= */
/* Flagged Claims / Tooltips */
/* ========================= */

.flag {
  font-weight: 700;
  color: var(--red);
  cursor: help;
  position: relative;
  text-decoration: none;
}

.flag::after {
  content: " i";
  font-weight: 400;
  font-size: 0.85em;
}

/* Tooltip (desktop hover) */
.flag-tooltip {
  display: none;
  position: absolute;
  z-index: 10000;
  top: 1.6em;
  left: 0;

  background: #111;
  color: #fff;
  padding: 10px 12px;
  border-radius: 6px;

  max-width: 300px;
  font-size: 0.85rem;
  line-height: 1.35;

  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
}

.flag-tooltip strong {
  display: block;
  color: #ff5a5a;
  margin-bottom: 4px;
}

/* Hover behavior (desktop only) */
@media (hover: hover) {
  .flag:hover .flag-tooltip {
    display: block;
  }
}

/* ========================= */
/* Mobile Popup              */
/* ========================= */

.flag-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 10001;

  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-popup-content {
  background: #111;
  color: #fff;
  padding: 18px;
  border-radius: 8px;

  max-width: 90%;
  font-size: 0.95rem;
  line-height: 1.4;
}

.flag-popup-content h4 {
  margin: 0 0 8px;
  color: #ff5a5a;
  font-size: 1rem;
}
