:root {
  color-scheme: light;
  --bg: #eef3f1;
  --bg-lift: #f8faf9;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --surface-strong: #ffffff;
  --ink: #1c2523;
  --muted: #66716e;
  --line: #d7dfdc;
  --line-strong: #acbab5;
  --green: #248b66;
  --red: #c44545;
  --blue: #2b73b7;
  --gold: #c47a25;
  --violet: #7f5ac7;
  --empty-seat: #cfd7d2;
  --vote-yea: #248b66;
  --vote-nay: #c44545;
  --vote-abstain: #8b9490;
  --shadow: 0 18px 48px rgba(23, 35, 31, 0.10);
  --soft-shadow: 0 8px 24px rgba(23, 35, 31, 0.07);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111816;
  --bg-lift: #17211e;
  --surface: #1a2421;
  --surface-soft: #202d29;
  --surface-strong: #24322e;
  --ink: #eef7f2;
  --muted: #a7b7b1;
  --line: #34443f;
  --line-strong: #4d635d;
  --green: #5ed19d;
  --red: #ff7772;
  --blue: #72aef0;
  --gold: #f2b965;
  --violet: #b79df1;
  --empty-seat: #4a5854;
  --vote-yea: #5ed19d;
  --vote-nay: #ff7772;
  --vote-abstain: #a7b7b1;
  --shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
  --soft-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(36, 139, 102, 0.10), transparent 28rem),
    linear-gradient(220deg, rgba(43, 115, 183, 0.10), transparent 30rem),
    var(--bg);
  font-family: "Inter", "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(13rem, 20rem) minmax(18rem, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem clamp(0.9rem, 3vw, 2rem);
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  background: color-mix(in srgb, var(--surface), transparent 8%);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, #248b66, #2b73b7 64%, #7f5ac7);
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(43, 115, 183, 0.24);
}

.brand-title {
  font-weight: 850;
  line-height: 1.08;
}

.brand-subtitle {
  margin-top: 0.16rem;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-shell {
  position: relative;
}

.search-input {
  width: 100%;
  height: 2.55rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface-strong);
  outline: none;
  font-size: 0.95rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.search-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue), transparent 78%);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.48rem);
  left: 0;
  right: 0;
  max-height: min(30rem, 74vh);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.search-group-title {
  padding: 0.72rem 0.9rem 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.search-result {
  display: grid;
  grid-template-columns: 4rem 1fr;
  gap: 0.75rem;
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 24%);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-result:hover,
.search-result:focus {
  background: color-mix(in srgb, var(--blue), transparent 90%);
  outline: none;
}

.search-type {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
}

.search-label {
  display: block;
  font-weight: 780;
}

.search-subtitle {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.tab,
.theme-toggle {
  display: grid;
  place-items: center;
  min-width: 4.3rem;
  height: 2.08rem;
  padding: 0 0.78rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 780;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, #1f5f4c, #254b75);
  box-shadow: 0 8px 18px rgba(31, 95, 76, 0.18);
}

.theme-toggle {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.app {
  width: min(1340px, 100%);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 2rem);
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.05rem;
}

.page-title {
  margin: 0;
  font-size: clamp(1.55rem, 2.2vw, 2.08rem);
  line-height: 1.16;
}

.page-meta {
  margin-top: 0.35rem;
  color: var(--muted);
  line-height: 1.45;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.82rem;
  margin-bottom: 1rem;
}

.metric {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 8%);
  box-shadow: var(--soft-shadow);
}

.metric-value {
  font-size: 1.45rem;
  font-weight: 880;
}

.metric-label {
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(18rem, 25rem) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.layout.directory-collapsed {
  grid-template-columns: minmax(3.6rem, 4.2rem) minmax(0, 1fr);
}

.directory,
.detail {
  min-width: 0;
}

.directory-shell {
  position: sticky;
  top: 5rem;
  display: grid;
  gap: 0.55rem;
  min-width: 0;
}

.directory {
  display: grid;
  gap: 0.55rem;
  max-height: calc(100vh - 6.5rem);
  overflow: auto;
  padding-right: 0.18rem;
}

.directory-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  align-items: center;
  width: 100%;
  min-height: 3.6rem;
  padding: 0.82rem 0.92rem;
  border: 1px solid color-mix(in srgb, var(--blue), var(--line) 48%);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue), transparent 88%), transparent 55%),
    var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--soft-shadow);
}

