:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-strong: #f9fbfc;
  --text: #18202a;
  --muted: #687483;
  --line: #dfe5eb;
  --blue: #155e94;
  --blue-dark: #0f4268;
  --green: #18805c;
  --red: #b83245;
  --amber: #8a641b;
  --shadow: 0 18px 50px rgba(24, 32, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  margin-bottom: 18px;
}

.brand-logo {
  width: 251px;
  max-width: 52vw;
  height: auto;
  object-fit: contain;
}

.brand-copy {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.brand-copy h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 700;
}

.brand-copy p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.search-panel,
.result-card,
.state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-panel {
  padding: 18px;
}

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

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 142px;
  gap: 10px;
}

.search-row input {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: var(--surface-strong);
  color: var(--text);
  text-transform: uppercase;
}

.search-row input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(21, 94, 148, 0.16);
}

.search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--blue);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.search-row button:hover {
  background: var(--blue-dark);
}

.button-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.button-icon::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 2px;
  right: -6px;
  bottom: -4px;
  background: currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.state {
  margin-top: 14px;
  padding: 20px;
  color: var(--muted);
}

.state:empty {
  display: none;
}

.state h2 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 20px;
}

.state p {
  margin: 0;
}

.state.loading {
  border-color: rgba(21, 94, 148, 0.32);
}

.state.error {
  border-color: rgba(184, 50, 69, 0.36);
  background: #fff8f9;
}

.result {
  margin-top: 14px;
}

.result-card {
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-head h2 {
  margin: 0;
  font-size: 32px;
  line-height: 1;
  letter-spacing: 0;
}

.status-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.ok,
.mini-pill.ok {
  background: #e8f6ef;
  color: var(--green);
}

.status-pill.danger {
  background: #fae9ec;
  color: var(--red);
}

.mini-pill.muted {
  background: #f5ebd2;
  color: var(--amber);
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 18px 22px 8px;
  gap: 10px 18px;
}

.result-row {
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.result-row dt {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-row dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.reviews {
  padding: 6px 22px 22px;
}

.reviews h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.reviews table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.reviews th,
.reviews td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

.reviews th {
  background: var(--surface-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.reviews tr:last-child td {
  border-bottom: 0;
}

.empty-line {
  margin: 0;
  padding: 0 22px 22px;
  color: var(--muted);
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 920px);
    padding-top: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .brand-logo {
    max-width: 230px;
  }

  .brand-copy {
    padding-left: 0;
    border-left: 0;
  }

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

  .search-row button {
    width: 100%;
  }

  .result-head {
    flex-direction: column;
    padding: 18px;
  }

  .result-head h2 {
    font-size: 28px;
  }

  .result-grid {
    grid-template-columns: 1fr;
    padding: 16px 18px 6px;
  }

  .reviews {
    padding: 6px 18px 18px;
  }
}
