/* Mission pages. Palette, type, and chrome follow the homepage canon (--ph-* and composition tokens). */

html {
  scroll-padding-top: 168px;
}

html[data-theme="light"]:has(body.toward-mission) {
  color-scheme: light;
}

html[data-theme="dark"]:has(body.toward-mission),
html[data-theme="stellar"]:has(body.toward-mission) {
  background: var(--ph-bg, #050b12);
  color-scheme: dark;
}

body.toward-mission {
  height: auto;
  max-height: none;
  overflow: visible;
  background: var(--ph-bg, #050b12);
  color: var(--ph-ink, #f4f8fc);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

/* Same body field as the homepage. Fixed so a long page keeps the viewport gradient. */
html[data-theme="stellar"] body.toward-mission.aa-chrome-page:not(.ph-home) {
  background:
    radial-gradient(circle at 72% 18%, rgba(53, 92, 128, 0.14), transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(43, 79, 112, 0.1), transparent 28%),
    linear-gradient(180deg, #03070c 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
  color: var(--ph-ink, #f4f8fc);
}

html[data-theme="dark"] body.toward-mission.aa-chrome-page:not(.ph-home) {
  background:
    radial-gradient(circle at 70% 12%, rgba(48, 84, 118, 0.16), transparent 34%),
    linear-gradient(180deg, #050b12 0%, #07111c 54%, #081521 100%);
  background-attachment: fixed;
  color: var(--ph-ink, #f4f8fc);
}

html[data-theme="light"] body.toward-mission.aa-chrome-page:not(.ph-home):not(.toward-into-night) {
  background:
    radial-gradient(ellipse 120% 55% at 18% 0%, rgba(206, 228, 248, 0.42) 0%, transparent 58%),
    radial-gradient(ellipse 100% 65% at 88% 18%, rgba(192, 218, 242, 0.28) 0%, transparent 62%),
    radial-gradient(ellipse 90% 50% at 50% 100%, rgba(255, 255, 255, 0.65) 0%, transparent 68%),
    linear-gradient(
      180deg,
      #f7fbff 0%,
      #eef5fc 28%,
      #e8f1fa 52%,
      #f3f9ff 78%,
      #ffffff 100%
    ) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  color: var(--ph-ink, #141820);
}

body.toward-mission .aa-chrome-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 80;
}

body.toward-mission .aa-chrome-header-spacer {
  display: none !important;
}

/* Same wordmark as the homepage card. Image lockup filters would erase the text. */
body.toward-mission:not(.ph-home) .aa-chrome-brand-wordmark {
  display: flex !important;
  align-items: center;
  justify-content: center;
  height: var(--header-lockup-height, 56px) !important;
  width: auto !important;
  max-width: min(86vw, 520px) !important;
  padding: 0 8px;
  filter: none !important;
  opacity: calc(0.92 * var(--tm-lockup-opacity, 1)) !important;
  visibility: visible !important;
  font-family: "Courier New", Courier, ui-monospace, monospace;
  font-weight: 400;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  white-space: nowrap;
  color: rgba(236, 244, 252, 0.92);
  animation: none !important;
}

html[data-theme="stellar"] body.toward-mission:not(.ph-home) .aa-chrome-brand-wordmark {
  color: rgba(214, 236, 255, 0.88);
  text-shadow: none;
}

html[data-theme="dark"] body.toward-mission:not(.ph-home) .aa-chrome-brand-wordmark {
  color: rgba(242, 244, 247, 0.9);
  text-shadow: none;
}

html[data-theme="light"] body.toward-mission:not(.ph-home) .aa-chrome-brand-wordmark {
  color: rgba(20, 24, 32, 0.82);
  text-shadow: none;
}

.toward-story {
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* The homepage Stellar grid (::after) and star field (::before and #aa-stellar-ambience)
   are fixed on the body. An opaque story would hide them. Night descent still paints. */
html[data-theme="light"] body.toward-mission:not(.ph-home):not(.toward-into-night) .toward-story,
html[data-theme="dark"] body.toward-mission:not(.ph-home):not(.toward-into-night) .toward-story,
html[data-theme="stellar"] body.toward-mission:not(.ph-home):not(.toward-into-night) .toward-story {
  background: transparent;
}

.toward-scene {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  overflow: visible;
  background: transparent;
}

.toward-scene__content {
  position: relative;
  z-index: 8;
}

.toward-dawn {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.toward-home-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 28px;
  color: var(--ph-ink, #f4f8fc);
  font-size: 0.76rem;
  font-weight: 640;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  padding-bottom: 5px;
}

.toward-home-link:hover,
.toward-home-link:focus-visible {
  color: var(--ph-bridge, rgba(201, 222, 240, 0.86));
  border-bottom-color: currentColor;
}

.toward-orbit-line {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 82vw;
  height: 28vw;
  border: 1px solid rgba(141, 194, 235, 0.08);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-11deg);
}

.toward-orbit-line--two {
  width: 58vw;
  height: 19vw;
  transform: translate(-50%, -50%) rotate(9deg);
  opacity: 0.65;
}

.mf-page {
  position: relative;
  z-index: 2;
  padding: max(168px, calc(env(safe-area-inset-top, 0px) + 148px)) 0 6.5rem;
  color: var(--ph-ink, #f4f8fc);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

.mf-wrap {
  width: min(var(--public-composition-rail, 40rem), calc(100% - (2 * var(--public-composition-gutter, 20px))));
  margin: 0 auto;
}

.mf-kicker {
  margin: 0 0 0.85rem;
  color: var(--ph-faint, rgba(204, 222, 240, 0.46));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mf-hero h1,
.mf-detail h1 {
  font-weight: var(--public-composition-title-weight, 750);
  letter-spacing: var(--public-composition-title-spacing, -0.045em);
  line-height: var(--public-composition-title-line, 0.96);
}

.mf-claim {
  font-weight: 640;
  letter-spacing: -0.034em;
  line-height: 1.08;
}

.mf-hero h1 {
  margin: 0;
  max-width: var(--public-composition-rail, 40rem);
  font-size: var(--public-composition-title-size, clamp(2.75rem, 9.2vw, 5.2rem));
}

.mf-lead,
.mf-prose p,
.mf-quote p,
.mf-card__why,
.mf-shot__note,
.mf-video p,
.mf-dialog p {
  font-size: var(--public-composition-body-size, clamp(1.2rem, 3.6vw, 1.4rem));
  line-height: 1.48;
}

.mf-lead {
  margin: var(--public-composition-stack-gap, 1rem) 0 0;
  max-width: var(--public-composition-rail, 40rem);
  color: var(--ph-muted, rgba(222, 233, 244, 0.72));
}

.mf-hero__lens {
  margin: 0.85rem 0 0;
  max-width: var(--public-composition-rail, 40rem);
  font-family: inherit;
  font-size: clamp(1.05rem, 3.2vw, 1.2rem);
  line-height: 1.48;
  color: var(--ph-muted, rgba(222, 233, 244, 0.72));
}

.mf-hero__lens a {
  color: var(--ph-ink, #f4f8fc);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mf-section,
.mf-claim,
.mf-detail h1 {
  scroll-margin-top: 168px;
}

.mf-section {
  margin-top: clamp(4.2rem, 9vw, 6.5rem);
}

.mf-section h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.mf-prose p,
.mf-quote {
  margin: 0 0 1rem;
}

.mf-prose p:last-child {
  margin-bottom: 0;
}

.mf-quote {
  margin: 1.6rem 0;
  padding: 0;
  border: 0;
}

.mf-quote p {
  margin: 0;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.22;
}

.mf-quote footer,
.mf-source {
  margin-top: 0.75rem;
  color: var(--ph-faint, rgba(204, 222, 240, 0.46));
  font-size: 0.92rem;
  font-style: normal;
  line-height: 1.4;
}

.mf-media {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.mf-shot,
.mf-video {
  margin: 0;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  border-radius: 18px;
  background: color-mix(in srgb, var(--ph-ink, #f4f8fc) 5%, transparent);
}

.mf-shot__frame,
.mf-video {
  display: grid;
  align-content: end;
  min-height: 220px;
  padding: 1.1rem 1.15rem 1.15rem;
}

a.mf-shot__frame,
a.mf-video {
  color: inherit;
  text-decoration: none;
}

.mf-shot__frame img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 0.85rem;
  border-radius: 12px;
}

.mf-shot__pull {
  margin: 0 0 0.85rem;
  color: var(--ph-ink, #f4f8fc);
  font-size: clamp(1.15rem, 2.8vw, 1.4rem);
  font-weight: 620;
  letter-spacing: -0.028em;
  line-height: 1.28;
}

.mf-quiet a,
.mf-prose a,
.mf-quote footer a,
.mf-clip figcaption a {
  color: var(--ph-bridge, rgba(201, 222, 240, 0.86));
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.mf-shot__label,
.mf-video__label {
  color: var(--ph-ink, #f4f8fc);
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mf-shot__note,
.mf-video p {
  margin: 0.45rem 0 0;
  color: var(--ph-muted, rgba(222, 233, 244, 0.72));
}

.mf-video__mark {
  width: 44px;
  height: 44px;
  margin-bottom: 0.8rem;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 42%, var(--ph-ink, #f4f8fc) 42% 68%, transparent 68%) center / 12px 14px no-repeat;
  opacity: 0.8;
}

.mf-claims {
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.mf-claims li {
  border-top: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
}

.mf-claims li:last-child {
  border-bottom: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
}

.mf-claim {
  display: block;
  padding: 1.15rem 0;
  color: inherit;
  font-size: clamp(1.65rem, 4.2vw, 2.55rem);
  text-decoration: none;
}

.mf-claim:hover,
.mf-claim:focus-visible {
  color: var(--ph-bridge, rgba(201, 222, 240, 0.86));
}

.mf-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.8rem;
  margin-top: 1.4rem;
}

.mf-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 44px;
  padding: 1.15rem 1.1rem 1.2rem;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  border-radius: 18px;
  color: inherit;
  text-decoration: none;
  background: color-mix(in srgb, var(--ph-ink, #f4f8fc) 4%, transparent);
}

.mf-card:hover,
.mf-card:focus-visible {
  border-color: var(--ph-bridge, rgba(201, 222, 240, 0.86));
}

.mf-card__name {
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.mf-card__why {
  color: var(--ph-muted, rgba(222, 233, 244, 0.72));
}

.mf-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 2rem;
  color: var(--ph-bridge, rgba(201, 222, 240, 0.86));
  font-size: 1rem;
  text-decoration: none;
}

.mf-detail h1 {
  margin: 0;
  max-width: var(--public-composition-rail, 40rem);
  font-size: clamp(2.15rem, 6vw, 3.4rem);
  font-weight: 560;
  letter-spacing: -0.038em;
  line-height: 1.06;
}

.mf-block {
  margin-top: 2.2rem;
}

.mf-block h2 {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ph-faint, rgba(204, 222, 240, 0.46));
}

button.pf-egg {
  border: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.mf-dialog {
  width: min(40rem, calc(100% - 1.5rem));
  max-height: min(85dvh, 760px);
  margin: auto;
  padding: 1.4rem 1.25rem 1.2rem;
  overflow: auto;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  border-radius: 20px;
  background: var(--ph-bg, #050b12);
  color: var(--ph-ink, #f4f8fc);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

.mf-dialog::backdrop {
  background: rgba(2, 5, 8, 0.72);
}

html[data-theme="light"] .mf-dialog::backdrop {
  background: rgba(20, 24, 32, 0.46);
}

.mf-dialog h2 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.mf-dialog p {
  margin: 0 0 0.9rem;
  color: var(--ph-muted, rgba(222, 233, 244, 0.72));
}

.mf-dialog__keep {
  color: var(--ph-ink, #f4f8fc);
  font-size: 1.2rem;
  font-weight: 620;
}

.mf-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-top: 0.4rem;
  padding: 0 1rem;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, 0.28));
  border-radius: 999px;
  background: transparent;
  color: var(--ph-ink, #f4f8fc);
  font: inherit;
  cursor: pointer;
}

html body.toward-mission .toward-scene--planetfall .mf-caption {
  width: min(16rem, 100%) !important;
  max-width: 16rem !important;
}

.mf-claim:focus-visible,
.mf-card:focus-visible,
.mf-back:focus-visible,
a.mf-shot__frame:focus-visible,
a.mf-video:focus-visible,
.mf-prose a:focus-visible,
.mf-dialog__close:focus-visible,
.toward-home-link:focus-visible,
button.pf-egg:focus-visible {
  outline: 2px solid var(--ph-ink, #f4f8fc);
  outline-offset: 3px;
}

@media (min-width: 800px) {
  .mf-cards {
    grid-template-columns: 1fr 1fr;
  }

  .mf-media {
    grid-template-columns: 1.2fr 0.8fr;
  }

  .mf-shot__frame,
  .mf-video {
    min-height: 280px;
  }
}

@media (max-width: 760px) {
  .toward-orbit-line {
    width: 130vw;
    height: 48vw;
  }

  .toward-orbit-line--two {
    width: 94vw;
    height: 33vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mf-claim,
  .mf-card,
  .mf-back,
  .toward-home-link {
    transition: none;
  }
}

.mf-clip {
  margin: 0;
}

.mf-clip video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #000;
}

.mf-clip figcaption,
.mf-fig figcaption {
  margin-top: .5rem;
  color: var(--ph-muted, rgba(222, 233, 244, .72));
  font-size: .95rem;
  line-height: 1.4;
}

.mf-fig {
  margin: 0;
}

.mf-fig img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--ph-rule, rgba(191, 220, 246, .28));
}

.mf-prose + .mf-clip,
.mf-shot + .mf-prose,
.mf-media + .mf-prose,
.mf-fig + .mf-prose,
.mf-clip + .mf-prose,
.mf-grid + .mf-prose {
  margin-top: 2rem;
}

.mf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}

.mf-grid--posts {
  grid-template-columns: 1fr;
  align-items: start;
}

.mf-contrast {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
}

.mf-contrast__col {
  display: grid;
  gap: 1rem;
  align-content: start;
  min-width: 0;
}

.mf-contrast__col h3 {
  margin: 0;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.mf-contrast__col--claim h3 {
  color: #f2b8a2;
}

.mf-contrast__col--response h3 {
  color: #a8d8b9;
}

html[data-theme="light"] .mf-contrast__col--claim h3 {
  color: #9a3d1f;
}

html[data-theme="light"] .mf-contrast__col--response h3 {
  color: #1f6b3d;
}

.mf-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.mf-list li {
  padding: .6rem 0;
  border-top: 1px solid var(--ph-rule, rgba(191, 220, 246, .28));
  font-size: 1.05rem;
  line-height: 1.45;
}

.mf-fn {
  font-size: .68em;
  line-height: 0;
  vertical-align: super;
  margin-left: .1em;
}

.mf-fn + .mf-fn::before {
  content: ",";
  margin-right: .15em;
}

.mf-list time {
  font-variant-numeric: tabular-nums;
}

.mf-fn a {
  color: var(--ph-bridge, rgba(201, 222, 240, .86));
  text-decoration: none;
}

.mf-close p {
  font-size: clamp(1.3rem, 3.8vw, 1.6rem);
  font-weight: 560;
  line-height: 1.35;
  color: var(--ph-ink, #f4f8fc);
}

.mf-notes {
  margin: .5rem 0 0;
  padding-left: 1.4rem;
  color: var(--ph-faint, rgba(204, 222, 240, .46));
  font-size: .85rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.mf-notes li {
  margin: .35rem 0;
}

.mf-notes a {
  color: var(--ph-bridge, rgba(201, 222, 240, .86));
}

.mf-fig a:focus-visible,
.mf-fn a:focus-visible,
.mf-clip a:focus-visible {
  outline: 2px solid var(--ph-ink, #f4f8fc);
  outline-offset: 3px;
}

@media (min-width: 600px) {
  .mf-grid--posts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 800px) {
  .mf-contrast {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

.mf-quiet {
  margin-top: 2.5rem;
  color: var(--ph-muted, #9aabbc);
  font-size: 0.875rem;
}

.mf-stand {
  margin-top: 2.25rem;
  color: var(--ph-muted, #9aabbc);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
}