.directory-toggle:hover,
.directory-toggle:focus {
  border-color: var(--line-strong);
  outline: none;
}

.directory-toggle-title {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.directory-action {
  display: inline-grid;
  place-items: center;
  min-height: 1.65rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  color: #fff;
  background: var(--blue);
  font-size: 0.78rem;
  font-weight: 850;
}

.directory-shell.collapsed .directory {
  display: none;
}

.directory-shell.collapsed .directory-toggle {
  position: sticky;
  top: 5rem;
  display: flex;
  width: 3.8rem;
  min-height: 12rem;
  padding: 0.65rem 0.48rem;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
}

.directory-shell.collapsed .directory-action {
  margin-top: 0.65rem;
}

.row-card {
  display: block;
  width: 100%;
  padding: 0.86rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 7%);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.row-card:hover,
.row-card:focus {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--surface-strong);
  outline: none;
}

.row-card.active {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green), var(--surface) 88%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--green), transparent 84%);
}

.gov-row {
  --gov: var(--blue);
  border-left: 4px solid var(--gov);
}

.gov-row.active {
  border-color: var(--gov);
  background: color-mix(in srgb, var(--gov), var(--surface) 88%);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--gov), transparent 84%);
}

.gov-dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  margin-right: 0.45rem;
  border-radius: 999px;
  background: var(--gov);
}

.badge.gov-badge {
  color: var(--gov);
  background: color-mix(in srgb, var(--gov), transparent 87%);
}

.gov-absolute {
  --gov: #c47a25;
  --gov-2: #8f5d1e;
}

.gov-constitutional {
  --gov: #9b6bd3;
  --gov-2: #c47a25;
}

.gov-parliamentary {
  --gov: #248b66;
  --gov-2: #2b73b7;
}

.gov-semi {
  --gov: #7f5ac7;
  --gov-2: #2b73b7;
}

.gov-presidential {
  --gov: #2b73b7;
  --gov-2: #3f8c9b;
}

.gov-default {
  --gov: var(--blue);
  --gov-2: var(--green);
}

.row-title {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  font-weight: 820;
}

.row-title > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-meta {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.45rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  color: var(--blue);
  background: color-mix(in srgb, var(--blue), transparent 88%);
  font-size: 0.76rem;
  font-weight: 840;
  white-space: nowrap;
}

.badge.green {
  color: var(--green);
  background: color-mix(in srgb, var(--green), transparent 87%);
}

.badge.red {
  color: var(--red);
  background: color-mix(in srgb, var(--red), transparent 87%);
}

.detail {
  display: grid;
  gap: 1rem;
  animation: lift 0.24s ease both;
}

.detail:focus {
  outline: none;
}

@keyframes lift {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel {
  padding: clamp(1rem, 2vw, 1.18rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.feature-panel {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--green), transparent 91%), transparent 38%),
    linear-gradient(220deg, color-mix(in srgb, var(--blue), transparent 92%), transparent 44%),
    var(--surface);
}

.gov-hero {
  --gov: var(--blue);
  --gov-2: var(--green);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--gov), transparent 82%), transparent 48%),
    linear-gradient(220deg, color-mix(in srgb, var(--gov-2), transparent 86%), transparent 54%),
    var(--surface);
}

.gov-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 0.32rem;
  background: linear-gradient(180deg, var(--gov), var(--gov-2));
}

.gov-hero-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
}

.gov-hero-main > div {
  min-width: 0;
}

.gov-mark {
  display: grid;
  place-items: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--gov), var(--gov-2));
  font-size: 1.45rem;
  font-weight: 900;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--gov), transparent 70%);
}

.gov-kicker {
  color: var(--gov);
  font-size: 0.78rem;
  font-weight: 880;
}

