:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --border: #d8e1ee;
  --text: #10213a;
  --muted: #5c6f8a;
  --accent: #0b5fff;
  --accent-dark: #0846bb;
  --success-bg: #e9fff2;
  --success-text: #0f6d39;
  --warning-bg: #fff7e7;
  --warning-text: #935d00;
  --shadow: 0 10px 30px rgba(16, 33, 58, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #edf3ff 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  width: min(860px, calc(100vw - 24px));
  margin: 24px auto 48px;
}

.search-card,
.detail-card,
.list-card,
.feedback {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.search-card,
.detail-card,
.list-card {
  padding: 24px;
}

.brand-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: #ebf2ff;
  font-size: 28px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.lead {
  margin: 20px 0 0;
  font-size: 1.05rem;
}

.search-form {
  margin-top: 20px;
}

.label {
  display: block;
  margin-bottom: 10px;
  font-size: 1rem;
  font-weight: 700;
}

.search-input {
  width: 100%;
  min-height: 64px;
  border-radius: 18px;
  border: 2px solid var(--border);
  padding: 0 18px;
  font-size: 1.4rem;
  font-weight: 600;
  text-transform: uppercase;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 95, 255, 0.15);
}

.help-text {
  margin: 10px 0 0;
  color: var(--muted);
}

.primary-button {
  width: 100%;
  min-height: 64px;
  margin-top: 18px;
  border: none;
  border-radius: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: var(--accent-dark);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.feedback {
  margin-top: 16px;
  padding: 16px 18px;
  font-weight: 700;
}

.feedback.info {
  background: #eef4ff;
}

.feedback.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.feedback.warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.hidden {
  display: none;
}

.detail-card,
.list-card {
  margin-top: 18px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.principal-grid {
  margin-top: 20px;
}

.contact-grid {
  margin-top: 12px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 84px;
  padding: 16px;
  border-radius: 18px;
  background: #f8fbff;
  border: 1px solid #e4ebf5;
}

.full-width {
  grid-column: 1 / -1;
}

.detail-label {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.detail-value {
  font-size: 1.25rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ebf2ff;
}

.link-like {
  color: var(--accent-dark);
  text-decoration: none;
}

.divider {
  height: 1px;
  margin: 24px 0;
  background: var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.results-count {
  color: var(--muted);
  font-weight: 700;
}

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

.result-button {
  width: 100%;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #f8fbff;
  text-align: left;
  cursor: pointer;
}

.result-button:hover,
.result-button:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(11, 95, 255, 0.1);
  outline: none;
}

.result-title {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
}

.result-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100vw - 16px, 100%);
    margin: 8px auto 24px;
  }

  .search-card,
  .detail-card,
  .list-card {
    padding: 18px;
    border-radius: 20px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .full-width {
    grid-column: auto;
  }
}
