:root {
  color-scheme: light;
  --ink: #0b1720;
  --muted: #667983;
  --paper: #e9edf0;
  --surface: #ffffff;
  --surface-soft: #edf3f4;
  --brand: #0a1c26;
  --brand-deep: #071923;
  --steel: #86a2ad;
  --signal: #e3ecef;
  --accent: #69c83f;
  --accent-deep: #3ea968;
  --aqua: #15bda8;
  --line: #d7dde1;
  --danger: #9d493b;
  --shadow: 0 24px 64px rgba(29, 42, 50, 0.13);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: #e2e3e4;
  background-image:
    linear-gradient(115deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04)),
    url("/static/assets/branding/reflexlux-background-blank.png?v=0.27.0");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

button,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1500px, 100%);
  min-height: calc(100vh - 36px);
  margin: 18px auto;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background:
    radial-gradient(circle at 9% 4%, rgba(105, 200, 63, 0.18), transparent 20rem),
    radial-gradient(circle at 67% 22%, rgba(21, 189, 168, 0.16), transparent 30rem),
    linear-gradient(135deg, #061620 0%, #0a202a 58%, #102c36 100%);
  box-shadow: 0 30px 80px rgba(6, 22, 32, 0.22);
}

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  margin-bottom: 20px;
  color: white;
}

.brand-logo-frame {
  display: grid;
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(105, 200, 63, 0.36);
  border-radius: 50%;
  background: #091923;
  box-shadow:
    0 0 0 7px rgba(105, 200, 63, 0.06),
    0 0 34px rgba(105, 200, 63, 0.24);
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.18);
}

.product-title {
  padding-left: 17px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.product-title h1 {
  font-size: 2rem;
  letter-spacing: 0.02em;
}

.product-tagline,
.product-subtitle {
  margin: 2px 0 0;
}

.product-tagline {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 750;
}

.product-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.77rem;
}

.version-info {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
}

.usage-info {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
}

.topbar h1,
.panel-heading h2,
.dialog-heading h2 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.topbar .eyebrow {
  color: rgba(255, 255, 255, 0.6);
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 700;
}

.status-light,
.check-light {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8b959b;
  box-shadow: 0 0 0 4px rgba(139, 149, 155, 0.13);
}

.status-badge.ready .status-light,
.readiness-check.ok .check-light {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(105, 200, 63, 0.14);
}

.status-badge.warning .status-light {
  background: #d99a27;
  box-shadow: 0 0 0 4px rgba(217, 154, 39, 0.16);
}

.status-badge.error .status-light,
.readiness-check.failed .check-light {
  background: #c4473a;
  box-shadow: 0 0 0 4px rgba(196, 71, 58, 0.15);
}

.status-badge.checking .status-light {
  animation: pulse 1s infinite;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-left: auto;
  justify-content: flex-end;
}

.topbar-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.system-actions {
  gap: 10px;
}

.restart-button {
  background: rgba(255, 255, 255, 0.06);
}

.output-speech-button {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.06);
}

.topbar .secondary-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.065);
  backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.topbar .secondary-button:hover,
.conversation-mode-button:hover,
.speech-button:hover {
  border-color: rgba(105, 200, 63, 0.42);
  background: rgba(105, 200, 63, 0.13);
}

.auth-user {
  max-width: 150px;
  padding: 8px 11px;
  border: 1px solid rgba(105, 200, 63, 0.22);
  border-radius: 999px;
  color: rgba(236, 250, 239, 0.9);
  background: rgba(105, 200, 63, 0.08);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.environment-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.environment-light {
  display: block;
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.environment-badge.local .environment-light {
  background: #d99a27;
  box-shadow: 0 0 0 4px rgba(217, 154, 39, 0.16);
}

.environment-badge.server .environment-light {
  background: #1fb9a7;
  box-shadow: 0 0 0 4px rgba(31, 185, 167, 0.15);
}

.output-speech-button.active {
  color: #061620;
  border-color: var(--accent);
  background: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 20px;
  min-height: calc(100vh - 132px);
}

.conversation-panel,
.program-panel {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.conversation-panel {
  display: flex;
  min-height: 720px;
  flex-direction: column;
  overflow: hidden;
  color: white;
  background: rgba(6, 22, 31, 0.76);
}

.program-panel {
  color: white;
  background:
    radial-gradient(circle at 18% 12%, rgba(105, 200, 63, 0.1), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045));
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.intro-card {
  position: relative;
  min-height: 300px;
  padding: 42px 45% 34px 34px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 74% 52%, rgba(21, 189, 168, 0.18), transparent 19rem),
    linear-gradient(115deg, rgba(5, 20, 29, 0.96), rgba(10, 35, 45, 0.82)),
    var(--brand-deep);
}

.intro-card .eyebrow {
  color: var(--accent);
}

.intro-card h2 {
  max-width: 760px;
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.55rem, 3vw, 2.55rem);
  font-weight: 500;
  line-height: 1.08;
}

.intro-card h2 span {
  color: var(--accent);
}

.intro-card > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.55;
}

