:root {
  --bg: #f6f2ea;
  --paper: #fffdf8;
  --ink: #1b1a17;
  --muted: #6a645a;
  --line: #e4ddcf;
  --chip: #efe9dd;
  --accent: #b4531a;
  --focus: #1f2a7a;
  --n-bg: #e6e9fb; --n-fg: #23308a;
  --s-bg: #fbe9d6; --s-fg: #8f4507;
  --r-bg: #e2f1df; --r-fg: #145d0e;
  --d-bg: #ece9e4; --d-fg: #6a645a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13120f; --paper: #1c1b17; --ink: #efeae1; --muted: #a39c8f; --line: #312e27; --chip: #27251f; --accent: #f0955a; --focus: #a8b6ff;
    --n-bg: #222a57; --n-fg: #c7d0ff; --s-bg: #45290f; --s-fg: #ffcf9d; --r-bg: #1b3818; --r-fg: #b6e6ad; --d-bg: #2a2824; --d-fg: #b5aea2;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--sans); }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.loading, .empty { color: var(--muted); text-align: center; padding: 64px 16px; }

/* header */
.top { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 58px; }
.brand { display: flex; align-items: center; gap: 10px; font: 700 20px/1 var(--serif); text-decoration: none; }
.flag { display: inline-grid; width: 26px; height: 18px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.flag i:nth-child(1) { background: #ff9933; } .flag i:nth-child(2) { background: #fff; } .flag i:nth-child(3) { background: #138808; }
.top nav { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 14px; white-space: nowrap; }
.top nav a:hover { color: var(--ink); }

/* hero */
.hero { padding: 44px 0 8px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: 12px; font-weight: 600; color: var(--accent); margin: 0 0 12px; }
.hero h1 { font: 700 clamp(32px, 5.4vw, 58px)/1.04 var(--serif); letter-spacing: -.02em; margin: 0 0 16px; max-width: 17ch; }
.hero h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.lede { color: var(--muted); font-size: 18px; max-width: 62ch; margin: 0 0 28px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--line); }
.stat { padding: 14px 16px 14px 0; text-decoration: none; border-right: 1px solid var(--line); }
.stat + .stat { padding-left: 16px; }
.stat:last-child { border-right: 0; }
.stat b { display: block; font: 700 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 14px; }
.stat:hover b { color: var(--accent); }

.strip { margin: 28px 0 0; }
.strip figcaption { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.strip figcaption b { color: var(--ink); }
.bar { display: flex; height: 22px; border-radius: 4px; overflow: hidden; gap: 1px; background: var(--paper); }
.seg { background: var(--pc); min-width: 2px; }
.seg[href]:hover { filter: brightness(1.12); }
.legend { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.legend a { text-decoration: none; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--pc); margin-right: 6px; vertical-align: -1px; }

/* controls */
.controls { position: sticky; top: 58px; z-index: 5; background: var(--bg); padding: 16px 0 10px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 10px; }
.tabs button { flex: none; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 7px 14px; font: 500 14px var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tabs small { opacity: .65; margin-left: 6px; font-variant-numeric: tabular-nums; }
.filters { display: grid; grid-template-columns: 1fr 220px 190px; gap: 8px; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
input[type=search], select { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font: 15px var(--sans); padding: 0 12px; }
.search input { padding-left: 38px; }
.letters { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 8px; }
.letters button { border: 0; background: none; color: var(--muted); font: 13px var(--sans); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; }
.letters button:hover:not(:disabled) { background: var(--chip); color: var(--ink); }
.letters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.letters button:disabled { opacity: .3; cursor: default; }

/* cards */
.count { color: var(--muted); font-size: 14px; margin: 14px 0 10px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.card { --pc: var(--line); position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 16px 16px 14px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; transition: border-color .15s, transform .15s; }
.card::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 3px 3px 0; background: var(--pc); }
.card:hover { border-color: var(--muted); transform: translateY(-1px); }
.card-top { display: flex; gap: 12px; align-items: flex-start; }
.logo { flex: none; width: 52px; height: 52px; object-fit: contain; border-radius: 8px; background: #fff; padding: 4px; box-shadow: 0 0 0 1px var(--line); }
.logo.ph { display: grid; place-items: center; font: 700 15px var(--serif); color: var(--muted); background: var(--chip); padding: 0; letter-spacing: .02em; }
.card h3 { margin: 0; font: 600 17px/1.25 var(--serif); overflow-wrap: anywhere; }
.card-name { min-width: 0; }
.sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 5px 0 0; font-size: 13px; color: var(--muted); }
.abbr { font-weight: 600; color: var(--ink); }
.where::before { content: "· "; }
.p-head .where::before { content: ""; }
.badge { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .02em; border-radius: 4px; padding: 2px 7px; text-transform: uppercase; }
.badge.n { background: var(--n-bg); color: var(--n-fg); } .badge.s { background: var(--s-bg); color: var(--s-fg); }
.badge.r { background: var(--r-bg); color: var(--r-fg); } .badge.d { background: var(--d-bg); color: var(--d-fg); }
.ideo { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.ideo span { font-size: 12px; background: var(--chip); border-radius: 4px; padding: 2px 7px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; font-size: 13px; color: var(--muted); }
.facts b { color: var(--ink); }
.hq { font-size: 13px; color: var(--muted); margin: 0; overflow-wrap: anywhere; }
mark { background: #ffe08a; color: inherit; border-radius: 2px; }
.more { text-align: center; margin: 20px 0 8px; }
.more button, .empty button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 10px 18px; font: 500 15px var(--sans); cursor: pointer; margin-top: 10px; }

/* party page */
.party { --pc: var(--accent); padding: 24px 0 40px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 14px; margin-bottom: 18px; }
.back:hover { color: var(--ink); }
.p-head { display: grid; grid-template-columns: 140px 1fr; gap: 28px; align-items: start; padding-bottom: 28px; border-bottom: 3px solid var(--pc); }
.p-logo { width: 140px; height: 140px; object-fit: contain; background: #fff; border-radius: 14px; padding: 10px; box-shadow: 0 0 0 1px var(--line); }
.logo.p-logo { font-size: 36px; }
.p-head h1 { font: 700 clamp(30px, 4.6vw, 48px)/1.08 var(--serif); letter-spacing: -.015em; margin: 8px 0 12px; overflow-wrap: anywhere; }
.p-head h1 abbr { text-decoration: none; font-weight: 500; color: var(--muted); font-size: .6em; }
.p-lede { font-size: 17px; max-width: 70ch; margin: 0; }
.src { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.block { padding: 28px 0; border-bottom: 1px solid var(--line); }
.block h2 { font: 700 22px/1.2 var(--serif); margin: 0 0 14px; }
.block h2:not(:first-child) { margin-top: 26px; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 0 40px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; }
.tags a { text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 14px; }
.tags a:hover { border-color: var(--pc); }
.axes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px 28px; }
.axis-head { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.axis-head span { color: var(--muted); }
.axis-bar { position: relative; height: 8px; margin: 8px 0 4px; border-radius: 999px; background: linear-gradient(90deg, var(--chip), var(--line), var(--chip)); }
.axis-bar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--muted); opacity: .4; }
.axis-bar i { position: absolute; top: 50%; width: 16px; height: 16px; border-radius: 50%; background: var(--pc); border: 3px solid var(--paper); box-shadow: 0 0 0 1px var(--muted); transform: translate(-50%, -50%); }
.axis-ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.axis-why { margin: 6px 0 0; font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.axis-why span { background: var(--chip); color: var(--ink); border-radius: 4px; padding: 1px 6px; }
.note { font-size: 13px; color: var(--muted); max-width: 80ch; margin: 16px 0 0; }
.facts-list { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 10px 18px; margin: 0; font-size: 15px; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; overflow-wrap: anywhere; }
.seats { display: grid; gap: 12px; }
.seat-head { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.seat-head b { font-variant-numeric: tabular-nums; }
.seat-head small { color: var(--muted); font-weight: 400; }
.seat-bar { height: 8px; background: var(--chip); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.seat-bar i { display: block; height: 100%; background: var(--pc); min-width: 2px; }
.emblems { display: flex; gap: 16px; flex-wrap: wrap; }
.emblems figure { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.emblems img { width: 120px; height: 120px; object-fit: contain; background: #fff; border-radius: 10px; padding: 8px; box-shadow: 0 0 0 1px var(--line); display: block; margin-bottom: 6px; }
.members-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.members-head h2 { margin: 0; }
.m-tools { display: flex; gap: 12px; align-items: center; }
.m-tools input[type=search] { height: 36px; width: 200px; }
.toggle { font-size: 14px; display: flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin-top: 16px; }
.member { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; text-decoration: none; min-width: 0; }
a.member:hover { border-color: var(--muted); }
.member[hidden] { display: none; }
.member img, .face { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--chip); }
.face { display: grid; place-items: center; font: 600 15px var(--serif); color: var(--muted); }
.member.now img, .member.now .face { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--pc); }
.m-body { display: flex; flex-direction: column; min-width: 0; font-size: 13px; color: var(--muted); }
.m-body b { color: var(--ink); font-size: 15px; font-weight: 600; }
.m-body em { font-style: normal; font-size: 12px; }
.credits { font-size: 12px; color: var(--muted); margin-top: 24px; }
.credits-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 20px; }
.credits-table th, .credits-table td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.credits-table th { font-weight: 600; }

/* news */
.news-hero h1 { max-width: 22ch; }
.home-news { margin-top: 36px; padding-top: 20px; border-top: 2px solid var(--ink); }
.home-news h2 { font: 700 24px var(--serif); margin: 0; }
.more-link { font-size: 14px; color: var(--accent); text-decoration: none; }
.news-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 8px; }
.g-head { font: 700 15px var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 18px 0 6px; }
.g-head a { text-decoration: none; }
.g-head small { color: var(--muted); font-weight: 500; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.news-list.compact .news-item { padding: 10px 0; }
.news-list.compact .n-sum, .news-list.compact .n-tags { display: none; }
.n-day { font: 700 13px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 22px 0 4px; border-bottom: 2px solid var(--ink); }
.n-meta { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); margin: 0 0 4px; }
.n-meta b { color: var(--ink); font-weight: 600; }
.fc { background: var(--s-bg); color: var(--s-fg); border-radius: 4px; padding: 0 6px; font-weight: 600; }
.news-item h3 { font: 600 18px/1.3 var(--serif); margin: 0; }
.news-list.compact h3 { font-size: 16px; }
.news-item h3 a { text-decoration: none; }
.news-item h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.n-sum { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 80ch; }
.n-tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 0; }
.n-tags a { font-size: 12px; text-decoration: none; border-radius: 4px; padding: 1px 7px; background: var(--chip); }
.n-tags a.p { box-shadow: inset 3px 0 0 var(--pc); padding-left: 9px; font-weight: 600; }
.n-tags a.pp { background: none; border: 1px solid var(--line); }

/* person page */
.face-big { border-radius: 50% !important; object-fit: cover !important; object-position: top; padding: 0 !important; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 18px; font-size: 15px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.timeline li.now::before { background: var(--pc); }
.timeline span { display: block; color: var(--muted); font-size: 13px; }
.phist, .ext { padding-left: 18px; margin: 0; }
.phist li, .ext li { margin: 4px 0; }
.phist span { color: var(--muted); font-size: 13px; }
.related { font-size: 14px; }
.sec { border-bottom: 1px solid var(--line); }
.sec summary { cursor: pointer; padding: 10px 0; font-weight: 500; }
.sec[open] summary { color: var(--accent); }
.sec-body { padding: 0 0 12px; font-size: 15px; max-width: 80ch; }
.sec-body p { margin: 0 0 10px; }

/* democracy scores */
.vd-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 14px 0 6px; }
.vd-big { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.vd-big span { font-size: 13px; color: var(--muted); }
.vd-big b { font: 700 34px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.vd-big b small { font: 400 15px var(--sans); color: var(--muted); }
.vd-big > small { font-size: 12px; color: var(--muted); }
.axis.vd .axis-head small { color: var(--muted); }
.axis.vd .axis-bar { background: linear-gradient(90deg, #d9534f33, var(--chip), #2e8b5733); }
.trend { width: 100%; max-width: 620px; height: auto; display: block; }
.trend polyline { fill: none; stroke-width: 2.5; }
.trend .grid { stroke: var(--line); }
.trend .ci { stroke: var(--muted); stroke-width: 1; opacity: .5; }
.trend text { font: 11px var(--sans); fill: var(--muted); }
.table-wrap { overflow-x: auto; margin-top: 20px; }
.vd-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 760px; }
.vd-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); padding: 8px 10px 8px 0; border-bottom: 2px solid var(--ink); }
.vd-table td { padding: 10px 10px 10px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vd-table td a { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.vd-table .logo { width: 32px; height: 32px; padding: 2px; }
.mini { display: inline-block; width: 54px; height: 6px; background: var(--chip); border-radius: 999px; overflow: hidden; margin-right: 8px; vertical-align: middle; }
.mini i { display: block; height: 100%; background: #2e8b57; }
.mini.bad i { background: #c0392b; }

/* religions */
.rel-bar { display: flex; height: 14px; border-radius: 3px; overflow: hidden; gap: 1px; min-width: 140px; background: var(--paper); }
.rel-bar.big { height: 26px; margin-top: 24px; }
.rel-bar a { background: var(--rc); min-width: 1px; }
.rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 28px; }
.rel-card { display: block; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--rc); border-radius: 10px; padding: 16px; }
.rel-card:hover { border-color: var(--muted); border-top-color: var(--rc); }
.rel-card h3 { font: 700 20px var(--serif); margin: 0 0 6px; }
.rel-num b { display: block; font: 700 28px/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.rel-num span { font-size: 13px; color: var(--muted); }
.rel-card dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin: 12px 0 0; font-size: 13px; }
.rel-card dt { color: var(--muted); }
.rel-card dd { margin: 0; font-weight: 600; text-align: right; }
.faith-list { list-style: none; padding: 0; margin: 0; columns: 3 220px; column-gap: 28px; }
.faith-list li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); break-inside: avoid; font-size: 14px; }
.faith-list b { font-variant-numeric: tabular-nums; font-weight: 600; }
.rel-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.rel-table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 12px 8px 0; border-bottom: 2px solid var(--ink); }
.rel-table td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rel-table td:nth-child(3) { width: 40%; }
.rel-head { grid-template-columns: 110px 1fr; }
.rel-card h3 { display: flex; align-items: center; gap: 10px; }
.rel-sym { width: 34px; height: 34px; object-fit: contain; background: #fff; border-radius: 8px; padding: 4px; box-shadow: 0 0 0 1px var(--line); }
.rel-sym-big { width: 110px !important; height: 110px !important; padding: 14px !important; }
.rel-dot { width: 110px; height: 110px; border-radius: 50%; background: var(--rc); color: #fff; display: grid; place-items: center; font: 700 34px var(--serif); }
.bar-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bar-list li { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.bar-list i { display: block; height: 10px; border-radius: 999px; background: var(--rc); min-width: 2px; }
.bar-list b { font-variant-numeric: tabular-nums; font-weight: 600; }
.wiki-p { max-width: 80ch; }

/* India and states */
.vd-big b.sm { font-size: 22px; }
.vd-big b.sm a { text-decoration: none; }
.gov-bar { height: 26px; margin-top: 6px; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.state-card { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: start; padding: 14px; background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--pc); border-radius: 10px; text-decoration: none; min-width: 0; }
.state-card:hover { border-color: var(--muted); border-left-color: var(--pc); }
.state-card h3 { margin: 0; font: 600 18px/1.25 var(--serif); }
.state-card .facts { margin-top: 6px; align-items: center; }
.state-map { width: 76px; height: 76px; object-fit: contain; background: #fff; border-radius: 8px; padding: 2px; box-shadow: 0 0 0 1px var(--line); }
.state-map.ph { display: block; background: var(--chip); }
.state-big-map { width: 100%; max-width: 360px; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--line); }
.pchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; text-decoration: none; border-radius: 4px; padding: 1px 7px 1px 3px; background: var(--chip); box-shadow: inset 3px 0 0 var(--pc); color: var(--ink); }
.pchip img { width: 16px; height: 16px; object-fit: contain; background: #fff; border-radius: 3px; }
.tags .pchip { font-size: 14px; padding: 4px 10px 4px 5px; }
.tags .pchip img { width: 22px; height: 22px; }

/* districts and member lists */
.page-h1 { font: 700 clamp(28px, 4.4vw, 44px)/1.1 var(--serif); margin: 0 0 10px; }
.btn { display: inline-block; text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 8px; background: var(--ink); color: var(--bg); }
.btn:hover { opacity: .88; }
.vd-link { text-decoration: none; border-color: var(--pc); }
.vd-link:hover { background: var(--chip); }
.dist-table td:first-child { white-space: normal; min-width: 180px; }
.dist-table td a { text-decoration: none; }
.dist-table td a:hover b { text-decoration: underline; }
.pager { display: flex; gap: 10px; justify-content: center; margin: 22px 0 8px; }
.pager button { border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 8px; padding: 10px 18px; font: 500 15px var(--sans); cursor: pointer; }

/* local government */
#lgtabs { margin-top: 6px; }
.lg-list li span small { color: var(--muted); margin-left: 6px; }
.lg-list li[hidden] { display: none; }
.lg-list a { text-decoration: none; font-weight: 500; }
.lg-list a:hover { text-decoration: underline; }
.search.small { max-width: 320px; margin-bottom: 10px; }
.hierarchy { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 0; max-width: 520px; }
.hierarchy li { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 9px 0 9px 18px; border-left: 2px solid var(--line); position: relative; font-size: 15px; }
.hierarchy li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hierarchy li.here::before { background: var(--accent); }
.hierarchy span { color: var(--muted); font-size: 13px; }
.hierarchy a { text-decoration: none; font-weight: 500; }

/* about + footer */
.about { margin: 48px 0 32px; padding: 26px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.about h2 { font: 700 24px var(--serif); margin: 0 0 12px; }
.about h3 { font-size: 16px; margin: 20px 0 6px; }
.kinds { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 16px 0; }
.kinds dd { margin: 0; }
.about ul { padding-left: 20px; margin: 0; }
.about li { margin: 4px 0; }
.muted { color: var(--muted); font-size: 14px; }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 20px 0 32px; }

@media (max-width: 760px) {
  .top nav a:not(:last-child) { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3) { padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .filters { grid-template-columns: 1fr 1fr; }
  .search { grid-column: 1 / -1; }
  .controls { position: static; }
  .letters { display: none; }
  .grid { grid-template-columns: 1fr; }
  .p-head { grid-template-columns: 1fr; gap: 16px; }
  .p-logo { width: 96px; height: 96px; }
  .two { grid-template-columns: 1fr; }
  .facts-list { grid-template-columns: 1fr; gap: 2px; }
  .facts-list dd { margin-bottom: 10px; }
  .m-tools { width: 100%; }
  .m-tools input[type=search] { width: 100%; }
  .credits-table { font-size: 12px; }
  .news-cols { grid-template-columns: 1fr; gap: 0; }
  .news-item h3 { font-size: 17px; }
  .about { padding: 18px; }
}
