:root {
  --brand-red: #8D1913;
  --brand-red-dark: #6e130f;
  --ink: #1a1a1a;
  --paper: #ffffff;
  --muted: #6b6b6b;
  --line: #e5e7eb;
  --font: "Avenir Next", Avenir, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: #f4f4f4;
}

a { text-decoration: none; color: inherit; }

.topbar {
  background: var(--brand-red);
  padding: 16px 20px;
  display: flex;
  align-items: center;
}

.topbar img {
  height: 30px;
  width: auto;
  display: block;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 18px 60px;
}

/* ---- Card page ---- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
}

.card-hero {
  background: var(--brand-red);
  padding: 40px 24px 44px;
  text-align: center;
  color: #fff;
}

.avatar {
  width: 88px;
  height: 88px;
  background: #fff;
  color: var(--brand-red);
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  overflow: hidden;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }

.card-hero h1 {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 700;
}

.card-hero .title {
  font-size: 15px;
  opacity: 0.92;
  margin: 0;
  font-weight: 500;
}

.card-hero .company {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-top: 10px;
  font-weight: 600;
}

.card-body {
  padding: 28px 22px 30px;
}

.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-bottom: 24px;
}

.actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--paper);
  padding: 16px 8px;
}

.actions .icon {
  width: 34px;
  height: 34px;
  color: var(--brand-red);
  display: flex;
  align-items: center;
  justify-content: center;
}

.actions .icon svg { width: 22px; height: 22px; }

.save-contact {
  display: block;
  text-align: center;
  background: var(--brand-red);
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0.4px;
  padding: 14px 24px;
  margin-bottom: 24px;
}

.save-contact:hover { background: var(--brand-red-dark); }

.bio {
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
  margin-bottom: 24px;
}

.section-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--brand-red);
  margin: 0 0 12px;
}

.detail-list {
  border-top: 1px solid var(--line);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.detail-row .label { color: var(--muted); flex-shrink: 0; }
.detail-row .value {
  font-weight: 600;
  text-align: right;
  min-width: 0;
  overflow-wrap: break-word;
}
.detail-row .value a { color: inherit; }

.detail-row.stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.detail-row.stacked .value {
  text-align: left;
  font-weight: 500;
  line-height: 1.5;
}

.socials {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.socials a {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-red);
}

.socials a svg { width: 16px; height: 16px; }

.footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 28px;
}

.footer-note a { color: var(--brand-red); font-weight: 600; }

/* ---- Directory / index page ---- */
.directory-header {
  text-align: center;
  padding: 8px 4px 26px;
}

.directory-header h1 {
  font-size: 26px;
  margin: 4px 0 8px;
  font-weight: 700;
}

.directory-header p {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

.search {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  font-size: 14px;
  font-family: var(--font);
  margin-bottom: 20px;
  background: #fff;
}

.search:focus {
  outline: none;
  border-color: var(--brand-red);
}

.person-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.person-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  padding: 14px 16px;
}

.person-row .avatar {
  width: 44px;
  height: 44px;
  font-size: 15px;
  margin: 0;
  flex: none;
}

.person-row .info { flex: 1; min-width: 0; }

.person-row .name {
  font-weight: 700;
  font-size: 15px;
}

.person-row .role {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.person-row .chevron {
  color: var(--brand-red);
  font-size: 20px;
  font-weight: 700;
}
