:root {
  color-scheme: dark;
  --dark-water: #041514;
  --deep-field: #071f1c;
  --signal-teal: #74e7d8;
  --soft-aqua: #a8d8cd;
  --bone-light: #f2ead8;
  --brass: #c99a52;
  --copper: #a95f3f;
  --night: var(--dark-water);
  --forest: var(--deep-field);
  --bone: var(--bone-light);
  --gold: var(--brass);
  --moss: #789c7d;
  --teal: var(--signal-teal);
  --rust: var(--copper);
  --ink: #071210;
  --line: rgba(242, 234, 216, 0.18);
  --soft-line: rgba(116, 231, 216, 0.26);
  --shadow: 0 1.4rem 4rem rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
  background: var(--night);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  color: var(--bone);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  background:
    radial-gradient(ellipse at 77% 5%, rgba(116, 231, 216, 0.18), transparent 30rem),
    radial-gradient(ellipse at 15% 35%, rgba(168, 216, 205, 0.08), transparent 34rem),
    linear-gradient(rgba(116, 231, 216, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(116, 231, 216, 0.035) 1px, transparent 1px),
    var(--dark-water);
  background-size: auto, auto, 3.5rem 3.5rem, 3.5rem 3.5rem, auto;
}

a {
  color: var(--gold);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--bone);
}

button,
textarea {
  font: inherit;
}

textarea {
  max-width: 100%;
}

:focus-visible {
  outline: 0.2rem solid var(--teal);
  outline-offset: 0.22rem;
}

.shell {
  width: min(100% - 2rem, 76rem);
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.7rem 1rem;
  color: var(--ink);
  background: var(--bone);
  border: 0.15rem solid var(--gold);
  border-radius: 0.35rem;
  font-weight: 800;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.station-label {
  margin: 0 0 0.55rem;
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.35;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--bone);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  text-wrap: balance;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 8vw, 6.7rem);
  letter-spacing: -0.055em;
}

h2 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5vw, 3.8rem);
  letter-spacing: -0.035em;
}

h3 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

p,
li {
  overflow-wrap: anywhere;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: min(47rem, 88vh);
  display: grid;
  align-items: center;
  padding: 7rem 0 5rem;
  border-bottom: 1px solid var(--line);
}

.hero::before,
.page-header::before,
.week-header::before {
  position: absolute;
  z-index: -1;
  content: "";
  inset: 0;
  background:
    radial-gradient(ellipse at 76% 48%, rgba(116, 231, 216, 0.17), transparent 25rem),
    linear-gradient(117deg, rgba(4, 21, 20, 0.99) 0 42%, rgba(7, 31, 28, 0.72) 72%, rgba(4, 21, 20, 0.96) 100%);
}

