/* One eclipse's own page (/eclipses/{slug}). The parts it shares with the
   eclipses page (maps, the local card, tables, kind badges) are in site.css,
   and the (i) source popovers in eclipses.css; this file lays out the page
   and styles what only it has. Dark theme: eclipse-dark.css. */

.eclipse-page { display: flex; flex-direction: column; gap: 28px; }
.eclipse-page-head { margin-bottom: 0; }
.eclipse-page-head h1 { margin-top: 2px; }
.eclipse-page-head .eyebrow { margin: 6px 0 4px; }
.eclipse-page-head .eclipse-jump { margin-top: 14px; }
.eclipse-page .eclipse-dash { margin: 0; }
.eclipse-page .lunar-figures { margin: 0; }

/* Section headings with their (i). */
.ep-section { display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 12px; }
.ep-section > h2, .ep-section-head h2 { font-size: 1.3rem; }
.ep-section-head, .ep-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ep-card-head h3 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.eclipse-solar .ep-card-head h3 { color: var(--accent-sun); }
.eclipse-lunar .ep-card-head h3 { color: var(--accent-moon); }
.ep-lede { max-width: 72ch; color: var(--muted); }
.ep-section .eclipse-cities + .eclipse-cities { margin-top: 12px; }

/* "Where to see it": the nearest path, or the regions that see it. */
.ep-where { gap: 8px; }
.ep-where h3 { margin-bottom: 4px; }
.ep-where p { font-size: 0.92rem; }
.ep-where a { color: var(--accent-moon); text-underline-offset: 3px; }
.ep-where-label { font-size: 0.8rem !important; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 6px !important; }
.ep-big { font-size: 1.6rem !important; font-weight: 700; line-height: 1.15; font-variant-numeric: tabular-nums; }
.eclipse-solar .ep-big { color: var(--accent-sun); }
.eclipse-lunar .ep-big { color: var(--accent-moon); }
.ep-mini { margin: 6px 0 0; display: grid; gap: 0; font-size: 0.9rem; }
.ep-mini > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.ep-mini dt { color: var(--muted); }
.ep-mini dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.ep-mini dd .muted { display: block; font-size: 0.8rem; }

/* Not seen from the visitor's place. */
.ep-unseen { justify-content: flex-start; }
.ep-unseen h2 { color: var(--muted); }

/* The timeline card: a note under each moment. */
.ep-row-note { display: block; font-size: 0.78rem; color: var(--muted); }
.ep-contacts .contacts th[scope="row"] { color: var(--text); }

/* The path table. */
.ep-path-table tr.is-greatest { background: var(--accent-sun-soft); }
.ep-path-table th[scope="row"] .muted { font-size: 0.78rem; }

/* Lunar: cities that do not see it. */
.eclipse-lunar .eclipse-table tr.is-not td, .eclipse-lunar .eclipse-table tr.is-not th { color: var(--muted); }

/* Saros: the members before and after, as three steps. */
.saros-chain { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.saros-chain li > a, .saros-chain li > div, .saros-chain li:not(:has(> a, > div)) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  height: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
.saros-chain li > a:hover { border-color: var(--accent-moon); }
.saros-chain li.is-current { padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--accent-sun-soft); display: flex; flex-direction: column; gap: 2px; }
.eclipse-lunar .saros-chain li.is-current { background: var(--accent-moon-soft); }
.saros-chain strong { font-variant-numeric: tabular-nums; }
.saros-chain .muted { font-size: 0.85rem; }
.saros-step { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ep-saros > p > a { color: var(--accent-moon); text-underline-offset: 3px; }
@media (max-width: 520px) { .saros-chain { grid-template-columns: minmax(0, 1fr); } }

/* How to watch. */
.ep-tips { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; max-width: 76ch; }
.ep-tips li::marker { color: var(--muted); }
.eclipse-solar .ep-tips li::marker { color: var(--accent-sun); }

/* Previous, all, next. */
.ep-pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; padding-top: 20px; border-top: 1px solid var(--line); }
.ep-pager a { color: inherit; text-decoration: none; }
.ep-pager-prev, .ep-pager-next { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.ep-pager-next { text-align: right; }
.ep-pager-prev:hover, .ep-pager-next:hover { border-color: var(--accent-moon); }
.ep-pager .muted { font-size: 0.85rem; }
.ep-pager span:not(.muted) { font-variant-numeric: tabular-nums; }
.ep-pager-all { align-self: center; color: var(--accent-moon) !important; text-decoration: underline !important; text-underline-offset: 3px; white-space: nowrap; }
@media (max-width: 560px) {
  .ep-pager { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ep-pager-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}

@media print {
  .ep-pager, .eclipse-jump { display: none; }
}

/* Not seen here: the next eclipse that is. */
.ep-next-seen { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; border-radius: 12px; background: var(--bg); }
.ep-next-seen a { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
.ep-next-seen a:hover { text-decoration: underline; text-underline-offset: 3px; }
