/* AMS Ashby console: source of truth for website bot UI */
.section-console {
  position: relative;
  overflow: hidden;
  padding-top: 112px;
  padding-bottom: 128px;
}

.featured-console {
  margin-top: 0;
}

.section-console::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(184, 155, 97, 0.16), transparent 30%),
    radial-gradient(circle at 88% 72%, rgba(14, 16, 18, 0.12), transparent 36%);
  pointer-events: none;
}

.section-console > .container {
  position: relative;
  z-index: 1;
}

.console-shell {
  max-width: 1180px;
  margin: 0 auto;
}

.console-launch,
.console-drawer {
  color: var(--text-strong);
  background:
    radial-gradient(circle at 100% 0%, rgba(184, 155, 97, 0.13), transparent 30%),
    linear-gradient(180deg, rgba(10, 11, 13, 0.995) 0%, rgba(5, 6, 7, 0.995) 100%);
}

.console-launch {
  position: relative;
  overflow: hidden;
  max-width: 1120px;
  margin: 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035) inset, 0 32px 78px rgba(0, 0, 0, 0.24);
}

.console-launch::before,
.console-drawer::before,
.console-stage-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.22;
  pointer-events: none;
}

.console-launch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom left, rgba(184, 155, 97, 0.08), transparent 26%);
  pointer-events: none;
}

.console-launch-panel,
.console-launch-body,
.console-drawer-header,
.console-drawer-body,
.console-drawer-footer {
  position: relative;
  z-index: 1;
}

.console-launch-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: start;
  padding: 32px 34px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.012) 100%);
}

.console-eyebrow,
.console-drawer-kicker,
.console-status-label {
  display: block;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.console-launch-title {
  margin: 14px 0 0;
  max-width: 13ch;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: clamp(2.1rem, 3.7vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--text-strong);
}

.console-launch-copy {
  max-width: 46rem;
  margin: 20px 0 0;
  color: rgba(245, 239, 228, 0.86);
  font-size: 1.02rem;
  line-height: 1.76;
}

.console-launch-actions {
  display: grid;
  gap: 14px;
  justify-items: end;
}

.console-launch-status,
.console-drawer-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: rgba(236, 230, 218, 0.62);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.console-status-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(184, 155, 97, 0.11);
}

.console-open-button,
.console-send-button,
.console-control-button,
.console-mode-button,
.console-live-button,
.console-drawer-close,
.console-prompt {
  font: inherit;
  cursor: pointer;
}

.console-open-button,
.console-send-button,
.console-control-button {
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text-dark);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.console-open-button:hover,
.console-open-button:focus-visible,
.console-send-button:hover,
.console-send-button:focus-visible {
  background: var(--accent-soft);
}

.console-control-button {
  min-height: 44px;
  padding: 0 16px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text-strong);
}

.console-control-button:hover,
.console-control-button:focus-visible,
.console-control-button[aria-pressed="true"] {
  border-color: rgba(184, 155, 97, 0.42);
  background: rgba(184, 155, 97, 0.1);
  color: var(--accent-soft);
}

.console-open-button:disabled,
.console-send-button:disabled,
.console-control-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.console-launch-body {
  padding: 26px 34px 32px;
}

.console-prompt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.console-prompt {
  min-height: 72px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(245, 239, 228, 0.9);
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.36;
  letter-spacing: 0.01em;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.console-prompt:hover,
.console-prompt:focus-visible {
  border-color: rgba(184, 155, 97, 0.44);
  background: rgba(184, 155, 97, 0.08);
  transform: translateY(-1px);
}

.console-launch-form,
.console-drawer-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.console-launch-form input,
.console-drawer-form input {
  width: 100%;
  min-height: 58px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.console-launch-form input:focus,
.console-drawer-form input:focus {
  border-color: rgba(184, 155, 97, 0.44);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(184, 155, 97, 0.08);
}

.console-launch-form input::placeholder,
.console-drawer-form input::placeholder {
  color: rgba(236, 230, 218, 0.42);
}

.console-launch-form input:disabled,
.console-drawer-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.console-launch-note,
.console-drawer-note,
.console-stage-detail {
  margin-top: 14px;
  color: rgba(236, 230, 218, 0.58);
  font-size: 0.84rem;
  line-height: 1.72;
}

.console-launch-note a,
.console-drawer-note a {
  color: var(--accent);
}

body.console-drawer-open {
  overflow: hidden;
}

.console-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease;
}

.console-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.console-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(640px, 100vw);
  height: 100dvh;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -34px 0 90px rgba(0, 0, 0, 0.42);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}