.intro-card .privacy-note {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.neural-portrait {
  position: absolute;
  z-index: 0;
  top: -12%;
  right: 1%;
  width: min(46%, 440px);
  height: 125%;
  object-fit: contain;
  object-position: center;
  opacity: 0.68;
  filter: drop-shadow(0 0 24px rgba(21, 189, 168, 0.22));
  pointer-events: none;
}

.intro-card > :not(.neural-portrait) {
  position: relative;
  z-index: 1;
}

.messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  min-height: 260px;
  max-height: calc(100vh - 405px);
  padding: 26px 34px;
  overflow-y: auto;
}

.auth-notice {
  margin: 0 34px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(105, 200, 63, 0.26);
  border-radius: 12px;
  color: rgba(220, 234, 238, 0.84);
  background: rgba(105, 200, 63, 0.08);
  font-size: 0.86rem;
}

.message {
  display: grid;
  max-width: min(78%, 760px);
  gap: 5px;
  animation: rise 180ms ease-out;
}

.message.user {
  align-self: flex-end;
}

.message-label {
  color: rgba(220, 234, 238, 0.62);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message.user .message-label {
  text-align: right;
}

.message-body {
  padding: 14px 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px 18px 18px;
  color: #f5f9fa;
  background: rgba(255, 255, 255, 0.07);
  line-height: 1.55;
  white-space: pre-wrap;
}

.message.user .message-body {
  border: 0;
  border-radius: 18px 6px 18px 18px;
  color: white;
  background: linear-gradient(135deg, #2c925e, #167f70);
}

.thinking {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 34px 14px;
  color: rgba(220, 234, 238, 0.62);
  font-size: 0.86rem;
}

.thinking-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 1s infinite;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 34px 14px;
}

.quick-actions:empty {
  display: none;
}

.conversation-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 24px 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
}

