/* 866 Orbit Rescue — Privacy Policy
   Direction: quiet mission dossier. One signature: sticky flight-checklist TOC. */

:root {
  --hull: #121a24;
  --ink: #243041;
  --fog: #6d7a88;
  --deck: #e8edf2;
  --panel: #f7f9fb;
  --seam: #c9d2db;
  --beacon: #c45e2a;
  --beacon-soft: rgba(196, 94, 42, 0.1);
  --pad: clamp(1.25rem, 4vw, 2rem);
  --shell: 72rem;
  --toc: 14.5rem;
  --doc: 40rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .masthead,
  .layout {
    animation: none;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--panel);
  background-image:
    linear-gradient(180deg, var(--deck) 0, transparent 18rem),
    radial-gradient(ellipse 90% 40% at 70% -5%, rgba(196, 94, 42, 0.06), transparent 50%);
  font-family: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(100% - var(--pad) * 2, var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: var(--pad);
  top: -3rem;
  z-index: 20;
  padding: 0.5rem 0.75rem;
  background: var(--hull);
  color: var(--panel);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--pad);
}

/* —— Masthead —— */
.masthead {
  border-bottom: 1px solid var(--seam);
  animation: rise 0.5s ease-out both;
}

.masthead__inner {
  padding: clamp(2.25rem, 6vw, 3.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}

.masthead__brand {
  margin: 0 0 1.25rem;
  font-family: Oxanium, "IBM Plex Sans", sans-serif;
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  color: var(--hull);
}

.masthead__copy {
  max-width: 32rem;
  padding-top: 1rem;
  border-top: 2px solid var(--beacon);
}

.masthead h1 {
  margin: 0 0 0.65rem;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.2vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--hull);
}

.masthead__lede {
  margin: 0 0 1rem;
  color: var(--fog);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
}

.masthead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--fog);
}

/* —— Layout: TOC + document —— */
.layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0 3.5rem;
  animation: rise 0.6s ease-out 0.06s both;
}

@media (min-width: 900px) {
  .layout {
    grid-template-columns: var(--toc) minmax(0, var(--doc));
    justify-content: center;
    column-gap: clamp(2rem, 5vw, 3.5rem);
    padding-top: 2.5rem;
  }
}

/* —— Contents rail —— */
.toc {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

@media (min-width: 900px) {
  .toc {
    position: sticky;
    top: 1.5rem;
    align-self: start;
    max-height: calc(100vh - 3rem);
    overflow: auto;
  }
}

.toc__label {
  margin: 0 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fog);
}

.toc__list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  border-left: 1px solid var(--seam);
}

.toc__list a {
  display: block;
  padding: 0.35rem 0 0.35rem 0.85rem;
  color: var(--fog);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.35;
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.toc__list a:hover,
.toc__list a:focus-visible {
  color: var(--hull);
  border-left-color: var(--beacon);
}

@media (max-width: 899px) {
  .toc {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--seam);
  }

  .toc__list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    border-left: none;
  }

  .toc__list a {
    padding: 0.2rem 0;
    border-left: none;
    margin-left: 0;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-color: var(--seam);
  }

  .toc__list a:hover,
  .toc__list a:focus-visible {
    border-left-color: transparent;
    text-decoration-color: var(--beacon);
  }
}

/* —— Document —— */
.doc {
  min-width: 0;
}

.doc__block {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--seam);
}

.doc__block:first-child {
  padding-top: 0;
}

.doc__block:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.doc h2,
.doc h3,
.doc h4 {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--hull);
  line-height: 1.3;
}

.doc h2 {
  margin: 0 0 0.9rem;
  font-size: 1.2rem;
}

.doc h3 {
  margin: 1.4rem 0 0.55rem;
  font-size: 1rem;
}

.doc h3:first-of-type {
  margin-top: 0.35rem;
}

.doc h4 {
  margin: 1.2rem 0 0.45rem;
  font-size: 0.9375rem;
  font-weight: 600;
}

.doc p {
  margin: 0.8rem 0;
}

.doc p:first-of-type {
  margin-top: 0;
}

.doc ul {
  margin: 0.6rem 0 1rem;
  padding-left: 1.15rem;
}

.doc li {
  margin: 0.4rem 0;
}

.doc li::marker {
  color: var(--beacon);
}

.doc strong {
  font-weight: 600;
  color: var(--hull);
}

a {
  color: var(--beacon);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--beacon);
  outline-offset: 3px;
}

/* —— Definitions —— */
.terms {
  margin: 1rem 0 0;
}

.terms__item {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--seam);
}

.terms__item:last-child {
  padding-bottom: 0;
}

.terms dt {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hull);
}

.terms dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--seam);
  background: var(--deck);
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
}

.site-footer__brand {
  margin: 0;
  font-family: Oxanium, "IBM Plex Sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--hull);
}

.back-to-top {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--seam);
  padding-bottom: 0.1rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.back-to-top:hover {
  color: var(--hull);
  border-bottom-color: var(--beacon);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1rem;
  }

  .doc__block {
    padding: 1.4rem 0;
  }

  .doc h2 {
    font-size: 1.1rem;
  }
}
