/*
Theme Name: Imperial Valley Case File Design V2
Theme URI: https://example.com/
Author: Codex
Description: WordPress theme for the Imperial Valley data center court-document microsite.
Version: 2.1.12
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: imperial-valley-case-file
*/

:root {
  color-scheme: light;
  --ink: #202124;
  --muted: #5f6368;
  --line: #d7dde2;
  --paper: #ffffff;
  --wash: #f5f7f9;
  --deep: #183642;
  --blue: #2b6cb0;
  --green: #1f7a5a;
  --gold: #9b6b19;
  --red: #a33832;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
}

a {
  color: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  margin: 2px 0 0;
  font-size: 20px;
  font-weight: 720;
}

.site-title-link {
  text-decoration: none;
}

.topbar nav,
.menu {
  display: flex;
  gap: 8px;
}

.menu {
  padding: 0;
  margin: 0;
  list-style: none;
}

.topbar nav a,
.menu a,
.source-link,
button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 8px 12px;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

button:hover,
.topbar nav a:hover,
.menu a:hover,
.source-link:hover {
  border-color: var(--blue);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 32px;
  min-height: 0;
  align-items: start;
  padding: 56px 32px 44px;
  color: white;
  background-color: var(--deep);
}

.hero-copy {
  max-width: 940px;
}

