:root {
  color-scheme: light;
  --ink: #182127;
  --muted: #687177;
  --line: #d9dfdf;
  --paper: #ffffff;
  --page: #f4f6f5;
  --green: #233c2b;
  --green-2: #2f6348;
  --red: #b4332d;
  --gold: #b88a42;
  --soft-green: #eef4ef;
  --soft-gold: #f6f0e5;
  --shadow: 0 12px 30px rgba(24, 33, 39, 0.08);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
body.app-body { background: #eef1f0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
img { max-width: 100%; }
[hidden], .is-hidden { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.app-body:not(.is-authenticated) [data-auth-required] { display: none; }
.app-body.is-authenticated [data-auth-entry] { display: none; }
.app-body.is-authenticated:not(.show-workspace) [data-auth-required] { display: none; }
.app-body.show-workspace [data-guest-only] { display: none; }
.section, .content-band, .service-grid article, .steps-grid article, .price-card, .addon-grid article {
  content-visibility: auto;
  contain-intrinsic-size: 1px 520px;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  padding: 26px clamp(18px, 4vw, 64px) 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.brand { order: 1; display: block; flex: 0 0 auto; }
.brand-logo { display: block; width: 56px; height: 56px; object-fit: contain; }
.nav { order: 4; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.nav a, .nav button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 0;
  border-radius: 6px;
  color: #4c565b;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); background: #fff2f0; }
.nav .nav-action { color: #fff; background: var(--green); }
.nav .nav-action:hover { color: #fff; background: var(--green-2); }
.nav-logout { border: 1px solid var(--line) !important; }
.utility-link { color: var(--muted) !important; font-size: 14px !important; }
.nav .utility-link[aria-current="page"] { color: var(--red) !important; background: #fff2f0; }
.site-summary-bar {
  width: min(1180px, calc(100% - 40px));
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin: 18px auto 0;
  padding: 14px 0;
  color: var(--green);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}
.site-summary-bar strong {
  color: var(--red);
  font-size: 1.4em;
  font-weight: 900;
}
.site-summary-bar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  color: #fff;
  background: var(--red);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
.site-summary-bar a:hover { background: #982924; }

.site-hero {
  position: relative;
  width: min(1180px, calc(100% - 40px));
  min-height: min(440px, calc(100vh - 68px));
  display: flex;
  align-items: center;
  margin: 18px auto 0;
  padding: clamp(30px, 5vw, 58px) clamp(20px, 7vw, 100px);
  overflow: hidden;
  background: var(--green);
}
.site-hero > .site-summary-bar {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: clamp(20px, 7vw, 100px);
  width: auto;
  min-height: 50px;
  margin: 0;
  padding: 0;
  justify-content: flex-start;
  gap: 18px;
  color: rgba(255, 255, 255, .94);
  font-size: clamp(24px, 2.6vw, 34px);
  text-align: left;
}
.site-hero > .site-summary-bar strong { color: #f1c879; }
.site-hero > .site-summary-bar a {
  min-height: 42px;
  padding: 0 18px;
  font-size: 17px;
}
.site-hero::before {
  display: none;
}
.site-hero::after {
  content: "";
  position: absolute;
  left: clamp(20px, 7vw, 100px);
  bottom: clamp(24px, 4vw, 42px);
  width: min(420px, 42vw);
  height: 1px;
  background: linear-gradient(90deg, rgba(211, 178, 103, .9), rgba(211, 178, 103, 0));
}
.site-hero-copy {
  position: relative;
  width: min(620px, 100%);
  margin-top: 42px;
  color: #fff;
  z-index: 1;
}
.site-hero h1 {
  margin: 0 0 18px;
  max-width: 620px;
  color: rgba(255, 255, 255, .96);
  font-size: clamp(34px, 3.8vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .36);
}
.site-hero h1 span {
  display: block;
  white-space: nowrap;
}
.hero-lines {
  display: grid;
  gap: 8px;
  margin: 0;
  color: rgba(255, 255, 255, .90);
  font-size: clamp(17px, 1.72vw, 21px);
  font-weight: 700;
  line-height: 1.55;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .38);
}
.hero-lines span {
  display: block;
  white-space: nowrap;
}
.site-hero-copy > p:not(.eyebrow) { max-width: 680px; margin: 0; font-size: 19px; line-height: 1.8; color: rgba(255,255,255,.88); }
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: 13px; font-weight: 800; }
.site-hero .eyebrow { color: #f1c879; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.site-hero .button {
  min-height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.site-hero .button.primary {
  border-color: rgba(190, 42, 37, .92);
  background: rgba(190, 42, 37, .92);
}
.site-hero .button.secondary {
  border-color: rgba(255, 255, 255, .72);
  background: rgba(255, 255, 255, .90);
  color: var(--green);
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}
.button.primary { color: #fff; background: var(--red); }
.button.secondary { color: var(--green); background: #fff; border-color: var(--line); }
.button.ghost { color: var(--green); background: transparent; border-color: #cbd4d0; }
.button.full { width: 100%; }

.section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 72px 0; }
.section-heading { max-width: 760px; margin-bottom: 28px; }
.section-heading.compact { margin-bottom: 18px; }
.section-heading h1, .section-heading h2, .section-heading h3 { margin: 0; line-height: 1.2; letter-spacing: 0; }
.section-heading h2 { font-size: clamp(30px, 4vw, 46px); }
.section-heading h3 { font-size: 25px; }
.section-heading p:not(.eyebrow) { margin: 14px 0 0; color: var(--muted); line-height: 1.8; }
.content-band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.service-grid, .steps-grid, .about-grid, .price-grid, .addon-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.service-card, .step-card, .about-card, .price-card, .addon-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.service-card:hover { border-color: #afbbb6; box-shadow: var(--shadow); }
.service-card strong, .step-card > span { color: var(--red); font-size: 13px; }
.service-card h3, .step-card h3, .about-card h3, .price-card h3, .addon-card h3 { margin: 12px 0 8px; font-size: 22px; }
.service-card p, .step-card p, .about-card p, .price-card p, .addon-card p { margin: 0; color: var(--muted); line-height: 1.7; }
.home-start {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 310px;
}
.home-start-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: none;
  min-height: 100%;
  text-align: center;
}
.home-start > .home-start-copy {
  flex: 0 0 100%;
  inline-size: 100%;
  max-inline-size: 100%;
}
.home-start-copy h2,
.memory-film-section h2,
.global-roots-section h2 {
  margin: 0;
  color: var(--green);
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
  letter-spacing: 0;
}
.home-start-copy h2 {
  width: 100%;
  max-width: 100%;
  font-size: clamp(15px, 4vw, 54px);
  text-align: center;
  white-space: nowrap;
}
.home-start-copy p:not(.eyebrow),
.global-roots-head p:not(.eyebrow) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}
.home-start-copy p.home-start-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  margin: 28px auto 0;
  color: var(--green);
  font-size: clamp(23px, 2.8vw, 34px);
  line-height: 1.45;
  font-weight: 900;
  text-align: center;
}
.home-start-copy p.home-start-stats strong {
  color: var(--red);
  font-size: 1.25em;
  font-weight: 900;
}
.home-start-copy p.home-start-stats a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: #fff;
  background: var(--green);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}
.home-start-copy p.home-start-stats a:hover { background: var(--green-2); }
.home-start-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.home-start-points span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #d3ded7;
  border-radius: 999px;
  color: var(--green);
  background: var(--soft-green);
  font-size: 14px;
  font-weight: 900;
}
.home-register-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  border: 1px solid #d7dfd9;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(24, 33, 39, .10);
}
.home-register-card strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1.25;
}
.home-register-card label {
  display: grid;
  gap: 7px;
}
.home-register-card label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.home-register-card input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfcfb;
}
.starter-family-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.starter-child-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
}
.starter-child-row select {
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fbfcfb;
}
.home-register-card input:focus {
  border-color: var(--green-2);
  outline: 3px solid rgba(47, 99, 72, .14);
}
.home-register-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.starter-relatives-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d3ded7;
  border-radius: 8px;
  background: var(--soft-green);
}
.starter-relatives-card strong {
  color: var(--green);
  font-size: 14px;
}
.starter-relatives-card div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.starter-relatives-card span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--green);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}
.memory-film-section {
  padding-top: 34px;
}
.memory-film-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.memory-film-grid article {
  min-width: 0;
  min-height: 220px;
  padding: 24px;
  border: 1px solid rgba(185, 154, 106, .45);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(246, 240, 229, .86), rgba(255, 255, 255, .94)),
    #fff;
}
.memory-film-grid span {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.memory-film-grid h3 {
  margin: 12px 0 8px;
  color: var(--green);
  font-size: 23px;
}
.memory-film-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.memory-video-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid rgba(185, 154, 106, .45);
  border-radius: 8px;
  background: rgba(255, 252, 246, .92);
}
.memory-video-card iframe,
.memory-video-card .memory-aliyun-player,
.memory-video-card .memory-video-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 260px;
  border: 0;
  border-radius: 6px;
  background: #111;
  object-fit: cover;
  overflow: hidden;
}
.memory-video-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 260px;
  border-radius: 6px;
  background: #111;
  overflow: hidden;
}
.memory-video-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.memory-video-cover::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(142, 38, 42, .9);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .24);
  transform: translate(-50%, -50%);
}
.memory-video-cover::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  border-left: 18px solid #fff;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  transform: translate(-38%, -50%);
}
.memory-video-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  margin: 0 !important;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 246, .92);
}
.memory-video-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.memory-video-card strong {
  display: block;
  color: var(--green);
  font-size: 19px;
}
.memory-video-card p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.75;
}
.memory-video-card a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}
.memory-film-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.global-roots-section {
  padding-top: 34px;
}
.global-roots-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 20px;
  margin-bottom: 24px;
}
.global-roots-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.global-roots-grid a {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  min-height: 210px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.global-roots-grid a:hover {
  border-color: #afbbb6;
  box-shadow: var(--shadow);
}
.global-roots-grid strong {
  color: var(--green);
  font-size: 21px;
  line-height: 1.3;
}
.global-roots-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.72;
}
.global-roots-grid span {
  color: var(--red);
  font-weight: 900;
}
.popular-surname-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
.popular-surname-links strong {
  margin-right: 4px;
  color: var(--green);
  font-size: 15px;
}
.popular-surname-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}
.popular-surname-links a:hover {
  border-color: var(--red);
  color: var(--red);
}
.site-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.site-stats div {
  min-width: 170px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.site-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.site-stats strong {
  color: var(--red);
  font-size: 28px;
  line-height: 1;
}
.site-stats em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}
.section > .site-stats { display: none; }
.topbar-slogan {
  order: 2;
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
}
.topbar-stats {
  order: 3;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}
