/* Historical Apoplexy series page — Amanuensis design language
   Dark navy background, gold (#c9a227) and olive (#8b9a6b) accents, serif body.
   Matches the publisher proposal email drafts and the LinkedIn apoplexy infographics. */

:root {
  --amn-bg: #1a1a1a;
  --amn-bg-card: #1e1e1e;
  --amn-bg-card-soft: #242423;
  --amn-olive: #8b9a6b;
  --amn-gold: #c9a227;
  --amn-text: #e8e6df;
  --amn-text-body: #cccccc;
  --amn-text-muted: #8f8c85;
  --amn-border: rgba(201, 162, 39, 0.14);
  --amn-border-soft: rgba(255, 255, 255, 0.06);
  --serif: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Georgia', 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Override the site's base body background for this page only */
body {
  background-color: var(--amn-bg) !important;
  color: var(--amn-text);
  font-family: var(--serif);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.page-container {
  max-width: 860px;
  padding: 32px 24px 80px;
}

/* Recolor the profile header for the dark theme */
.profile-header-compact {
  background: var(--amn-bg-card) !important;
  border: 1px solid var(--amn-border-soft) !important;
  border-radius: 4px !important;
  margin-bottom: 40px;
}

.profile-link {
  color: var(--amn-text) !important;
}

.profile-name-compact {
  color: var(--amn-text) !important;
  font-family: var(--sans);
}

.profile-headline-compact {
  color: var(--amn-text-muted) !important;
  font-family: var(--sans);
}

/* ---- Amanuensis logo header ---- */
.amn-masthead {
  text-align: center;
  padding: 48px 20px 36px;
  border-bottom: 1px solid var(--amn-border);
  margin-bottom: 48px;
}

.amn-logo {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.62em;
  color: var(--amn-gold);
  text-transform: uppercase;
  margin: 0 0 20px 0;
  padding-left: 0.62em; /* optical centering compensation for letter-spacing */
}

.amn-logo-rule {
  width: 72px;
  height: 1px;
  background: var(--amn-gold);
  margin: 0 auto;
  opacity: 0.6;
}

/* ---- Series hero ---- */
.series-hero {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 56px;
}

.series-eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amn-gold);
  text-align: center;
  margin-bottom: 24px;
}

.series-title {
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 500;
  line-height: 1.05;
  color: var(--amn-text);
  text-align: center;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.series-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--amn-text-muted);
  text-align: center;
  margin: 0 auto 32px;
  max-width: 640px;
}

.series-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--amn-text-muted);
  letter-spacing: 0.02em;
  margin-bottom: 0;
}

.series-meta .article-author-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--amn-border);
  object-fit: cover;
}

.series-meta .article-author-info {
  text-align: left;
}

.series-meta .article-author-name {
  display: block;
  color: var(--amn-text);
  font-weight: 600;
  font-size: 14px;
}

.series-meta .article-date {
  display: block;
  color: var(--amn-text-muted);
  font-size: 12.5px;
}

/* ---- Body prose ---- */
.series-body {
  padding: 48px 0 0;
  font-size: 18px;
  line-height: 1.78;
  color: var(--amn-text-body);
  max-width: 720px;
  margin: 0 auto;
}

.series-body p {
  margin-bottom: 22px;
}

.series-body strong {
  color: var(--amn-text);
  font-weight: 600;
}

.series-body em {
  color: var(--amn-text);
  font-style: italic;
}

.series-body h2 {
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
  color: var(--amn-text);
  margin-top: 56px;
  margin-bottom: 22px;
  letter-spacing: -0.005em;
  border-top: 1px solid var(--amn-border);
  padding-top: 40px;
}

.series-body h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

/* ---- Hero quote block (the Central Indictment) ---- */
.hero-quote {
  position: relative;
  background: var(--amn-bg-card);
  border-left: 3px solid var(--amn-gold);
  padding: 32px 36px 28px;
  margin: 36px 0 40px;
  border-radius: 0 4px 4px 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  color: var(--amn-text-body);
}

.hero-quote p {
  margin-bottom: 16px;
}

.hero-quote p:nth-last-of-type(2) {
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--amn-text);
  font-style: italic;
}

