/* Perspectives pages: long-form layout per the Navy, White and Teal guidelines.
   White page ground for reading, navy header and footer, one teal element (the primary button). */
:root {
  --navy: #0B1B3D;
  --soft-blue: #E6F0FA;
  --surface-card: #FFFFFF;
  --slate: #5C7294;
  --slate-ink: #51678A;
  --teal: #00A896;
  --teal-ink: #007A6E;
  --on-navy: #FFFFFF;
  --on-navy-muted: #9FB2CC;
  --line-dark: #2A4270;
  --on-teal: #0B1B3D;
  --line: #C9D6E8;
  --font-display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-6: 24px;
  --space-8: 32px; --space-12: 48px; --space-24: 96px;
  --radius-sm: 8px; --radius-md: 12px;
  --header-h: 72px;
  --measure: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--navy); }
body {
  margin: 0;
  background: var(--surface-card);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.site-header a:focus-visible, .site-footer a:focus-visible { outline-color: var(--on-navy); }
.label { font-size: 14px; line-height: 20px; font-weight: 500; }
.container { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* Header (matches the home page) */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--navy); color: var(--on-navy);
  border-bottom: 1px solid var(--line-dark);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .container { min-height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand .wordmark { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brand .wm-name { font-family: var(--font-display); font-weight: 700; font-size: 35px; line-height: 1; color: #FFFFFF; }
.brand .wm-dot { display: inline-block; width: 0.23em; height: 0.23em; margin-left: 0.07em; border-radius: 50%; background: var(--teal); }
.brand .wm-sub { font-family: var(--font-body); font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: 0.115em; text-transform: uppercase; color: var(--on-navy-muted); white-space: nowrap; }
.nav { display: flex; align-items: center; gap: var(--space-8); }
.nav a { color: var(--on-navy); text-decoration: none; font-size: 16px; padding-block: var(--space-2); border-bottom: 1px solid transparent; transition: border-color 200ms ease-out; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: var(--on-navy); }

/* Page */
.page { padding-bottom: var(--space-24); }
.essay, .index, .more-inner { width: min(var(--measure), 100% - 48px); margin-inline: auto; }

/* Essay header */
.essay-head, .index-head { padding-top: var(--space-24); padding-bottom: var(--space-12); border-bottom: 1px solid var(--line); }
.kicker { font-size: 14px; line-height: 20px; font-weight: 500; }
.kicker a { color: var(--slate); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color 200ms ease-out, color 200ms ease-out; }
.kicker a:hover { color: var(--navy); border-bottom-color: var(--navy); }
.essay-head h1, .index-head h1 {
  margin-top: var(--space-4);
  font-family: var(--font-display); font-weight: 700;
  font-size: 56px; line-height: 60px; letter-spacing: -0.01em;
  text-wrap: balance;
}
.dek { margin-top: var(--space-6); font-size: 18px; line-height: 1.6; color: var(--slate); text-wrap: pretty; }
.byline { margin-top: var(--space-6); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--slate); }
.byline > span, .byline > time { white-space: nowrap; }

/* Essay body */
.essay-body { padding-top: var(--space-12); font-size: 18px; line-height: 1.7; }
.essay-body p, .essay-body li { text-wrap: pretty; }
.essay-body p + p, .essay-body ol + p, .essay-body p + ol { margin-top: 1.1em; }
.essay-body h2 {
  margin-top: var(--space-12);
  font-family: var(--font-display); font-weight: 600;
  font-size: 24px; line-height: 32px;
  text-wrap: balance;
}
.essay-body h2:first-child { margin-top: 0; }
.essay-body h2 + p { margin-top: var(--space-3); }
.essay-body ol { padding-left: 0; list-style: none; counter-reset: item; }
.essay-body ol li { counter-increment: item; position: relative; padding-left: 2.25em; }
.essay-body ol li + li { margin-top: 0.75em; }
.essay-body ol li::before {
  content: counter(item);
  position: absolute; left: 0; top: 0;
  font-family: var(--font-display); font-weight: 600; color: var(--slate);
}
.essay-body strong { font-weight: 600; }
.essay-body a, .essay-sources a, .close-link, .more-all a {
  color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}

/* Closing panel */
.essay-close {
  margin-top: var(--space-12);
  padding: var(--space-8);
  background: var(--soft-blue);
  border-radius: var(--radius-md);
}
.essay-close p { font-size: 18px; line-height: 1.6; color: var(--navy); text-wrap: pretty; }
.close-actions { margin-top: var(--space-6); display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-6); }
.close-link { color: var(--navy); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px var(--space-6);
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: var(--font-body); font-size: 16px; line-height: 24px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: background-color 200ms ease-out;
}
.btn-primary { background: var(--teal); color: var(--on-teal); }
.btn-primary:hover { background: #00BDA9; }

/* Sources */
.essay-sources { margin-top: var(--space-12); padding-top: var(--space-8); border-top: 1px solid var(--line); }
.essay-sources h2, .more h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 28px; }
.essay-sources ul { margin-top: var(--space-4); padding: 0; list-style: none; color: var(--slate); }
.essay-sources li { text-wrap: pretty; }
.essay-sources li + li { margin-top: var(--space-3); }

/* More perspectives */
.more { margin-top: var(--space-12); }
.more-inner { padding-top: var(--space-8); border-top: 1px solid var(--line); }
.more-list { margin-top: var(--space-6); padding: 0; list-style: none; display: grid; gap: var(--space-4); }
.more-card a {
  display: block; padding: var(--space-6);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  text-decoration: none; transition: border-color 200ms ease-out;
}
.more-card a:hover { border-color: var(--slate); }
.more-title { display: block; font-family: var(--font-display); font-weight: 600; font-size: 20px; line-height: 28px; color: var(--navy); }
.more-dek { display: block; margin-top: var(--space-2); color: var(--slate); text-wrap: pretty; }
.more-all { margin-top: var(--space-6); }

/* Index page */
.index-list { padding: 0; list-style: none; }
.index-item { padding-block: var(--space-8); border-bottom: 1px solid var(--line); }
.index-item .byline { margin-top: 0; }
.index-item h2 { margin-top: var(--space-2); font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 34px; text-wrap: balance; }
.index-item h2 a { text-decoration: none; }
.index-item h2 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.index-dek { margin-top: var(--space-3); color: var(--slate); font-size: 18px; line-height: 1.6; text-wrap: pretty; }

/* Footer (matches the home page) */
.site-footer { background: var(--navy); border-top: 1px solid var(--line-dark); }
.site-footer .container { padding-block: var(--space-8); color: var(--on-navy-muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-8); }
.footer-row a { color: var(--on-navy); text-underline-offset: 3px; transition: color 200ms ease-out; }
.footer-row a:hover { color: var(--teal); }

@media (max-width: 900px) {
  .nav { gap: var(--space-6); }
}
@media (max-width: 640px) {
  .nav { gap: var(--space-4); }
  .nav .nav-anchor { display: none; }
  .essay-head, .index-head { padding-top: var(--space-12); padding-bottom: var(--space-8); }
  .essay-head h1, .index-head h1 { font-size: 40px; line-height: 46px; }
  .essay-close { padding: var(--space-6); }
}
@media (max-width: 400px) {
  .container { width: min(1200px, 100% - 32px); }
  .brand .wm-name { font-size: 28px; }
  .brand .wm-sub { font-size: 10px; letter-spacing: 0.1em; }
  .nav { gap: var(--space-3); }
  .nav a { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0ms !important; }
}
