/* HouseR — desktop-friendly UI (Riff-inspired) */

.screen { display: none; }
.screen.active { display: flex; }

.btn-primary {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 600;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
  font-size: 0.9375rem;
}
.btn-primary:hover { background: #fbbf24; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: #1e293b;
  color: #f1f5f9;
  font-weight: 500;
  padding: 0.875rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid #334155;
  transition: background 0.15s, transform 0.1s;
  cursor: pointer;
  font-size: 0.9375rem;
}
.btn-secondary:hover { background: #334155; }
.btn-secondary:active { transform: scale(0.98); }

.btn-ghost {
  background: transparent;
  color: #94a3b8;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
}
.btn-ghost:hover { color: #f1f5f9; background: rgba(30, 41, 59, 0.6); }

.label {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.input {
  width: 100%;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9375rem;
  color: #f1f5f9;
}
.input:focus {
  outline: none;
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.3);
}

.card-interactive {
  padding: 1rem 1.125rem;
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  text-align: left;
  width: 100%;
}
.card-interactive:hover { border-color: #475569; }
.card-interactive:active { transform: scale(0.99); }

.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge-warn { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-safe { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  padding: 0.5rem 1rem;
  background: rgba(2, 6, 23, 0.95);
  border-top: 1px solid #1e293b;
  backdrop-filter: blur(8px);
  margin-top: auto;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.125rem;
  font-size: 0.75rem;
  color: #64748b;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.15s;
}
.nav-item.active { color: #fbbf24; }
.nav-item span:first-child { font-size: 1.125rem; }

.scrub-pulse { animation: pulse-ring 1.5s ease-in-out infinite; }
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
}

.proc-step { transition: opacity 0.2s, color 0.2s; }
.proc-step.active { opacity: 1; color: #fbbf24; }
.proc-step.done { opacity: 0.55; text-decoration: line-through; }

.report-section {
  border-radius: 0.75rem;
  border: 1px solid #1e293b;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
}
.report-section[open] { border-color: #334155; }
.report-section summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.875rem;
  list-style: none;
}
.report-section summary::-webkit-details-marker { display: none; }
.report-section summary::after {
  content: "▸";
  color: #64748b;
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: transform 0.15s;
}
.report-section[open] summary::after { transform: rotate(90deg); }
.report-body {
  padding: 0 1.125rem 1.125rem;
  font-size: 0.875rem;
  color: #94a3b8;
  line-height: 1.6;
  border-top: 1px solid rgba(30, 41, 59, 0.5);
}
.report-body dl {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.875rem;
}
.report-body dt {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 600;
}
.report-body dd {
  margin: 0.2rem 0 0;
  color: #cbd5e1;
}
.report-body a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.report-body a:hover { color: #fcd34d; }

.stat-chip {
  border-radius: 0.75rem;
  border: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.6);
  padding: 0.875rem 1rem;
  text-align: center;
}
.stat-chip .num {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.stat-chip .lbl {
  font-size: 0.6875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.25rem;
}

.demo-banner {
  font-size: 0.6875rem;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.5);
  border: 1px solid #1e293b;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.hero-panel {
  border-radius: 1rem;
  border: 1px solid #1e293b;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, transparent 50%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
  overflow: hidden;
}

.rule-card {
  border-radius: 0.75rem;
  border: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.5);
  padding: 1rem;
}

.toast {
  position: fixed;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%) translateY(1rem);
  background: #1e293b;
  border: 1px solid #334155;
  color: #f1f5f9;
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
  max-width: 90vw;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Desktop width */
@media (min-width: 768px) {
  #app {
    max-width: 48rem;
    min-height: 100vh;
    border-left: 1px solid #1e293b;
    border-right: 1px solid #1e293b;
  }
  .bottom-nav {
    border-radius: 0;
  }
}
