/* The /dark-skies page, light theme. dark-skies-dark.css overrides it for the
   dark theme (linked with data-theme-dark). The canvases (fisheye, maps, the
   60-night strip) draw in a night palette in both themes; their colors live
   in web/src/darksky, and the legend swatches here match them. */

.ds-intro { margin-bottom: 14px; }
.ds-intro .place-meta { display: block; max-width: 60em; }

/* ---- Source tips: details/summary, so they work without JavaScript ---- */
.ds-cite { position: relative; display: inline-block; vertical-align: middle; margin-left: 2px; }
.ds-cite summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.6;
  font: italic 600 10px/1 Georgia, serif;
  cursor: pointer;
  user-select: none;
}
.ds-cite summary::-webkit-details-marker { display: none; }
.ds-cite[open] summary, .ds-cite summary:hover { opacity: 1; }
.ds-cite summary:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 2px; }
.ds-cite-body {
  position: absolute;
  z-index: 25;
  top: 22px;
  left: -12px;
  width: min(320px, 78vw);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.16);
  color: var(--text);
  font: 400 0.84rem/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-transform: none;
  letter-spacing: 0;
  text-align: left;
}
.ds-cite-body a { color: var(--accent-moon); }
@media (max-width: 720px) {
  .ds-cite { position: static; }
  .ds-cite-body { left: 12px; right: 12px; width: auto; top: auto; margin-top: 6px; }
}

