body.ecosystem-mode .site-nav__links {
  gap: 18px;
}

body.ecosystem-mode .site-nav__links a[href="/story"] {
  color: #4a3124;
  font-weight: 850;
}

.ecosystem-section {
  position: relative;
  padding: clamp(48px, 5vw, 72px) 0;
}

.ecosystem-container {
  width: min(calc(100% - 40px), 1180px);
  margin: 0 auto;
}

.research-invite {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .5fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: stretch;
  border-top: 1px solid rgba(194, 161, 95, .34);
}

.research-invite__copy {
  display: grid;
  gap: 18px;
  padding-top: clamp(28px, 4vw, 42px);
}

.research-invite__copy h2,
.story-page h1,
.story-page h2,
.admin-page h1 {
  color: #3b2a22;
  font-family: var(--font-display, "Cormorant Garamond", Georgia, serif);
  font-weight: 600;
  letter-spacing: 0;
}

.research-invite__copy h2 {
  max-width: 820px;
  font-size: clamp(2.45rem, 4.4vw, 5rem);
  line-height: .98;
}

.research-invite__copy p,
.story-page p,
.admin-page p {
  color: rgba(74, 49, 36, .72);
}

.research-invite__panel {
  display: grid;
  align-content: space-between;
  gap: 24px;
  min-height: 360px;
  padding: clamp(26px, 3.2vw, 38px);
  border: 1px solid rgba(194, 161, 95, .30);
  border-radius: 34px 8px 34px 34px;
  background:
    linear-gradient(145deg, rgba(255, 250, 242, .92), rgba(234, 220, 195, .48)),
    rgba(255, 250, 242, .86);
  box-shadow: 0 24px 72px rgba(74, 49, 36, .10);
}

.research-invite__stats {
  display: grid;
  gap: 12px;
}

.research-invite__stats span {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(122, 85, 56, .14);
  color: #4a3124;
  font-weight: 850;
}

.research-invite__stats em {
  color: #8a5c38;
  font-style: normal;
  font-weight: 800;
}

.button--outline,
.story-button--outline {
  color: #4a3124;
  background: rgba(255, 250, 242, .72);
  border-color: rgba(122, 85, 56, .34);
  box-shadow: 0 18px 34px rgba(255, 250, 242, .18);
}

.hero-actions .button--outline {
  min-width: 260px;
}

.story-page,
.admin-page {
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: #34261f;
  background:
    radial-gradient(circle at 78% 8%, rgba(234, 220, 195, .58), transparent 36%),
    linear-gradient(145deg, #fffaf2 0%, #fbf6ec 52%, #eadcc3 100%);
}

.story-shell,
.admin-shell {
  width: min(calc(100% - 36px), 1120px);
  margin: 0 auto;
  padding: 26px 0 72px;
}

.story-topbar,
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: clamp(34px, 6vw, 72px);
  padding: 10px;
  border: 1px solid rgba(122, 85, 56, .14);
  border-radius: 999px;
  background: rgba(255, 250, 242, .78);
  box-shadow: 0 18px 54px rgba(91, 62, 39, .08);
  backdrop-filter: blur(18px);
}

.story-brand {
  padding: 0 14px;
  color: #7a5538;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.2rem;
  font-weight: 700;
}

.story-topbar nav,
.admin-topbar nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-topbar a,
.admin-topbar a {
  color: #4a3124;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  text-decoration: none;
}

.story-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(320px, .48fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: end;
}

.story-hero__copy {
  display: grid;
  gap: 22px;
}

.story-page h1,
.admin-page h1 {
  max-width: 860px;
  font-size: clamp(2.8rem, 5.4vw, 6.4rem);
  line-height: .94;
}

.story-hero__lead {
  max-width: 760px;
  font-size: clamp(1.04rem, 1.45vw, 1.22rem);
  line-height: 1.72;
}

.safety-card,
.story-form,
.thanks-card,
.admin-panel {
  border: 1px solid rgba(194, 161, 95, .30);
  background:
    linear-gradient(145deg, rgba(255, 250, 242, .92), rgba(234, 220, 195, .42)),
    rgba(255, 250, 242, .88);
  box-shadow: 0 24px 72px rgba(74, 49, 36, .10);
}

.safety-card {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 3vw, 34px);
  border-radius: 8px 34px 34px 34px;
}

.safety-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.safety-card li {
  color: rgba(74, 49, 36, .78);
  line-height: 1.55;
}

.safety-card li::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 10px;
  border-radius: 50%;
  background: #c2a15f;
  vertical-align: middle;
}

.story-form {
  margin-top: clamp(36px, 6vw, 72px);
  border-radius: 34px;
  overflow: hidden;
}

.story-progress {
  height: 8px;
  background: rgba(122, 85, 56, .12);
}

