/* FVZA shared stylesheet — one file controls the look of every page */

:root {
  --navy: #000066;
  --red: #b00000;
  --link: #000066;
  --visited: #b00000;
  --ink: #111;
  --muted: #555;
  --rule: #000066;
  --paper: #ffffff;
  --sky: #d9ecfb;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.6;
  border-top: 6px solid var(--navy);
}

/* On wide screens: navy sides with the classic red-and-navy stripes
   framing the page, at any screen width */
@media (min-width: 1000px) {
  body {
    --half: min(470px, calc(50vw - 70px));
    border-top: 0;
    background: linear-gradient(to right,
      #000066 0, #000066 calc(50% - var(--half) - 60px),
      #cc0000 calc(50% - var(--half) - 60px), #cc0000 calc(50% - var(--half) - 30px),
      #000066 calc(50% - var(--half) - 30px), #000066 calc(50% - var(--half) - 6px),
      #ffffff calc(50% - var(--half) - 6px), #ffffff calc(50% + var(--half) + 6px),
      #000066 calc(50% + var(--half) + 6px), #000066 calc(50% + var(--half) + 30px),
      #cc0000 calc(50% + var(--half) + 30px), #cc0000 calc(50% + var(--half) + 60px),
      #000066 calc(50% + var(--half) + 60px), #000066 100%);
  }
}

a { color: var(--link); }
a:visited { color: var(--visited); }
a:hover, a:focus { color: #ff0000; }

img { max-width: 100%; height: auto; }

.page {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px 24px;
  background: var(--paper);
}

/* ---------- Header ---------- */
/* Seal and red banner sit edge to edge, tops aligned, exactly as the
   original table layout did; both scale together on small screens. */
.site-header {
  display: flex;
  align-items: flex-start;
  gap: 0;
  max-width: 598px; /* 106 + 492 */
  padding: 12px 0 8px;
}
.site-header a { display: block; line-height: 0; }
.site-header .seal { flex: 0 0 17.726%; }       /* 106 / 598 */
.site-header .wordmark { flex: 0 0 82.274%; }   /* 492 / 598 */
.site-header img { display: block; width: 100%; height: auto; }

.home-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 24px;
  padding: 16px 0 8px;
}
.home-header .banner { width: 100%; max-width: 560px; }
.home-header .banner img { display: block; width: 100%; }
.donate input[type="image"] { width: 110px; height: auto; }

/* ---------- Navigation ---------- */
.site-nav {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: bold;
  background: var(--sky);
  border-top: 3px solid var(--navy);
  border-bottom: 3px solid var(--red);
  margin-bottom: 8px;
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-button {
  display: none;
  cursor: pointer;
  padding: 12px 14px;
  color: var(--navy);
  user-select: none;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 8px 6px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.site-nav li { margin: 0; }
.site-nav a {
  display: block;
  padding: 4px 9px;
  text-decoration: none;
  color: var(--navy);
}
.site-nav a:hover, .site-nav a:focus { text-decoration: underline; color: var(--red); }
.site-nav a[aria-current="page"] { color: var(--red); }

@media (max-width: 700px) {
  .nav-button { display: block; }
  .site-nav ul {
    display: none;
    flex-direction: column;
    padding: 0 0 8px;
  }
  .nav-toggle:checked ~ ul { display: flex; }
  .nav-toggle:focus-visible + .nav-button { outline: 2px solid var(--red); }
  .site-nav a {
    padding: 11px 16px;
    border-top: 1px solid #b9d6ee;
    font-size: 16px;
  }
}

/* ---------- Page titles ---------- */
h1.page-title {
  color: var(--navy);
  text-align: center;
  font-size: clamp(26px, 6vw, 36px);
  line-height: 1.2;
  margin: 18px 0 20px;
  padding: 12px 0;
  border-top: 2px solid var(--rule);
  border-bottom: 2px solid var(--rule);
}

h2, h3 { color: var(--navy); line-height: 1.25; }

hr {
  border: 0;
  border-top: 2px solid var(--rule);
  margin: 24px 0;
}

.intro { text-align: left; }
.center { text-align: center; }

/* Photos that sat beside text: float on wide screens, stack on phones */
.figure-left, .figure-right {
  display: block;
  margin: 4px auto 16px;
}
.figure-left img, .figure-right img { display: block; border: 1px solid var(--navy); }
.figure-plain img { border: 0; }
@media (min-width: 640px) {
  .figure-left { float: left; margin: 4px 28px 12px 0; max-width: 50%; }
  .figure-right { float: right; margin: 4px 0 12px 28px; max-width: 50%; }
}
.figure-wide { text-align: center; margin: 0 0 16px; }
.figure-wide img { border: 1px solid var(--navy); }
.clear { clear: both; }

/* ---------- Link lists (section menus) ---------- */
.link-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  overflow: hidden; /* sit beside a floated photo */
}
.link-list li { margin: 0; }
.link-list a {
  display: block;
  padding: 7px 0;
  font-size: clamp(19px, 4.6vw, 24px);
  font-weight: bold;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-list.small a { font-size: 18px; padding: 6px 0; }
.link-list.arrows a::before {
  content: "";
  display: inline-block;
  width: 13px; height: 25px;
  margin-right: 10px;
  vertical-align: middle;
  background: url("images/arrow.gif") no-repeat center;
}
@media (max-width: 639px) {
  .link-list li + li a { border-top: 1px solid #dde3ef; }
}

.list-heading {
  font-family: Verdana, Arial, Helvetica, sans-serif;
  font-size: 20px;
  margin: 18px 0 6px;
}

/* ---------- Clickable pictures (formerly image maps) ---------- */
.hotspot-image {
  position: relative;
  max-width: 460px;
  margin: 0 auto 16px;
}
.hotspot-image img { display: block; width: 100%; }
.hotspot-image a {
  position: absolute;
  display: block;
  border-radius: 6px;
}
.hotspot-image a:hover, .hotspot-image a:focus {
  outline: 3px solid #ff0000;
  outline-offset: 1px;
}
.hotspot-image.hugo { max-width: 363px; }
.hotspot-image.eagle { max-width: 458px; }

/* ---------- Home page ---------- */
.whats-new { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.whats-new .news { flex: 1 1 320px; }
.whats-new .news p { margin: 0 0 12px; }
.new-tab img { vertical-align: bottom; }
.new-tab .redline { width: 100%; max-width: 390px; height: 2px; }
.memorial {
  flex: 0 0 auto;
  margin: 0 auto;
  text-align: center;
  font-size: 16px;
}
.memorial img { width: 150px; border: 1px solid var(--navy); display: block; margin: 0 auto 6px; }
.memorial strong { font-size: 20px; display: block; line-height: 1.3; }

.lede { font-size: 19px; }
.lede b { color: var(--navy); }

.video {
  position: relative;
  max-width: 560px;
  margin: 0 auto 20px;
  aspect-ratio: 16 / 9;
}
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.seen-on {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  text-align: center;
}
.seen-on .logos {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
}
.seen-on img { display: block; max-height: 60px; width: auto; }

.sponsored {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--muted);
}

/* ---------- Footer ---------- */
.site-footer {
  clear: both;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  text-align: center;
  border-top: 2px solid var(--rule);
  margin-top: 28px;
  padding-top: 14px;
}
.site-footer .notice { font-weight: bold; margin: 0 0 12px; }
.site-footer .footer-links a { display: inline-block; padding: 6px 4px; }
.site-footer .copyright { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Interactive cases ---------- */
.case-intro { font-style: italic; }
.case-meta { margin: 0 0 16px; }
.figure-caption {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: bold;
  color: var(--navy);
  text-align: center;
  margin-top: 6px;
  line-height: 1.35;
}
.figure-right.captioned img, .figure-left.captioned img { width: 100%; }
.callout { text-align: center; font-weight: bold; }
.big-link { font-size: 21px; font-weight: bold; }
.question { text-align: center; font-size: 21px; font-weight: bold; color: var(--navy); margin-bottom: 4px; }
.question-hint { text-align: center; margin-top: 0; font-size: 16px; color: var(--muted); }

.choices { list-style: none; margin: 16px 0; padding: 0; }
.choices li { margin: 0 0 12px; }
.choice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font: inherit;
  color: var(--ink);
  text-decoration: none;
  background: #f4f7fc;
  border: 2px solid #c5d3ea;
  border-radius: 8px;
  cursor: pointer;
}
.choice:visited { color: var(--ink); }
.choice:hover, .choice:focus { border-color: var(--navy); background: var(--sky); color: var(--ink); }
.choice .num {
  flex: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  display: flex; align-items: center; justify-content: center;
}
.proceed { text-align: center; font-size: 19px; margin-top: 20px; }

/* The answer "pop-up": a panel over the page that works on phones and
   is never blocked by pop-up blockers */
dialog.answer {
  background: #fff;
  color: var(--ink);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 3px solid var(--navy);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,.45);
}
dialog.answer::backdrop { background: rgba(0, 0, 40, .55); }
dialog.answer .answer-head {
  background: var(--navy);
  color: #fff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: bold;
  padding: 10px 16px;
  border-bottom: 3px solid var(--red);
}
dialog.answer .answer-body { padding: 16px 20px 4px; }
dialog.answer .answer-actions { padding: 4px 20px 18px; text-align: center; }
dialog.answer button.close {
  font: bold 16px Arial, Helvetica, sans-serif;
  padding: 10px 22px;
  color: #fff;
  background: var(--navy);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
dialog.answer button.close:hover, dialog.answer button.close:focus { background: var(--red); }

.placeholder { background: #fff3c4; padding: 2px 4px; }
dialog.answer.right .answer-head { background: #1d6b2a; border-bottom-color: var(--navy); }
dialog.answer.wrong .answer-head { background: var(--red); border-bottom-color: var(--navy); }
dialog.answer .answer-head { font-size: 20px; text-align: center; padding: 12px 16px; }
dialog.answer .answer-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.next-btn {
  display: inline-block;
  font: bold 16px Arial, Helvetica, sans-serif;
  padding: 10px 18px;
  color: #fff !important;
  background: #1d6b2a;
  border-radius: 6px;
  text-decoration: none;
}
.next-btn:hover, .next-btn:focus { background: #145020; }
dialog.answer.right button.close { background: #777; }
.verdict { text-align: center; }
.verdict.right { color: #1d6b2a; }
.verdict.wrong { color: var(--red); }

/* ---------- Converted page content ---------- */
main { overflow-wrap: break-word; }
.center { text-align: center; }
figure { margin: 4px auto 16px; }
figure img { display: block; margin: 0 auto; }
.figure-wide img { display: inline-block; }
.figure-left.captioned, .figure-right.captioned { max-width: 100%; }
@media (max-width: 639px) {
  .figure-left, .figure-right { width: auto !important; text-align: center; }
  .figure-left img, .figure-right img { display: inline-block; }
}
img.float-left, img.float-right { display: block; margin: 4px auto 12px; }
@media (min-width: 640px) {
  img.float-left { float: left; margin: 4px 20px 10px 0; max-width: 50%; }
  img.float-right { float: right; margin: 4px 0 10px 20px; max-width: 50%; }
}
blockquote { margin: 12px 0 12px 1.2em; padding-left: 14px; border-left: 3px solid #c5d3ea; }
@media (max-width: 639px) { blockquote { margin-left: 0; } }

/* Former layout tables: side by side on wide screens, stacked on phones */
.layout-row { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 12px; }
.layout-cell { flex: 1 1 220px; min-width: 0; }

/* Real tables of data: scroll sideways inside the page if too wide */
.table-scroll { overflow-x: auto; margin: 0 0 16px; }
.data-table { border-collapse: collapse; }
.data-table td, .data-table th { border: 1px solid #b9c6dc; padding: 6px 8px; vertical-align: top; }

input, select, textarea, button { font: inherit; max-width: 100%; }

/* ---------- Wide screens: page sits inside the stripes ---------- */
@media (min-width: 1000px) {
  .page { max-width: calc(var(--half) * 2 + 12px); padding: 0 40px 24px; }
}
