:root {
  --navy: #032e5c;
  --navy-2: #021f3f;
  --cream: #fbf7f0;
  --cream-dim: #eeebe4;
  --line: rgba(251, 247, 240, 0.16);
  --muted: rgba(251, 247, 240, 0.62);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Avenir Next", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--navy-2);
  color: var(--cream);
}
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr) 420px; min-height: 100vh; }
.rail {
  background: var(--navy);
  border-right: 1px solid var(--line);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.record-note {
  margin: -4px 0 12px;
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}
.logo { width: 100%; height: auto; display: block; margin-bottom: 28px; }
.kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}
.rail h1 { font-size: 22px; margin: 0 0 8px; font-weight: 700; }
.rail p { font-size: 13px; line-height: 1.45; color: var(--muted); margin: 0 0 24px; }
.nav-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 18px 0 10px;
}
.nav {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.nav button {
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--cream);
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 8px 12px;
  margin: 0 0 4px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.nav button.on {
  background: rgba(251, 247, 240, 0.1);
  border-color: var(--line);
}
.nav button[disabled] { color: var(--muted); cursor: default; }
.main {
  padding: 24px 28px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; width: 100%; }
.tabs button {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.tabs button.on { background: var(--cream); color: var(--navy); }
.stage {
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}
.stage video, .stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(82vh, 960px);
  object-fit: contain;
  background: #000;
}
.stage video { aspect-ratio: 2 / 3; }
.stage.tall video { aspect-ratio: 9 / 16; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.steps figure { margin: 0; }
.steps img { width: 100%; height: 180px; object-fit: cover; display: block; background: #000; }
.steps figcaption { font-size: 11px; color: var(--muted); margin-top: 6px; }
.hide { display: none !important; }
.ask {
  position: relative;
  background: var(--navy);
  border-left: 1px solid var(--line);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow-y: auto;
}
.ask h2 { margin: 0 0 6px; font-size: 18px; }
.ask .sub { color: var(--muted); font-size: 13px; line-height: 1.4; margin: 0 0 18px; }
.talk-row {
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 8px;
  position: relative;
  z-index: 50;
}
.talk, .end {
  height: 56px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.talk {
  background: var(--cream);
  color: var(--navy);
}
.talk.live { background: #c45c26; color: #fff; }
.end {
  background: #c45c26;
  color: #fff;
  border: 0;
}
.talk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 50;
}
.talk-bar .kicker { margin: 0; }
.talk-bar .end {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
}
.status { min-height: 1.4em; font-size: 12px; color: var(--muted); margin: 10px 0 12px; }
.talk-window {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid rgba(92, 150, 220, 0.45);
  border-radius: 16px;
  background: linear-gradient(165deg, #032e5c 0%, #032e5c 58%, #c45c26 100%);
  flex: 1 1 auto;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateZ(0);
}
.talk-window .kicker { margin-bottom: 0; }
.orb-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 0 8px;
}
.orb {
  --level: 0;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6ea 0%, #f2b58c 34%, #c45c26 70%, #7a3313 100%);
  box-shadow: 0 0 calc(20px + var(--level) * 60px) rgba(242, 160, 110, calc(0.35 + var(--level) * 0.5));
  transform: scale(calc(0.9 + var(--level) * 0.28));
  transition: transform 80ms linear, box-shadow 80ms linear, filter 300ms ease;
}
.orb span {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid rgba(251, 247, 240, 0.55);
  animation: orb-ring 2.4s ease-out infinite;
}
.orb[data-state="connecting"] { animation: orb-breathe 1.2s ease-in-out infinite; }
.orb[data-state="listening"] span { animation-duration: 2.8s; }
.orb[data-state="speaking"] span { animation-duration: 1.1s; }
.orb[data-state="off"] { filter: grayscale(1) brightness(0.7); }
.orb[data-state="off"] span { animation: none; opacity: 0; }
.orb-label {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
}
@keyframes orb-ring {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(1.45); opacity: 0; }
}
@keyframes orb-breathe {
  0%, 100% { transform: scale(0.88); }
  50% { transform: scale(0.98); }
}
@media (prefers-reduced-motion: reduce) {
  .orb, .orb span { animation: none !important; transition: none; }
}
.transcript {
  flex: 1 1 auto;
  min-height: 220px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px 2px 12px;
}
.transcript p {
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.4;
}
.transcript .coe { color: var(--cream); }
.transcript .you { color: #ffd3b8; }
.type-row {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 8px;
}
.type-row input {
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  color: var(--navy);
  background: var(--cream);
}
.type-row button {
  height: 44px;
  border: 0;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.followup {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.followup textarea,
.followup input {
  display: block;
  width: 100%;
  margin: 0 0 8px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  color: var(--navy);
  background: var(--cream);
  border: 0;
  border-radius: var(--radius);
}
.followup textarea { min-height: 72px; resize: vertical; }
.send {
  width: 100%;
  height: 44px;
  border: 1px solid var(--cream);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.faq { margin-top: 8px; }
.faq-toggle {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.faq-toggle.on {
  background: rgba(251, 247, 240, 0.1);
  border-color: var(--cream);
}
.faq-panel { margin-top: 10px; }
.faq-hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}
.plants { margin: 0; }
.faq-item { margin: 0 0 6px; }
.faq-item > button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.faq-item.on > button {
  background: rgba(251, 247, 240, 0.1);
  border-color: var(--cream);
  border-radius: var(--radius) var(--radius) 0 0;
}
.faq-answer {
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 10px 12px;
  background: rgba(251, 247, 240, 0.06);
}
.faq-answer p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.faq-close {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .rail {
    min-height: 0;
    max-height: none;
    overflow: visible;
  }
  .nav { max-height: 180px; }
  .ask { border-left: 0; border-top: 1px solid var(--line); max-height: none; }
  .talk-window { min-height: 360px; }
  .tabs button, .faq-item > button { min-height: 44px; }
}

/* Which item is open, and the guest-facing line for it. */
.now {
  width: 100%;
  margin: 0 0 14px;
}
.now-item {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.now-desc {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
  max-width: 62ch;
}

/* Step stills are not rendered for every item yet. Until they are, the Step
   stills tab shows the build card and plate card as text instead of broken
   images. */
.steps.as-text {
  display: block;
  text-align: left;
}
.step-list {
  margin: 0 0 20px;
}
.card-note {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
/* An item whose films are not built yet still opens. The rail says which. */
#nav button.no-film { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rail-flag {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 2px 7px;
  white-space: nowrap;
}
.step-list ol,
.step-list ul {
  margin: 8px 0 0;
  padding-left: 20px;
}
.step-list li {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
}
.step-list li strong { font-weight: 600; }
.step-list li em {
  font-style: normal;
  color: var(--muted);
}
.step-list li span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