.hero__layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(22rem, 1.12fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.hero__copy {
  max-width: 52rem;
}

.hero__lead {
  max-width: 44rem;
  margin: 1.6rem 0 0;
  color: rgba(244, 232, 197, 0.78);
  font-size: clamp(1.08rem, 2vw, 1.4rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 2.9rem;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  color: var(--bone);
  background: rgba(7, 19, 15, 0.6);
  border: 1px solid var(--teal);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.button:hover {
  color: var(--ink);
  background: var(--bone);
  border-color: var(--bone);
}

.button--primary {
  color: var(--ink);
  background: var(--gold);
  border-color: var(--gold);
}

.field-station-scene {
  position: relative;
  width: min(100%, 48rem);
  min-width: 0;
  margin: 0;
  justify-self: end;
  overflow: hidden;
  background: var(--deep-field);
  border: 1px solid rgba(116, 231, 216, 0.45);
  border-radius: 0.35rem 2.8rem 0.35rem 1.2rem;
  box-shadow:
    0 0 0 0.45rem rgba(4, 21, 20, 0.72),
    0 0 4.5rem rgba(116, 231, 216, 0.14),
    var(--shadow);
}

.field-station-scene img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
}

.field-station-scene figcaption {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  max-width: min(20rem, calc(100% - 1.5rem));
  gap: 0.15rem;
  padding: 0.8rem 1rem;
  color: var(--bone-light);
  background: rgba(4, 21, 20, 0.9);
  border: 1px solid rgba(116, 231, 216, 0.5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1.45;
}

.station-nav {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(7, 19, 15, 0.94);
  border-bottom: 1px solid var(--soft-line);
  backdrop-filter: blur(0.6rem);
}

.station-nav__inner {
  display: flex;
  min-height: 3.75rem;
  align-items: center;
  gap: 1.2rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.station-nav a {
  flex: 0 0 auto;
  padding: 0.75rem 0;
  color: rgba(244, 232, 197, 0.82);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.station-nav a:hover {
  color: var(--gold);
}

.page-section {
  margin-block: clamp(4.5rem, 10vw, 8rem);
}

.feature-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem;
  align-items: end;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding: clamp(1.5rem, 5vw, 3.5rem);
  background:
    radial-gradient(circle at 92% 18%, rgba(116, 231, 216, 0.16), transparent 14rem),
    linear-gradient(135deg, rgba(7, 31, 28, 0.98), rgba(4, 21, 20, 0.94));
  border: 1px solid rgba(116, 231, 216, 0.42);
  color: var(--bone-light);
  box-shadow: var(--shadow);
}

.feature-panel h2,
.feature-panel .station-label {
  color: inherit;
}

.feature-panel p {
  max-width: 48rem;
}

.feature-panel .boundary-note {
  border-color: var(--copper);
}

.home-sticker-shelf {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1.4rem);
  margin-top: 2rem;
}

.sticker-resident {
  min-width: 0;
  padding: 0.8rem;
  color: var(--bone-light);
  background: linear-gradient(160deg, rgba(7, 31, 28, 0.94), rgba(4, 21, 20, 0.98));
  border: 1px solid rgba(116, 231, 216, 0.24);
  border-radius: 1.2rem 0.3rem 1.2rem 0.3rem;
  text-align: center;
  text-decoration: none;
}

.sticker-resident:hover {
  color: var(--signal-teal);
  border-color: var(--signal-teal);
}

.sticker-resident img {
  display: block;
  width: 100%;
  max-height: 17rem;
  object-fit: contain;
}

.sticker-resident strong {
  display: block;
  margin-top: 0.55rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(16rem, 0.8fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-heading > p {
  margin: 0;
  color: rgba(244, 232, 197, 0.67);
}

.section-heading--full {
  grid-column: 1 / -1;
}

.week-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.week-card,
.route-card,
.boundary-card {
  position: relative;
  min-width: 0;
  padding: 1.4rem;
  background:
    linear-gradient(160deg, rgba(13, 33, 26, 0.98), rgba(7, 19, 15, 0.95));
  border: 1px solid var(--soft-line);
  border-radius: 0.4rem 1.35rem 0.4rem 0.8rem;
}

.week-card:nth-child(3n + 2) {
  transform: translateY(0.8rem);
}

.week-card::before,
.route-card::before {
  position: absolute;
  width: 2.1rem;
  height: 2.1rem;
  content: "";
  top: 0.8rem;
  right: 0.8rem;
  border: 1px solid rgba(128, 151, 101, 0.55);
  border-radius: 50%;
}

.week-card > p:not(.station-label),
.route-card > p {
  color: rgba(244, 232, 197, 0.68);
}

.route-link {
  display: inline-block;
  margin-top: 0.45rem;
  color: var(--gold);
  font-weight: 800;
}

.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.field-sticker-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.4rem, 5vw, 3rem);
  align-items: center;
  margin-block: clamp(4.5rem, 10vw, 8rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: rgba(13, 33, 26, 0.75);
  border: 1px dashed var(--copper);
}

.sticker-mark {
  display: grid;
  width: clamp(6.5rem, 18vw, 10rem);
  aspect-ratio: 1;
  place-items: center;
  color: var(--ink);
  background: var(--gold);
  border: 0.45rem double var(--ink);
  border-radius: 48% 52% 45% 55%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 4rem);
  font-weight: 800;
  transform: rotate(-5deg);
}

.privacy-line {
  color: var(--teal);
  font-weight: 800;
}

.boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: clamp(4.5rem, 10vw, 8rem);
}

.boundary-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.boundary-card--wide {
  grid-column: 1 / -1;
}

.boundary-card__number {
  color: var(--copper);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 800;
}

.boundary-card p {
  margin: 0;
}

.station-footer {
  padding: 3rem 0 4rem;
  color: rgba(244, 232, 197, 0.62);
  background: rgba(5, 14, 10, 0.78);
  border-top: 1px solid var(--line);
}

.station-footer__inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.station-footer p {
  margin: 0;
}

.station-footer strong {
  color: var(--gold);
}

.page-header,
.week-header {
  position: relative;
  isolation: isolate;
  padding: clamp(5.5rem, 12vw, 9rem) 0 clamp(3.5rem, 8vw, 6rem);
  border-bottom: 1px solid var(--line);
}

.page-header__inner,
.week-header__inner {
  max-width: 68rem;
}

.page-header p:last-child,
.week-header__provocation {
  max-width: 53rem;
  margin: 1.4rem 0 0;
  color: rgba(244, 232, 197, 0.78);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
}

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

.paper-panel {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--ink);
  background:
    linear-gradient(170deg, rgba(244, 232, 197, 0.98), rgba(231, 184, 92, 0.8)),
    var(--bone);
  border: 0.3rem double rgba(16, 32, 25, 0.4);
  box-shadow: var(--shadow);
  transform: rotate(-0.45deg);
}

.paper-panel--live {
  color: var(--bone);
  background:
    radial-gradient(circle at 86% 14%, rgba(101, 166, 158, 0.22), transparent 9rem),
    var(--forest);
  border-color: rgba(101, 166, 158, 0.45);
  transform: translateY(1.2rem) rotate(0.35deg);
}

.paper-panel h2,
.paper-panel .station-label {
  color: inherit;
}

.signal-list {
  padding-left: 1.2rem;
}

.signal-list li + li {
  margin-top: 0.7rem;
}

.boundary-note {
  padding: 0.9rem 1rem;
  border-left: 0.28rem solid var(--copper);
}

.distribution-panel {
  padding: clamp(1.5rem, 5vw, 3rem);
  background: rgba(13, 33, 26, 0.72);
  border: 1px solid var(--soft-line);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 1.5rem;
  background: var(--soft-line);
}

.distribution-grid article {
  padding: 1.4rem;
  background: var(--forest);
}

.distribution-grid p {
  color: rgba(244, 232, 197, 0.7);
}

.machine-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-block: clamp(4.5rem, 10vw, 8rem);
  padding: clamp(1.5rem, 5vw, 3rem);
  background: linear-gradient(130deg, rgba(162, 79, 55, 0.28), rgba(13, 33, 26, 0.8));
  border: 1px solid rgba(184, 108, 66, 0.55);
}

