:root {
    --bg: #050713;
    --panel: rgba(10, 16, 44, 0.78);
    --panel-strong: rgba(12, 19, 55, 0.93);
    --line: rgba(140, 120, 255, 0.34);
    --line-bright: rgba(117, 208, 255, 0.38);
    --text: #f3f4ff;
    --muted: #aab0d5;
    --soft: #73799f;
    --accent: #9a6cff;
    --accent-2: #44d5ee;
    --green: #47e6a2;
    --warning: #ff9c5b;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background:
        radial-gradient(circle at 82% 7%, rgba(96, 142, 255, 0.36), transparent 24rem),
        radial-gradient(circle at 100% 18%, rgba(187, 66, 255, 0.2), transparent 18rem),
        linear-gradient(90deg, rgba(5, 7, 19, 0.96), rgba(5, 7, 19, 0.78)),
        url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=2200&q=85") center / cover fixed;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.92) 0 1px, transparent 1.5px),
        radial-gradient(circle, rgba(157, 196, 255, 0.7) 0 1px, transparent 1.5px);
    background-size: 135px 135px, 210px 210px;
    background-position: 0 0, 40px 75px;
    opacity: 0.34;
    z-index: -1;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
select,
input {
    font: inherit;
}

.dashboard {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 28px;
}

.topbar,
.section-head,
.panel-title.row,
.status-pills,
.fact-card,
.calc-controls,
footer {
    display: flex;
    align-items: center;
}

.topbar {
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 22px;
}

.eyebrow {
    margin: 0 0 10px;
    color: #b994ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p,
blockquote {
    margin-top: 0;
}

h1 {
    margin-bottom: 8px;
    font-size: clamp(34px, 4vw, 54px);
    line-height: 1;
    letter-spacing: 0;
}

.subtitle {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 17px;
}

.status-pills {
    gap: 12px;
    align-self: flex-start;
    white-space: nowrap;
}

.pill,
.mini-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 18px;
    color: #dfe3ff;
    border: 1px solid rgba(141, 129, 255, 0.28);
    border-radius: 999px;
    background: rgba(20, 26, 65, 0.84);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.pill.live {
    gap: 10px;
}

.pill.live i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 18px var(--green);
}

.mini-pill {
    min-height: 28px;
    padding-inline: 12px;
    color: #bbb2ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mini-pill.green {
    color: #80f7b7;
    background: rgba(50, 196, 132, 0.14);
    border-color: rgba(71, 230, 162, 0.18);
}

.feature-card,
.panel {
    position: relative;
    border: 1px solid var(--line);
    background: linear-gradient(145deg, rgba(12, 16, 48, 0.88), rgba(5, 8, 25, 0.9));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.apod-card {
    display: grid;
    grid-template-columns: 1.05fr 1.1fr;
    min-height: 306px;
    border-radius: 18px;
}

.apod-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0 auto;
    width: 360px;
    height: 220px;
    background: radial-gradient(circle at center, rgba(81, 140, 255, 0.3), transparent 68%);
    pointer-events: none;
}

.apod-image {
    min-height: 306px;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.25)),
        url("https://images.unsplash.com/photo-1465101162946-4377e57745c3?auto=format&fit=crop&w=1200&q=85") center / cover;
    overflow: hidden;
    position: relative;
}

.apod-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.25));
    pointer-events: none;
}

.apod-image img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 306px;
    object-fit: cover;
}

.apod-copy {
    display: grid;
    align-content: center;
    padding: 34px 40px;
    position: relative;
}

.section-head,
.panel-title.row {
    justify-content: space-between;
    gap: 16px;
}

.apod-copy h2 {
    max-width: 460px;
    margin-bottom: 16px;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.08;
}

.apod-copy p:not(.eyebrow) {
    max-width: 520px;
    color: #d8dcf6;
    line-height: 1.65;
}

.apod-copy .primary-action {
    margin-bottom: 28px;
}

.apod-source {
    position: absolute;
    right: 32px;
    bottom: 22px;
    margin: 0;
    color: #8f96c5;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 180ms ease;
}

.apod-source:hover {
    color: #c8cfff;
}