.hero-quote cite {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  font-style: normal;
  color: var(--amn-gold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--amn-border);
  padding-top: 14px;
  margin-top: 6px;
}

.hero-quote cite em {
  color: var(--amn-gold);
  font-style: normal;
}

/* ---- Diagnostic list ---- */
.diagnostic-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
  counter-reset: diag-counter;
}

.diagnostic-list li {
  counter-increment: diag-counter;
  position: relative;
  margin-bottom: 14px;
  padding: 20px 24px 20px 68px;
  background: var(--amn-bg-card);
  border-left: 2px solid var(--amn-olive);
  border-radius: 0 3px 3px 0;
  line-height: 1.68;
  color: var(--amn-text-body);
}

.diagnostic-list li::before {
  content: counter(diag-counter, upper-roman);
  position: absolute;
  left: 22px;
  top: 18px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--amn-gold);
}

.diagnostic-list li strong {
  color: var(--amn-olive);
  font-weight: 700;
  display: inline;
}

/* ---- Section cards (TOC / Infrastructure / FAQ) ---- */
.series-toc {
  background: transparent;
  border: none;
  margin-top: 72px;
  margin-bottom: 0;
}

.series-toc + .series-toc {
  margin-top: 56px;
}

.series-toc .section-header {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--amn-gold);
  text-align: center;
  padding: 0 0 14px 0;
  border: none;
  margin-bottom: 0;
  position: relative;
}

.series-toc .section-header::after {
  content: '';
  display: block;
  width: 56px;
  height: 1px;
  background: var(--amn-gold);
  margin: 14px auto 0;
  opacity: 0.5;
}

/* ---- TOC list ---- */
.toc-list {
  padding: 40px 0 0;
  max-width: 760px;
  margin: 0 auto;
}

.toc-entry {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 28px;
  padding: 32px 0 34px;
  border-bottom: 1px solid var(--amn-border-soft);
  align-items: start;
}

.toc-entry:last-child {
  border-bottom: none;
}

.toc-number {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 400;
  color: var(--amn-gold);
  line-height: 1;
  letter-spacing: 0.02em;
  text-align: right;
  padding-top: 4px;
}

.toc-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  color: var(--amn-text);
  line-height: 1.2;
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.toc-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.toc-title a:hover {
  color: var(--amn-gold);
  border-bottom-color: var(--amn-gold);
}

.toc-subtitle {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  color: var(--amn-olive);
  margin-bottom: 14px;
  line-height: 1.45;
}

.toc-excerpt {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.72;
  color: var(--amn-text-body);
  margin-bottom: 14px;
}

.toc-meta {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--amn-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.toc-meta a {
  color: var(--amn-gold);
  text-decoration: none;
  font-weight: 600;
}

.toc-meta a:hover {
  text-decoration: underline;
}

.toc-entry-held {
  opacity: 0.68;
}

.toc-entry-held .toc-number {
  color: var(--amn-text-muted);
}

.held-note {
  font-style: italic;
  color: var(--amn-olive);
  text-transform: none;
  letter-spacing: 0;
}

/* ---- Infrastructure section ---- */
.infrastructure-body {
  padding: 40px 0 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.76;
  color: var(--amn-text-body);
  max-width: 720px;
  margin: 0 auto;
}

.infrastructure-body h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--amn-text);
  margin-top: 32px;
  margin-bottom: 14px;
  letter-spacing: -0.005em;
}

.infrastructure-body h3:first-child {
  margin-top: 0;
}

.infrastructure-body p {
  margin-bottom: 16px;
}

.infrastructure-body .infra-list {
  list-style: none;
  padding-left: 0;
  margin: 16px 0 20px;
}

.infrastructure-body .infra-list li {
  padding: 16px 22px;
  background: var(--amn-bg-card);
  border-left: 2px solid var(--amn-gold);
  border-radius: 0 3px 3px 0;
  margin-bottom: 10px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--amn-text-body);
}

.infrastructure-body a,
.infrastructure-body .infra-list a {
  color: var(--amn-gold);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted var(--amn-gold);
}

.infrastructure-body a:hover,
.infrastructure-body .infra-list a:hover {
  border-bottom-style: solid;
}

