.agent-observatory {
  --agents-canvas: #0b1220;
  --agents-surface: #14243a;
  --agents-surface-raised: #20334d;
  --agents-text: #f4f7fb;
  --agents-muted: #b7c5d6;
  --agents-teal: #72e0d1;
  --agents-gold: #f3c979;
  --agents-border: #64768d;
  --agents-focus: #ffd166;

  display: grid;
  gap: clamp(1.7rem, 4vw, 3rem);
  margin: .75rem 0 clamp(2rem, 4.2vw, 4rem);
  padding: clamp(.85rem, 3.4vw, 2.6rem);
  border: 1px solid #33465e;
  border-radius: clamp(.8rem, 2.3vw, 1.5rem);
  color: var(--agents-text);
  background: var(--agents-canvas);
}

.agent-observatory,
.agent-observatory * {
  box-sizing: border-box;
}

.agent-observatory [hidden] {
  display: none !important;
}

.agent-observatory__hero {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(1.15rem, 3.6vw, 3.4rem);
  align-items: center;
}

.agent-observatory__eyebrow {
  margin: 0 0 .8rem;
  color: var(--agents-gold);
  font-size: .76rem;
  font-weight: 740;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.agent-observatory__hero h1 {
  max-width: 15ch;
  margin: 0;
  font: 500 clamp(2.15rem, 4.5vw, 4.75rem)/1.04 Georgia, serif;
  letter-spacing: -.038em;
  color: var(--agents-text);
  text-wrap: balance;
}

.agent-observatory__lede {
  max-width: 34ch;
  margin: .9rem 0 1.15rem;
  color: var(--agents-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  line-height: 1.6;
}

.agent-observatory__actions,
.agent-observatory__motion {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .9rem;
}

.agent-observatory__actions > a,
.agent-observatory__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--agents-teal);
  font-size: .93rem;
  text-underline-offset: .2em;
}

.agent-observatory__actions > .agent-observatory__primary {
  gap: .5rem;
  padding-inline: .8rem;
  border: 1px solid var(--agents-gold);
  border-radius: .45rem;
  color: var(--agents-canvas);
  background: var(--agents-gold);
  font-weight: 750;
  text-decoration: none;
}

.agent-observatory__primary:hover {
  text-decoration: underline;
}

.agent-observatory__art,
.agent-observatory__picture,
.agent-observatory__hero-copy {
  min-width: 0;
}

.agent-observatory__art {
  margin: 0;
}

.agent-observatory__picture {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--agents-border);
  border-radius: .85rem;
  background: var(--agents-surface);
}

.agent-observatory__picture img,
.agent-observatory__cards img {
  display: block;
  width: 100%;
  height: auto;
}

.agent-observatory__picture img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

.agent-observatory__motion {
  margin-top: .25rem;
  justify-content: space-between;
  color: var(--agents-muted);
}

.agent-observatory__motion button {
  min-height: 44px;
  padding: 0;
  border: 0;
  color: var(--agents-teal);
  background: transparent;
  font: inherit;
  font-size: .89rem;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}

.agent-observatory__motion button:disabled,
.agent-observatory__motion span {
  color: var(--agents-muted);
}

.agent-observatory__motion button:disabled {
  text-decoration: none;
  cursor: default;
}

.agent-observatory__motion span {
  font-size: .84rem;
}

.agent-observatory__light {
  position: absolute;
  left: var(--light-x);
  top: var(--light-y);
  width: 11%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, #fff5c88c, #fbe4a442 45%, transparent);
  opacity: 0;
  pointer-events: none;
}

.agent-observatory__light--one { --light-x: 11.4%; --light-y: 66.1%; }
.agent-observatory__light--two { --light-x: 63.6%; --light-y: 71.1%; }
.agent-observatory__light--three { --light-x: 89.2%; --light-y: 20.2%; }

.agent-observatory__art.is-moving .agent-observatory__light {
  animation: observatory-light 12s ease-in-out infinite;
}

.agent-observatory__art.is-moving .agent-observatory__light--two {
  animation-delay: 2s;
}

.agent-observatory__art.is-moving .agent-observatory__light--three {
  animation-delay: 4s;
}

@keyframes observatory-light {
  0%, 100% { opacity: 0; }
  40%, 55% { opacity: .72; }
}

.agent-observatory__doors > h2,
.agent-observatory__panel > h2,
.agent-observatory__work-intro h2 {
  margin: 0 0 .65rem;
  font: 500 clamp(1.4rem, 2.5vw, 2.1rem)/1.17 Georgia, serif;
  color: var(--agents-text);
  text-wrap: balance;
}