.gov-title {
  margin: 0.12rem 0 0;
  font-size: clamp(1.45rem, 2.3vw, 2.18rem);
  line-height: 1.1;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.gov-hero .page-meta {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.gov-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
  margin-top: 1rem;
}

.gov-focus-card {
  min-width: 0;
  padding: 0.78rem;
  border: 1px solid color-mix(in srgb, var(--gov), transparent 72%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface), transparent 14%);
}

.gov-focus-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
}

.gov-focus-card strong {
  display: block;
  margin-top: 0.28rem;
  overflow-wrap: anywhere;
}

.gov-latest {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.92rem;
  padding-top: 0.82rem;
  border-top: 1px solid color-mix(in srgb, var(--gov), transparent 76%);
}

.gov-latest span {
  color: var(--muted);
  font-size: 0.82rem;
}

.gov-latest strong {
  overflow-wrap: anywhere;
}

.structure-card {
  --gov: var(--blue);
}

.structure-card p {
  margin: 0 0 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}

.structure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.structure-grid .kv {
  min-height: 3.8rem;
  border-color: color-mix(in srgb, var(--gov), transparent 78%);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 0.9rem;
}

.panel-title {
  margin: 0;
  font-size: 1.16rem;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.72rem;
}

.kv {
  min-height: 4.25rem;
  padding: 0.74rem;
  border: 1px solid color-mix(in srgb, var(--line), transparent 12%);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft), transparent 10%);
}

.kv-label {
  color: var(--muted);
  font-size: 0.78rem;
}

.kv-value {
  margin-top: 0.3rem;
  font-weight: 820;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(17rem, 0.92fr);
  gap: 1rem;
}

.seat-svg {
  display: block;
  width: 100%;
  min-height: 10rem;
}

.stacked-bar {
  display: flex;
  width: 100%;
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.stacked-bar.thick {
  height: 0.78rem;
  margin: 0.65rem 0 0.35rem;
}

.stacked-bar span {
  min-width: 0.25rem;
}

.legend {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

.legend-row,
.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.62rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 25%);
}

.legend-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.legend-row:last-child,
.list-row:last-child {
  border-bottom: 0;
}

.swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 3px;
}

.muted {
  color: var(--muted);
}

.small-line {
  margin-top: 0.5rem;
  font-size: 0.86rem;
}

.linklike {
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  font: inherit;
  font-weight: 820;
  text-align: left;
  cursor: pointer;
}

.linklike:hover,
.linklike:focus {
  color: var(--green);
  text-decoration: underline;
  outline: none;
}

.person-link {
  color: var(--violet);
}

.list {
  display: grid;
}

.card-list {
  display: grid;
  gap: 0.72rem;
}

.data-card {
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--line), transparent 16%);
  border-radius: 8px;
  background: var(--surface-soft);
}

.data-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: start;
  margin-bottom: 0.7rem;
}

.vote-chart {
  display: grid;
  gap: 0.48rem;
}

.vote-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(6rem, 2fr) auto;
  gap: 0.62rem;
  align-items: center;
}

.vote-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.vote-track {
  height: 0.62rem;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line), transparent 30%);
}

.vote-track span {
  display: block;
  height: 100%;
  min-width: 0.2rem;
  border-radius: inherit;
  transition: width 0.24s ease;
}

.result-line,
.vote-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.68rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.vote-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.vote-legend i {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 2px;
}

.mini-bars {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.72rem;
  margin-top: 0.9rem;
}

.mini-bar {
  min-width: 0;
}

.mini-label {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-label strong {
  color: var(--ink);
}

.timeline {
  display: grid;
  gap: 0.75rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto minmax(7rem, 0.28fr) 1fr;
  gap: 0.75rem;
  align-items: start;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--line), transparent 25%);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.timeline-dot {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.25rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), var(--blue));
}

.history-type {
  font-weight: 850;
}

.history-time {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.empty {
  padding: 1rem 0;
  color: var(--muted);
}

.loading {
  margin: 12vh auto;
  width: min(28rem, 92vw);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--soft-shadow);
}