.case-number,
.eyebrow,
.tag {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow,
.hero .case-number {
  color: #cbd8dc;
}

.hero h2 {
  margin: 12px 0 14px;
  max-width: 980px;
  font-size: clamp(40px, 5.2vw, 68px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero p {
  font-size: 18px;
  line-height: 1.55;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-doc {
  width: 100%;
  height: 280px;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
}

.hero-doc p {
  margin: 0;
  padding: 18px;
  color: var(--muted);
}

.case-stats {
  display: grid;
  gap: 12px;
}

.case-stats div {
  padding: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
}

.case-stats span {
  display: block;
  font-size: 32px;
  font-weight: 800;
}

.case-stats p {
  margin: 6px 0 0;
  color: #dbe5e7;
  font-size: 14px;
}

.section {
  padding: 56px 32px;
}

.section-heading {
  max-width: 1120px;
  margin: 0 auto 24px;
}

.section-heading h2,
.viewer-copy h2 {
  margin: 6px 0 0;
  font-size: 30px;
}

.section-intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.revelation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto;
}

.revelation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 360px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.revelation h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
}

.revelation p:not(.tag) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.revelation button {
  margin-top: auto;
  align-self: flex-start;
}

.tag {
  color: var(--green);
}

.viewer-band {
  display: block;
  padding: 56px 32px;
  background: #e9eef2;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.viewer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: stretch;
  max-width: 760px;
  margin: 0 auto;
}

.viewer-copy {
  align-self: start;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.viewer-copy p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.55;
}

.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.source-link.is-missing {
  color: var(--red);
}

.pdf-viewer {
  width: 100%;
  height: 350px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline {
  max-width: 980px;
  margin: 0 auto;
  border-left: 3px solid var(--deep);
}

.timeline article {
  position: relative;
  padding: 0 0 30px 24px;
}

.timeline article::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 4px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 3px solid var(--deep);
}

.timeline time {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.timeline h3 {
  margin: 5px 0 6px;
  font-size: 20px;
}

.timeline p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mail-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  max-width: 1120px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.mail-list {
  display: grid;
  align-content: start;
  background: #eef3f7;
  border-right: 1px solid var(--line);
}

.mail-item {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 92px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.mail-item.is-active {
  background: var(--paper);
  border-left: 4px solid var(--blue);
}

.mail-item span,
.mail-item small {
  color: var(--muted);
}

.mail-reader {
  min-height: 340px;
  padding: 28px;
}

.mail-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.mail-meta h3 {
  margin: 0 0 6px;
  font-size: 24px;
}

.mail-meta p,
.mail-reader > p {
  color: var(--muted);
}

.mail-reader > p {
  max-width: 780px;
  margin: 24px 0;
  font-size: 18px;
  line-height: 1.65;
}

.doc-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  max-width: 1120px;
  margin: 0 auto 16px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  padding: 9px 12px;
  color: var(--ink);
  font: inherit;
}

.doc-list {
  display: grid;
  gap: 10px;
  max-width: 1120px;
  margin: 0 auto;
}

.doc-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 160px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.doc-row h3 {
  margin: 0 0 5px;
  font-size: 17px;
}

.doc-row p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.pill {
  display: inline-flex;
  justify-content: center;
  border-radius: 999px;
  background: #edf3f5;
  padding: 5px 9px;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.content-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 56px 24px;
}

.content-page h1 {
  font-size: 42px;
  line-height: 1.05;
}

.content-page .entry-content {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.posts-list {
  display: grid;
  gap: 18px;
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 24px;
}

.posts-list article {
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.posts-list h2 {
  margin: 0 0 8px;
}

.editable-section .editable-content {
  max-width: 980px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 24px;
}

.editable-section .editable-content > *:first-child {
  margin-top: 0;
}

.editable-section .editable-content > *:last-child {
  margin-bottom: 0;
}

.editable-section .editable-content a {
  color: var(--blue);
}

.callout-section {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.callout-section .editable-content {
  display: grid;
  gap: 16px;
}

.callout-section .wp-block-buttons {
  margin-top: 6px;
}

.updates-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0 18px;
}

.update-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  padding: 18px;
}

.update-card time {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.update-card h3 {
  margin: 0 0 8px;
}

.update-card h3 a {
  color: inherit;
  text-decoration: none;
}

.update-card h3 a:hover {
  color: var(--blue);
}

.update-card p {
  margin: 0;
  color: var(--muted);
}

/* Homepage section polish baked in so Additional CSS can stay nearly empty. */
.home .editable-section > .section-heading:first-child {
  display: none;
}

.home #revelations {
  padding-top: 48px;
}

.home #revelations .editable-content,
.home #timeline .editable-content,
.home #emails .editable-content,
.home #library .editable-content {
  width: 100%;
  max-width: 980px;
  margin: 0 auto 24px;
  text-align: left;
}

.home #revelations .revelation-grid {
  max-width: 1220px;
  text-align: left;
}

.source-custom-section .editable-content,
.source-compact {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
}

.source-compact {
  display: flex;
  flex-direction: column;
}

.source-compact-card {
  order: 1;
  margin-bottom: 18px;
  padding: 24px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.source-compact-card h2 {
  margin: 10px 0 14px;
  color: #27313a;
  font-size: 30px;
  line-height: 1.2;
}

.source-compact-card p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.source-compact-card a,
.source-compact-card .source-link,
.timeline .source-link,
.email-explainer-grid .source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.source-compact-pdf {
  order: 2;
  display: block;
  width: 100%;
  height: 350px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timeline-section .editable-content > .eyebrow,
.timeline-section .editable-content > h2 {
  width: 760px;
  max-width: calc(100vw - 64px);
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.timeline-section .editable-content > .timeline,
.timeline-section > .timeline {
  width: 760px;
  max-width: calc(100vw - 64px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 190px;
  border-left: 0;
  box-sizing: border-box;
  position: relative;
}

.timeline-section .editable-content > .timeline::before,
.timeline-section > .timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 170px;
  width: 3px;
  background: var(--deep);
}

.timeline-section .timeline article::before {
  left: -28px;
}

.timeline .source-link {
  margin-top: 10px;
}

.home #emails .editable-content > .eyebrow,
.home #emails .editable-content > h2,
.home #emails .email-explainer-grid,
.home #emails .mail-shell {
  width: 980px;
  max-width: calc(100vw - 40px);
  margin-left: auto;
  margin-right: auto;
}

.email-explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
  margin-bottom: 34px;
}

.email-explainer-grid article {
  display: flex;
  flex-direction: column;
  min-height: 250px;
  padding: 22px;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.email-kicker {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.email-explainer-grid h3 {
  margin: 0 0 10px;
  color: #27313a;
  font-size: 20px;
  line-height: 1.25;
}

.email-explainer-grid p {
  color: var(--muted);
  line-height: 1.55;
}

.email-explainer-grid .source-link {
  margin-top: auto;
}

.updates-donate-section {
  background: #eef4ea;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.updates-donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px;
  width: 1120px;
  max-width: calc(100vw - 40px);
  margin: 0 auto;
}

.support-stack {
  display: grid;
  gap: 20px;
}

.updates-donate-panel {
  padding: 24px;
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.updates-donate-panel .editable-content {
  max-width: none;
  margin: 0 0 18px;
}

.updates-donate-panel .updates-list {
  grid-template-columns: 1fr;
  margin: 18px 0;
}

.updates-donate-panel .update-card {
  background: var(--paper);
}

.donate-actions,
.newsletter-actions,
.support-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.support-links {
  margin-top: 14px;
}

.support-links .source-link {
  margin-top: 0;
}

.transparency-note {
  margin: 14px 0 0;
  padding: 12px;
  background: #f5f7f9;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.donate-button,
.newsletter-submit {
  border-color: var(--blue);
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
}

.donate-button:hover,
.newsletter-submit:hover {
  background: #174f86;
  border-color: #174f86;
  color: #ffffff;
}

.newsletter-form {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.newsletter-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
}

.newsletter-form input[type="email"],
.newsletter-form input[type="tel"] {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
}

.newsletter-consent {
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  font-weight: 500;
  line-height: 1.45;
}

.newsletter-consent input {
  margin: 3px 0 0;
}

.newsletter-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
}

.newsletter-message.is-success {
  background: #e6f4ec;
  color: #16613f;
}

.newsletter-message.is-error {
  background: #fdeceb;
  color: #9a2b25;
}

.newsletter-submit {
  width: fit-content;
  margin-top: 4px;
}

.newsletter-page .newsletter-form {
  margin-top: 22px;
}

.content-page .entry-content .faq-list {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.content-page .entry-content .faq-list details {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 18px;
}

.content-page .entry-content .faq-list summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.content-page .entry-content .faq-list details > :not(summary) {
  color: var(--muted);
  line-height: 1.6;
}

.forum-embed,
#bbpress-forums {
  margin-top: 22px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Document Library final layout */
#library {
  background: var(--wash);
}

#library .library-inner,
#library .doc-tools,
#library .doc-list {
  width: 980px;
  max-width: calc(100vw - 64px);
  margin-left: auto;
  margin-right: auto;
}

#library .library-heading {
  margin: 0 auto 18px;
  text-align: left;
}

#library .library-heading .eyebrow {
  margin: 0 0 8px;
  color: #27313a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

#library .library-heading h1,
#library .library-heading h2 {
  margin: 0;
  color: #0f1720;
  font-size: 24px;
  line-height: 1.15;
}

#library .doc-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 12px;
  margin-bottom: 12px;
}

#library .doc-tools input,
#library .doc-tools select {
  width: 100%;
  min-height: 36px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #ffffff;
  color: #27313a;
  padding: 8px 12px;
  font-size: 13px;
}

#library .doc-list {
  display: grid;
  gap: 8px;
}