.topbar-stats div {
  display: flex;
  align-items: baseline;
  gap: 5px;
  min-width: auto;
  padding: 7px 10px;
  border-color: #e7ddcf;
  background: #fffaf3;
}
.topbar-stats span, .topbar-stats em { font-size: 12px; }
.topbar-stats strong { font-size: 20px; }
.topbar-stats i {
  display: block;
  width: 1px;
  height: 18px;
  margin: 0 6px;
  background: #e7ddcf;
}
.language-switch {
  position: absolute;
  top: 5px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
}
.language-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}
.language-switch a:hover,
.language-switch a[aria-current="true"] {
  color: #fff;
  background: var(--green);
}
.steps-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.platform-note {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 28px;
  border-left: 4px solid var(--gold);
  background: var(--soft-gold);
}
.platform-note h2 { margin: 0 0 8px; font-size: 28px; }
.platform-note p { margin: 0; color: var(--muted); line-height: 1.7; }

.guestbook-section { padding-top: 20px; }
.guestbook-layout {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.guestbook-form,
.guestbook-item,
.guestbook-empty {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}
.guestbook-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 20px;
}
.guestbook-form label { display: grid; gap: 7px; }
.guestbook-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.guestbook-full,
.guestbook-actions { grid-column: 1 / -1; }
.guestbook-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}
.guestbook-actions .form-status { margin: 0; }
.guestbook-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.guestbook-item {
  padding: 18px;
  min-height: 132px;
}
.guestbook-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.8;
}
.guestbook-reply {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--green-2);
  background: var(--soft-green);
}
.guestbook-reply strong {
  display: block;
  margin-bottom: 5px;
  color: var(--green);
  font-size: 13px;
}
.guestbook-reply p {
  color: #34423a;
  font-size: 14px;
}
.guestbook-reply span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}
.guestbook-item footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}
.guestbook-item strong { color: var(--green); }
.guestbook-empty {
  grid-column: 1 / -1;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.surname-hero,
.surname-detail-hero {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 28px;
}
.surname-hero h1,
.surname-detail-hero h1 {
  margin: 0;
  font-size: clamp(40px, 5.2vw, 66px);
  line-height: 1.08;
  letter-spacing: 0;
}
.surname-title-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: center;
}
.surname-title-row h1 {
  flex: 0 1 auto;
}
.surname-detail-title {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: baseline;
}
.surname-hero > p,
.surname-detail-hero > p {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}
.surname-count {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
}
.surname-count strong {
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}
.surname-count-inline {
  margin-top: 0;
  padding: 7px 12px;
  white-space: nowrap;
}
.surname-count-inline strong {
  font-size: 25px;
}
.surname-ranking-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
  border: 1px solid rgba(200, 22, 29, .18);
  border-radius: 999px;
  background: #fff2f0;
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}
.surname-ranking-link:hover {
  color: #fff;
  background: var(--red);
}
.surname-search {
  max-width: 720px;
  margin-top: 24px;
}
.surname-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
  outline: none;
}
.surname-search input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(47, 99, 72, .12);
}
.surname-search-hint {
  min-height: 22px;
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 14px;
}
.surname-search-results {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}
.surname-ranking {
  width: min(960px, 100%);
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.surname-ranking-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 14px;
}
.surname-ranking-head h2 {
  margin: 0 0 6px;
  font-size: 26px;
}
.surname-ranking-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.surname-ranking-head a {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 14px;
  font-weight: 900;
}
.surname-ranking-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.surname-ranking-list a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  align-items: baseline;
  padding: 10px 12px;
  border: 1px solid rgba(31, 23, 16, .08);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
}
.surname-ranking-list a:hover {
  border-color: rgba(200, 22, 29, .26);
  background: #fff7f2;
}
.surname-ranking-rank {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}
.surname-ranking-list strong {
  color: var(--red);
  font-size: 21px;
}
.surname-ranking-list em {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.surname-ranking-list small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.surname-ranking-page {
  padding-top: 12px;
}
.surname-ranking-hero .button {
  margin-top: 20px;
}
.surname-ranking-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  margin: 22px 0 12px;
}
.surname-ranking-search {
  flex: 1 1 360px;
  max-width: 520px;
}
.surname-ranking-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  outline: none;
}
.surname-ranking-search input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 3px rgba(47, 99, 72, .12);
}
.surname-ranking-status {
  min-height: 22px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}
