:root {
  color-scheme: dark;
  --bg: #0b1d2a;
  --bg-alt: #112636;
  --panel: #162c3b;
  --card: #1c3648;
  --card-strong: #223d51;
  --text: #e8edf2;
  --muted: #9aa9b5;
  --accent: #4aa3a0;
  --accent-soft: #6bb9b4;
  --warning: #f2c14e;
  --toggle-on-color: #4dd0ae;
  --toggle-off-color: #f2c14e;
  --toggle-track-on: rgba(77, 208, 174, 0.25);
  --toggle-track-off: rgba(242, 193, 78, 0.25);
  --border: #2b465a;
  --shadow: rgba(5, 13, 20, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

body.auth-locked {
  overflow: hidden;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "IBM Plex Sans", sans-serif;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
}

p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

ul {
  margin: 0.6rem 0 0.6rem 1.2rem;
  padding: 0;
  color: var(--text);
}

li {
  margin-bottom: 0.4rem;
}

.ambient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 600px at 10% 10%, rgba(74, 163, 160, 0.25), transparent 60%),
    radial-gradient(500px 500px at 90% 20%, rgba(242, 193, 78, 0.15), transparent 60%),
    linear-gradient(180deg, #0b1d2a 0%, #0f2536 60%, #0d2030 100%);
  z-index: -1;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.2rem 1rem;
  gap: 1.2rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.app-eyebrow {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.2rem;
  color: var(--accent-soft);
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.screen {
  display: none;
  animation: fadeUp 0.5s ease;
}

.screen.active {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-card {
  background: linear-gradient(145deg, var(--card), var(--card-strong));
  padding: 1.6rem;
  border-radius: 18px;
  box-shadow: 0 12px 24px var(--shadow);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.status-card {
  background: var(--panel);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.status-card strong {
  font-size: 1.4rem;
  display: block;
  margin-top: 0.3rem;
}

.screen-header {
  display: grid;
  gap: 0.3rem;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: 0 10px 18px var(--shadow);
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.6rem;
  background: rgba(5, 13, 20, 0.7);
  backdrop-filter: blur(6px);
  z-index: 20;
}

.auth-card {
  width: min(420px, 100%);
  display: grid;
  gap: 0.8rem;
}

.auth-form {
  display: grid;
  gap: 0.8rem;
}

.auth-status {
  min-height: 1.2rem;
}

.auth-status.error {
  color: var(--warning);
}

.hidden {
  display: none !important;
}

.notice {
  border-left: 3px solid var(--warning);
}

.form-card label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Symptom Form - Mobile First */
.symptom-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.symptom-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0;
}

.symptom-form .field-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.symptom-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.symptom-form .form-field--half {
  min-width: 0;
}

.symptom-form .fault-hint {
  font-size: 0.8rem;
  margin: -0.5rem 0 0;
  min-height: 1.2rem;
}

/* Quick Checks - Compact Toggle Row */
.quick-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  flex: 1 1 auto;
  min-width: fit-content;
}

.quick-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.check-track {
  position: relative;
  width: 36px;
  height: 20px;
  background: rgba(242, 193, 78, 0.2);
  border-radius: 10px;
  border: 1px solid var(--warning);
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
}

.check-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: var(--warning);
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}

.quick-check input:checked + .check-track {
  background: rgba(74, 163, 160, 0.2);
  border-color: var(--accent);
}

.quick-check input:checked + .check-track::after {
  transform: translateX(16px);
  background: var(--accent);
}

.check-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1rem;
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.model-autocomplete {
  position: relative;
}

.model-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 24px var(--shadow);
  max-height: 240px;
  overflow-y: auto;
  padding: 0.35rem;
}

.model-suggestion {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.model-suggestion:hover,
.model-suggestion:focus {
  background: var(--bg-alt);
}

.model-suggestion--empty {
  color: var(--muted);
  cursor: default;
}

.model-search-card label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

.model-search-card .field-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.detail-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem;
}

.detail-label {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.detail-value {
  margin: 0;
  font-weight: 600;
  color: var(--text);
}

fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

legend {
  font-size: 0.9rem;
  color: var(--muted);
}

.split {
  display: grid;
  gap: 1rem;
}

/* Slider Toggle Component */
.slider-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.slider-group {
  display: grid;
  gap: 0.5rem;
}

.slider-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.slider-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}

.slider-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.slider-option {
  font-size: 0.85rem;
  color: var(--muted);
  transition: color 0.2s ease;
  min-width: 28px;
  text-align: center;
}

.slider-option:first-of-type {
  text-align: right;
}

.slider-option:last-of-type {
  text-align: left;
}

.slider-toggle input:checked ~ .slider-option:last-of-type {
  color: var(--toggle-on-color);
  font-weight: 600;
}

.slider-toggle input:not(:checked) ~ .slider-option:last-of-type {
  color: var(--muted);
}

.slider-toggle:has(input:not(:checked)) .slider-option:first-of-type {
  color: var(--toggle-off-color);
  font-weight: 600;
}

.slider-track {
  position: relative;
  width: 48px;
  height: 26px;
  background: var(--card);
  border-radius: 13px;
  border: 1px solid var(--border);
  transition: background 0.25s ease, border-color 0.25s ease;
  flex-shrink: 0;
}

.slider-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.slider-toggle input:checked + .slider-track {
  background: var(--toggle-track-on);
  border-color: var(--toggle-on-color);
  box-shadow: 0 0 0 2px rgba(77, 208, 174, 0.25);
}

.slider-toggle input:checked + .slider-track::after {
  transform: translateX(22px);
  background: var(--toggle-on-color);
  box-shadow: 0 0 8px rgba(77, 208, 174, 0.6);
}

.slider-toggle input:not(:checked) + .slider-track {
  background: var(--toggle-track-off);
  border-color: var(--toggle-off-color);
  box-shadow: 0 0 0 2px rgba(242, 193, 78, 0.25);
}

.slider-toggle input:not(:checked) + .slider-track::after {
  background: var(--toggle-off-color);
  box-shadow: 0 0 8px rgba(242, 193, 78, 0.6);
}

/* Legacy toggle (kept for compatibility) */
.toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem;
  background: var(--bg-alt);
  border: 1px solid transparent;
  border-radius: 12px;
}

.toggle input {
  accent-color: var(--accent);
  width: auto;
}

.primary,
.ghost {
  width: 100%;
  min-height: 56px;
  border-radius: 16px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  background: var(--accent);
  color: #061218;
  box-shadow: 0 12px 18px rgba(74, 163, 160, 0.35);
}

.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.ghost.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(74, 163, 160, 0.35);
}