.console-drawer.is-open {
  transform: translateX(0);
}

.console-drawer::before {
  background-size: 34px 34px;
  opacity: 0.14;
}

.console-drawer-header,
.console-drawer-body,
.console-drawer-footer {
  padding-left: 28px;
  padding-right: 28px;
}

.console-drawer-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding-top: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.console-drawer-title {
  margin: 8px 0 0;
  font-family: "Inter Tight", "Inter", sans-serif;
  font-size: 1.65rem;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-strong);
}

.console-drawer-status {
  margin-top: 12px;
  justify-content: flex-start;
  white-space: normal;
  line-height: 1.45;
}

.console-drawer-close {
  min-width: 46px;
  min-height: 46px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(245, 239, 228, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.console-drawer-close:hover,
.console-drawer-close:focus-visible {
  border-color: rgba(184, 155, 97, 0.38);
  background: rgba(184, 155, 97, 0.08);
  color: var(--accent-soft);
}

.console-drawer-body {
  flex: 1 1 auto;
  min-height: 0;
  padding-top: 24px;
  padding-bottom: 24px;
  overflow: hidden;
}

.console-transcript {
  height: 100%;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.032), rgba(255, 255, 255, 0.018));
  padding: 22px;
}

.console-thread {
  display: grid;
  gap: 14px;
  min-height: 100%;
  align-content: start;
}

.console-message,
.console-stage-card {
  max-width: 88%;
  padding: 16px 17px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  line-height: 1.74;
  color: rgba(245, 239, 228, 0.9);
}

.console-message-assistant,
.console-stage-card {
  justify-self: start;
  background: rgba(255, 255, 255, 0.035);
}

.console-message-user {
  justify-self: end;
  background: rgba(184, 155, 97, 0.14);
  border-color: rgba(184, 155, 97, 0.26);
}

.console-message-intro {
  max-width: 100%;
  border-color: rgba(184, 155, 97, 0.2);
  background: rgba(184, 155, 97, 0.075);
}

.console-stage-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 14px;
  min-width: min(100%, 360px);
  border-color: rgba(184, 155, 97, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.console-stage-card::before {
  opacity: 0.18;
  background-size: 28px 28px;
}

.console-stage-card > * {
  position: relative;
  z-index: 1;
}

.console-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.console-stage-title {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.35;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.console-waveform,
.console-live-mark {
  display: flex;
  align-items: center;
  gap: 4px;
}

.console-waveform {
  min-width: 86px;
  height: 26px;
}

.console-waveform span,
.console-live-mark span {
  display: block;
  width: 4px;
  border-radius: 999px;
  background: rgba(184, 155, 97, 0.8);
  animation: ams-console-wave 0.95s ease-in-out infinite;
}

.console-waveform span { height: 11px; }
.console-waveform span:nth-child(2), .console-live-mark span:nth-child(2) { animation-delay: 0.1s; height: 17px; }
.console-waveform span:nth-child(3), .console-live-mark span:nth-child(3) { animation-delay: 0.2s; height: 23px; }
.console-waveform span:nth-child(4), .console-live-mark span:nth-child(4) { animation-delay: 0.3s; height: 15px; }
.console-waveform span:nth-child(5) { animation-delay: 0.4s; height: 21px; }
.console-waveform span:nth-child(6) { animation-delay: 0.5s; height: 13px; }
.console-waveform span:nth-child(7) { animation-delay: 0.6s; height: 19px; }
.console-waveform span:nth-child(8) { animation-delay: 0.7s; height: 10px; }

.console-stage-detail {
  margin: 0;
}

.console-drawer-footer {
  padding-top: 20px;
  padding-bottom: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.95), rgba(5, 6, 7, 0.985));
  box-shadow: 0 -18px 48px rgba(0, 0, 0, 0.28);
}