#library .doc-row {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr) 140px;
  gap: 14px;
  align-items: center;
  min-height: 62px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #cfd8df;
  border-radius: 8px;
}

#library .doc-row .pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 86px;
  min-height: 22px;
  border-radius: 999px;
  background: #edf3f5;
  color: #10202b;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

#library .doc-row h3 {
  margin: 0 0 4px;
  color: #0f1720;
  font-size: 15px;
  line-height: 1.2;
}

#library .doc-row p {
  margin: 0;
  color: #4f5f6b;
  font-size: 14px;
  line-height: 1.4;
}

#library .doc-row .source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  justify-self: end;
  width: 132px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #cfd8df;
  border-radius: 6px;
  background: #ffffff;
  color: #0f1720;
  font-weight: 700;
  text-decoration: none;
}

#library .doc-row .source-link:hover {
  border-color: var(--blue);
  color: var(--blue);
}

@media (max-width: 920px) {
  .topbar,
  .hero,
  .viewer-inner,
  .mail-shell,
  .doc-row,
  .doc-tools,
  .updates-donate-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    position: static;
    align-items: start;
  }

  .topbar nav,
  .menu {
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
    padding-top: 40px;
  }

  .revelation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .updates-list {
    grid-template-columns: 1fr;
  }

  .timeline-section .editable-content > .timeline,
  .timeline-section > .timeline {
    padding-left: 24px;
  }

  .timeline-section .editable-content > .timeline::before,
  .timeline-section > .timeline::before {
    left: 0;
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero,
  .section,
  .viewer-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .revelation-grid {
    grid-template-columns: 1fr;
  }

  .pdf-viewer {
    height: 460px;
  }

  .email-explainer-grid {
    grid-template-columns: 1fr;
  }
}

