:root {
  --bg-surface: #eef2ff;
  --bg-gradient: linear-gradient(180deg, #eef2ff 0%, #ffffff 60%, #f7fafc 100%);
  --ink: #0b172a;
  --muted: #475569;
  --accent: #0f172a;
  --accent-strong: #2563eb;
  --card: #ffffff;
  --card-alt: #f8fafc;
  --line: #d0d7e6;
  --border-muted: rgba(11, 23, 42, 0.1);
  --font-title: "Playfair Display", "Georgia", serif;
  --font-body: "Source Sans 3", "Inter", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg-gradient);
  min-height: 100vh;
  line-height: 1.7;
  font-size: 20px;
}

.hero {
  background: linear-gradient(145deg, #0a1c3a, #16274e 60%, #163054 100%);
  color: #f8fafc;
  padding: 48px 20px 36px;
  position: relative;
  text-align: center;
}

[data-theme='dark'] .hero,
body[data-theme='dark'] .hero,
body.theme-dark .hero {
  background: linear-gradient(145deg, #0b1220, #0f172a 60%, #0c1530 100%);
}

[data-theme='dark'] .hero,
body[data-theme='dark'] .hero {
  background: linear-gradient(145deg, #0b1220, #0f172a 60%, #111c32 100%);
}

.hero-title {
  max-width: 760px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  margin: 0 0 8px;
  color: rgba(248, 250, 252, 0.7);
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4vw, 48px);
  font-family: var(--font-title);
}

.subtitle {
  margin: 8px 0 0;
  font-size: 1rem;
  color: rgba(248, 250, 252, 0.85);
}

.theme-toggle {
  border: 1px solid rgba(248, 250, 252, 0.4);
  background: rgba(248, 250, 252, 0.08);
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.header-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: absolute;
  top: 28px;
  right: 28px;
}

.header-link {
  color: rgba(248, 250, 252, 0.8);
  font-size: 0.85rem;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid rgba(248, 250, 252, 0.3);
  border-radius: 4px;
  transition: background 0.2s;
}

.header-link:hover {
  background: rgba(248, 250, 252, 0.15);
  color: #fff;
}

/* Dark mode for header link */
[data-theme='dark'] .header-link,
body[data-theme='dark'] .header-link {
  color: rgba(248, 250, 252, 0.8);
  border-color: rgba(148, 163, 184, 0.3);
}

[data-theme='dark'] .header-link:hover,
body[data-theme='dark'] .header-link:hover {
  background: rgba(148, 163, 184, 0.2);
  color: #fff;
}

.hero-meta {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.95rem;
  color: rgba(248, 250, 252, 0.8);
  justify-content: center;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 64px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cover,
.panel,
.burden-panel,
.exhibit-library,
.doc-windows article {
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 25px 45px rgba(15, 23, 42, 0.08);
}

.cover {
  padding: 22px;
  background: var(--card-alt);
}

.cover-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 26px;
}

.cover-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.inline-link {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.panel {
  padding: 20px;
}

.panel h2 {
  margin-top: 0;
  font-family: var(--font-title);
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.panel ul {
  padding-left: 20px;
}

.panel li {
  margin-bottom: 12px;
  font-size: 0.98rem;
}

.cite {
  display: inline;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-strong);
  font-weight: 600;
}

.panel li .cite-doc {
  margin: 0 4px 0 2px;
}

.cite-doc {
  font: inherit;
  font-size: 0.85rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent-strong);
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  display: inline;
  white-space: nowrap;
  text-decoration: underline;
}

.cite-doc:hover {
  color: var(--accent-strong);
  background: none;
}

/* Document Navigation Bar - applies to all HTML documents */
.doc-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  background: #000080;
  padding: 10px 20px;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.doc-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 14px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
}

.doc-nav a:hover {
  background: rgba(255,255,255,0.2);
}

.doc-nav-toggle {
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 5px 12px;
  border-radius: 4px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
}

.doc-nav-toggle:hover {
  background: rgba(255,255,255,0.2);
}

.docx-html {
  padding-top: 20px;
}

/* Dark mode for nav bar */
[data-theme='dark'] .doc-nav,
body[data-theme='dark'] .doc-nav {
  background: #0f172a;
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

[data-theme='dark'] .doc-nav a {
  border-color: rgba(148, 163, 184, 0.4);
}

[data-theme='dark'] .doc-nav a:hover {
  background: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .doc-nav-toggle,
body[data-theme='dark'] .doc-nav-toggle {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(148, 163, 184, 0.15);
  color: #e2e8f0;
}

[data-theme='dark'] .doc-nav-toggle:hover,
body[data-theme='dark'] .doc-nav-toggle:hover {
  background: rgba(148, 163, 184, 0.25);
}

.burden-panel {
  padding: 18px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
}

.burden-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.burden-grid article {
  padding: 12px 14px;
  background: var(--card-alt);
  border: 1px solid rgba(37, 99, 235, 0.18);
  min-height: 160px;
  color: var(--ink);
}

.burden-grid h3 {
  margin-top: 0;
  font-family: var(--font-title);
  color: var(--ink);
}

.burden-grid article p {
  color: var(--muted);
}

.burden-evidence a {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.2);
  text-decoration: none;
  color: var(--accent-strong);
  font-weight: 700;
  margin-right: 6px;
  margin-top: 6px;
}

.burden-footnote {
  margin-top: 12px;
  font-size: 0.9rem;
}

.exhibit-library {
  padding: 22px;
}

.library-header {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
}

.library-intro {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.library-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  justify-self: stretch;
}

.search-field--prominent {
  align-self: stretch;
}

.search-field input {
  border-radius: 999px;
  border: 2px solid var(--line);
  padding: 14px 20px;
  font-size: 1.05rem;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.suggestions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.suggestion {
  padding: 10px 14px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  min-height: 90px;
}

.suggestion small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}

.suggestion--dim {
  opacity: 0.6;
}

.exhibit-results {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.exhibit-list {
  margin-top: 18px;
}

.exhibit-list__items {
  margin: 10px 0 0;
  padding-left: 24px;
  display: grid;
  gap: 8px;
}

.exhibit-list__link {
  border: none;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  margin-right: 8px;
}

.exhibit-card {
  border: 1px solid var(--border-muted);
  padding: 12px 14px 10px;
  border-radius: 14px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

@media (max-width: 1100px) {
  .suggestions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .suggestions {
    grid-template-columns: 1fr;
  }

  .library-subtitle {
    white-space: normal;
  }
}

.exhibit-card__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.exhibit-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.badge-link {
  cursor: pointer;
  font-weight: 700;
}

.exhibit-title-link {
  all: unset;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.exhibit-title-link:hover {
  text-decoration: underline;
}

.exhibit-actions {
  display: none;
}

.preview-btn {
  margin-left: auto;
}

.exhibit-card .badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.exhibit-card p {
  margin: 2px 0 0;
  line-height: 1.5;
}

.exhibit-card .badge,
.exhibit-card .badge-soft {
  line-height: 1.2;
}

.exhibit-card .badge-soft {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--accent-strong);
}

.btn {
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: #fff;
  border: none;
  cursor: pointer;
}

.inline-link {
  font-weight: 600;
}

/* Dark mode overrides - must come after light mode variables */
:root[data-theme='dark'],
[data-theme='dark'] body,
body[data-theme='dark'],
body.theme-dark {
  --bg-gradient: linear-gradient(180deg, #050b18 0%, #0a1128 60%, #0f1629 100%);
  --ink: #f8fafc;
  --muted: rgba(203, 213, 225, 0.72);
  --accent: #94a3b8;
  --accent-strong: #60a5fa;
  --card: #0b1220;
  --card-alt: #111827;
  --line: rgba(148, 163, 184, 0.15);
  --border-muted: rgba(148, 163, 184, 0.08);
}

:root[data-theme='dark'],
[data-theme='dark'] body,
body[data-theme='dark'],
body.theme-dark {
  background: var(--bg-gradient);
  color: var(--ink);
}

:root[data-theme='dark'] .exec-summary-panel,
[data-theme='dark'] .exec-summary-panel,
body[data-theme='dark'] .exec-summary-panel,
body.theme-dark .exec-summary-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

:root[data-theme='dark'] .exec-summary-panel h2,
[data-theme='dark'] .exec-summary-panel h2,
body[data-theme='dark'] .exec-summary-panel h2,
body.theme-dark .exec-summary-panel h2 {
  color: #f8fafc;
}

:root[data-theme='dark'] .exec-summary-panel p,
[data-theme='dark'] .exec-summary-panel p,
body[data-theme='dark'] .exec-summary-panel p,
body.theme-dark .exec-summary-panel p {
  color: #cbd5e1;
}

/* PDF Viewer Page */
.pdf-viewer-page {
  padding: 100px 20px 20px;
}

.pdf-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: calc(100vh - 120px);
}

.pdf-container object {
  width: 100%;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-viewer-page img {
  max-width: 100%;
  height: auto;
}

[data-theme='dark'] .pdf-container object,
body[data-theme='dark'] .pdf-container object {
  border-color: rgba(148, 163, 184, 0.2);
}

/* PDF embed styling */
.pdf-embed,
object[type="application/pdf"] {
  width: 100%;
  max-width: 1000px;
  height: 75vh;
  margin: 0 auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
}

[data-theme='dark'] .pdf-embed,
[data-theme='dark'] object[type="application/pdf"],
body[data-theme='dark'] .pdf-embed,
body[data-theme='dark'] object[type="application/pdf"] {
  border-color: rgba(148, 163, 184, 0.2);
}

:root[data-theme='dark'] .cover,
[data-theme='dark'] .cover,
body[data-theme='dark'] .cover,
body.theme-dark .cover {
  background: var(--card-alt);
  border-color: var(--line);
}

:root[data-theme='dark'] .cover-label,
[data-theme='dark'] .cover-label,
body[data-theme='dark'] .cover-label,
body.theme-dark .cover-label {
  color: rgba(203, 213, 225, 0.7);
}

:root[data-theme='dark'] .panel,
[data-theme='dark'] .panel,
body[data-theme='dark'] .panel,
body.theme-dark .panel {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme='dark'] .panel h2,
[data-theme='dark'] .panel h2,
body[data-theme='dark'] .panel h2,
body.theme-dark .panel h2 {
  color: #f8fafc;
}

:root[data-theme='dark'] .panel li,
[data-theme='dark'] .panel li,
body[data-theme='dark'] .panel li,
body.theme-dark .panel li {
  color: #cbd5e1;
}

:root[data-theme='dark'] .burden-panel,
[data-theme='dark'] .burden-panel,
body[data-theme='dark'] .burden-panel,
body.theme-dark .burden-panel {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme='dark'] .burden-panel h2,
[data-theme='dark'] .burden-panel h2,
body[data-theme='dark'] .burden-panel h2,
body.theme-dark .burden-panel h2 {
  color: #f8fafc;
}

:root[data-theme='dark'] .burden-grid article,
[data-theme='dark'] .burden-grid article,
body[data-theme='dark'] .burden-grid article,
body.theme-dark .burden-grid article {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.25);
  color: #e2e8f0;
}

:root[data-theme='dark'] .burden-grid article h3,
[data-theme='dark'] .burden-grid article h3,
body[data-theme='dark'] .burden-grid article h3,
body.theme-dark .burden-grid article h3 {
  color: #f8fafc;
}

:root[data-theme='dark'] .burden-grid article p,
[data-theme='dark'] .burden-grid article p,
body[data-theme='dark'] .burden-grid article p,
body.theme-dark .burden-grid article p {
  color: rgba(203, 213, 225, 0.8);
}

:root[data-theme='dark'] .exhibit-card,
[data-theme='dark'] .exhibit-card,
body[data-theme='dark'] .exhibit-card,
body.theme-dark .exhibit-card {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme='dark'] .exhibit-card h3,
[data-theme='dark'] .exhibit-card h3,
body[data-theme='dark'] .exhibit-card h3,
body.theme-dark .exhibit-card h3 {
  color: #f8fafc;
}

:root[data-theme='dark'] .exhibit-card p,
[data-theme='dark'] .exhibit-card p,
body[data-theme='dark'] .exhibit-card p,
body.theme-dark .exhibit-card p {
  color: #cbd5e1;
}

:root[data-theme='dark'] .exhibit-card .badge,
[data-theme='dark'] .exhibit-card .badge,
body[data-theme='dark'] .exhibit-card .badge,
body.theme-dark .exhibit-card .badge {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

:root[data-theme='dark'] .suggestion,
[data-theme='dark'] .suggestion,
body[data-theme='dark'] .suggestion,
body.theme-dark .suggestion {
  background: var(--card);
  border-color: var(--line);
  color: var(--ink);
}

:root[data-theme='dark'] .suggestion small,
[data-theme='dark'] .suggestion small,
body[data-theme='dark'] .suggestion small,
body.theme-dark .suggestion small {
  color: var(--muted);
}

:root[data-theme='dark'] .search-field,
[data-theme='dark'] .search-field,
body[data-theme='dark'] .search-field,
body.theme-dark .search-field {
  color: #cbd5e1;
}

:root[data-theme='dark'] .search-field input,
[data-theme='dark'] .search-field input,
body[data-theme='dark'] .search-field input,
body.theme-dark .search-field input {
  background: var(--card-alt);
  border-color: var(--line);
  color: #f8fafc;
}

:root[data-theme='dark'] .inline-link,
[data-theme='dark'] .inline-link,
body[data-theme='dark'] .inline-link,
body.theme-dark .inline-link {
  color: var(--accent-strong);
}

:root[data-theme='dark'] .burden-evidence a,
[data-theme='dark'] .burden-evidence a,
body[data-theme='dark'] .burden-evidence a,
body.theme-dark .burden-evidence a {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.4);
  color: #60a5fa;
}

:root[data-theme='dark'] .cite,
[data-theme='dark'] .cite,
body[data-theme='dark'] .cite,
body.theme-dark .cite {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

:root[data-theme='dark'] .cite-doc,
[data-theme='dark'] .cite-doc,
body[data-theme='dark'] .cite-doc,
body.theme-dark .cite-doc {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(37, 99, 235, 0.2);
  color: #60a5fa;
}

/* Document Viewer page styles */
.doc-viewer-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 40px;
}

.doc-viewer-page #content {
  position: relative;
}

.exhibit-overlay {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  pointer-events: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
}

.exhibit-overlay--hidden {
  display: none;
}

.doc-viewer-page h1 {
  color: #000080;
  border-bottom: 2px solid #000080;
  padding-bottom: 10px;
}

.doc-viewer-page .doc-list {
  list-style: none;
  padding: 0;
}

.doc-viewer-page .doc-list li {
  padding: 12px 16px;
  margin: 8px 0;
  background: #fff;
  border: 1px solid #d0d7e6;
  border-radius: 8px;
}

.doc-viewer-page .doc-list li:hover {
  background: #f0f7ff;
}

.doc-viewer-page .doc-list a {
  color: #0000cc;
  text-decoration: underline;
  font-weight: 500;
}

.doc-viewer-page .back-link {
  display: inline-block;
  margin-top: 20px;
  color: #0000cc;
  text-decoration: underline;
}

/* Dark mode for doc viewer */
[data-theme='dark'] .doc-viewer-page h1,
body[data-theme='dark'] .doc-viewer-page h1 {
  color: #60a5fa;
  border-bottom-color: rgba(96, 165, 250, 0.5);
}

[data-theme='dark'] .doc-viewer-page .doc-list li,
body[data-theme='dark'] .doc-viewer-page .doc-list li {
  background: #0f172a;
  border-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .doc-viewer-page .doc-list li:hover,
body[data-theme='dark'] .doc-viewer-page .doc-list li:hover {
  background: rgba(37, 99, 235, 0.15);
}

[data-theme='dark'] .doc-viewer-page .doc-list a,
body[data-theme='dark'] .doc-viewer-page .doc-list a {
  color: #60a5fa;
}

[data-theme='dark'] .doc-viewer-page .back-link,
body[data-theme='dark'] .doc-viewer-page .back-link {
  color: #60a5fa;
}
.exec-summary-panel {
  max-width: 1100px;
  margin: 0 auto 0;
  padding: 24px 28px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
  text-align: left;
}

.exec-summary-panel h2 {
  margin-top: 0;
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0b1220;
}

.exec-summary-panel p {
  margin: 12px 0 0;
  color: #111827;
}

/* Email chain styling */
.docx-html {
  background: #f5f5f5;
  padding: 24px;
  font-family: "Source Sans 3", "Inter", system-ui, sans-serif;
}

.docx-html .docx-page {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 32px;
}

.docx-html h1 {
  font-size: 1.25rem;
  color: #1a1a1a;
  border-bottom: 2px solid #2563eb;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.docx-html p {
  margin: 8px 0;
  line-height: 1.6;
  color: #333;
}

.docx-html.docx-email p:has(+ p:not(:empty)) + p:empty + p {
  margin-top: 16px;
}

.docx-html.docx-email p:first-of-type:not(:only-child) {
  background: #f0f7ff;
  padding: 12px 16px;
  border-left: 4px solid #2563eb;
  border-radius: 0 4px 4px 0;
  font-weight: 600;
  color: #1e40af;
}

.docx-html.docx-email p:nth-of-type(2) {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 16px;
}

.docx-html.docx-email p:nth-of-type(3) {
  font-weight: 600;
  color: #1a1a1a;
}

.docx-html.docx-email p:nth-of-type(4) {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docx-html.docx-email p:nth-of-type(5) {
  font-weight: 600;
  color: #1a1a1a;
}

.docx-html.docx-email p:nth-of-type(6) {
  color: #666;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.docx-html.docx-email p:nth-of-type(7) {
  font-weight: 600;
  color: #1a1a1a;
}

.docx-html.docx-email > p:nth-of-type(8) {
  font-weight: 600;
  color: #1a1a1a;
}

.docx-html.docx-email p:nth-of-type(n+9):nth-of-type(-n+13) {
  padding-left: 0;
  border-left: none;
  margin-left: 0;
}

.docx-html.docx-email > p:last-of-type {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.docx-html.docx-email p:last-of-type + p {
  margin-top: 8px;
}

.docx-html.docx-report {
  background: #f8fafc;
}

.docx-html.docx-report .docx-page {
  max-width: 860px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  padding: 36px 40px;
}

.docx-html.docx-report h1 {
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
  color: #0f172a;
}

.docx-html.docx-report p {
  margin: 12px 0;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.65;
}

/* Dark mode for emails */
[data-theme='dark'] .docx-html,
body[data-theme='dark'] .docx-html {
  background: #0a0f1a;
}

[data-theme='dark'] .docx-html .docx-page,
body[data-theme='dark'] .docx-html .docx-page {
  background: #111827;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme='dark'] .docx-html h1,
body[data-theme='dark'] .docx-html h1 {
  color: #f8fafc;
  border-bottom-color: #60a5fa;
}

[data-theme='dark'] .docx-html p,
body[data-theme='dark'] .docx-html p {
  color: #cbd5e1;
}

[data-theme='dark'] .docx-html.docx-email p:first-of-type:not(:only-child),
body[data-theme='dark'] .docx-html.docx-email p:first-of-type:not(:only-child) {
  background: rgba(37, 99, 235, 0.2);
  color: #93c5fd;
  border-left-color: #60a5fa;
}

[data-theme='dark'] .docx-html.docx-email p:nth-of-type(2),
[data-theme='dark'] .docx-html.docx-email p:nth-of-type(4),
[data-theme='dark'] .docx-html.docx-email p:nth-of-type(6),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(2),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(4),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(6) {
  color: #94a3b8;
}

[data-theme='dark'] .docx-html.docx-email p:nth-of-type(3),
[data-theme='dark'] .docx-html.docx-email p:nth-of-type(5),
[data-theme='dark'] .docx-html.docx-email p:nth-of-type(7),
[data-theme='dark'] .docx-html.docx-email > p:nth-of-type(8),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(3),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(5),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(7),
body[data-theme='dark'] .docx-html.docx-email > p:nth-of-type(8) {
  color: #f8fafc;
}

[data-theme='dark'] .docx-html.docx-email p:nth-of-type(n+9):nth-of-type(-n+13),
body[data-theme='dark'] .docx-html.docx-email p:nth-of-type(n+9):nth-of-type(-n+13) {
  border-left-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .docx-html.docx-email > p:last-of-type,
body[data-theme='dark'] .docx-html.docx-email > p:last-of-type {
  border-top-color: rgba(148, 163, 184, 0.2);
}

[data-theme='dark'] .docx-html.docx-report,
body[data-theme='dark'] .docx-html.docx-report {
  background: #0b1220;
}

[data-theme='dark'] .docx-html.docx-report .docx-page,
body[data-theme='dark'] .docx-html.docx-report .docx-page {
  background: #0f172a;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] .docx-html.docx-report h1,
body[data-theme='dark'] .docx-html.docx-report h1 {
  color: #f8fafc;
  border-bottom-color: rgba(148, 163, 184, 0.3);
}

[data-theme='dark'] .docx-html.docx-report p,
body[data-theme='dark'] .docx-html.docx-report p {
  color: #e2e8f0;
}

[data-theme='dark'] .exec-summary-panel,
body[data-theme='dark'] .exec-summary-panel,
body.theme-dark .exec-summary-panel {
  background: #0f172a;
  color: #e2e8f0;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

[data-theme='dark'] .exec-summary-panel h2,
body[data-theme='dark'] .exec-summary-panel h2,
body.theme-dark .exec-summary-panel h2 {
  color: #f8fafc;
}

[data-theme='dark'] .exec-summary-panel p,
body[data-theme='dark'] .exec-summary-panel p,
body.theme-dark .exec-summary-panel p {
  color: #cbd5e1;
}