.machine-panel__mark {
  display: grid;
  width: 4.5rem;
  height: 4.5rem;
  place-items: center;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.5rem;
}

.home-route {
  display: inline-block;
  margin-bottom: 2rem;
  font-weight: 800;
}

.week-layout {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  margin-block: clamp(3rem, 8vw, 6rem);
}

.week-gauge {
  position: sticky;
  top: 5.2rem;
  display: grid;
  width: 7rem;
  aspect-ratio: 1;
  place-items: center;
  align-content: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5rem rgba(13, 33, 26, 0.8);
}

.week-gauge span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.8rem;
  line-height: 1;
}

.week-gauge p {
  margin: 0.35rem 0 0;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.week-sections {
  min-width: 0;
}

.field-section {
  position: relative;
  margin-bottom: 1.25rem;
  padding: clamp(1.4rem, 5vw, 3rem);
  background: rgba(13, 33, 26, 0.72);
  border: 1px solid var(--soft-line);
}

.field-section:nth-child(even) {
  margin-left: clamp(0rem, 3vw, 2.3rem);
}

.field-section__lead {
  max-width: 55rem;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.wire-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0;
  list-style: none;
}

.wire-list li {
  position: relative;
  padding: 1rem 1rem 1rem 2.9rem;
  background: rgba(7, 19, 15, 0.62);
  border-left: 0.2rem solid var(--copper);
}

.wire-list li::before {
  position: absolute;
  width: 1rem;
  height: 1rem;
  content: "";
  top: 1.25rem;
  left: 1rem;
  border: 1px solid var(--gold);
  border-radius: 50%;
}

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

.route-card--compact {
  padding: 1.2rem;
}

.field-section--live {
  background:
    radial-gradient(circle at 95% 12%, rgba(128, 151, 101, 0.2), transparent 13rem),
    rgba(13, 33, 26, 0.8);
  border-color: rgba(128, 151, 101, 0.45);
}

.machine-work {
  background:
    linear-gradient(145deg, rgba(162, 79, 55, 0.17), rgba(7, 19, 15, 0.88));
  border-color: rgba(184, 108, 66, 0.55);
}

.machine-work label {
  display: block;
  margin: 1.4rem 0 0.5rem;
  color: var(--gold);
  font-weight: 800;
}

.machine-work textarea {
  display: block;
  width: 100%;
  padding: 1rem;
  resize: vertical;
  color: var(--ink);
  background: var(--bone);
  border: 0.25rem double var(--copper);
  border-radius: 0.25rem;
  line-height: 1.55;
}

.copy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 0.9rem;
}