.primary-action,
.ghost-action,
.outline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(142, 121, 255, 0.42);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.primary-action {
    width: max-content;
    margin-top: 12px;
    padding: 0 22px;
    color: #ffffff;
    background: linear-gradient(100deg, #6c35ee, #37d6e6);
    box-shadow: 0 12px 28px rgba(55, 214, 230, 0.16);
}

.primary-action.full {
    width: 100%;
    margin-top: 18px;
}

.ghost-action,
.outline-action {
    color: #c3b8ff;
    background: rgba(31, 24, 80, 0.65);
}

.ghost-action {
    padding: 0 18px;
}

.outline-action {
    width: 100%;
    margin-top: 20px;
}

.fact-card {
    min-height: 156px;
    margin-top: 22px;
    padding: 28px 26px;
    justify-content: space-between;
    gap: 28px;
    border-radius: 16px;
    background:
        linear-gradient(90deg, rgba(9, 14, 45, 0.94), rgba(7, 9, 32, 0.84) 63%, rgba(7, 9, 32, 0.4)),
        url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?auto=format&fit=crop&w=1400&q=85") center / cover no-repeat;
}

blockquote {
    max-width: 720px;
    margin-bottom: 14px;
    padding-left: 36px;
    color: #ecedff;
    font-size: clamp(19px, 2.2vw, 25px);
    line-height: 1.42;
}

blockquote::before {
    content: '"';
    position: absolute;
    margin-left: -36px;
    margin-top: -4px;
    color: var(--accent);
    font-size: 46px;
    line-height: 1;
}

.fact-source {
    display: inline-flex;
    padding-left: 36px;
    color: var(--muted);
    font-size: 13px;
    transition: color 180ms ease, opacity 180ms ease, transform 180ms ease;
}

.fact-source:hover {
    color: #c8cfff;
}

#spaceFact {
    transition: opacity 180ms ease, transform 180ms ease;
}

