/* The solar observer page (/solar-observer), light theme. solar-observer-dark.css
   overrides it for the dark theme (linked with data-theme-dark, so the OS and
   the Settings menu both drive it). The SDO photo and the disk diagram's face
   stay as they are in both themes. */

.so-intro { margin-bottom: 16px; }
.so-page { display: block; }

.so-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin: 0 0 18px;
  min-width: 0;
}
.so-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 12px; }
.so-card-head h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #b5551d; }
.so-card-head .card-caption { margin-left: auto; margin-right: 0; }
.so-utc { white-space: nowrap; }
.so-card a:not([class]) { color: var(--accent-moon); }
.so-card h3 { font-size: 1rem; margin: 0 0 6px; }
.so-empty { color: var(--muted); }

/* ---- Info tips: details/summary, so they work without JavaScript ---- */
.so-info { position: relative; display: inline-block; vertical-align: middle; text-transform: none; letter-spacing: 0; }
.so-info summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--muted);
  font: italic 600 11px/1 Georgia, serif;
  cursor: pointer;
  user-select: none;
}
.so-info summary::-webkit-details-marker { display: none; }
.so-info[open] summary, .so-info summary:hover { color: var(--text); border-color: var(--muted); }
.so-info summary:focus-visible { outline: 2px solid #b5551d; outline-offset: 1px; }
.so-info-body {
  position: absolute;
  z-index: 20;
  top: 24px;
  left: -12px;
  width: min(340px, 80vw);
  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-size: 0.86rem;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.45;
}
.so-tile:nth-child(3n) .so-info-body { left: auto; right: -12px; }
@media (max-width: 720px) {
  .so-card { position: relative; }
  .so-info { position: static; }
  .so-info .so-info-body, .so-tile:nth-child(3n) .so-info-body { top: auto; left: 12px; right: 12px; width: auto; margin-top: 6px; }
}

/* ---- SDO ---- */
.so-channels { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.so-channels a {
  padding: 4px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.86rem;
  text-decoration: none;
  white-space: nowrap;
}
.so-channels a:hover { color: var(--text); border-color: var(--muted); }
.so-channels a[aria-current="true"] { background: var(--accent-sun-soft); border-color: #e7b98f; color: var(--text); font-weight: 600; }
.so-channels a:focus-visible { outline: 2px solid #b5551d; outline-offset: 1px; }
.so-figure { margin: 0; display: grid; gap: 14px; }
@media (min-width: 900px) { .so-figure { grid-template-columns: minmax(0, 620px) minmax(0, 1fr); align-items: start; } }
.so-photo { position: relative; background: #000; border-radius: 14px; overflow: hidden; aspect-ratio: 1; max-width: 620px; }
.so-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.so-photo.is-loading img { opacity: 0.55; transition: opacity 0.2s; }
.so-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.so-overlay[hidden] { display: none; }
.so-overlay .g { fill: none; stroke: rgb(255 255 255 / 0.42); stroke-width: 1.6; }
.so-overlay .g-strong { stroke: rgb(255 255 255 / 0.8); stroke-width: 2.4; }
.so-overlay .g-limb { fill: none; stroke: rgb(255 214 120 / 0.7); stroke-width: 2; stroke-dasharray: 8 8; }
.so-overlay .r { fill: none; stroke: #ffd34d; stroke-width: 3; }
.so-overlay text { font: 600 26px system-ui, sans-serif; fill: #fff; paint-order: stroke; stroke: rgb(0 0 0 / 0.85); stroke-width: 5px; }
.so-overlay text.limb { font-size: 24px; fill: #ffd78a; }
.so-figure figcaption { font-size: 0.92rem; display: grid; gap: 8px; align-content: start; }
.so-shows { margin: 0; }
.so-grid-control { margin: 0; display: grid; gap: 2px; }
.so-grid-control[hidden] { display: none; }
.so-grid-control label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.so-grid-control input { accent-color: #c9662a; }
.so-credit { margin: 0; color: var(--muted); font-size: 0.82rem; }

/* ---- Orientation ---- */
.so-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 720px) { .so-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.so-sunspots .so-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .so-sunspots .so-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.so-tile { border-radius: 14px; padding: 10px 12px; background: var(--bg); border-left: 4px solid var(--accent-sun); min-width: 0; }
.so-tile-label { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.so-tile-label sub { text-transform: none; }
.so-tile-value { font-size: 1.55rem; font-weight: 650; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.so-tile-value small { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.so-tile-note { color: var(--muted); font-size: 0.82rem; }
.so-tile-main .so-tile-value { font-size: 2rem; }
@media (max-width: 480px) {
  .so-card { padding: 14px 12px; }
  .so-tile { padding: 8px 10px; }
  .so-tile-value { font-size: 1.25rem; }
  .so-tile-main .so-tile-value { font-size: 1.6rem; }
}

.so-disk-row { display: grid; gap: 16px; margin-top: 16px; }
@media (min-width: 760px) { .so-disk-row { grid-template-columns: minmax(0, 340px) minmax(0, 1fr); align-items: start; } }
.so-disk { margin: 0; }
.so-disk svg { display: block; width: 100%; max-width: 340px; height: auto; overflow: visible; }
.so-disk figcaption { margin-top: 6px; font-size: 0.82rem; }
.so-face { fill: #fbe3b4; stroke: #d48a2a; stroke-width: 1.5; }
.so-grid path { fill: none; stroke: #b9873e; stroke-width: 0.6; opacity: 0.75; }
.so-grid .so-equator, .so-grid .so-cm { stroke: #8a531a; stroke-width: 1.4; opacity: 1; }
.so-axis { stroke: #7a2f12; stroke-width: 1.6; }
.so-axis-tip { fill: #7a2f12; }
.so-cn { fill: var(--accent-moon); }
.so-region { fill: #2a2a2a; stroke: #fff; stroke-width: 0.8; }
.so-label { font: 600 11px system-ui, sans-serif; text-anchor: middle; dominant-baseline: middle; fill: var(--text); }
.so-label-pole { fill: #7a2f12; }
.so-label-sky { fill: var(--accent-moon); }
.so-label-region { font-size: 9px; text-anchor: start; fill: #3a2a1a; }

.so-place p { margin: 0 0 8px; }
.so-views { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 4px; }
.so-views[hidden] { display: none; }
.so-views legend { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.so-views label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 0.92rem; }
.so-views input { accent-color: #c9662a; }
.so-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 8px 0; }
.so-facts div { background: var(--bg); border-radius: 12px; padding: 8px 10px; }
.so-facts dt { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; display: flex; gap: 6px; align-items: center; }
.so-facts dd { margin: 0; font-size: 1.3rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---- Tables ---- */
.so-table-wrap { overflow-x: auto; }
.so-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.so-table th, .so-table td { padding: 5px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.so-table th:first-child { text-align: left; }
.so-table thead th { color: var(--muted); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.so-table tbody th { font-weight: 600; }
.so-table tr.so-new-rotation td, .so-table tr.so-new-rotation th { border-bottom: 2px solid var(--accent-sun); }
.so-daily .so-table-wrap { max-height: 420px; overflow-y: auto; }
.so-daily thead th { position: sticky; top: 0; background: var(--surface); }
.so-regions-table td:nth-child(2), .so-regions-table td:nth-child(6), .so-regions-table td:nth-child(7) { text-align: left; }
.so-recent { margin-top: 12px; }
.so-recent summary { cursor: pointer; color: var(--accent-moon); }
.so-recent .so-table { margin-top: 8px; max-width: 460px; }

/* ---- Charts (drawn by the island) ---- */
.so-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.so-charts[hidden] { display: none; }
@media (min-width: 820px) { .so-charts { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.so-chart { margin: 0; min-width: 0; }
.so-chart svg { display: block; width: 100%; height: auto; }
.so-chart figcaption { margin-top: 4px; font-size: 0.82rem; }
.so-axis-text { font-size: 9px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.so-gridline { stroke: var(--line); stroke-width: 0.7; }
.so-bar { fill: #e8a04a; }
.so-bar-month { fill: #f2c58c; }
.so-smoothed { fill: none; stroke: #b5551d; stroke-width: 2; }
.so-forecast { fill: none; stroke: #b5551d; stroke-width: 1.6; stroke-dasharray: 4 3; }
.so-forecast-band { fill: #b5551d; opacity: 0.14; }
.so-now { stroke: var(--muted); stroke-dasharray: 2 3; stroke-width: 1; }

/* ---- Sources and links ---- */
.so-sources-h { font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: #b5551d; margin-bottom: 8px; }
.so-sources ol { padding-left: 1.4em; margin: 8px 0; display: grid; gap: 6px; font-size: 0.9rem; }
.so-sources a { color: var(--accent-moon); overflow-wrap: anywhere; }
.so-sources details > summary { cursor: pointer; color: var(--accent-moon); }
.so-next { margin: 0 0 18px; }
.so-next a { color: var(--accent-moon); }