.story-progress span {
  display: block;
  width: var(--story-progress, 10%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #c2a15f, #7a5538);
  transition: width .25s ease;
}

.story-step {
  display: grid;
  gap: 22px;
  padding: clamp(24px, 4vw, 46px);
}

.story-step__meta {
  color: #8a5c38;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-size: .76rem;
  font-weight: 850;
}

.story-step h2 {
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
}

.field-grid {
  display: grid;
  gap: 16px;
}

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

.story-option {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  min-height: 58px;
  padding: 15px;
  border: 1px solid rgba(122, 85, 56, .18);
  border-radius: 18px;
  background: rgba(255, 250, 242, .72);
  color: #4a3124;
  font-weight: 800;
  cursor: pointer;
}

.story-option input {
  margin-top: 4px;
  accent-color: #7a5538;
}

.story-field {
  display: grid;
  gap: 8px;
}

.story-field span {
  color: #4a3124;
  font-weight: 850;
}

.story-field input,
.story-field textarea,
.story-field select {
  width: 100%;
  border: 1px solid rgba(122, 85, 56, .22);
  border-radius: 18px;
  background: rgba(255, 250, 242, .82);
  color: #34261f;
  font: inherit;
  line-height: 1.5;
  padding: 14px 16px;
  outline: none;
}

.story-field textarea {
  min-height: 120px;
  resize: vertical;
}

.story-field textarea.large {
  min-height: 260px;
}

.voice-answer {
  display: grid;
  gap: 12px;
  margin-top: -4px;
  padding: 16px;
  border: 1px solid rgba(194, 161, 95, .24);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, .86), rgba(234, 220, 195, .34)),
    rgba(255, 250, 242, .72);
}

.voice-answer__hint,
.voice-answer__status,
.voice-answer__result,
.admin-voice-list {
  color: rgba(74, 49, 36, .68);
  font-size: .94rem;
  line-height: 1.5;
}

.voice-answer__idle,
.voice-answer__recording,
.voice-answer__result {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.voice-answer__recording {
  padding: 10px;
  border-radius: 18px;
  background: rgba(122, 85, 56, .08);
}

.voice-answer__pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8a3f2e;
  box-shadow: 0 0 0 0 rgba(138, 63, 46, .38);
  animation: voice-pulse 1.2s infinite;
}

.voice-answer__timer {
  min-width: 48px;
  color: #4a3124;
  font-weight: 900;
}

.story-review__list {
  display: grid;
  gap: 14px;
}

.story-review__item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(122, 85, 56, .16);
  border-radius: 22px;
  background: rgba(255, 250, 242, .68);
}

.story-review__item span,
.story-review__item small,
.admin-voice {
  color: #8a5c38;
  font-size: .86rem;
  font-weight: 800;
}

.story-review__item strong {
  display: block;
  color: #34261f;
  font-size: 1rem;
  line-height: 1.4;
}

.voice-consent-modal {
  position: fixed;
  z-index: 1000;
  display: grid;
  place-items: center;
  inset: 0;
  padding: 20px;
  background: rgba(52, 38, 31, .32);
  backdrop-filter: blur(12px);
}

.voice-consent-modal__panel {
  display: grid;
  gap: 18px;
  width: min(100%, 560px);
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid rgba(194, 161, 95, .34);
  border-radius: 30px;
  background: #fffaf2;
  box-shadow: 0 30px 90px rgba(52, 38, 31, .22);
}

.voice-consent-modal__panel h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.voice-consent-modal__actions,
.admin-voice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-voice {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid rgba(122, 85, 56, .14);
  border-radius: 999px;
  background: rgba(255, 250, 242, .72);
}

.admin-voice a {
  color: #4a3124;
}

.story-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  padding: 0 clamp(24px, 4vw, 46px) clamp(24px, 4vw, 46px);
}

.story-button {
  min-height: 56px;
  border: 1px solid rgba(74, 49, 36, .24);
  border-radius: 999px;
  padding: 0 24px;
  color: #fffaf2;
  background: #7a5538;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
}

.story-button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.story-button--ghost {
  color: #4a3124;
  background: transparent;
}

.story-message {
  min-height: 24px;
  color: #8a5c38;
  font-weight: 800;
}

.thanks-card {
  display: grid;
  gap: 18px;
  margin-top: clamp(36px, 6vw, 72px);
  padding: clamp(26px, 4vw, 48px);
  border-radius: 34px;
}

.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-panel {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
  border-radius: 34px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-table {
  display: grid;
  gap: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: minmax(160px, .55fr) minmax(0, 1fr) minmax(170px, .35fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(122, 85, 56, .16);
  border-radius: 20px;
  background: rgba(255, 250, 242, .68);
}

.admin-row strong,
.admin-row span {
  display: block;
}

.admin-row small {
  color: rgba(74, 49, 36, .62);
}

.admin-row select {
  width: 100%;
  border: 1px solid rgba(122, 85, 56, .22);
  border-radius: 999px;
  background: #fffaf2;
  padding: 10px 12px;
}

.admin-story {
  max-height: 160px;
  overflow: auto;
  color: rgba(74, 49, 36, .74);
  line-height: 1.55;
}

@media (width <= 980px) {
  .research-invite,
  .story-hero {
    grid-template-columns: 1fr;
  }

  .story-topbar,
  .admin-topbar {
    align-items: flex-start;
    border-radius: 28px;
  }

  .story-topbar nav,
  .admin-topbar nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (width <= 640px) {
  .ecosystem-container,
  .story-shell,
  .admin-shell {
    width: min(calc(100% - 28px), 1180px);
  }

  .hero-actions .button--outline {
    width: 100%;
  }

  .option-grid,
  .admin-row {
    grid-template-columns: 1fr;
  }

  .story-actions {
    display: grid;
  }

  .story-button {
    width: 100%;
  }

  .voice-answer__idle,
  .voice-answer__recording,
  .voice-consent-modal__actions {
    display: grid;
  }
}

@keyframes voice-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(138, 63, 46, .38);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(138, 63, 46, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(138, 63, 46, 0);
  }
}
