/* EP Digest site styles. Matches the approved events page:
   navy #002855, gold #EAAA00 (gold only as a fill behind navy text, never gold text on white),
   Palatino-style serif headings, Lato body. */
:root {
  --navy: #002855;
  --navy-dark: #001a38;
  --gold: #EAAA00;
  --gold-soft: #FFF6DB;
  --ink: #14202E;
  --muted: #4A5665;
  --line: #D9DFE6;
  --line-strong: #8B98A8;
  --card-line: #C9D3DE;
  --panel: #F2F5F8;
  --white: #FFFFFF;
  --on-navy-muted: #D5DEE8;
  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', 'URW Palladio L', Georgia, serif;
  --sans: Lato, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --gutter: 24px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.55;
  overflow-x: hidden;
}
a { color: var(--navy); }
a:hover { color: var(--navy-dark); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.site-header :focus-visible, .on-navy :focus-visible, .subscribe-band :focus-visible, .modal-bar :focus-visible { outline-color: var(--gold); }

.wrap { max-width: 1200px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.wrap-narrow { max-width: 820px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 2000;
  background: var(--gold); color: var(--navy); font-weight: 900;
  padding: 12px 16px; border-radius: 4px; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 4px;
  font-family: var(--sans); font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; text-align: center;
  border: 2px solid transparent; cursor: pointer;
}
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 900; border-color: var(--gold); }
.btn-gold:hover { background: #F5BC1C; color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); color: var(--white); }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--panel); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.7); }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: var(--white); }
.btn-lg { padding: 14px 26px; font-size: 16px; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--white); }
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px;
  padding-top: 18px; padding-bottom: 18px;
}
.brand { color: var(--white); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.brand:hover { color: var(--white); }
.brand img { display: block; height: 42px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 28px; flex: 1 1 auto; font-size: 15px; }
.site-nav a {
  color: var(--white); text-decoration: none; padding: 12px 0; min-height: 44px;
  display: inline-flex; align-items: center; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: rgba(255,255,255,.6); color: var(--white); }
.site-nav a[aria-current] { color: var(--gold); font-weight: 700; border-bottom-color: var(--gold); }
.nav-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; min-height: 44px; padding: 0 10px; border-radius: 4px;
  background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,.6);
  font: 700 14px var(--sans); cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: '';
}
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 0; background: var(--white); }
.footer-grid {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px;
  padding-top: 28px; padding-bottom: 28px; font-size: 14px; color: var(--muted);
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { font-family: var(--serif); font-size: 20px; color: var(--navy); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--navy); }
.footer-meta { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 4px 18px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- Shared blocks ---------- */
main { display: block; }
.page-main { padding-top: 40px; padding-bottom: 56px; }
.kicker { display: flex; align-items: center; gap: 12px; margin: 0; }
.kicker + * { margin-top: 12px; }
.kicker-bar { width: 28px; height: 4px; background: var(--gold); flex: 0 0 auto; }
.kicker-text { font-family: var(--sans); font-size: 14px; letter-spacing: .14em; color: var(--navy); font-weight: 900; text-transform: uppercase; margin: 0; }
.on-navy .kicker-text { color: var(--white); }
.page-title { font-family: var(--serif); font-size: 44px; line-height: 1.1; color: var(--navy); font-weight: 700; margin: 0 0 10px; }
.lede { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0; }
.section { padding: 48px 0 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 18px; }
.section-title { font-family: var(--serif); font-size: 30px; line-height: 1.2; color: var(--navy); font-weight: 700; margin: 0; }
.section-link { font-weight: 700; display: inline-flex; align-items: center; min-height: 44px; }

/* Subscribe band (same as the events page) */
.subscribe-band {
  background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px;
}
.sb-title { font-family: var(--serif); font-size: 26px; line-height: 1.25; margin: 0; }
.sb-sub { font-size: 15px; color: var(--on-navy-muted); margin: 6px 0 0; }
.subscribe-embed { flex: 1 1 320px; min-width: 0; }
.subscribe-embed iframe { max-width: 100%; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.ed-card {
  display: flex; flex-direction: column; border: 1px solid var(--card-line); border-radius: var(--radius);
  overflow: hidden; background: var(--white); color: var(--ink); text-decoration: none;
  transition: box-shadow .15s ease, transform .15s ease;
}
.ed-card:hover { box-shadow: 0 6px 20px rgba(0,40,85,.16); transform: translateY(-1px); color: var(--ink); }
.ed-card-top {
  background: var(--navy); color: var(--white); padding: 12px 20px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  font-weight: 900; font-size: 14px; letter-spacing: .06em; text-transform: uppercase;
}
.ed-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; }
.ed-card-title { font-family: var(--serif); font-size: 22px; line-height: 1.25; color: var(--navy); font-weight: 700; margin: 0; }
.ed-card-sum { font-size: 15px; color: var(--muted); margin: 0; }
.badge {
  background: var(--gold); color: var(--navy); font-size: 11px; font-weight: 900;
  letter-spacing: .08em; padding: 4px 8px; border-radius: 3px; white-space: nowrap;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.tag { font-size: 12px; font-weight: 700; color: var(--navy); background: var(--panel); border: 1px solid var(--line); padding: 3px 8px; border-radius: 12px; }

/* ---------- Home ---------- */
.hero { background: var(--navy); color: var(--white); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.hero-date { color: var(--on-navy-muted); font-weight: 700; font-size: 15px; margin: 0 0 10px; }
.hero-title { font-family: var(--serif); font-size: 48px; line-height: 1.1; font-weight: 700; margin: 0 0 16px; color: var(--white); }
.hero-sum { font-size: 19px; line-height: 1.55; color: var(--on-navy-muted); margin: 0 0 26px; max-width: 640px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 340px; height: auto; opacity: .95; }
.hero-map { width: 100%; max-width: 360px; height: auto; display: block; overflow: hidden; }
.hero-map path, .hero-map rect { vector-effect: non-scaling-stroke; fill: none; stroke-linejoin: round; }
.hero-map .hm-ep { fill: var(--gold); stroke: none; }
.hero-map .hm-lines { stroke: rgba(255,255,255,.55); stroke-width: 1; }
.hero-map .hm-outline { stroke: rgba(255,255,255,.9); stroke-width: 1.4; }
.hero-map .hm-eplines { stroke: #fff; stroke-width: 1.4; }
.hero-map .hm-labels { opacity: 0; font-family: Lato, Arial, sans-serif; font-weight: 700; font-size: 4.7px; fill: var(--navy); text-anchor: middle; letter-spacing: .02em; }
.hero-map .hm-box { stroke: #fff; stroke-width: 2.5; opacity: 0; }

.coming-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.cu-card {
  display: flex; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--white); color: var(--ink); text-decoration: none;
}
.cu-card:hover { border-color: var(--navy); box-shadow: 0 3px 12px rgba(0,40,85,.10); color: var(--ink); }
.cu-date {
  flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--gold); color: var(--navy); border-radius: 6px; padding: 8px 0; align-self: flex-start;
}
.cu-card.minor .cu-date { background: var(--navy); color: var(--white); }
.cu-mon { font-size: 11px; font-weight: 700; letter-spacing: .1em; }
.cu-day { font-size: 22px; font-weight: 900; line-height: 1.1; }
.cu-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cu-title { font-weight: 700; font-size: 16px; color: var(--navy); overflow-wrap: anywhere; }
.cu-where { font-size: 14px; color: var(--muted); overflow-wrap: anywhere; }
.cu-when { font-size: 12px; font-weight: 700; color: var(--navy); }

.promo {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0; align-items: stretch;
  border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; background: var(--white);
}
.promo-img { background: #13213F; display: flex; align-items: center; }
.promo-img img { display: block; width: 100%; height: auto; }
.promo-body { padding: 28px 32px; display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.promo-body h2 { font-family: var(--serif); font-size: 30px; line-height: 1.2; color: var(--navy); margin: 0; }
.promo-body p { margin: 0; color: var(--muted); font-size: 16px; }

.about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 48px; align-items: start; }
.about h2 { font-family: var(--serif); font-size: 30px; color: var(--navy); margin: 0; line-height: 1.2; }
.about-copy p { margin: 0 0 12px; font-size: 17px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.facts li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.facts b { display: block; font-family: var(--serif); font-size: 20px; color: var(--navy); }
.facts span { font-size: 14px; color: var(--muted); }

/* ---------- Archive ---------- */
.archive-tools {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; margin: 28px 0 8px;
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field label, .field-label { font-size: 12px; font-weight: 700; color: var(--muted); }
.field input[type=search] {
  height: 44px; width: 100%; border: 1px solid var(--line-strong); border-radius: 4px;
  padding: 0 12px; font-size: 16px; background: var(--white); font-family: var(--sans);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 44px; padding: 0 14px; background: var(--white); color: var(--navy);
  border: 1px solid var(--line-strong); border-radius: 22px; font: 14px var(--sans); cursor: pointer;
}
.chip:hover { border-color: var(--navy); }
.chip[aria-pressed=true] { background: var(--navy); color: var(--white); border-color: var(--navy); font-weight: 700; }
.archive-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; min-height: 44px; }
.match-count { font-weight: 700; color: var(--navy); font-size: 15px; margin: 0; }
.btn-link {
  background: none; border: 0; padding: 10px 4px; min-height: 44px; cursor: pointer;
  color: var(--navy); font: 700 15px var(--sans); text-decoration: underline; text-underline-offset: 3px;
}
.month-group { margin-top: 32px; }
.month-title {
  font-size: 13px; font-weight: 900; letter-spacing: .1em; color: var(--navy); text-transform: uppercase;
  border-bottom: 2px solid var(--gold); padding-bottom: 6px; margin: 0 0 14px;
}
.archive-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.arch-item a {
  display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--white);
}
.arch-item a:hover { border-color: var(--navy); box-shadow: 0 3px 12px rgba(0,40,85,.10); color: var(--ink); }
.arch-date {
  display: flex; flex-direction: column; align-items: center; justify-content: center; align-self: start;
  background: var(--navy); color: var(--white); border-radius: 6px; padding: 8px 0;
}
.arch-title { font-family: var(--serif); font-size: 22px; line-height: 1.25; color: var(--navy); font-weight: 700; margin: 0 0 4px; }
.arch-sum { margin: 0; color: var(--muted); font-size: 15px; }
.empty-state { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 20px; color: var(--muted); margin-top: 24px; }

/* ---------- Edition / article pages ---------- */
.article-head { padding: 40px 0 8px; }
.article-title { font-family: var(--serif); font-size: 42px; line-height: 1.12; color: var(--navy); font-weight: 700; margin: 0 0 12px; }
.article-dek { font-size: 19px; color: var(--muted); margin: 0 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 15px; color: var(--muted); margin: 0; }
.article-meta strong { color: var(--ink); }
.article-meta .dot { width: 4px; height: 4px; border-radius: 2px; background: var(--line-strong); }
.edition-shell { background: var(--panel); padding: 28px 0 40px; margin-top: 20px; border-top: 1px solid var(--line); }
.edition-card {
  max-width: 760px; margin: 0 auto; background: var(--white); border-radius: var(--radius);
  box-shadow: 0 2px 14px rgba(0,40,85,.08); padding: 20px; overflow: hidden;
}
/* The edition HTML is a 620px email layout. Let it breathe up to ~720px. */
.edition-body { max-width: 720px; margin: 0 auto; overflow-wrap: break-word; }
.edition-body > div:first-child { max-width: 720px !important; }
.edition-body img { max-width: 100%; }
.edition-body a { overflow-wrap: anywhere; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
.article-after { padding-top: 32px; display: flex; flex-direction: column; gap: 28px; }
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--card-line);
  border-radius: var(--radius); text-decoration: none; color: var(--ink); min-height: 44px;
}
.pager a:hover { border-color: var(--navy); box-shadow: 0 3px 12px rgba(0,40,85,.10); color: var(--ink); }
.pager .pager-next { text-align: right; grid-column: 2; }
.pager-label { font-size: 12px; font-weight: 900; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.pager-title { font-family: var(--serif); font-size: 18px; color: var(--navy); font-weight: 700; line-height: 1.3; }

/* ---------- Plain content pages (privacy, subscribe) ---------- */
.prose { max-width: 720px; font-size: 17px; }
.prose h2 { font-family: var(--serif); font-size: 26px; color: var(--navy); margin: 32px 0 8px; line-height: 1.25; }
.prose p { margin: 0 0 14px; }
.check-list { list-style: none; margin: 18px 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.check-list li::before { content: ''; flex: 0 0 12px; height: 12px; margin-top: 7px; background: var(--gold); border-radius: 2px; }
.subscribe-panel { border: 1px solid var(--card-line); border-radius: var(--radius); padding: 28px; background: var(--panel); max-width: 720px; }
.subscribe-panel .btn { margin-top: 4px; }
.small-print { font-size: 14px; color: var(--muted); margin: 14px 0 0; }

/* ---------- Guide ---------- */
.guide-shell { background: #EDECE8; padding: 0 0 40px; }
.guide-intro { padding: 40px 0 24px; background: var(--white); border-bottom: 1px solid var(--line); }

/* ---------- 404 ---------- */
.notfound { text-align: left; padding: 72px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .page-title, .hero-title { font-size: 38px; }
  .article-title { font-size: 36px; }
  .hero-inner { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 40px; }
  .hero-art { display: none; }
  .promo { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .header-inner { gap: 8px 16px; padding-top: 10px; padding-bottom: 10px; justify-content: space-between; }
  .brand img { height: 32px; }
  .js .nav-toggle { display: inline-flex; }
  .site-nav { order: 3; flex-basis: 100%; flex-direction: column; gap: 0; font-size: 16px; }
  .site-nav a { border-bottom: 1px solid rgba(255,255,255,.15); }
  .js .site-nav:not(.open) { display: none; }
  .site-header .btn-gold { padding: 8px 12px; font-size: 14px; }
  .page-main { padding-top: 28px; }
  .page-title, .hero-title { font-size: 31px; }
  .hero-sum { font-size: 17px; }
  .article-title { font-size: 30px; }
  .article-dek { font-size: 17px; }
  .section { padding-top: 40px; }
  .section-title, .promo-body h2, .about h2 { font-size: 25px; }
  .card-grid { grid-template-columns: 1fr; }
  .subscribe-band { padding: 24px 20px; }
  .sb-title { font-size: 22px; }
  .subscribe-band .btn { width: 100%; }
  .promo-body { padding: 22px 20px; }
  .edition-shell { padding: 12px 0 28px; }
  .edition-shell .wrap { padding-left: 8px; padding-right: 8px; }
  .edition-card { padding: 6px; }
  .arch-item a { grid-template-columns: 58px minmax(0, 1fr); gap: 12px; padding: 14px; }
  .arch-title { font-size: 19px; }
  .pager { grid-template-columns: 1fr; }
  .pager .pager-next { grid-column: auto; }
  .facts { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
}
@media (max-width: 380px) {
  .site-header .btn-gold { padding: 8px 10px; font-size: 13px; }
  .brand img { height: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .skip-link, .subscribe-band, .pager, .no-print { display: none !important; }
  body { font-size: 12pt; }
  .edition-shell { background: none; padding: 0; border: 0; }
  .edition-card { box-shadow: none; padding: 0; max-width: none; }
  .article-head { padding-top: 0; }
  a { color: inherit; }
}

/* Header action group (subscribe + menu toggle) */
.header-actions { display: flex; align-items: center; gap: 10px; order: 3; }
.site-nav { order: 2; }
@media (max-width: 760px) {
  .header-actions { order: 2; }
  .site-nav { order: 3; }
}

/* Guide: keep the guide's top margins inside its own panel, and give its table of contents 44px tap targets. */
.guide-shell, .guide-content .content-wrap { display: flow-root; }
.guide-content .toc-grid a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-meta a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; font-weight: 700; }
@media (max-width: 760px) {
  .brand img { height: 28px; }
  .header-actions { gap: 8px; }
  .site-header .btn-gold { padding: 8px 10px; font-size: 13px; }
}
@media (max-width: 400px) {
  .brand img { height: 24px; }
}

/* Signup received page */
.subscribed-panel { border-left: 0; background: #FFF6DB; border-color: #EAAA00; }
.subscribed-title { margin: 0 0 12px; font-family: var(--serif, 'Palatino Linotype', Palatino, Georgia, serif); font-size: 22px; color: var(--navy); font-weight: 700; }
.subscribed-panel .check-list { margin-bottom: 0; }
.page-main .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Shown in place of the signup form once this browser has signed up */
.signup-done { background: #FFF6DB; border: 1px solid #EAAA00; border-radius: 6px; padding: 14px 16px; color: #002855; font-size: 16px; line-height: 1.45; }
.signup-done strong { display: block; font-size: 17px; }
