@import url("https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;

  --font-heading: "Lora", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;

  --border-radius: 12px;
  --border-width: 1px;

  /* CASPR-like palette (warm off-white + soft blue/purple accent) */
  --bg-body: #fdfbf7;
  --bg-card: #fdfbf7;
  --bg-muted: #f5f7fa;

  --text-main: #263238;
  --text-muted: #546e7a;

  --border-color: #e8eaed;
  --s200: #e7e5e4;
  --s400: #a8a29e;
  --s800: #292524;
  --s900: #1c1917;

  --accent-color: #5f68d4;
  --accent-hover: #6b73d9;

  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-weight: 450;
  font-size: 17px;
  background: var(--bg-body);
  color: var(--text-main);
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.caspr-logo {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 24px 16px 0;
}

.caspr-logo img {
  height: 100px;
  width: auto;
  display: block;
  max-width: 100%;
  object-fit: contain;
}

@media (max-width: 480px) {
  .caspr-logo img {
    height: 80px;
  }
}

.container {
  max-width: 940px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.nav-bar {
  background: var(--bg-body);
  border-bottom: 1px solid var(--s200);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100px;
}

.nav-logo img {
  height: 42px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 2px;
  background: rgb(224, 233, 255);
  border-radius: 8px;
  padding: 4px;
}

.nav-links a,
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--s800);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  transition:
    background 0.15s,
    color 0.15s;
  border: none;
}

.nav-links a:hover,
.nav__link:hover {
  background: rgba(255, 255, 255, 0.5);
  color: var(--s900);
  text-decoration: none;
}

.nav__link--active {
  background: #fff;
  color: var(--s900) !important;
  font-weight: 600;
}

@media (max-width: 720px) {
  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 10px 0;
    gap: 8px;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-links a,
  .nav__link {
    font-size: 13px;
    padding: 6px 8px;
  }
}

.overview-body {
  font-size: 17px;
}

.overview-body h1 {
  margin-bottom: 6px;
}

.overview-subheadline {
  margin: 0 0 18px;
  text-align: center;
  color: #37474f;
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
}

.overview-priorities {
  margin-left: 2.25rem;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  margin: 8px 0 10px;
  text-align: center;
  font-size: clamp(1.65rem, 3.3vw, 2.05rem);
  font-weight: 400;
  color: var(--text-main);
}

h2 {
  margin: 2.25rem 0 0.9rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-main);
}

.overview-section-title-lg {
  font-size: 1.5rem;
}

h3 {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
}

p {
  margin: 0.8rem 0;
}

.overview-intro {
  font-weight: 400;
  line-height: calc(1.55em - 1px);
}

/* Fallback for stale-cached HTML that may be missing .overview-intro */
.overview-body h2:first-of-type + p {
  font-weight: 400;
  line-height: calc(1.55em - 1px);
}

.overview-policy-copy,
.overview-policy-copy li {
  font-weight: 400;
  line-height: calc(1.55em - 1px);
}

ul,
ol {
  margin: 0.8rem 0 0.8rem 1.25rem;
  padding: 0;
}

li {
  margin: 0.5rem 0;
}

a {
  color: var(--accent-color);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:visited {
  color: var(--accent-color);
}

code {
  font-family: var(--font-mono);
  font-size: 0.95em;
  background: rgba(95, 104, 212, 0.08);
  border: 1px solid rgba(95, 104, 212, 0.16);
  padding: 0.08em 0.35em;
  border-radius: 8px;
}

.meta {
  color: var(--text-muted);
  margin: 0 0 1.1rem;
  text-align: center;
}

.draft-support-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0.25rem 0 1rem;
}

.draft-support-row .bill-download {
  margin-left: auto;
}

.draft-support {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  flex: 1 1 520px;
}

.back-link {
  margin: 0 0 1rem;
}

.back-link a {
  display: inline-block;
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-muted);
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
}

.back-link a:hover {
  text-decoration: none;
  background: #eef2f7;
}

.panel {
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-muted);
  padding: 16px 18px;
  border-radius: var(--border-radius);
}

.panel ul,
.panel ol {
  margin: 0.6rem 0 0.6rem 1.2rem;
}

.rationale {
  border: var(--border-width) solid var(--border-color);
  border-left: 6px solid var(--accent-color);
  background: rgba(95, 104, 212, 0.06);
  padding: 16px 18px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin: 1.25rem 0 0;
}

.rationale + h2 {
  margin-top: 1.75rem;
}

.rationale__summary {
  margin: 0 0 0.75rem;
  color: var(--text-main);
}

.rationale__bullets {
  margin: 0.6rem 0 0.6rem 1.2rem;
}

.rationale__sources-title {
  margin: 0.9rem 0 0.45rem;
  font-weight: 700;
  color: var(--text-main);
}

.rationale__sources {
  margin: 0.4rem 0 0 1.2rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.rationale__sources li {
  margin: 0.35rem 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 880px) {
  .grid.two {
    grid-template-columns: 1fr 1fr;
  }
}

.bill {
  border: var(--border-width) solid var(--border-color);
  background: #ffffff;
  color: #111111;
  padding: 16px 18px;
  border-radius: var(--border-radius);
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow);
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.35;
}

.bill-block {
  margin: 0;
}

.bill-block__actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 8px;
}

.bill-download {
  display: inline-flex;
  align-items: center;
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-muted);
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}

.bill-download::after {
  content: "↓";
  margin-left: 0.4rem;
  line-height: 1;
  opacity: 0.9;
}

.bill-download:hover {
  text-decoration: none;
  background: #eef2f7;
}

.note {
  border-left: 4px solid var(--accent-color);
  background: rgba(95, 104, 212, 0.06);
  border-radius: var(--border-radius);
  padding: 12px 14px;
  color: var(--text-muted);
}

.badge {
  display: inline-block;
  border: var(--border-width) solid var(--border-color);
  background: var(--bg-muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.toc a {
  text-decoration: none;
}

.toc {
  font-size: 1.05rem;
}

.toc ul {
  font-size: 0.98em;
}

.toc > li > a {
  font-weight: 700;
  font-size: calc(1em + 3px);
}

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

.footer {
  margin-top: 2.25rem;
  padding-top: 1rem;
  border-top: var(--border-width) solid var(--border-color);
  color: var(--text-muted);
}

.footer__org {
  margin-top: 1.25rem;
  font-size: 0.95rem;
}

.footer h3 {
  margin-top: 0;
}

.footer p + h3 {
  margin-top: 1rem;
}

.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 2rem;
  font-size: 13px;
  color: var(--s400);
  text-align: center;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

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

.editorial-footer {
  background: linear-gradient(135deg, #5a68d8 0%, #7a88e8 100%);
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 40px 40px;
  font-size: 14px;
  line-height: 1.7;
  font-family: var(--font-body);
}

.editorial-footer a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.editorial-footer a:hover {
  color: #fff;
  text-decoration: none;
}

.editorial-footer .footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.editorial-footer p {
  margin: 4px 0;
  color: rgba(255, 255, 255, 0.7);
}

.editorial-footer .footer-bottom {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 640px) {
  .editorial-footer {
    padding: 40px 16px 28px;
  }

  .editorial-footer .footer-top {
    flex-direction: column;
  }
}
