: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); }

/* Pedigree application */
.auth-shell {
  width: min(1040px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 48px;
  align-items: center;
  margin: 0 auto;
  padding: 72px 0;
}
.login-topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.login-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--green); text-decoration: none; }
.login-brand img { display: block; width: 46px; height: 46px; object-fit: contain; }
.login-brand strong { font-size: 22px; }
.login-topbar > a:last-child { color: var(--muted); font-size: 14px; font-weight: 800; }
.login-main {
  min-height: calc(100vh - 68px);
  display: grid;
  place-items: center;
  padding: 48px 24px;
  background: #eef1f0;
}
.login-experience {
  width: min(1080px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 64px;
  align-items: center;
}
.login-miniapp-panel {
  width: min(100%, 420px);
  justify-self: center;
  display: grid;
  justify-items: center;
  text-align: center;
}
.login-miniapp-panel h1 { margin: 0 0 24px; color: var(--green); font-size: 32px; line-height: 1.25; letter-spacing: 0; }
.login-miniapp-lead { max-width: 460px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.8; }
.login-miniapp-content { display: flex; align-items: center; justify-content: center; gap: 24px; margin-top: 0; }
.miniapp-code-frame {
  flex: 0 0 auto;
  width: 236px;
  padding: 12px;
  border: 1px solid rgba(199, 207, 202, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(31, 37, 40, 0.1);
}
.miniapp-code-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1; }
.miniapp-code-copy { display: grid; gap: 8px; max-width: 180px; }
.miniapp-code-copy strong { color: var(--green); font-size: 18px; }
.miniapp-code-copy span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-only-card { width: 100%; }
.login-account-stack { width: 100%; }
.password-reset-card { width: 100%; }
.forgot-password-row { display: flex; justify-content: flex-end; margin: 8px 0 14px; }
.text-action { padding: 2px 0; border: 0; color: var(--green); background: transparent; font-weight: 800; }
.text-action:hover { text-decoration: underline; }
.verification-input { display: grid; grid-template-columns: minmax(0, 1fr) 116px; gap: 8px; }
.verification-input .button { width: 116px; min-height: 42px; padding-inline: 8px; }
.password-input-field { display: grid; gap: 7px; }
.password-label-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; }
.show-password-control { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; width: fit-content; color: var(--muted); font-weight: 700; white-space: nowrap; cursor: pointer; }
.show-password-control input { width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--green); }
.password-reset-back { display: block; margin: 14px auto 0; }
.login-card-head { margin-bottom: 20px; }
.login-card-head h2 { margin: 4px 0 8px; color: var(--ink); font-size: 30px; letter-spacing: 0; }
.login-card-head p:not(.eyebrow) { margin: 0; color: var(--muted); }
.auth-copy h1 { margin: 8px 0 16px; font-size: clamp(38px, 5vw, 58px); letter-spacing: 0; }
.auth-copy p:not(.eyebrow) { color: var(--muted); font-size: 18px; line-height: 1.8; }
.auth-list { display: grid; gap: 12px; margin-top: 26px; }
.auth-list span { padding-left: 18px; position: relative; color: #465157; }
.auth-list span::before { content: ""; position: absolute; left: 0; top: 8px; width: 7px; height: 7px; background: var(--gold); }
.account-form {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 20px; padding: 4px; background: #eef1ef; }
.auth-tabs button { min-height: 40px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-weight: 800; }
.auth-tabs button.is-active { color: #fff; background: var(--green); }
.account-form[data-mode="login"] .auth-register-only,
.account-form[data-mode="login"] .register-only { display: none; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid .span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #364046; font-size: 13px; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #ccd4d3;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}
textarea { resize: vertical; }
.select-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.auth-hint, .form-status { margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.form-status[data-type="error"] { color: #a92e27; }
.form-status[data-type="success"] { color: #236446; }
.wechat-login-block {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.wechat-login-block > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.wechat-login-button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid #1aad19;
  border-radius: 7px;
  color: #0f6b18;
  background: #f5fff5;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.wechat-login-button b {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: #1aad19;
  font-size: 12px;
}

.workspace-shell { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.workspace-sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #fff;
}
.workspace-family { padding: 0 8px 20px; }
.workspace-family span { display: block; color: var(--muted); font-size: 12px; }
.workspace-family strong { display: block; margin-top: 5px; font-size: 18px; }
.workspace-nav { display: grid; gap: 5px; }
.workspace-nav button {
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #536066;
  background: transparent;
  text-align: left;
  font-weight: 800;
}
.workspace-nav button.is-active { color: #fff; background: var(--green); }
.workspace-user { margin-top: auto; padding: 14px 10px 4px; border-top: 1px solid var(--line); }
.workspace-user strong, .workspace-user span { display: block; }
.workspace-user span { margin-top: 4px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.workspace-main { min-width: 0; padding: 24px; }
.workspace-view { display: none; }
.workspace-view.is-active { display: block; }

/* Personal old-pedigree recognition keeps the institutional OCR pipeline behind a four-step flow. */
#oldPedigreeImport { max-width: 1040px; margin: 0 auto; color: #26312b; font-size: 17px; line-height: 1.75; }
.old-pedigree-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 28px; padding: 8px 0 24px; border-bottom: 1px solid #dfe4e0; }
.old-pedigree-intro p { margin: 0 0 4px; color: #a3312b; font-size: 14px; font-weight: 900; }
.old-pedigree-intro h2 { max-width: 720px; margin: 0; font-family: "Songti SC", "STSong", serif; font-size: 32px; line-height: 1.35; letter-spacing: 0; }
.old-pedigree-intro span { display: block; max-width: 760px; margin-top: 8px; color: #66716b; }
.old-pedigree-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 28px 0 36px; padding: 0; list-style: none; }
.old-pedigree-steps li { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 64px; color: #7b847f; border-bottom: 3px solid #d9dfdb; }
.old-pedigree-steps li::after { content: ""; position: absolute; right: -4px; bottom: -6px; width: 9px; height: 9px; border-radius: 50%; background: #d9dfdb; }
.old-pedigree-steps li:last-child::after { display: none; }
.old-pedigree-steps li.is-done,.old-pedigree-steps li.is-active { color: #273c30; border-color: #a3312b; }
.old-pedigree-steps li.is-done::after,.old-pedigree-steps li.is-active::after { background: #a3312b; }
.old-pedigree-steps b { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid currentColor; border-radius: 50%; font-size: 15px; }
.old-pedigree-steps span { display: grid; color: inherit; font-weight: 900; line-height: 1.35; }
.old-pedigree-steps small { color: inherit; font-size: 12px; font-weight: 500; }
.old-pedigree-stage { display: none; max-width: 820px; min-height: 390px; margin: 0 auto; padding: 10px 0 30px; }
.old-pedigree-stage.is-active { display: block; }
.old-pedigree-stage h3 { margin: 0; font-size: 26px; letter-spacing: 0; }
.old-pedigree-stage p { color: #67736c; }
.old-pedigree-upload-copy { margin-bottom: 18px; }
.old-pedigree-drop { min-height: 190px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 24px; border: 2px dashed #aeb9b2; border-radius: 8px; color: #425349; background: #fbfcfb; text-align: center; cursor: pointer; }
.old-pedigree-drop:hover,.old-pedigree-drop.is-dragging { border-color: #a3312b; background: #fffafa; }
.old-pedigree-drop input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.old-pedigree-drop strong { color: #8d2b27; font-size: 21px; }
.old-pedigree-drop span { color: #6c7771; font-size: 15px; }
.old-pedigree-title,.old-pedigree-self { display: grid; gap: 7px; margin-top: 20px; font-weight: 900; }
.old-pedigree-title input,.old-pedigree-self select { min-height: 50px; padding: 0 13px; border: 1px solid #cbd3ce; border-radius: 6px; color: #26312b; background: #fff; font: inherit; }
.old-pedigree-main-action { min-width: 230px; min-height: 50px; margin-top: 22px; font-size: 17px; }
.old-pedigree-upload-progress { margin-top: 20px; }
.old-pedigree-upload-progress > span,.old-pedigree-process-bar { height: 10px; display: block; overflow: hidden; border-radius: 6px; background: #e4e8e5; }
.old-pedigree-upload-progress i,.old-pedigree-process-bar i { width: 0; height: 100%; display: block; border-radius: inherit; background: #a3312b; transition: width .25s ease; }
.old-pedigree-upload-progress strong { display: block; margin-top: 7px; color: #4f5b54; font-size: 14px; }
.old-pedigree-status { min-height: 28px; margin: 12px 0 0; color: #8d2b27 !important; font-weight: 800; }
.old-pedigree-processing-mark { height: 92px; display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-bottom: 16px; }
.old-pedigree-processing-mark i { width: 9px; height: 30px; border-radius: 5px; background: #a3312b; animation: old-pedigree-pulse 1.1s ease-in-out infinite; }
.old-pedigree-processing-mark i:nth-child(2) { height: 58px; animation-delay: .16s; }
.old-pedigree-processing-mark i:nth-child(3) { height: 42px; animation-delay: .32s; }
@keyframes old-pedigree-pulse { 0%,100% { transform: scaleY(.55); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }
.old-pedigree-stage[data-old-panel="processing"] { text-align: center; }
.old-pedigree-stage[data-old-panel="processing"] > p { margin: 7px 0 28px; }
.old-pedigree-process-meta { display: flex; gap: 18px; justify-content: center; margin-top: 12px; color: #66716b; font-size: 14px; }
.old-pedigree-process-meta strong { color: #8d2b27; }
.old-pedigree-review-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid #dfe4e0; }
.old-pedigree-review-head p { margin: 5px 0 0; }
.old-pedigree-review-head > strong { color: #8d2b27; white-space: nowrap; }
.old-pedigree-candidates { display: grid; gap: 0; }
.old-pedigree-candidate { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; padding: 22px 0; border-bottom: 1px solid #e1e6e2; }
.old-pedigree-candidate-main { min-width: 0; }
.old-pedigree-candidate-relation { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.old-pedigree-candidate-relation input,.old-pedigree-candidate-relation select { min-height: 42px; padding: 0 10px; border: 1px solid #cbd3ce; border-radius: 5px; background: #fff; font: inherit; font-weight: 800; }
.old-pedigree-candidate-relation input { width: min(190px, 32vw); }
.old-pedigree-candidate-relation i { width: 28px; height: 1px; background: #9aa59f; }
.old-pedigree-candidate-evidence { margin: 9px 0 0; color: #6b756f; font-size: 14px; overflow-wrap: anywhere; }
.old-pedigree-candidate-actions { display: flex; align-items: center; gap: 7px; }
.old-pedigree-candidate-actions button { min-height: 40px; padding: 0 12px; border: 1px solid #c9d1cc; border-radius: 5px; color: #3e4b44; background: #fff; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; }
.old-pedigree-candidate-actions button[data-decision="approved"] { color: #fff; border-color: #314d3c; background: #314d3c; }
.old-pedigree-candidate.is-approved { border-left: 3px solid #557962; padding-left: 14px; }
.old-pedigree-candidate.is-rejected { opacity: .55; }
.old-pedigree-ready-head { text-align: center; }
.old-pedigree-ready-head > span { color: #34704a; font-weight: 900; }
.old-pedigree-ready-head p { max-width: 650px; margin: 7px auto 0; }
.old-pedigree-self { max-width: 520px; margin: 28px auto 0; }
.old-pedigree-ready-summary { display: flex; justify-content: center; gap: 44px; margin: 26px 0 4px; }
.old-pedigree-ready-summary span { display: grid; color: #67736c; text-align: center; }
.old-pedigree-ready-summary strong { color: #263b2f; font-size: 28px; }
.old-pedigree-stage[data-old-panel="ready"] { text-align: center; }
.old-pedigree-privacy { display: flex; gap: 18px; margin-top: 14px; padding: 18px 0 0; border-top: 1px solid #dfe4e0; color: #657069; font-size: 14px; }
.old-pedigree-privacy strong { flex: 0 0 auto; color: #35453c; }
.workspace-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-head h2, .panel-head h3 { margin: 0; letter-spacing: 0; }
.panel-head p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.tree-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.tree-workspace:has(#addRelativePanel.is-hidden) { grid-template-columns: minmax(0, 1fr); }
.tree-panel { min-width: 0; }
.tree-document-head { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 16px; border: 1px solid #dfe4e0; border-bottom: 0; background: #fff; }
.tree-document-head > div:first-child { display: grid; gap: 2px; }
.tree-document-head > div:first-child span { color: #8a5a28; font-size: 10px; font-weight: 900; }
.tree-document-head h2 { margin: 0; color: #23362a; font-family: "STKaiti", "KaiTi", "Songti SC", serif; font-size: 23px; letter-spacing: 0; }
.tree-head-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 14px; color: #68736b; font-size: 11px; }
.tree-head-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.tree-head-legend i { width: 11px; height: 11px; display: inline-block; border: 1px solid #53645a; background: #f7f8f6; }
.tree-head-legend .female { border-radius: 50%; }
.tree-head-legend .unknown { border-color: #c5ccc7; background: #e2e6e3; }
.tree-head-legend .legend-line { width: 19px; height: 0; border: 0; border-top: 2px solid #53645a; background: transparent; }
.tree-head-legend .legend-line.spouse { border-top-color: #7b5141; }
.tree-head-legend b { color: #263129; }
.tree-head-legend em { color: #a43b32; font-style: normal; font-weight: 800; }
.tree-scroll {
  overflow: auto;
  max-height: calc(100vh - 230px);
  min-height: 520px;
  padding: 14px;
  border: 1px solid #e3e7e5;
  background: #fbfcfb;
  cursor: grab;
  user-select: none;
  overscroll-behavior: contain;
  touch-action: none;
}
.tree-scroll.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}
.tree-scroll .person-node,
.tree-scroll button,
.tree-scroll input,
.tree-scroll select,
.tree-scroll textarea {
  user-select: auto;
}
.genealogy-canvas {
  position: relative;
  --tree-columns: 5;
  --tree-width: 860px;
  --tree-height: 620px;
  min-width: max(860px, var(--tree-width));
  min-height: 620px;
  display: grid;
  gap: 38px;
  align-content: start;
  padding: 44px 42px 52px;
  border: 1px solid #cfd6d1;
  background:
    linear-gradient(90deg, rgba(54,74,62,.045) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(#fff, #fafbf9);
  box-shadow: 0 1px 2px rgba(31,48,37,.06);
}
#familyTreeCanvas {
  --tree-content-shift: 0px;
  width: var(--tree-width);
  min-width: var(--tree-width);
  min-height: var(--tree-height);
  display: block;
}
#familyTreeCanvas .tree-absolute-label {
  position: absolute;
  left: 34px;
  z-index: 2;
}
#familyTreeCanvas .tree-node {
  position: absolute;
  z-index: 2;
  width: 136px;
  height: 104px;
  min-height: 104px;
  transform: translateX(var(--tree-content-shift));
}
#familyTreeCanvas .tree-node { gap: 2px; padding: 10px 12px 9px; }
#familyTreeCanvas .tree-node.female-symbol { border-radius: 16px; }
#familyTreeCanvas .tree-node small { display: block; max-width: 108px; overflow: hidden; color: #6c756f; font-size: 10px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
#familyTreeCanvas .tree-node .tree-node-lineage { color: #4c5a51; font-size: 11px; font-weight: 700; }
#familyTreeCanvas .tree-node .tree-node-life { color: #6c756f; }
#familyTreeCanvas .tree-node .tree-node-rank { color: #795c43; }
#familyTreeCanvas .tree-node.is-deceased { border-style: double; border-width: 3px; }
#familyTreeCanvas .tree-lines { transform: translateX(var(--tree-content-shift)); }
.tree-lines { position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tree-lines path { fill: none; stroke: #53645a; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; opacity: .84; shape-rendering: geometricPrecision; }
.tree-lines path.pedigree-spouse-line { stroke: #7b5141; stroke-width: 1.8; opacity: .9; }
.tree-lines path.pedigree-trunk { stroke: #304d3b; stroke-width: 2; opacity: .94; }
.tree-lines path.pedigree-sibling-bus { stroke: #496052; stroke-width: 1.7; opacity: .9; }
.tree-lines path.pedigree-child-drop { stroke: #53645a; stroke-width: 1.5; opacity: .86; }
.tree-lines .tree-junction { fill: #304d3b; stroke: #fbfcfb; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.tree-lines .tree-junction.marriage { fill: #7b5141; }
.tree-collaboration-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 18px 4px 0;
}
.tree-collaboration-bar > div:first-child { min-width: 0; }
.tree-collaboration-bar strong { display: block; color: #23362a; font-size: 17px; }
.tree-collaboration-bar p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.tree-collaboration-bar span { display: block; min-height: 18px; margin-top: 4px; color: #42644f; font-size: 12px; }
.tree-collaboration-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.pedigree-title {
  position: absolute;
  top: 22px;
  left: 34px;
  right: 34px;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #17100a;
  pointer-events: none;
}
.pedigree-title strong {
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 10px;
}
.pedigree-title span { color: #a5241c; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.tree-symbol-legend {
  position: absolute;
  top: 68px;
  left: 34px;
  right: 34px;
  z-index: 2;
  display: grid;
  justify-content: center;
  gap: 5px;
  color: #6d5a44;
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}
.family-network-canvas > .tree-symbol-legend {
  top: 12px;
  left: 22px;
  right: 22px;
  justify-content: flex-start;
}
.tree-symbol-legend .legend-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}
.family-network-canvas > .tree-symbol-legend .legend-row {
  justify-content: flex-start;
}
.tree-symbol-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tree-symbol-legend i {
  width: 13px;
  height: 13px;
  display: inline-block;
  background: #7a3f1d;
}
.tree-symbol-legend .male { border-radius: 2px; }
.tree-symbol-legend .female { border-radius: 999px; }
.tree-symbol-legend .unknown { border-radius: 2px; background: #d9d5cd; }
.tree-symbol-legend b { font-style: normal; font-weight: 900; }
.tree-symbol-legend .living { color: #16120c; }
.tree-symbol-legend .deceased-text { color: #c92a20; }
.generation-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 82px 1fr;
  align-items: center;
  gap: 18px;
  min-width: max-content;
}
.generation-label {
  min-width: 58px;
  padding: 5px 8px;
  border: 1px solid #c5cdc7;
  color: #4b5a50;
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.generation-people {
  display: grid;
  grid-template-columns: repeat(var(--tree-columns), 168px);
  justify-content: start;
  justify-items: center;
  gap: 16px;
  min-width: calc(var(--tree-columns) * 168px + (var(--tree-columns) - 1) * 16px);
}
.tree-generation-people {
  position: relative;
  display: block;
  width: calc(var(--tree-width) * 1px - 156px);
  min-width: calc(var(--tree-width) * 1px - 156px);
  height: 86px;
}
.tree-person-group {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tree-generation-people .tree-person-group {
  position: absolute;
  left: var(--tree-x);
  top: 0;
  transform: translateX(-50%);
}
.tree-person-group.spouse-group {
  gap: 6px;
}
.tree-person-group.spouse-group .person-node {
  width: 108px;
}
.person-node {
  position: relative;
  width: 112px;
  min-height: 74px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 7px 9px;
  border: 1px solid #53645a;
  border-radius: 0;
  color: var(--ink);
  background: rgba(255,255,255,.96);
  text-align: center;
  box-shadow: 0 1px 2px rgba(35,54,42,.08);
}
.node-actions {
  position: absolute;
  inset: 3px;
  pointer-events: none;
}
.node-actions button {
  position: absolute;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(31, 23, 16, .45);
  border-radius: 2px;
  color: #23170d;
  background: rgba(255, 248, 199, .96);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.node-actions button:first-child { left: 0; top: 0; }
.node-actions button:last-child { right: 0; top: 0; }
.node-actions button:hover {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}
.relative-manage-tools {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(31, 23, 16, .18);
  background: rgba(255, 248, 221, .72);
}
.relative-manage-title {
  margin-bottom: 8px;
  color: #3a2a18;
  font-size: 13px;
  font-weight: 900;
}
.relative-manage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.relative-manage-grid .merge-field {
  grid-column: 1 / -1;
  display: grid;
  gap: 5px;
  color: #5f4b2f;
  font-size: 12px;
}
.relative-manage-grid select {
  min-height: 36px;
  border: 1px solid rgba(31, 23, 16, .24);
  background: #fffef2;
}
.button.danger {
  color: #fff;
  border-color: #b3261e;
  background: #b3261e;
}
.button.danger:hover {
  background: #8f1f19;
}
.person-node strong { color: #16120c; font-family: "STKaiti", "KaiTi", "Songti SC", serif; font-size: 17px; line-height: 1.12; letter-spacing: 0; }
.person-node span { color: #5f4b2f; font-size: 11px; line-height: 1.35; }
.person-node.is-deceased strong { color: #c92a20; }
.person-node.is-self { color: #16120c; border-width: 2px; border-color: #29553d; background: #edf5ef; }
.person-node.is-self span { color: #3d4a36; }
.person-node.is-selected {
  border-color: #c8161d;
  outline: 2px solid rgba(200, 22, 29, .28);
  outline-offset: 3px;
  box-shadow: 0 0 0 1px rgba(200, 22, 29, .16), 0 8px 18px rgba(89, 26, 18, .12);
}
.person-detail-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}
.person-detail-modal.is-hidden { display: none; }
.person-detail-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 15, 10, .46);
}
.person-detail-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid rgba(64, 44, 24, .28);
  background: #fffaf0;
  box-shadow: 0 22px 60px rgba(33, 20, 9, .28);
}
.person-detail-close {
  position: sticky;
  top: 12px;
  float: right;
  z-index: 2;
  width: 34px;
  height: 34px;
  margin: 12px 12px 0 0;
  border: 1px solid rgba(52, 38, 24, .28);
  background: rgba(255, 250, 240, .94);
  color: #26180d;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.person-detail-content {
  display: grid;
  gap: 18px;
  padding: 28px;
}
.site-relation-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(64, 44, 24, .22);
  background: #fff4c9;
}
.site-relation-card .card-kicker {
  margin: 0 0 6px;
  color: #8e5c1c;
  font-size: 13px;
  font-weight: 900;
}
.site-relation-card h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 32px;
  color: #17100a;
}
.site-relation-card p:last-child {
  margin: 6px 0 0;
  color: #6d5a44;
  font-weight: 800;
}
.site-relation-graph {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid rgba(64, 44, 24, .18);
  background: #fbfcf7;
}
.site-relation-graph .graph-row {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
}
.site-relation-graph .graph-node {
  min-height: 62px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(12, 71, 49, .28);
  background: #fffdf2;
  color: #163b2a;
  font-weight: 900;
  text-align: center;
}
.site-relation-graph .focus {
  color: #16120c;
  border-color: #a97625;
  background: #fff2b5;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 21px;
}
.site-relation-graph span {
  display: block;
  color: #7b6a56;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}
.site-linked-relatives,
.site-pedigree-detail {
  display: grid;
  gap: 12px;
}
.detail-section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.detail-section-head h3 {
  margin: 0;
  color: #17100a;
  font-size: 19px;
}
.detail-section-head span {
  color: #7b6a56;
  font-size: 13px;
  font-weight: 800;
}
.site-linked-relatives button {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(64, 44, 24, .16);
  background: #fffdf8;
  color: #17100a;
  cursor: pointer;
}
.site-linked-relatives button span {
  color: #7b6a56;
  font-size: 12px;
}
.detail-empty {
  margin: 0;
  padding: 14px;
  background: #fbfcf7;
  color: #7b6a56;
}
.pedigree-cover-block {
  display: grid;
  gap: 7px;
  padding: 26px 22px;
  border: 6px double #a97625;
  background: linear-gradient(#fff7bd, #fff1a0);
  text-align: center;
}
.pedigree-cover-block p {
  margin: 0;
  color: #a5241c;
  font-weight: 900;
}
.pedigree-cover-block h2 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 34px;
  letter-spacing: 4px;
}
.pedigree-cover-block span {
  color: #6d5a44;
  font-weight: 800;
}
.pedigree-record-block {
  display: grid;
  gap: 0;
  border: 1px solid rgba(64, 44, 24, .18);
  background: #fffdf8;
}
.pedigree-record-block .detail-section-head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(64, 44, 24, .14);
}
.pedigree-record-block > div:not(.detail-section-head) {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(64, 44, 24, .1);
}
.pedigree-record-block > div:last-child { border-bottom: 0; }
.pedigree-record-block span { color: #7b6a56; }
.pedigree-record-block strong { color: #17100a; }
.classic-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.classic-tabs div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: #fbfcf7;
  border: 1px solid rgba(64, 44, 24, .14);
}
.classic-tabs span {
  color: #7b6a56;
  font-size: 13px;
  line-height: 1.55;
}
.inscription {
  margin: 0;
  padding: 16px;
  color: #6d4b24;
  background: #fff5d6;
  border-left: 4px solid #a97625;
  font-family: "STKaiti", "KaiTi", "Songti SC", serif;
  font-size: 18px;
}
.family-network-canvas {
  position: relative;
  --network-width: 920px;
  --network-height: 560px;
  width: var(--network-width);
  min-width: var(--network-width);
  min-height: var(--network-height);
  padding: 46px 32px 38px;
}
.network-generation-label {
  position: absolute;
  left: 20px;
  z-index: 1;
  transform: translateY(-50%);
}
.network-person-node {
  position: absolute;
  z-index: 5;
  pointer-events: auto;
  width: 128px;
  height: 116px;
  min-height: 116px;
  gap: 5px;
  padding: 12px;
  border: 1px solid #ccd5d1;
  border-radius: 7px;
  background: #fff;
  box-shadow: none;
}
.network-person-node {
  cursor: pointer;
}
.network-person-node:hover {
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(92, 58, 21, 0.12);
}
.network-person-node strong { font-family: inherit; font-size: 17px; color: var(--ink); }
.network-person-node span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.network-person-node.is-self { color: #fff; border-color: var(--green); background: var(--green); }
.network-person-node.is-self span { color: rgba(255,255,255,.76); }
.network-person-node em { color: var(--gold); font-size: 11px; font-style: normal; font-weight: 800; }
.network-person-node .person-actions {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  margin-top: auto;
}
.network-person-node .person-actions button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #cad4cf;
  border-radius: 4px;
  color: var(--green);
  background: #f7faf8;
  font-size: 12px;
  font-weight: 900;
}
.network-person-node .person-actions button:hover,
.network-person-node .person-actions button:focus-visible {
  border-color: var(--gold);
  background: var(--soft-gold);
  outline: none;
}
.network-person-node.is-self .person-actions button {
  border-color: rgba(255,255,255,.45);
  color: #fff;
  background: rgba(255,255,255,.12);
}
.family-network-canvas .tree-lines path { stroke: #1f7f8f; stroke-width: 1.7; opacity: .68; }
.family-network-canvas .tree-lines path.network-spouse-link {
  stroke: #8a5a18;
  stroke-width: 1.8;
  opacity: .72;
}
.family-network-canvas .tree-lines path.network-sibling-link {
  stroke: #6e6254;
  stroke-width: 1.7;
  opacity: .68;
}
.family-network-canvas .tree-lines path.is-selected-link {
  stroke: #c8161d !important;
  stroke-width: 2.4 !important;
  opacity: 1 !important;
  filter: drop-shadow(0 0 2px rgba(200, 22, 29, .38));
}
.family-network-canvas .tree-lines path.is-dimmed-link {
  opacity: .22 !important;
}
.family-network-canvas .network-person-node.is-related {
  border-color: rgba(200, 22, 29, .75);
  box-shadow: 0 0 0 2px rgba(200, 22, 29, .12);
}

.empty-tree { margin: auto; color: var(--muted); text-align: center; }
.relative-form { display: grid; gap: 12px; }
.relative-form .field-grid { grid-template-columns: 1fr 1fr; }
.relative-form .optional-fields { display: none; }
.relative-form.is-expanded .optional-fields { display: grid; }
.text-button { min-height: 36px; border: 0; color: var(--green-2); background: transparent; font-weight: 800; }

.account-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.account-stats span { padding: 14px; border: 1px solid var(--line); background: #fbfcfb; color: var(--muted); font-size: 12px; }
.account-stats strong { display: block; color: var(--green); font-size: 24px; }
.profile-panel-head { align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.profile-kicker { margin: 0 0 6px !important; color: #9a6724 !important; font-size: 12px !important; font-weight: 900; }
.profile-completeness { display: grid; justify-items: end; min-width: 112px; }
.profile-completeness strong { color: var(--green); font-size: 30px; line-height: 1; }
.profile-completeness span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.profile-identity-strip { display: grid; grid-template-columns: 58px minmax(180px, 1fr) minmax(420px, 1.7fr); gap: 16px; align-items: center; padding: 4px 0 18px; }
.profile-initial { --profile-avatar-size: 58px; position: relative; width: var(--profile-avatar-size); min-width: var(--profile-avatar-size); max-width: var(--profile-avatar-size); height: var(--profile-avatar-size); min-height: var(--profile-avatar-size); max-height: var(--profile-avatar-size); aspect-ratio: 1; display: grid; flex: none; place-items: center; overflow: hidden; border: 1px solid #caa96d; border-radius: 50%; color: #fff; background: var(--green); font-family: "STKaiti", "KaiTi", serif; font-size: 26px; font-weight: 900; }
.profile-initial img { position: absolute; inset: 0; width: 100%; min-width: 100%; max-width: 100%; height: 100%; min-height: 100%; max-height: 100%; display: block; object-fit: cover; object-position: center; }
.profile-initial.has-image { background: #eef2ef; }
.profile-avatar-upload { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcfb; }
.profile-avatar-preview { --profile-avatar-size: 72px; font-size: 28px; }
.profile-avatar-copy { min-width: 0; }
.profile-avatar-upload strong { display: block; font-size: 14px; }
.profile-avatar-upload .profile-avatar-copy > p:first-of-type { margin: 5px 0 11px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.profile-avatar-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-avatar-actions .button { min-height: 36px; padding: 0 13px; }
.profile-identity-strip h3 { margin: 0 0 5px; font-size: 20px; }
.profile-identity-strip p { margin: 0; color: var(--muted); font-size: 13px; }
.profile-identity-strip small { display: block; margin-top: 7px; color: #53705e; }
.profile-identity-strip .account-stats { margin: 0; }
.detailed-profile-form { display: grid; gap: 0; margin-top: 0; padding-top: 0; }
.profile-form-section { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 26px; padding: 26px 0; border-top: 1px solid var(--line); }
.profile-section-title { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; align-content: start; }
.profile-section-title > span { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #d5bd8d; color: #84591f; background: #fff9eb; font-size: 12px; font-weight: 900; }
.profile-section-title h3 { margin: 1px 0 5px; font-size: 17px; }
.profile-section-title p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.profile-form-section .field-grid { align-content: start; }
.profile-checkbox { min-height: 42px; display: flex; align-items: center; align-self: end; padding: 9px 11px; border: 1px solid #ccd4d3; border-radius: 6px; background: #fbfcfb; }
.profile-checkbox input { width: 18px; min-height: 18px; margin: 0; accent-color: var(--green); }
.profile-save-bar { position: sticky; bottom: 12px; z-index: 4; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid #b9c9be; background: rgba(255, 255, 255, .96); box-shadow: 0 10px 30px rgba(24, 55, 38, .12); }
.profile-save-bar p { margin: 0; }
.profile-save-bar a { color: var(--green); font-size: 13px; font-weight: 800; }
.account-profile-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(31, 23, 16, .14);
}
.account-profile-form .field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-profile-form label {
  min-width: 0;
}
.account-profile-form .select-row {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.member-list { display: grid; gap: 8px; }
.member-button { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: #fff; text-align: left; }
.member-button.is-active { border-color: var(--green-2); background: var(--soft-green); }
.member-button > span:nth-child(2) { display: grid; gap: 3px; }
.member-button span span, .member-button .status { color: var(--muted); font-size: 12px; }
.share-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; }
.share-card { padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fbfcfb; }
.share-card h3 { margin: 6px 0; }
.share-card p { color: var(--muted); }
.invite-card-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 10px; }
.invite-card-metrics span { padding: 11px; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 12px; }
.invite-card-metrics strong { display: block; margin-bottom: 4px; color: var(--green); font-size: 22px; }
.invite-card-progress { overflow: hidden; height: 7px; margin-bottom: 12px; background: #e7e2d8; }
.invite-card-progress i { display: block; width: 0; height: 100%; background: var(--red); transition: width .25s ease; }
.invite-card-next { margin: 0 0 14px; font-weight: 700; }
.invite-claim-card .button + .button { margin-top: 8px; }
.genealogy-editor-view { --editor-green: #253f31; --editor-paper: #f8f8f4; --editor-line: #d9ded8; }
.genealogy-editor-topbar { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; color: #fff; background: var(--editor-green); }
.genealogy-project-drawer { position: absolute; z-index: 20; top: 68px; right: 0; width: min(420px, 100%); height: calc(100% - 68px); padding: 18px; border-left: 1px solid #c8d0ca; background: #f7f8f6; box-shadow: -18px 0 40px rgba(24,39,29,.18); overflow-y: auto; }
.genealogy-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 2px solid var(--editor-green); }
.genealogy-drawer-head > div { display: grid; gap: 3px; }.genealogy-drawer-head small { color: #8a5a28; font-weight: 900; }.genealogy-drawer-head strong { font-size: 20px; }.genealogy-drawer-head .icon-button { width: 36px; height: 36px; border: 0; background: #e7ebe8; font-size: 22px; }
.genealogy-project-list { display: grid; gap: 6px; }.genealogy-project-list > button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid var(--editor-line); color: #27352c; background: #fff; text-align: left; }.genealogy-project-list > button.is-active { border-color: #8a5a28; box-shadow: inset 4px 0 #8a5a28; }.genealogy-project-list span { display: grid; gap: 4px; }.genealogy-project-list small,.genealogy-project-list time { color: #758078; font-size: 11px; }.genealogy-project-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }.genealogy-project-actions .danger { grid-column: 1/-1; color: #8b3025; }
.genealogy-editor-topbar > div:first-child { display: grid; gap: 3px; }
.genealogy-editor-topbar span { color: #bfcac1; font-size: 11px; font-weight: 800; }
.genealogy-editor-topbar strong { font-size: 18px; }
.genealogy-editor-actions { display: flex; align-items: center; gap: 8px; }
.genealogy-editor-actions .button { min-height: 38px; padding: 0 14px; }
.genealogy-editor-actions .secondary { border-color: rgba(255,255,255,.35); color: #fff; background: transparent; }
.genealogy-editor-actions .icon-button { width: 38px; height: 38px; border: 0; color: #fff; background: rgba(255,255,255,.1); font-size: 25px; }
.genealogy-editor-view.is-final input:disabled,.genealogy-editor-view.is-final textarea:disabled,.genealogy-editor-view.is-final select:disabled { color: #4f5952; background: #f0f2f0; opacity: 1; }.genealogy-editor-view button:disabled { cursor: not-allowed; opacity: .48; }
.genealogy-editor-shell { min-height: calc(100vh - 184px); display: grid; grid-template-columns: 210px minmax(0, 1fr); background: #eef1ee; }
.genealogy-editor-nav { display: grid; align-content: start; gap: 2px; padding: 18px 12px; border-right: 1px solid #d3d9d4; background: #fff; }
.genealogy-editor-nav button { display: grid; grid-template-columns: 30px 1fr; gap: 10px; align-items: center; padding: 13px 10px; border: 0; border-radius: 5px; color: #59655d; background: transparent; text-align: left; }
.genealogy-editor-nav button:hover { background: #f2f5f2; }
.genealogy-editor-nav button.is-active { color: #fff; background: var(--editor-green); }
.genealogy-editor-nav b { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: "Songti SC", serif; font-size: 13px; }
.genealogy-editor-nav span { display: grid; gap: 2px; color: inherit; font-size: 14px; font-weight: 900; }
.genealogy-editor-nav small { color: inherit; font-size: 10px; font-weight: 500; opacity: .68; }
.genealogy-editor-content { min-width: 0; padding: 24px; }
.genealogy-step { display: none; width: min(100%, 1120px); margin: 0 auto; }
.genealogy-step.is-active { display: block; }
.genealogy-step-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.genealogy-step-head p { margin: 0 0 4px; color: #8a5a28; font-size: 11px; font-weight: 900; }
.genealogy-step-head h2 { margin: 0; color: #202a23; font-size: 24px; }
.genealogy-step-head > span { color: #6c766f; font-size: 12px; }
.genealogy-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--editor-line); background: var(--editor-line); }
.genealogy-form-grid label,.genealogy-record-form label { display: grid; gap: 7px; padding: 15px; color: #4f5b53; background: #fff; font-size: 12px; font-weight: 800; }
.genealogy-form-grid .span-2 { grid-column: 1 / -1; }
.genealogy-form-grid input,.genealogy-form-grid textarea,.genealogy-record-form input,.genealogy-record-form textarea,.genealogy-record-form select,.genealogy-scope-rules select,.genealogy-scope-tools input { width: 100%; min-height: 39px; box-sizing: border-box; border: 1px solid #cbd3cd; border-radius: 4px; padding: 8px 10px; color: #202a23; background: #fbfcfb; font: inherit; font-weight: 500; }
.genealogy-scope-rules { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: 12px; border: 1px solid var(--editor-line); background: var(--editor-line); }
.genealogy-scope-rules > label { min-height: 60px; display: flex; flex: 1 1 160px; align-items: center; gap: 8px; padding: 10px 14px; background: #fff; font-size: 12px; font-weight: 800; }
.genealogy-scope-rules > label:first-child { flex-basis: 280px; }
.genealogy-scope-rules select { margin-left: auto; width: auto; }
.check-line input { width: 18px; height: 18px; accent-color: var(--editor-green); }
.genealogy-scope-tools { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; gap: 8px; margin-bottom: 12px; }
.genealogy-person-list { display: grid; border: 1px solid var(--editor-line); background: #fff; }
.genealogy-person-row { display: grid; grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 66px; padding: 8px 14px; border-bottom: 1px solid #e7ebe8; cursor: pointer; }
.genealogy-person-row:last-child { border-bottom: 0; }
.genealogy-person-row input { width: 17px; height: 17px; accent-color: var(--editor-green); }
.genealogy-person-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; color: #fff; background: #365c47; font-family: "Songti SC", serif; font-weight: 900; }
.genealogy-person-avatar.female { border-radius: 50%; background: #8d554f; }
.genealogy-person-row > span:nth-of-type(2) { display: grid; gap: 3px; }
.genealogy-person-row small { color: #7a847d; }
.genealogy-person-row em,.genealogy-record-list em { color: #8a5a28; font-size: 11px; font-style: normal; }
.genealogy-record-layout { min-height: 560px; display: grid; grid-template-columns: 290px minmax(0, 1fr); border: 1px solid var(--editor-line); background: #fff; }
.genealogy-record-list { overflow-y: auto; max-height: 680px; border-right: 1px solid var(--editor-line); }
.genealogy-record-list button { width: 100%; display: flex; justify-content: space-between; gap: 10px; padding: 13px 14px; border: 0; border-bottom: 1px solid #e7ebe8; color: #27352c; background: #fff; text-align: left; }
.genealogy-record-list button.is-active { box-shadow: inset 4px 0 #8a5a28; background: #f4f6f4; }
.genealogy-record-list button span { display: grid; gap: 3px; }
.genealogy-record-list small { color: #7a847d; }
.genealogy-record-form { min-width: 0; padding: 20px; }
.genealogy-record-empty { min-height: 420px; display: grid; place-items: center; color: #78837b; }
.genealogy-rule-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.genealogy-rule-layout > section { border: 1px solid var(--editor-line); background: #fff; }.genealogy-subhead { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--editor-line); }.genealogy-subhead > span { color: #758078; font-size: 11px; }.genealogy-rule-list { display: grid; }.genealogy-rule-list article { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)) 32px; gap: 6px; padding: 9px; border-bottom: 1px solid #e7ebe8; }.genealogy-rule-list input,.genealogy-rule-list select,.genealogy-chapter-list input,.genealogy-publication-settings input,.genealogy-publication-settings select { width: 100%; min-height: 38px; box-sizing: border-box; border: 1px solid #cbd3cd; border-radius: 3px; padding: 7px 9px; background: #fbfcfb; }.genealogy-rule-list button,.chapter-actions button { border: 0; color: #6d766f; background: #edf0ed; font-size: 18px; }.genealogy-required-fields { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; padding: 15px; border: 1px solid var(--editor-line); background: #fff; }.genealogy-required-fields strong { margin-right: 8px; }.genealogy-required-fields label { display: flex; align-items: center; gap: 6px; font-size: 12px; }.genealogy-required-fields input { width: 17px; height: 17px; accent-color: var(--editor-green); }
.genealogy-chapter-progress { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-bottom: 12px; border: 1px solid var(--editor-line); background: var(--editor-line); }.genealogy-chapter-progress span { padding: 12px 15px; color: #657068; background: #fff; font-size: 12px; }.genealogy-chapter-progress strong { margin-right: 6px; color: var(--editor-green); font-size: 21px; }.genealogy-chapter-list { display: grid; gap: 12px; }.genealogy-chapter-volume { border: 1px solid var(--editor-line); background: #fff; }.genealogy-chapter-volume > header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 16px; color: #fff; background: var(--editor-green); }.genealogy-chapter-volume > header div { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: baseline; }.genealogy-chapter-volume > header span { font-family: "Songti SC",serif; font-size: 20px; font-weight: 900; }.genealogy-chapter-volume > header strong { color: #c8d3cb; font-size: 11px; }.genealogy-chapter-volume > header em { color: #d8e0da; font-size: 11px; font-style: normal; }.genealogy-chapter-volume article { border-bottom: 1px solid #e1e6e2; }.genealogy-chapter-volume article:last-child { border-bottom: 0; }.chapter-summary { display: grid; grid-template-columns: 38px 66px minmax(0,1fr) 112px; gap: 9px; align-items: center; min-height: 62px; padding: 8px 12px; }.chapter-order { color: #8a5a28; font: 12px ui-monospace,monospace; }.chapter-include { display: flex; align-items: center; gap: 5px; font-size: 12px; }.chapter-include input { width: 16px; height: 16px; accent-color: var(--editor-green); }.chapter-open { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 4px 8px; border: 0; color: #27352c; background: transparent; text-align: left; }.chapter-open span { min-width: 0; display: grid; gap: 2px; }.chapter-open small { color: #78827b; font-size: 10px; }.chapter-open i { font-size: 24px; font-style: normal; transition: transform .2s ease; }.chapter-actions { display: grid; grid-template-columns: repeat(3,32px); gap: 5px; }.chapter-actions button { height: 32px; border: 0; color: #6d766f; background: #edf0ed; font-size: 18px; }.chapter-editor { display: none; padding: 16px 18px 20px 125px; border-top: 1px solid #e7ebe8; background: #f7f8f6; }.genealogy-chapter-volume article.is-open .chapter-editor { display: grid; gap: 12px; }.genealogy-chapter-volume article.is-open .chapter-open i { transform: rotate(90deg); }.chapter-editor-grid { display: grid; grid-template-columns: 1fr 180px; gap: 10px; }.chapter-editor label { display: grid; gap: 6px; color: #556159; font-size: 11px; font-weight: 800; }.chapter-editor input,.chapter-editor select,.chapter-editor textarea { width: 100%; min-height: 38px; box-sizing: border-box; border: 1px solid #cbd3cd; border-radius: 3px; padding: 8px 10px; color: #202a23; background: #fff; font: inherit; font-weight: 500; }.chapter-writing-guide { padding: 11px 13px; border-left: 3px solid #8a5a28; background: #fff; }.chapter-writing-guide strong { font-size: 11px; }.chapter-writing-guide p { margin: 4px 0 0; color: #69736c; font-size: 12px; }
#genealogyRecordFields { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--editor-line); border: 1px solid var(--editor-line); }
#genealogyRecordFields > label { background: #fff; }
#genealogyRecordFields > label:has(textarea),#genealogyRecordFields > label:has(select),#genealogyRecordFields > .full { grid-column: 1 / -1; }
.genealogy-record-person { grid-column: 1 / -1; display: grid; gap: 4px; padding: 17px; color: #fff; background: var(--editor-green); }
.genealogy-record-person span { color: #cad4cd; font-size: 12px; }
.two-fields { display: contents; }
#genealogyRecordFields > .button { grid-column: 1 / -1; margin-top: 12px; }
.genealogy-quality-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.genealogy-quality-summary article { padding: 17px; border-left: 4px solid #8a5a28; background: #fff; }
.genealogy-quality-summary strong { display: block; color: #253f31; font-size: 27px; }
.genealogy-quality-summary span { color: #6c766f; font-size: 12px; }
.genealogy-quality-list { display: grid; gap: 7px; }
.genealogy-quality-list article { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 54px; padding: 10px 14px; border: 1px solid var(--editor-line); background: #fff; }
.genealogy-quality-list article b { font-size: 11px; }
.genealogy-quality-list article button { border: 0; color: #315744; background: transparent; font-weight: 800; }
.quality-blocking { border-left: 4px solid #9b3424 !important; }
.quality-review { border-left: 4px solid #aa7626 !important; }
.quality-suggestion { border-left: 4px solid #687a6d !important; }
.genealogy-quality-pass { padding: 34px; border: 1px solid #b8c9bd; color: #315744; background: #f4faf6; text-align: center; }
.genealogy-quality-pass p { margin-bottom: 0; color: #66746a; }
.genealogy-template-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.genealogy-template-grid button { display: grid; grid-template-columns: 72px 1fr; grid-template-rows: auto auto; gap: 4px 12px; align-items: center; padding: 13px; border: 1px solid var(--editor-line); border-radius: 5px; color: #27352c; background: #fff; text-align: left; }
.genealogy-template-grid button.is-active { border-color: #8a5a28; box-shadow: inset 0 0 0 2px #8a5a28; }
.genealogy-template-grid small { color: #748078; font-size: 10px; line-height: 1.45; }
.template-sheet { grid-row: 1 / 3; width: 60px; height: 76px; display: grid; align-content: center; gap: 7px; padding: 10px; border: 1px solid #9fac9f; background: #fbfbf7; }
.template-sheet i { display: block; height: 2px; background: #86958a; }
.template-classic { border: 3px double #8d4339; }.template-classic i { background: #8d4339; }.template-memorial { border-color: #3d6852; background: #eef5f0; }
.genealogy-preview-frame { height: 660px; overflow: hidden; border: 1px solid var(--editor-line); background: #cfd4d0; }
.genealogy-preview-frame iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.genealogy-publish-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.genealogy-publication-settings { display: grid; grid-template-columns: repeat(5,1fr); gap: 1px; margin-bottom: 12px; border: 1px solid var(--editor-line); background: var(--editor-line); }.genealogy-publication-settings label { display: grid; gap: 6px; padding: 10px; color: #5a655d; background: #fff; font-size: 11px; font-weight: 800; }.genealogy-version-list { display: grid; margin-top: 16px; border: 1px solid var(--editor-line); background: #fff; }.genealogy-version-list article { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid #e7ebe8; }.genealogy-version-list article > b { width: 40px; color: #8a5a28; font: 12px ui-monospace,monospace; }.genealogy-version-list article > span { display: grid; gap: 3px; }.genealogy-version-list small,.genealogy-version-list time { color: #758078; font-size: 11px; }
.genealogy-empty { padding: 25px; color: #78837b; text-align: center; }
body.genealogy-focus-mode { overflow: hidden; }
body.genealogy-focus-mode > header,body.genealogy-focus-mode > footer { display: none !important; }
body.genealogy-focus-mode main > :not(.workspace-shell),body.genealogy-focus-mode .workspace-sidebar { display: none !important; }
body.genealogy-focus-mode .workspace-shell { position: fixed; z-index: 9999; inset: 0; display: block; min-height: 100vh; background: #eef1ee; }
body.genealogy-focus-mode .workspace-main { height: 100vh; padding: 0; }
body.genealogy-focus-mode .workspace-view:not(.genealogy-editor-view) { display: none !important; }
body.genealogy-focus-mode .genealogy-editor-view { display: block !important; height: 100vh; }
body.genealogy-focus-mode .genealogy-editor-shell { height: calc(100vh - 68px); min-height: 0; }
body.genealogy-focus-mode .genealogy-editor-content { overflow: auto; }
@media (max-width: 780px) {
  .genealogy-editor-topbar { align-items: flex-start; }
  .genealogy-editor-actions .secondary { display: none; }
  .genealogy-editor-shell { grid-template-columns: 1fr; }
  .genealogy-editor-nav { position: sticky; z-index: 4; top: 0; display: flex; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--editor-line); }
  .genealogy-editor-nav button { min-width: 116px; grid-template-columns: 24px 1fr; padding: 9px 8px; }
  .genealogy-editor-nav b { width: 22px; height: 22px; }
  .genealogy-editor-nav small { display: none; }
  .genealogy-editor-content { padding: 14px 10px 30px; }
  .genealogy-form-grid,.genealogy-record-layout { grid-template-columns: 1fr; }
  .genealogy-rule-layout { grid-template-columns: 1fr; }.genealogy-rule-list article { grid-template-columns: 1fr 1fr 32px; }.genealogy-rule-list article input:nth-of-type(3),.genealogy-rule-list article input:nth-of-type(4),.genealogy-rule-list article select { grid-column: span 1; }.genealogy-chapter-progress { grid-template-columns: 1fr 1fr 1fr; }.genealogy-chapter-progress span { padding: 8px; font-size: 10px; }.genealogy-chapter-progress strong { display: block; font-size: 18px; }.genealogy-chapter-volume > header { align-items: flex-start; }.genealogy-chapter-volume > header div { grid-template-columns: 1fr; gap: 2px; }.genealogy-chapter-volume > header strong { line-height: 1.5; }.chapter-summary { grid-template-columns: 28px 56px minmax(0,1fr); padding: 7px 8px; }.chapter-actions { grid-column: 3; justify-self: end; }.chapter-editor { padding: 12px; }.chapter-editor-grid { grid-template-columns: 1fr; }.genealogy-publication-settings { grid-template-columns: 1fr 1fr; }
  .genealogy-form-grid .span-2 { grid-column: auto; }
  .genealogy-record-list { max-height: 220px; border-right: 0; border-bottom: 1px solid var(--editor-line); }
  .genealogy-template-grid { grid-template-columns: 1fr; }
  .genealogy-quality-list article { grid-template-columns: 74px 1fr; }.genealogy-quality-list article button { grid-column: 2; justify-self: start; }
  .genealogy-preview-frame { height: 520px; }
  .genealogy-scope-tools { grid-template-columns: 1fr 1fr; }.genealogy-scope-tools input { grid-column: 1 / -1; }
}
.label { margin: 0; color: var(--red) !important; font-size: 12px; font-weight: 800; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* Legacy */
.legacy-summary { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
.legacy-visual { min-height: 320px; background: url("assets/legacy-hero-memory.webp") center / cover no-repeat; border: 1px solid var(--line); }
.process-row { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); background: #fff; }
.process-row article { padding: 22px; border-right: 1px solid var(--line); }
.process-row article:last-child { border-right: 0; }
.process-row span { color: var(--red); font-weight: 800; }
.process-row h3 { margin: 10px 0 7px; }
.process-row p { margin: 0; color: var(--muted); line-height: 1.6; }
.price-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.price-card { padding: 20px; }
.price-card.featured { border-top: 4px solid var(--red); }
.price-card .price { display: block; margin: 12px 0; color: var(--red); font-size: 25px; }
.price-card ul { margin: 16px 0 0; padding-left: 18px; color: #4e5a60; line-height: 1.8; font-size: 13px; }
.addon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.addon-card strong { display: block; margin-top: 9px; color: var(--red); }

/* Admin data */
.admin-body { background: #f4f6f3; }
.admin-shell { width: min(100% - 36px, 1440px); margin: 0 auto; padding: 28px 0 56px; }
.admin-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.admin-head h1 { margin: 4px 0 8px; font-size: 34px; }
.admin-head p { margin: 0; color: var(--muted); }
.admin-login, .admin-table-card, .admin-toolbar, .admin-stat-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}
.admin-login { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(360px, 1fr); gap: 18px; align-items: end; padding: 20px; }
.admin-login h2, .admin-toolbar h2, .admin-table-head h2 { margin: 0 0 6px; }
.admin-login p, .admin-toolbar p, .admin-table-head p { margin: 0; color: var(--muted); }
.admin-login-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; }
.admin-login-form label, .admin-table-tools { display: grid; gap: 6px; }
.admin-login-form span { color: var(--muted); font-size: 13px; font-weight: 700; }
.admin-login-form input, .admin-table-tools input {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fbfcfb;
  font: inherit;
}
.admin-message { grid-column: 1 / -1; color: var(--red) !important; font-weight: 800; }
.admin-dashboard { display: grid; gap: 16px; }
.admin-toolbar { display: flex; justify-content: space-between; gap: 14px; align-items: center; padding: 18px; }
.admin-toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); gap: 10px; }
.admin-stat-grid article { padding: 15px; }
.admin-stat-grid span { display: block; color: var(--muted); font-size: 12px; font-weight: 800; }
.admin-stat-grid strong { display: block; margin-top: 8px; color: var(--green); font-size: 28px; }
.admin-table-card { overflow: hidden; }
.admin-search-submit {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.admin-search-submit-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}
.admin-search-submit-summary article,
.admin-search-submit-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 13px;
}
.admin-search-submit-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-search-submit-summary strong {
  display: block;
  margin-top: 7px;
  color: var(--green);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.admin-search-submit-summary strong.is-ok { color: var(--green-2); }
.admin-search-submit-summary strong.is-error { color: var(--red); }
.admin-search-submit-log {
  min-width: 320px;
  color: #3e4b43;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: normal;
}
.admin-search-submit-empty {
  color: var(--muted);
  font-weight: 800;
}
.admin-table-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 18px; border-bottom: 1px solid var(--line); }
.admin-table-card.is-collapsed > :not(.admin-table-head) { display: none !important; }
.admin-table-card.is-collapsed > .admin-table-head { border-bottom: 0; }

.claim-review-panel, .membership-summary { margin: 18px 0; padding: 20px; border: 1px solid #d9cfbd; border-radius: 8px; background: #fffdf8; }
.claim-review-panel .panel-head, .membership-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.claim-review-list { display: grid; gap: 12px; margin-top: 14px; }
.claim-review-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-top: 1px solid #e8dfd0; }
.claim-review-item p { margin: 5px 0 0; color: var(--muted); }
.claim-review-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.membership-progress-copy { text-align: right; }
.membership-progress-copy strong, .membership-progress-copy span { display: block; }
.membership-progress-copy strong { color: var(--green); font-size: 25px; }
.membership-progress-copy span { color: var(--muted); font-size: 12px; }
.profile-oral-history { margin: 20px 0 4px; padding: 22px; border: 1px solid #cbd8d0; border-top: 3px solid var(--green); border-radius: 8px; background: #f8fbf9; }
.oral-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.oral-history-heading h3 { margin: 0 0 6px; color: var(--green); font-size: 22px; }
.oral-history-heading > div > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.oral-history-heading .button { flex: 0 0 auto; min-height: 38px; }
.oral-history-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 18px 0; border: 1px solid #d6dfda; background: #d6dfda; }
.oral-history-metrics span { padding: 13px 16px; color: var(--muted); background: #fff; font-size: 12px; }
.oral-history-metrics strong { margin-right: 5px; color: var(--green); font-size: 23px; }
.oral-history-project-list { display: grid; gap: 14px; }
.oral-history-state { min-height: 88px; display: grid; align-content: center; gap: 5px; padding: 18px; color: var(--muted); background: #fff; text-align: center; }
.oral-history-state strong { color: var(--green); font-size: 17px; }
.oral-history-state small { line-height: 1.7; }
.oral-history-state.is-error { color: #9b342d; background: #fff7f6; }
.oral-history-project { overflow: hidden; border: 1px solid #d3ddd7; border-radius: 6px; background: #fff; }
.oral-history-project-head { display: grid; grid-template-columns: minmax(0, 1fr) 76px; gap: 18px; align-items: center; padding: 18px 20px; }
.oral-history-project-head span { color: #946527; font-size: 11px; font-weight: 900; }
.oral-history-project-head h4 { margin: 4px 0 5px; color: var(--green); font-size: 19px; }
.oral-history-project-head p { margin: 0; color: var(--muted); font-size: 12px; }
.oral-history-project-head > div:last-child { padding-left: 18px; border-left: 1px solid var(--line); text-align: center; }
.oral-history-project-head > div:last-child strong,.oral-history-project-head > div:last-child small { display: block; }
.oral-history-project-head > div:last-child strong { color: var(--red); font-size: 26px; }
.oral-history-project-head > div:last-child small { color: var(--muted); font-size: 11px; }
.oral-history-session-list { display: grid; margin: 0; padding: 0 20px; border-top: 1px solid var(--line); list-style: none; }
.oral-history-session-list li { min-height: 42px; display: grid; grid-template-columns: minmax(0, 1fr) 76px 100px; gap: 12px; align-items: center; border-bottom: 1px solid #edf0ee; color: #405148; font-size: 13px; }
.oral-history-session-list em { color: #6d7d74; font-style: normal; }
.oral-history-session-list time { color: var(--muted); text-align: right; }
.oral-history-memoir { border-top: 1px solid var(--line); }
.oral-history-memoir summary { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 20px; color: var(--green); cursor: pointer; }
.oral-history-memoir summary span { display: grid; gap: 4px; }
.oral-history-memoir summary small { color: var(--muted); font-size: 11px; font-weight: 500; }
.oral-history-memoir summary em { color: var(--red); font-size: 12px; font-style: normal; font-weight: 800; }
.oral-history-memoir > div { max-height: 620px; overflow-y: auto; padding: 4px 20px 22px; border-top: 1px solid #edf0ee; }
.oral-history-memoir section { padding: 16px 0; border-bottom: 1px solid #edf0ee; }
.oral-history-memoir h5 { margin: 0 0 9px; font-size: 17px; }
.oral-history-memoir p { margin: 0; color: #46554d; font-size: 15px; line-height: 1.9; }
.oral-history-pending { margin: 0; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
@media (max-width: 700px) { .claim-review-item, .membership-summary { align-items: stretch; flex-direction: column; } .claim-review-actions { display: grid; grid-template-columns: 1fr 1fr; } .membership-progress-copy { text-align: left; } }
@media (max-width: 700px) { .oral-history-heading { align-items: stretch; flex-direction: column; gap: 14px; } .oral-history-heading .button { width: 100%; } .oral-history-metrics { grid-template-columns: 1fr; } .oral-history-project-head { grid-template-columns: minmax(0, 1fr) 60px; padding: 16px; } .oral-history-session-list { padding: 0 16px; } .oral-history-session-list li { grid-template-columns: minmax(0, 1fr) auto; } .oral-history-session-list time { display: none; } .oral-history-memoir summary { align-items: flex-start; flex-direction: column; gap: 8px; padding: 14px 16px; } .oral-history-memoir > div { padding: 4px 16px 18px; } }
.oral-history-heading-actions { display: flex; flex: 0 0 auto; gap: 8px; }

/* Personal oral-history workbench: a quiet archive desk inside the family account. */
.personal-oral-shell { min-height: calc(100vh - 116px); border: 1px solid #cbd5ce; background: #f7f9f7; }
.personal-oral-header { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px 28px; color: #fff; background: var(--green); }
.personal-oral-header h2 { margin: 4px 0 7px; color: #fff; font-family: "Songti SC", "STSong", serif; font-size: 30px; letter-spacing: 0; }
.personal-oral-header p { max-width: 760px; margin: 0; color: #d5ddd7; font-size: 13px; line-height: 1.7; }
.personal-oral-header .profile-kicker { color: #e1bd74; font-size: 11px; font-weight: 900; }
.personal-oral-header-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.oral-points-link { min-width: 112px; min-height: 58px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; color: #fff; background: transparent; text-align: left; }
.oral-points-link span { grid-column: 1 / -1; color: #c9d3cc; font-size: 10px; }
.oral-points-link strong { color: #f0ce88; font-size: 20px; }
.personal-oral-header .button.primary { min-height: 58px; border-color: #c64037; background: #b4332d; }
.personal-oral-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #d5ddd8; background: #fff; }
.personal-oral-steps button { min-height: 72px; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 10px; padding: 10px 18px; border: 0; border-right: 1px solid #e4e9e6; color: #536158; background: #fff; text-align: left; }
.personal-oral-steps button:last-child { border-right: 0; }
.personal-oral-steps button.is-active { box-shadow: inset 0 -3px var(--red); color: var(--green); background: #f7faf8; }
.personal-oral-steps b { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #bdc9c1; border-radius: 50%; color: #758179; font-size: 12px; }
.personal-oral-steps .is-active b { border-color: var(--red); color: #fff; background: var(--red); }
.personal-oral-steps span { display: grid; gap: 3px; font-size: 13px; font-weight: 900; }
.personal-oral-steps small { color: #89928c; font-size: 10px; font-weight: 500; }
.personal-oral-body { min-height: 680px; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.personal-oral-projects { border-right: 1px solid #d5ddd8; background: #eef2ef; }
.personal-oral-section-head { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #dce3df; }
.personal-oral-section-head > div { display: grid; gap: 3px; }
.personal-oral-section-head span { color: #7a867e; font-size: 10px; }
.personal-oral-section-head strong { color: var(--green); font-size: 13px; }
.personal-oral-project-list { display: grid; }
.personal-oral-project-button { width: 100%; min-height: 72px; display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-bottom: 1px solid #dce3df; color: #3c4b42; background: transparent; text-align: left; }
.personal-oral-project-button:hover,.personal-oral-project-button.is-active { box-shadow: inset 4px 0 var(--red); background: #fff; }
.personal-oral-project-button > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5b7062; font-family: "Songti SC", "STSong", serif; font-size: 18px; }
.personal-oral-project-button div { min-width: 0; display: grid; gap: 4px; }
.personal-oral-project-button strong,.personal-oral-project-button small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.personal-oral-project-button strong { font-size: 13px; }
.personal-oral-project-button small { color: #7e8982; font-size: 10px; }
.personal-oral-workbench { min-width: 0; background: #fff; }
.personal-oral-welcome { min-height: 620px; display: grid; align-content: center; justify-items: center; padding: 40px; text-align: center; }
.personal-oral-welcome > span { width: 72px; height: 72px; display: grid; place-items: center; border: 1px solid #c9d4cc; border-radius: 50%; color: var(--red); font-family: "Songti SC", "STSong", serif; font-size: 34px; }
.personal-oral-welcome h3 { margin: 20px 0 8px; color: var(--green); font-size: 24px; }
.personal-oral-welcome p { max-width: 460px; margin: 0 0 22px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.personal-oral-active-head { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 22px; border-bottom: 1px solid #dce3df; }
.personal-oral-active-head p { margin: 0 0 3px; color: #8a5f29; font-size: 10px; font-weight: 900; }
.personal-oral-active-head h3 { margin: 0; color: var(--green); font-family: "Songti SC", "STSong", serif; font-size: 23px; }
.personal-oral-active-head > span { color: #758179; font-size: 10px; }
.personal-oral-stage { display: none; }
.personal-oral-stage.is-active { display: block; }
.oral-interview-grid { display: grid; grid-template-columns: 185px minmax(0, 1fr); }
.oral-session-rail { min-height: 600px; border-right: 1px solid #dce3df; background: #fafbfa; }
.oral-session-button { width: 100%; min-height: 58px; display: grid; gap: 5px; padding: 11px 14px; border: 0; border-bottom: 1px solid #e6ebe8; color: #4d5b52; background: transparent; text-align: left; }
.oral-session-button.is-active { box-shadow: inset 3px 0 #b88a42; color: var(--green); background: #fff; }
.oral-session-button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.oral-session-button span { color: #89938c; font-size: 10px; }
.oral-interview-stage { min-width: 0; padding: 20px; }
.oral-question-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.oral-question-tools label { display: flex; align-items: center; gap: 8px; color: #6d786f; font-size: 11px; font-weight: 800; }
.oral-question-tools select { min-height: 34px; border: 1px solid #ccd5cf; border-radius: 4px; padding: 0 28px 0 9px; color: var(--green); background: #fff; }
.oral-current-question { padding: 24px 4px 20px; text-align: center; }
.oral-current-question span { color: #a06a27; font-size: 10px; font-weight: 900; }
.oral-current-question h4 { max-width: 690px; margin: 7px auto 0; color: #1f3527; font-family: "Songti SC", "STSong", serif; font-size: 26px; line-height: 1.45; }
.oral-recorder { min-height: 150px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 18px 24px; border: 1px solid #d5ddd8; border-top: 3px solid var(--green); background: #f7faf8; }
.oral-recorder > div { display: grid; gap: 4px; }
.oral-recorder > div span { color: #707d74; font-size: 11px; }
.oral-recorder > div strong { color: var(--green); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 28px; }
.oral-recorder > button { width: 98px; height: 98px; display: grid; place-items: center; align-content: center; gap: 7px; border: 6px solid #f3d5d2; border-radius: 50%; color: #fff; background: var(--red); box-shadow: 0 0 0 1px #ca817b; }
.oral-recorder > button i { width: 19px; height: 19px; display: block; border-radius: 50%; background: #fff; }
.oral-recorder > button b { font-size: 11px; }
.oral-recorder.is-recording > button { animation: personal-oral-pulse 1.5s ease-in-out infinite; }
.oral-recorder.is-recording > button i { border-radius: 2px; }
.oral-recorder > p { max-width: 150px; margin: 0; color: #718078; font-size: 10px; line-height: 1.6; }
@keyframes personal-oral-pulse { 50% { box-shadow: 0 0 0 12px rgba(180,51,45,.12); } }
.oral-task-progress { margin-top: 10px; padding: 14px; border: 1px solid #d7dfda; background: #fff; }
.oral-task-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; }
.oral-task-progress > i { height: 5px; display: block; margin: 10px 0 7px; overflow: hidden; background: #e4e9e6; }
.oral-task-progress > i b { height: 100%; display: block; background: var(--green-2); transition: width .2s ease; }
.oral-task-progress p { margin: 0; color: #7b867f; font-size: 10px; }
.oral-pending-recordings { margin-top: 10px; border: 1px solid #d6bd8e; background: #fffaf0; }
.oral-pending-recordings > div { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; }
.oral-pending-recordings span { display: grid; gap: 4px; color: #5e4c2f; }
.oral-pending-recordings strong { font-size: 12px; }
.oral-pending-recordings small { color: #8a7657; font-size: 9px; }
.oral-pending-recordings .button { min-height: 34px; flex: 0 0 auto; font-size: 10px; }
.oral-guidance { margin-top: 16px; border: 1px solid #d7dfda; background: #fffdf8; }
.oral-guidance > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; border-bottom: 1px solid #e9e0d1; }
.oral-guidance header span { color: #9a6a2f; font-size: 9px; font-weight: 900; }
.oral-guidance h4 { margin: 2px 0 0; color: var(--green); font-size: 16px; }
.oral-guidance > p { margin: 0; padding: 12px 15px; color: #69766e; font-size: 11px; line-height: 1.7; }
#personalOralGuidanceList { display: grid; }
#personalOralGuidanceList article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 15px; border-top: 1px solid #eee6d8; }
#personalOralGuidanceList article div { display: grid; gap: 4px; }
#personalOralGuidanceList article span { color: #99703f; font-size: 9px; }
#personalOralGuidanceList article strong { color: #2c4033; font-size: 13px; }
#personalOralGuidanceList article p { margin: 0; color: #78827c; font-size: 10px; }
.oral-turns { margin-top: 16px; border: 1px solid #d7dfda; }
.oral-turn-row { min-height: 66px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid #e7ece9; }
.oral-turn-row:last-child { border-bottom: 0; }
.oral-turn-row > span { color: #b08a53; font-family: ui-monospace, monospace; font-size: 11px; }
.oral-turn-row div { min-width: 0; }
.oral-turn-row strong { display: block; color: #304238; font-size: 12px; }
.oral-turn-row p { max-height: 42px; margin: 5px 0 0; overflow: hidden; color: #6f7a73; font-size: 11px; line-height: 1.7; }
.personal-oral-empty { margin: 0; padding: 22px 15px; color: #859088; font-size: 11px; line-height: 1.7; text-align: center; }
.oral-stage-heading { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; border-bottom: 1px solid #dce3df; }
.oral-stage-heading span { color: #9a6b2e; font-size: 10px; font-weight: 900; }
.oral-stage-heading h3 { margin: 3px 0 5px; color: var(--green); font-size: 22px; }
.oral-stage-heading p { max-width: 680px; margin: 0; color: #738078; font-size: 11px; line-height: 1.7; }
.oral-stage-heading > div:last-child { display: flex; gap: 8px; }
.personal-oral-transcript-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 18px; }
.personal-oral-transcript-list article { min-width: 0; padding: 16px; border: 1px solid #d8e0db; background: #fff; }
.personal-oral-transcript-list header { display: flex; justify-content: space-between; gap: 12px; color: #8f672f; font-size: 9px; }
.personal-oral-transcript-list h4 { margin: 12px 0 7px; color: var(--green); font-size: 15px; }
.personal-oral-transcript-list p { min-height: 72px; max-height: 108px; overflow: hidden; color: #59675f; font-size: 12px; line-height: 1.8; }
.personal-oral-transcript-list .button { min-height: 34px; font-size: 11px; }
.oral-fact-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid #dce3df; background: #eef3ef; }
.oral-fact-metrics span { padding: 14px 18px; border-right: 1px solid #d6dfd9; color: #718078; font-size: 10px; }
.oral-fact-metrics strong { display: block; margin-bottom: 3px; color: var(--green); font-size: 22px; }
.oral-fact-row { min-height: 84px; display: grid; grid-template-columns: minmax(0, 1fr) 120px; align-items: center; gap: 20px; padding: 15px 22px; border-bottom: 1px solid #e2e7e4; }
.oral-fact-row > div { display: grid; gap: 4px; }
.oral-fact-row span,.oral-fact-row p { color: #7c877f; font-size: 10px; }
.oral-fact-row strong { color: #2c4033; font-size: 14px; }
.oral-fact-row p { margin: 0; }
.oral-fact-row aside { display: grid; justify-items: end; gap: 4px; }
.oral-fact-row aside b { color: #9b6b2e; font-size: 10px; }
.oral-fact-row aside b.is-subject_confirmed,.oral-fact-row aside b.is-family_confirmed { color: #2f734b; }
.oral-fact-row aside small { color: #89928d; font-size: 9px; }
.oral-conflict { margin: 12px 20px; padding: 13px 15px; border-left: 3px solid var(--red); background: #fff5f4; }
.oral-conflict strong { color: #99342e; font-size: 12px; }
.oral-conflict p { margin: 4px 0 0; color: #7d5e5b; font-size: 11px; }
.oral-history-checks { margin: 16px 20px; border: 1px solid #d6dfd9; background: #f8faf8; }
.oral-history-checks > header { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid #dfe6e1; color: var(--green); }
.oral-history-checks > header strong { font-size: 13px; }
.oral-history-checks > header span { color: #7c8880; font-size: 9px; }
.oral-history-checks > p { margin: 0; padding: 14px; color: #69766e; font-size: 11px; line-height: 1.7; }
.oral-history-checks > article { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 14px; padding: 13px 14px; border-bottom: 1px solid #e4e9e6; }
.oral-history-checks > article:last-child { border-bottom: 0; }
.oral-history-checks article > b { align-self: start; padding: 4px 6px; color: #2f6647; background: #e8f2eb; font-size: 9px; text-align: center; }
.oral-history-checks article > b.is-inconsistent { color: #9b342d; background: #fff0ee; }
.oral-history-checks article > b.is-needs_review,.oral-history-checks article > b.is-insufficient_evidence { color: #8c642d; background: #f8eedc; }
.oral-history-checks article div { display: grid; gap: 5px; }
.oral-history-checks article strong { color: #34483b; font-size: 11px; line-height: 1.6; }
.oral-history-checks article p { margin: 0; color: #78847c; font-size: 10px; line-height: 1.6; }
.oral-history-checks.is-error { border-color: #e2b8b4; background: #fff7f6; }
.oral-memoir-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .8fr); }
.oral-memoir-grid > section { border-right: 1px solid #dce3df; }
.oral-chapter-row { min-height: 82px; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 15px 18px; border-bottom: 1px solid #e3e8e5; }
.oral-chapter-row > span { color: #a47539; font-family: ui-monospace, monospace; font-size: 12px; }
.oral-chapter-row strong { color: var(--green); font-size: 14px; }
.oral-chapter-row p { margin: 6px 0; color: #69766e; font-size: 11px; line-height: 1.7; }
.oral-chapter-row small { color: #8a948e; font-size: 9px; }
.oral-upload-control { min-height: 30px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid #bdc9c1; border-radius: 4px; color: var(--green); background: #fff; font-size: 10px; font-weight: 800; cursor: pointer; }
.oral-upload-control input { display: none; }
#personalOralAssets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; }
.oral-asset { margin: 0; overflow: hidden; border: 1px solid #d9e0dc; background: #fff; }
.oral-asset img { width: 100%; aspect-ratio: 1.15; display: block; object-fit: cover; }
.oral-asset figcaption { display: grid; gap: 4px; padding: 8px; color: #59675f; font-size: 9px; }
.oral-asset figcaption strong,.oral-asset figcaption span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oral-asset figcaption strong { color: #34483b; font-size: 10px; }
.oral-asset figcaption span { color: #7c8880; }
.oral-asset figcaption .text-button { justify-self: start; padding: 2px 0; font-size: 9px; }
.oral-video-asset { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid #d9e0dc; }
.oral-video-asset > span { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--green); font-size: 9px; }
.oral-video-asset div { min-width: 0; display: grid; gap: 3px; }
.oral-video-asset strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.oral-video-asset small { overflow: hidden; color: #7c8880; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.oral-video-asset p { display: flex; align-items: center; gap: 10px; margin: 0; }
.oral-video-asset a { color: var(--red); font-size: 9px; }
.oral-generated-memoir { margin: 15px 18px; border: 1px solid #d8e0db; }
.oral-generated-memoir summary { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 15px; color: var(--green); cursor: pointer; }
.oral-generated-memoir summary span { display: grid; gap: 4px; }
.oral-generated-memoir summary small { color: #7c8880; font-size: 9px; }
.oral-generated-memoir summary em { color: var(--red); font-size: 10px; font-style: normal; }
.oral-generated-memoir > div { max-height: 620px; overflow: auto; padding: 4px 18px 18px; border-top: 1px solid #e4e9e6; }
.oral-generated-memoir section { padding: 14px 0; border-bottom: 1px solid #e7ece9; }
.oral-generated-memoir h4 { margin: 0 0 8px; color: var(--green); font-size: 17px; }
.oral-generated-memoir p { color: #46554d; font-size: 13px; line-height: 1.9; white-space: pre-wrap; }
#personalOralStatus { min-height: 28px; margin: 0; padding: 7px 16px; border-top: 1px solid #dce3df; color: #4f6e59; background: #f3f7f4; font-size: 10px; }
#personalOralStatus.is-error { color: #9d352e; background: #fff4f3; }
.personal-oral-dialog { width: min(680px, calc(100vw - 28px)); max-height: calc(100vh - 30px); padding: 0; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 24px 70px rgba(20,40,28,.25); }
.personal-oral-small-dialog { width: min(480px, calc(100vw - 28px)); }
.personal-oral-dialog::backdrop { background: rgba(18,31,23,.62); }
.personal-oral-dialog form { max-height: inherit; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.personal-oral-dialog form > header { min-height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; color: #fff; background: var(--green); }
.personal-oral-dialog header span { color: #e1bd74; font-size: 10px; }
.personal-oral-dialog header h2 { margin: 3px 0 0; color: #fff; font-size: 21px; }
.personal-oral-dialog header button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); font-size: 22px; }
.personal-oral-dialog-body { display: grid; gap: 14px; padding: 20px; overflow-y: auto; }
.personal-oral-dialog-body label { display: grid; gap: 6px; color: #536159; font-size: 11px; font-weight: 800; }
.personal-oral-dialog-body input,.personal-oral-dialog-body select,.personal-oral-dialog-body textarea { width: 100%; min-height: 42px; border: 1px solid #cbd5cf; border-radius: 4px; padding: 9px 10px; color: #263a2d; background: #fbfcfb; }
.oral-asset-people { margin: 0; padding: 10px 12px 12px; border: 1px solid #cbd5cf; border-radius: 4px; }
.oral-asset-people legend { padding: 0 4px; color: #536159; font-size: 11px; font-weight: 800; }
.oral-asset-people > div { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.oral-asset-people label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.oral-asset-people input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--green); }
.oral-asset-people small { color: #7c8880; font-size: 10px; }
.personal-oral-dialog form > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 13px 20px; border-top: 1px solid #dce3df; }
.oral-onboarding-form .personal-oral-dialog-body { gap: 22px; padding: 24px; }
.oral-onboarding-section { display: grid; gap: 12px; }
.oral-onboarding-section h3 { margin: 0; color: #263a2d; font-size: 20px; line-height: 1.45; }
.oral-choice-grid { display: grid; gap: 10px; }
.oral-choice-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.oral-choice-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.oral-choice-grid label { position: relative; min-width: 0; cursor: pointer; }
.oral-choice-grid input { position: absolute; opacity: 0; pointer-events: none; }
.oral-choice-grid span { min-height: 82px; display: grid; align-content: center; gap: 5px; padding: 14px 16px; border: 2px solid #cbd5cf; border-radius: 6px; color: #33483a; background: #fff; }
.oral-choice-grid b { font-size: 17px; }
.oral-choice-grid small { color: #69776e; font-size: 13px; line-height: 1.5; }
.oral-choice-grid input:checked + span { border-color: #2f6348; background: #edf5ef; box-shadow: inset 0 0 0 1px #2f6348; }
.oral-choice-grid input:focus-visible + span { outline: 3px solid rgba(200, 22, 29, .25); outline-offset: 2px; }
.oral-onboarding-form .field-grid label { font-size: 14px; }
.oral-onboarding-form .field-grid input,.oral-onboarding-form .field-grid select,.oral-onboarding-form .field-grid textarea { min-height: 52px; padding: 12px 13px; font-size: 16px; }
.oral-onboarding-note { margin: 0; padding: 14px 16px; border-left: 4px solid #b7904f; color: #536159; background: #f8f4e9; font-size: 14px; line-height: 1.7; }
.oral-large-action { min-height: 52px; padding-inline: 24px; font-size: 16px; }
.oral-text-review-dialog { width: min(900px, calc(100vw - 28px)); }
.oral-ai-edit-tools { display: grid; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid #dce3df; }
.oral-ai-edit-tools h3 { margin: 0; color: #263a2d; font-size: 20px; }
.oral-ai-edit-tools p { margin: 5px 0 0; color: #69766e; font-size: 13px; line-height: 1.7; }
.oral-ai-edit-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.oral-ai-edit-modes button { min-height: 100px; display: grid; align-content: center; gap: 5px; padding: 14px; border: 2px solid #cbd5cf; border-radius: 6px; color: #2f4636; background: #fff; text-align: left; cursor: pointer; }
.oral-ai-edit-modes button:hover,.oral-ai-edit-modes button:focus-visible { border-color: #2f6348; background: #f2f7f3; }
.oral-ai-edit-modes button:disabled { cursor: wait; opacity: .58; }
.oral-ai-edit-modes b { font-size: 17px; }
.oral-ai-edit-modes span { color: #69766e; font-size: 12px; }
.oral-ai-edit-modes small { color: #a23a31; font-size: 11px; font-weight: 800; }
.oral-source-editor { display: grid; gap: 8px; color: #435348; font-size: 14px; font-weight: 800; }
.oral-source-editor textarea { min-height: 210px; font-size: 16px; line-height: 1.9; resize: vertical; }
.oral-text-proposal { border: 1px solid #cbd5cf; background: #f8faf8; }
.oral-text-proposal > header { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; border-bottom: 1px solid #dce3df; }
.oral-text-proposal > header > div { display: grid; gap: 4px; }
.oral-text-proposal > header strong { color: #263e2e; font-size: 16px; }
.oral-text-proposal > header span { color: #738078; font-size: 11px; }
.oral-change-list { max-height: 330px; overflow-y: auto; }
.oral-change-row { min-height: 84px; display: grid; grid-template-columns: 24px minmax(0,1fr); align-items: start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #e0e6e2; cursor: pointer; }
.oral-change-row input { width: 20px; min-height: 20px; margin-top: 3px; accent-color: #2f6348; }
.oral-change-row > span { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.oral-change-row del,.oral-change-row ins { padding: 8px 10px; font-size: 14px; line-height: 1.65; text-decoration: none; white-space: pre-wrap; }
.oral-change-row del { color: #8f403a; background: #fff0ee; }
.oral-change-row ins { color: #285b3d; background: #eaf4ed; }
.oral-change-row small { grid-column: 1/-1; color: #718078; font-size: 11px; }
.oral-change-row.is-sensitive { border-left: 4px solid #b67b2d; }
.oral-text-proposal > footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 15px; }
.oral-text-proposal > footer label { display: flex; align-items: center; gap: 8px; color: #4b5c51; font-size: 13px; font-weight: 800; }
.oral-text-proposal > footer input { width: 19px; height: 19px; accent-color: #2f6348; }
.oral-truth-warning { margin: 0; padding: 12px 14px; border-left: 4px solid #b7904f; color: #65563e; background: #faf5e9; font-size: 12px; line-height: 1.7; }
.oral-chapter-row { grid-template-columns: 34px minmax(0, 1fr) auto; }
.oral-chapter-row .text-button { align-self: center; min-width: 58px; min-height: 42px; font-size: 13px; }

@media (max-width: 1100px) {
  .personal-oral-body { grid-template-columns: 210px minmax(0, 1fr); }
  .oral-interview-grid { grid-template-columns: 155px minmax(0, 1fr); }
  .oral-recorder { grid-template-columns: minmax(90px, 1fr) auto minmax(90px, 1fr); padding-inline: 14px; }
}
@media (max-width: 820px) {
  .personal-oral-header { align-items: flex-start; flex-direction: column; }
  .personal-oral-header-actions { width: 100%; }
  .personal-oral-header-actions .button { flex: 1; }
  .personal-oral-body { grid-template-columns: 1fr; }
  .personal-oral-projects { border-right: 0; border-bottom: 1px solid #d5ddd8; }
  .personal-oral-project-list { grid-auto-flow: column; grid-auto-columns: minmax(210px, 70%); overflow-x: auto; }
  .personal-oral-project-button { border-right: 1px solid #dce3df; }
  .oral-interview-grid { grid-template-columns: 1fr; }
  .oral-session-rail { min-height: auto; border-right: 0; border-bottom: 1px solid #dce3df; }
  #personalOralSessionList { display: flex; overflow-x: auto; }
  .oral-session-button { min-width: 180px; border-right: 1px solid #e6ebe8; }
  .personal-oral-transcript-list { grid-template-columns: 1fr; }
  .oral-memoir-grid { grid-template-columns: 1fr; }
  .oral-memoir-grid > section { border-right: 0; border-bottom: 1px solid #dce3df; }
}
@media (max-width: 600px) {
  .oral-history-heading-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .personal-oral-shell { border-inline: 0; }
  .personal-oral-header { min-height: 0; padding: 20px 16px; }
  .personal-oral-header h2 { font-size: 23px; }
  .personal-oral-header-actions { display: grid; grid-template-columns: 1fr 1.3fr; }
  .oral-points-link,.personal-oral-header .button.primary { min-height: 50px; }
  .personal-oral-steps { grid-template-columns: repeat(4, minmax(66px, 1fr)); overflow-x: auto; }
  .personal-oral-steps button { min-width: 76px; min-height: 66px; grid-template-columns: 1fr; justify-items: center; gap: 3px; padding: 7px 5px; text-align: center; }
  .personal-oral-steps b { width: 22px; height: 22px; }
  .personal-oral-steps small { display: none; }
  .personal-oral-active-head { align-items: flex-start; flex-direction: column; gap: 6px; padding: 13px 14px; }
  .oral-interview-stage { padding: 14px 12px; }
  .oral-question-tools { align-items: stretch; }
  .oral-question-tools label { display: grid; gap: 4px; }
  .oral-current-question h4 { font-size: 22px; }
  .oral-recorder { min-height: 210px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .oral-recorder > button { width: 90px; height: 90px; grid-row: 1 / 3; grid-column: 2; justify-self: center; }
  .oral-recorder > p { max-width: none; }
  #personalOralGuidanceList article { align-items: stretch; flex-direction: column; }
  #personalOralGuidanceList .button { width: 100%; }
  .oral-pending-recordings > div { align-items: stretch; flex-direction: column; }
  .oral-pending-recordings .button { width: 100%; }
  .oral-stage-heading { align-items: stretch; flex-direction: column; padding: 16px 14px; }
  .oral-stage-heading > div:last-child { display: grid; grid-template-columns: 1fr 1fr; }
  .personal-oral-transcript-list { padding: 12px; }
  .oral-fact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oral-fact-row { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .oral-fact-row aside { grid-template-columns: auto 1fr auto; align-items: center; justify-items: start; }
  .oral-history-checks { margin: 12px; }
  .oral-history-checks > article { grid-template-columns: 1fr; gap: 8px; }
  #personalOralAssetDialog form { height: calc(100vh - 30px); }
  .personal-oral-dialog-body.field-grid { grid-template-columns: 1fr; }
  .personal-oral-dialog-body .span-2 { grid-column: auto; }
  .oral-onboarding-form .personal-oral-dialog-body { padding: 18px 15px; }
  .oral-onboarding-section h3 { font-size: 19px; }
  .oral-choice-grid-2,.oral-choice-grid-3 { grid-template-columns: 1fr; }
  .oral-choice-grid span { min-height: 72px; }
  .personal-oral-dialog form > footer { display: grid; grid-template-columns: .8fr 1.4fr; padding: 12px 15px; }
  .personal-oral-dialog form > footer .button { min-height: 52px; font-size: 15px; }
  .oral-chapter-row { grid-template-columns: 30px minmax(0, 1fr); }
  .oral-chapter-row .text-button { grid-column: 2; justify-self: start; }
  .oral-ai-edit-modes { grid-template-columns: 1fr; }
  .oral-ai-edit-modes button { min-height: 82px; }
  .oral-change-row > span { grid-template-columns: 1fr; }
  .oral-change-row small { grid-column: auto; }
  .oral-text-proposal > footer { align-items: stretch; flex-direction: column; }
  .oral-text-proposal > footer .button { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .oral-recorder.is-recording > button { animation: none; } }
.claim-page { min-height: 100vh; background: #edf1ee; }
.claim-main { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 40px 18px; }
.claim-card { width: min(100%, 560px); padding: 34px; border: 1px solid #cdd7d0; border-top: 5px solid var(--green); border-radius: 8px; background: #fff; box-shadow: 0 18px 48px rgba(30, 55, 41, .12); }
.claim-kicker { margin: 0 0 8px; color: var(--red); font-size: 13px; font-weight: 800; }
.claim-card h1 { margin: 0; color: var(--green); font-size: 30px; line-height: 1.35; }
.claim-intro, .claim-note, .claim-error > p { color: var(--muted); line-height: 1.75; }
.claim-identity { display: flex; align-items: center; gap: 15px; margin: 25px 0 18px; padding: 18px 0; border-block: 1px solid var(--line); }
.claim-identity > span { width: 56px; height: 56px; display: grid; flex: 0 0 auto; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: 24px; font-weight: 800; }
.claim-identity strong { font-size: 22px; }
.claim-identity p { margin: 5px 0 0; color: var(--muted); }
.claim-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.claim-metrics span { padding: 14px; border: 1px solid var(--line); background: #f7f9f7; color: var(--muted); font-size: 12px; }
.claim-metrics strong { display: block; margin-bottom: 3px; color: var(--green); font-size: 24px; }
.claim-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: 10px; margin-top: 22px; }
.claim-actions .button { justify-content: center; text-decoration: none; }
.claim-note { margin: 18px 0 0; font-size: 12px; }
@media (max-width: 560px) { .claim-card { padding: 25px 20px; } .claim-card h1 { font-size: 25px; } .claim-actions { grid-template-columns: 1fr; } }
.admin-collapse-toggle { flex: 0 0 auto; min-width: 76px; }
.admin-message-card { border-color: #aac5b0; box-shadow: 0 3px 14px rgba(31, 73, 48, .08); }
.admin-message-card .admin-table-head { background: #f4faf6; }
.admin-message-type {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.admin-message-type.is-inquiry { border-color: #b88943; color: #714b16; background: #fff8eb; }
.admin-table-tools { grid-template-columns: minmax(220px, 1fr) auto; align-items: center; }
.admin-genealogy-form {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}
.admin-genealogy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}
.admin-genealogy-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.admin-genealogy-grid input,
.admin-genealogy-grid select,
.admin-genealogy-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.admin-genealogy-grid textarea {
  resize: vertical;
  line-height: 1.5;
}
.admin-genealogy-wide { grid-column: 1 / -1; }
.admin-cell-muted {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.admin-row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-row-actions .button { min-height: 30px; padding: 0 10px; font-size: 12px; }
.admin-banner-form { display: grid; grid-template-columns: minmax(280px, .7fr) minmax(420px, 1.3fr); gap: 18px; padding: 18px; background: #fbfcfb; }
.admin-banner-form > .admin-row-actions { grid-column: 1 / -1; align-items: center; }
.admin-banner-preview { position: relative; overflow: hidden; min-height: 210px; border-radius: 8px; background: #233a2b; }
.admin-banner-preview::after { position: absolute; inset: 35% 0 0; content: ""; background: linear-gradient(transparent, rgba(20, 29, 23, .9)); }
.admin-banner-preview img { width: 100%; height: 100%; min-height: 210px; object-fit: cover; }
.admin-banner-preview > div { position: absolute; z-index: 1; right: 18px; bottom: 17px; left: 18px; color: #fff; }
.admin-banner-preview strong, .admin-banner-preview span { display: block; }
.admin-banner-preview strong { font-size: 23px; }
.admin-banner-preview span { margin-top: 6px; color: rgba(255,255,255,.82); font-size: 13px; }
.admin-banner-enable { display: flex !important; min-height: 40px; align-items: center; grid-template-columns: auto 1fr !important; }
.admin-banner-enable input { width: 18px; min-height: auto; }
.admin-banner-status { color: var(--green); font-size: 13px; font-weight: 800; }
.admin-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.admin-status-badge.is-approved {
  border-color: var(--green-2);
  color: #fff;
  background: var(--green-2);
}
.admin-status-badge.is-rejected,
.admin-status-badge.is-deleted {
  border-color: #d8cbc7;
  color: var(--red);
  background: #fff2f0;
}
.admin-row-actions .button.secondary.is-approved,
.admin-row-actions .button.is-approved {
  border-color: var(--green-2);
  color: #fff !important;
  background: var(--green-2) !important;
  box-shadow: 0 0 0 2px rgba(47, 99, 72, .12);
}
.admin-message-content {
  display: grid;
  gap: 8px;
  min-width: 260px;
  white-space: normal;
}
.admin-message-reply-view {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border-left: 3px solid var(--green-2);
  background: var(--soft-green);
  color: #34423a;
}
.admin-message-reply-view strong {
  color: var(--green);
}
.admin-message-reply-view span {
  color: var(--muted);
  font-size: 12px;
}
.admin-message-reply {
  display: grid;
  gap: 7px;
  min-width: 240px;
  margin-top: 8px;
}
.admin-message-reply textarea {
  width: 100%;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfb;
  resize: vertical;
}
.admin-message-reply .admin-reply-confirm {
  min-height: 34px;
  padding: 0 12px;
  border-color: var(--green);
  color: #fff;
  background: var(--green);
  font-size: 12px;
  justify-self: start;
}
.admin-visit-layout { display: grid; grid-template-columns: 1.35fr .85fr; gap: 0; }
.admin-site-visit-table { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.admin-site-visit-table .admin-table { min-width: 760px; }
.admin-site-visit-table tr.is-selected td { background: #f4faf6; }
.admin-site-button {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.admin-site-button:hover strong { text-decoration: underline; }
.admin-visit-detail-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}
.admin-visit-detail-head[hidden] { display: none; }
.admin-visit-detail-head h3 { margin: 0; color: var(--green); font-size: 16px; }
.admin-visit-detail-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.admin-visit-layout .admin-visit-table + .admin-visit-table { border-left: 1px solid var(--line); }
.admin-visit-table { max-height: 420px; }
.admin-visit-table .admin-table { min-width: 420px; }
.admin-table-wrap { overflow: auto; max-height: 580px; }
.admin-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
.admin-table th { position: sticky; top: 0; z-index: 1; background: #eef4ef; color: var(--green); font-size: 12px; }
.admin-table tr:hover td { background: #fbfcfb; }
.admin-empty { color: var(--muted); text-align: center !important; }

@media (max-width: 980px) {
  .nav { overflow-x: auto; max-width: 72vw; }
  .service-grid, .about-grid { grid-template-columns: 1fr 1fr; }
  .steps-grid, .process-row, .price-grid, .addon-grid { grid-template-columns: 1fr 1fr; }
  .home-start { grid-template-columns: 1fr; }
  .memory-film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-roots-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .global-roots-head { grid-template-columns: 1fr; align-items: start; }
  .process-row article { border-bottom: 1px solid var(--line); }
  .auth-shell, .tree-workspace, .share-layout, .legacy-summary { grid-template-columns: 1fr; }
  .login-experience { width: min(560px, 100%); grid-template-columns: 1fr; gap: 40px; }
  .login-only-card { order: 1; }
  .login-miniapp-panel { order: 2; width: min(100%, 420px); }
  .login-miniapp-lead { margin-inline: auto; }
  .login-miniapp-content { justify-content: center; text-align: left; }
  .admin-login, .admin-login-form { grid-template-columns: 1fr; }
  .admin-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-table-head, .admin-toolbar, .admin-head { display: grid; }
  .admin-table-tools { grid-template-columns: 1fr; }
  .admin-genealogy-grid { grid-template-columns: 1fr; }
  .admin-banner-form { grid-template-columns: 1fr; }
  .admin-visit-layout { grid-template-columns: 1fr; }
  .admin-visit-layout .admin-table-wrap + .admin-table-wrap { border-left: 0; border-top: 1px solid var(--line); }
  .surname-profile-grid, .surname-related-grid, .surname-material-list-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genealogy-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genealogy-books-toolbar { grid-template-columns: 1fr; }
  .genealogy-seo-stats,
  .genealogy-seo-layout,
  .genealogy-seo-detail,
  .genealogy-index-grid {
    grid-template-columns: 1fr;
  }
  .genealogy-seo-list > a {
    display: grid;
  }
  .genealogy-seo-list > a span {
    text-align: left;
  }
  .genealogy-library-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .genealogy-library-layout { grid-template-columns: 1fr; }
  .genealogy-library-facets {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pedigree-feature-grid, .pedigree-process, .pedigree-topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pedigree-promo-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pedigree-audience-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-shell { grid-template-columns: 1fr; }
  .workspace-sidebar { position: static; height: auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-family { padding: 0; }
  .workspace-nav { display: flex; overflow-x: auto; }
  .workspace-user { display: none; }
}

@media (max-width: 680px) {
  #oldPedigreeImport { font-size: 16px; }
  .old-pedigree-intro { display: grid; gap: 16px; }
  .old-pedigree-intro h2 { font-size: 26px; }
  .old-pedigree-steps { margin: 20px 0 26px; }
  .old-pedigree-steps li { display: grid; justify-items: center; gap: 4px; text-align: center; }
  .old-pedigree-steps small { display: none; }
  .old-pedigree-stage { min-height: 330px; }
  .old-pedigree-candidate { grid-template-columns: 1fr; }
  .old-pedigree-candidate-actions { flex-wrap: wrap; }
  .old-pedigree-candidate-relation input { width: calc(50% - 34px); min-width: 110px; }
  .old-pedigree-ready-summary { gap: 24px; }
  .old-pedigree-privacy { display: grid; gap: 4px; }
  .topbar {
    min-height: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 28px 12px 10px;
  }
  .language-switch { top: 4px; right: 12px; }
  .brand-logo { width: 42px; height: 42px; }
  .topbar-slogan { flex: 1 1 auto; min-width: 0; font-size: 20px; }
  .topbar-stats { order: 3; transform: scale(.9); transform-origin: right center; margin-left: auto; }
  .site-summary-bar {
    width: min(100% - 28px, 1180px);
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px;
    font-size: clamp(22px, 5.8vw, 28px);
  }
  .site-summary-bar a {
    min-height: 40px;
    padding: 0 16px;
    font-size: 17px;
  }
  .site-hero > .site-summary-bar {
    top: 14px;
    right: 16px;
    left: 16px;
    width: auto;
    min-height: 44px;
    gap: 8px 12px;
    font-size: 20px;
  }
  .site-hero > .site-summary-bar a {
    min-height: 36px;
    padding: 0 13px;
    font-size: 15px;
  }
  .nav {
    order: 5;
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 4px 6px;
    margin-left: 0;
    padding-bottom: 2px;
    overflow: visible;
  }
  .nav a, .nav button { min-height: 34px; padding: 0 9px; font-size: 12px; white-space: nowrap; }
  .utility-link { display: none !important; }
  .person-detail-modal { padding: 0; place-items: stretch; }
  .person-detail-card { width: 100%; max-height: 100vh; }
  .person-detail-content { padding: 18px 14px 22px; }
  .site-relation-card { display: grid; }
  .site-relation-card h2 { font-size: 28px; }
  .site-relation-graph .graph-row, .classic-tabs { grid-template-columns: 1fr; }
  .pedigree-record-block > div:not(.detail-section-head) { grid-template-columns: 86px 1fr; }
  .site-hero {
    width: min(100% - 28px, 1180px);
    min-height: min(374px, calc(100svh - 96px));
    margin-top: 14px;
    padding: 28px 16px 34px;
    align-items: flex-end;
    background-position: 58% top;
  }
  .site-hero::after { width: min(320px, calc(100% - 32px)); left: 16px; bottom: 26px; }
  .site-hero-copy { margin-top: 84px; }
  .site-hero h1 { font-size: 34px; line-height: 1.12; }
  .site-hero h1 span { white-space: normal; }
  .hero-lines { gap: 6px; font-size: 17px; line-height: 1.45; }
  .hero-lines span { white-space: normal; }
  .site-hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .section { width: min(100% - 28px, 1180px); padding: 48px 0; }
  .pedigree-promo { width: min(100% - 28px, 1180px); padding: 42px 0 54px; }
  .pedigree-promo-copy h1 { font-size: 34px; }
  .pedigree-promo-copy p { font-size: 16px; }
  .pedigree-promo-list { grid-template-columns: 1fr; gap: 24px; }
  .pedigree-promo-card img { aspect-ratio: 4 / 3; }
  .pedigree-promo-text { grid-template-columns: 1fr; gap: 8px; padding: 18px; }
  .pedigree-promo-index, .pedigree-promo-text h2 { font-size: 25px; }
  .pedigree-feature-grid, .pedigree-process, .pedigree-topic-grid, .pedigree-audience-grid { grid-template-columns: 1fr; }
  .pedigree-service-list article { grid-template-columns: 1fr; gap: 8px; }
  .pedigree-service-link {
    width: min(100% - 28px, 1180px);
    align-items: stretch;
    flex-direction: column;
    margin-bottom: 8px;
  }
  .pedigree-service-link .button { width: 100%; }
  .genealogy-category-grid,
  .genealogy-list,
  .genealogy-book-list.is-gallery-view,
  .genealogy-book-files,
  .genealogy-volume-list,
  .genealogy-processing-plan,
  .genealogy-article {
    grid-template-columns: 1fr;
  }
  .genealogy-category-grid a {
    min-height: 0;
    padding: 20px;
  }
  .genealogy-list a {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .genealogy-book-main {
    display: grid;
  }
  .genealogy-library-search,
  .genealogy-library-facets {
    grid-template-columns: 1fr;
  }
  .genealogy-library-result-head,
  .genealogy-library-search-actions {
    align-items: stretch;
    flex-direction: column;
  }
  .genealogy-book-meta {
    justify-items: start;
  }
  .genealogy-pdf-reader-head,
  .genealogy-pdf-toolbar,
  .genealogy-pdf-controls {
    align-items: stretch;
  }
  .genealogy-reader-workspace {
    height: min(720px, calc(100vh - 180px));
    min-height: 520px;
    grid-template-columns: 1fr;
  }
  .genealogy-reader-sidebar {
    max-height: 240px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .genealogy-pdf-toolbar select {
    min-width: 0;
    width: 100%;
  }
  .genealogy-pdf-canvas-wrap {
    justify-items: start;
    padding: 14px 44px;
  }
  .genealogy-reader-arrow {
    width: 32px;
    height: 56px;
    font-size: 30px;
  }
  .genealogy-reader-arrow.is-prev { left: 6px; }
  .genealogy-reader-arrow.is-next { right: 6px; }
  .nlc-style-reader.is-sidebar-hidden .genealogy-reader-sidebar {
    display: none;
  }
  .genealogy-article article,
  .genealogy-cta {
    padding: 20px;
  }
  .surname-hero, .surname-detail-hero { width: min(100% - 28px, 1080px); padding: 42px 0 20px; }
  .surname-hero h1, .surname-detail-hero h1 { font-size: 38px; }
  .surname-title-row { gap: 10px; }
  .surname-count-inline strong { font-size: 22px; }
  .surname-ranking-link { min-height: 34px; padding: 0 12px; font-size: 13px; }
  .surname-ranking-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surname-ranking-head { display: grid; }
  .surname-ranking-toolbar { display: grid; }
  .surname-ranking-search { max-width: none; }
  .surname-database-tabs a { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .surname-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .surname-detail, .surname-profile-grid, .surname-related-grid, .surname-material-list, .surname-material-list-wide, .surname-material-list-wide section:last-child ul, .surname-notable-items { grid-template-columns: 1fr; }
  .surname-topic-content .surname-material-list-wide { grid-template-columns: 1fr; }
  .surname-service {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .surname-service h2,
  .surname-service p,
  .surname-service .button {
    grid-column: auto;
    grid-row: auto;
  }
  .surname-service .button {
    justify-self: flex-start;
  }
  .surname-material-article { padding: 20px !important; }
  .surname-material-list-wide section { min-height: 0; padding: 18px; }
  .service-grid, .steps-grid, .about-grid, .price-grid, .addon-grid, .process-row, .settings-grid,
  .memory-film-grid,
  .global-roots-grid { grid-template-columns: 1fr; }
  .home-start { gap: 18px; }
  .home-start-copy h2,
  .memory-film-section h2,
  .global-roots-section h2 { font-size: 30px; }
  .starter-family-fields,
  .starter-child-row { grid-template-columns: 1fr; }
  .home-register-card,
  .memory-film-grid article,
  .global-roots-grid a { padding: 20px; }
  .memory-video-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .platform-note { grid-template-columns: 1fr; }
  .guestbook-layout,
  .guestbook-form,
  .guestbook-list { grid-template-columns: 1fr; }
  .guestbook-actions { display: grid; justify-content: stretch; }
  .footer { align-items: flex-start; flex-direction: column; }
  .footer-copy { justify-content: flex-start; }
  .auth-shell { width: min(100% - 28px, 1040px); padding: 42px 0; gap: 24px; }
  .auth-copy h1 { font-size: 38px; }
  .login-topbar { min-height: 60px; padding: 7px 14px; }
  .login-brand img { width: 42px; height: 42px; }
  .login-main { min-height: calc(100svh - 60px); padding: 24px 14px 40px; }
  .login-experience { gap: 34px; }
  .login-miniapp-panel h1 { margin-bottom: 18px; font-size: 26px; }
  .login-miniapp-lead { font-size: 15px; }
  .login-miniapp-content { display: grid; justify-items: center; gap: 14px; margin-top: 0; text-align: center; }
  .miniapp-code-frame { width: min(210px, 72vw); }
  .miniapp-code-copy { max-width: 260px; }
  .account-form { padding: 22px 18px; }
  .field-grid, .relative-form .field-grid { grid-template-columns: 1fr; }
  .field-grid .span-2 { grid-column: auto; }
  .select-row { grid-template-columns: 1fr; }
  .workspace-sidebar { grid-template-columns: 1fr; padding: 12px; }
  .workspace-family { display: none; }
  .workspace-nav button { white-space: nowrap; }
  .workspace-main { padding: 12px; }
  .workspace-panel { padding: 14px; }
  .panel-head { display: grid; gap: 10px; }
  .tree-document-head { display: grid; gap: 10px; padding: 11px 12px; }
  .tree-document-head h2 { font-size: 19px; }
  .tree-head-legend { justify-content: flex-start; gap: 6px 11px; }
  .tree-collaboration-bar { grid-template-columns: 1fr; gap: 10px; padding-top: 14px; }
  .tree-collaboration-actions { display: grid; grid-template-columns: 1fr; justify-content: stretch; }
  .tree-collaboration-actions .button { width: 100%; }
  .account-stats { grid-template-columns: 1fr 1fr 1fr; }
  .profile-identity-strip { grid-template-columns: 48px minmax(0, 1fr); }
  .profile-initial { --profile-avatar-size: 48px; font-size: 22px; }
  .profile-avatar-upload { grid-template-columns: 58px minmax(0, 1fr); padding: 14px; }
  .profile-avatar-preview { --profile-avatar-size: 56px; font-size: 22px; }
  .profile-identity-strip .account-stats { grid-column: 1 / -1; }
  .profile-form-section { grid-template-columns: 1fr; gap: 14px; padding: 22px 0; }
  .profile-section-title { grid-template-columns: 34px minmax(0, 1fr); }
  .profile-section-title > span { width: 34px; height: 34px; }
  .detailed-profile-form .field-grid { grid-template-columns: 1fr; }
  .detailed-profile-form .field-grid .span-2 { grid-column: auto; }
  .profile-save-bar { position: static; grid-template-columns: 1fr; align-items: stretch; }
  .profile-save-bar .button { width: 100%; }
  .tree-scroll {
    min-height: calc(100svh - 220px);
    max-height: calc(100svh - 180px);
    padding: 4px;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
  }
.genealogy-canvas {
    min-width: 640px;
    min-height: 560px;
    gap: 32px;
    padding: 34px 24px 40px;
  }
  .family-network-canvas {
    min-width: 720px;
    padding: 44px 20px 30px;
  }
}

/* Person archive media: responsive inline playback in the detail panel. */
.person-work-list {
  display: grid;
  gap: 14px;
}
.person-work-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}
.person-work-item > img,
.person-work-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #111;
}
.person-work-item > div {
  display: grid;
  gap: 7px;
  padding: 14px;
}
.person-work-item span {
  color: var(--muted);
  font-size: 12px;
}
.person-work-item strong {
  color: var(--ink);
  line-height: 1.45;
}
.person-work-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}
.person-work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  align-items: center;
}

/* Profile archive manager: compact records and direct OSS upload controls. */
.profile-works-manager {
  margin-top: 30px;
  padding-top: 26px;
}
.profile-works-head { margin-bottom: 14px; }
.profile-works-head h2 { margin: 0 0 6px; font-size: 24px; }
.profile-works-head p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.profile-works-list { display: grid; border-top: 1px solid var(--line); }
.profile-work-item { min-width: 0; display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.profile-work-thumb { position: relative; width: 144px; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 6px; color: var(--green); background: #eef4f0; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.profile-work-thumb:hover { border-color: var(--green); box-shadow: 0 5px 14px rgba(23, 70, 49, .12); }
.profile-work-thumb:focus-visible { outline: 3px solid rgba(20, 96, 65, .25); outline-offset: 2px; }
.profile-work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.profile-work-thumb.is-video { color: #fff; background: #26312c; }
.profile-work-thumb.is-video.has-image::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .16); }
.profile-work-thumb.is-video .profile-work-thumb-label { position: absolute; right: 7px; bottom: 6px; z-index: 2; padding: 2px 6px; border-radius: 3px; color: #fff; background: rgba(0, 0, 0, .56); font-size: 11px; line-height: 1.4; }
.profile-work-play { position: absolute; z-index: 3; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .9); border-radius: 50%; background: rgba(14, 71, 48, .88); box-shadow: 0 3px 12px rgba(0, 0, 0, .24); }
.profile-work-play::before { content: ""; width: 0; height: 0; margin-left: 3px; border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 11px solid #fff; }
.profile-work-thumb:hover .profile-work-play { background: rgba(12, 86, 57, .96); transform: scale(1.04); }
.profile-work-copy { min-width: 0; display: grid; gap: 6px; }
.profile-work-copy > strong { color: var(--ink); font-size: 17px; line-height: 1.45; }
.profile-work-copy > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.profile-work-meta { color: var(--muted); font-size: 12px; }
.profile-works-empty { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); }
.profile-work-editor { margin-top: 24px; padding-top: 22px; border-top: 1px solid rgba(31, 23, 16, .14); }
.profile-work-editor-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.profile-work-editor-head > div { display: grid; gap: 4px; }
.profile-work-editor-head strong { color: var(--ink); font-size: 18px; }
.profile-work-editor-head span { color: var(--muted); font-size: 13px; }
.person-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.person-upload-field { min-width: 0; min-height: 154px; display: grid; grid-template-rows: auto minmax(40px, 1fr) auto; gap: 9px; align-content: start; padding: 15px; border: 1px solid #cbd5cf; border-radius: 7px; background: #f8faf8; }
.person-upload-field > strong { color: var(--green); font-size: 15px; }
.person-upload-field > span { min-width: 0; color: var(--muted); font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.person-upload-field > span[data-type="success"] { color: var(--green-2); font-weight: 800; }
.person-upload-field > span[data-type="error"] { color: var(--red); font-weight: 800; }
.person-upload-field .button { width: 100%; min-height: 40px; }
.profile-work-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

body.person-work-preview-open { overflow: hidden; }
.person-work-preview-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; }
.person-work-preview-modal.is-hidden { display: none; }
.person-work-preview-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(14, 18, 16, .72); cursor: default; }
.person-work-preview-panel { position: relative; z-index: 1; width: min(980px, 100%); max-height: calc(100dvh - 48px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; border: 1px solid rgba(255, 255, 255, .28); border-radius: 7px; background: #fff; box-shadow: 0 24px 70px rgba(0, 0, 0, .3); }
.person-work-preview-head { min-width: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.person-work-preview-head > div { min-width: 0; }
.person-work-preview-head span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.person-work-preview-head h2 { margin: 0; color: var(--ink); font-size: 22px; line-height: 1.35; overflow-wrap: anywhere; }
.person-work-preview-close { flex: 0 0 38px; width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #fff; font-size: 27px; line-height: 1; cursor: pointer; }
.person-work-preview-content { min-height: 260px; overflow: auto; background: #eef1ef; }
.person-work-preview-video { width: 100%; aspect-ratio: 16 / 9; display: grid; place-items: center; background: #070807; }
.person-work-preview-video video { width: 100%; height: 100%; object-fit: contain; }
.person-work-preview-image { min-height: min(70vh, 760px); display: grid; place-items: center; padding: 20px; background: #151816; }
.person-work-preview-image img { display: block; max-width: 100%; max-height: min(70vh, 760px); object-fit: contain; }
.person-work-preview-document iframe { display: block; width: 100%; height: 68vh; min-height: 420px; border: 0; background: #fff; }
.person-work-preview-document { position: relative; }
.person-work-preview-loading { display: none; position: absolute; inset: 0 0 34px; place-items: center; padding: 24px; color: var(--muted); background: #f8faf9; font-size: 14px; }
.person-work-preview-document.is-loading .person-work-preview-loading { display: grid; }
.person-work-preview-document p { margin: 0; padding: 10px 16px; color: var(--muted); background: #fff; font-size: 12px; text-align: center; }
.person-work-preview-empty { min-height: 300px; display: grid; place-content: center; gap: 8px; padding: 32px; text-align: center; }
.person-work-preview-empty strong { color: var(--ink); font-size: 18px; }
.person-work-preview-empty p { max-width: 580px; margin: 0; color: var(--muted); line-height: 1.7; }
.person-work-preview-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fff; }
.person-work-preview-actions .is-loading { opacity: .55; pointer-events: none; }
@media (max-width: 760px) { .profile-work-editor .field-grid { grid-template-columns: 1fr; } .profile-work-editor .field-grid .span-2 { grid-column: 1 / -1; } .person-upload-grid { grid-template-columns: 1fr; } .person-upload-field { min-height: 0; } }
@media (max-width: 640px) { .person-work-preview-modal { padding: 0; place-items: stretch; } .person-work-preview-panel { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; } .person-work-preview-head { padding: 14px 16px; } .person-work-preview-head h2 { font-size: 19px; } .person-work-preview-content { min-height: 0; } .person-work-preview-image { min-height: 0; height: 100%; padding: 12px; } .person-work-preview-image img { max-height: 100%; } .person-work-preview-document iframe { height: 62vh; min-height: 360px; } .person-work-preview-actions { padding: 12px 16px; } }
@media (max-width: 520px) { .profile-work-item { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; } .profile-work-thumb { width: 96px; } .profile-work-play { width: 34px; height: 34px; } .profile-work-play::before { border-top-width: 6px; border-bottom-width: 6px; border-left-width: 9px; } .profile-work-copy > strong { font-size: 15px; } }

/* About: institutional products and delivery capabilities. */
.about-product-hero { background-color: #31594b; background-image: url("assets/home-hero-genealogy-memoir-v1.webp"); background-position: center 42%; background-size: cover; background-blend-mode: multiply; }
.about-product-hero .eyebrow { color: #efc981; }
.about-product-hero h1 { max-width: 900px; color: #fff; }
.about-product-hero > p:last-child { max-width: 780px; color: rgba(255, 255, 255, .86); }
.about-products-band { background: #f3f6f4; }
.institution-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.institution-product { min-width: 0; padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.institution-product.featured { grid-column: 1 / -1; display: grid; grid-template-columns: 58px minmax(0, .8fr) minmax(280px, 1.2fr); gap: 18px 24px; align-items: start; background: #eef4f0; }
.institution-product > span { color: var(--red); font-size: 13px; font-weight: 900; }
.institution-product h3 { margin: 10px 0 9px; color: var(--ink); font-size: 23px; line-height: 1.35; }
.institution-product > p { margin: 0; color: var(--muted); line-height: 1.75; }
.institution-product ul { display: grid; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.institution-product li { position: relative; padding-left: 16px; color: #3e4b46; line-height: 1.6; }
.institution-product li::before { content: ""; position: absolute; left: 0; top: .7em; width: 6px; height: 6px; background: var(--red); }
.institution-product.featured > span { grid-row: 1 / span 2; padding-top: 12px; font-size: 18px; }
.institution-product.featured h3 { margin-top: 7px; font-size: 28px; }
.institution-product.featured > p { grid-column: 2; }
.institution-product.featured ul { grid-column: 3; grid-row: 1 / span 2; margin-top: 6px; }
.about-capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.about-capability-grid > div { min-width: 0; display: grid; gap: 7px; padding: 22px 20px 22px 0; border-bottom: 1px solid var(--line); }
.about-capability-grid > div:not(:nth-child(3n + 1)) { padding-left: 20px; border-left: 1px solid var(--line); }
.about-capability-grid strong { color: var(--green); font-size: 18px; }
.about-capability-grid span { color: var(--muted); font-size: 14px; line-height: 1.6; }
.about-delivery-section { color: #fff; background: #123d2f; }
.about-delivery-inner { display: grid; grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); gap: 72px; }
.about-delivery-inner .eyebrow { color: #efc981; }
.about-delivery-inner h2 { color: #fff; }
.about-delivery-list { border-top: 1px solid rgba(255, 255, 255, .24); }
.about-delivery-list article { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 22px; padding: 19px 0; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.about-delivery-list strong { color: #fff; font-size: 16px; }
.about-delivery-list p { margin: 0; color: rgba(255, 255, 255, .72); line-height: 1.65; }
.about-cooperation-cta { align-items: end; }
.about-cooperation-cta .eyebrow { margin-bottom: 8px; }
.about-cta-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
@media (max-width: 900px) { .institution-product.featured { grid-template-columns: 44px minmax(0, 1fr); } .institution-product.featured > span { grid-row: 1 / span 3; } .institution-product.featured > p, .institution-product.featured ul { grid-column: 2; grid-row: auto; } .about-delivery-inner { grid-template-columns: 1fr; gap: 12px; } }
@media (max-width: 680px) { .institution-product-grid { grid-template-columns: 1fr; } .institution-product.featured { grid-column: auto; display: block; } .institution-product.featured > span { display: block; padding-top: 0; font-size: 13px; } .institution-product.featured h3 { font-size: 23px; } .institution-product.featured ul { margin-top: 18px; } .about-capability-grid { grid-template-columns: 1fr; } .about-capability-grid > div, .about-capability-grid > div:not(:nth-child(3n + 1)) { padding: 18px 0; border-left: 0; } .about-delivery-list article { grid-template-columns: 1fr; gap: 7px; } .about-cooperation-cta { align-items: stretch; } .about-cta-actions { justify-content: stretch; } .about-cta-actions .button { width: 100%; } }

@media (max-width: 420px) {
  .topbar { gap: 6px 10px; }
  .brand-logo { width: 38px; height: 38px; }
  .topbar-slogan { font-size: 19px; }
  .topbar-stats { display: none; }
  .site-hero { min-height: min(346px, calc(100svh - 92px)); }
  .site-hero h1 { font-size: 30px; }
  .hero-lines { font-size: 16px; }
  .hero-actions .button { flex: 1 1 100%; }
  .sub-hero { padding-top: 42px; padding-bottom: 42px; }
  .sub-hero h1 { font-size: 34px; }
  .genealogy-category-grid strong,
  .genealogy-article h2,
  .genealogy-cta h2 {
    font-size: 22px;
  }
  .surname-grid { grid-template-columns: 1fr; }
  .surname-card { min-height: 132px; }
}

/* Homepage: make the two commercial services explicit and keep proof secondary. */
.home-commercial .topbar-stats { display: none; }
.home-commercial .site-hero {
  position: relative;
  width: 100%;
  min-height: min(650px, calc(100svh - 132px));
  margin: 0;
  padding: 78px max(20px, calc((100vw - 1180px) / 2)) 72px;
  align-items: center;
  background: #172a20 url("/assets/home-hero-genealogy-memoir-v1.webp") center / cover no-repeat;
}
.home-commercial .site-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(90deg, rgba(12,25,18,.96) 0%, rgba(12,25,18,.90) 36%, rgba(12,25,18,.48) 64%, rgba(12,25,18,.12) 100%);
}
.home-commercial .site-hero::after { display: none; }
.home-commercial .site-hero-copy {
  position: relative;
  z-index: 1;
  width: min(700px, 100%);
  margin: 0;
}
.home-commercial .site-hero .eyebrow { margin-bottom: 14px; color: #efd399; font-size: 15px; }
.home-commercial .site-hero h1 { max-width: 700px; margin-bottom: 22px; font-size: 60px; line-height: 1.08; }
.home-commercial .site-hero h1 span { white-space: normal; }
.home-commercial .hero-lines { gap: 5px; font-size: 20px; font-weight: 650; line-height: 1.65; }
.home-commercial .hero-lines span { white-space: normal; }
.home-commercial .site-hero .button { min-height: 48px; padding: 0 20px; border-radius: 6px; box-shadow: none; }
.home-commercial .site-hero .button.primary { border-color: #a9342e; background: #a9342e; }
.home-commercial .site-hero .button.secondary { border-color: #fff; color: #203a29; background: #fff; }

/* Personal center uses a larger, reading-first type scale for repeat family use. */
.workspace-nav button { font-size: 16px; }
.workspace-user strong { font-size: 16px; }
.workspace-user span { font-size: 14px; }
[data-workspace-view="profile"] { font-size: 16px; line-height: 1.7; }
[data-workspace-view="profile"] .panel-head h2 { font-size: 30px; }
[data-workspace-view="profile"] .panel-head p,
[data-workspace-view="profile"] .profile-identity-strip p,
[data-workspace-view="profile"] .profile-save-bar p { font-size: 15px; }
[data-workspace-view="profile"] .profile-kicker,
[data-workspace-view="profile"] .profile-completeness span,
[data-workspace-view="profile"] .account-stats span,
[data-workspace-view="profile"] .profile-section-title > span,
[data-workspace-view="profile"] .profile-section-title p,
[data-workspace-view="profile"] small { font-size: 14px !important; }
[data-workspace-view="profile"] .profile-identity-strip h3 { font-size: 22px; }
[data-workspace-view="profile"] .profile-section-title h3 { font-size: 19px; }
[data-workspace-view="profile"] .profile-avatar-upload strong { font-size: 16px; }
[data-workspace-view="profile"] .profile-avatar-upload .profile-avatar-copy > p:first-of-type { font-size: 14px; }
[data-workspace-view="profile"] .account-profile-form label,
[data-workspace-view="profile"] .profile-checkbox { font-size: 15px; }
[data-workspace-view="profile"] input,
[data-workspace-view="profile"] select,
[data-workspace-view="profile"] textarea { font-size: 16px; line-height: 1.6; }
[data-workspace-view="profile"] .button,
[data-workspace-view="profile"] button { font-size: 16px; }
[data-workspace-view="profile"] .profile-save-bar a,
[data-workspace-view="profile"] .form-status { font-size: 15px; }

.points-panel { display: grid; gap: 0; }
.points-panel-head { align-items: end; margin-bottom: 24px; }
.points-panel-head .button { flex: 0 0 auto; }
.points-balance { display: grid; grid-template-columns: minmax(220px, .75fr) minmax(420px, 1.25fr); overflow: hidden; border: 1px solid #d8dfda; border-top: 3px solid #18382b; border-radius: 6px; background: #fff; box-shadow: 0 10px 28px rgba(25, 42, 32, .08); }
.points-total { grid-row: 1 / 3; display: grid; align-content: center; justify-items: start; min-height: 156px; padding: 30px 34px; color: #fff; background: #18382b; }
.points-total span { color: #d9e5dc; font-size: 12px; font-weight: 800; }
.points-total strong { margin-top: 4px; font-family: "Songti SC", "STSong", serif; font-size: 46px; line-height: 1.1; }
.points-total small { margin-top: 5px; color: #efd296; font-size: 12px; }
.points-balance dl { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; }
.points-balance dl div { display: grid; gap: 7px; padding: 28px 24px; border-bottom: 1px solid #d8dfda; }
.points-balance dl div + div { border-left: 1px solid #d8dfda; }
.points-balance dt { color: #6d756f; font-size: 12px; }
.points-balance dd { margin: 0; font-size: 21px; font-weight: 800; font-variant-numeric: tabular-nums; }
.points-balance > p { margin: 0; padding: 15px 24px; color: #6d756f; background: #fafbf9; font-size: 12px; }
.points-section-head { display: flex; align-items: end; justify-content: space-between; margin: 30px 0 14px; }
.points-section-head h3 { margin: 0; font-size: 20px; }
.points-section-head p { margin: 5px 0 0; color: #6d756f; font-size: 13px; }
.points-packages { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.points-package { min-height: 210px; display: flex; flex-direction: column; padding: 20px; border: 1px solid #d8dfda; border-radius: 6px; background: #fff; }
.points-package > span { color: #6d756f; font-size: 12px; font-weight: 800; }
.points-package > strong { margin: 12px 0 3px; color: #18382b; font-family: "Songti SC", "STSong", serif; font-size: 30px; }
.points-package > strong small { margin-right: 2px; font-size: 16px; }
.points-package > p { margin: 0; font-size: 13px; font-weight: 800; }
.points-package .button { width: 100%; margin-top: auto; }
.points-orders { border-top: 1px solid #d8dfda; }
.points-order { min-height: 68px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 12px 4px; border-bottom: 1px solid #d8dfda; }
.points-order > div { display: grid; gap: 4px; }
.points-order strong { font-size: 14px; }
.points-order small { color: #6d756f; font-size: 12px; }
.points-order > span { padding: 4px 8px; border-radius: 3px; color: #6d756f; background: #edf0ee; font-size: 11px; font-weight: 800; }
.points-order > span[data-status="paid"], .points-order > span[data-status="succeeded"] { color: #315d45; background: #e6f0e8; }
.points-order > span[data-status="failed"] { color: #9e3c34; background: #f6e9e7; }
.points-empty { padding: 34px; border: 1px dashed #bac5be; color: #6d756f; text-align: center; }
.points-payment-dialog { width: min(500px, calc(100% - 28px)); max-height: calc(100vh - 36px); padding: 0; overflow: auto; border: 0; border-radius: 6px; background: #fff; box-shadow: 0 24px 70px rgba(15, 28, 19, .28); }
.points-payment-dialog::backdrop { background: rgba(22, 31, 26, .56); backdrop-filter: blur(2px); }
.points-payment-dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid #d8dfda; }
.points-payment-dialog > header span { color: #a57b39; font-size: 11px; font-weight: 800; }
.points-payment-dialog > header h2 { margin: 3px 0 0; font-size: 20px; }
.points-payment-dialog > header button { width: 38px; height: 38px; border: 1px solid #d8dfda; border-radius: 4px; color: #26322c; background: #fff; font-size: 22px; }
.points-payment-body { display: grid; justify-items: center; padding: 26px 24px 30px; text-align: center; }
.points-payment-qr { width: 244px; height: 244px; display: grid; place-items: center; border: 1px solid #d8dfda; }
.points-payment-qr img { width: 224px; height: 224px; }
.points-payment-body > strong { margin-top: 18px; color: #18382b; font-size: 20px; }
.points-payment-body > p { margin: 8px 0 0; font-weight: 750; }
.points-payment-body > small { max-width: 330px; margin-top: 7px; color: #6d756f; line-height: 1.6; }

@media (max-width: 1000px) {
  .points-packages { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .points-panel-head { align-items: stretch; }
  .points-balance { grid-template-columns: 1fr; }
  .points-total { grid-row: auto; min-height: 134px; padding: 24px; }
  .points-total strong { font-size: 38px; }
  .points-balance dl div { padding: 18px 14px; }
  .points-balance > p { padding: 14px 16px; }
  .points-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .points-package { min-height: 190px; padding: 16px; }
}

@media (max-width: 420px) {
  .points-balance dl { grid-template-columns: 1fr; }
  .points-balance dl div { grid-template-columns: 1fr auto; align-items: center; padding: 13px 16px; }
  .points-balance dl div + div { border-left: 0; }
  .points-package > strong { font-size: 25px; }
  .points-package .button { padding-inline: 8px; font-size: 12px; }
  .points-order { grid-template-columns: 1fr; }
  .points-order > span { justify-self: start; }
}
.home-commercial .site-hero .hero-tertiary { border-color: rgba(255,255,255,.62); color: #fff; background: rgba(16,30,22,.35); }
.home-commercial .hero-delivery-line {
  position: absolute;
  z-index: 1;
  right: max(20px, calc((100vw - 1180px) / 2));
  bottom: 30px;
  margin: 0;
  color: rgba(255,255,255,.82);
  font-size: 14px;
  font-weight: 700;
}
.home-commercial .home-business-section { padding-top: 64px; padding-bottom: 58px; }
.home-commercial .home-business-section .section-heading { max-width: 860px; }
.home-business-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-business-item { min-width: 0; padding: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.home-business-label { margin: 0; color: var(--red); font-size: 13px; font-weight: 900; }
.home-business-item h3 { margin: 12px 0; color: var(--green); font-size: 29px; line-height: 1.25; }
.home-business-item > p:not(.home-business-label) { margin: 0; color: var(--muted); line-height: 1.8; }
.home-business-item ul { margin: 20px 0 24px; padding-left: 20px; color: #465158; line-height: 1.9; }
.home-business-actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.home-business-actions .button { border-radius: 6px; }
.home-business-actions .text-link { color: var(--red); font-weight: 800; }
.home-proof-band {
  width: 100%;
  display: grid;
  grid-template-columns: auto auto minmax(280px, 1fr);
  gap: 34px;
  align-items: center;
  padding: 30px max(20px, calc((100vw - 1180px) / 2));
  color: #fff;
  background: #203a29;
}
.home-proof-band div { display: grid; grid-template-columns: auto auto auto; gap: 6px; align-items: baseline; }
.home-proof-band span { grid-column: 1 / -1; color: rgba(255,255,255,.68); font-size: 13px; font-weight: 700; }
.home-proof-band strong { color: #efd399; font-size: 34px; }
.home-proof-band em { color: rgba(255,255,255,.72); font-size: 13px; font-style: normal; }
.home-proof-band p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.75; }

@media (max-width: 900px) {
  .home-commercial .site-hero h1 { font-size: 48px; }
  .home-business-grid { grid-template-columns: 1fr; }
  .home-proof-band { grid-template-columns: repeat(2, auto); }
  .home-proof-band p { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .home-commercial .site-hero {
    min-height: min(590px, calc(100svh - 118px));
    padding: 56px 20px 62px;
    align-items: flex-end;
    background-position: 57% center;
  }
  .home-commercial .site-hero::before { background: linear-gradient(180deg, rgba(12,25,18,.30) 0%, rgba(12,25,18,.73) 38%, rgba(12,25,18,.97) 100%); }
  .home-commercial .site-hero h1 { font-size: 38px; }
  .home-commercial .hero-lines { font-size: 16px; }
  .home-commercial .hero-actions { gap: 8px; }
  .home-commercial .site-hero .button { width: 100%; min-height: 44px; }
  .home-commercial .hero-delivery-line { display: none; }
  .home-commercial .home-business-section { padding-top: 48px; padding-bottom: 44px; }
  .home-business-item { padding: 24px; }
  .home-business-item h3 { font-size: 25px; }
  .home-proof-band { grid-template-columns: 1fr 1fr; gap: 22px 16px; padding-top: 24px; padding-bottom: 24px; }
  .home-proof-band strong { font-size: 28px; }
}

/* About: government project platform presentation. */
.about-platform-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 82px max(24px, calc((100vw - 1180px) / 2)) 54px;
  overflow: hidden;
  color: #fff;
  background-color: #173b34;
  background-image: url("assets/home-hero-genealogy-memoir-v1.webp");
  background-position: center 44%;
  background-size: cover;
  background-blend-mode: multiply;
}
.about-platform-hero::before { content: ""; position: absolute; inset: 0; background: rgba(9, 30, 28, .42); }
.about-platform-hero-inner { position: relative; z-index: 1; width: min(900px, 100%); }
.about-platform-hero .eyebrow { margin: 0 0 15px; color: #f2cf88; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 800; letter-spacing: 0; }
.about-platform-hero h1 { max-width: 840px; margin: 0; color: #fff; font-family: "STSong", "Songti SC", serif; font-size: 54px; line-height: 1.12; letter-spacing: 0; }
.about-platform-hero h1 + p { max-width: 800px; margin: 22px 0 0; color: rgba(255,255,255,.86); font-size: 18px; line-height: 1.8; }
.platform-proof { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 860px; margin-top: 34px; border-top: 1px solid rgba(255,255,255,.34); border-bottom: 1px solid rgba(255,255,255,.25); }
.platform-proof span { min-width: 0; display: grid; gap: 4px; padding: 16px 18px 16px 0; color: rgba(255,255,255,.72); font-size: 12px; }
.platform-proof span + span { padding-left: 18px; border-left: 1px solid rgba(255,255,255,.22); }
.platform-proof strong { color: #fff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 18px; letter-spacing: 0; }

.platform-heading { max-width: 880px; }
.platform-heading > p:last-child { max-width: 820px; }
.about-architecture { padding-top: 72px; padding-bottom: 78px; }
.platform-blueprint { border: 1px solid #bdcbc6; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 16px 38px rgba(25, 49, 43, .08); }
.blueprint-layer { display: grid; grid-template-columns: 168px minmax(0, 1fr); min-height: 88px; border-bottom: 1px solid #ccd7d3; }
.blueprint-layer > strong { display: flex; align-items: center; padding: 20px 22px; border-right: 1px solid #ccd7d3; color: #243b35; font-size: 14px; }
.blueprint-layer > div { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 18px 20px; }
.blueprint-layer span { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px; border: 1px solid #c9d5d1; border-radius: 4px; color: #344842; background: #fff; font-size: 13px; font-weight: 700; }
.product-layer { background: #edf3f0; }
.product-layer span { border-color: #8eb1a5; color: #153f33; }
.core-layer { color: #fff; background: #16483b; }
.core-layer > strong { border-color: rgba(255,255,255,.22); color: #fff; }
.core-layer span { border-color: rgba(255,255,255,.28); color: #fff; background: rgba(255,255,255,.08); }
.ai-layer { background: #eef4f5; }
.ai-layer span { border-color: #8fb4b8; color: #17535a; }
.blueprint-foundation { min-height: 64px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; padding: 16px 22px; color: #eaf2ef; background: #172f2d; }
.blueprint-foundation strong { margin-right: auto; color: #fff; font-size: 14px; }
.blueprint-foundation span { color: #bfd1cb; font-size: 12px; }

.platform-interface-section { padding: 0; color: #fff; background: #102d28; }
.platform-interface-inner { padding-top: 72px; padding-bottom: 78px; }
.platform-interface-section .platform-heading .eyebrow { color: #d8b76f; }
.platform-interface-section .platform-heading h2 { color: #fff; }
.platform-interface-section .platform-heading > p:last-child { color: #b9cbc5; }
.platform-interface-showcase { display: grid; gap: 24px; }
.interface-screen { min-width: 0; margin: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 6px; background: #f7f9f8; box-shadow: 0 22px 50px rgba(0,0,0,.2); }
.interface-screen img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #e9eeec; }
.interface-screen figcaption { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 18px; color: #d7e3df; background: #173a33; }
.interface-screen figcaption strong { color: #fff; font-size: 15px; }
.interface-screen figcaption span { color: #a8beb7; font-size: 11px; text-align: right; }
.interface-screen-featured figcaption { background: #1b473c; }
.interface-screen-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.gov-products-band { background: #edf1f0; }
.gov-product-suite { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid #bdc9c5; border-left: 1px solid #bdc9c5; background: #fff; }
.gov-product { min-width: 0; display: flex; flex-direction: column; padding: 28px; border-right: 1px solid #bdc9c5; border-bottom: 1px solid #bdc9c5; background: #fff; }
.gov-product.lead-product { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 0 44px; border-top: 4px solid #b9944c; background: #f8faf9; }
.gov-product header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 24px; }
.lead-product header, .lead-product footer { grid-column: 1 / -1; }
.product-code { color: #246a70; font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; font-weight: 900; letter-spacing: 0; }
.product-state { padding: 5px 8px; border: 1px solid #b8c9c3; border-radius: 3px; color: #31584e; background: #eef4f1; font-size: 11px; font-weight: 800; }
.product-summary { min-width: 0; }
.product-audience { margin: 0 0 10px !important; color: #8b642c !important; font-size: 12px !important; font-weight: 800; line-height: 1.5 !important; }
.product-summary h3 { margin: 0; color: #152722; font-family: "STSong", "Songti SC", serif; font-size: 26px; line-height: 1.35; letter-spacing: 0; }
.product-summary > p:last-child { margin: 12px 0 0; color: #5c6965; line-height: 1.75; }
.product-columns { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 25px; }
.lead-product .product-columns { margin-top: 0; }
.product-columns > div { min-width: 0; }
.product-columns strong { display: block; margin-bottom: 10px; color: #1c493d; font-size: 13px; }
.product-columns ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.product-columns li { position: relative; padding-left: 13px; color: #53625d; font-size: 13px; line-height: 1.55; }
.product-columns li::before { content: ""; position: absolute; left: 0; top: .68em; width: 5px; height: 5px; background: #2c777c; }
.product-preview { min-width: 0; margin: 26px 0 0; overflow: hidden; border: 1px solid #c7d2ce; border-radius: 4px; background: #e8eeeb; }
.product-preview img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.lead-product .product-preview { grid-column: 1 / -1; }
.gov-product footer { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; padding-top: 15px; border-top: 1px solid #d7dfdc; }
.gov-product footer span { padding: 4px 7px; color: #53645f; background: #eef2f0; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; letter-spacing: 0; }

.platform-capabilities { padding-top: 72px; padding-bottom: 76px; }
.platform-capabilities .about-capability-grid { border-color: #bfcac6; }
.platform-capabilities .about-capability-grid > div { align-content: start; min-height: 150px; padding-top: 24px; padding-bottom: 24px; }
.platform-capabilities .capability-id { color: #36747a; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 800; letter-spacing: 0; }
.platform-capabilities .about-capability-grid strong { color: #163f34; font-family: "STSong", "Songti SC", serif; font-size: 20px; }
.platform-capabilities .about-capability-grid strong + span { color: #61706b; font-size: 13px; line-height: 1.7; }
.about-delivery-section { background: #172f2d; }
.about-delivery-inner .section-heading > p:last-child { color: rgba(255,255,255,.66); line-height: 1.7; }
.about-delivery-list strong { font-family: "STSong", "Songti SC", serif; font-size: 18px; }
.about-cooperation-cta { border-left: 4px solid #b9944c; border-radius: 4px; }

@media (max-width: 960px) {
  .about-platform-hero { min-height: 500px; padding-left: 28px; padding-right: 28px; }
  .platform-proof { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-proof span:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,.22); }
  .platform-proof span:nth-child(4) { border-top: 1px solid rgba(255,255,255,.22); }
  .gov-product.lead-product { grid-template-columns: 1fr; gap: 26px; }
  .lead-product .product-summary, .lead-product .product-columns { grid-column: 1; }
  .lead-product .product-columns { margin-top: 0; }
}
@media (max-width: 760px) {
  .about-platform-hero { min-height: 480px; padding: 64px 20px 36px; }
  .about-platform-hero h1 { font-size: 40px; }
  .about-platform-hero h1 + p { font-size: 16px; }
  .blueprint-layer { grid-template-columns: 1fr; }
  .blueprint-layer > strong { min-height: 44px; padding: 13px 16px; border-right: 0; border-bottom: 1px solid #ccd7d3; }
  .blueprint-layer > div { padding: 14px 16px; }
  .blueprint-foundation { align-items: flex-start; }
  .blueprint-foundation strong { flex-basis: 100%; }
  .platform-interface-inner { padding-top: 56px; padding-bottom: 60px; }
  .interface-screen-grid { grid-template-columns: 1fr; }
  .interface-screen figcaption { align-items: flex-start; flex-direction: column; gap: 5px; }
  .interface-screen figcaption span { text-align: left; }
  .gov-product-suite { grid-template-columns: 1fr; }
  .gov-product.lead-product { grid-column: auto; }
  .product-columns { grid-template-columns: 1fr; gap: 20px; }
  .platform-capabilities .about-capability-grid > div { min-height: 0; }
}
@media (max-width: 480px) {
  .about-platform-hero h1 { font-size: 34px; }
  .platform-proof { grid-template-columns: 1fr 1fr; }
  .platform-proof span { padding: 13px 8px 13px 0; }
  .platform-proof span + span { padding-left: 10px; }
  .platform-proof strong { font-size: 15px; }
  .gov-product { padding: 22px 18px; }
  .product-summary h3 { font-size: 23px; }
}

/* Genealogy catalog: a quiet reading-room interface for older family researchers. */
.genealogy-catalog-hero {
  width: min(1180px, calc(100% - 40px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 40px;
  margin: 34px auto 0;
  padding: 42px 44px;
  border-top: 4px solid var(--green);
  background: #f1f5f3;
}
.genealogy-catalog-hero .eyebrow {
  margin: 0 0 9px;
  color: var(--red);
  font-size: 14px;
  font-weight: 900;
}
.genealogy-catalog-hero h1 {
  margin: 0;
  color: #172b24;
  font-family: "STSong", "Songti SC", "Noto Serif CJK SC", serif;
  font-size: 44px;
  line-height: 1.2;
  letter-spacing: 0;
}
.genealogy-catalog-hero h1 + p {
  max-width: 700px;
  margin: 16px 0 0;
  color: #50625c;
  font-size: 18px;
  line-height: 1.8;
}
.genealogy-catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  margin: 0;
  border-left: 1px solid #bccbc5;
}
.genealogy-catalog-stats div {
  min-width: 108px;
  padding: 4px 20px;
  border-right: 1px solid #bccbc5;
}
.genealogy-catalog-stats dt {
  color: var(--red);
  font-family: "STSong", "Songti SC", serif;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.1;
}
.genealogy-catalog-stats dd {
  margin: 7px 0 0;
  color: #54635e;
  font-size: 14px;
  font-weight: 800;
}
.section.genealogy-catalog-panel {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 72px;
}
.genealogy-catalog-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 10px;
  margin-bottom: 26px;
}
.genealogy-catalog-search label { min-width: 0; }
.genealogy-catalog-search input {
  width: 100%;
  min-height: 52px;
  padding: 0 17px;
  border: 1px solid #aebdb7;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  font-size: 17px;
}
.genealogy-catalog-search input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(39, 84, 66, .12);
}
.genealogy-catalog-search .button {
  min-height: 52px;
  font-size: 16px;
}
.genealogy-catalog-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}
.genealogy-catalog-filters {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 0;
  border-top: 3px solid var(--green);
  background: #fff;
}
.genealogy-filter-heading,
.genealogy-catalog-filters section {
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
}
.genealogy-filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.genealogy-filter-heading strong,
.genealogy-catalog-filters h2 {
  margin: 0;
  color: #1b352b;
  font-size: 17px;
}
.genealogy-filter-heading button {
  padding: 4px 0;
  border: 0;
  color: var(--red);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.genealogy-catalog-filters section > div {
  display: grid;
  gap: 3px;
  margin-top: 10px;
}
.genealogy-catalog-filters section > div > button {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 9px;
  border: 0;
  border-radius: 4px;
  color: #40534c;
  background: transparent;
  font: inherit;
  font-size: 15px;
  text-align: left;
  cursor: pointer;
}
.genealogy-catalog-filters section > div > button:hover,
.genealogy-catalog-filters section > div > button.is-active {
  color: #fff;
  background: var(--green);
}
.genealogy-catalog-filters button em {
  color: inherit;
  font-size: 12px;
  font-style: normal;
  opacity: .74;
}
.genealogy-catalog-filters section p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.genealogy-catalog-results {
  min-width: 0;
  display: grid;
  gap: 16px;
}
.genealogy-catalog-result-head {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.genealogy-catalog-result-head p {
  margin: 0;
  color: #51615b;
  font-size: 16px;
}
.genealogy-catalog-result-head strong { color: var(--red); }
.genealogy-catalog-result-head select {
  min-height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid #bac7c2;
  border-radius: 5px;
  color: #31473f;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.genealogy-catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.genealogy-catalog-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 264px;
  overflow: hidden;
  border: 1px solid #c7d1cd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(24, 54, 43, .06);
}
.genealogy-catalog-cover {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 22px 12px;
  color: #fff;
  background: #244b3c;
  text-decoration: none;
}
.genealogy-catalog-cover::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(225, 196, 126, .52);
  pointer-events: none;
}
.genealogy-catalog-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.genealogy-catalog-cover span {
  position: relative;
  z-index: 1;
  color: #f4dfae;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 27px;
  font-weight: 900;
  line-height: 1.15;
  writing-mode: vertical-rl;
}
.genealogy-catalog-cover em {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 1;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-style: normal;
}
.genealogy-catalog-card-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px;
}
.genealogy-catalog-card-copy > p {
  margin: 0 0 7px;
  color: #8a682e;
  font-size: 12px;
  font-weight: 800;
}
.genealogy-catalog-card-copy h2 {
  margin: 0;
  color: #18372c;
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
  line-height: 1.35;
  letter-spacing: 0;
}
.genealogy-catalog-card-copy h2 a { color: inherit; text-decoration: none; }
.genealogy-catalog-card-copy h2 a:hover { color: var(--red); }
.genealogy-catalog-card-copy dl {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  margin: 14px 0 0;
}
.genealogy-catalog-card-copy dl div { margin: 0; }
.genealogy-catalog-card-copy dd {
  margin: 0;
  color: #56665f;
  font-size: 13px;
}
.genealogy-catalog-ocr {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}
.genealogy-catalog-ocr span {
  padding: 4px 7px;
  border: 1px solid #d5ddd9;
  border-radius: 3px;
  color: #5c6a65;
  background: #f4f6f5;
  font-size: 11px;
}
.genealogy-catalog-open {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 15px;
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}
.genealogy-catalog-open::after { content: "  →"; }
.genealogy-catalog-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding-top: 18px;
}
.genealogy-catalog-pagination button,
.genealogy-catalog-pagination span {
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  padding: 0 12px;
  border: 1px solid #bdc9c4;
  border-radius: 4px;
  color: #30463e;
  background: #fff;
  font: inherit;
  font-size: 14px;
}
.genealogy-catalog-pagination button { cursor: pointer; }
.genealogy-catalog-pagination button.is-active {
  border-color: var(--green);
  color: #fff;
  background: var(--green);
}
.genealogy-catalog-pagination button:disabled { cursor: default; opacity: .4; }
.genealogy-book-empty {
  padding: 52px 24px;
  color: var(--muted);
  font-size: 17px;
  text-align: center;
}
.genealogy-catalog-grid > .genealogy-book-card { grid-column: 1 / -1; }

@media (max-width: 1050px) {
  .genealogy-catalog-hero { align-items: start; grid-template-columns: 1fr; }
  .genealogy-catalog-stats { width: 100%; border-left: 0; }
  .genealogy-catalog-stats div:first-child { border-left: 1px solid #bccbc5; }
  .genealogy-catalog-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .genealogy-catalog-hero,
  .section.genealogy-catalog-panel { width: min(100% - 28px, 1180px); }
  .genealogy-catalog-hero { margin-top: 18px; padding: 28px 20px; }
  .genealogy-catalog-hero h1 { font-size: 36px; }
  .genealogy-catalog-hero h1 + p { font-size: 17px; }
  .genealogy-catalog-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .genealogy-catalog-stats div { min-width: 0; padding: 2px 10px; }
  .genealogy-catalog-stats dt { font-size: 25px; }
  .genealogy-catalog-stats dd { font-size: 12px; }
  .genealogy-catalog-search { grid-template-columns: 1fr; }
  .genealogy-catalog-layout { grid-template-columns: 1fr; gap: 20px; }
  .genealogy-catalog-filters { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top-width: 2px; }
  .genealogy-filter-heading { grid-column: 1 / -1; }
  .genealogy-catalog-filters section { padding-right: 12px; }
}
@media (max-width: 520px) {
  .genealogy-catalog-stats { grid-template-columns: 1fr; }
  .genealogy-catalog-stats div,
  .genealogy-catalog-stats div:first-child { display: flex; align-items: baseline; gap: 8px; border-left: 1px solid #bccbc5; border-bottom: 1px solid #d5dedb; padding: 8px 12px; }
  .genealogy-catalog-stats dd { margin: 0; }
  .genealogy-catalog-filters { grid-template-columns: 1fr; }
  .genealogy-catalog-result-head { align-items: stretch; flex-direction: column; }
  .genealogy-catalog-card { grid-template-columns: 84px minmax(0, 1fr); min-height: 250px; }
  .genealogy-catalog-cover span { font-size: 23px; }
  .genealogy-catalog-card-copy { padding: 17px 14px; }
  .genealogy-catalog-card-copy h2 { font-size: 22px; }
}