.agent-observatory__cards,
.agent-observatory__routes {
  display: grid;
  gap: clamp(.65rem, 1.5vw, 1.05rem);
}

.agent-observatory__cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.agent-observatory__cards li {
  min-width: 0;
}

.agent-observatory__cards a {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--agents-border);
  border-radius: .65rem;
  color: var(--agents-text);
  background: var(--agents-surface);
  text-decoration: none;
}

.agent-observatory__cards a:hover {
  background: var(--agents-surface-raised);
}

.agent-observatory__cards img {
  aspect-ratio: 8 / 5;
  object-fit: contain;
}

.agent-observatory__card-copy {
  position: relative;
  display: grid;
  gap: .27rem;
  padding: .85rem 2rem 1rem .85rem;
  color: var(--agents-muted);
  font-size: .88rem;
  line-height: 1.45;
}

.agent-observatory__card-copy strong {
  color: var(--agents-text);
  font-size: 1.04rem;
}

.agent-observatory__arrow {
  position: absolute;
  inset: .85rem .85rem auto auto;
  color: var(--agents-gold);
}

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

.agent-observatory__doors,
.agent-observatory__panel {
  scroll-margin-top: 1.4rem;
}

.agent-observatory__panel {
  min-width: 0;
  align-self: stretch;
  padding: clamp(.95rem, 3vw, 1.6rem);
  border: 1px solid var(--agents-border);
  border-radius: .65rem;
  background: var(--agents-surface);
}

.agent-observatory__panel:target {
  border-color: var(--agents-gold);
}

.agent-observatory__panel > p,
.agent-observatory__work-intro p {
  max-width: 59ch;
  margin: 0;
  color: var(--agents-muted);
  line-height: 1.55;
}

.agent-observatory__panel .agent-observatory__demo-note {
  color: var(--agents-gold);
  font-size: .91rem;
}

.agent-observatory__links {
  margin: .3rem 0 0;
  padding: 0;
  list-style: none;
}

.agent-observatory__links li + li {
  border-block-start: 1px solid #4a607e;
}

.agent-observatory__work {
  grid-column: 1 / -1;
}

.agent-observatory__work-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: start;
  gap: .6rem 1.5rem;
}

.agent-observatory #agent-starter {
  min-width: 0;
  margin-top: .85rem;
}

.agent-observatory #agent-starter:empty {
  margin-top: 0;
}

.agent-observatory #agent-starter pre {
  max-width: 100%;
  overflow-x: auto;
}

.agent-observatory__steps {
  padding-inline-start: 1.35rem;
  margin: .8rem 0 0;
  color: var(--agents-text);
}

.agent-observatory__steps li + li {
  margin-top: .4rem;
}

.agent-observatory__glossary {
  padding: .15rem .8rem;
  border: 1px solid var(--agents-border);
  border-radius: .55rem;
  background: var(--agents-surface);
}

.agent-observatory__glossary summary {
  min-height: 44px;
  padding-block: .55rem;
  color: var(--agents-text);
  font-weight: 700;
  cursor: pointer;
}

.agent-observatory__glossary dl {
  display: grid;
  gap: .6rem;
  margin: .4rem 0 .9rem;
}

.agent-observatory__glossary dd {
  margin: 0;
  color: var(--agents-muted);
}

.agent-observatory__glossary dt {
  color: var(--agents-gold);
  font-weight: 700;
}

.agent-observatory :is(a, button, summary):focus-visible {
  outline: 3px solid var(--agents-focus);
  outline-offset: 3px;
}

.agent-observatory-previous {
  margin-block: clamp(1rem, 3vw, 2rem);
  padding: .6rem clamp(.8rem, 2vw, 1.25rem);
  border: 1px solid #82958d;
  border-radius: .6rem;
}

.agent-observatory-previous > summary {
  min-height: 44px;
  padding-block: .6rem;
  font-weight: 700;
  cursor: pointer;
}

.agent-observatory-previous #agent-entrance-title {
  margin: .2rem 0 .65rem;
  color: #fbf5e9;
  font: 500 clamp(2.1rem, 4.7vw, 4rem)/1.05 Georgia, serif;
}

@media (max-width: 930px) {
  .agent-observatory__hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .agent-observatory__hero h1 {
    max-width: 19ch;
  }

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

@media (max-width: 570px) {
  .agent-observatory__cards,
  .agent-observatory__routes,
  .agent-observatory__work-intro {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-observatory__art.is-moving .agent-observatory__light {
    animation: none;
  }
}