/* ---- Your sky: a night panel in both themes ---- */
.ds-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin: 0 0 18px;
  border-radius: var(--radius);
  background: radial-gradient(120% 140% at 80% 10%, #1a2457 0%, #0b1130 55%, #070a1f 100%);
  color: #e9ecf8;
  box-shadow: var(--shadow);
}
.ds-place { font-size: 1.25rem; font-weight: 600; letter-spacing: 0.01em; }
.ds-readout { display: flex; align-items: flex-end; gap: 14px; margin: 14px 0 6px; }
.ds-big { font-size: clamp(3.2rem, 9vw, 4.8rem); line-height: 0.95; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.ds-unit { color: #aab3d6; font-size: 0.9rem; line-height: 1.3; padding-bottom: 6px; }
.ds-bortle { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin: 6px 0 14px; }
.ds-swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgb(255 255 255 / 0.35); flex: none; }
.ds-b1 { background: #0a0f2e; }
.ds-b2 { background: #24306b; }
.ds-b3 { background: #2f5fa8; }
.ds-b4 { background: #2aa198; }
.ds-b5 { background: #9ac46a; }
.ds-b6 { background: #e6d15a; }
.ds-b7 { background: #f08a3c; }
.ds-b8 { background: #d8443a; }
.ds-b9 { background: #f6d6df; }
.ds-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(8.5em, 1fr)); gap: 12px 18px; margin: 0 0 18px; }
.ds-facts div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.ds-facts div[hidden] { display: none; }
.ds-facts dt { color: #aab3d6; font-size: 0.82rem; }
.ds-facts dd { margin: 0; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.ds-facts dd.ds-words { font-size: 1.05rem; padding-top: 6px; }
.ds-hero .notice { background: rgb(255 255 255 / 0.08); color: #e9ecf8; }
.ds-status { min-height: 1.4em; margin-top: 8px; font-size: 0.88rem; color: #c3c9e4; }
.ds-dome-figure { margin: 0; text-align: center; }
.ds-dome-figure[hidden] { display: none; }
.ds-dome { width: 100%; max-width: 520px; aspect-ratio: 1; height: auto; display: block; margin: 0 auto; }
.ds-dome-figure figcaption { font-size: 0.86rem; color: #c3c9e4; margin: 6px 0 10px; min-height: 2.6em; }
.ds-hero .ds-segmented { background: rgb(255 255 255 / 0.06); border-color: rgb(255 255 255 / 0.18); }
.ds-hero .ds-segmented button { color: #c3c9e4; }
.ds-hero .ds-segmented button[aria-pressed="true"] { background: rgb(255 255 255 / 0.16); color: #fff; }
@media (max-width: 860px) {
  .ds-hero { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .ds-dome-figure { order: -1; }
}

/* Segmented buttons (the site's .segmented uses radio labels; these are toggles). */
.ds-segmented { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.ds-segmented button {
  font: inherit;
  font-size: 0.88rem;
  border: 0;
  background: none;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
}
.ds-segmented button[aria-pressed="true"] { background: var(--accent-moon-soft); color: var(--text); font-weight: 600; }
.ds-segmented button:disabled { opacity: 0.45; cursor: not-allowed; }
.ds-segmented button:focus-visible { outline: 2px solid var(--accent-moon); outline-offset: 1px; }

.ds-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.ds-chips a {
  font-size: 0.88rem;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.ds-chips a:hover { border-color: var(--muted); }

/* ---- Cards ---- */
.ds-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin: 0 0 18px;
  min-width: 0;
  scroll-margin-top: 12px;
}
.ds-card[hidden], .ds-card [hidden] { display: none; }
.ds-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 10px; }
.ds-card-head h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #3f4f8f; }
.ds-card-head .ds-segmented { margin-left: auto; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.ds-lede { color: var(--muted); margin-bottom: 12px; max-width: 58em; }
.ds-sub { font-size: 1.02rem; margin: 18px 0 8px; }
.ds-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.ds-gap { margin-top: 10px; }
@media (max-width: 760px) { .ds-grid2 { grid-template-columns: minmax(0, 1fr); } }
.ds-p { margin: 0 0 10px; }
.ds-num { font-variant-numeric: tabular-nums; }
.ds-nw { white-space: nowrap; }
.ds-mute { color: var(--muted); }
.ds-r { text-align: right; }

.ds-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); gap: 12px 18px; margin: 4px 0 14px; }
.ds-kv div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.ds-kv div[hidden] { display: none; }
.ds-kv dt { color: var(--muted); font-size: 0.84rem; }
.ds-kv dd { margin: 0; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.ds-warn { font-size: 0.86rem; color: var(--muted); border-left: 3px solid var(--accent-moon); padding-left: 10px; margin-top: 14px; }

.ds-table { overflow-x: auto; }
.ds-table table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.ds-table th, .ds-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ds-table th { font-weight: 600; color: var(--muted); font-size: 0.82rem; }
.ds-table .ds-r { text-align: right; }

/* ---- Light domes ---- */
.ds-rose-figure { margin: 0; min-height: 380px; display: flex; }
.ds-rose { width: 100%; min-height: 380px; flex: 1; }
.ds-rose-ring { fill: none; stroke: var(--line); }
.ds-rose-half { stroke-dasharray: 3 4; }
.ds-rose-wedge { fill: #3f4f8f; }
.ds-rose-compass { fill: var(--muted); font-size: 13px; }
.ds-rose-dot { fill: var(--text); }
.ds-rose-label { fill: var(--text); font-size: 12px; }

/* ---- When to look ---- */
.ds-tonight { display: grid; grid-template-columns: repeat(auto-fit, minmax(11em, 1fr)); gap: 12px 18px; margin: 0 0 6px; }
.ds-tonight div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.ds-tonight dt { color: var(--muted); font-size: 0.84rem; }
.ds-tonight dd { margin: 0; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.ds-strip-host { position: relative; height: 300px; }
.ds-strip { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--text); }
.ds-keys { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 0.84rem; color: var(--muted); margin-top: 8px; }
.ds-keys i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 6px; }
.ds-key-dark { background: #0b1550; }
.ds-key-moon { background: #56608c; }
.ds-key-twilight { background: #c9b896; }
.ds-key-core { background: #d4b073; border-radius: 50% !important; }
.ds-months { display: grid; gap: 4px; }
.ds-month { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 3.4em 4em; gap: 10px; align-items: center; font-size: 0.9rem; padding: 2px 6px; border-radius: 8px; }
.ds-month-head { color: var(--muted); font-size: 0.78rem; }
.ds-month-best { background: var(--accent-moon-soft); }
.ds-month strong { font-weight: 500; }
.ds-bar { height: 10px; border-radius: 5px; background: var(--line); overflow: hidden; }
.ds-bar i { display: block; height: 100%; background: #3f4f8f; border-radius: 5px; }
.ds-season { margin-bottom: 12px; }
.ds-season h4 { font-size: 0.95rem; margin: 0 0 4px; }

/* ---- Go darker ---- */
.ds-map-host { margin-top: 4px; border-radius: 14px; overflow: hidden; background: #090e28; }
.ds-map { display: block; margin: 0 auto; }
.ds-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.82rem; color: var(--muted); margin: 8px 0 14px; }
.ds-ramp { display: inline-block; width: 140px; height: 10px; border-radius: 5px; }
.ds-spots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .ds-spots { grid-template-columns: minmax(0, 1fr); } }
.ds-spot { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-size: 0.9rem; }
.ds-spot-band { color: var(--muted); font-size: 0.84rem; }
.ds-spot-sky { font-size: 2rem; font-weight: 300; margin: 2px 0; }
.ds-spot-name { font-weight: 600; margin-top: 6px; }
.ds-spot-links { margin-top: 6px; }
.ds-spot-links a { color: var(--accent-moon); }
.ds-spot-also { margin-top: 8px; font-size: 0.82rem; color: var(--muted); }

/* ---- Guides ---- */
.ds-tips, .ds-learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(17em, 1fr)); gap: 16px 22px; }
.ds-tips article[hidden] { display: none; }
.ds-tips h3, .ds-learn h3 { font-size: 1rem; margin-bottom: 4px; }
.ds-tips .ds-p, .ds-learn .ds-p { font-size: 0.93rem; }

/* ---- World map ---- */
.ds-world-host { border-radius: 14px; overflow: hidden; cursor: crosshair; background: #070a1f; }
.ds-world { display: block; width: 100%; }

/* ---- Method and sources ---- */
.ds-method strong { font-weight: 600; }
.ds-refs { margin-top: 18px; }
.ds-sources { margin: 8px 0 0; padding-left: 20px; columns: 2 26em; column-gap: 36px; font-size: 0.84rem; color: var(--muted); }
.ds-sources li { margin-bottom: 6px; break-inside: avoid; }
.ds-sources a { color: var(--accent-moon); }
