:root {
  --navy: #0F1B2D;
  --card: #16263D;
  --light: #F5F7FA;
  --ink: #0F1B2D;
  --white: #ffffff;
  --orange: #F7931A;
  --teal: #14B8A6;
  --teal-light: #5EEAD4;
  --teal-deep: #0F766E;
  --meta-light: #475569;
  --meta-navy: #94A3B8;
}

* { box-sizing: border-box; }

html {
  background: var(--navy);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: Montserrat, Helvetica, Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.7;
}

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

a { color: var(--teal-light); }
.paper a { color: var(--teal-deep); font-weight: 600; }
a:hover { text-decoration: underline; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 10px 14px;
  min-height: 44px;
  background: var(--teal-light);
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.skip:focus,
.skip:focus-visible { top: 12px; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 8px 16px;
  background: var(--navy);
}

.topbar .logo {
  display: block;
  height: 40px;
  width: auto;
}

.issue-label {
  margin: 0;
  color: var(--meta-navy);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.cover-hero {
  background: var(--navy);
}

.cover-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--card);
}

.paper {
  background: var(--light);
  color: var(--ink);
  padding: 32px 16px 56px;
}

.wrap {
  width: min(100%, 68ch);
  margin: 0 auto;
}

.series-name {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tagline {
  margin: 0 0 14px;
  color: var(--teal-deep);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
}

h1 {
  margin: 0 0 12px;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.byline {
  margin: 0 0 28px;
  color: var(--meta-light);
  font-size: 15px;
  font-weight: 500;
}

.lead {
  margin: 0 0 1.25em;
  font-style: italic;
}

.prose p {
  margin: 0 0 1.25em;
}

.sub-card,
.chart-card {
  margin: 28px 0;
  padding: 22px 18px;
  background: var(--card);
  color: var(--white);
  border-radius: 16px;
}

.sub-card h2,
.ask-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.sub-card .sub {
  margin: 0 0 16px;
  color: var(--meta-navy);
  font-size: 16px;
}

.km-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.km-form label {
  color: var(--meta-navy);
  font-size: 14px;
  font-weight: 600;
}

.km-form input[type="email"] {
  width: 100%;
  min-height: 44px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--teal-light);
  border-radius: 12px;
  background: var(--light);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.btn-subscribe {
  width: 100%;
  background: var(--orange);
  color: var(--ink);
}

.btn-subscribe:hover { filter: brightness(1.06); color: var(--ink); text-decoration: none; }

.paper a.btn-teal,
.btn-teal {
  width: 100%;
  border: 2px solid var(--teal-light);
  background: transparent;
  color: var(--teal-light);
}

.btn-teal:hover { background: rgba(94, 234, 212, 0.1); text-decoration: none; }

.btn-copy {
  min-width: 44px;
  border: 2px solid var(--teal-deep);
  background: transparent;
  color: var(--teal-deep);
}

.btn-copy:hover { background: rgba(20, 184, 166, 0.1); }

.fine {
  margin: 10px 0 14px;
  color: var(--meta-navy);
  font-size: 14px;
}

.km-status {
  margin: 8px 0 0;
  font-size: 15px;
  font-weight: 600;
}

.km-status.ok { color: var(--teal-light); }
.km-status.err { color: #FCA5A5; }

.chart-card {
  padding: 12px 12px 16px;
}

.chart-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  border-radius: 12px;
  overflow: hidden;
}

.chart-open img {
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 770;
  object-fit: contain;
  background: var(--navy);
}

.chart-card figcaption {
  margin: 12px 4px 0;
  color: var(--meta-navy);
  font-size: 14px;
  line-height: 1.55;
}

.ask-card {
  margin: 28px 0;
  padding: 20px 18px 20px 22px;
  background: #fff;
  border-radius: 12px;
  border-left: 4px solid var(--teal);
}

.ask-card h2 { color: var(--ink); }

.prompt {
  margin: 0 0 14px;
  color: var(--ink);
}

.comments-q {
  margin: 28px 0;
  font-weight: 700;
}

.closer {
  margin: 28px 0 8px;
}

.closer-tag {
  margin: 0 0 28px;
  font-weight: 700;
  white-space: nowrap;
}

.site-foot {
  padding: 28px 16px 36px;
  background: var(--navy);
  text-align: center;
}

.site-foot p {
  margin: 0 0 8px;
  color: var(--meta-navy);
  font-size: 14px;
}

.site-foot p:last-child { margin-bottom: 0; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 27, 45, 0.92);
}

.lightbox.open { display: flex; }

.lightbox-panel {
  position: relative;
  width: min(1100px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: 56px 8px 16px;
  background: var(--card);
  border: 1px solid rgba(94, 234, 212, 0.35);
  border-radius: 16px;
}

.lightbox-panel img {
  width: 100%;
  height: auto;
}

.lightbox-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid var(--teal-light);
  border-radius: 10px;
  background: var(--navy);
  color: var(--teal-light);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.unsub-msg {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 16px;
}

@media (min-width: 768px) {
  .topbar { padding: 8px 32px; }
  .paper { padding: 48px 24px 80px; }
  .series-name { font-size: 26px; }
  h1 { font-size: 44px; }
  .sub-card { padding: 28px 26px; }
  .chart-card { padding: 16px 16px 20px; }
  .ask-card { padding: 24px 24px 24px 28px; }
}

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