/* Design Version 2 */
:root {
  --ink: #172027;
  --muted: #566775;
  --line: #cfdae2;
  --paper: #ffffff;
  --wash: #eef4f7;
  --deep: #12313d;
  --blue: #155fa8;
  --green: #197464;
  --gold: #a86614;
  --red: #a33832;
  --soft-blue: #e7f1f8;
  --soft-green: #e7f3ee;
  --soft-gold: #f7efe2;
  --shadow: 0 16px 36px rgba(16, 36, 48, 0.08);
  --shadow-soft: 0 8px 20px rgba(16, 36, 48, 0.06);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  background: var(--wash);
  color: var(--ink);
}

.topbar {
  align-items: center;
  padding: 14px 32px;
  background: rgba(250, 252, 253, 0.96);
  border-bottom: 1px solid rgba(207, 218, 226, 0.9);
  box-shadow: 0 8px 24px rgba(18, 49, 61, 0.05);
}

.topbar h1 {
  color: var(--ink);
  font-size: 22px;
  letter-spacing: 0;
}

.topbar nav,
.menu {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar nav a,
.menu a,
.source-link,
button {
  min-height: 38px;
  border-color: #c7d5df;
  border-radius: 8px;
  background: #ffffff;
  color: var(--deep);
  font-weight: 720;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

button:hover,
.topbar nav a:hover,
.menu a:hover,
.source-link:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-soft);
  transform: translateY(-1px);
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: 40px;
  padding: 72px 40px 58px;
  background: #102d38;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.hero-copy {
  max-width: 960px;
}

.hero .case-number {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #d8e7eb;
}

.hero h2 {
  max-width: 980px;
  margin: 18px 0 18px;
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1.06;
}

.hero p {
  max-width: 860px;
  color: #e4edf0;
  font-size: 20px;
}

.hero-panel {
  align-self: stretch;
}

.hero-doc {
  height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
}

.case-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.case-stats div {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(255, 255, 255, 0.2);
}

.section,
.viewer-band {
  padding: 68px 40px;
}

.section-heading {
  max-width: 1120px;
}

.section-heading h2,
.viewer-copy h2,
.content-page h1 {
  color: var(--ink);
  letter-spacing: 0;
}

.editable-section .editable-content {
  color: var(--muted);
}

.revelation-grid {
  gap: 18px;
}

.revelation,
.update-card,
.updates-donate-panel,
.source-compact-card,
.viewer-copy,
.mail-shell,
.posts-list article,
.content-page .entry-content .faq-list details,
.forum-embed,
#bbpress-forums {
  border-color: #cbd8e0;
  box-shadow: var(--shadow-soft);
}

.revelation {
  min-height: 330px;
  padding: 22px;
}

.revelation h3,
.update-card h3,
.email-explainer-grid h3 {
  color: #1f2a32;
}

.tag,
.email-kicker {
  color: var(--green);
}

.viewer-band {
  background: #e5edf2;
}

.viewer-inner {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  max-width: 1240px;
  gap: 22px;
}

.viewer-copy {
  align-self: start;
  padding: 24px;
}

.pdf-viewer {
  height: 640px;
  box-shadow: var(--shadow);
}

.timeline-section {
  background: #f7fafb;
}

.timeline-section .editable-content > .timeline,
.timeline-section > .timeline {
  width: 840px;
  padding-left: 210px;
}

.timeline-section .editable-content > .timeline::before,
.timeline-section > .timeline::before {
  left: 188px;
  width: 2px;
  background: #254653;
}

.timeline article {
  padding-bottom: 34px;
}

.timeline article::before {
  background: #f7fafb;
  border-color: #254653;
}

.timeline h3 {
  color: var(--ink);
}

.mail-shell {
  max-width: 1120px;
  border-radius: 8px;
}

.mail-list {
  background: #edf4f7;
}

.mail-item {
  padding: 14px 16px;
}

.mail-item.is-active {
  border-left-color: var(--green);
}

.mail-reader {
  background: #ffffff;
}

.updates-donate-section {
  background: #e7f0eb;
}

.updates-donate-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
  gap: 22px;
}

.updates-donate-panel {
  background: rgba(255, 255, 255, 0.86);
}

.donate-button,
.newsletter-submit {
  background: var(--green);
  border-color: var(--green);
}

.donate-button:hover,
.newsletter-submit:hover {
  background: #115c4f;
  border-color: #115c4f;
}

.transparency-note {
  background: #f8fbfc;
}

.newsletter-form input[type="email"],
.newsletter-form input[type="tel"],
input,
select {
  border-color: #c9d7e0;
  border-radius: 8px;
}

#library {
  background: #eef4f7;
}