.loading-title {
  font-weight: 820;
}

.loading-line {
  height: 0.38rem;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface-soft);
}

.loading-line::before {
  content: "";
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--violet));
  animation: load 1.2s ease-in-out infinite;
}

@keyframes load {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(240%);
  }
}

@media (max-width: 1080px) {
  .topbar {
    grid-template-columns: minmax(13rem, 1fr) auto;
  }

  .search-shell {
    grid-column: 1 / -1;
    order: 3;
  }

  .tabs {
    justify-self: end;
  }

  .theme-toggle {
    justify-self: end;
  }

  .layout,
  .two-col {
    grid-template-columns: 1fr;
  }

  .layout.directory-collapsed {
    grid-template-columns: 1fr;
  }

  .directory-shell {
    position: static;
  }

  .directory {
    position: static;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .directory-shell.collapsed .directory-toggle {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
    min-height: 3.6rem;
    padding: 0.82rem 0.92rem;
    writing-mode: horizontal-tb;
  }

  .summary-strip,
  .kv-grid,
  .gov-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .tabs,
  .theme-toggle {
    width: 100%;
  }

  .tab {
    flex: 1;
    min-width: 0;
  }

  .summary-strip,
  .kv-grid,
  .gov-focus-grid,
  .structure-grid,
  .mini-bars,
  .directory {
    grid-template-columns: 1fr;
  }

  .page-head,
  .panel-head,
  .data-card-head {
    display: block;
  }

  .row-title {
    display: grid;
    align-items: start;
  }

  .gov-hero-main {
    grid-template-columns: 1fr;
  }

  .legend-row,
  .list-row,
  .vote-row,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .search-results {
    position: fixed;
    top: 8.6rem;
    left: 0.75rem;
    right: 0.75rem;
  }
}

.focus-root { max-width: 700px; margin: 16px auto; }
.focus-branches { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.focus-node { border: 1px solid var(--border, #526174); border-radius: 10px; padding: 14px; overflow-wrap: anywhere; }
.focus-node summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.focus-node summary:focus-visible { outline: 2px solid #65c6b6; outline-offset: 5px; }
.focus-node p { line-height: 1.7; }
.focus-current { border: 2px solid #58bba5; background: rgba(88,187,165,.08); }
.focus-arrow { display:block; text-align:center; padding:6px; }
.focus-unavailable { color: #dc895b; }
@media (max-width: 900px) { .focus-branches { grid-template-columns: 1fr; } }

/* Public-record layout: typography and dividing rules carry the hierarchy. */
:root { --bg:#f3f0e8; --bg-lift:#faf8f2; --surface:#f7f4ed; --surface-soft:#eeeadf; --surface-strong:#fffdf8; --ink:#252d2b; --muted:#69716a; --line:#d4d1c5; --line-strong:#8f9a90; --green:#25634c; --blue:#335f70; --shadow:none; --soft-shadow:none; }
:root[data-theme="dark"] { --bg:#171d1b; --bg-lift:#1d2521; --surface:#1b2320; --surface-soft:#242e29; --surface-strong:#25312a; --ink:#e9e8dd; --muted:#aeb9af; --line:#39443d; --line-strong:#7c8d7e; --green:#9ac5a8; --blue:#a4c4cf; --shadow:none; --soft-shadow:none; }
body { background:var(--bg); font-family:"Segoe UI","Microsoft YaHei",sans-serif; line-height:1.6; }
.skip-link { position:absolute; top:-100px; left:16px; z-index:100; padding:10px; background:var(--surface-strong); color:var(--ink); }
.skip-link:focus { top:10px; }
.topbar { grid-template-columns:minmax(240px,1fr) minmax(240px,400px) auto auto; gap:24px; padding:18px max(24px,calc((100vw - 1540px)/2)); background:var(--bg); border-bottom:2px solid var(--ink); backdrop-filter:none; }
.brand-mark { width:42px; height:42px; border-radius:0; border:1px solid var(--green); background:none; color:var(--green); font:28px "Noto Serif SC","SimSun",serif; box-shadow:none; }
.brand-title { font:700 24px "Noto Serif SC","SimSun",serif; letter-spacing:2px; }
.brand-title span { display:block; font:10px "Segoe UI",sans-serif; letter-spacing:1.5px; margin-top:5px; color:var(--muted); }
.brand-subtitle { font-size:10px; margin-top:6px; }
.search-input { border:0; border-bottom:1px solid var(--line-strong); border-radius:0; background:transparent; padding:0 6px; height:40px; font-size:13px; }
.search-results { border-radius:0; box-shadow:0 8px 20px #0002; }
.tabs { border:0; border-radius:0; padding:0; background:none; gap:8px; }
.tab { min-width:48px; border-radius:0; font-size:14px; padding:0 8px; height:40px; border-bottom:2px solid transparent; }
.tab.active { color:var(--green); background:none; box-shadow:none; border-bottom-color:var(--green); }
.header-tools { display:flex; gap:12px; }
.theme-toggle { background:transparent; border:0; border-radius:0; min-width:auto; height:40px; padding:0; font-size:12px; }
.theme-toggle:disabled { opacity:.6; cursor:wait; }
.app { width:min(1540px,100%); padding:40px 28px 70px; }
.page-head { margin-bottom:24px; }
.page-kicker { color:var(--muted); font-size:10px; letter-spacing:2px; margin-bottom:9px; }
.page-title { font:500 clamp(30px,4vw,48px)/1.3 "Noto Serif SC","SimSun",serif; letter-spacing:2px; }
.page-head .page-meta { font-size:12px; margin-top:12px; }
.summary-strip { border-top:1px solid var(--ink); border-bottom:1px solid var(--line); gap:0; margin-bottom:36px; }
.metric { border:0; border-right:1px solid var(--line); border-radius:0; box-shadow:none; background:none; display:flex; flex-direction:row; align-items:baseline; gap:12px; padding:14px 24px; }
.metric:first-child { padding-left:0; } .metric:last-child { border-right:0; }
.metric-value { font:400 30px Georgia,serif; font-variant-numeric:tabular-nums; }
.metric-label { font-size:12px; }
.layout { grid-template-columns:250px minmax(0,1fr); gap:42px; }
.directory-shell { top:130px; gap:0; border-top:2px solid var(--ink); }
.directory { gap:0; padding:0; max-height:calc(100vh - 200px); }
.directory-toggle { min-height:48px; padding:10px 0; background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; box-shadow:none; }
.directory-toggle-title { font-size:13px; font-weight:600; letter-spacing:1px; }
.directory-action { padding:0; border-radius:0; background:none; color:var(--muted); font-size:11px; font-weight:400; }
.row-card,.gov-row { padding:18px 10px 18px 12px; border:0; border-bottom:1px solid var(--line); border-left:2px solid transparent; border-radius:0; background:none; box-shadow:none; }
.row-card:hover,.row-card:focus-visible { transform:none; background:var(--surface-soft); }
.row-card.active,.gov-row.active { border-color:var(--line); border-left:2px solid var(--gov,var(--green)); background:var(--surface-soft); box-shadow:none; }
.row-title { flex-wrap:wrap; gap:6px; font-size:15px; }
.row-title > .badge { font-size:10px; font-weight:400; }
.row-meta { font-size:11px; line-height:1.8; }
.gov-dot { width:5px; height:5px; border-radius:0; }
.badge,.badge.gov-badge,.badge.green,.badge.red { border-radius:0; background:none; padding:0; font-weight:500; font-size:11px; white-space:normal; }
.detail { gap:32px; animation:none; }
.dossier-nav { display:flex; flex-wrap:wrap; gap:26px; border-bottom:1px solid var(--line); padding:0 0 12px; font-size:11px; letter-spacing:1px; }
.dossier-nav a { color:var(--muted); text-decoration:none; }
.dossier-nav a:hover { color:var(--green); text-decoration:underline; }
#nation-overview,#nation-focus,#nation-government { scroll-margin-top:130px; min-width:0; }
.panel { padding:24px 0 12px; border:0; border-top:1px solid var(--line-strong); border-radius:0; background:none; box-shadow:none; }
.panel-head { padding-bottom:14px; margin-bottom:14px; border-bottom:1px solid var(--line); }
.panel-title { font:600 21px/1.4 "Noto Serif SC","SimSun",serif; letter-spacing:1px; }
.feature-panel { background:none; }
.feature-panel > .panel-head .panel-title { font-size:36px; }
.gov-hero { border:0; padding:8px 0 0; background:none; overflow:visible; }
.gov-hero::before { display:none; }
.gov-hero-main { grid-template-columns:minmax(0,1fr) auto; gap:20px; }
.gov-mark { grid-column:2; grid-row:1; width:78px; height:78px; border:1px solid var(--gov); border-radius:0; background:none; color:var(--gov); box-shadow:none; font:44px "Noto Serif SC","SimSun",serif; }
.gov-hero-main > div:nth-child(2) { grid-column:1; grid-row:1; }
.gov-hero-main > .badge { grid-column:1/-1; }
.gov-kicker { font-size:11px; letter-spacing:2px; }
.gov-title { font:500 clamp(28px,3vw,42px)/1.35 "Noto Serif SC","SimSun",serif; margin-top:12px; }
.gov-hero .page-meta { font-size:12px; max-width:650px; margin-top:12px; }
.gov-focus-grid { gap:0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-top:24px; }
.gov-focus-card { padding:14px 18px; border:0; border-right:1px solid var(--line); border-radius:0; background:none; }
.gov-focus-card:first-child { padding-left:0; } .gov-focus-card:last-child { border-right:0; }
.gov-focus-card span { font-size:11px; }
.gov-focus-card strong { font-size:15px; }
.gov-latest { background:none; border:0; padding:14px 0; font-size:12px; }
.government-records { display:grid; gap:32px; }
.two-col { gap:30px; } .two-col > .panel + .panel { border-left:1px solid var(--line); padding-left:30px; }
.kv-grid,.structure-grid { gap:0 20px; }
.kv { background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:14px 0; min-height:0; }
.kv-label { font-size:11px; } .kv-value { font-size:14px; font-weight:600; }
.data-card { background:none; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:16px 0; }
.card-list { gap:0; }
.stacked-bar,.vote-track,.vote-track span { border-radius:0; }
.timeline-item { padding:12px 0; font-size:12px; }
.empty { padding:18px 0; font-size:12px; }
.focus-root { max-width:460px; margin:30px auto 0; padding-bottom:24px; position:relative; }
.focus-root::after { content:""; position:absolute; bottom:0; left:50%; height:24px; border-left:1px solid var(--line-strong); }
.focus-branches { gap:26px; border-top:1px solid var(--line-strong); }
.focus-branch { position:relative; padding-top:24px; min-width:0; }
.focus-branch::before { content:""; height:24px; position:absolute; top:0; left:50%; border-left:1px solid var(--line-strong); }
.focus-node { border:0; border-top:2px solid var(--line-strong); border-bottom:1px solid var(--line); border-radius:0; padding:14px 12px; background:var(--surface); position:relative; }
.focus-node summary { display:grid; grid-template-columns:24px 1fr; gap:5px 8px; font-size:13px; list-style:none; }
.focus-node summary::-webkit-details-marker { display:none; }
.focus-node summary::after { content:"+"; position:absolute; right:8px; top:8px; color:var(--muted); font:16px Georgia,serif; }
.focus-node[open] summary::after { content:"−"; }
.focus-tier { grid-row:1/3; font:24px Georgia,serif; color:var(--muted); }
.focus-status { grid-column:2; font-size:10px; color:var(--muted); font-weight:400; }
.focus-node p { font-size:12px; line-height:1.9; }
.focus-current { border-top-color:var(--green); background:color-mix(in srgb,var(--green),var(--bg) 95%); }
.focus-current .focus-status { color:var(--green); font-weight:700; }
.focus-disabled .focus-status { color:var(--gold); }
.focus-arrow { font-size:15px; color:var(--line-strong); padding:8px 0; }
.focus-unavailable { color:var(--gold); }
.site-footer { width:min(1484px,calc(100% - 56px)); margin:0 auto; padding:22px 0 30px; border-top:2px solid var(--ink); display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px; font-size:10px; color:var(--muted); letter-spacing:1px; }
:focus-visible { outline:2px solid var(--green); outline-offset:4px; }
@media (max-width:1200px) { .topbar { gap:14px; grid-template-columns:1fr minmax(220px,340px) auto; } .header-tools { grid-column:3; grid-row:2; } .tabs { grid-column:1/3; grid-row:2; justify-self:start; } .layout { grid-template-columns:210px minmax(0,1fr); gap:24px; } .focus-branches { gap:14px; } }
@media (max-width:980px) { .layout { grid-template-columns:1fr; } .directory-shell { position:static; } .directory { max-height:240px; grid-template-columns:repeat(2,minmax(0,1fr)); } .directory-shell.collapsed .directory-toggle { position:static; writing-mode:horizontal-tb; width:100%; min-height:44px; justify-content:space-between; } .directory-shell.collapsed .directory-action { margin:0; } .layout.directory-collapsed { grid-template-columns:1fr; } .two-col { grid-template-columns:1fr; } .two-col > .panel + .panel { border-left:0; padding-left:0; } .focus-branches { grid-template-columns:repeat(3,minmax(0,1fr)); } .metric { padding:14px; gap:8px; } }
@media (max-width:600px) { .topbar { padding:12px 18px; grid-template-columns:1fr auto; gap:10px; position:relative; } .brand-title { font-size:22px; } .search-shell { grid-column:1/-1; grid-row:2; } .tabs { grid-column:1; grid-row:3; } .header-tools { grid-column:2; grid-row:3; gap:14px; } .search-results { position:absolute; top:100%; left:0; right:0; } .app { padding:26px 18px 40px; } .summary-strip { grid-template-columns:repeat(2,minmax(0,1fr)); } .metric { border-bottom:1px solid var(--line); } .metric:nth-child(3) { padding-left:0; } .metric:nth-child(2n) { border-right:0; } .metric-value { font-size:25px; } .directory { grid-template-columns:1fr; } .gov-mark { width:54px; height:54px; font-size:30px; } .gov-focus-card { padding:12px 0; border-right:0; border-bottom:1px solid var(--line); } .gov-focus-grid { grid-template-columns:1fr; } .focus-branches { grid-template-columns:1fr; border-top:0; gap:24px; margin-left:10px; padding-left:18px; border-left:1px solid var(--line-strong); } .focus-root { margin-bottom:24px; } .focus-root::after { left:10px; } .focus-branch { padding-top:0; } .focus-branch::before { top:30px; left:-18px; width:18px; height:0; border-left:0; border-top:1px solid var(--line-strong); } .dossier-nav { gap:16px; font-size:10px; } #nation-overview,#nation-focus,#nation-government { scroll-margin-top:20px; } .site-footer { width:calc(100% - 36px); } }
@media (prefers-reduced-motion:reduce) { * { animation:none !important; transition:none !important; scroll-behavior:auto !important; } }

:root[data-theme="dark"] .gov-kicker,:root[data-theme="dark"] .badge.gov-badge,:root[data-theme="dark"] .gov-mark { color:color-mix(in srgb,var(--gov),var(--ink) 45%); }
@media (min-width:601px) and (max-width:1200px) { .search-shell { grid-column:2/4; grid-row:1; order:0; } }
@media (min-width:981px) and (max-width:1080px) { .directory { grid-template-columns:1fr; overflow:auto; max-height:calc(100vh - 220px); } }
:root .header-tools, :root .theme-toggle { white-space: nowrap; }
:root .focus-progress { display: flex; gap: 12px; align-items: center; font-size: 12px; color: var(--muted); margin: 12px 0 20px; }
:root .focus-progress progress { accent-color: var(--green); border-radius: 0; height: 6px; width: min(240px, 35%); }