/* ---- State list expander (<details>) ---- */
.state-list-expander {
  margin: 8px 0 24px;
  background: var(--amn-bg-card);
  border-left: 2px solid var(--amn-olive);
  border-radius: 0 3px 3px 0;
  padding: 0;
  overflow: hidden;
}

.state-list-expander > summary {
  cursor: pointer;
  padding: 14px 22px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amn-gold);
  list-style: none;
  -webkit-user-select: none;
  user-select: none;
}

.state-list-expander > summary::-webkit-details-marker { display: none; }

.state-list-expander > summary::before {
  content: '+';
  display: inline-block;
  width: 14px;
  color: var(--amn-gold);
  font-weight: 400;
}

.state-list-expander[open] > summary::before { content: '\2013'; }

.state-list-expander > summary:hover { color: var(--amn-text); }

.state-list-expander .state-list {
  list-style: none;
  padding: 6px 22px 18px;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px 20px;
}

.state-list-expander .state-list li {
  padding: 4px 0;
  font-family: var(--serif);
  font-size: 15px;
}

.state-list-expander .state-list a {
  color: var(--amn-text-body);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
}

.state-list-expander .state-list a:hover {
  color: var(--amn-gold);
  border-bottom-color: var(--amn-gold);
}

.state-list-expander .state-list-note {
  padding: 0 22px 18px;
  margin: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  color: var(--amn-text-muted);
  font-style: italic;
}

/* ---- FAQ ---- */
.faq-body {
  padding: 36px 0 0;
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--amn-border-soft);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--amn-text);
  margin-bottom: 10px;
  letter-spacing: -0.005em;
}

.faq-item p {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.72;
  color: var(--amn-text-body);
}

.faq-item a {
  color: var(--amn-gold);
  text-decoration: none;
  border-bottom: 1px dotted var(--amn-gold);
}

.faq-item a:hover {
  border-bottom-style: solid;
}

/* ---- Author signature block ---- */
.author-signature {
  margin-top: 64px;
  padding: 24px 0 24px 24px;
  border-left: 3px solid var(--amn-gold);
  font-family: var(--serif);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.author-signature .sig-name {
  font-size: 19px;
  color: var(--amn-text);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.author-signature .sig-role {
  font-size: 14.5px;
  color: var(--amn-text-body);
  font-style: italic;
  margin-bottom: 2px;
  display: block;
}

.author-signature a {
  color: var(--amn-gold);
  text-decoration: none;
  border-bottom: 1px dotted var(--amn-gold);
}

.author-signature a:hover {
  border-bottom-style: solid;
}

/* ---- Footer nav ---- */
.article-navigation {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 40px 0 20px !important;
  margin-top: 72px;
  display: flex;
  justify-content: center;
  gap: 32px;
  border-top: 1px solid var(--amn-border) !important;
}

.article-navigation .nav-link {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--amn-gold) !important;
  text-decoration: none;
  font-weight: 600;
}

.article-navigation .nav-link:hover {
  text-decoration: underline;
}

.site-footer {
  text-align: center;
  padding: 24px 0 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--amn-text-muted);
  letter-spacing: 0.04em;
}

.site-footer a {
  color: var(--amn-gold);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .page-container { padding: 20px 18px 48px; }
  .amn-masthead { padding: 28px 16px 24px; margin-bottom: 32px; }
  .amn-logo { font-size: 18px; letter-spacing: 0.5em; }
  .series-title { font-size: 36px; }
  .series-subtitle { font-size: 17px; }
  .series-body { font-size: 16.5px; padding: 36px 0 0; }
  .series-body h2 { font-size: 26px; margin-top: 40px; padding-top: 32px; }
  .hero-quote { padding: 22px 20px 20px; font-size: 16px; }

  .toc-list { padding: 28px 0 0; }
  .toc-entry { grid-template-columns: 46px 1fr; gap: 16px; padding: 24px 0 26px; }
  .toc-number { font-size: 28px; text-align: left; }
  .toc-title { font-size: 21px; }

  .infrastructure-body, .faq-body { padding: 28px 0 0; font-size: 16px; }
  .article-navigation { flex-direction: column; gap: 14px; padding: 32px 0 16px !important; }
}