.surname-ranking-page-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.surname-ranking-page-list > a[hidden] {
  display: none;
}
.surname-database-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.surname-database-tabs a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}
.surname-database-tabs a:hover,
.surname-database-tabs a[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.surname-quick-panel {
  padding-top: 8px;
}
.surname-quick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-quick-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--soft-gold);
  color: var(--ink);
}
.surname-quick-list strong {
  color: var(--red);
  font-size: 20px;
  line-height: 1;
}
.surname-quick-list span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.surname-region-entry {
  padding-top: 28px;
}
.surname-region-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.surname-region-grid a {
  min-width: 0;
  min-height: 150px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.surname-region-grid a:hover {
  border-color: #cdb8a3;
  box-shadow: var(--shadow);
}
.surname-region-grid strong {
  color: var(--green);
  font-size: 19px;
  line-height: 1.35;
}
.surname-region-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.surname-region-grid span,
.surname-region-more a {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.surname-region-more {
  margin-top: 14px;
}
.surname-library {
  padding-top: 22px;
}
.surname-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.surname-letter-nav,
.surname-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.surname-letter-nav {
  align-items: center;
  padding: 14px 16px;
  margin: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}
.surname-pagination {
  justify-content: center;
  padding-top: 26px;
  margin: 34px 0 0;
  border-top: 1px solid var(--line);
}
.surname-letter-nav a,
.surname-pagination a {
  min-width: 36px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.surname-letter-nav a:hover,
.surname-letter-nav a[aria-current="page"],
.surname-pagination a:hover,
.surname-pagination a[aria-current="page"] {
  color: #fff;
  border-color: var(--green);
  background: var(--green);
}
.surname-card {
  min-height: 160px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-card:hover {
  border-color: #afbbb6;
  box-shadow: var(--shadow);
}
.surname-card-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.surname-card strong {
  color: var(--red);
  font-size: 42px;
  line-height: 1;
}
.surname-card-title b {
  color: var(--red);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
}
.surname-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
}
.surname-card em {
  color: var(--ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}
.surname-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}
.surname-back {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--muted);
  font-weight: 800;
}
.surname-detail-stats {
  display: inline-flex;
  margin-top: 0;
  color: var(--green);
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 800;
  line-height: 1.25;
}
.surname-profile {
  padding-top: 8px;
  padding-bottom: 0;
}
.surname-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.surname-profile-grid div {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-profile-grid span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.surname-profile-grid strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.55;
}
.surname-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 20px;
}
.surname-detail article {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-detail h2 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.25;
}
.surname-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}
.surname-material-article {
  grid-column: 1 / -1;
  display: grid;
  gap: 18px;
  padding: 28px !important;
  background:
    linear-gradient(135deg, rgba(238, 244, 239, .9), rgba(246, 240, 229, .62)),
    #fff !important;
}
.surname-material-article > h2 {
  margin-bottom: 0;
  color: var(--green);
  font-size: clamp(30px, 4vw, 42px);
}
.surname-material-article > p {
  max-width: 920px;
  font-size: 17px;
}
.surname-service {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 22px;
  align-items: center;
  border-left: 4px solid var(--gold) !important;
  background: var(--soft-gold) !important;
}
.surname-service h2,
.surname-service p {
  grid-column: 1;
}
.surname-service .button {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 38px;
  align-self: center;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  white-space: nowrap;
}
.surname-related {
  padding-top: 8px;
}
.surname-related-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.surname-related-grid a {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}
.surname-related-grid a:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
}
.surname-research-link-grid a {
  min-height: 118px;
  align-items: flex-start;
  justify-content: flex-start;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.surname-research-link-grid strong,
.surname-research-link-grid span,
.surname-research-link-grid em {
  display: block;
}
.surname-research-link-grid strong {
  color: var(--green);
  font-size: 18px;
  line-height: 1.25;
}
.surname-research-link-grid span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}
.surname-research-link-grid em {
  margin-top: auto;
  color: var(--red);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.pedigree-promo {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 72px;
}
.pedigree-promo-copy {
  width: 100%;
  max-width: 100%;
  margin-bottom: 34px;
}
.pedigree-promo-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-bottom: 16px;
}
.pedigree-promo-copy h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.15;
  letter-spacing: 0;
}
.pedigree-promo-heading .button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.pedigree-promo-copy p {
  max-width: 920px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}