.primary:disabled {
  background: rgba(74, 163, 160, 0.3);
  color: rgba(6, 18, 24, 0.6);
  cursor: not-allowed;
  box-shadow: none;
}

.footer-actions {
  display: grid;
  gap: 0.8rem;
}

.list-stack {
  display: grid;
  gap: 0.8rem;
}

.result-item {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 0.8rem;
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}

.result-item h4 {
  margin: 0;
}

.assistant-card {
  display: grid;
  gap: 0.8rem;
}

.assistant-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.assistant-messages {
  display: grid;
  gap: 0.6rem;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.assistant-message {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 0.7rem;
  border: 1px solid var(--border);
  display: grid;
  gap: 0.4rem;
}

.assistant-message.user {
  border-color: rgba(74, 163, 160, 0.7);
}

.assistant-role {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.assistant-message pre {
  margin: 0;
  padding: 0.6rem;
  border-radius: 10px;
  background: #0f2536;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.8rem;
  overflow-x: auto;
}

.assistant-section {
  display: grid;
  gap: 0.4rem;
}

.assistant-section-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0;
}

.assistant-section ul {
  margin: 0;
  padding-left: 1.1rem;
}

.assistant-section li {
  margin-bottom: 0.3rem;
}

.assistant-block {
  display: grid;
  gap: 0.8rem;
  margin-top: 1.2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.assistant-toolbar {
  display: flex;
  justify-content: flex-end;
}

.assistant-checklist {
  display: grid;
  gap: 0.5rem;
}

.assistant-check {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.assistant-check-input {
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.assistant-check-input:checked + span {
  color: var(--muted);
  text-decoration: line-through;
}

.assistant-question-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assistant-recheck {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.assistant-recheck textarea {
  min-height: 90px;
}

.assistant-followup {
  display: grid;
  gap: 0.6rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
}

.assistant-followup-question {
  margin: 0;
  color: var(--text);
}

.assistant-followup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.assistant-followup-status {
  min-height: 1rem;
}

.assistant-followup-option.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(74, 163, 160, 0.35);
}

.assistant-followup-form {
  display: grid;
  gap: 0.6rem;
}

.assistant-form {
  display: grid;
  gap: 0.6rem;
}

.assistant-form label {
  display: grid;
  gap: 0.4rem;
  font-weight: 500;
}

.assistant-status {
  min-height: 1.2rem;
}

.assistant-status.error {
  color: var(--warning);
}

.compact {
  width: auto;
  min-height: auto;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 999px;
}

.confidence {
  background: rgba(255, 255, 255, 0.08);
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
}

.confidence span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
}

.muted {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Diagnostic Assessment Styles */
.diagnostic-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 1rem;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.diagnostic-loading p {
  color: var(--muted);
  margin: 0;
}

.diagnostic-content {
  display: grid;
  gap: 1.2rem;
}

.diagnostic-summary {
  background: linear-gradient(135deg, rgba(74, 163, 160, 0.15), rgba(107, 185, 180, 0.08));
  border-radius: 16px;
  padding: 1.25rem;
  border: 1px solid rgba(74, 163, 160, 0.4);
  box-shadow: 
    0 0 0 1px rgba(74, 163, 160, 0.1),
    0 8px 24px rgba(74, 163, 160, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.agent-header {
  display: flex;
  align-items: center;
  gap: 1.125rem;
  margin-bottom: 1.275rem;
}

.agent-avatar {
  width: 63px;
  height: 63px;
  background: linear-gradient(145deg, #5ed3d0, #3d9996);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.1rem;
  box-shadow: 
    0 4px 12px rgba(74, 163, 160, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  animation: pulse-glow 3s ease-in-out infinite;
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 4px 12px rgba(74, 163, 160, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 4px 20px rgba(74, 163, 160, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

.agent-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.agent-name {
  font-weight: 600;
  font-size: 1.5rem;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.agent-badge {
  font-size: 0.975rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fff;
  background: linear-gradient(90deg, rgba(74, 163, 160, 0.8), rgba(107, 185, 180, 0.6));
  padding: 0.3rem 0.75rem;
  border-radius: 9px;
  width: fit-content;
  font-weight: 500;
}

.agent-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-soft);
  margin: 0.75rem 0 0.5rem;
  font-weight: 600;
}

.agent-message p {
  margin: 0;
  color: var(--text);
  line-height: 1.6;
  font-size: 0.95rem;
}

.diagnostic-summary p.agent-title {
  color: var(--accent-soft);
}

.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  margin: 0 0 0.6rem;
  font-weight: 600;
}

/* Safety Section */
.safety-section {
  background: rgba(242, 193, 78, 0.1);
  border: 1px solid rgba(242, 193, 78, 0.3);
  border-radius: 12px;
  overflow: hidden;
}

.safety-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--warning);
  list-style: none;
}

.safety-header::-webkit-details-marker {
  display: none;
}

.safety-header::after {
  content: '▸';
  margin-left: auto;
  transition: transform 0.2s ease;
}

.safety-section[open] .safety-header::after {
  transform: rotate(90deg);
}

.safety-list {
  margin: 0;
  padding: 0 1rem 0.8rem 2.5rem;
  color: var(--text);
}

.safety-list li {
  margin-bottom: 0.4rem;
}

/* Diagnostic Checks */
.diagnostic-checks-section {
  display: grid;
  gap: 0.6rem;
}

.diagnostic-checks {
  display: grid;
  gap: 0.8rem;
}

.diagnostic-check-item {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  transition: border-color 0.2s ease;
}

.diagnostic-check-item.completed {
  border-color: var(--accent);
  background: rgba(74, 163, 160, 0.05);
}

.diagnostic-check-item.has-issue {
  border-color: var(--warning);
  background: rgba(242, 193, 78, 0.05);
}

.check-header {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.check-checkbox {
  margin-top: 0.15rem;
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.check-content {
  flex: 1;
  display: grid;
  gap: 0.3rem;
}

.check-task {
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.check-expected {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.check-expected strong {
  color: var(--accent-soft);
}

.check-response {
  display: grid;
  gap: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
}

.check-response.hidden {
  display: none;
}

.issue-slider-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.issue-slider-label {
  font-size: 0.85rem;
  color: var(--muted);
  min-width: 60px;
}

.issue-slider-label.active-no {
  color: var(--accent);
  font-weight: 600;
}

.issue-slider-label.active-yes {
  color: var(--warning);
  font-weight: 600;
}

.issue-slider {
  position: relative;
  width: 52px;
  height: 28px;
  background: rgba(74, 163, 160, 0.2);
  border-radius: 14px;
  border: 1px solid var(--accent);
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.issue-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.25s ease, background 0.25s ease;
}

.issue-slider.has-issue {
  background: rgba(242, 193, 78, 0.2);
  border-color: var(--warning);
}

.issue-slider.has-issue::after {
  transform: translateX(24px);
  background: var(--warning);
}

.check-feedback {
  width: 100%;
  min-height: 60px;
  padding: 0.6rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  resize: vertical;
}

.check-feedback::placeholder {
  color: var(--muted);
}

/* Possible Issues */
.diagnostic-issues-section {
  display: grid;
  gap: 0.6rem;
}

.diagnostic-issues {
  display: grid;
  gap: 0.6rem;
}

.possible-issue-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  display: grid;
  gap: 0.5rem;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.issue-name {
  font-weight: 500;
  color: var(--text);
  margin: 0;
}

.issue-probability {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  min-width: 45px;
  text-align: right;
}

.issue-probability.high {
  color: var(--warning);
}

.probability-bar {
  background: rgba(255, 255, 255, 0.08);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.probability-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-soft));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.probability-bar-fill.high {
  background: linear-gradient(90deg, var(--warning), #f5d78e);
}

.issue-detail {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

/* Continue Button */
#continue-diagnosis-btn {
  margin-top: 0.5rem;
}

#continue-diagnosis-btn:disabled {
  background: rgba(74, 163, 160, 0.3);
  color: rgba(6, 18, 24, 0.6);
  cursor: not-allowed;
  box-shadow: none;
}

.diagnostic-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.diagnostic-actions .full-width {
  width: 100%;
}

.diagnostic-actions .primary,
.diagnostic-actions .ghost {
  min-height: 48px;
}

.iteration-counter {
  text-align: center;
  margin: 0;
}

/* Error State */
.diagnostic-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
}

.error-message {
  color: var(--warning);
  margin: 0;
}

.app-footer {
  display: flex;
  gap: 0.8rem;
  margin-top: auto;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .app-shell {
    max-width: 640px;
    margin: 0 auto;
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-actions {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }
}
