:root {
  --ink: #182026;
  --muted: #66717c;
  --line: #d8dee4;
  --surface: #ffffff;
  --page: #f5f7f8;
  --brand: #b12025;
  --brand-dark: #731519;
  --focus: #0f6b82;
}

* { box-sizing: border-box; }

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

.contact-shell {
  width: min(960px, calc(100% - 32px));
  margin: 32px auto;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 45px rgba(24, 32, 38, 0.08);
  overflow: hidden;
}

.panel-heading {
  padding: 24px 24px 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 52px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #fbfcfd;
  color: var(--muted);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab:last-child { border-right: 0; }
.tab.is-active { background: var(--brand); color: #fff; }

.lookup-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 0.7fr) auto;
  gap: 16px;
  align-items: end;
  padding: 24px;
}

.lookup-form[data-panel="personal"] { grid-template-columns: minmax(180px, 1fr) auto; }
.lookup-form.is-hidden { display: none; }

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input:focus {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(15, 107, 130, 0.14);
  outline: none;
}

button[type="submit"] {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  background: var(--brand-dark);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.results {
  min-height: 72px;
  padding: 0 24px 24px;
}

.status {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: #fbfcfd;
}

.status.error {
  border-color: rgba(177, 32, 37, 0.35);
  color: var(--brand-dark);
  background: #fff7f7;
}

.result-heading {
  margin: 0 0 14px;
  font-size: 18px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

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

.contact-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.contact-card p {
  margin: 4px 0;
  color: var(--muted);
  line-height: 1.45;
}

.contact-details { margin-top: 10px; }
.contact-details strong { color: var(--ink); }

.text-link {
  color: var(--brand-dark);
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover { text-decoration: underline; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.contact-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border-radius: 6px;
  padding: 0 12px;
  color: var(--brand-dark);
  background: #fff4db;
  font-weight: 700;
  text-decoration: none;
}

.section-block + .section-block { margin-top: 22px; }

@media (max-width: 720px) {
  .contact-shell {
    width: min(100% - 20px, 960px);
    margin: 10px auto;
  }

  .lookup-form,
  .lookup-form[data-panel="personal"] {
    grid-template-columns: 1fr;
  }
}