.pedigree-promo-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.pedigree-promo-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.pedigree-promo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #eef1f0;
}
.pedigree-promo-text {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 18px;
}
.pedigree-promo-index {
  color: var(--red);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.1;
}
.pedigree-promo-text h2 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}
.pedigree-promo-text p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}
.pedigree-seo {
  padding-top: 32px;
}
.pedigree-feature-grid,
.pedigree-process,
.pedigree-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.pedigree-feature-grid article,
.pedigree-process article,
.pedigree-service-list article,
.pedigree-faq details {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pedigree-feature-grid h3,
.pedigree-process h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.25;
}
.pedigree-feature-grid p,
.pedigree-process p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.pedigree-service-list {
  display: grid;
  gap: 10px;
}
.pedigree-service-list article {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.pedigree-service-list strong,
.pedigree-process span {
  color: var(--red);
  font-weight: 900;
}
.pedigree-service-list span {
  color: var(--muted);
  line-height: 1.7;
}
.pedigree-service-link {
  width: min(1180px, calc(100% - 40px));
  margin: 8px auto 24px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.pedigree-service-link div {
  display: grid;
  gap: 5px;
}
.pedigree-service-link strong {
  color: var(--green);
  font-size: 18px;
  line-height: 1.35;
}
.pedigree-service-link span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.pedigree-service-link .button {
  flex: 0 0 auto;
}
.pedigree-audience-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.pedigree-audience-grid span,
.pedigree-topic-grid a {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.45;
}
.pedigree-process {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.pedigree-process article {
  padding: 18px;
}
.pedigree-process h3 {
  margin-top: 8px;
  font-size: 19px;
}
.pedigree-faq {
  display: grid;
  gap: 10px;
}
.pedigree-faq summary {
  color: var(--green);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.pedigree-faq p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}
.pedigree-faq-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 18px;
}
.pedigree-faq-pager button {
  min-width: 92px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-weight: 900;
}
.pedigree-faq-pager button:disabled {
  cursor: not-allowed;
  opacity: .45;
}
.pedigree-faq-pager span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}
.pedigree-topic-grid a:hover {
  color: var(--red);
  border-color: #cdb8a3;
  box-shadow: var(--shadow);
}

.sub-hero {
  padding: 64px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.sub-hero h1 { margin: 6px 0 12px; font-size: clamp(36px, 5vw, 58px); letter-spacing: 0; }
.sub-hero p:not(.eyebrow) { max-width: 720px; margin: 0; color: var(--muted); font-size: 18px; line-height: 1.8; }

.genealogy-hero {
  background:
    linear-gradient(90deg, rgba(249, 247, 239, .96), rgba(249, 247, 239, .78)),
    radial-gradient(circle at right top, rgba(179, 40, 36, .08), transparent 38%);
}
.genealogy-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.genealogy-category-grid a {
  min-width: 0;
  min-height: 188px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.genealogy-category-grid a:hover,
.genealogy-list a:hover {
  border-color: #cdb8a3;
  box-shadow: var(--shadow);
}
.genealogy-category-grid strong {
  color: var(--green);
  font-size: 24px;
  line-height: 1.25;
}
.genealogy-category-grid span {
  color: var(--red);
  font-weight: 900;
}
.genealogy-category-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.genealogy-books-panel {
  display: grid;
  gap: 18px;
}
.genealogy-library-panel {
  align-items: start;
}
.genealogy-books-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: end;
}
.genealogy-books-toolbar strong { color: var(--red); }
.genealogy-books-search {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.genealogy-books-search input {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.genealogy-library-search {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-library-search label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-library-search input,
.genealogy-library-search select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 11px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
}
.genealogy-library-search-actions {
  display: flex;
  gap: 8px;
  align-items: end;
}
.genealogy-library-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.genealogy-library-facets {
  display: grid;
  gap: 12px;
}
.genealogy-library-found,
.genealogy-library-facets section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-library-found {
  display: grid;
  gap: 4px;
  padding: 18px;
}
.genealogy-library-found strong {
  color: var(--red);
  font-size: 30px;
  line-height: 1;
}
.genealogy-library-found span,
.genealogy-library-facets p {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-library-facets section {
  padding: 12px;
}
.genealogy-library-facets section > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.genealogy-library-facets strong {
  color: var(--green);
  font-size: 15px;
}
.genealogy-library-facets button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}
.genealogy-library-facets ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.genealogy-library-facets li button:hover {
  color: var(--red);
}
.genealogy-library-results {
  min-width: 0;
  display: grid;
  gap: 12px;
}
.genealogy-library-result-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-library-result-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}
.genealogy-library-result-head strong {
  color: var(--red);
}
.genealogy-library-view-tabs {
  display: inline-flex;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.genealogy-library-view-tabs button {
  min-height: 32px;
  min-width: 58px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #eef1ee;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.genealogy-library-view-tabs button:last-child { border-right: 0; }
.genealogy-library-view-tabs button.is-active {
  background: var(--green);
  color: #fff;
}
.genealogy-books-status {
  margin: 0;
  color: var(--red);
  font-weight: 800;
}
.genealogy-book-list { display: grid; gap: 14px; }
.genealogy-book-list.is-gallery-view {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.genealogy-book-card,
.genealogy-book-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-book-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.genealogy-book-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.genealogy-book-main h2 {
  margin: 4px 0 8px;
  color: var(--green);
  font-size: clamp(24px, 3vw, 34px);
}
.genealogy-book-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.genealogy-book-tags span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcfb;
  color: #3f4f45;
  font-size: 12px;
  font-weight: 900;
}
.genealogy-book-meta {
  min-width: 96px;
  display: grid;
  justify-items: end;
  color: var(--muted);
}
.genealogy-book-meta strong {
  color: var(--red);
  font-size: 34px;
  line-height: 1;
}
.genealogy-book-meta span,
.genealogy-book-meta em {
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.genealogy-book-desc {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.genealogy-book-files {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.genealogy-book-files a {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfb;
  color: var(--ink);
  text-decoration: none;
}
.genealogy-book-files a:hover {
  border-color: var(--green-2);
  background: var(--soft-green);
}
.genealogy-book-files span { font-weight: 900; }
.genealogy-book-files em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.genealogy-book-progress,
.genealogy-book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.genealogy-book-progress span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft-gold);
  color: #5f4631;
  font-size: 12px;
  font-weight: 900;
}
.genealogy-book-progress.is-large span {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}
.genealogy-book-detail-actions { margin-top: 18px; }
.genealogy-book-detail-panel,
.genealogy-book-detail {
  display: grid;
  gap: 18px;
}
.genealogy-book-detail-card { gap: 16px; }
.genealogy-seo-hero {
  width: min(100% - 40px, 1120px);
}
.genealogy-seo-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.genealogy-seo-stats article,
.genealogy-seo-layout section,
.genealogy-seo-detail article,
.genealogy-index-grid article,
.genealogy-index-grid a,
.genealogy-ocr-text {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-seo-stats article {
  display: grid;
  gap: 6px;
  padding: 18px;
}
.genealogy-seo-stats strong {
  color: var(--red);
  font-size: 30px;
  line-height: 1;
}
.genealogy-seo-stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.genealogy-seo-layout,
.genealogy-seo-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.genealogy-seo-layout section,
.genealogy-seo-detail article {
  padding: 20px;
}
.genealogy-seo-layout h2,
.genealogy-seo-detail h2,
.genealogy-seo-list h2 {
  margin: 0 0 14px;
  color: var(--green);
  font-size: 24px;
}
.genealogy-index-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.genealogy-index-grid a,
.genealogy-index-grid article {
  display: grid;
  gap: 8px;
  padding: 14px;
  color: var(--ink);
  text-decoration: none;
}
.genealogy-index-grid a:hover {
  border-color: var(--green-2);
  background: var(--soft-green);
}
.genealogy-index-grid strong {
  color: var(--green);
  font-size: 17px;
}
.genealogy-index-grid p,
.genealogy-seo-detail p,
.genealogy-ocr-text p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.genealogy-seo-list {
  display: grid;
  gap: 12px;
}
.genealogy-seo-list > a {
  min-height: 62px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.genealogy-seo-list > a:hover {
  border-color: var(--green-2);
  background: var(--soft-green);
}
.genealogy-seo-list > a strong {
  color: var(--green);
  font-size: 18px;
}
.genealogy-seo-list > a span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}
.genealogy-seo-detail dl {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}
.genealogy-seo-detail dt {
  color: var(--muted);
  font-weight: 900;
}
.genealogy-seo-detail dd {
  margin: 0;
  color: var(--ink);
}
.genealogy-seo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.genealogy-ocr-text {
  padding: 22px;
}
.genealogy-ocr-text p + p {
  margin-top: 12px;
}
.genealogy-pdf-reader {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.nlc-style-reader {
  min-height: 72vh;
  background: #f8f8f4;
}
.genealogy-pdf-reader-head,
.genealogy-pdf-toolbar,
.genealogy-pdf-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.genealogy-pdf-reader-head span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-reader-format,
.genealogy-volume-format {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-pdf-reader-head strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 20px;
}
.genealogy-reader-workspace {
  height: min(820px, calc(100vh - 210px));
  min-height: 560px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.genealogy-reader-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: #fbfaf6;
}
.nlc-style-reader.is-sidebar-hidden .genealogy-reader-sidebar {
  display: none;
}
.nlc-style-reader.is-sidebar-hidden .genealogy-reader-workspace {
  grid-template-columns: 1fr;
}
.genealogy-reader-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
.genealogy-reader-tabs button {
  min-height: 44px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f0ede5;
  color: var(--muted);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.genealogy-reader-tabs button:last-child { border-right: 0; }
.genealogy-reader-tabs button.is-active {
  background: #fff;
  color: var(--green);
}
.genealogy-reader-side-list {
  overflow: auto;
  padding: 10px;
}
.genealogy-reader-side-item {
  width: 100%;
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.genealogy-reader-side-item:hover,
.genealogy-reader-side-item.is-current {
  border-color: var(--line);
  background: #fff;
}
.genealogy-reader-side-item strong {
  font-size: 14px;
  color: var(--green);
}
.genealogy-reader-side-item span,
.genealogy-reader-side-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.genealogy-reader-side-empty {
  padding: 14px;
  line-height: 1.7;
}
.genealogy-reader-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #f4f1ea;
}
.genealogy-pdf-toolbar label,
.genealogy-pdf-page-input {
  display: inline-grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-pdf-toolbar {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.genealogy-pdf-controls .button,
.genealogy-pdf-toolbar .button {
  min-height: 38px;
  padding: 0 12px;
}
.genealogy-pdf-toolbar select,
.genealogy-pdf-toolbar input {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 10px;
  background: #fbfcfb;
  color: var(--ink);
  font: inherit;
}
.genealogy-pdf-toolbar select { min-width: min(420px, 78vw); }
.genealogy-pdf-page-input input { width: 78px; }
.genealogy-pdf-status {
  min-height: 20px;
  margin: 0;
  padding: 8px 12px 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}
.genealogy-reader-stage {
  min-height: 0;
  position: relative;
  display: block;
  overflow: hidden;
}
.genealogy-pdf-canvas-wrap {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  max-height: none;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 62px;
  border: 0;
  border-radius: 0;
  background: #f4f1ea;
}
.genealogy-pdf-canvas-wrap canvas {
  max-width: none;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 39, 32, 0.16);
}
.genealogy-pdf-canvas-wrap img {
  width: auto;
  max-width: 100%;
  height: auto;
  background: #fff;
  box-shadow: 0 10px 24px rgba(28, 39, 32, 0.16);
}
.genealogy-pdf-canvas-wrap img.is-fit-screen {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.genealogy-pdf-canvas-wrap img.is-zoomed {
  max-width: none;
  max-height: none;
}
.genealogy-pdf-canvas-wrap.is-fit-screen {
  overflow: hidden;
}
.genealogy-pdf-canvas-wrap.is-zoomed {
  overflow: auto;
  justify-content: flex-start;
  align-items: flex-start;
}
.genealogy-reader-arrow {
  position: absolute;
  z-index: 2;
  top: 50%;
  width: 42px;
  height: 68px;
  transform: translateY(-50%);
  border: 1px solid rgba(31, 52, 41, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--green);
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(28, 39, 32, 0.12);
}
.genealogy-reader-arrow:hover {
  background: #fff;
  border-color: var(--green-2);
}
.genealogy-reader-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.genealogy-reader-arrow.is-prev { left: 12px; }
.genealogy-reader-arrow.is-next { right: 12px; }
.nlc-style-reader:fullscreen {
  width: 100vw;
  height: 100vh;
  padding: 12px;
  border: 0;
  border-radius: 0;
}
.nlc-style-reader:fullscreen .genealogy-reader-workspace {
  height: calc(100vh - 88px);
  min-height: 0;
}
.genealogy-volume-section {
  display: grid;
  gap: 14px;
}
.genealogy-volume-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.genealogy-volume-list article {
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-volume-list span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-volume-list strong {
  display: block;
  margin-top: 3px;
  color: var(--green);
  font-size: 18px;
}
.genealogy-volume-list p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}
.genealogy-volume-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.genealogy-volume-list .button {
  grid-column: 1 / -1;
  justify-self: start;
}
.genealogy-processing-plan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.genealogy-processing-plan div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-processing-plan span {
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.genealogy-processing-plan strong {
  display: block;
  margin: 5px 0;
  color: var(--green);
  font-size: 18px;
}
.genealogy-processing-plan p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.genealogy-book-empty {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  font-weight: 900;
}
.genealogy-library-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-library-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}
.genealogy-library-table th,
.genealogy-library-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  text-align: left;
  white-space: nowrap;
}
.genealogy-library-table th {
  background: #f7f4ee;
  color: var(--green);
  font-weight: 900;
}
.genealogy-library-table td:first-child,
.genealogy-library-table th:first-child {
  min-width: 220px;
}
.genealogy-library-table a {
  color: var(--green);
  font-weight: 900;
  text-decoration: none;
}
.genealogy-library-table tr:last-child td {
  border-bottom: 0;
}
.genealogy-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.genealogy-list a {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}
.genealogy-list strong {
  min-width: 0;
  font-size: 17px;
  line-height: 1.45;
}
.genealogy-list span {
  flex: 0 0 auto;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}
.genealogy-article {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.genealogy-article article,
.genealogy-cta {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.genealogy-article h2,
.genealogy-cta h2 {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 24px;
  line-height: 1.3;
}
.genealogy-article p,
.genealogy-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.85;
}
.genealogy-cta {
  grid-column: 1 / -1;
  background: var(--soft-gold);
}
.genealogy-cta .button {
  margin-top: 18px;
}

.growth-hero {
  background:
    linear-gradient(135deg, rgba(238, 244, 239, .95), rgba(246, 240, 229, .82)),
    var(--paper);
}
.growth-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.growth-card,
.growth-article article,
.growth-cta {
  display: grid;
  gap: 10px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.growth-card strong,
.growth-article h2,
.growth-cta h2 {
  margin: 0;
  color: var(--green);
  font-size: 20px;
  line-height: 1.35;
}
.growth-card p,
.growth-article p,
.growth-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}
.growth-card span {
  color: var(--red);
  font-weight: 800;
}
.growth-article {
  display: grid;
  gap: 16px;
}
.growth-cta {
  background: var(--soft-gold);
}
.growth-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.growth-link-row a {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--green);
  font-weight: 800;
}
.region-research-hero h1 {
  max-width: 880px;
}
.region-data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.region-data-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.region-data-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.region-data-card strong {
  color: var(--red);
  font-size: 28px;
}
.region-data-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.region-research .region-rank-table-wrap {
  overflow-x: auto;
}
.region-rank-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.region-rank-table th,
.region-rank-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}
.region-rank-table th {
  color: var(--green);
  background: var(--soft-green);
}
.region-rank-table td:first-child {
  color: var(--red);
  font-weight: 900;
}
.region-rank-table td:nth-child(2) {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}
.region-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.region-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.region-timeline div {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.region-timeline span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft-gold);
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
}
.region-timeline strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
  font-size: 18px;
}
.region-timeline p {
  margin: 0;
}
.region-route-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.region-route-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}
.region-culture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.region-culture-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #fff, var(--soft-green));
}
.region-culture-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}
.region-culture-grid p {
  margin: 0;
}
.region-check-list,
.region-source-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.85;
}
.region-check-list strong {
  color: var(--green);
}
.region-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.region-keyword-cloud span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 800;
}
.region-source-list a {
  color: var(--green);
  font-weight: 800;
}
.region-topic-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.region-topic-links a {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.region-topic-links strong {
  color: var(--green);
}
.region-topic-links span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.surname-research-hero h1 {
  font-size: clamp(44px, 8vw, 86px);
}
.surname-research-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.surname-research-grid article {
  display: grid;
  gap: 8px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}
.surname-research-grid span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.surname-research-grid strong {
  color: var(--red);
  font-size: 25px;
}
.surname-research-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.surname-longform article {
  gap: 12px;
}
.surname-info-table-wrap {
  overflow-x: auto;
}
.surname-info-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}
.surname-info-table th,
.surname-info-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}
.surname-info-table th {
  color: var(--green);
  background: var(--soft-green);
}
.surname-info-table td:first-child {
  color: var(--red);
  font-weight: 900;
}
.surname-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.surname-route-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-route-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}
.surname-check-list,
.surname-source-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.85;
}
.surname-check-list strong {
  color: var(--green);
}
.surname-keyword-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.surname-keyword-cloud span {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--green);
  font-weight: 800;
}
.surname-source-list a {
  color: var(--green);
  font-weight: 800;
}
.surname-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.surname-mini-grid div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-mini-grid strong {
  display: block;
  margin-bottom: 6px;
  color: var(--green);
}
.surname-mini-grid p {
  margin: 0;
}
.surname-material-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.surname-material-list-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}
.surname-material-list section {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.surname-material-list-wide section {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 240px;
  padding: 20px;
  border-color: #d8d0bf;
}
.surname-material-list-wide section:last-child {
  grid-column: 1 / -1;
  min-height: 0;
  background: #fffdf8;
}
.surname-material-list h3 {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 17px;
}
.surname-material-list-wide h3 {
  position: relative;
  margin: 0;
  padding-bottom: 10px;
  font-size: 20px;
  line-height: 1.3;
}
.surname-material-list-wide h3::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 2px;
  background: var(--gold);
}
.surname-topic-content .surname-material-list-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.surname-topic-content .surname-material-list-wide section:last-child {
  grid-column: auto;
  min-height: 240px;
  background: #fff;
}
.surname-topic-content .surname-material-list h2 {
  position: relative;
  margin: 0;
  padding-bottom: 10px;
  color: var(--green);
  font-size: 22px;
  line-height: 1.3;
}
.surname-topic-content .surname-material-list h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 2px;
  background: var(--gold);
}
.wang-topic-nav .surname-related-grid a[aria-current="page"] {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}
.wang-topic-nav .surname-related-grid a[aria-current="page"] span {
  color: rgba(255, 255, 255, .78);
}
.surname-material-list ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.75;
}
.surname-material-list-wide li + li {
  margin-top: 8px;
}
.surname-material-list a {
  color: var(--green);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.surname-notables {
  padding-top: 10px;
}
.surname-notable-items {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  counter-reset: notable;
}
.surname-notable-items li {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  background: #fff;
  counter-increment: notable;
}
.surname-notable-items li::before {
  content: counter(notable);
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(25, 92, 72, .1);
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}
.surname-notable-items strong,
.surname-notable-items span {
  display: block;
}
.surname-notable-items strong {
  color: var(--ink);
  font-size: 18px;
}
.surname-notable-items span {
  margin-top: 4px;
  color: var(--green);
  font-weight: 700;
}
.surname-notable-items p,
.surname-notable-empty {
  margin: 8px 0 0;
  color: var(--muted);
}
.surname-notable-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  background: #fff;
}
.surname-material-list-wide section:last-child ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  padding-left: 0;
  list-style: none;
}
.surname-material-list-wide section:last-child li {
  margin: 0;
}
.surname-cross-links .surname-related-grid a {
  display: grid;
  gap: 5px;
  align-content: center;
}
.surname-cross-links .surname-related-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(20px, 5vw, 72px);
  border-top: 1px solid var(--line);
  background: #fff;
}
.footer-logo { width: 64px; }
.footer-copy { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; color: var(--muted); font-size: 13px; }
.icp-link:hover { color: var(--red); }
