/* The eclipse pages: what every one of them shares (the (i) source
   popovers, the local card's eyebrow), the page for the visitor's place
   (/eclipses) and the two catalogs (/eclipses/solar, /eclipses/lunar). The
   maps, the local card and the kind badges are in site.css; one eclipse's
   own page adds eclipse.css. Dark theme: eclipses-dark.css. */

/* (i): what a section rests on, in a popover. Without script the browser
   centers it; the facts island anchors it under the button. */
.ec-info {
  flex: none;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font: italic 600 0.9rem/1 Georgia, "Times New Roman", serif;
  cursor: pointer;
}
.ec-info:hover, .ec-info[aria-expanded="true"] { color: var(--text); border-color: var(--accent-moon); }
.ec-info:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.ec-pop {
  width: min(320px, calc(100vw - 24px));
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.18);
  font-size: 0.85rem;
  line-height: 1.45;
}
.ec-pop.is-anchored { position: fixed; inset: auto; margin: 0; }
.ec-pop::backdrop { background: transparent; }
.ec-pop-h { color: var(--accent-moon); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.ec-pop-note { margin-top: 6px !important; color: var(--muted); }
.ec-pop ol { margin: 8px 0 0; padding-left: 1.6em; }
.ec-pop li + li { margin-top: 6px; }
.ec-pop li::marker { color: var(--muted); }
.ec-pop a { color: var(--text); }
.ec-pop span { display: block; color: var(--muted); }
.ec-pop .ec-all { display: inline-block; margin-top: 10px; color: var(--muted); font-size: 0.8rem; }
.ec-pop-also { margin-top: 8px !important; padding-top: 8px; border-top: 1px solid var(--line); }

@media print {
  .ec-info { display: none; }
}

/* The local card with an eyebrow and an h2 (here and on an eclipse's page). */
.dash-eyebrow { color: var(--muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.dash-main.is-solar .dash-eyebrow { color: var(--accent-sun); }
.dash-main.is-lunar .dash-eyebrow { color: var(--accent-moon); }
.dash-head h2 { margin-top: 4px; font-size: clamp(1.45rem, 4vw, 1.95rem); line-height: 1.15; letter-spacing: -0.015em; }

/* ---- /eclipses: the visitor's place ------------------------------------ */

.eclipses-place { display: flex; flex-direction: column; }
.eclipses-place .eclipses-intro { margin-bottom: 4px; }

/* At a glance: the three dates, each a link to its card. */
.pe-glance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
@media (max-width: 620px) { .pe-glance { grid-template-columns: 1fr; } }
.pe-glance-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  min-width: 0;
}
@media (max-width: 620px) {
  .pe-glance-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
  .pe-glance-when { text-align: right; }
}
.pe-glance-item:hover { border-color: var(--accent-moon); }
.pe-glance-item.is-solar:hover { border-color: var(--accent-sun); }
.pe-glance-item:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.pe-glance-label { margin-bottom: 4px; }
@media (max-width: 620px) { .pe-glance-label { margin: 0; } }
.pe-glance-item strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pe-glance-when { color: var(--muted); font-size: 0.85rem; }
.pe-glance-item.is-none strong { color: var(--muted); font-weight: 600; }

/* One card per highlight, with what comes sooner elsewhere under it. */
.pe-next { display: flex; flex-direction: column; gap: 10px; }
.pe-none { gap: 8px; }
.pe-none h2 { font-size: clamp(1.2rem, 3vw, 1.5rem); line-height: 1.2; }
.pe-none.is-solar .dash-eyebrow { color: var(--accent-sun); }
.pe-none.is-lunar .dash-eyebrow { color: var(--accent-moon); }
.pe-none-why { display: flex; align-items: center; gap: 8px; max-width: 72ch; }
.pe-also {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-moon-soft);
  font-size: 0.92rem;
}
.pe-next#annular .pe-also, .pe-next#total .pe-also { background: var(--accent-sun-soft); }
.pe-also-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pe-also a { color: var(--text); font-weight: 600; text-underline-offset: 3px; }

/* The way into the catalogs. */
.pe-catalogs { display: flex; flex-direction: column; gap: 12px; }
.pe-catalog-grid { display: grid; gap: 12px; }
@media (min-width: 720px) { .pe-catalog-grid { grid-template-columns: 1fr 1fr; } }
.pe-catalog { gap: 8px; color: var(--text); text-decoration: none; }
.pe-catalog:hover { border-color: var(--accent-moon); }
.pe-catalog.is-solar:hover { border-color: var(--accent-sun); }
.pe-catalog:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.pe-catalog-art { width: 120px; height: 60px; }
.pe-catalog-title { font-size: 1.2rem; font-weight: 700; }
.pe-catalog-text { color: var(--muted); max-width: 48ch; }
.pe-catalog-go { margin-top: auto; font-weight: 600; color: var(--accent-moon); }
.pe-catalog.is-solar .pe-catalog-go { color: var(--accent-sun); }
.pe-catalog-go::after { content: " \2192"; }
.pe-catalog-note { font-size: 0.9rem; max-width: 72ch; }
.pe-art-band { fill: none; stroke: var(--accent-sun-soft); stroke-width: 9; stroke-linecap: round; }
.pe-art-band.is-2 { stroke: #fbe1bf; }
.pe-art-line { fill: none; stroke: var(--accent-sun); stroke-width: 1.6; stroke-linecap: round; }
.pe-art-umbra { fill: var(--accent-moon-soft); stroke: var(--accent-moon); stroke-width: 1; stroke-dasharray: 3 3; }
.pe-art-moon { fill: #d9dbe2; stroke: var(--accent-moon); stroke-width: 1; }
.pe-art-moon.is-in { fill: #b4553e; stroke: #8c2a17; }

/* ---- The catalogs: /eclipses/solar and /eclipses/lunar ------------------ */

.atlas-page { display: flex; flex-direction: column; }
.atlas { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.atlas-foot { font-size: 0.88rem; }

/* The time slider and its form. */
.atlas-time {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.atlas-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 22px; }
.atlas-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; }
.atlas-dates label { display: flex; flex-direction: column; gap: 3px; font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.atlas-dates input, .atlas-show {
  min-height: 36px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.atlas-show { cursor: pointer; font-weight: 600; }
.atlas-show:hover, .atlas-dates input:hover { border-color: var(--muted); }
.atlas-spans { display: flex; flex-wrap: wrap; gap: 4px; }
.atlas-span, .atlas-step, .atlas-play {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.atlas-span:hover, .atlas-step:hover, .atlas-play:hover { border-color: var(--accent-moon); }
.atlas-span[aria-current="true"] { border-color: var(--accent-moon); background: var(--accent-moon-soft); font-weight: 600; }
.atlas-step[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.atlas-play[aria-pressed="true"] { border-color: var(--accent-sun); background: var(--accent-sun-soft); }
.atlas-steps { display: flex; gap: 4px; }
.atlas-step[data-step="-1"]::before { content: "\2039\00a0"; }
.atlas-step[data-step="1"]::after { content: "\00a0\203a"; }
:is(.atlas-span, .atlas-step, .atlas-play, .atlas-show):focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }

.atlas-track { position: relative; height: 40px; }
.atlas-ticks { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.atlas-ticks * { vector-effect: non-scaling-stroke; }
.atlas-bed { fill: var(--bg); stroke: var(--line); stroke-width: 1px; }
.atlas-pending { fill: var(--line); fill-opacity: 0.55; }
.tk { stroke-width: 1px; }
.tk-total { stroke: #1d1f24; }
.tk-annular { stroke: #e8891c; }
.tk-hybrid { stroke: #8a4f7d; }
.tk-partial { stroke: #d9a066; }
.tk-moon.tk-total { stroke: #8c2a17; }
.tk-moon.tk-partial { stroke: #d47a66; }
.tk-moon.tk-penumbral { stroke: #9aa4c4; }
.atlas-now { stroke: var(--accent-twilight); stroke-width: 1.5px; stroke-dasharray: 3 3; }
.atlas-window { fill: rgb(74 90 140 / 0.14); stroke: var(--accent-moon); stroke-width: 1.5px; }
.atlas-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  cursor: grab;
}
.atlas-range:active { cursor: grabbing; }
.atlas-range::-webkit-slider-runnable-track { height: 40px; background: transparent; }
.atlas-range::-moz-range-track { height: 40px; background: transparent; }
.atlas-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: var(--thumb, 18px);
  height: 40px;
  border: 2px solid var(--accent-moon);
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 0 0 1px var(--surface), 0 1px 4px rgb(0 0 0 / 0.18);
}
.atlas-range::-moz-range-thumb {
  width: var(--thumb, 18px);
  height: 36px;
  border: 2px solid var(--accent-moon);
  border-radius: 6px;
  background: transparent;
  box-shadow: 0 0 0 1px var(--surface), 0 1px 4px rgb(0 0 0 / 0.18);
}
.atlas-range:focus-visible { outline: none; }
.atlas-range:focus-visible::-webkit-slider-thumb { border-color: var(--accent-sun); box-shadow: 0 0 0 3px var(--accent-sun-soft); }
.atlas-range:focus-visible::-moz-range-thumb { border-color: var(--accent-sun); box-shadow: 0 0 0 3px var(--accent-sun-soft); }
.atlas-years { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.atlas-status { font-weight: 600; font-size: 0.95rem; }
.atlas.is-loading .atlas-status::after { content: " \2026"; }
.atlas.is-loading [data-atlas="items"] { opacity: 0.55; transition: opacity 0.2s; }

/* The solar map: each eclipse a link to itself (#slug). */
.sc-e { cursor: pointer; }
.sc-e.is-out { display: none; }
.sc-e:focus { outline: none; }
.sc-path { fill-opacity: 0.6; stroke-width: 1px; stroke-opacity: 0.9; }
.sc-total .sc-path { fill: #111; stroke: #111; }
.sc-annular .sc-path { fill: #e8891c; stroke: #a85304; }
.sc-hybrid .sc-path { fill: #8a4f7d; stroke: #5e2f55; }
.sc-line { fill: none; stroke: #fff; stroke-opacity: 0.8; stroke-width: 1px; }
.sc-dot { fill: #fff; stroke: #c2410c; stroke-width: 2px; }
.sc-total .sc-dot, .sc-annular .sc-dot, .sc-hybrid .sc-dot { stroke-width: 1.5px; }
.sc-label {
  fill: #3a1d00;
  stroke: rgb(255 255 255 / 0.85);
  stroke-width: 0.9px;
  paint-order: stroke;
  stroke-linejoin: round;
  font-size: 4.4px;
  font-weight: 650;
  text-anchor: middle;
  pointer-events: none;
}
.sc-frame.is-dense .sc-label { display: none; }
.sc-frame.is-dense .sc-e.is-hot .sc-label, .sc-frame.is-dense .sc-e.is-selected .sc-label { display: inline; }
@media (max-width: 640px) { .sc-label { display: none; } }
.sc-frame:has(.sc-e.is-hot) .sc-e:not(.is-hot, .is-out) { opacity: 0.3; }
.sc-e.is-hot .sc-path, .sc-e.is-selected .sc-path, .sc-e:focus-visible .sc-path { fill-opacity: 0.85; stroke: var(--accent-moon); stroke-width: 2px; }
.sc-e.is-hot .sc-dot, .sc-e.is-selected .sc-dot, .sc-e:focus-visible .sc-dot { stroke: var(--accent-moon); stroke-width: 3px; }
.sc-swatch-annular { background: #e8891c; }
.sc-swatch-hybrid { background: #8a4f7d; }
.sc-swatch-partial { border-color: #c2410c; }
.sc-map .map-legend .ec-info { width: 20px; height: 20px; font-size: 0.75rem; }

/* Under the map: the eclipse pointed at or chosen. */
.sc-focus {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 10px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent-sun);
  border-radius: 10px;
  background: var(--surface);
  font-size: 0.92rem;
}
.sc-focus[hidden] { display: none; }
.sc-focus-head { font-weight: 700; }
.sc-focus-head a { color: var(--text); text-underline-offset: 3px; }
.sc-focus-where .muted, .sc-focus-here .muted { color: var(--muted); }

.sc-table tbody tr { cursor: default; }
.sc-table tbody tr.is-hot, .sc-table tbody tr.is-selected { background: var(--accent-sun-soft); }

/* The lunar list: a card per eclipse with a small map of who sees it. */
.lc-legend { margin: 0; }
.lc-items { display: flex; flex-direction: column; gap: 12px; }
.lc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lc-list:not(:has(> li:not([hidden]))) { display: none; }
.lc-e { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr); align-items: start; gap: 16px; scroll-margin-top: 12px; }
.lc-e[hidden] { display: none; }
@media (max-width: 560px) { .lc-e { grid-template-columns: 1fr; } }
.lc-e:target, .lc-e.is-selected { border-color: var(--accent-moon); box-shadow: 0 0 0 2px var(--accent-moon-soft); }
.lc-frame { width: 100%; }
.lc-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lc-title { font-size: 1.08rem; line-height: 1.25; }
.lc-title a { color: var(--text); text-underline-offset: 3px; }
.lc-when { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.lc-figures { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 2px 0; }
.lc-figures dt { font-size: 0.75rem; color: var(--muted); }
.lc-figures dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.lc-where { font-size: 0.9rem; }
.lc-where span { display: block; }
.lc-here { font-size: 0.9rem; }
.lc-here-place { font-weight: 700; }
.lc-here.is-not { color: var(--muted); }
.lc-here.is-visible .lc-here-place::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--accent-moon); vertical-align: 1px; }
/* Two layers of shading: lighter than on the large maps, so the clear part reads at a glance. */
.lc-frame .moon-down { fill-opacity: 0.22; }
.lc-e { border-left-width: 4px; }
.lc-total { border-left-color: #8c2a17; }
.lc-partial { border-left-color: #d47a66; }
.lc-penumbral { border-left-color: #9aa4c4; }
.lc-legend .swatch-partly { background: rgb(11 17 48 / 0.22); }
.lc-legend .swatch-none { background: rgb(11 17 48 / 0.39); }
