:root {
  --bg: #e7e3de;
  --page: #e7e3de;
  --card: #f8f7f4;
  --input: #efebe6;
  --primary: #2f6654;
  --primary-dark: #295845;
  --subtext: #557062;
  --text: #2d2d2d;
  --muted: #737373;
  --line: #ddd7cf;
  --white: #ffffff;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-pill: 999px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 247, 244, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-brand {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-nav-link {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: var(--subtext);
  font-size: 15px;
  font-weight: 700;
}

.site-nav-link:hover {
  background: rgba(47, 102, 84, 0.08);
}

.site-nav-link.active {
  background: var(--primary);
  color: var(--white);
}

.app-shell {
  min-height: calc(100vh - 70px);
}

.site-page {
  width: 100%;
  min-height: calc(100vh - 70px);
  background: var(--page);
}

.site-content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.hero-card,
.info-card,
.detail-card,
.result-card {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.hero-card,
.info-card,
.detail-card {
  margin-bottom: 18px;
}

.home-hero-card,
.search-hero-card,
.person-header-card {
  padding: 30px 28px;
  text-align: center;
}

.home-title,
.page-title,
.person-name {
  margin: 0;
  color: var(--primary);
  font-size: 32px;
  line-height: 1.08;
  font-weight: 800;
}

.home-subtitle,
.page-subtitle,
.person-dates {
  margin: 10px 0 0;
  color: var(--subtext);
  font-size: 18px;
  line-height: 1.4;
}

.hero-image {
  width: 100%;
  margin: 22px 0 18px;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.search-inline-form {
  margin-top: 18px;
}

.search-inline-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--input);
  border-radius: var(--radius-pill);
  padding: 10px;
}

.search-inline-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 18px;
  color: var(--text);
  padding: 0 12px;
}

.search-inline-box input::placeholder {
  color: #888;
}

.search-inline-box button {
  border: 0;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 12px 22px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.search-inline-box button:hover {
  background: var(--primary-dark);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.info-grid-two {
  grid-template-columns: 1fr;
}

.info-card,
.detail-card {
  padding: 24px 22px;
}

.info-card h2,
.detail-card h2 {
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--primary);
  font-weight: 800;
}

.info-card p,
.detail-text {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

.results-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.search-message-card {
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.result-card {
  display: block;
  width: 100%;
  padding: 18px 20px;
}

.result-card-rich .result-card-inner {
  display: grid;
  grid-template-columns: 88px 1fr 24px;
  gap: 16px;
  align-items: center;
}

.result-thumb-wrap {
  width: 88px;
  height: 68px;
  border-radius: 14px;
  overflow: hidden;
  background: #e8e3dc;
  flex-shrink: 0;
}

.result-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-main {
  min-width: 0;
}

.result-main h2 {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-main p {
  margin: 0;
  color: var(--subtext);
  font-size: 16px;
  line-height: 1.4;
}

.result-arrow {
  color: var(--primary);
  font-size: 32px;
  font-weight: 700;
  text-align: right;
}

.back-pill {
  display: inline-block;
  background: var(--white);
  color: var(--primary);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  margin-bottom: 14px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.person-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-bottom: 18px;
}

.detail-row {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.detail-row:first-of-type {
  border-top: 0;
  padding-top: 4px;
}

.detail-label {
  min-width: 92px;
  color: var(--primary);
  font-weight: 800;
  font-size: 16px;
}

.detail-value {
  flex: 1;
  text-align: right;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.photo-wrap {
  margin-top: 8px;
}

.detail-photo {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 18px;
  background: #e9e5df;
}

.related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.related-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
}

.related-person-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.related-person-main strong {
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.related-person-main span {
  color: var(--subtext);
  font-size: 15px;
  line-height: 1.35;
}

.related-arrow {
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
  flex-shrink: 0;
}

.hidden {
  display: none;
}

@media (max-width: 700px) {
  .site-header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .site-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-title,
  .page-title,
  .person-name {
    font-size: 28px;
  }

  .search-inline-box {
    flex-direction: row;
    align-items: center;
    padding: 10px;
  }

  .search-inline-box input {
    font-size: 16px;
    padding: 0 8px;
  }

  .search-inline-box button {
    padding: 10px 16px;
    font-size: 14px;
  }

  .result-card-rich .result-card-inner {
    grid-template-columns: 1fr 20px;
    gap: 12px;
  }

  .result-thumb-wrap {
    display: none;
  }

  .detail-row {
    flex-direction: column;
    gap: 4px;
  }

  .detail-value {
    text-align: left;
  }

  .detail-photo {
    height: 220px;
  }
}

@media (min-width: 900px) {
  .info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .person-main-grid {
    grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
    align-items: start;
  }

  .detail-photo {
    height: 200px;
  }
}