/* Derailing For Dummies */
:root {
  --brand: #0f5c8c;
  --brand-dark: #0b2545;
  --brand-soft: #e8f1f8;
  --ink: #1c2430;
  --muted: #4a5568;
  --line: #d3dfea;
  --bg: #f4f7fa;
  --card: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(11, 37, 69, 0.08);
  --max: 1120px;
  --rail: 300px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  flex-wrap: wrap;
}
.logo {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo span { color: var(--brand); }
.nav { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; align-items: center; }
.nav a, .nav summary {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}
.nav a:hover, .nav a[aria-current="page"], .nav summary:hover { color: var(--brand-dark); }
.nav-toggle {
  display: none;
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}
.nav-drop { position: relative; }
.nav-drop summary { cursor: pointer; list-style: none; }
.nav-drop summary::-webkit-details-marker { display: none; }
.nav-drop summary::after { content: " ▾"; font-size: 0.75em; }
.nav-drop-panel {
  display: none;
  position: absolute;
  top: 1.6rem;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 16rem;
  max-height: 70vh;
  overflow: auto;
  padding: 0.4rem 0;
  box-shadow: var(--shadow);
  z-index: 20;
}
.nav-label {
  margin: 0.45rem 0.85rem 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.nav-drop[open] .nav-drop-panel { display: block; }
.nav-drop-panel a { display: block; padding: 0.35rem 0.85rem; font-weight: 550; }

.hero-banner {
  background: url("/images/banner.svg") center/cover no-repeat, linear-gradient(135deg, #231a35, #3a2346);
  border-bottom: 1px solid var(--line);
  min-height: 300px;
  display: flex;
  align-items: flex-start;
  padding: 1.75rem 0 2rem;
  text-align: center;
}
.hero-banner .container { display: flex; justify-content: center; }
.hero-box {
  display: inline-block;
  background: rgba(255, 255, 255, 0.82);
  border-radius: 12px;
  padding: 0.7rem 1.4rem 0.8rem;
  box-shadow: 0 6px 18px rgba(11, 37, 69, 0.15);
}
.hero-banner h1, .hero-banner .hero-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.6rem, 3.6vw, 2.25rem);
  letter-spacing: -0.03em;
  color: var(--ink);
}
.hero-banner .tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--brand);
  font-weight: 650;
}

.page-wrap { padding: 2rem 0 3rem; }
.layout {
  display: grid;
  grid-template-columns: 1fr var(--rail);
  gap: 2rem;
  align-items: start;
}
.main-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 2rem;
  box-shadow: var(--shadow);
}
.main-content h2, .main-content h3 { line-height: 1.25; letter-spacing: -0.02em; }
.main-content h2 { margin-top: 1.75rem; font-size: 1.32rem; color: var(--brand-dark); }
.main-content h3 { margin-top: 1.25rem; font-size: 1.08rem; }
.main-content p, .main-content li { color: var(--ink); }
.main-content ul, .main-content ol { padding-left: 1.25rem; }
.main-content li { margin-bottom: 0.4rem; }
.lead { font-size: 1.08rem; color: var(--muted); }
.sources { font-size: 0.92rem; }
.sources li { margin-bottom: 0.35rem; }
.notice {
  background: #f4f8fb;
  border: 1px solid #d5e0e6;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
}

.site-rail {
  position: sticky;
  top: 4.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.site-rail h2 {
  margin: 0.85rem 0 0.35rem;
  font-size: 1.05rem;
}
.site-rail h2:first-child { margin-top: 0; }

.notice-soft {
  background: var(--brand-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin: 1rem 0;
}


.site-footer {
  background: #0b2545;
  color: #e4eef3;
  padding: 2rem 0 1.5rem;
  font-size: 0.9rem;
}
.site-footer a { color: #9cc9ef; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
}
.site-footer h3 { margin: 0 0 0.5rem; font-size: 0.95rem; color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.footer-disclosure {
  border-top: 1px solid #4a3a5e;
  padding-top: 1rem;
  color: #c3d3e4;
  font-size: 0.82rem;
  line-height: 1.5;
}
.footer-meta { margin-top: 0.75rem; color: #9fb3c8; font-size: 0.8rem; }

.contact-box {
  background: var(--brand-soft);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .site-rail { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-drop-panel { position: static; box-shadow: none; border: none; padding-left: 0.5rem; min-width: 0; }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; }
  .nav.is-open { display: flex; }
  .main-content { padding: 1.25rem; }
}

/* Derailing For Dummies additions */
:root { --brand: #9c3d1a; --brand-dark: #231a35; --brand-soft: #f6eff8; --line: #e1d9e6; --bg: #f6f4f8; --shadow: 0 8px 24px rgba(35, 26, 53, 0.08); }
.logo span { color: var(--brand); }
.main-content h1 { margin: 0 0 0.75rem; font-size: clamp(1.45rem, 3vw, 1.9rem); line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
.hero-banner { min-height: clamp(170px, 25vw, 400px); align-items: center; padding: 1.5rem 0; background-position: center bottom, center; }
.hero-box { background: rgba(255, 255, 255, 0.93); max-width: 100%; }
.hero-banner .hero-title { margin: 0 0 0.25rem; font-weight: 750; line-height: 1.15; color: var(--brand-dark); }
.hero-banner .hero-title a { color: inherit; text-decoration: none; }
.hero-banner .tagline { color: var(--brand); }
.site-rail h2 { font-size: 0.98rem; color: var(--brand-dark); }
.rail-block + .rail-block { margin-top: 1.1rem; padding-top: 0.9rem; border-top: 1px solid var(--line); }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list li { margin: 0; border-top: 1px solid var(--line); }
.rail-list li:first-child { border-top: 0; }
.rail-list a { display: block; padding: 0.42rem 0.15rem; text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.rail-list a:hover { text-decoration: underline; }
.rail-list a[aria-current="page"] { color: var(--brand-dark); }
.rail-about p, .rail-about li { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.rail-about p { margin: 0 0 0.5rem; }
.rail-about ul { margin: 0 0 0.5rem; padding-left: 1.1rem; columns: 2; }
.rail-about li { margin: 0; }
.site-footer { background: #231a35; }
.site-footer a { color: #ffc9a8; }
.footer-grid { grid-template-columns: 2fr 1fr 1fr; }
.footer-meta { color: #bfb2cc; }
.letter-meta { font-weight: 650; color: var(--muted); }
.contact-line { font-size: 1.08rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .hero-banner { padding: 1rem 0; } .hero-box { padding: 0.6rem 0.9rem 0.7rem; } .hero-banner .hero-title { font-size: 1.4rem; } .hero-banner .tagline { font-size: 0.95rem; } }