#library .library-inner,
#library .doc-tools,
#library .doc-list {
  width: 1080px;
}

#library .library-heading h1,
#library .library-heading h2 {
  font-size: 30px;
}

#library .doc-row {
  grid-template-columns: 116px minmax(0, 1fr) 150px;
  min-height: 72px;
  border-color: #cbd8e0;
  box-shadow: 0 8px 20px rgba(16, 36, 48, 0.04);
}

#library .doc-row:hover {
  border-color: #9eb6c7;
}

#library .doc-row .pill {
  width: 92px;
  background: #e5f0f2;
}

#library .doc-row h3 {
  font-size: 16px;
}

#library .doc-row .source-link {
  width: 138px;
}

.content-page {
  max-width: 920px;
  padding-top: 68px;
}

.content-page article {
  padding: 28px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid #d7e1e8;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

@media (max-width: 920px) {
  .hero,
  .viewer-inner,
  .updates-donate-grid,
  .mail-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 46px;
  }

  .hero-doc,
  .pdf-viewer {
    height: 520px;
  }

  .case-stats {
    grid-template-columns: 1fr;
  }

  .timeline-section .editable-content > .timeline,
  .timeline-section > .timeline {
    width: 760px;
    padding-left: 28px;
  }

  .timeline-section .editable-content > .timeline::before,
  .timeline-section > .timeline::before {
    left: 2px;
  }
}

@media (max-width: 620px) {
  .topbar,
  .hero,
  .section,
  .viewer-band {
    padding-left: 20px;
    padding-right: 20px;
  }

  .hero h2 {
    font-size: 36px;
  }

  #library .doc-row,
  #library .doc-tools {
    grid-template-columns: 1fr;
  }

  #library .doc-row .source-link {
    justify-self: stretch;
    width: 100%;
  }
}

/* Modern theme layout fix: keep the hero from squeezing or sliding sideways. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body.admin-bar .topbar {
  top: 32px;
}

.topbar {
  flex-wrap: wrap;
  max-width: 100%;
}

.topbar > div,
.topbar nav,
.menu {
  min-width: 0;
  max-width: 100%;
}

.topbar nav {
  overflow-x: auto;
  scrollbar-width: none;
}

.topbar nav::-webkit-scrollbar {
  display: none;
}

.hero {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
}

.hero-doc {
  height: 500px;
  min-height: 500px;
}

.hero-copy,
.hero-panel,
.hero-doc {
  min-width: 0;
  max-width: 100%;
}

.hero h2 {
  max-width: 820px;
  font-size: clamp(34px, 4vw, 56px);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.hero-stats > .case-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.hero-stats > .case-stats > div,
.hero-stats > div:not(.case-stats) {
  min-width: 0;
  padding: 18px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.hero-stats span {
  display: block;
  color: #ffffff;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
}

.hero-stats p {
  margin: 8px 0 0;
  color: #dbe5e7;
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

@media screen and (max-width: 782px) {
  body.admin-bar .topbar {
    top: 46px;
  }
}

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

  .hero h2 {
    max-width: 100%;
  }

  .hero-doc {
    height: 500px;
    min-height: 440px;
  }
}

@media (max-width: 460px) {
  .hero-stats,
  .hero-stats > .case-stats {
    grid-template-columns: 1fr;
  }
}

/* Source viewer side-by-side page layout. */
.source-custom-section .editable-content {
  max-width: 1240px;
}

.source-compact.source-side-by-side {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
}

.source-compact.source-side-by-side .source-compact-card {
  order: initial;
  margin-bottom: 0;
}

.source-compact.source-side-by-side .source-compact-pdf {
  order: initial;
  min-width: 0;
  height: 640px;
}

