:root {
    --bg: #ffffff;
    --bg-soft: #f5f8fb;
    --facts-bg: #a3d5ff;
    --panel: #ffffff;
    --text: #0d141a;
    --muted: #344350;
    --line: rgba(13, 20, 26, 0.14);
    --accent: #000000;
    --accent-strong: #1d1e20;
    --max-width: 1120px;
}

/* Public visual system: the editorial/admin interface retains its neutral
   workspace palette, while the reader-facing site gets a distinct identity. */
body:not(.admin-page) {
    --bg: #f7fafc;
    --bg-soft: #eaf2f8;
    --facts-bg: #dfeefa;
    --panel: rgba(255, 255, 255, 0.9);
    --text: #102236;
    --muted: #51657a;
    --line: rgba(35, 68, 98, 0.16);
    --accent: #087db8;
    --accent-strong: #046899;
    background:
        radial-gradient(circle at 12% -12%, rgba(83, 179, 230, 0.18), transparent 31rem),
        radial-gradient(circle at 88% 18%, rgba(112, 147, 218, 0.1), transparent 30rem),
        var(--bg);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Open Sans", Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.75;
}

body:not(.admin-page)::before {
    content: "";
    position: fixed;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    opacity: 0.17;
    background-image: radial-gradient(rgba(14, 83, 130, 0.5) 0.65px, transparent 0.8px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

a {
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.container {
    width: min(var(--max-width), calc(100% - 40px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 74px;
    padding: 0 max(20px, calc((100vw - var(--max-width)) / 2));
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

body:not(.admin-page) .site-header {
    min-height: 68px;
    background: rgba(5, 15, 29, 0.8);
    border-bottom-color: rgba(156, 208, 244, 0.14);
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    color: var(--text);
}

body:not(.admin-page) .brand {
    letter-spacing: 0.025em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: #ffffff;
}

body:not(.admin-page) .brand img {
    width: 27px;
    height: 27px;
    color: #79d7fa;
}

.brand__domain {
    color: #79d7fa;
}

.nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 0.9rem;
}

.nav-toggle,
.nav-item__toggle {
    display: none;
}

.nav-item {
    position: relative;
}

.nav-item--has-children {
    position: relative;
}

.nav a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--text);
    text-decoration: none;
}

.nav a:hover,
.nav a:focus-visible {
    color: var(--text);
}

body:not(.admin-page) .nav {
    gap: 18px;
    font-size: 0.82rem;
}

body:not(.admin-page) .nav > .nav-item > a,
body:not(.admin-page) .nav > a {
    position: relative;
    color: #d9eafa;
}

body:not(.admin-page) .nav > .nav-item > a::before,
body:not(.admin-page) .nav > a::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 8px;
    left: 0;
    height: 2px;
    border-radius: 99px;
    background: var(--accent);
    box-shadow: 0 0 14px rgba(73, 200, 255, 0.8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}

body:not(.admin-page) .nav > .nav-item > a:hover::before,
body:not(.admin-page) .nav > .nav-item > a:focus-visible::before,
body:not(.admin-page) .nav > a:hover::before,
body:not(.admin-page) .nav > a:focus-visible::before {
    transform: scaleX(1);
}

.nav-item--has-children > a::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 8px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 20;
    min-width: 210px;
    padding: 16px 10px 10px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(13, 20, 26, 0.16);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

body:not(.admin-page) .submenu {
    min-width: 236px;
    padding: 10px;
    background: rgba(10, 28, 48, 0.96);
    border-color: rgba(139, 204, 245, 0.22);
    border-radius: 14px;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
}

body:not(.admin-page) .submenu a {
    color: #dceeff;
}

body:not(.admin-page) .submenu a:hover,
body:not(.admin-page) .submenu a:focus-visible {
    color: #ffffff;
    background: rgba(73, 200, 255, 0.13);
}

.submenu a {
    display: flex;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.submenu a:hover,
.submenu a:focus-visible {
    background: var(--bg-soft);
}

.nav-item--has-children:hover .submenu,
.nav-item--has-children:focus-within .submenu {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.hero {
    position: relative;
    min-height: 520px;
    display: grid;
    align-items: end;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(13, 20, 26, 0.72) 0%, rgba(13, 20, 26, 0.42) 48%, rgba(13, 20, 26, 0.12) 100%),
        var(--hero-image, url("https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1920,fit=crop/m2WpjDnVQNT7OVER/luna_abitata_e_terra-dWxyJrN85EipqVjD.jpeg")) center 45% / cover no-repeat;
}

body:not(.admin-page) .hero {
    min-height: min(620px, 72vh);
    border-bottom: 1px solid rgba(172, 219, 248, 0.22);
}

body:not(.admin-page) .hero::after {
    content: "";
    position: absolute;
    right: -10%;
    bottom: -26%;
    width: min(52vw, 650px);
    aspect-ratio: 1;
    border: 1px solid rgba(142, 224, 255, 0.26);
    border-radius: 50%;
    box-shadow: 0 0 0 58px rgba(142, 224, 255, 0.035), 0 0 0 116px rgba(142, 224, 255, 0.025);
    pointer-events: none;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.36) 100%);
    pointer-events: none;
}

.hero--artemis {
    background:
        linear-gradient(90deg, rgba(13, 20, 26, 0.76) 0%, rgba(13, 20, 26, 0.48) 48%, rgba(13, 20, 26, 0.16) 100%),
        url("https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1920,fit=crop/m2WpjDnVQNT7OVER/luna_abitata_e_terra-dWxyJrN85EipqVjD.jpeg") center 45% / cover no-repeat;
}

.hero--missions {
    background:
        linear-gradient(90deg, rgba(13, 20, 26, 0.76) 0%, rgba(13, 20, 26, 0.44) 52%, rgba(13, 20, 26, 0.14) 100%),
        url("https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1920,fit=crop/m2WpjDnVQNT7OVER/artemis-program-infographic-odni9d5lAarKSojn.webp") center 45% / cover no-repeat;
}

.hero__content {
    position: relative;
    padding: 120px 0 72px;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(3rem, 7vw, 6.8rem);
    line-height: 0.95;
    font-weight: 800;
    color: #ffffff;
    font-family: Roboto, Arial, Helvetica, sans-serif;
}

body:not(.admin-page) .hero h1 {
    max-width: 850px;
    letter-spacing: -0.045em;
    text-wrap: balance;
    text-shadow: 0 8px 30px rgba(0, 0, 0, 0.38);
}

.hero p,
.hero__text p {
    max-width: 720px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.18rem;
}

.hero__text p + p {
    margin-top: 10px;
}

.hero__text a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.section {
    padding: 72px 0;
}

.section--page-index {
    padding: 28px 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
}

body:not(.admin-page) .section--page-index {
    background: rgba(255, 255, 255, 0.7);
}

body:not(.admin-page) .page-index a {
    color: #15334d;
    background: #ffffff;
    border-color: rgba(51, 117, 161, 0.22);
}

body:not(.admin-page) .page-index a:hover,
body:not(.admin-page) .page-index a:focus-visible {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.page-index {
    display: grid;
    gap: 14px;
}

.page-index h2 {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 1.1rem;
    line-height: 1.2;
}

.page-index ol {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-index a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.page-index a:hover,
.page-index a:focus-visible {
    border-color: rgba(13, 20, 26, 0.32);
}

.section--facts {
    background: var(--facts-bg);
}

body:not(.admin-page) .section--facts {
    background: linear-gradient(120deg, #dff1fd, #eef6fc);
}

.section--intro {
    padding-top: 42px;
}

.prose {
    max-width: 950px;
    text-align: justify;
}

.prose p,
.program-card p,
.timeline-item p {
    margin: 0 0 18px;
    color: var(--muted);
}

.prose ul,
.prose ol,
.program-card ul,
.program-card ol,
.timeline-item ul,
.timeline-item ol,
.mission-more__section ul,
.mission-more__section ol {
    margin: 0 0 18px;
    padding-left: 22px;
    color: var(--muted);
    line-height: 1.65;
}

.prose li,
.program-card li,
.timeline-item li,
.mission-more__section li {
    margin-bottom: 8px;
}

.prose a,
.program-card a,
.timeline-item a,
.mission-more__section a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.table-scroll {
    width: 100%;
    max-width: 100%;
    margin: 22px 0;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.table-scroll > table,
.prose table,
.program-card table,
.timeline-item table,
.content-section table,
.mission-more__section table,
.rich-editor__surface table {
    width: max-content;
    min-width: 100%;
    margin: 0;
    border-spacing: 0;
    border-collapse: collapse;
    color: var(--text);
}

.prose th,
.prose td,
.program-card th,
.program-card td,
.timeline-item th,
.timeline-item td,
.content-section th,
.content-section td,
.mission-more__section th,
.mission-more__section td,
.rich-editor__surface th,
.rich-editor__surface td {
    min-width: 130px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.prose th,
.program-card th,
.timeline-item th,
.content-section th,
.mission-more__section th,
.rich-editor__surface th {
    background: var(--bg-soft);
    font-weight: 700;
}

.prose td,
.program-card td,
.timeline-item td,
.content-section td,
.mission-more__section td {
    color: var(--muted);
}

.content-sources {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.content-sources h4 {
    margin: 0 0 8px;
    color: var(--text);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.25;
}

.content-sources ol {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 20px;
}

.content-sources li {
    color: var(--muted);
    line-height: 1.45;
}

.content-sources li span {
    display: inline-block;
    margin-right: 8px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.content-sources a {
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.content-sources small {
    display: block;
    margin-top: 2px;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 36px;
}

.section-heading h2,
.program-card h2,
.program-card h3 {
    margin: 6px 0 10px;
    font-size: clamp(2rem, 4vw, 3.25rem);
    line-height: 1.08;
}

.program-card h3 {
    font-size: clamp(1.45rem, 2.6vw, 2.2rem);
}

.section-heading p {
    margin: 0;
    color: var(--muted);
}

.eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.program-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.86fr);
    gap: 0;
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(13, 20, 26, 0.12);
}

body:not(.admin-page) .program-card {
    border-color: rgba(151, 210, 247, 0.2);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.program-card img {
    width: 100%;
    height: 100%;
    min-height: 380px;
    object-fit: cover;
}

.program-card__body {
    padding: clamp(28px, 5vw, 54px);
}

.program-card--compact {
    margin-top: 20px;
}

.home-explore {
    padding: clamp(42px, 6vw, 76px) 0 clamp(64px, 8vw, 104px);
}

.home-explore__heading {
    max-width: 700px;
    margin-bottom: 34px;
}

.home-explore__heading h2 {
    margin: 0 0 12px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(2.15rem, 4.5vw, 4rem);
    line-height: 1.05;
}

.home-explore__heading p {
    margin: 0;
    color: var(--muted);
}

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

.home-explore .program-card {
    display: block;
    min-height: 100%;
    margin: 0;
    border-radius: 16px;
}

.home-explore .program-card__body {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    padding: 28px;
}

.home-explore .program-card h3 {
    font-size: clamp(1.3rem, 2vw, 1.65rem);
}

.home-explore .program-card p {
    font-size: 0.96rem;
    line-height: 1.6;
}

.home-explore .button {
    width: fit-content;
    margin-top: auto;
}

.site-footer a {
    color: #c5e9fa;
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.program-card--compact img {
    min-height: 260px;
}

.button {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 10px;
    padding: 0 22px;
    background: var(--accent);
    color: #ffffff;
    border-radius: 999px;
    font-weight: 400;
    text-decoration: none;
}

body:not(.admin-page) .button {
    color: #ffffff;
    box-shadow: 0 9px 22px rgba(8, 125, 184, 0.2);
    font-weight: 700;
}

body:not(.admin-page) .button:hover,
body:not(.admin-page) .button:focus-visible {
    color: #ffffff;
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.button:hover,
.button:focus-visible {
    background: var(--accent-strong);
}

/* Keep call-to-action labels legible inside cards: the generic card-link
   rule has greater selector specificity than .button on its own. */
.program-card a.button {
    color: #ffffff;
    text-decoration: none;
}

.button--secondary {
    background: #1d2730;
}

.button--secondary:hover,
.button--secondary:focus-visible {
    background: #0f171e;
}

.button--archive {
    margin-top: 34px;
}

.page-title {
    padding: 96px 0 62px;
    background: var(--bg-soft);
}

.page-title h1 {
    max-width: 900px;
    margin: 6px 0 12px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1;
}

.page-title p {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 1.12rem;
}

.page-title--article {
    background: #ffffff;
    padding-bottom: 34px;
}

.timeline {
    display: grid;
    gap: 28px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 28px;
    padding: 28px 0;
    border-top: 1px solid var(--line);
}

.timeline-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 20px;
}

.timeline-item h3 {
    margin: 0 0 12px;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    line-height: 1.25;
}

.timeline-item h2 {
    margin: 4px 0 12px;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.news-date {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.text-link {
    display: inline-block;
    margin-right: 18px;
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
}

.text-link--source {
    font-weight: 400;
}

.text-link:hover,
.text-link:focus-visible {
    text-decoration: underline;
}

.article-image img {
    width: 100%;
    max-height: 560px;
    object-fit: cover;
    border-radius: 20px;
}

.article-body {
    max-width: 860px;
}

.article-grid {
    display: grid;
    gap: 58px;
}

.content-section {
    max-width: 960px;
    min-width: 0;
    scroll-margin-top: 96px;
}

.content-section__body,
.content-section__children {
    min-width: 0;
}

.container > .content-section + .content-section {
    padding-top: 48px;
    border-top: 1px solid rgba(13, 20, 26, 0.14);
}

.content-section__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.content-section__title {
    flex: 1 1 auto;
    min-width: 0;
}

.content-section__heading h2,
.content-section__heading h3,
.content-section__heading h4 {
    margin-bottom: 8px;
}

.content-section__updated {
    display: block;
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.content-section__tools {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 8px;
    padding-top: 2px;
}

.section-tool {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.section-tool--info {
    cursor: help;
}

.section-tool--ai {
    color: #8fe3ff;
}

.section-tool--human {
    color: #ffd089;
}

.section-tool:hover,
.section-tool:focus-visible {
    border-color: rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.section-tool svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s ease;
}

.section-tool--info svg {
    width: 20px;
    height: 20px;
}

.content-section.is-collapsed .content-section__body {
    display: none;
}

.content-section.is-collapsed [data-section-toggle] svg {
    transform: rotate(180deg);
}

.content-section h2 {
    margin: 0 0 16px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    line-height: 1.1;
}

.content-section h3 {
    margin: 0 0 12px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.content-section h4 {
    margin: 0 0 10px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(1.08rem, 1.7vw, 1.35rem);
    line-height: 1.25;
}

.content-section--paragraph h2 {
    margin-bottom: 10px;
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.25;
}

.content-section--paragraph h3,
.content-section--paragraph h4 {
    margin-bottom: 8px;
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    line-height: 1.28;
}

.content-section p {
    margin: 0 0 18px;
    color: var(--muted);
    text-align: justify;
}

.content-section__main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 42%);
    gap: 32px;
    align-items: start;
}

.content-section__text > :last-child {
    margin-bottom: 0;
}

.content-section__media {
    align-self: start;
}

.content-section__media img {
    max-height: 440px;
}

.content-section__children {
    display: grid;
    gap: 28px;
    margin-top: 24px;
}

.content-section__children .content-section,
.content-section__children .content-image,
.content-section__children .content-video {
    max-width: 960px;
}

.content-accordion {
    margin-top: 24px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.content-accordion summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 0 18px;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.content-accordion summary::-webkit-details-marker {
    display: none;
}

.content-accordion summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #0d141a;
    font-size: 1.1rem;
}

.content-accordion[open] summary {
    border-bottom: 1px solid var(--line);
}

.content-accordion[open] summary::after {
    content: "-";
}

.content-accordion__body {
    margin-top: 0;
    padding: 24px;
}

.content-image {
    margin: 0;
}

.content-image img {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    border-radius: 20px;
}

.content-video {
    margin: 0;
}

.content-video iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    border: 0;
    border-radius: 20px;
}

.content-video .button {
    margin-top: 0;
}

.content-image figcaption,
.content-video figcaption {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.45;
    font-style: italic;
}

.content-image figcaption p,
.content-video figcaption p {
    margin: 0;
    color: inherit;
    text-align: left;
}

.content-image figcaption p + p,
.content-video figcaption p + p {
    margin-top: 6px;
}

.interactive-map {
    width: min(100%, 1120px);
    margin: 0 auto;
    padding: clamp(22px, 4vw, 34px);
    color: #f5f8fb;
    background:
        radial-gradient(circle at 24% 18%, rgba(245, 153, 92, 0.24), transparent 34%),
        linear-gradient(135deg, #12161d 0%, #22252c 48%, #0b1017 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 30px 70px rgba(13, 20, 26, 0.22);
}

.interactive-map + .content-section {
    margin-top: 48px;
}

.interactive-map__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.interactive-map .eyebrow,
.interactive-map__header p,
.interactive-map__panel p,
.interactive-map__timeline label,
.interactive-map__ticks {
    color: rgba(245, 248, 251, 0.74);
}

.interactive-map__header h2 {
    margin: 4px 0 8px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4.4vw, 4rem);
    line-height: 1.02;
}

.interactive-map__header p {
    max-width: 720px;
    margin: 0;
    font-size: 1rem;
    text-align: left;
}

.interactive-map__year {
    display: grid;
    min-width: 116px;
    min-height: 70px;
    place-items: center;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 2rem;
    font-weight: 700;
}

.interactive-map__workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    gap: 22px;
    align-items: stretch;
}

.interactive-map__scene {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14), transparent 35%),
        radial-gradient(circle at 20% 18%, rgba(86, 191, 255, 0.14), transparent 22%),
        #05080d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.interactive-map__planet {
    position: absolute;
    left: 50%;
    top: 55%;
    width: min(68%, 520px);
    aspect-ratio: 1;
    background:
        linear-gradient(115deg, rgba(0, 0, 0, 0.28), transparent 36%, rgba(255, 255, 255, 0.06) 62%, rgba(0, 0, 0, 0.34)),
        var(--planet-image, none) center / cover no-repeat,
        var(--planet-color, #c65f38);
    border-radius: 50%;
    box-shadow:
        inset -52px -28px 80px rgba(0, 0, 0, 0.55),
        inset 22px 18px 36px rgba(255, 198, 129, 0.14),
        0 0 80px rgba(245, 115, 64, 0.26);
    transform: translate(-50%, -50%);
}

.interactive-map__planet--disc { border-radius: 50%; box-shadow: 0 0 80px rgba(245, 190, 92, 0.3); }
.interactive-map__planet--irregular { border-radius: 45% 55% 50% 48% / 52% 43% 57% 48%; }

.interactive-map__orbit {
    position: absolute;
    left: 50%;
    top: 55%;
    border: 1px solid var(--orbit-color, #7edaff);
    opacity: 0.42;
    border-radius: 50%;
    transform: translate(-50%, -50%) rotate(-16deg);
}

.interactive-map__orbit--1 {
    width: 82%;
    height: 64%;
}

.interactive-map__orbit--2 {
    width: 63%;
    height: 49%;
    transform: translate(-50%, -50%) rotate(18deg);
}

.interactive-map__orbit--3 { width: 46%; height: 36%; transform: translate(-50%, -50%) rotate(-28deg); }

.map-probe {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: 190px;
    min-height: 30px;
    padding: 3px 9px 3px 5px;
    color: #ffffff;
    background: rgba(10, 16, 24, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    font-size: 0.8rem;
    line-height: 1.15;
    opacity: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.map-probe:hover,
.map-probe:focus-visible,
.map-probe.is-selected {
    border-color: rgba(126, 218, 255, 0.86);
    box-shadow: 0 0 0 4px rgba(126, 218, 255, 0.12), 0 0 24px rgba(126, 218, 255, 0.55);
    outline: none;
    transform: translate(-50%, -50%) scale(1.06);
}

.map-probe.is-hidden {
    opacity: 0.14;
    pointer-events: none;
}

.map-probe__dot {
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    background: #f1b35e;
    border-radius: 50%;
    box-shadow: 0 0 14px rgba(241, 179, 94, 0.82);
}

.map-probe--active .map-probe__dot { background: #63d89a; box-shadow: 0 0 14px rgba(99, 216, 154, 0.86); }
.map-probe--planned .map-probe__dot { background: #7edaff; box-shadow: 0 0 14px rgba(126, 218, 255, 0.86); }

.map-probe__type {
    display: inline-grid;
    place-items: center;
    width: 1.25em;
    height: 1.25em;
    margin-left: 0.35em;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    color: #dcecff;
    font-size: 0.82em;
    font-weight: 700;
    line-height: 1;
}
.map-probe__flag { width: auto; height: 1em; max-width: 1.5em; margin-left: .35em; object-fit: contain; vertical-align: -0.08em; border-radius: 1px; }

.map-probe__image {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    object-fit: contain;
    padding: 3px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.34);
}

.map-probe__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.interactive-map__panel {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
}

.interactive-map__panel h3 {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(1.35rem, 2.2vw, 1.9rem);
    line-height: 1.14;
}

.interactive-map__panel p {
    margin: 0;
    text-align: left;
}

.interactive-map__panel .text-link {
    width: fit-content;
    margin-top: 4px;
    color: #ffffff;
}

.interactive-map__timeline {
    display: grid;
    gap: 10px;
    margin-top: 22px;
}

.interactive-map__timeline input {
    width: 100%;
    accent-color: #7edaff;
}

.interactive-map__ticks {
    display: flex;
    justify-content: space-between;
    font-size: 0.86rem;
    font-weight: 700;
}

.mission-index {
    padding: 72px 0;
    background: var(--facts-bg);
}

.mission-index__groups {
    display: grid;
    gap: 42px;
}

.mission-index h3 {
    margin: 0 0 18px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    line-height: 1.2;
}

.mission-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.mission-card {
    display: grid;
    gap: 8px;
    min-height: 190px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    text-decoration: none;
    box-shadow: 0 14px 32px rgba(13, 20, 26, 0.09);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.mission-card:hover,
.mission-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 20px 42px rgba(13, 20, 26, 0.14);
}

.mission-card__code {
    color: var(--text);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.mission-card__code:hover,
.mission-card__code:focus-visible {
    color: var(--accent);
}

.mission-card__date,
.mission-card__status {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.mission-card__status {
    width: fit-content;
    padding: 2px 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.mission-card__status--done {
    background: #0d141a;
    color: #ffffff;
}

.mission-card__summary {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.mission-card__summary p {
    margin: 0;
}

.mission-list {
    display: grid;
    gap: 72px;
}

.mission-detail {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: start;
    padding-bottom: 72px;
    border-bottom: 1px solid var(--line);
    scroll-margin-top: 100px;
}

.mission-detail:nth-child(even) {
    grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1fr);
}

.mission-detail__content {
    order: 1;
}

.mission-detail:nth-child(even) .mission-detail__content {
    order: 2;
}

.mission-detail h2 {
    margin: 0 0 12px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4.2vw, 3.6rem);
    line-height: 1.05;
}

.mission-detail p {
    margin: 0 0 18px;
    color: var(--muted);
    text-align: justify;
}

.mission-detail__subtitle {
    color: var(--text) !important;
    font-size: 1.1rem;
    font-weight: 700;
}

.mission-more {
    grid-column: 1 / -1;
    order: 3;
    margin: 24px 0 22px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.mission-more summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    padding: 0 18px;
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.mission-more summary::-webkit-details-marker {
    display: none;
}

.mission-more summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1.1rem;
}

.mission-more[open] summary {
    border-bottom: 1px solid var(--line);
}

.mission-more[open] summary::after {
    content: "-";
}

.mission-more__body {
    display: grid;
    gap: 28px;
    padding: 24px;
}

.mission-more__section h3 {
    margin: 0 0 10px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.mission-more__section--paragraph h3 {
    font-size: clamp(1.12rem, 1.7vw, 1.4rem);
    line-height: 1.28;
}

.mission-more__section p:last-child {
    margin-bottom: 0;
}

.mission-detail__media {
    order: 2;
    margin: 0;
    align-self: start;
}

.mission-detail:nth-child(even) .mission-detail__media {
    order: 1;
}

.mission-detail__media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 24px 58px rgba(13, 20, 26, 0.16);
}

.site-footer {
    padding: 34px 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: #000000;
    font-size: 0.9rem;
}

body:not(.admin-page) .site-footer {
    color: #aabed2;
    background: rgba(3, 11, 22, 0.88);
    border-top-color: rgba(151, 210, 247, 0.14);
}

body:not(.admin-page) .prose a,
body:not(.admin-page) .program-card a,
body:not(.admin-page) .timeline-item a,
body:not(.admin-page) .mission-more__section a,
body:not(.admin-page) .content-sources a {
    color: #8ee0ff;
}

body:not(.admin-page) .program-card a.button {
    color: #ffffff;
}

/* Extended indices use pale cards, so their text must not inherit the
   light-on-dark palette used by the header and hero. */
body:not(.admin-page) .mission-index {
    background: linear-gradient(120deg, #e2f1fb, #f6fbff);
}

body:not(.admin-page) .mission-card {
    background: rgba(255, 255, 255, 0.94);
    border-color: rgba(45, 106, 149, 0.16);
}

body:not(.admin-page) .mission-card__code {
    color: #102b43;
}

body:not(.admin-page) .mission-card__date,
body:not(.admin-page) .mission-card__summary {
    color: #496176;
}

body:not(.admin-page) .article-image img,
body:not(.admin-page) .content-section__media img,
body:not(.admin-page) .mission-detail__media img {
    border: 1px solid rgba(168, 220, 250, 0.2);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.28);
}

.admin-page {
    background: var(--bg-soft);
}

.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px max(20px, calc((100vw - 1280px) / 2));
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.admin-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header__actions form {
    margin: 0;
}

.admin-header__actions .button {
    margin-top: 0;
}

.admin-auth {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px 20px;
}

.admin-auth__card {
    width: min(460px, 100%);
    padding: 28px;
}

.admin-auth__card h1 {
    margin: 8px 0 22px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 2rem;
    line-height: 1.1;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    width: min(1280px, calc(100% - 40px));
    margin: 34px auto 72px;
}

.admin-sidebar,
.admin-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(13, 20, 26, 0.08);
}

.admin-sidebar {
    height: fit-content;
    padding: 18px;
    position: sticky;
    top: 96px;
}

.admin-sidebar h2,
.admin-card h2 {
    margin: 0 0 16px;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 1.35rem;
    line-height: 1.2;
}

.admin-sidebar nav {
    display: grid;
    gap: 8px;
}

.admin-sidebar a,
.admin-tree-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 6px;
    text-decoration: none;
}

.admin-sidebar a:hover,
.admin-sidebar a.is-current {
    background: var(--bg-soft);
}

.admin-tree {
    align-items: stretch;
}

.admin-tree-group {
    border-radius: 8px;
}

.admin-tree-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.admin-tree-group summary::-webkit-details-marker {
    display: none;
}

.admin-tree-group summary::after {
    content: "+";
    margin-left: auto;
    color: var(--muted);
    font-weight: 700;
}

.admin-tree-group[open] > summary {
    background: var(--bg-soft);
}

.admin-tree-group[open] > summary::after {
    content: "-";
}

.admin-tree-group summary small {
    margin-left: auto;
}

.admin-tree-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px;
    gap: 6px;
    align-items: stretch;
}

.admin-sidebar .admin-tree-page > a:first-child {
    min-width: 0;
}

.admin-tree-page.is-current > a:first-child {
    background: var(--bg-soft);
}

.admin-sidebar .admin-tree-add-page {
    display: grid;
    place-items: center;
    min-height: 0;
    padding: 0;
    color: var(--accent);
    border: 1px solid var(--line);
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-sidebar .admin-tree-add-page:hover,
.admin-sidebar .admin-tree-add-page:focus-visible {
    color: #ffffff;
    background: var(--accent);
    border-color: var(--accent);
}

.admin-tree-children {
    display: grid;
    gap: 6px;
    margin: 6px 0 8px 12px;
    padding-left: 12px;
    border-left: 1px solid var(--line);
}

.admin-tree-children .admin-tree-group summary,
.admin-tree-children a,
.admin-tree-empty {
    min-height: 38px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.94rem;
}

.admin-tree-internal span::before {
    content: "-> ";
    color: var(--muted);
}

.admin-form-note {
    margin: 0 0 14px;
    color: var(--muted);
}

.admin-tree-empty {
    color: var(--muted);
}

.admin-sidebar small {
    color: var(--muted);
}

.admin-panel__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.admin-panel__heading h1 {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1;
}

.admin-panel__heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.admin-panel__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-panel__actions .button {
    margin-top: 0;
}

.page-settings-card {
    margin-bottom: 24px;
}

.admin-settings-checks {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.admin-card {
    padding: 24px;
}

.admin-alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 8px;
}

.admin-alert--success {
    background: #dff8e7;
    color: #174c27;
}

.admin-alert--error {
    background: #ffe8e8;
    color: #7a1c1c;
}

.admin-form {
    display: grid;
    gap: 16px;
}

.admin-form label,
.admin-form__field {
    display: grid;
    gap: 7px;
}

.admin-form label span,
.admin-form__field > span {
    color: var(--text);
    font-weight: 700;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    font: inherit;
}

.admin-form textarea {
    resize: vertical;
    line-height: 1.55;
}

.rich-editor {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.rich-editor__toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
}

.rich-editor__toolbar button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
}

.rich-editor__toolbar button:hover,
.rich-editor__toolbar button:focus-visible {
    border-color: rgba(13, 20, 26, 0.32);
}

.rich-editor__toolbar svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rich-editor__surface {
    min-height: 240px;
    padding: 12px;
    line-height: 1.55;
    outline: none;
}

.rich-editor__surface p,
.rich-editor__surface ul,
.rich-editor__surface ol {
    margin: 0 0 12px;
}

.rich-editor__surface ul,
.rich-editor__surface ol {
    padding-left: 22px;
}

.rich-editor__surface a {
    color: var(--accent);
    text-decoration: underline;
}

.rich-editor__source {
    display: none;
}

.image-upload-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.image-upload-button {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 12px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.image-upload-button:hover,
.image-upload-button:focus-within {
    border-color: rgba(13, 20, 26, 0.32);
}

.image-upload-button svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.image-upload-button input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.image-upload-preview {
    width: min(100%, 360px);
    max-height: 210px;
    object-fit: cover;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.admin-form small {
    color: var(--muted);
}

.field-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
}

.check-field {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 10px !important;
}

.check-field input {
    width: 18px;
    min-height: 18px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.admin-actions .button {
    border: 0;
    cursor: pointer;
}

.source-manager {
    display: grid;
    gap: 16px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.source-manager h3 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}

.source-manager__list {
    display: grid;
    gap: 10px;
}

.source-manager__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
    padding: 12px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.source-manager__item small,
.source-manager__empty {
    color: var(--muted);
}

.source-manager__item a,
.source-manager__item strong {
    display: inline-block;
    margin-top: 3px;
    color: var(--text);
    font-weight: 700;
}

.source-manager__item p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.source-manager__item form {
    margin: 0;
}

.source-manager__form {
    padding-top: 6px;
}

.content-manager-list {
    display: grid;
    gap: 12px;
}

.content-manager-section {
    display: grid;
    gap: 0;
}

.content-manager-section summary {
    display: block;
    cursor: pointer;
    list-style: none;
}

.content-manager-section summary::-webkit-details-marker {
    display: none;
}

.content-manager-section summary .content-manager-item {
    position: relative;
    padding-left: 44px;
}

.content-manager-section summary .content-manager-item::before {
    content: "+";
    position: absolute;
    top: 18px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
}

.content-manager-section[open] summary .content-manager-item::before {
    content: "-";
}

.content-manager-section__children {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.content-manager-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 16px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.content-manager-item--child {
    margin-left: 24px;
    border-left: 4px solid var(--accent);
}

.content-manager-item.is-muted {
    opacity: 0.58;
}

.content-manager-item small {
    color: var(--muted);
    font-weight: 700;
}

.content-manager-item h3 {
    margin: 4px 0 6px;
    font-size: 1.05rem;
    line-height: 1.3;
}

.content-manager-item--paragraph h3 {
    font-size: 0.95rem;
}

.content-manager-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.content-manager-item__actions {
    display: flex;
    gap: 8px;
    align-content: start;
    align-items: center;
    justify-items: end;
}

.icon-action {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
}

.icon-action:hover,
.icon-action:focus-visible {
    background: var(--bg);
    border-color: rgba(13, 20, 26, 0.32);
}

.icon-action svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-action--danger {
    color: #8a1f1f;
}

.content-manager-item__actions form {
    margin: 0;
}

@media (max-width: 820px) {
    .site-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        overflow-x: clip;
        padding: 18px 20px;
    }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-width: 44px;
        min-height: 44px;
        padding: 0 12px;
        color: #ffffff;
        background: rgba(117, 188, 229, 0.1);
        border: 1px solid rgba(162, 213, 244, 0.25);
        border-radius: 999px;
        font: inherit;
        cursor: pointer;
    }

    .nav {
        display: none;
        flex-basis: 100%;
        width: 100%;
        min-width: 0;
        gap: 6px;
        padding: 6px 0 0;
    }

    .nav.nav--open {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        max-height: calc(100dvh - 76px);
        padding: 10px;
        overflow-y: auto;
        background: rgba(10, 28, 48, 0.98);
        border: 1px solid rgba(139, 204, 245, 0.22);
        border-radius: 14px;
        overscroll-behavior: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .nav-item--has-children {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        gap: 6px;
        align-items: start;
    }

    .submenu {
        position: static;
        display: none;
        grid-column: 1 / -1;
        min-width: 0;
        max-height: none;
        margin: 0;
        padding: 10px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
        box-shadow: none;
    }

    .submenu.submenu--open {
        display: grid;
    }

    .nav-item__toggle {
        display: inline-grid;
        place-items: center;
        width: 44px;
        height: 44px;
        color: #d9eafa;
        background: rgba(117, 188, 229, 0.06);
        border: 1px solid rgba(162, 213, 244, 0.14);
        border-radius: 10px;
        font: inherit;
        cursor: pointer;
    }

    .hero {
        min-height: 360px;
    }

    .hero h1 {
        font-size: clamp(2.3rem, 12vw, 3.8rem);
    }

    .section {
        padding: 52px 0;
    }

    .program-card,
    .timeline-item,
    .mission-detail,
    .mission-detail:nth-child(even) {
        grid-template-columns: 1fr;
    }

    .home-explore__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mission-detail:nth-child(even) .mission-detail__content {
        order: 1;
    }

    .mission-detail:nth-child(even) .mission-detail__media {
        order: 2;
    }

    .program-card img {
        min-height: 260px;
    }

    .timeline-item {
        gap: 18px;
    }

    .content-section__heading {
        align-items: flex-start;
    }

    .content-section__tools {
        gap: 6px;
    }

    .content-section__main {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .interactive-map__header,
    .interactive-map__workspace {
        grid-template-columns: 1fr;
    }

    .interactive-map__header {
        display: grid;
    }

    .interactive-map__scene {
        min-height: 440px;
    }

    .interactive-map__year {
        width: 100%;
        min-height: 58px;
        font-size: 1.6rem;
    }

    .container > .content-section + .content-section {
        padding-top: 34px;
    }

    .section-tool {
        width: 34px;
        height: 34px;
    }

    .admin-header,
    .admin-panel__heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-header__actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-panel__actions {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }

    .admin-shell,
    .admin-grid,
    .field-row,
    .content-manager-item,
    .image-upload-field {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
    }

    .content-manager-item__actions {
        justify-items: start;
    }

    .content-manager-item--child {
        margin-left: 0;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 28px, var(--max-width));
    }

    .home-explore__grid {
        grid-template-columns: 1fr;
    }

    .hero__content {
        padding: 72px 0 38px;
    }

    .hero {
        min-height: 300px;
        background-position: center center;
    }

    .interactive-map {
        padding: 16px;
    }

    .interactive-map__scene {
        min-height: 360px;
    }

    .interactive-map__planet {
        width: 78%;
    }

    .map-probe {
        max-width: 112px;
        font-size: 0.72rem;
    }

    .prose {
        text-align: left;
    }
}

/* Compact touch navigation: the full hierarchy stays reachable without
   relying on hover or a horizontally scrolling menu. */
@media (max-width: 820px) {
    body:not(.admin-page) .site-header {
        position: sticky;
        top: 0;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding: 12px 20px 8px;
    }

    body:not(.admin-page) .nav {
        padding-bottom: 7px;
    }

    body:not(.admin-page) .nav > a,
    body:not(.admin-page) .nav > .nav-item > a {
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid rgba(162, 213, 244, 0.18);
        border-radius: 10px;
        background: rgba(117, 188, 229, 0.06);
    }

    body:not(.admin-page) .nav > .nav-item > a::before,
    body:not(.admin-page) .nav > a::before {
        display: none;
    }

    body:not(.admin-page) .hero {
        min-height: 320px;
    }

    body:not(.admin-page) .hero h1 {
        font-size: clamp(2.3rem, 12vw, 3.8rem);
    }

    body:not(.admin-page) .prose,
    body:not(.admin-page) .content-section p,
    body:not(.admin-page) .mission-detail p {
        text-align: left;
    }
}

@media (max-width: 520px) {
    body:not(.admin-page) .hero {
        min-height: 280px;
    }

    body:not(.admin-page) .hero__content {
        padding: 48px 0 28px;
    }

    body:not(.admin-page) .hero h1 {
        font-size: clamp(2.15rem, 10.5vw, 3rem);
    }

    body:not(.admin-page) .hero p,
    body:not(.admin-page) .hero__text p {
        font-size: 1rem;
    }
}

/* A narrow desktop window still uses pointer navigation, not the touch panel. */
@media (max-width: 820px) and (hover: hover) and (pointer: fine) {
    .site-header,
    body:not(.admin-page) .site-header {
        position: sticky;
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 0 max(20px, calc((100vw - var(--max-width)) / 2));
    }

    .nav-toggle,
    .nav-item__toggle {
        display: none;
    }

    .nav,
    .nav.nav--open {
        display: flex;
        flex-basis: auto;
        width: auto;
        max-height: none;
        padding: 0;
        overflow: visible;
    }

    .nav-item--has-children {
        display: block;
        position: relative;
    }

    .submenu,
    .submenu.submenu--open {
        position: absolute;
        top: 100%;
        left: 50%;
        z-index: 20;
        display: block;
        grid-column: auto;
        min-width: 210px;
        max-height: none;
        margin: 0;
        padding: 16px 10px 10px;
        overflow: visible;
        border-color: var(--line);
        box-shadow: 0 18px 40px rgba(13, 20, 26, 0.16);
        opacity: 0;
        pointer-events: none;
        transform: translate(-50%, 8px);
    }

    body:not(.admin-page) .submenu,
    body:not(.admin-page) .submenu.submenu--open {
        min-width: 236px;
        padding: 10px;
        border-color: rgba(139, 204, 245, 0.22);
        box-shadow: 0 20px 42px rgba(0, 0, 0, 0.36);
    }

    .nav-item--has-children:hover .submenu,
    .nav-item--has-children:focus-within .submenu {
        opacity: 1;
        pointer-events: auto;
        transform: translate(-50%, 0);
    }
}

/* Final mobile reset: no desktop dropdown positioning can leak into the panel. */
@media (max-width: 820px) {
    .nav-item--has-children {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 44px;
        gap: 6px;
        align-items: start;
    }

    .submenu,
    .submenu.submenu--open {
        position: static !important;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        max-height: none;
        margin: 0;
        padding: 10px;
        transform: none !important;
        box-shadow: none;
    }

    /* This overrides the wider desktop theme submenu without letting it
       enlarge the mobile grid track on the first opening. */
    body:not(.admin-page) .nav .submenu,
    body:not(.admin-page) .nav .submenu.submenu--open {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    .submenu {
        display: none;
        opacity: 1;
        pointer-events: auto;
    }

    .submenu.submenu--open {
        display: grid !important;
    }
}

/* Quick editing controls are only rendered for authenticated administrators. */
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .65rem 0; }
.inline-actions button { border: 1px solid #75859b; border-radius: 6px; background: #172536; color: #fff; padding: .4rem .8rem; cursor: pointer; font: inherit; }
.inline-actions button[hidden] { display: none; }
.inline-actions button:disabled { opacity: .6; cursor: wait; }
.inline-actions [role="status"] { font-size: .85rem; color: #abbfd5; }
.inline-block [contenteditable="true"] { outline: 2px solid #74b9ff; outline-offset: 5px; border-radius: 3px; min-height: 2em; }
.inline-block [contenteditable="true"]:focus { outline-color: #c5e2ff; }

.catalog-shell { max-width: 1440px; margin: 0 auto; padding: 24px; }
.catalog-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.catalog-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.catalog-list { display: grid; gap: 8px; }
.catalog-row { display: grid; gap: 4px; padding: 12px; border: 1px solid #344254; border-radius: 6px; overflow-wrap: anywhere; }
.catalog-row small { color: var(--muted); }
.catalog-error { color: #a11919; }
@media (max-width: 800px) { .catalog-grid { grid-template-columns: 1fr; } }

.catalog-card { padding: 24px; }

/* Only current-year markers remain on the scene as the historical catalog grows. */
.map-probe.is-hidden { display: none; }
.interactive-map__launches { margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.2); }
.interactive-map__launches h3 { color: #fff; margin: 0 0 10px; }
.interactive-map__launches p { color: #ccd5de; }
.map-launch-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; }
.map-launch { display: grid; gap: 6px; text-align: left; color: #fff; background: #202b37; border: 1px solid #718095; padding: 12px; border-radius: 8px; font: inherit; cursor: pointer; }
.map-launch span { font-size: .85rem; color: #ced9e4; }
.map-launch.is-selected, .map-launch:focus-visible { outline: 2px solid #7edaff; outline-offset: 2px; }
.map-launch[hidden] { display: none; }
