/* Second Orbit 0.7.7: restrained visual alignment for the existing public entry. */
.entry-live-shell.cir-entry-aligned {
  background:
    radial-gradient(circle at 72% 7%, rgba(36, 96, 93, 0.11), transparent 30rem),
    radial-gradient(circle at 7% 80%, rgba(28, 89, 91, 0.1), transparent 34rem),
    linear-gradient(145deg, #02090b 0%, #041114 52%, #030a0c 100%);
}

.entry-live-shell.cir-entry-aligned > .site-header {
  width: min(78rem, calc(100% - 3rem));
  min-height: 6rem;
  margin-inline: auto;
  padding-inline: 0;
  border-bottom-color: rgba(84, 124, 117, 0.36);
}

.entry-live-shell.cir-entry-aligned .wordmark {
  width: clamp(12.5rem, 20vw, 20.7rem);
  max-width: 52vw;
  flex: 0 1 auto;
}

.entry-live-shell.cir-entry-aligned .entry-wordmark-image {
  display: block;
  width: 100%;
  height: auto;
  filter: none;
}

.entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere {
  position: absolute;
  z-index: 0;
  top: 9.3rem;
  right: -7%;
  width: min(68rem, 72vw);
  height: 41rem;
  overflow: hidden;
  border: 1px solid rgba(84, 124, 117, 0.18);
  border-radius: 1.4rem;
  mask-image: linear-gradient(90deg, transparent 0, #000 25%, #000 82%, transparent 100%);
  opacity: 0.36;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere picture,
.entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere img {
  display: block;
  width: 100%;
  height: 100%;
}

.entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere img {
  object-fit: cover;
  object-position: 58% center;
}

.entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #02090b 0, rgba(2, 9, 11, 0.55) 28%, transparent 62%),
    linear-gradient(to bottom, rgba(2, 9, 11, 0.4), transparent 32%, rgba(2, 9, 11, 0.78));
  content: "";
}

.entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light {
  position: absolute;
  z-index: 2;
  display: block;
  pointer-events: none;
}

.entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light--warm {
  top: -28%;
  left: 64%;
  width: 24%;
  height: 150%;
  background: linear-gradient(105deg, transparent, rgba(240, 206, 166, 0.34), transparent 68%);
  filter: blur(1rem);
  mask-image: linear-gradient(to bottom, transparent, #000 26%, #000 72%, transparent);
  opacity: 0.12;
  transform: translateX(-10%) skewX(-10deg);
}

.entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light--line {
  top: 24%;
  left: 54%;
  width: 32%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(226, 170, 112, 0.7), transparent);
  box-shadow: 0 0 1rem rgba(226, 170, 112, 0.32);
  opacity: 0.12;
}

.entry-live-shell.cir-entry-aligned[data-entry-state="awaiting-audio"] .cir-entry-architecture-atmosphere,
.entry-live-shell.cir-entry-aligned[data-entry-state="stabilizing"] .cir-entry-architecture-atmosphere,
.entry-live-shell.cir-entry-aligned[data-entry-state="failed-audio"] .cir-entry-architecture-atmosphere {
  opacity: 0.06;
}

.entry-live-shell.cir-entry-aligned[data-entry-state="stable"] .cir-entry-architecture-atmosphere {
  opacity: 0.12;
}

.entry-live-shell.cir-entry-aligned .entry-live-stage {
  z-index: 3;
}

.entry-live-shell.cir-entry-aligned .entry-live-panel {
  border-color: rgba(84, 124, 117, 0.6);
  border-radius: 1rem;
  background:
    radial-gradient(circle at 84% 8%, rgba(64, 133, 127, 0.11), transparent 20rem),
    linear-gradient(145deg, rgba(13, 39, 43, 0.97), rgba(5, 22, 26, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(157, 248, 232, 0.04),
    0 28px 72px rgba(0, 0, 0, 0.34);
}

.entry-live-shell.cir-entry-aligned .entry-live-panel .primary-action,
.entry-live-shell.cir-entry-aligned .return-route-panel button[type="submit"] {
  min-height: 3.55rem;
  border-color: var(--teal-bright);
  border-radius: 0.55rem;
  background: linear-gradient(100deg, #72d8ca, #9df0df 58%, #70d0c4);
  color: #041113;
  font-weight: 650;
}

.entry-live-shell.cir-entry-aligned .cir-entry-panel-impulse {
  position: absolute;
  z-index: 6;
  top: -1px;
  left: 9%;
  width: 9rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-bright), transparent);
  box-shadow: 0 0 0.9rem rgba(157, 248, 232, 0.42);
  opacity: 0;
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .entry-live-shell.cir-entry-aligned[data-entry-state="idle"] .cir-entry-atmosphere-light--warm {
    animation: entry077-atmosphere-warm 17s ease-in-out infinite;
  }

  .entry-live-shell.cir-entry-aligned[data-entry-state="idle"] .cir-entry-atmosphere-light--line {
    animation: entry077-atmosphere-line 10.5s ease-in-out infinite;
  }

  .entry-live-shell.cir-entry-aligned[data-entry-state="idle"] .cir-entry-panel-impulse {
    animation: entry077-interface-trace 9.8s -1.4s ease-in-out infinite;
  }

  .entry-live-shell.cir-entry-aligned[data-entry-state="stable"] .cir-entry-panel-impulse {
    animation: entry077-frame-confirm 1.05s ease-out 1;
  }
}

@media (max-width: 47.5rem) {
  .entry-live-shell.cir-entry-aligned > .site-header {
    width: calc(100% - 2rem);
    min-height: 4.5rem;
  }

  .entry-live-shell.cir-entry-aligned .wordmark {
    width: min(10.75rem, 48vw);
  }

  .entry-live-shell.cir-entry-aligned .cir-entry-architecture-atmosphere {
    top: 5.5rem;
    right: -18%;
    width: 35rem;
    max-width: 142vw;
    height: 28rem;
    mask-image: linear-gradient(to bottom, transparent 0, #000 18%, #000 78%, transparent 100%);
    opacity: 0.25;
  }

  .entry-live-shell.cir-entry-aligned[data-entry-state="awaiting-audio"] .cir-entry-architecture-atmosphere,
  .entry-live-shell.cir-entry-aligned[data-entry-state="stabilizing"] .cir-entry-architecture-atmosphere,
  .entry-live-shell.cir-entry-aligned[data-entry-state="failed-audio"] .cir-entry-architecture-atmosphere {
    opacity: 0.05;
  }

  .entry-live-shell.cir-entry-aligned[data-entry-state="stable"] .cir-entry-architecture-atmosphere {
    opacity: 0.1;
  }
}

@media (max-width: 23.75rem) {
  .entry-live-shell.cir-entry-aligned > .site-header {
    width: calc(100% - 1.5rem);
    min-height: 4rem;
    gap: 0.5rem;
  }

  .entry-live-shell.cir-entry-aligned .wordmark {
    width: min(7.75rem, 40vw);
  }

  .entry-live-shell.cir-entry-aligned .language-trigger {
    width: 10rem;
    max-width: 50vw;
  }
}

.entry-page-hidden .entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light,
.entry-page-hidden .entry-live-shell.cir-entry-aligned .cir-entry-panel-impulse {
  animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
  .entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light,
  .entry-live-shell.cir-entry-aligned .cir-entry-panel-impulse {
    animation: none !important;
  }

  .entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light--warm {
    opacity: 0.08;
    transform: translateX(-10%) skewX(-10deg);
  }

  .entry-live-shell.cir-entry-aligned .cir-entry-atmosphere-light--line,
  .entry-live-shell.cir-entry-aligned .cir-entry-panel-impulse {
    opacity: 0;
  }
}

@keyframes entry077-atmosphere-warm {
  0%, 100% {
    opacity: 0.08;
    transform: translateX(-12%) skewX(-10deg);
  }
  52% {
    opacity: 0.25;
    transform: translateX(22%) skewX(-10deg);
  }
}

@keyframes entry077-atmosphere-line {
  0%, 18%, 100% {
    opacity: 0.06;
    transform: translateX(-14%);
  }
  46% { opacity: 0.45; }
  68% {
    opacity: 0.11;
    transform: translateX(26%);
  }
}

@keyframes entry077-interface-trace {
  0%, 72%, 100% {
    opacity: 0;
    transform: translateX(-35%);
  }
  78% { opacity: 0.92; }
  89% {
    opacity: 0;
    transform: translateX(240%);
  }
}

@keyframes entry077-frame-confirm {
  0%, 100% {
    opacity: 0;
    transform: translateX(-20%);
  }
  35% { opacity: 0.9; }
  80% {
    opacity: 0;
    transform: translateX(260%);
  }
}

/*
 * Second Orbit 0.7.15: keep the public entry usable at a genuine 200 percent
 * root text size. The existing type scale stays intact; narrow layouts gain
 * shrinkable boxes and vertical reflow instead of clipped controls.
 */
@media (max-width: 47.5rem) {
  .entry-live-shell.cir-entry-aligned .entry-live-stage,
  .entry-live-shell.cir-entry-aligned .entry-live-panel,
  .entry-live-shell.cir-entry-aligned .entry-live-panel [data-story-view],
  .entry-live-shell.cir-entry-aligned .story-view,
  .entry-live-shell.cir-entry-aligned .signal-hook-column,
  .entry-live-shell.cir-entry-aligned .return-route-panel,
  .entry-live-shell.cir-entry-aligned .route-form,
  .entry-live-shell.cir-entry-aligned .route-input-row {
    min-width: 0;
    max-width: 100%;
  }

  .entry-live-shell.cir-entry-aligned .primary-action {
    min-width: 0;
    max-width: 100%;
    flex-wrap: wrap;
    column-gap: 0.5rem;
    white-space: normal;
  }

  .entry-live-shell.cir-entry-aligned .primary-action > span:first-child {
    min-width: 0;
    overflow-wrap: break-word;
  }

  .entry-live-shell.cir-entry-aligned .primary-action .action-arrow {
    flex: 0 0 28px;
    margin-left: auto;
  }

  .entry-live-shell.cir-entry-aligned .route-input-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-live-shell.cir-entry-aligned .route-input-row input,
  .entry-live-shell.cir-entry-aligned .route-input-row button {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .entry-live-shell.cir-entry-aligned .route-input-row button {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .entry-live-shell.cir-entry-aligned .site-footer,
  .entry-live-shell.cir-entry-aligned .site-footer nav {
    min-width: 0;
    max-width: 100%;
  }

  .entry-live-shell.cir-entry-aligned .site-footer nav {
    flex-wrap: wrap;
  }

  .entry-live-shell.cir-entry-aligned .site-footer a {
    overflow-wrap: anywhere;
  }

  .entry-live-shell.cir-entry-aligned .return-route-panel h2,
  .entry-live-shell.cir-entry-aligned .route-privacy,
  .entry-live-shell.cir-entry-aligned .signal-hook-column p,
  .entry-live-shell.cir-entry-aligned .signal-hook-column blockquote,
  .entry-live-shell.cir-entry-aligned .signal-status-card dt,
  .entry-live-shell.cir-entry-aligned .site-footer > span {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 22.5rem) {
  .entry-live-shell.cir-entry-aligned .entry-live-stage {
    padding-inline: 0.5rem;
  }

  .entry-live-shell.cir-entry-aligned[data-story-stage="opening"] .story-opening,
  .entry-live-shell.cir-entry-aligned .signal-hook-view {
    padding-inline: 0.75rem;
  }

  .entry-live-shell.cir-entry-aligned .primary-action,
  .entry-live-shell.cir-entry-aligned .route-input-row input,
  .entry-live-shell.cir-entry-aligned .route-input-row button {
    padding-inline: 0.625rem;
  }

  .entry-live-shell.cir-entry-aligned .site-footer {
    align-items: flex-start;
    padding-inline: 0.75rem;
  }

  .entry-live-shell.cir-entry-aligned .site-footer nav {
    width: 100%;
    gap: 0.5rem 1rem;
  }
}

@media (max-width: 20rem) {
  .entry-live-shell.cir-entry-aligned .entry-live-stage {
    padding-inline: 8px;
  }

  .entry-live-shell.cir-entry-aligned[data-story-stage="opening"] .story-opening,
  .entry-live-shell.cir-entry-aligned .signal-hook-view {
    padding-inline: 12px;
  }

  .entry-live-shell.cir-entry-aligned .primary-action,
  .entry-live-shell.cir-entry-aligned .route-input-row input,
  .entry-live-shell.cir-entry-aligned .route-input-row button {
    padding-inline: 16px;
  }
}