#spaceFact.is-changing,
.fact-source.is-changing {
    opacity: 0;
    transform: translateY(8px);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.panel {
    min-height: 240px;
    padding: 24px;
    border-radius: 14px;
}

.feature-switcher {
    grid-column: 1 / -1;
    width: min(720px, 100%);
    margin: 0 auto;
    border: 1px solid rgba(140, 120, 255, 0.24);
    background: linear-gradient(145deg, rgba(8, 13, 40, 0.78), rgba(5, 8, 25, 0.66));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 14px 16px;
}

.feature-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-tab {
    min-height: 32px;
    padding: 0 14px;
    color: #c3b8ff;
    border: 1px solid rgba(142, 121, 255, 0.36);
    border-radius: 999px;
    background: rgba(31, 24, 80, 0.45);
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.feature-tab:hover,
.feature-tab.active {
    color: #ffffff;
    background: linear-gradient(100deg, rgba(108, 53, 238, 0.9), rgba(55, 214, 230, 0.72));
    transform: translateY(-1px);
}

.feature-content {
    min-height: 170px;
}

.feature-pane {
    display: none;
    grid-template-columns: minmax(160px, 0.75fr) minmax(160px, 1fr) auto;
    align-items: center;
    justify-items: center;
    text-align: center;
    gap: 16px;
    min-height: 170px;
    padding: 10px 4px 4px;
}

.feature-pane.active {
    display: grid;
}

.feature-switcher h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.feature-switcher .metric-list div {
    justify-content: center;
    gap: 10px;
}

.feature-switcher .outline-action.compact,
.feature-switcher .primary-action {
    margin-top: 8px;
}

#feature-distance.active {
    display: block;
    text-align: left;
}

.distance-layout {
    display: grid;
    gap: 14px;
    width: 100%;
}

.distance-layout .eyebrow {
    margin-bottom: 0;
    text-align: center;
}

.distance-layout .mini-pill,
.feature-copy .mini-pill {
    justify-self: center;
}

.distance-picker {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 10px;
}

.distance-select {
    display: grid;
    gap: 8px;
    color: #aeb3d8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.distance-arrow {
    padding-bottom: 10px;
    color: var(--accent-2);
    font-size: 20px;
    line-height: 1;
}

.distance-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.distance-stat {
    padding: 12px 8px;
    border: 1px solid rgba(140, 120, 255, 0.28);
    border-radius: 10px;
    background: rgba(10, 16, 44, 0.72);
    text-align: center;
}

.distance-stat-label {
    display: block;
    margin-bottom: 8px;
    color: #8f95bd;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.3;
}

.distance-stat-value {
    margin: 0;
    line-height: 1.15;
}

.distance-stat-value .stat-num {
    display: block;
    color: #ffffff;
    font-size: clamp(15px, 2.4vw, 19px);
    font-weight: 800;
    font-variant-numeric: lining-nums;
    letter-spacing: 0;
    word-break: break-word;
}

.distance-stat-value .stat-unit {
    display: block;
    margin-top: 4px;
    color: #aab0d5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.distance-calc-btn {
    width: 100%;
    margin-top: 0;
}

.feature-copy {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.compact-moon {
    min-height: 0;
}

.compact-list {
    max-height: 150px;
    width: 100%;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.compact-list:hover {
    scrollbar-color: rgba(154, 108, 255, 0.65) rgba(255, 255, 255, 0.05);
}

.compact-list::-webkit-scrollbar {
    width: 7px;
}

.compact-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.compact-list:hover::-webkit-scrollbar-thumb {
    background: rgba(154, 108, 255, 0.65);
}

.compact-list::-webkit-scrollbar-track {
    background: transparent;
}

.compact-list:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.panel label {
    display: grid;
    gap: 9px;
    color: #aeb3d8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

input,
select {
    width: 100%;
    height: 38px;
    color: var(--text);
    border: 1px solid rgba(128, 113, 255, 0.35);
    border-radius: 8px;
    background: rgba(8, 13, 43, 0.86);
    padding: 0 12px;
    outline: none;
}

.feature-copy .field-label {
    display: grid;
    gap: 9px;
    color: #aeb3d8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.moon-date-field {
    position: relative;
    display: block;
    width: 100%;
}

.moon-date-field::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 12px;
    width: 20px;
    height: 20px;
    transform: translateY(-50%);
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") center / 20px 20px no-repeat;
}

#moonDate {
    position: relative;
    width: 100%;
    color-scheme: dark;
    padding-right: 40px;
    cursor: pointer;
}

#moonDate::-webkit-calendar-picker-indicator {
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.feature-switcher .feature-loading,
.topic-list .feature-loading,
.scientist-list .feature-loading {
    margin: 0;
    padding: 18px 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

input:focus,
select:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 3px rgba(68, 213, 238, 0.12);
}

.moon-visual {
    display: grid;
    place-items: center;
    min-height: 150px;
}

.moon-orb {
    display: grid;
    place-items: center;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 0 36px rgba(194, 202, 255, 0.25);
}

.moon-orb svg {
    display: block;
}

.moon-panel h3 {
    margin-bottom: 12px;
    font-size: 21px;
}

.metric-list {
    display: grid;
    gap: 8px;
    margin: 0;
}

.metric-list div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.metric-list dt {
    color: #8f95bd;
}

.metric-list dd {
    margin: 0;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.metric-list.big {
    gap: 17px;
    margin-top: 20px;
}

.metric-list.big dt {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.metric-list.big dd {
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: 16px;
    font-weight: 800;
}

.sky-list,
.news-list,
.event-list,
.topic-list,
.scientist-list {
    display: grid;
}

.news-panel {
    display: flex;
    flex-direction: column;
    height: 520px;
    min-height: 520px;
    overflow: hidden;
}

.learn-panel,
.scientists-panel {
    display: flex;
    flex-direction: column;
    height: 520px;
    min-height: 520px;
    overflow: hidden;
}

.news-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-titlebar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-titlebar .eyebrow,
.card-titlebar .eyebrow {
    margin-bottom: 0;
}

.news-back,
.card-back {
    display: none;
    place-items: center;
    width: 31px;
    height: 31px;
    padding: 0;
    color: #e8e4ff;
    border: 1px solid rgba(154, 108, 255, 0.36);
    border-radius: 9px;
    background: rgba(31, 24, 80, 0.65);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.news-back.visible,
.card-back.visible {
    display: grid;
}

.news-scroll {
    flex: 1;
    min-height: 0;
    margin-top: 12px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 180ms ease;
}

.news-scroll:hover {
    scrollbar-color: rgba(154, 108, 255, 0.65) rgba(255, 255, 255, 0.05);
}

.news-scroll::-webkit-scrollbar {
    width: 7px;
}

.news-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.news-scroll:hover::-webkit-scrollbar-thumb {
    background: rgba(154, 108, 255, 0.65);
}

.news-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.news-scroll:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sky-item,
.news-item,
.event-item,
.topic-item,
.scientist-item {
    display: grid;
    border-bottom: 1px solid rgba(169, 170, 255, 0.11);
}

.sky-item {
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
}

.sky-dot {
    width: 23px;
    aspect-ratio: 1;
    border-radius: 50%;
}

.sky-name,
.news-title,
.event-title,
.topic-title,
.scientist-name {
    margin: 0;
    color: #f3f4ff;
    font-weight: 800;
}

.sky-meta,
.news-meta,
.topic-copy,
.event-time,
.scientist-field {
    color: var(--muted);
    font-size: 13px;
}

.news-item {
    grid-template-columns: 78px 1fr;
    gap: 14px;
    padding: 12px 0;
    width: 100%;
    color: inherit;
    text-align: left;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    background: transparent;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.news-item:hover {
    background: rgba(255, 255, 255, 0.035);
    transform: translateX(3px);
}

.news-thumb {
    width: 78px;
    height: 66px;
    border-radius: 8px;
    background: var(--image) center / cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.news-title {
    font-size: 14px;
    line-height: 1.35;
}

.news-meta {
    margin-top: 6px;
}

.news-loading {
    margin: 14px 0 0;
    color: #8f96c5;
    font-size: 12px;
    text-align: center;
}

.news-detail {
    display: grid;
    align-content: start;
    gap: 14px;
    margin-top: 18px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 180ms ease;
}

.news-detail:hover {
    scrollbar-color: rgba(154, 108, 255, 0.65) rgba(255, 255, 255, 0.05);
}

.news-detail::-webkit-scrollbar {
    width: 7px;
}

.news-detail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.news-detail:hover::-webkit-scrollbar-thumb {
    background: rgba(154, 108, 255, 0.65);
}

.news-detail::-webkit-scrollbar-track {
    background: transparent;
}

.news-detail:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.news-detail[hidden] {
    display: none;
}

.news-detail-image {
    display: block;
    width: 100%;
    min-height: 170px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    background: var(--image) center / cover;
}

.news-detail h3 {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
}

.news-detail p:not(.news-meta) {
    margin: 0;
    color: #d8dcf6;
    line-height: 1.55;
}

.calc-controls {
    gap: 14px;
    margin-top: 12px;
}

.calc-controls label {
    flex: 1;
}

.arrow {
    align-self: end;
    color: var(--accent);
    line-height: 38px;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 900;
}

.distance-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.distance-results div {
    display: grid;
    justify-content: start;
    gap: 6px;
    padding-left: 18px;
    border-left: 1px solid rgba(169, 170, 255, 0.14);
}

.event-item {
    grid-template-columns: 68px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 13px 0;
}

.event-date {
    display: grid;
    place-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    color: #e8eaff;
    background: rgba(17, 22, 62, 0.98);
    border: 1px solid rgba(154, 108, 255, 0.36);
    font-size: 12px;
    font-weight: 800;
}

.event-title {
    line-height: 1.35;
}

.topic-list,
.scientist-list {
    flex: 1;
    min-height: 0;
    gap: 10px;
    margin-top: 16px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 180ms ease;
}

.topic-list[hidden],
.scientist-list[hidden] {
    display: none;
}

.topic-list:hover,
.scientist-list:hover {
    scrollbar-color: rgba(154, 108, 255, 0.65) rgba(255, 255, 255, 0.05);
}

.topic-list::-webkit-scrollbar,
.scientist-list::-webkit-scrollbar {
    width: 7px;
}

.topic-list::-webkit-scrollbar-thumb,
.scientist-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.topic-list:hover::-webkit-scrollbar-thumb,
.scientist-list:hover::-webkit-scrollbar-thumb {
    background: rgba(154, 108, 255, 0.65);
}

.topic-list::-webkit-scrollbar-track,
.scientist-list::-webkit-scrollbar-track {
    background: transparent;
}

.topic-list:hover::-webkit-scrollbar-track,
.scientist-list:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.topic-item,
.scientist-item {
    grid-template-columns: 45px 1fr 20px;
    align-items: center;
    gap: 12px;
    padding: 12px;
    width: 100%;
    color: inherit;
    text-align: left;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.topic-item:hover,
.scientist-item:hover {
    background: rgba(255, 255, 255, 0.075);
    transform: translateX(3px);
}

.scientist-item {
    grid-template-columns: 45px 1fr;
}

.topic-icon,
.scientist-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: linear-gradient(145deg, rgba(137, 88, 255, 0.28), rgba(50, 222, 232, 0.08));
    color: #d8c7ff;
    font-weight: 900;
}

.scientist-avatar {
    background: linear-gradient(145deg, rgba(68, 213, 238, 0.2), rgba(154, 108, 255, 0.22));
    font-size: 12px;
}

.scientist-avatar.large {
    width: 58px;
    height: 58px;
    font-size: 16px;
}

.topic-title,
.scientist-name {
    display: block;
    font-size: 14px;
}

.topic-copy,
.scientist-field {
    display: block;
    margin: 4px 0 0;
    line-height: 1.3;
}

.info-detail {
    display: grid;
    align-content: start;
    gap: 14px;
    margin-top: 16px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
    transition: scrollbar-color 180ms ease;
}

.info-detail:hover {
    scrollbar-color: rgba(154, 108, 255, 0.65) rgba(255, 255, 255, 0.05);
}

.info-detail::-webkit-scrollbar {
    width: 7px;
}

.info-detail::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: transparent;
}

.info-detail:hover::-webkit-scrollbar-thumb {
    background: rgba(154, 108, 255, 0.65);
}

.info-detail::-webkit-scrollbar-track {
    background: transparent;
}

.info-detail:hover::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.info-detail[hidden] {
    display: none;
}

.detail-kicker {
    color: #b994ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.info-detail h3 {
    margin: 0;
    font-size: 24px;
    line-height: 1.18;
}

.info-detail p {
    margin: 0;
    color: #d8dcf6;
    line-height: 1.55;
}

footer {
    justify-content: space-between;
    gap: 16px;
    padding: 28px 22px 0;
    color: #7e84a8;
    font-size: 12px;
}

body.teal-mode {
    --accent: #42e2d9;
    --accent-2: #9a6cff;
    --line: rgba(68, 213, 238, 0.31);
}

@media (max-width: 1100px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-pane {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .dashboard {
        width: calc(100% - 32px);
        padding: 24px 16px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .status-pills {
        flex-wrap: wrap;
    }

    .apod-card {
        grid-template-columns: 1fr;
    }

    .apod-image {
        min-height: 230px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .distance-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    h1 {
        font-size: 36px;
    }

    .apod-copy,
    .panel,
    .fact-card {
        padding: 20px;
    }

    .apod-source {
        position: static;
        margin-top: 10px;
    }

    .apod-copy .primary-action {
        margin-bottom: 0;
    }

    .fact-card {
        align-items: stretch;
        flex-direction: column;
        background-size: auto 100%;
    }

    blockquote,
    .fact-source {
        padding-left: 28px;
    }

    .sky-item,
    .news-item,
    .event-item {
        grid-template-columns: 1fr;
    }

    .news-thumb {
        width: 100%;
        height: 130px;
    }

    .calc-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .distance-picker {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .distance-arrow {
        padding-bottom: 0;
        text-align: center;
    }

    .feature-switcher {
        width: 100%;
        padding: 14px;
    }

    .arrow {
        align-self: center;
        line-height: 1;
    }
}