.copy-status {
  flex: 1 1 16rem;
  margin: 0;
  color: rgba(244, 232, 197, 0.7);
}

.button--copy {
  display: none;
}

.js .button--copy {
  display: inline-flex;
}

.unresolved-panel {
  color: var(--ink);
  background:
    linear-gradient(170deg, rgba(244, 232, 197, 0.98), rgba(231, 184, 92, 0.82));
  border: 0.3rem double rgba(16, 32, 25, 0.5);
  transform: rotate(-0.25deg);
}

.unresolved-panel h2,
.unresolved-panel .station-label {
  color: var(--ink);
}

.unresolved-panel > p:last-child {
  max-width: 52rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  line-height: 1.35;
}

.week-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.3rem;
  border-top: 1px solid var(--line);
}

.week-navigation a {
  max-width: 46%;
  font-weight: 800;
}

@media (max-width: 52rem) {
  .hero__layout,
  .feature-panel,
  .section-heading,
  .station-footer__inner,
  .start-grid,
  .machine-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-station-scene {
    width: min(100%, 44rem);
    justify-self: start;
  }

  .week-grid,
  .route-grid,
  .distribution-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-panel {
    align-items: start;
  }

  .field-section:nth-child(even) {
    margin-left: 0;
  }
}

@media (max-width: 37rem) {
  .shell {
    width: min(100% - 1rem, 76rem);
  }

  .hero {
    min-height: 0;
    padding-block: 5rem 3.5rem;
  }

  .hero::before,
  .page-header::before,
  .week-header::before {
    background:
      radial-gradient(circle at 85% 20%, transparent 0 6rem, rgba(101, 166, 158, 0.15) 6.05rem 6.15rem, transparent 6.2rem),
      linear-gradient(155deg, rgba(13, 33, 26, 0.98), rgba(7, 19, 15, 0.88));
  }

  .week-grid,
  .route-grid,
  .distribution-grid,
  .boundary-grid,
  .wire-list,
  .route-grid--week,
  .field-sticker-panel,
  .home-sticker-shelf {
    grid-template-columns: minmax(0, 1fr);
  }

  .week-card:nth-child(3n + 2),
  .paper-panel--live {
    transform: none;
  }

  .boundary-card--wide,
  .section-heading--full {
    grid-column: auto;
  }

  .sticker-mark {
    width: 7rem;
  }

  .week-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .week-gauge {
    position: static;
    width: 5.7rem;
  }

  .week-navigation {
    flex-direction: column;
  }

  .week-navigation a {
    max-width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