.conversation-mode-state {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.conversation-mode-state div {
  display: grid;
  gap: 2px;
}

.conversation-mode-state strong {
  font-size: 0.84rem;
}

.conversation-mode-state small {
  color: rgba(220, 234, 238, 0.62);
  font-size: 0.72rem;
  line-height: 1.35;
}

.conversation-mode-light {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #8b959b;
  box-shadow: 0 0 0 5px rgba(139, 149, 155, 0.13);
}

.conversation-mode.speaking .conversation-mode-light {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(196, 207, 63, 0.18);
  animation: pulse 1s infinite;
}

.conversation-mode.listening .conversation-mode-light {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(157, 73, 59, 0.16);
  animation: pulse 1s infinite;
}

.conversation-mode.processing .conversation-mode-light {
  background: #d99a27;
  box-shadow: 0 0 0 5px rgba(217, 154, 39, 0.16);
  animation: pulse 1s infinite;
}

.conversation-mode.active {
  border-color: rgba(105, 200, 63, 0.42);
}

.conversation-mode-button {
  flex: 0 0 auto;
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.conversation-mode-button.active {
  color: #061620;
  border-color: var(--accent);
  background: var(--accent);
}

.quick-action,
.program-action {
  padding: 9px 12px;
  border: 1px solid rgba(17, 20, 22, 0.2);
  border-radius: 999px;
  color: var(--brand);
  background: transparent;
  font-size: 0.82rem;
  font-weight: 700;
}

.conversation-panel .quick-action {
  color: #d9f7e7;
  border-color: rgba(105, 200, 63, 0.4);
}

.conversation-panel .quick-action:hover {
  background: rgba(105, 200, 63, 0.12);
}

.quick-action:hover,
.program-action:hover {
  background: var(--surface-soft);
}

.composer {
  margin: 0 24px 24px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

.composer textarea {
  width: 100%;
  min-height: 60px;
  padding: 5px;
  resize: vertical;
  border: 0;
  outline: 0;
  color: white;
  background: transparent;
  line-height: 1.45;
}

.composer textarea::placeholder {
  color: rgba(225, 237, 240, 0.52);
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.send-button,
.feedback-button {
  padding: 11px 18px;
  border: 0;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--accent-deep), #168b79);
  font-weight: 750;
}

.send-button:hover,
.feedback-button:hover {
  background: linear-gradient(135deg, #55b943, #12a493);
}

.speech-button {
  height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: white;
  background: rgba(255, 255, 255, 0.075);
  font-size: 0.82rem;
  font-weight: 750;
}

.speech-button.listening {
  color: white;
  background: var(--danger);
  box-shadow: 0 0 0 7px rgba(157, 73, 59, 0.14);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.speech-hint {
  margin: 7px 4px 0;
  color: rgba(220, 234, 238, 0.55);
  font-size: 0.74rem;
}

.program-panel {
  align-self: start;
  min-height: 420px;
  padding: 25px;
}

.panel-heading,
.dialog-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.program-count {
  display: grid;
  min-width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: #061620;
  background: linear-gradient(135deg, #8fdb66, var(--accent));
  box-shadow: 0 0 0 6px rgba(105, 200, 63, 0.08);
  font-weight: 800;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  align-content: center;
  color: rgba(220, 234, 238, 0.66);
  text-align: center;
}

.empty-state p {
  margin-bottom: 6px;
  color: white;
  font-weight: 750;
}

.empty-state small {
  max-width: 260px;
  line-height: 1.45;
}

.program-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.program-card {
  padding: 17px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.program-card-header {
  display: flex;
  align-items: start;
  gap: 12px;
}

.program-label {
  display: grid;
  flex: 0 0 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, var(--accent-deep), #167f70);
  font-weight: 800;
}

.program-card h3 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  color: white;
}

.program-id {
  margin: 0;
  color: rgba(220, 234, 238, 0.62);
  font-size: 0.74rem;
}

.program-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 13px 0;
}

.program-meta span {
  padding: 5px 8px;
  border-radius: 8px;
  color: #d9f7e7;
  background: rgba(105, 200, 63, 0.12);
  font-size: 0.72rem;
}

.program-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.feedback-button {
  width: 100%;
  margin-top: 16px;
}

.program-panel .eyebrow {
  color: rgba(220, 234, 238, 0.64);
}

.program-panel .program-action {
  color: #d9f7e7;
  border-color: rgba(105, 200, 63, 0.34);
}

.program-panel .program-action:hover {
  background: rgba(105, 200, 63, 0.12);
}

.feedback-dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, rgba(6, 22, 31, 0.97), rgba(9, 37, 47, 0.96));
  box-shadow: var(--shadow);
}

.login-dialog {
  width: min(460px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, rgba(6, 22, 31, 0.97), rgba(9, 37, 47, 0.96));
  box-shadow: var(--shadow);
}

.help-dialog {
  width: min(660px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, rgba(6, 22, 31, 0.97), rgba(9, 37, 47, 0.96));
  box-shadow: var(--shadow);
}

.readiness-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: white;
  background: linear-gradient(145deg, rgba(6, 22, 31, 0.97), rgba(9, 37, 47, 0.96));
  box-shadow: var(--shadow);
}

.readiness-dialog::backdrop {
  background: rgba(9, 18, 23, 0.58);
  backdrop-filter: blur(4px);
}

.login-dialog::backdrop {
  background: rgba(9, 18, 23, 0.58);
  backdrop-filter: blur(4px);
}

.help-dialog::backdrop {
  background: rgba(9, 18, 23, 0.58);
  backdrop-filter: blur(4px);
}

.login-dialog form {
  display: grid;
  gap: 13px;
  padding: 26px;
  color: white;
  background:
    radial-gradient(circle at 12% 5%, rgba(105, 200, 63, 0.13), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.login-dialog label {
  font-size: 0.84rem;
  font-weight: 750;
}

.login-dialog input {
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.readiness-content {
  display: grid;
  gap: 16px;
  padding: 26px;
  color: white;
  background:
    radial-gradient(circle at 12% 5%, rgba(105, 200, 63, 0.13), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.help-content {
  display: grid;
  gap: 16px;
  padding: 26px;
  color: white;
  background:
    radial-gradient(circle at 12% 5%, rgba(105, 200, 63, 0.13), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.readiness-summary {
  margin: 0;
  color: rgba(220, 234, 238, 0.68);
  line-height: 1.45;
}

.readiness-checks {
  display: grid;
  gap: 9px;
}

.readiness-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
}

.readiness-check .check-light {
  margin-top: 4px;
}

.readiness-check p {
  margin: 3px 0 0;
  color: rgba(220, 234, 238, 0.66);
  font-size: 0.78rem;
  line-height: 1.4;
}

.test-report {
  display: grid;
  gap: 8px;
  padding: 15px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.055);
}

.test-report h3,
.test-report p {
  margin: 0;
}

.test-report > p {
  color: rgba(220, 234, 238, 0.68);
  font-size: 0.8rem;
  line-height: 1.45;
}

.test-report label {
  margin-top: 4px;
  font-size: 0.8rem;
  font-weight: 750;
}

.test-report textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
  resize: vertical;
}

.test-report textarea::placeholder {
  color: rgba(225, 237, 240, 0.46);
}

.test-report-speech-field {
  display: grid;
  gap: 7px;
}

.test-report .test-id {
  color: rgba(220, 234, 238, 0.78);
  font-family: Consolas, monospace;
  font-size: 0.76rem;
}

.help-intro {
  margin: 0;
  color: rgba(220, 234, 238, 0.68);
  line-height: 1.45;
}

.help-list {
  margin: 0;
  padding-left: 18px;
  color: rgba(220, 234, 238, 0.84);
  line-height: 1.5;
}

.help-list li + li {
  margin-top: 9px;
}

.feedback-dialog::backdrop {
  background: rgba(9, 27, 22, 0.56);
  backdrop-filter: blur(4px);
}

.feedback-dialog form {
  display: grid;
  gap: 16px;
  padding: 26px;
  color: white;
  background:
    radial-gradient(circle at 12% 5%, rgba(105, 200, 63, 0.13), transparent 14rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.feedback-dialog label {
  font-size: 0.84rem;
  font-weight: 750;
}

.feedback-dialog select,
.feedback-dialog textarea {
  width: 100%;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  color: white;
  background: rgba(255, 255, 255, 0.07);
}

.feedback-dialog select option {
  color: var(--ink);
  background: white;
}

.feedback-dialog textarea::placeholder {
  color: rgba(225, 237, 240, 0.46);
}

.feedback-comment {
  display: grid;
  gap: 7px;
}

.feedback-speech-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-speech-hint {
  color: rgba(220, 234, 238, 0.62);
  font-size: 0.72rem;
}

.feedback-speech-button {
  flex: 0 0 auto;
  height: 36px;
  padding-inline: 11px;
}

.feedback-group {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
}

.feedback-group h3 {
  margin: 0;
  font-size: 0.95rem;
}

.feedback-explanation {
  margin: 0;
  color: rgba(220, 234, 238, 0.66);
  font-size: 0.8rem;
  line-height: 1.45;
}

.order-fields {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.order-heading {
  grid-column: 1 / -1;
  margin: 0 0 3px;
  font-size: 0.82rem;
  font-weight: 750;
}

.close-button {
  border: 0;
  color: rgba(220, 234, 238, 0.62);
  background: transparent;
  font-size: 1.7rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.secondary-button {
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
}

.login-dialog .secondary-button,
.feedback-dialog .secondary-button,
.readiness-dialog .secondary-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.075);
}

.login-dialog .secondary-button:hover,
.feedback-dialog .secondary-button:hover,
.readiness-dialog .secondary-button:hover {
  border-color: rgba(105, 200, 63, 0.42);
  background: rgba(105, 200, 63, 0.13);
}

.conversation-panel .secondary-button {
  color: white;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.075);
}

.feedback-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--accent);
  font-weight: 700;
}

.feedback-status.error {
  color: #ff8f84;
}

.feedback-status.success {
  color: var(--accent);
}

.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;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.3;
    transform: scale(0.78);
  }
}

@media (max-width: 900px) {
  .page-shell {
    min-height: calc(100vh - 24px);
    margin: 12px auto;
    padding: 12px;
    border-radius: 20px;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .topbar-action-group {
    flex-wrap: wrap;
  }

  .conversation-panel {
    min-height: 680px;
  }

  .program-panel {
    width: 100%;
  }

  .messages {
    max-height: 48vh;
    padding-inline: 20px;
  }

  .intro-card {
    min-height: 270px;
    padding: 30px 45% 26px 20px;
  }

  .message {
    max-width: 92%;
  }

}

@media (max-width: 560px) {
  .topbar {
    flex-wrap: wrap;
  }

  .brand-logo {
    width: 100%;
    height: 100%;
  }

  .brand-logo-frame {
    width: 66px;
    height: 66px;
  }

  .product-title {
    padding-left: 12px;
  }

  .product-title h1 {
    font-size: 1.65rem;
  }

  .product-tagline {
    font-size: 0.76rem;
  }

  .product-subtitle {
    display: none;
  }

  .intro-card {
    min-height: 310px;
    padding: 28px 20px 24px;
  }

  .intro-card > p:not(.eyebrow),
  .intro-card .privacy-note {
    max-width: 72%;
  }

  .neural-portrait {
    top: 15%;
    right: -16%;
    width: 65%;
    height: 90%;
    opacity: 0.38;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-action-group {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-actions > .restart-button {
    width: 100%;
  }

  .conversation-mode {
    align-items: stretch;
    flex-direction: column;
  }

  .conversation-mode-button {
    width: 100%;
  }
}
