.astronomy-section { margin-bottom: 32px; }
.astro-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.astro-panel { padding: 20px; }
.astro-panel h3 { margin: 0 0 16px; font-size: 16px; }
.astro-note { color: var(--tblr-secondary-color, #7f97aa); font-size: 12px; line-height: 1.7; }
.astro-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.astro-table th, .astro-table td { padding: 10px 4px; border-bottom: 1px solid #7f97aa35; text-align: right; }
.astro-table th:first-child { text-align: left; }
.astro-table thead { color: #7f97aa; font-size: 10px; }
.astro-stats { margin: 16px 0 0; font-size: 12px; }
.astro-stats > div, .astro-phases li { display: flex; justify-content: space-between; gap: 12px; padding-block: 6px; }
.astro-stats dt { font-weight: 500; }
.astro-stats dd { margin: 0; white-space: nowrap; }
.astro-stats small { display: block; color: #7f97aa; }
.astro-phase { font-size: 20px; margin-bottom: 8px; }
.astro-subheading { margin-top: 20px !important; }
.astro-phases { padding: 0; margin: 0; list-style: none; font-size: 12px; }
.astro-phases li { border-bottom: 1px solid #7f97aa35; }
.astro-tonight { margin-top: 16px; }
.astro-label { color: #7f97aa; font: 10px/1.5 var(--internal-mono); letter-spacing: .08em; margin-bottom: 6px; }
.astro-window { color: #75dcfa; font-weight: 600; }
[data-bs-theme="light"] .astro-window { color: #0969a5; }
@media (max-width: 700px) { .astro-grid { grid-template-columns: minmax(0, 1fr); } .astro-panel { padding: 14px; } }

.portal-shell {
  width: min(1140px, calc(100% - 48px));
  margin-inline: auto;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  min-width: 320px;
  background-color: #05080c;
  background-image: linear-gradient(rgba(5, 8, 12, .34), rgba(5, 8, 12, .52)), url("../background.jpg");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.portal-header {
  border-top: 2px solid #22bceb;
  background: linear-gradient(180deg, #111d29, #081019);
  box-shadow: inset 0 -1px 0 #bce1f60d;
}

.header-inner {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #f3f8fc;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
}

.brand:hover { color: #fff; text-decoration: none; }
.brand-mark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #22bceb; border-radius: 5px; color: #75dcfa; font: 700 15px/1 var(--internal-mono); box-shadow: inset 0 0 14px #22bceb1c; }
.brand-suffix { color: #7f97aa; font-weight: 500; }

.primary-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.primary-nav a { padding: 9px 12px; border: 1px solid transparent; border-radius: 5px; color: #aec1d0; font-size: 13px; font-weight: 500; text-decoration: none; }
.primary-nav a:hover, .primary-nav a:focus-visible { border-color: #1b3040; background: #122230; color: #75dcfa; text-decoration: none; }
.theme-toggle { padding: 8px 11px; border: 1px solid #2d485c; border-radius: 5px; background: #0c1620; color: #c2d2df; font: 500 12px/1.5 var(--tblr-font-sans-serif); white-space: nowrap; }
.theme-toggle:hover { border-color: #22bceb; color: #75dcfa; }

.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 38px 0 30px; }
.page-pretitle { margin: 0 0 8px; color: #7f97aa; font: 10px/1.5 var(--internal-mono); letter-spacing: .12em; }
.page-pretitle span { padding-inline: 5px; color: #22bceb; }
.page-title { margin: 0; color: #f3f8fc; font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.welcome-copy { margin: 8px 0 0; color: #8eaabd; font-size: 14px; }
.local-time { display: grid; min-width: 144px; gap: 1px; padding: 10px 14px; border-left: 1px solid #22bceb; background: linear-gradient(90deg, #0c141d, transparent); text-align: right; }
.time-label, .local-time time { font-family: var(--internal-mono); }
.time-label { color: #7f97aa; font-size: 9px; letter-spacing: .12em; }
.local-time time { color: #75dcfa; font-size: 20px; }
.local-time > span:last-child { color: #8eaabd; font-size: 11px; }

.search-section, .resource-section { min-width: 0; }
.search-section { padding: 22px 0 26px; border-top: 1px solid #1b3040; border-bottom: 1px solid #1b3040; }
.section-heading { display: flex; min-height: 48px; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; color: #f3f8fc; font-size: 18px; font-weight: 600; }
.section-kicker, .section-count { margin: 0 0 3px; color: #7f97aa; font: 9px/1.5 var(--internal-mono); letter-spacing: .1em; }
.section-note { color: #7f97aa; font-size: 12px; }
.search-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.search-panel { min-width: 0; padding: 15px; border: 1px solid #243c4e; border-radius: 6px; background: linear-gradient(145deg, #12202c, #0c141d 70%); }
.search-panel label { display: block; margin-bottom: 9px; color: #dce8f1; font-size: 12px; font-weight: 600; }
.search-controls { display: flex; gap: 8px; }
.search-controls .form-control { min-width: 0; height: 40px; }
.search-controls .btn { flex: 0 0 auto; padding: 8px 14px; }

.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; padding: 26px 0 38px; }
.resource-column { display: grid; align-content: start; gap: 28px; min-width: 0; }
.resource-list { border-top: 1px solid #1b3040; }
.resource-link { display: grid; min-height: 72px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 13px; padding: 10px 8px; border-bottom: 1px solid #1b3040; color: inherit; text-decoration: none; transition: background-color .16s ease, padding .16s ease; }
.resource-link:hover, .resource-link:focus-visible { padding-inline: 12px; background: #0c1822; color: inherit; text-decoration: none; }
.resource-index { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #294357; border-radius: 5px; background: #101d28; color: #75b5f5; font: 10px/1 var(--internal-mono); }
.resource-copy { display: grid; min-width: 0; gap: 3px; }
.resource-copy strong { overflow: hidden; color: #e2edf5; font-size: 13px; font-weight: 600; text-overflow: ellipsis; }
.resource-copy small { overflow: hidden; color: #7f97aa; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.resource-action { color: #75b5f5; font-size: 11px; white-space: nowrap; }
.resource-link:hover .resource-action { color: #75dcfa; }
.sky-section { grid-column: 1 / -1; }
.subpage > .sky-section { margin-bottom: 32px; }
.sky-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }

.subpage { min-height: 0; padding-top: 28px; }
#main { flex: 1 0 auto; }
.back-link { color: #8eaabd; font-size: 12px; text-decoration: none; }
.back-link:hover { color: #75dcfa; }
.subpage-heading { padding-top: 25px; }
.subpage-heading .btn { text-decoration: none; white-space: nowrap; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.chart-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 42px; }
.chart-panel { min-width: 0; overflow: hidden; border: 1px solid #2d485c; border-radius: 6px; background: linear-gradient(145deg, #132230, #0c151f 65%, #081019); box-shadow: inset 0 1px 0 #d6effc12, 0 8px 20px #0003; }
.chart-label { color: #7f97aa; font: 9px/1.5 var(--internal-mono); letter-spacing: .1em; }
.chart-panel > .chart-label { display: block; padding: 13px 15px 10px; }
.chart-panel > img { display: block; width: 100%; height: auto; border-top: 1px solid #1b3040; background: #fff; }
.solar-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding-bottom: 42px; }
.solar-panel { padding: 15px; }
.solar-wide { grid-column: 1 / -1; }
.chart-heading { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding-bottom: 12px; }
.chart-heading a { color: #75b5f5; font-size: 11px; }
.feed-image { display: grid; min-height: 170px; place-items: center; overflow: hidden; border: 1px solid #1b3040; border-radius: 4px; background: #080f16; }
.feed-image img { display: block; max-width: 100%; max-height: 560px; object-fit: contain; }
.solar-wide .feed-image img { width: 100%; }

.portal-footer { flex: 0 0 auto; border-top: 1px solid #1b3040; background: #070c11; }
.footer-inner { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 16px; color: #7f97aa; font-size: 10px; }
.footer-inner a { color: #8eaabd; text-decoration: none; }
.footer-inner a:hover { color: #22bceb; }

[data-bs-theme="light"] body { background-image: linear-gradient(rgba(9, 105, 165, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(9, 105, 165, .035) 1px, transparent 1px), linear-gradient(180deg, #f3f6fa, #eaf0f6); }
[data-bs-theme="light"] .portal-header { background: linear-gradient(180deg, #fff, #eaf0f6); }
[data-bs-theme="light"] .brand { color: #243447; }
[data-bs-theme="light"] .primary-nav a { color: #344d63; }
[data-bs-theme="light"] .primary-nav a:hover { background: #e3edf5; color: #0969a5; }
[data-bs-theme="light"] .theme-toggle { background: #fff; border-color: #b9cad9; color: #344d63; }
[data-bs-theme="light"] .welcome-copy, [data-bs-theme="light"] .local-time > span:last-child { color: #52687b; }
[data-bs-theme="light"] .page-title { color: #243447; }
[data-bs-theme="light"] .local-time { background: linear-gradient(90deg, #eaf0f6, transparent); }
[data-bs-theme="light"] .section-heading h2, [data-bs-theme="light"] .resource-copy strong { color: #243447; }
[data-bs-theme="light"] .search-panel, [data-bs-theme="light"] .chart-panel { background: linear-gradient(145deg, #fff, #f0f5fa); border-color: #cbd7e2; }
[data-bs-theme="light"] .search-panel label { color: #344d63; }
[data-bs-theme="light"] .resource-link:hover { background: #eaf0f6; }
[data-bs-theme="light"] .resource-index { background: #edf3f8; border-color: #cbd7e2; }
[data-bs-theme="light"] .resource-list, [data-bs-theme="light"] .resource-link, [data-bs-theme="light"] .search-section { border-color: #cbd7e2; }
[data-bs-theme="light"] .portal-footer { background: #eaf0f6; border-color: #cbd7e2; }
[data-bs-theme="light"] .feed-image { background: #edf3f8; border-color: #cbd7e2; }

@media (max-width: 700px) {
  .portal-shell { width: min(100% - 32px, 540px); }
  .header-inner { min-height: 66px; gap: 10px; flex-wrap: wrap; padding-block: 10px; }
  .brand { font-size: 18px; }
  .brand-mark { width: 25px; height: 25px; }
  .primary-nav { order: 3; width: 100%; justify-content: space-between; margin: 0; border-top: 1px solid #1b3040; }
  .primary-nav a { padding: 9px 8px; }
  .theme-toggle { margin-left: auto; }
  .welcome-row { align-items: start; flex-direction: column; padding-top: 28px; }
  .page-title { font-size: 26px; }
  .local-time { display: flex; min-width: 0; align-items: baseline; gap: 10px; padding: 0 0 0 10px; text-align: left; }
  .local-time time { font-size: 17px; }
  .search-grid, .resource-grid, .chart-grid, .solar-grid { grid-template-columns: minmax(0, 1fr); }
  .resource-grid { gap: 24px; }
  .sky-section, .solar-wide { grid-column: auto; }
  .sky-links { grid-template-columns: minmax(0, 1fr); }
  .section-note { display: none; }
  .subpage { padding-top: 20px; }
  .subpage-heading { align-items: start; flex-direction: column; }
  .footer-inner { padding-block: 8px; }
}

@media (max-width: 420px) {
  .portal-shell { width: calc(100% - 24px); }
  .welcome-row { gap: 12px; }
  .local-time { min-width: 0; }
  .time-label { font-size: 8px; }
  .resource-link { grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding-inline: 4px; }
  .resource-index { width: 29px; height: 29px; }
  .resource-copy strong { font-size: 12px; }
  .resource-action { font-size: 10px; }
  .search-controls { align-items: stretch; flex-direction: column; }
  .search-controls .btn { width: 100%; }
  .chart-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