.console-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.console-mode-button {
  min-height: 34px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(245, 239, 228, 0.66);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1;
  text-transform: uppercase;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.console-mode-button:hover,
.console-mode-button:focus-visible {
  color: var(--text-strong);
}

.console-mode-button.is-active {
  background: var(--accent);
  color: var(--text-dark);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.console-live-panel[hidden],
.console-drawer-form[hidden] {
  display: none !important;
}

.console-live-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 16px;
}

.console-live-button {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 74px;
  padding: 13px 16px;
  border: 1px solid rgba(184, 155, 97, 0.28);
  border-radius: 22px;
  background: rgba(184, 155, 97, 0.1);
  color: var(--text-strong);
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.console-live-button:hover,
.console-live-button:focus-visible,
.console-live-button[aria-pressed="true"] {
  border-color: rgba(184, 155, 97, 0.5);
  background: rgba(184, 155, 97, 0.15);
}

.console-live-button[aria-pressed="true"] .console-live-mark span {
  background: var(--accent-soft);
}

.console-live-mark {
  flex: 0 0 auto;
  justify-content: center;
  width: 52px;
  height: 42px;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
}

.console-live-mark span {
  height: 11px;
}

.console-live-copy {
  display: grid;
  gap: 4px;
}

.console-live-copy strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
  color: var(--text-strong);
}

.console-live-copy small {
  display: block;
  color: rgba(236, 230, 218, 0.6);
  font-size: 0.76rem;
  line-height: 1.45;
}

.console-mute-button {
  min-width: 112px;
  height: 100%;
}

.console-drawer-form {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
}

.console-drawer-form input {
  min-height: 48px;
  padding-left: 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
}

.console-drawer-form input:focus {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.console-drawer-form .console-send-button {
  min-width: 104px;
  min-height: 48px;
}

.console-drawer-note {
  margin-top: 12px;
  padding-left: 4px;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(236, 230, 218, 0.54);
}

.console-voice-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.console-voice-bar .console-control-button:first-child {
  min-height: 54px;
  border-color: rgba(184, 155, 97, 0.34);
  background: rgba(184, 155, 97, 0.12);
  color: var(--accent-soft);
  text-align: center;
}

.console-voice-bar .console-control-button:first-child[aria-pressed="true"] {
  background: var(--accent);
  color: var(--text-dark);
}

@keyframes ams-console-wave {
  0%, 100% { transform: scaleY(0.62); opacity: 0.48; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .console-waveform span,
  .console-live-mark span {
    animation: none;
  }
}

@media (max-width: 920px) {
  .section-console {
    padding-top: 84px;
    padding-bottom: 116px;
  }

  .console-launch-panel {
    grid-template-columns: 1fr;
  }

  .console-launch-actions {
    justify-items: stretch;
  }

  .console-open-button,
  .console-launch-form .console-send-button {
    width: 100%;
  }

  .console-prompt-grid {
    grid-template-columns: 1fr 1fr;
  }

  .console-launch-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .section-console {
    padding-top: 48px;
    padding-bottom: 58px;
  }

  .console-launch-panel,
  .console-launch-body,
  .console-drawer-header,
  .console-drawer-body,
  .console-drawer-footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .console-launch-panel {
    padding-top: 24px;
    padding-bottom: 22px;
    border-bottom: 0;
  }

  .console-launch-body {
    padding-top: 0;
  }

  .console-prompt-grid,
  .console-launch-form {
    grid-template-columns: 1fr;
  }

  .console-prompt {
    min-height: auto;
  }

  .console-message,
  .console-stage-card {
    max-width: 94%;
  }

  .console-transcript {
    padding: 16px;
  }

  .console-drawer {
    width: 100vw;
  }

  .console-drawer-header {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .console-drawer-title {
    font-size: 1.34rem;
  }

  .console-drawer-body {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .console-drawer-footer {
    padding-top: 14px;
    padding-bottom: 16px;
  }

  .console-mode-switch {
    width: 100%;
  }

  .console-mode-button {
    flex: 1 1 0;
  }

  .console-live-panel {
    grid-template-columns: 1fr;
  }

  .console-mute-button {
    width: 100%;
    min-height: 46px;
  }

  .console-drawer-form {
    grid-template-columns: 1fr;
    border-radius: 24px;
    padding: 8px;
  }

  .console-drawer-form input {
    min-height: 48px;
    padding-right: 18px;
  }

  .console-drawer-form .console-send-button {
    width: 100%;
  }

  .console-voice-bar {
    grid-template-columns: 1fr 1fr;
  }

  .console-voice-bar .console-control-button:first-child {
    grid-column: 1 / -1;
    width: 100%;
  }
}
