:root {
  --page: #ffffff;
  --surface: #ffffff;
  --surface-soft: #f0f1f2;
  --text: #082f59;
  --text-muted: #4a5f73;
  --navy: #073766;
  --navy-deep: #052947;
  --orange: #ef4b1b;
  --orange-dark: #c93710;
  --line: #d7dde3;
  --focus: #f2a900;
  --shadow: 0 8px 24px rgba(7, 55, 102, 0.12);
  --content-wide: 1120px;
  --content-reading: 760px;
}

html[data-theme="dark"] {
  --page: #101923;
  --surface: #172331;
  --surface-soft: #1b2a39;
  --text: #eef4fa;
  --text-muted: #bdcad7;
  --navy: #0b4f87;
  --navy-deep: #061c30;
  --orange: #ff6a3d;
  --orange-dark: #ff825f;
  --line: #324557;
  --focus: #ffd36a;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--page);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 500;
  padding: 10px 14px;
  background: var(--navy-deep);
  color: #ffffff;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.content-wide,
.header-inner {
  width: min(calc(100% - 40px), var(--content-wide));
  margin-inline: auto;
}

.content-narrow {
  width: min(calc(100% - 40px), 850px);
  margin-inline: auto;
}

.content-reading {
  width: min(calc(100% - 40px), var(--content-reading));
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  border-top: 3px solid var(--orange);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.header-inner {
  min-height: 78px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  color: var(--orange);
}

.site-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  color: var(--text);
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav a.is-active {
  color: var(--orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  padding: 8px 16px;
  background: var(--orange);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.header-action:hover {
  background: var(--orange-dark);
}

.theme-toggle,
.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  cursor: pointer;
}

.theme-icon,
.menu-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon-dark {
  display: none;
}

html[data-theme="dark"] .theme-icon-light {
  display: none;
}

html[data-theme="dark"] .theme-icon-dark {
  display: block;
}

.menu-toggle {
  display: none;
  width: auto;
  padding: 0 12px;
  grid-auto-flow: column;
  gap: 8px;
  font-weight: 700;
}

.hero-photo,
.subpage-photo {
  margin: 0;
  width: 100%;
  overflow: hidden;
  background: var(--surface-soft);
}

.hero-photo {
  height: min(450px, 43vw);
  min-height: 320px;
}

.subpage-photo {
  height: min(360px, 38vw);
  min-height: 260px;
}

.hero-photo img,
.subpage-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-photo img {
  object-position: center 45%;
}

.subpage-photo img {
  object-position: center 58%;
}

.intro-section,
.subpage-intro {
  padding: 62px 0 68px;
}

h1,
h2,
h3 {
  margin-top: 0;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  margin-bottom: 24px;
  color: var(--orange);
  font-size: clamp(2.05rem, 3.6vw, 3rem);
  letter-spacing: -0.025em;
}

h2 {
  margin-bottom: 20px;
  color: var(--orange);
  font-size: clamp(1.7rem, 2.7vw, 2.2rem);
  letter-spacing: -0.018em;
}

h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.28rem;
}

p {
  margin-top: 0;
}

.intro-copy {
  max-width: 790px;
  margin: 0 auto 28px;
  color: var(--text-muted);
  font-size: 1.08rem;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.center-buttons {
  justify-content: center;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-primary {
  background: var(--orange);
  color: #ffffff;
}

.button-primary:hover {
  background: var(--orange-dark);
}

.button-secondary {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

html[data-theme="dark"] .button-secondary {
  border-color: var(--text);
  color: var(--text);
}

.button-secondary:hover {
  background: var(--navy);
  color: #ffffff;
}

.research-band {
  padding: 64px 0;
  background: var(--navy);
  color: #ffffff;
}

.research-band h2 {
  color: #ff6b3d;
}

.research-band p {
  margin-bottom: 24px;
  font-size: 1.04rem;
}

.text-button,
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0;
  background: transparent;
  color: var(--orange);
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.light-link {
  color: #ffffff;
}

.section {
  padding: 72px 0;
}

.section-gray {
  background: var(--surface-soft);
}

.section-heading {
  max-width: 820px;
  margin: 0 auto 42px;
}

.section-heading p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.issue-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.image-card {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.image-card:nth-child(1) img {
  object-position: center 72%;
}

.image-card:nth-child(2) img {
  object-position: center 50%;
}

.image-card:nth-child(3) img {
  object-position: center 62%;
}

.image-card-copy {
  padding: 24px;
}

.image-card-copy h3 {
  color: var(--orange);
}

.image-card-copy p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.action-section {
  border-top: 12px solid var(--navy);
  border-bottom: 12px solid var(--navy);
}

.action-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.action-side {
  display: grid;
  gap: 24px;
}

.action-panel {
  padding: 30px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.action-panel > p {
  color: var(--text-muted);
}

.small-panel {
  background: var(--navy);
  color: #ffffff;
}

.small-panel h3,
.small-panel .text-button {
  color: #ffffff;
}

.small-panel p {
  color: #ffffff;
}

.question-text {
  margin-bottom: 14px;
  font-size: 1.08rem;
  font-weight: 700;
}

.action-form {
  display: grid;
  gap: 16px;
}

.action-form label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.action-form input,
.action-form textarea {
  width: 100%;
  border: 1px solid #8a99a8;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
}

.action-form textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-note {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.stacked-links {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.stacked-links .button {
  width: 100%;
}

.compact-buttons .button {
  flex: 1 1 160px;
}

.story-preview {
  background: var(--navy);
  color: #ffffff;
}

.story-preview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.story-preview-grid img {
  width: 100%;
  min-height: 430px;
  height: 100%;
  object-fit: cover;
}

.story-preview-copy {
  padding: 58px;
  align-self: center;
}

.story-preview-copy h2 {
  color: #ff6b3d;
}

.story-preview-copy p {
  color: #ffffff;
}

.source-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.source-list a {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
}

.source-list a:hover {
  border-color: var(--orange);
}

.source-list strong,
.source-list span {
  display: block;
}

.source-list strong {
  margin-bottom: 4px;
  color: var(--orange);
}

.source-list span {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.review-date {
  margin: 22px 0 0;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.9rem;
}

.story-section h2,
.credits-page h2 {
  margin-top: 44px;
}

.story-section p,
.credits-page p {
  color: var(--text-muted);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.work-grid article {
  padding: 26px;
  background: var(--surface);
  border-top: 5px solid var(--orange);
  box-shadow: var(--shadow);
}

.work-grid article > span {
  display: block;
  margin-bottom: 18px;
  color: var(--orange);
  font-size: 1.5rem;
  font-weight: 700;
}

.work-grid p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.timeline {
  max-width: 900px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.timeline li {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.timeline time {
  color: var(--orange);
  font-weight: 700;
}

.timeline p {
  margin-bottom: 0;
  color: var(--text-muted);
}

.closing-action {
  padding: 64px 0;
  background: var(--navy);
  color: #ffffff;
}

.closing-action h2 {
  color: #ff6b3d;
}

.closing-action p {
  margin-bottom: 24px;
}

.credits-page > p:first-of-type {
  margin-bottom: 36px;
}

.credits-page section {
  padding: 24px 0;
  border-top: 1px solid var(--line);
}

.credits-page section:last-of-type {
  border-bottom: 1px solid var(--line);
}

.credits-page section h2 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.35rem;
}

.site-footer {
  padding: 34px 0;
  background: var(--navy-deep);
  color: #ffffff;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.footer-brand {
  color: #ffffff;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
}

.footer-links a {
  color: #ffffff;
  font-size: 0.9rem;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 300;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 15px;
  background: var(--navy-deep);
  color: #ffffff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: pre-line !important;
  border: 0 !important;
}

.error-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.error-card {
  width: min(100%, 620px);
  padding: 42px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow);
}

.error-card img {
  margin: 0 auto 20px;
}

.error-code {
  color: var(--orange);
  font-weight: 700;
}

.error-card h1 {
  font-size: 2.5rem;
}

@media (max-width: 980px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 12px;
  }

  .menu-toggle {
    display: inline-grid;
    justify-self: end;
  }

  .site-nav {
    position: fixed;
    inset: 80px 0 auto;
    display: grid;
    gap: 0;
    padding: 14px 20px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
  }

  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .site-nav a {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .issue-grid,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .image-card {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) 1fr;
  }

  .image-card img {
    height: 100%;
    aspect-ratio: auto;
  }

  .action-layout {
    grid-template-columns: 1fr;
  }

  .story-preview-grid {
    grid-template-columns: 1fr;
  }

  .story-preview-grid img {
    min-height: 320px;
    max-height: 430px;
  }
}

@media (max-width: 700px) {
  .content-wide,
  .content-narrow,
  .content-reading,
  .header-inner {
    width: min(calc(100% - 28px), var(--content-wide));
  }

  .header-action {
    display: none;
  }

  .brand span {
    max-width: 120px;
    line-height: 1.05;
  }

  .menu-toggle span {
    display: none;
  }

  .menu-toggle {
    width: 40px;
    padding: 0;
  }

  .hero-photo {
    min-height: 260px;
    height: 58vw;
  }

  .subpage-photo {
    min-height: 230px;
    height: 54vw;
  }

  .intro-section,
  .subpage-intro,
  .section {
    padding: 54px 0;
  }

  h1 {
    font-size: clamp(1.95rem, 9vw, 2.45rem);
  }

  h2 {
    font-size: clamp(1.6rem, 6.4vw, 2rem);
  }

  .issue-grid {
    gap: 18px;
  }

  .image-card {
    display: block;
  }

  .image-card img {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .source-list {
    grid-template-columns: 1fr;
  }

  .story-preview-copy {
    padding: 38px 24px;
  }

  .timeline li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .button-row,
  .theme-toggle,
  .menu-toggle,
  .site-footer,
  .toast {
    display: none !important;
  }

  body {
    color: #000000;
    background: #ffffff;
  }

  .research-band,
  .story-preview,
  .closing-action {
    color: #000000;
    background: #ffffff;
  }

  h1,
  h2,
  h3,
  .research-band h2,
  .story-preview-copy h2,
  .closing-action h2 {
    color: #000000;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.72em;
    overflow-wrap: anywhere;
  }
}
