:root {
  color-scheme: light dark;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-size: 16px;
  --background: #f5f6fb;
  --panel: #ffffff;
  --border: #d6dae5;
  --text: #1f2430;
  --accent: #0057b8;
  --accent-light: rgba(0, 87, 184, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #12131a;
    --panel: #1e202b;
    --border: #2f3241;
    --text: #f2f4ff;
    --accent: #4d9eff;
    --accent-light: rgba(77, 158, 255, 0.15);
  }
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

header {
  text-align: center;
}

h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 3vw, 2.75rem);
}

.intro {
  margin: 0 auto;
  max-width: 640px;
  color: rgba(31, 36, 48, 0.8);
}

section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

section h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  font-weight: 600;
}

.field span {
  font-size: 0.95rem;
}

select,
input[type="search"] {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--panel);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

select:focus,
input[type="search"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-light);
}

select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-results {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.search-results:empty {
  border: none;
}

.search-results li {
  padding: 0.65rem 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  cursor: pointer;
  transition: background 0.15s;
}

.search-results li:nth-child(even) {
  background: rgba(0, 0, 0, 0.02);
}

.search-results li:hover,
.search-results li:focus {
  background: var(--accent-light);
}

.search-results .reference {
  font-weight: 600;
}

.search-results .manufacturer {
  font-size: 0.85rem;
  opacity: 0.8;
  white-space: nowrap;
}

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

.link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.link-row span {
  font-weight: 600;
  min-width: 160px;
}

a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

a:hover,
a:focus {
  text-decoration: underline;
}

a.disabled {
  pointer-events: none;
  color: rgba(31, 36, 48, 0.5);
}

@media (max-width: 640px) {
  .container {
    padding: 1.5rem 1rem 3rem;
  }

  .link-row span {
    min-width: auto;
  }
}
