:root {
  --navy: #1f2a44;
  --navy-soft: #2c3a5e;
  --gold: #b08d57;
  --gold-soft: #d8c3a0;
  --bg: #f6f4ef;
  --paper: #ffffff;
  --ink: #23262d;
  --muted: #6b7280;
  --line: #e5e0d6;
  --ok: #2f7d5b;
  --err: #b23a3a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31, 42, 68, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "PingFang HK", "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 15px;
}

h1, h2, h3 {
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  color: var(--navy);
  line-height: 1.35;
  margin: 0;
}

a { color: var(--navy-soft); text-decoration: none; }
a:hover { color: var(--gold); }

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* header */
.site-header {
  position: relative;
  z-index: 30;
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  flex-wrap: nowrap;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: 0 0 auto; }
.brand-logo {
  display: block;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 8px;
}
.brand-text { font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif; font-size: 16px; letter-spacing: 0.5px; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: nowrap; }
.nav a { color: #d7dced; font-size: 13.5px; white-space: nowrap; }
.nav a:hover { color: #fff; }
.nav > a.active { color: #fff; font-weight: 600; border-bottom: 2px solid var(--gold); }
.lang-switch { display: flex; align-items: center; gap: 6px; }
.lang-switch a { padding: 3px 8px; border-radius: 6px; }
.lang-switch a.active { background: rgba(255,255,255,0.14); color: #fff; }
.lang-switch .sep { color: #8790a8; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.site-search {
  position: relative;
  flex: 0 0 168px;
  min-width: 0;
}
.site-search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 7px 34px 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font: inherit;
  font-size: 13.5px;
}
.site-search input[type="search"]::placeholder { color: #b7c0d4; }
.site-search input[type="search"]::-webkit-search-decoration,
.site-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.site-search button {
  position: absolute;
  top: 50%;
  right: 3px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gold-soft);
  cursor: pointer;
}
.site-search button:hover { color: #fff; }
.search-suggest {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(31, 42, 68, 0.16);
}
.search-suggest[hidden] { display: none !important; }
.search-suggest a {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.45;
}
.search-suggest a.is-active,
.search-suggest a:hover { background: #f7f5f0; color: var(--navy); }
.search-suggest-kind {
  flex: 0 0 auto;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
}
.search-suggest-title { min-width: 0; }
@media (min-width: 641px) {
  .site-search .search-suggest { width: 360px; left: auto; right: 0; }
}

.hero-search {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin: 16px 0 0;
}
.search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.hero-search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
.hero-search input[type="search"]::-webkit-search-decoration,
.hero-search input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; }
.hero-search .btn-primary { flex: 0 0 auto; }
.hero-search .search-suggest { top: calc(100% + 6px); }

.search-count { margin: 18px 0 14px; color: var(--muted); font-size: 13.5px; }
.search-empty .hint { margin-bottom: 14px; }
.search-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.search-hit-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}
.search-hit-card:hover { border-color: var(--gold); color: inherit; }
.search-hit-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.search-kind {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: #f3efe6;
  color: var(--navy);
  font-size: 12px;
  line-height: 1.6;
}
.search-kicker { color: var(--muted); font-size: 12.5px; }
.search-hit-title { color: var(--navy); font-size: 16.5px; font-weight: 600; line-height: 1.45; }
.search-hit-card:hover .search-hit-title,
.search-hit-card:hover .search-kind { color: var(--navy); }
.search-snippet { color: #4a4f5a; font-size: 13.5px; line-height: 1.65; }
mark.search-hit {
  background: #f4e4c4;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}


.main { padding: 34px 0 60px; }

/* hero */
.hero { padding: 20px 0 8px; }
.hero h1 { font-size: clamp(24px, 3.4vw, 36px); margin-bottom: 16px; }
.hero-card {
  background: var(--navy);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 0 0 18px;
}
.hero-card-text {
  margin: 0;
  color: #f4f1e9;
  font-size: 16px;
  line-height: 1.8;
}
.hero-intro {
  background: var(--paper);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  padding: 16px 20px;
  color: #4a4f5a;
  font-size: 14.5px;
  margin: 0;
  box-shadow: var(--shadow);
}
.hero-note { color: #4a4f5a; font-size: 14.5px; margin: 16px 0 0; max-width: 980px; }

.block { margin-top: 42px; }
.section-title {
  font-size: 20px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.sub-title { font-size: 15.5px; margin: 22px 0 8px; }

/* process flow */
.process-flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.process-flow li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}
.process-flow.compact li { padding: 10px 16px; box-shadow: none; }
.step-no {
  flex: 0 0 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
}
.step-link {
  display: inline-block;
  margin-left: 8px;
  color: var(--gold);
  font-weight: 600;
  white-space: nowrap;
}
.step-link:hover { color: var(--navy); }

/* categories */
.scenario-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 30px; }
.scenario-jump-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--navy-soft);
  font-size: 13.5px;
  transition: border-color .15s ease, color .15s ease;
}
.scenario-jump-link:hover { border-color: var(--gold); color: var(--gold); }
.category { margin-bottom: 34px; }
.category-head { margin-bottom: 16px; padding-left: 14px; border-left: 3px solid var(--gold); }
.category-head h3 { font-size: 20px; }
.count { font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.category-desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.scenario-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: border-color .15s ease;
}
.scenario-card:hover { border-color: var(--gold); }
.scenario-title { font-weight: 600; color: var(--navy); font-size: 15.5px; }
.scenario-summary { color: var(--muted); font-size: 13.5px; flex: 1; }
.scenario-cta { align-self: flex-end; color: var(--gold); font-size: 13px; font-weight: 600; }

/* panels */
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.panel-muted { background: #faf8f3; }
.panel-title { font-size: 24px; margin-bottom: 8px; }
.panel-sub { color: var(--muted); margin: 0; }
.article-body p { margin: 0 0 14px; line-height: 1.75; }
.article-body .section-title { margin-top: 8px; }
.article-body .check-list { margin-bottom: 14px; }
.result-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin: 12px 0 0; }

.back-link { color: var(--muted); font-size: 14px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.crumbs a { color: var(--navy-soft); }
.crumbs a:hover { color: var(--gold); }
.crumbs .sep { color: #b9b2a5; }
.result-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.result-toolbar.no-print { justify-content: flex-end; }
.toolbar-actions { display: flex; gap: 10px; align-items: center; }

/* forms */
.form-card .section-title { margin-top: 0; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.field { margin-bottom: 18px; }
.field-label { display: block; font-weight: 600; margin-bottom: 7px; color: var(--navy); font-size: 14px; }
input[type="text"], input[type="password"], input[type="email"], select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14.5px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
}
input[type="text"]:hover, input[type="password"]:hover, input[type="email"]:hover, select:hover {
  border-color: var(--gold-soft);
}
textarea {
  width: 100%;
  min-height: 150px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.7;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  resize: vertical;
}
textarea:hover { border-color: var(--gold-soft); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(176,141,87,0.15); }
.input-shell { position: relative; }
.input-shell .input-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--gold);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.input-shell input[type="email"] { padding-left: 40px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radio-group { display: flex; flex-wrap: wrap; gap: 10px; }
.radio-item {
  display: flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); border-radius: 6px; padding: 9px 14px; cursor: pointer; font-size: 14px;
}
.radio-item:hover { border-color: var(--gold); }

.form-actions { display: flex; justify-content: flex-end; gap: 12px; align-items: center; margin-top: 8px; }
.btn-primary, .btn-ghost {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 11px 22px;
  font-size: 14.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy-soft); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* result lists */
.answer-list { list-style: none; margin: 0; padding: 0; }
.answer-list li { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.answer-list li:last-child { border-bottom: none; }
.answer-q { color: var(--muted); }
.answer-v { font-weight: 600; color: var(--navy); text-align: right; }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0 11px 26px; border-bottom: 1px solid var(--line); position: relative; font-size: 14.5px; }
.check-list li:last-child { border-bottom: none; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.check-note { color: var(--muted); font-size: 13px; white-space: nowrap; }
.check-link { color: var(--navy); }
.check-link:hover { color: var(--gold); }
.tpl-tag { font-size: 12px; color: var(--gold); font-weight: 600; margin-left: 2px; }
.eyebrow { display: inline-block; font-size: 12px; letter-spacing: 1px; color: var(--gold); font-weight: 600; margin-bottom: 8px; }
.guide-issuer { margin: 12px 0 0; color: var(--navy-soft); font-size: 14px; font-weight: 600; }
.content-byline { color: var(--muted); font-size: 12.5px; line-height: 1.7; margin: 12px 0 0; }
.content-byline .sep { margin: 0 4px; }
.content-updated { margin-top: 18px; }
.tpl-hint { margin: 14px 0 0; }
.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.download-title { font-size: 18px; margin: 0 0 6px; }
.download-row .hint { margin: 0; }
.download-row > .btn-primary { margin-left: auto; }
.doc-body {
  white-space: pre-wrap;
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: 15px;
  line-height: 1.95;
  color: var(--ink);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 22px 26px;
  background: #fcfbf7;
}
.doc-note { color: var(--muted); font-size: 13.5px; margin: 6px 0; }

.fee-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.fee-table td { padding: 11px 0; border-bottom: 1px solid var(--line); }
.fee-table tr:last-child td { border-bottom: none; }
.fee-amount { text-align: right; color: var(--navy); font-weight: 600; }

.client-read {
  background: #fbf6ea;
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 16px 20px;
  color: #5c4a2c;
  font-size: 14.5px;
}
.lawyer-panel { border-left: 4px solid var(--navy); }

.warn-panel { border-left: 4px solid #c48a2c; background: #fff8ec; }
.warn-panel .section-title { color: #8a5a12; border-bottom-color: #ecd9b8; }
.warn-list { margin: 0; padding-left: 20px; color: #7a5316; font-size: 14.5px; }
.warn-list li { margin: 7px 0; }

/* tabs */
.tab-nav { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-btn {
  border: 1px solid var(--line); background: var(--paper); color: var(--muted);
  padding: 9px 20px; border-radius: 6px; cursor: pointer; font-size: 14px; font-family: inherit;
}
.tab-btn.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* admin */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.data-table th:last-child, .data-table td:last-child { text-align: right; }
.data-table td form { display: flex; justify-content: flex-end; }
.data-table tr:hover td { background: #faf8f3; }
.check-col { width: 36px; text-align: center !important; }
.check-col input { cursor: pointer; }
.table-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.pagination { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.page-info { color: var(--muted); font-size: 13px; }
.btn-danger {
  display: inline-block;
  border: none;
  border-radius: 6px;
  padding: 9px 18px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  background: var(--err);
  color: #fff;
  transition: background .15s ease;
}
.btn-danger:hover { background: #8f2c2c; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.link { color: var(--gold); font-weight: 600; }
.filter-form select { min-width: 200px; }
.login-wrap { display: grid; place-items: center; padding: 30px 0; }
.login-card { width: min(400px, 92vw); }
.flash { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin: 0 0 16px; }
.flash-error { background: #fbeaea; color: var(--err); }
.flash-ok { background: #e9f5ee; color: var(--ok); }
.checkbox-row { display: flex; align-items: center; gap: 9px; margin: 4px 0 20px; font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }
.message-cell { min-width: 240px; white-space: pre-wrap; word-break: break-word; }

/* contact */
.contact-panel { max-width: none; }
.contact-panel .section-title { margin-top: 0; }
.contact-panel textarea { min-height: 120px; }
.article-editor { min-height: 280px; font-size: 14.5px; line-height: 1.75; }
.contact-note { margin: 14px 0 0; }

.reach-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
}
.reach-main { padding: 26px 28px 24px; }
.reach-who { display: flex; align-items: center; gap: 16px; }
.reach-who .lawyer-avatar {
  width: 76px;
  height: 76px;
  margin: 0;
  flex: 0 0 76px;
  border: 2px solid rgba(216, 195, 160, 0.9);
}
.reach-who .eyebrow { margin-bottom: 2px; }
.reach-who .lawyer-name { color: var(--navy); font-size: 22px; margin: 0; }
.reach-who .lawyer-role { color: var(--muted); font-size: 13.5px; margin: 4px 0 0; }
.lawyer-avatar {
  display: block;
  object-fit: cover;
  border-radius: 50%;
  background: #fff;
}
.lawyer-bio { color: #4a4f5a; font-size: 13.8px; line-height: 1.8; margin: 16px 0 0; }
.reach-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
  margin: 18px 0 0;
}
.reach-meta .span-2 { grid-column: 1 / -1; }
.reach-meta dt { color: var(--muted); font-size: 12px; margin: 0; }
.reach-meta dd { margin: 3px 0 0; color: var(--navy); font-weight: 600; font-size: 14px; word-break: break-word; }
.lawyer-contact-value { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 9px; }
.meta-wa { color: var(--gold); }
.meta-wa:hover { color: var(--navy); }
.lawyer-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.lawyer-actions .btn-primary, .lawyer-actions .btn-ghost { flex: 0 0 auto; text-align: center; }
.reach-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 22px 18px;
  background: #f6f3ec;
  border-left: 1px solid var(--line);
  text-align: center;
}
.reach-qr-title { margin: 0 0 12px; color: var(--navy); font-weight: 700; font-size: 15px; }
.reach-qr .wechat-qr { margin: 0; }
.reach-qr .wechat-qr img { width: min(220px, 100%); }
.wechat-qr { margin: 16px 0 0; text-align: center; }
.wechat-qr img {
  display: block;
  width: min(260px, 100%);
  height: auto;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.wechat-qr figcaption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 8px 0 0; }
.meta-grid dt { color: var(--muted); font-size: 12.5px; margin-bottom: 4px; }
.meta-grid dd { margin: 0; font-weight: 600; color: var(--navy); }

/* footer */
.site-footer {
  border-top: 3px solid var(--gold);
  padding: 46px 0 28px;
  background: var(--navy);
  color: #d5dced;
  text-align: left;
}
.site-footer p { color: #c5cce0; font-size: 13.5px; margin: 0; line-height: 1.75; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(200px, 0.8fr) 176px;
  grid-template-areas: "practice links qr";
  gap: 36px 48px;
  align-items: center;
}
.footer-practice { grid-area: practice; }
.footer-nav { grid-area: links; }
.site-footer .footer-qr { grid-area: qr; }
.footer-kicker {
  margin: 0 0 14px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
}
.site-footer .footer-name {
  font-family: "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  color: #fff;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.site-footer .footer-practice p + p { margin-top: 4px; }
.site-footer .footer-practice a { color: #fff; }
.site-footer .footer-practice a:hover { color: var(--gold-soft); }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; align-content: start; }
.footer-links a { color: #e7ebf5; font-size: 14.5px; }
.footer-links a:hover { color: var(--gold-soft); }
.site-footer .footer-qr { margin: 0; text-align: left; }
.site-footer .footer-qr img {
  width: 132px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.site-footer .footer-qr figcaption { margin-top: 10px; color: #b7c0d4; font-size: 12px; text-align: left; line-height: 1.6; }
.footer-bottom {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.site-footer .footer-copy { color: var(--gold-soft); letter-spacing: 0.4px; }
.site-footer .footer-disclaimer { margin-top: 6px; color: #9aa3bb; font-size: 12px; line-height: 1.7; }

@media (max-width: 1024px) {
  .header-inner { flex-wrap: wrap; }
  .nav { margin-left: 0; }
  .site-search { flex: 1 1 200px; max-width: 280px; }
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "practice" "links" "qr";
    gap: 26px;
    align-items: start;
  }
  .site-footer { padding: 32px 0 22px; }
  .site-footer .footer-name { font-size: 22px; }
  .reach-card { grid-template-columns: 1fr; }
  .reach-qr { border-left: 0; border-top: 1px solid var(--line); }
  .reach-meta { grid-template-columns: 1fr; }
  .reach-meta .span-2 { grid-column: auto; }
}

@media (max-width: 640px) {
  .field-grid { grid-template-columns: 1fr; }
  .panel { padding: 20px 18px; }
  .panel.reach-card { padding: 0; }
  .reach-main { padding: 20px 18px 18px; }
  .header-inner { padding: 12px 0; flex-wrap: wrap; }
  .nav { gap: 14px; flex-wrap: wrap; margin-left: 0; }
  .site-search { flex: 1 1 100%; max-width: none; min-width: 0; }
  .hero-search { flex-direction: column; }
  .hero-search .btn-primary { width: 100%; text-align: center; }
  .hero-card { padding: 16px 18px; }
  .hero-card-text { font-size: 15.5px; }
  .data-table { min-width: 780px; }
  .toolbar-actions { flex-wrap: wrap; }
  .filter-form { flex: 1 1 100%; }
  .filter-form select { width: 100%; min-width: 0; }
}

/* kinship */
#kinship-form [hidden],
#kin-error[hidden] { display: none !important; }
.kin-client .kin-lawyer-only { display: none !important; }
.kin-wizard [data-step] { display: none; }
.kin-wizard [data-step].is-active { display: block; }
.kin-all [data-step] { display: block; margin-bottom: 8px; }
.kin-subhead { margin-top: 22px; }
.kin-person {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 14px 8px;
  margin-bottom: 12px;
  background: #fff;
}
.kin-nested {
  margin: 4px 0 12px 12px;
  padding-left: 12px;
  border-left: 2px solid var(--gold-soft);
}
.kin-flags { display: grid; gap: 8px; margin-bottom: 18px; }
.kin-flags .radio-item input { width: auto; }
.kin-diagram {
  overflow-x: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
}
.kin-diagram svg { width: 100%; min-width: 320px; height: auto; font-family: inherit; }
.kin-card { fill: #fff; stroke: var(--navy); stroke-width: 1.4; }
.kin-dead { stroke-dasharray: 5 3; fill: #f7f4ee; }
.kin-hk { stroke: #b08d57; }
.kin-mainland { stroke: #1f2a44; }
.kin-foreign { stroke: #2f7d5b; }
.kin-unknown { stroke: #6b7280; }
.kin-decedent { stroke: #1f2a44; stroke-width: 2; }
.kin-note { fill: #fbf8f2; stroke: #b08d57; stroke-dasharray: 2 2; }
.kin-line { stroke: #c4b79a; stroke-width: 1.2; }
.kin-name { font-size: 14px; fill: #1f2a44; }
.kin-badge, .kin-edge-label { font-size: 11px; fill: #6b7280; }
.kin-fact { font-size: 11px; fill: #1f2a44; }
.kin-edge-label { stroke: #fff; stroke-width: 3px; paint-order: stroke; }
.kin-meta { color: var(--muted); font-size: 13px; font-weight: 400; }
.kin-mark {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 2px 8px;
  border-radius: 99px;
  background: #f6f4ef;
  color: var(--navy);
  font-size: 12px;
}
.kin-rules { list-style: none; padding: 0; margin: 0 0 12px; }
.kin-rules li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.kin-rules p { margin: 0; }
.kin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 16px;
  align-items: start;
}
.kin-split > .panel { margin-bottom: 0; }
@media (max-width: 800px) {
  .kin-split { grid-template-columns: 1fr; }
}

/* print */
@media print {
  .site-header, .site-footer, .no-print, .tab-nav, .crumbs { display: none !important; }
  body { background: #fff; }
  .panel { box-shadow: none; border-color: #ccc; page-break-inside: avoid; }
  .tab-panel { display: block !important; }
  .main { padding: 0; }
}
