:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #d8e0ea;
  --line-strong: #b7c3d3;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #dff5f1;
  --warning-soft: #fff4d6;
  --warning-text: #8a5c00;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 56px;
}

.search-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 32px;
  line-height: 1.15;
}

.status-pill,
.brand-pill,
.match-pill,
.note-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill {
  background: #edf2f7;
  color: var(--muted);
}

.status-pill.ready {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.status-pill.error {
  background: #fee2e2;
  color: #991b1b;
}

.search-form label,
.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input[type="search"] {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

input[type="search"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.secondary-button,
.filter-button,
.copy-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

.secondary-button {
  min-width: 86px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
}

.filter-button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.summary-row > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.summary-row span {
  display: block;
  margin-bottom: 4px;
  font-size: 26px;
  font-weight: 800;
}

.summary-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.results-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
  margin-bottom: 16px;
}

.section-header h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.section-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 13px;
}

.results-grid {
  display: grid;
  gap: 12px;
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  padding: 28px;
  text-align: center;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
}

.result-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.brand-pill {
  background: #e8eef7;
  color: #25466b;
}

.match-pill {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.match-pill.no-equivalent {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.model-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 16px;
}

.model-pair h3 {
  margin-bottom: 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.25;
}

.luminys-model {
  color: var(--accent-strong);
}

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

.note-chip {
  background: #eef7ff;
  color: #1d4f7a;
  white-space: normal;
}

.note-chip.no-equivalent {
  background: var(--warning-soft);
  color: var(--warning-text);
}

.copy-button {
  margin-top: 16px;
  min-height: 38px;
  padding: 0 14px;
}

.copy-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 16px;
  }

  .brand-row,
  .section-header,
  .model-pair {
    display: block;
  }

  .status-pill {
    margin-top: 14px;
  }

  .search-row,
  .summary-row {
    grid-template-columns: 1fr;
  }

  .secondary-button {
    min-height: 44px;
  }

  h1 {
    font-size: 26px;
  }

  .model-pair > div + div {
    margin-top: 14px;
  }
}

.disclaimer-footer {
  max-width: 860px;
  margin: 32px auto 40px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}
