:root {
  --bg: #f6f7f4;
  --paper: #ffffff;
  --paper-soft: #eef3ee;
  --ink: #1e2521;
  --muted: #647067;
  --line: #d9e0da;
  --brand: #21483b;
  --brand-strong: #123329;
  --accent: #b68b43;
  --accent-soft: #f3ead9;
  --danger-soft: #f7ece8;
  --shadow: 0 18px 50px rgba(26, 42, 34, 0.09);
  --radius: 8px;
  --radius-lg: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-header,
main,
.site-footer {
  width: min(1120px, calc(100% - 28px));
  margin-inline: auto;
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 168px;
  height: auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.top-nav a,
.card-actions a,
.primary-link,
.site-footer a {
  text-decoration: none;
}

.top-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.94rem;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  background: var(--paper-soft);
  color: var(--ink);
}

.top-nav .nav-action {
  color: #fff;
  background: var(--brand);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: 28px 0 18px;
}

.hero-copy,
.search-panel,
.notice-strip,
.obituary-card,
.side-panel,
.profile-preview,
.condolence-card,
.person-hero,
.detail-content,
.ceremony-detail {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 26px;
  background:
    linear-gradient(120deg, rgba(33, 72, 59, 0.08), rgba(255, 255, 255, 0) 42%),
    var(--paper);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.15;
}

h1 {
  max-width: 820px;
  margin-bottom: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 7vw, 4.15rem);
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

h3 {
  margin-bottom: 4px;
  font-size: 1.28rem;
}

.lead {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
}

label {
  display: grid;
  gap: 6px;
}

label span,
.ceremony-box span,
.ceremony-grid span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
textarea,
button {
  width: 100%;
  font: inherit;
  border-radius: var(--radius);
}

input,
textarea {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  padding: 13px 14px;
}

input {
  min-height: 48px;
}

textarea {
  resize: vertical;
}

button,
.primary-link {
  min-height: 48px;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  background: var(--brand);
  font-weight: 700;
  cursor: pointer;
}

button:hover,
button:focus-visible,
.primary-link:hover,
.primary-link:focus-visible {
  background: var(--brand-strong);
}

.notice-strip {
  display: grid;
  gap: 1px;
  overflow: hidden;
  padding: 0;
  background: var(--line);
}

.notice-strip div {
  display: grid;
  gap: 3px;
  padding: 16px;
  background: var(--paper);
}

.notice-strip strong {
  color: var(--brand-strong);
}

.notice-strip span,
.side-panel p,
.profile-preview p,
.condolence-card p,
.life-dates,
.obituary-text p {
  color: var(--muted);
}

.layout,
.detail-layout {
  display: grid;
  gap: 18px;
  margin-top: 18px;
}

.section-heading {
  margin-bottom: 12px;
}

.obituary-list {
  display: grid;
  gap: 12px;
}

.obituary-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.person-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  letter-spacing: 0.04em;
}

.person-mark.large {
  width: 76px;
  height: 76px;
  font-size: 1.35rem;
}

.source {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
}

.life-dates {
  margin-bottom: 12px;
}

.ceremony-box,
.ceremony-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
}

.ceremony-box div,
.ceremony-grid div {
  display: grid;
  gap: 2px;
}

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

.card-actions a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 700;
}

.side-panel,
.condolence-card,
.detail-content,
.ceremony-detail {
  padding: 18px;
}

.check-list {
  display: grid;
  gap: 8px;
  margin: 16px 0;
  padding-left: 20px;
}

.primary-link {
  border-radius: var(--radius);
}

.primary-link.muted {
  color: var(--brand);
  background: var(--accent-soft);
}

.profile-preview {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  padding: 18px;
}

.condolence-card form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.site-footer {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
}

.site-footer span {
  margin-right: auto;
  color: var(--ink);
  font-weight: 800;
}

.detail-page {
  padding-top: 18px;
}

.person-hero {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
}

.detail-content {
  display: grid;
  gap: 16px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.obituary-text {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    align-items: stretch;
  }

  .search-panel {
    align-content: end;
  }

  .notice-strip {
    grid-template-columns: repeat(3, 1fr);
  }

  .layout,
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }

  .profile-preview {
    grid-template-columns: minmax(0, 1fr) 390px;
    align-items: start;
  }
}

@media (min-width: 980px) {
  .search-panel {
    grid-column: 2;
    grid-row: 1;
  }

  .hero-copy {
    min-height: 340px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .top-nav {
    justify-content: flex-start;
  }

  .top-nav a {
    min-height: 38px;
    padding-inline: 10px;
  }

  .hero {
    padding-top: 8px;
  }

  .hero-copy,
  .search-panel,
  .notice-strip,
  .obituary-card,
  .side-panel,
  .profile-preview,
  .condolence-card,
  .person-hero,
  .ceremony-detail,
  .obituary-text {
    border-radius: 10px;
  }

  .obituary-card {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .person-mark {
    width: 46px;
    height: 46px;
  }
}
