:root {
  --lb-ink: #1d1d1f;
  --lb-muted: #62666d;
  --lb-line: #dde2e7;
  --lb-bg: #f7f9f7;
  --lb-panel: #ffffff;
  --lb-green: #0b7a4b;
  --lb-red: #b92d2b;
  --lb-gold: #d69d22;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--lb-bg);
  color: var(--lb-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}

a {
  color: var(--lb-green);
  text-decoration: none;
}

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

.site-header {
  background: var(--lb-panel);
  border-bottom: 1px solid var(--lb-line);
}

.site-header__inner,
.site-footer__inner,
.site-main {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 24px;
}

.site-branding {
  display: flex;
  flex-direction: column;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

.site-title a {
  color: var(--lb-ink);
}

.site-description {
  margin: 6px 0 0;
  color: var(--lb-muted);
  font-size: 0.92rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-main {
  padding: 40px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 32px;
  align-items: center;
  padding: 38px 0 30px;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 1.02;
}

.hero p {
  max-width: 680px;
  color: var(--lb-muted);
  font-size: 1.1rem;
}

.search-panel,
.notice-panel {
  background: var(--lb-panel);
  border: 1px solid var(--lb-line);
  border-radius: 8px;
  padding: 20px;
}

.search-panel h2,
.directory-section h2,
.archive-header h1 {
  margin-top: 0;
}

.birthday-date-header p {
  max-width: 760px;
  color: var(--lb-muted);
  font-size: 1.08rem;
}

.search-form,
.date-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.people-search-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}

.people-search-form__actions {
  display: flex;
  gap: 10px;
}

.people-search-form__actions .button,
.people-search-form__actions button {
  flex: 1;
}

label {
  font-weight: 650;
}

input,
select,
button {
  min-height: 44px;
  border-radius: 6px;
  font: inherit;
}

input,
select {
  width: 100%;
  border: 1px solid var(--lb-line);
  background: #fff;
  color: var(--lb-ink);
  padding: 9px 12px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--lb-green);
  color: #fff;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 700;
}

button:hover,
.button:hover {
  background: #09663f;
  text-decoration: none;
}

.button--secondary {
  border: 1px solid var(--lb-line);
  background: var(--lb-panel);
  color: var(--lb-green);
}

.button--secondary:hover {
  background: #eef6f1;
}

.directory-section {
  margin-top: 42px;
}

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

.section-heading h2 {
  margin-bottom: 0;
}

.person-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.person-grid--compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.person-card {
  background: var(--lb-panel);
  border: 1px solid var(--lb-line);
  border-radius: 14px;
  box-shadow: 0 14px 34px rgba(29, 29, 31, 0.08);
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.person-card:hover {
  border-color: rgba(11, 122, 75, 0.24);
  box-shadow: 0 18px 42px rgba(29, 29, 31, 0.12);
  transform: translateY(-2px);
}

.person-card__media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #e7ece9;
  overflow: hidden;
}

.person-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.person-card:hover .person-card__media img {
  transform: scale(1.035);
}

.person-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8f2ec, #f7f0dc);
  color: var(--lb-green);
  font-size: 4rem;
  font-weight: 800;
  text-transform: uppercase;
}

.person-card__badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--lb-green);
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(29, 29, 31, 0.14);
}

.person-card__body {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.person-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.person-card h3 a {
  color: var(--lb-ink);
}

.person-card__profession {
  margin: 6px 0 0;
  color: var(--lb-muted);
  font-size: 0.94rem;
}

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

.person-card__facts div {
  min-width: 0;
  border: 1px solid var(--lb-line);
  border-radius: 10px;
  background: #fbfcfb;
  padding: 10px;
}

.person-card__facts span {
  display: block;
  color: var(--lb-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.person-card__facts strong {
  display: block;
  margin-top: 2px;
  color: var(--lb-ink);
  font-size: 0.95rem;
  line-height: 1.25;
}

.person-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 10px;
  background: var(--lb-green);
  color: #fff;
  padding: 10px 14px;
  font-weight: 700;
}

.person-card__button:hover,
.person-card__button:focus {
  background: #09663f;
  color: #fff;
  text-decoration: none;
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.category-list a {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--lb-line);
  border-radius: 999px;
  background: var(--lb-panel);
  padding: 8px 13px;
}

.category-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 999px;
  background: #eef1ed;
  color: var(--lb-muted);
  font-size: 0.82rem;
}

.profile-page {
  display: grid;
  gap: 28px;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 34px;
  align-items: stretch;
}

.profile-hero__media,
.profile-section {
  background: var(--lb-panel);
  border: 1px solid var(--lb-line);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(29, 29, 31, 0.08);
}

.profile-hero__media {
  display: flex;
  min-height: 460px;
  overflow: hidden;
}

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

.profile-hero__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 460px;
  background: linear-gradient(135deg, #e8f2ec, #f7f0dc);
  color: var(--lb-green);
  font-size: 6rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-hero__content {
  align-self: center;
  min-width: 0;
}

.profile-badge,
.profile-chip-list a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(11, 122, 75, 0.2);
  border-radius: 999px;
  background: #eef6f1;
  color: var(--lb-green);
  padding: 7px 12px;
  font-size: 0.86rem;
  font-weight: 800;
}

.profile-hero h1 {
  margin: 14px 0 10px;
  font-size: clamp(2.35rem, 6vw, 5rem);
  line-height: 1;
}

.profile-profession {
  margin: 0 0 18px;
  color: var(--lb-muted);
  font-size: 1.18rem;
}

.profile-alt-names {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.profile-alt-names p {
  display: grid;
  gap: 2px;
  margin: 0;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: var(--lb-panel);
  padding: 10px 12px;
}

.profile-alt-names span,
.profile-facts dt {
  color: var(--lb-muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.profile-facts div {
  min-width: 0;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: var(--lb-panel);
  padding: 13px;
}

.profile-facts dd {
  margin: 3px 0 0;
  font-weight: 750;
}

.profile-section {
  padding: 24px;
}

.profile-section h2 {
  margin-top: 0;
}

.profile-chip-list,
.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.source-list a {
  display: inline-flex;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--lb-line);
  background: var(--lb-panel);
}

.site-footer__inner {
  padding: 24px 0;
  color: var(--lb-muted);
}

.pagination {
  margin-top: 28px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 820px) {
  .site-header__inner,
  .hero,
  .profile-hero {
    grid-template-columns: 1fr;
  }

  .profile-hero__media,
  .profile-hero__placeholder {
    min-height: 360px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .people-search-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-header__inner {
    display: grid;
    padding: 16px 0;
  }

  .person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .person-grid {
    grid-template-columns: 1fr;
  }

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

  .people-search-form__actions {
    flex-direction: column;
  }

  .person-card__facts {
    grid-template-columns: 1fr;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .profile-section {
    padding: 18px;
  }
}
