:root {
  color-scheme: light dark;
  font-family: Inter, Segoe UI, Arial, sans-serif;
  background: #f5f6f8;
  color: #171a1f;
}

body {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.hero,
.panel,
.intent,
.card,
.debug {
  background: white;
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.06);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: #5c6f8f;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: 34px;
}

h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

h3 {
  font-size: 18px;
}

.muted {
  color: #667085;
}

.status {
  min-width: 180px;
  padding: 18px;
  background: #f2f5fb;
  border-radius: 16px;
  text-align: right;
}

.status strong {
  display: block;
  font-size: 28px;
}

.status span,
.status small {
  display: block;
}

.panel,
.intent,
.debug {
  padding: 22px;
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
}

.search-row {
  display: flex;
  gap: 12px;
}

input {
  flex: 1;
  border: 1px solid #cfd5df;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
}

button {
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: white;
  padding: 0 20px;
  font-weight: 700;
  cursor: pointer;
}

.examples {
  margin-bottom: 0;
  color: #667085;
}

.filters {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.filters label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-weight: 500;
  color: #475467;
}

.filters input {
  flex: 0;
  width: auto;
}

.mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  padding: 12px;
}

.mode-switch legend {
  padding: 0 6px;
  color: #667085;
  font-size: 13px;
}

.loading,
.error {
  margin-top: 14px;
  border-radius: 14px;
  padding: 12px 14px;
}

.loading {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #eef4ff;
  color: #1d4ed8;
}

.error {
  background: #fef3f2;
  color: #b42318;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid rgba(29, 78, 216, 0.25);
  border-top-color: #1d4ed8;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.examples a,
.link {
  color: #245dc1;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span {
  background: #eef4ff;
  color: #1d4ed8;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 14px;
}

.results {
  display: grid;
  gap: 16px;
}

.card {
  padding: 20px;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.score {
  min-width: 70px;
  border-radius: 14px;
  background: #ecfdf3;
  color: #027a48;
  padding: 10px;
  text-align: center;
  font-weight: 800;
}

.specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.specs div {
  background: #f9fafb;
  border-radius: 12px;
  padding: 10px;
}

dt {
  color: #667085;
  font-size: 12px;
}

dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.reasons li {
  background: #fff7ed;
  color: #9a3412;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

pre {
  white-space: pre-wrap;
  overflow: auto;
}

@media (max-width: 720px) {
  .hero,
  .search-row,
  .card-head {
    flex-direction: column;
  }

  button {
    padding: 14px 20px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    background: #0b1020;
    color: #e5e7eb;
  }

  .hero,
  .panel,
  .intent,
  .card,
  .debug {
    background: #111827;
    border-color: #243044;
  }

  .status,
  .specs div {
    background: #172033;
  }

  input {
    background: #0b1020;
    border-color: #344054;
    color: #e5e7eb;
  }

  .mode-switch {
    border-color: #344054;
  }
}

