:root {
  --ink: #14201c;
  --muted: #5c6b64;
  --line: #c9d4ce;
  --paper: #f2f5f3;
  --surface: rgba(255, 255, 255, 0.78);
  --accent: #0f5c48;
  --accent-2: #1a7a5e;
  --warn: #8b6914;
  --support: #d7ebe3;
  --partial: #dde3ef;
  --deny: #efe0e0;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --sans: "Sora", "Noto Sans SC", sans-serif;
  --max: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  background:
    radial-gradient(900px 480px at 85% 8%, rgba(26, 122, 94, 0.12), transparent 60%),
    radial-gradient(700px 420px at 8% 20%, rgba(20, 60, 80, 0.08), transparent 55%),
    linear-gradient(165deg, #e7eeea 0%, var(--paper) 42%, #e4ebe8 100%);
  min-height: 100vh;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }

.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 12px; top: 12px; z-index: 20; background: #fff; padding: 8px 12px; }

/* —— Landing —— */
.land {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}
.land-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 16px;
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.land-top-links a {
  color: var(--muted);
  text-decoration: none;
}
.land-top-links a:hover { color: var(--accent); }
.hero {
  position: relative;
  min-height: calc(100vh - 54px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}
.hero-plane {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(120deg, rgba(15, 92, 72, 0.88) 0%, rgba(18, 48, 58, 0.82) 48%, rgba(20, 55, 48, 0.9) 100%),
    repeating-linear-gradient(
      90deg,
      transparent 0 48px,
      rgba(255, 255, 255, 0.035) 48px 49px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 48px,
      rgba(255, 255, 255, 0.03) 48px 49px
    );
  transform: scale(1.02);
  animation: plane-drift 18s ease-in-out infinite alternate;
}
.hero-plane::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.12), transparent 35%),
    linear-gradient(to top, rgba(10, 24, 20, 0.45), transparent 45%);
}
@keyframes plane-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.05) translate3d(-1.2%, 0.8%, 0); }
}
.hero-inner {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 56px;
  color: #f4faf7;
}
.brand {
  font-family: var(--sans);
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin: 0 0 14px;
  line-height: 1.1;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.15s;
}
.hero-line {
  margin: 0 0 10px;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  font-weight: 500;
  max-width: 28em;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.32s;
}
.hero-sub {
  margin: 0 0 28px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: rgba(244, 250, 247, 0.78);
  max-width: 34em;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.45s;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.58s;
}
.cta {
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: #f4faf7;
  border: none;
  text-decoration: none;
  padding: 12px 20px;
  display: inline-block;
  transition: transform 0.2s ease, background 0.2s ease;
}
.cta:hover { background: #fff; color: var(--ink); transform: translateY(-2px); text-decoration: none; }
.cta-ghost {
  font-family: var(--sans);
  font-size: 14px;
  color: rgba(244, 250, 247, 0.85);
  border: 1px solid rgba(244, 250, 247, 0.35);
  padding: 11px 18px;
  text-decoration: none;
  display: inline-block;
}
.cta-ghost:hover { color: #fff; border-color: rgba(244, 250, 247, 0.7); text-decoration: none; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.land-cities {
  width: min(var(--max), calc(100% - 40px));
  margin: -28px auto 20px;
  position: relative;
  z-index: 1;
}
.region-lede {
  margin: 0 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.region-block {
  margin-bottom: 10px;
  background: var(--surface);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 2px;
}
.region-block:last-child {
  margin-bottom: 0;
}
.region-title {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  user-select: none;
}
.region-title::-webkit-details-marker { display: none; }
.region-title::marker { content: ""; }
.region-title::before {
  content: "";
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 2px;
  flex: 0 0 auto;
  transition: transform 0.18s ease;
  opacity: 0.75;
}
.region-block[open] > .region-title::before {
  transform: rotate(45deg);
  margin-top: 0.15em;
}
.region-title .region-name {
  flex: 1 1 auto;
}
.region-title .region-count {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.region-cities {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 12px 12px;
}
@media (min-width: 720px) {
  .region-cities {
    grid-template-columns: 1fr 1fr;
  }
}
.city-tier-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.city-tier-filter button {
  font-family: var(--sans);
  font-size: 13px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  cursor: pointer;
}
.city-tier-filter button[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--support);
  color: var(--accent);
}
.tier-chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  margin-right: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.65);
}
.tier-chip.tier-featured {
  color: var(--accent);
  border-color: rgba(15, 92, 72, 0.35);
  background: var(--support);
}
.tier-chip.tier-thin {
  color: #6a5a2a;
  border-color: #e0d4a8;
  background: #f3ecd6;
}
.region-block.is-empty { display: none; }
.method {
  padding: 28px 20px 64px;
  max-width: var(--max);
  margin: 0 auto;
}
.method .lede { color: var(--muted); line-height: 1.7; }
.method ul { line-height: 1.75; padding-left: 1.2em; }
.method .crumb { font-family: var(--sans); font-size: 13px; }
.city-pick {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  padding: 14px 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.city-pick:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}
.city-pick .name {
  font-family: var(--sans);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 4px;
}
.city-pick .meta {
  margin: 0;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.city-pick .live {
  display: inline-block;
  margin-top: 8px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-bottom: 1px solid currentColor;
}
.city-soon {
  opacity: 0.55;
  pointer-events: none;
  margin-top: 12px;
}

/* —— Inner pages —— */
.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 22px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--muted);
}
.topbar a { color: var(--muted); text-decoration: none; }
.topbar a:hover { color: var(--accent); }
.topbar-links { text-align: right; }
.note {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--warn);
  background: linear-gradient(90deg, #fff6df, #f7f1e4);
  border-left: 3px solid #d4b35c;
  padding: 10px 14px;
  margin-bottom: 28px;
  line-height: 1.55;
}
.page-brand {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: none;
  color: var(--accent);
  margin: 0 0 8px;
}
h1 {
  font-size: clamp(1.55rem, 3.5vw, 2rem);
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
  line-height: 1.25;
}
.lean-label {
  font-weight: 700;
}
.lean-chip {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  margin-left: 6px;
  border-radius: 3px;
  vertical-align: middle;
  white-space: nowrap;
}
.lean-parents, .lean-label.lean-parents { color: #0f5c48; }
.lean-chip.lean-parents { color: #0f5c48; background: #d7ebe3; }
.lean-spouse, .lean-label.lean-spouse { color: #7a2e2e; }
.lean-chip.lean-spouse { color: #7a2e2e; background: #efe0e0; }
.lean-pending, .lean-label.lean-pending { color: #6a5a2a; }
.lean-chip.lean-pending { color: #6a5a2a; background: #f3ecd6; }
.lean-split, .lean-label.lean-split { color: #3d4a66; }
.lean-chip.lean-split { color: #3d4a66; background: #e4e8f0; }
.lean-by-court {
  font-family: var(--sans);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  margin: 0 0 12px;
  line-height: 1.55;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.lean-court { white-space: nowrap; }
.city-pick .name .lean-chip { display: inline-block; margin: 2px 4px 2px 0; }
h2 {
  font-size: 1.28rem;
  margin: 42px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
h3 {
  font-size: 1.05rem;
  margin: 26px 0 10px;
}
.lede, .sub, .meta, .why {
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.65;
  color: var(--muted);
}
.prose {
  font-size: 16px;
  line-height: 1.85;
  margin: 0 0 16px;
}
.prose strong { font-weight: 600; }

.toc {
  font-family: var(--sans);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 18px 0 8px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.toc a {
  color: var(--muted);
  text-decoration: none;
}
.toc a:hover { color: var(--accent); }

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0 0 8px;
}
.ref-list li { margin: 0 0 10px; }
.ref-list a {
  font-family: var(--sans);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(15, 92, 72, 0.35);
}
.ref-list a:hover { border-bottom-color: var(--accent); }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 16px;
  font-family: var(--sans);
}
.filters button {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  padding: 7px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filters button[aria-pressed="true"],
.filters button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #f4faf7;
}

.court-group {
  margin: 1.6rem 0 0.55rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.case-groups .case-table { margin-bottom: 1.1rem; }
.case-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin: 0 0 28px;
}
.case-table th,
.case-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.case-table th {
  background: rgba(15, 92, 72, 0.06);
  font-weight: 600;
  color: var(--ink);
}
.case-table tr[hidden] { display: none; }
.case-table a { text-decoration: none; font-weight: 500; }
.case-table a:hover { text-decoration: underline; }
.tag {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.4;
}
.tag-s { background: var(--support); }
.tag-p { background: var(--partial); }
.tag-n { background: var(--deny); }
.why { color: var(--muted); }

.seg { margin: 22px 0; }
.seg h3 {
  margin: 0 0 8px;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 600;
}
.seg pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  padding: 16px 18px;
  background: var(--surface);
  border-left: 3px solid var(--accent);
  line-height: 1.75;
  font-family: var(--serif);
  font-size: 15px;
}
.ext {
  font-family: var(--sans);
  font-size: 14px;
  margin-top: 20px;
  line-height: 1.6;
}
.footer-note {
  margin-top: 48px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.site-foot {
  margin-top: 40px;
  padding: 28px 0 8px;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  color: var(--muted);
}
.land > .site-foot {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 24px 0 56px;
}
.site-foot-inner {
  text-align: center;
  max-width: 36rem;
  margin: 0 auto;
}
.site-foot-brand {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.site-foot-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.site-foot-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
  margin: 18px 0 0;
}
.site-foot-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.site-foot-nav a:hover {
  color: var(--accent);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.55);
}
.site-foot-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.site-foot-contact a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot-contact a:hover { color: var(--accent); }
.site-foot-contact span::after,
.site-foot-contact a:not(:last-child)::after {
  content: none;
}

.rec-case {
  margin: 0 0 28px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.rec-case h3 { margin-top: 0; }
.rec-case .prose { margin-bottom: 10px; }
.rec-link {
  font-family: var(--sans);
  font-size: 13px;
  margin: 0;
}
.rec-list { margin: 8px 0 12px; }

@media (max-width: 640px) {
  .hero-inner { padding-bottom: 40px; }
  .case-table { display: block; overflow-x: auto; }
  .brand { letter-spacing: 0.04em; }
}

.rec-case {
  margin: 0 0 28px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.rec-case h3 { margin-top: 0; }
.rec-case .prose { margin-bottom: 10px; }
.rec-case .meta a { font-family: var(--sans); font-size: 13px; }
.ref-full { margin-top: 8px; }
.ref-full .seg, .ref-full pre { margin-top: 12px; }