.doc-empty {
  margin: 18px 0 0;
  padding: 18px;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

/* Baked-in primary support buttons: no Additional CSS needed. */
#donate .donate-button,
#newsletter .newsletter-submit,
.updates-donate-section .donate-button,
.updates-donate-section .newsletter-submit {
  background: #2fbf8f !important;
  border-color: #2fbf8f !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

#donate .donate-button:hover,
#newsletter .newsletter-submit:hover,
.updates-donate-section .donate-button:hover,
.updates-donate-section .newsletter-submit:hover {
  background: #249f77 !important;
  border-color: #249f77 !important;
  color: #ffffff !important;
}

/* Built-in directed forum */
.ivdc-forum {
  display: grid;
  gap: 18px;
}

.ivdc-forum-list,
.ivdc-forum-replies {
  display: grid;
  gap: 12px;
}

.ivdc-forum-topic,
.ivdc-forum-full-topic,
.ivdc-forum-reply,
.ivdc-forum-form,
.ivdc-forum-message,
.ivdc-forum-empty {
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.ivdc-forum-topic {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.ivdc-forum-area {
  display: inline-flex;
  width: max-content;
  margin: 0 0 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e8f1f4;
  color: var(--deep);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.ivdc-forum-topic h3,
.ivdc-forum-full-topic h3,
.ivdc-forum-replies h3 {
  margin: 0 0 8px;
}

.ivdc-forum-topic p,
.ivdc-forum-full-topic p,
.ivdc-forum-reply p {
  margin: 0 0 10px;
  color: var(--muted);
}

.ivdc-forum-topic small,
.ivdc-forum-full-topic small,
.ivdc-forum-reply small {
  color: #5f6b74;
  font-weight: 700;
}

.ivdc-forum-form {
  display: grid;
  gap: 12px;
}

.ivdc-forum-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

.ivdc-forum-form input,
.ivdc-forum-form select,
.ivdc-forum-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  font: inherit;
}

.ivdc-forum-hp {
  display: none !important;
}

.ivdc-forum-message.is-success {
  border-color: #2fbf8f;
}

.ivdc-forum-message.is-error {
  border-color: var(--red);
}

@media (max-width: 720px) {
  .ivdc-forum-topic {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .source-compact.source-side-by-side {
    grid-template-columns: 1fr;
  }

  .source-compact.source-side-by-side .source-compact-pdf {
    height: 520px;
  }
}

/* Follow section and dropdown navigation polish */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.hero-actions .source-link {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.hero-actions .source-link:hover {
  border-color: #fff;
  color: #fff;
}

.topbar .menu,
.topbar .menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.topbar .menu li {
  position: relative;
}

.topbar .menu > li {
  display: flex;
}

.topbar .menu .sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 190px;
  gap: 6px;
  padding: 8px;
  background: rgba(250, 252, 253, 0.98);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(20, 39, 50, 0.16);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.topbar .menu li:hover > .sub-menu,
.topbar .menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.topbar .menu .sub-menu a {
  justify-content: flex-start;
  width: 100%;
  white-space: nowrap;
}

.updates-donate-section {
  background: #e7f0eb;
}

.follow-heading {
  width: 1120px;
  max-width: calc(100vw - 48px);
  margin: 0 auto 20px;
  text-align: left;
}

.updates-donate-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch;
}

.updates-donate-panel {
  display: flex;
  flex-direction: column;
}

.updates-donate-panel .editable-content {
  margin-bottom: 16px;
}

.updates-donate-panel .updates-list {
  grid-template-columns: 1fr !important;
}

.updates-panel > .source-link {
  width: fit-content;
  margin-top: auto;
}

.newsletter-panel .newsletter-form {
  margin-top: auto;
}

.support-links {
  gap: 8px;
}

.support-links .source-link {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 14px;
  margin-top: 0;
}

.newsletter-panel .editable-content .source-link {
  margin-top: 0;
}

.newsletter-explainer {
  margin-top: 22px;
  padding: 16px;
  background: rgba(232, 241, 244, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.newsletter-explainer .eyebrow {
  margin-bottom: 8px;
}

.newsletter-explainer h3 {
  margin: 0 0 8px;
  font-size: 18px;
  line-height: 1.25;
}

.newsletter-explainer p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
}

.menu-auth-link > a {
  border-color: rgba(47, 191, 143, 0.5) !important;
  color: #116551 !important;
  font-weight: 800;
}

@media (max-width: 980px) {
  .updates-donate-grid {
    grid-template-columns: 1fr !important;
  }

  .topbar .menu .sub-menu {
    position: static;
    display: none;
    margin-top: 6px;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .topbar .menu li:hover > .sub-menu,
  .topbar .menu li:focus-within > .sub-menu {
    display: grid;
  }
}

.articles-section .editable-content,
.articles-list {
  max-width: 1120px;
  margin: 0 auto;
}

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

.article-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.article-card time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.article-card h3 a {
  text-decoration: none;
}

.article-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.article-card .source-link {
  margin-top: auto;
  align-self: flex-start;
}

@media (max-width: 760px) {
  .articles-list {
    grid-template-columns: 1fr;
  }
}
