:root {
  --ink: #171b19;
  --ink-soft: #5f6863;
  --forest: #13441b;
  --forest-deep: #102f1f;
  --header: #1b3a2d;
  --green: #21613f;
  --green-bright: #2f7a4e;
  --green-pale: #e9f0e9;
  --gold: #d4a853;
  --gold-pale: #f5ead0;
  --paper: #f7f6f1;
  --surface: #ffffff;
  --line: #dde1dc;
  --line-dark: rgba(255, 255, 255, 0.16);
  --red: #a94b43;
  --radius: 12px;
  --shell: 1240px;
  font-family: "Atkinson Hyperlegible", "Noto Sans TC", "PingFang TC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(212, 168, 83, 0.72);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: .65rem 1rem;
  border-radius: 8px;
  color: #fff;
  background: #111;
}
.skip-link:focus { top: 1rem; }
.shell { width: min(calc(100% - 3rem), var(--shell)); margin-inline: auto; }
.narrow { max-width: 840px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  color: #fff;
  background: var(--header);
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.header-inner {
  width: min(calc(100% - 3rem), var(--shell));
  min-height: 72px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  padding: 0;
  border: 0;
  color: #fff;
  background: none;
  text-align: left;
  cursor: pointer;
}
.brand-mark, .seal-mini {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.09);
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 900;
}
.brand-mark { width: 40px; height: 40px; }
.brand strong, .brand small { display: block; line-height: 1.12; }
.brand strong { font-size: .9rem; letter-spacing: .1em; }
.brand small { margin-top: .2rem; color: rgba(255,255,255,.65); font-size: .72rem; letter-spacing: .08em; }
.primary-nav { display: flex; align-items: stretch; gap: .1rem; margin-left: auto; scrollbar-width: none; }
.primary-nav::-webkit-scrollbar { display: none; }
.primary-nav button {
  min-height: 72px;
  padding: 0 .78rem;
  border: 0;
  border-bottom: 2px solid transparent;
  color: rgba(255,255,255,.72);
  background: transparent;
  font-size: .88rem;
  cursor: pointer;
}
.primary-nav button:hover, .primary-nav button.active {
  color: #fff;
  border-bottom-color: var(--gold);
  background: rgba(255,255,255,.05);
}
.year-control { display: flex; align-items: center; gap: .4rem; color: rgba(255,255,255,.68); font-size: .8rem; }
.year-control select {
  padding: .43rem 1.8rem .43rem .58rem;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 7px;
  color: #fff;
  background: #244a39;
}
.language-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(0,0,0,.12);
}
.language-control button {
  min-height: 32px;
  padding: .3rem .55rem;
  border: 0;
  border-radius: 5px;
  color: rgba(255,255,255,.62);
  background: transparent;
  font-size: .72rem;
  white-space: nowrap;
  cursor: pointer;
}
.language-control button.active {
  color: #1d291f;
  background: var(--gold);
  font-weight: 800;
}
.view { min-height: calc(100vh - 72px); animation: view-in 200ms ease-out; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 83% 30%, rgba(212,168,83,.16), transparent 20rem),
    linear-gradient(180deg, rgba(19,68,27,.58), rgba(19,68,27,.96) 72%, var(--forest)),
    linear-gradient(135deg, #2f6540, #0d3319);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(90deg, transparent 49.8%, rgba(255,255,255,.16) 50%, transparent 50.2%),
    linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 120px 100%, 100% 120px;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, #000);
}
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 108px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.hero-grid {
  position: relative;
  z-index: 1;
  min-height: 690px;
  padding-block: 4.2rem 4.6rem;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}
.municipal-label { display: inline-flex; align-items: center; gap: .75rem; margin-bottom: 2.5rem; color: rgba(255,255,255,.7); font-size: .7rem; letter-spacing: .12em; line-height: 1.4; }
.municipal-label strong { color: #fff; font-size: .82rem; }
.seal-mini { width: 42px; height: 42px; }
.hero-kicker, .kicker { margin: 0 0 .65rem; color: var(--gold); font-size: .73rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero h1, .section-intro h2, .investment-copy h2, .capital-feature h2, .page-heading h1 {
  margin: 0;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 900;
  letter-spacing: -.04em;
}
.hero h1 { max-width: 650px; color: #fff; font-size: clamp(3.1rem, 6vw, 5.35rem); line-height: 1.04; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-copy { max-width: 590px; margin: 1.5rem 0 0; color: rgba(255,255,255,.78); font-size: 1.05rem; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.button {
  min-height: 46px;
  padding: .72rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}
.button:hover { transform: translateY(-2px); }
.button.gold, .button.primary { color: #171717; background: var(--gold); }
.button.ghost { color: #fff; background: transparent; border-color: rgba(255,255,255,.35); }
.button.dark { color: #fff; background: var(--header); }
.button.secondary { color: var(--green); background: #fff; border-color: var(--line); }
.hero-glance { padding: 1.1rem; border: 1px solid rgba(255,255,255,.16); border-radius: 14px; background: rgba(7,32,17,.58); box-shadow: 0 28px 65px rgba(0,0,0,.2); backdrop-filter: blur(10px); }
.glance-heading { display: flex; align-items: center; justify-content: space-between; padding: .4rem .5rem 1rem; color: #fff; font-weight: 700; }
.official-pill { padding: .24rem .52rem; border-radius: 99px; color: #d8e7dc; background: rgba(255,255,255,.1); font-size: .7rem; }
.hero-glance .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.12); }
.hero-glance .stat-card { min-height: 116px; padding: 1rem; border: 0; border-radius: 0; background: rgba(17,54,31,.92); color: #fff; box-shadow: none; }
.hero-glance .stat-card span { color: rgba(255,255,255,.58); font-size: .72rem; }
.hero-glance .stat-card strong { display: block; margin-top: .3rem; color: #fff; font-size: 1.45rem; line-height: 1.15; }
.hero-glance .stat-card small { display: block; margin-top: .45rem; color: rgba(255,255,255,.6); font-size: .7rem; }
.glance-chart { margin-top: 1px; padding: 1.1rem; border-radius: 9px; background: rgba(17,54,31,.92); }
.glance-chart > p { display: flex; justify-content: space-between; margin: 0 0 .9rem; color: rgba(255,255,255,.58); font-size: .7rem; }
.hero-budget-bars { display: flex; height: 24px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.08); }
.hero-budget-bars i { display: block; min-width: 3px; height: 100%; border-right: 1px solid rgba(10,30,18,.3); }
.fx-note { margin: .8rem .35rem .15rem; color: rgba(255,255,255,.55); font-size: .68rem; line-height: 1.45; }

.journey-section, .documents-section { padding: 5.5rem 0; background: #fff; }
.section-intro { max-width: 720px; }
.section-intro.centered { margin: 0 auto 2.7rem; text-align: center; }
.section-intro h2, .investment-copy h2, .capital-feature h2 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.12; }
.section-intro > p:last-child { margin: .9rem 0 0; color: var(--ink-soft); font-size: 1.02rem; }
.journey-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid #eceeea; }
.journey-card { min-height: 255px; padding: 1.6rem; border: 0; border-left: 1px solid #eceeea; color: var(--ink); background: #fff; text-align: left; cursor: pointer; transition: background 150ms ease; }
.journey-card:first-child { border-left: 0; }
.journey-card:hover { background: #f7f8f5; }
.journey-card > span { color: var(--gold); font-weight: 800; font-size: .78rem; }
.journey-card h3 { margin: 2.4rem 0 .55rem; font-family: "Noto Sans TC", sans-serif; font-size: 1.1rem; }
.journey-card p { min-height: 72px; margin: 0; color: var(--ink-soft); font-size: .88rem; }
.journey-card b { display: block; margin-top: 1rem; color: var(--green); font-size: .78rem; }

.investment-section { padding: 6rem 0; background: var(--paper); }
.investment-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.investment-copy > p:not(.kicker) { max-width: 420px; color: var(--ink-soft); }
.investment-total { margin: 2rem 0; }
.investment-total strong { display: block; color: var(--forest); font-family: "Noto Sans TC", sans-serif; font-size: 2.6rem; line-height: 1; }
.investment-total span { display: block; margin-top: .45rem; color: var(--ink-soft); font-size: .78rem; }
.ranking-list { border-top: 1px solid #cfd4ce; }
.ranking-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 1rem; min-height: 68px; border-bottom: 1px solid #cfd4ce; }
.ranking-row > span:first-child { color: #9b7b3c; font-weight: 800; }
.ranking-row strong { font-size: .95rem; }
.ranking-row .ranking-value { color: var(--forest); font-weight: 800; }
.ranking-meter { grid-column: 2 / 4; height: 3px; margin-top: -18px; background: #e2e5df; }
.ranking-meter i { display: block; height: 100%; background: var(--green); }

.balance-section { padding: 6rem 0; color: #fff; background: var(--forest-deep); }
.section-intro.light h2 { color: #fff; }
.section-intro.light > p:last-child { color: rgba(255,255,255,.62); }
.balance-grid { display: grid; grid-template-columns: 1fr 230px 1fr; gap: 1px; overflow: hidden; border: 1px solid var(--line-dark); border-radius: 10px; background: var(--line-dark); }
.balance-column { padding: 1.8rem; background: #163a29; }
.balance-column > p { margin: 0; color: rgba(255,255,255,.55); font-size: .76rem; letter-spacing: .12em; }
.balance-column > strong { display: block; margin: .35rem 0 1.25rem; color: #fff; font-family: "Noto Sans TC", sans-serif; font-size: 2rem; }
.balance-list { display: grid; gap: .65rem; }
.balance-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; color: rgba(255,255,255,.72); font-size: .82rem; }
.balance-item b { color: #fff; }
.text-link { margin-top: 1.4rem; padding: 0; border: 0; color: var(--gold); background: none; font-size: .78rem; font-weight: 800; cursor: pointer; }
.balance-center { display: grid; align-content: center; justify-items: center; padding: 1.5rem; background: #214d35; text-align: center; }
.balance-center > span { color: rgba(255,255,255,.58); font-size: .75rem; }
.balance-center strong { margin: .65rem 0; color: var(--gold); font-size: 1.55rem; }
.balance-center p { margin: 0; color: rgba(255,255,255,.65); font-size: .78rem; }

.capital-feature { padding: 6rem 0; background: #e8eee6; }
.capital-feature-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(3rem, 8vw, 8rem); align-items: center; }
.capital-feature-grid > div:first-child > p:not(.kicker) { color: var(--ink-soft); }
.capital-total { display: flex; align-items: center; gap: 1rem; margin: 2rem 0; }
.capital-total strong { color: var(--forest); font-size: 2.5rem; line-height: 1; }
.capital-total span { padding-left: 1rem; border-left: 1px solid #b8c4b8; color: var(--ink-soft); font-size: .76rem; }
.capital-highlight-list { display: grid; gap: .75rem; }
.capital-highlight-card { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-height: 76px; padding: 1rem 1.25rem; border: 1px solid #cad4c8; border-radius: 8px; background: rgba(255,255,255,.62); }
.capital-highlight-card span { font-weight: 700; }
.capital-highlight-card strong { color: var(--forest); }

.document-grid { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #e3e6e1; }
.document-card { min-height: 210px; padding: 1.6rem; border: 0; border-left: 1px solid #e3e6e1; border-top: 1px solid #e3e6e1; color: var(--ink); background: #fff; text-align: left; text-decoration: none; cursor: pointer; }
.document-card:nth-child(-n+3) { border-top: 0; }
.document-card:nth-child(3n+1) { border-left: 0; }
.document-card:hover { background: #f7f8f5; }
.document-card > span { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 6px; color: var(--forest); background: var(--green-pale); font-weight: 800; }
.document-card h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
.document-card p { margin: 0; color: var(--ink-soft); font-size: .86rem; }
.summary-band { padding: 2rem 0; color: #fff; background: var(--header); }
.summary-strip { display: grid; grid-template-columns: repeat(4,1fr); }
.summary-item { padding: .3rem 1.5rem; border-left: 1px solid rgba(255,255,255,.16); }
.summary-item:first-child { border-left: 0; }
.summary-item span { display: block; color: rgba(255,255,255,.55); font-size: .72rem; }
.summary-item strong { display: block; margin-top: .2rem; color: #fff; font-size: 1.25rem; }
.data-boundary { padding: 2.2rem 0; background: #fff; }
.notice { display: flex; align-items: flex-start; gap: .8rem; padding: 1rem 1.2rem; border: 1px solid #d6dfd4; border-left: 4px solid var(--green); border-radius: 7px; color: #3b5145; background: #f1f6f0; }
.notice strong { white-space: nowrap; }
.page-heading { padding-block: 4.8rem 2.2rem; }
.page-heading .eyebrow { margin: 0 0 .55rem; color: var(--green); font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.page-heading h1 { font-size: clamp(2.3rem, 5vw, 4rem); }
.page-heading > p:last-child { max-width: 700px; color: var(--ink-soft); }
.section-stack { display: grid; gap: 1.5rem; padding-bottom: 5rem; }
.section-stack > * { min-width: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat-card { padding: 1.25rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.stat-card span, .stat-card small { color: var(--ink-soft); }
.stat-card strong { display: block; margin: .45rem 0; color: var(--forest); font-family: "Noto Sans TC", sans-serif; font-size: 1.5rem; line-height: 1.2; }
.stat-card strong.up { color: var(--red); }
.stat-card strong.down { color: var(--green); }
.stat-card small { font-size: .76rem; }
.panel { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.data-panel { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; gap: 1rem; justify-content: space-between; padding: 1.1rem; border-bottom: 1px solid var(--line); }
.search-field { width: min(100%, 480px); }
.search-field input { width: 100%; min-height: 44px; padding: .6rem .8rem; border: 1px solid #cfd5d0; border-radius: 8px; background: #fff; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .9rem 1rem; border-bottom: 1px solid #eceeea; text-align: left; vertical-align: top; }
th { color: var(--ink-soft); background: #f7f8f5; font-size: .75rem; letter-spacing: .04em; }
td { font-size: .88rem; }
td small { color: var(--ink-soft); }
.number { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.type-badge { display: inline-block; padding: .22rem .5rem; border-radius: 99px; color: var(--green); background: var(--green-pale); font-size: .72rem; font-weight: 700; }
.type-badge.capital { color: #78571d; background: var(--gold-pale); }
.table-status { margin: 0; padding: .9rem 1rem; color: var(--ink-soft); background: #f7f8f5; font-size: .78rem; }
.source-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 1rem; }
.source-card { padding: 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fff; text-decoration: none; }
.source-card:hover { border-color: #9aab9d; }
.source-org { color: var(--green); font-size: .75rem; font-weight: 800; }
.source-card h2 { margin: .6rem 0; font-size: 1.1rem; }
.source-card p { color: var(--ink-soft); }
.source-link { color: var(--green); font-size: .8rem; font-weight: 800; }
.methodology h2 { margin: .2rem 0 1rem; }
.methodology li { margin: .45rem 0; }
.fx-method p { max-width: 900px; color: var(--ink-soft); }
.fx-method a { color: var(--green); font-weight: 800; }
.faq-list { display: grid; gap: .7rem; }
.faq-list details { border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.faq-list summary { padding: 1rem 1.2rem; font-weight: 800; cursor: pointer; }
.faq-answer { padding: 0 1.2rem 1.2rem; color: var(--ink-soft); }

.showing-nationwide .year-control { opacity: .45; pointer-events: none; }
.nationwide-heading { padding-block: 5rem 3.5rem; color: #fff; background: linear-gradient(135deg, #153d31 0%, #21634e 60%, #9a7436 160%); }
.nationwide-heading-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(460px, .95fr); align-items: end; gap: 3rem; }
.nationwide-heading h1 { max-width: 760px; margin: .5rem 0 1.25rem; color: #fff; font-size: clamp(3rem, 6vw, 6.3rem); line-height: .98; letter-spacing: -.055em; }
.nationwide-heading h1 em { color: var(--gold); font-style: normal; }
.nationwide-heading p:last-child { max-width: 700px; color: rgba(255,255,255,.72); }
.nationwide-stats { grid-template-columns: repeat(2, 1fr); }
.nationwide-stats .stat-card { color: var(--ink); background: rgba(255,255,255,.96); box-shadow: 0 18px 50px rgba(5,25,18,.15); }
.nationwide-content { padding-top: 2rem; }
.nationwide-explainer { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; padding: 0; overflow: hidden; }
.nationwide-explainer > div { padding: 1.5rem; border-left: 1px solid var(--line); }
.nationwide-explainer > div:first-child { border-left: 0; }
.nationwide-explainer strong { margin-left: .65rem; }
.nationwide-explainer p { margin: .7rem 0 0; color: var(--ink-soft); font-size: .84rem; }
.tier-badge { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; font-weight: 900; }
.tier-a { color: #0d5a40; background: #dcefe5; }
.tier-b { color: #765719; background: #f5e9c9; }
.tier-c { color: #8a3c32; background: #f4ded9; }
.nationwide-toolbar { align-items: flex-end; }
.nationwide-toolbar label:not(.search-field) { display: grid; gap: .35rem; min-width: 150px; color: var(--ink-soft); font-size: .72rem; font-weight: 800; }
.nationwide-toolbar select { min-height: 44px; padding: .55rem 2rem .55rem .7rem; border: 1px solid #cfd5d0; border-radius: 8px; background: #fff; }
.city-budget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.city-budget-card { min-width: 0; padding: 1.35rem; background: #fff; }
.city-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.city-card-heading span:first-child { color: var(--ink-soft); font-size: .72rem; font-weight: 700; }
.city-card-heading h2 { margin: .25rem 0 0; font-size: 1.35rem; }
.city-primary-number { margin: 1.35rem 0 1rem; }
.city-primary-number strong { display: block; color: var(--forest); font-size: 1.65rem; }
.city-primary-number span { color: var(--ink-soft); font-size: .76rem; }
.city-finance-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.city-finance-grid span { padding: .7rem; border-radius: 8px; background: #f5f7f3; }
.city-finance-grid small, .city-finance-grid b { display: block; }
.city-finance-grid small { color: var(--ink-soft); font-size: .67rem; }
.city-finance-grid b { margin-top: .2rem; font-size: .83rem; }
.city-category-list { display: grid; gap: .6rem; margin: 1.2rem 0; }
.city-category-list div { display: grid; grid-template-columns: 1fr auto; gap: .35rem .7rem; color: var(--ink-soft); font-size: .72rem; }
.city-category-list b { color: var(--ink); }
.city-category-list i { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 4px; background: #edf0eb; }
.city-category-list em { display: block; height: 100%; background: var(--gold); }
.readiness-facts { display: grid; gap: .35rem; margin: 0; padding: 1rem 0; border-block: 1px solid var(--line); }
.readiness-facts div { display: flex; justify-content: space-between; gap: 1rem; }
.readiness-facts dt { color: var(--ink-soft); font-size: .7rem; }
.readiness-facts dd { margin: 0; font-size: .7rem; font-weight: 800; text-align: right; }
.city-card-links { display: flex; flex-wrap: wrap; gap: .7rem 1rem; padding-top: 1rem; }
.city-card-links a, .city-card-links button { padding: 0; border: 0; color: var(--green); background: transparent; font-size: .72rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.national-ranking-panel { padding: 2rem; }
.national-ranking { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem 2rem; margin-top: 1.5rem; }
.national-ranking-row { display: grid; grid-template-columns: 2rem minmax(90px, 145px) minmax(90px, 1fr) auto; align-items: center; gap: .65rem; font-size: .75rem; }
.national-ranking-row > span { color: #a5aba6; font-variant-numeric: tabular-nums; }
.national-ranking-row > div { height: 8px; overflow: hidden; border-radius: 8px; background: #edf0eb; }
.national-ranking-row i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--green), var(--gold)); }
.national-ranking-row b { min-width: 82px; text-align: right; }
.nationwide-methodology { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2rem; }
.nationwide-methodology h2 { margin: .35rem 0 .7rem; }
.nationwide-methodology p { color: var(--ink-soft); }
.nationwide-methodology a { color: var(--green); font-weight: 800; }
.interface-audit-panel, .watchpoints-panel, .interface-matrix-panel { padding: 2rem; }
.interface-audit-panel { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(0,1.3fr); gap: 2rem; align-items: start; }
.interface-audit-stats { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.interface-audit-stat { min-height: 150px; padding: 1.25rem; background: #f8faf7; }
.interface-audit-stat span, .interface-audit-stat small { display: block; color: var(--ink-soft); }
.interface-audit-stat strong { display: block; margin: .4rem 0; color: var(--forest); font-size: 2rem; }
.interface-audit-stat small { font-size: .72rem; line-height: 1.55; }
.national-watchpoints { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 1.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--line); }
.watchpoint-card { min-height: 240px; padding: 1.4rem; background: #fff; }
.watchpoint-card .watchpoint-source { color: var(--green); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.watchpoint-card h3 { margin: .65rem 0; font-size: 1.08rem; line-height: 1.35; }
.watchpoint-card p { color: var(--ink-soft); font-size: .78rem; line-height: 1.65; }
.watchpoint-card b { display: block; margin-top: 1rem; color: var(--gold-dark); font-size: .72rem; }
.city-service-status { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 0; }
.service-pill { padding: .25rem .5rem; border-radius: 999px; color: #315147; background: #e9f0ec; font-size: .63rem; font-weight: 800; }
.service-pill.warn { color: #7b4b18; background: #f7ead5; }
.city-watchpoint { margin: .9rem 0 0; padding: .75rem; border-left: 3px solid var(--gold); color: var(--ink-soft); background: #fbf8f0; font-size: .68rem; line-height: 1.55; }
.interface-matrix-panel .table-wrap { margin-top: 1.5rem; }
.interface-matrix { min-width: 920px; }
.interface-matrix td { vertical-align: top; }
.interface-matrix td small { display: block; margin-top: .2rem; color: var(--ink-soft); line-height: 1.45; }
.matrix-ok, .matrix-gap { font-weight: 900; }
.matrix-ok { color: var(--green); }
.matrix-gap { color: #9b5d1b; }

.trust-strip { padding: 1.4rem 0; color: rgba(255,255,255,.72); background: #193329; border-bottom: 1px solid rgba(255,255,255,.08); }
.trust-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.trust-grid > span { display: flex; align-items: center; justify-content: center; gap: .65rem; min-height: 44px; border-left: 1px solid rgba(255,255,255,.13); font-size: .78rem; }
.trust-grid > span:first-child { border-left: 0; }
.trust-grid b { color: var(--gold); font-size: 1rem; }
footer { padding: 4.5rem 0; color: #fff; background: #12251d; }
.footer-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.footer-kicker { margin: 0 0 .7rem; color: var(--gold); font-size: .72rem; font-weight: 800; letter-spacing: .14em; }
.footer-inner > div:first-child > strong { display: block; max-width: 650px; font-family: "Noto Sans TC", sans-serif; font-size: clamp(1.5rem,3vw,2.4rem); line-height: 1.25; }
.footer-inner > div:first-child > p:last-child { max-width: 640px; color: rgba(255,255,255,.55); }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .45rem; color: rgba(255,255,255,.55); font-size: .78rem; }
.footer-meta a { color: var(--gold); }
.loading-screen { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 1rem; color: #fff; background: var(--header); text-align: center; transition: opacity 250ms ease, visibility 250ms ease; }
.loading-screen.done { opacity: 0; visibility: hidden; }
.loader { width: 34px; height: 34px; margin: auto; border: 3px solid rgba(255,255,255,.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 1040px) {
  .header-inner { flex-wrap: wrap; padding-top: .75rem; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; }
  .primary-nav button { min-height: 48px; white-space: nowrap; }
  .year-control { margin-left: auto; }
  .language-control { margin-left: 0; }
  .hero-grid { grid-template-columns: 1fr; min-height: auto; }
  .nationwide-heading-grid { grid-template-columns: 1fr; }
  .interface-audit-panel { grid-template-columns: 1fr; }
  .city-budget-grid { grid-template-columns: repeat(2, 1fr); }
  .national-watchpoints { grid-template-columns: repeat(2,1fr); }
  .national-ranking { grid-template-columns: 1fr; }
  .hero-copy-block { max-width: 720px; }
  .hero-glance { max-width: 720px; }
  .journey-grid { grid-template-columns: repeat(2,1fr); }
  .journey-card:nth-child(3) { border-left: 0; border-top: 1px solid #eceeea; }
  .journey-card:nth-child(4) { border-top: 1px solid #eceeea; }
}

@media (max-width: 760px) {
  .shell, .header-inner { width: min(calc(100% - 2rem), var(--shell)); }
  .site-header { position: relative; }
  .brand-mark { width: 34px; height: 34px; }
  .year-control > span { display: none; }
  .header-inner { gap: .65rem; }
  .language-control { margin-left: auto; }
  .year-control { margin-left: 0; }
  .language-control button { padding-inline: .42rem; }
  .hero-grid { padding-block: 3rem; gap: 2.5rem; }
  .municipal-label { margin-bottom: 1.5rem; }
  .hero h1 { font-size: clamp(2.55rem,14vw,4.2rem); }
  .hero-glance .stat-card { min-height: 100px; }
  .hero-glance .stat-card strong { font-size: 1.15rem; }
  .journey-section, .documents-section, .investment-section, .balance-section, .capital-feature { padding: 4rem 0; }
  .journey-grid, .document-grid, .source-grid { grid-template-columns: 1fr; }
  .nationwide-heading { padding-block: 3.5rem 2.5rem; }
  .nationwide-heading h1 { font-size: clamp(3rem, 14vw, 5rem); }
  .nationwide-stats { grid-template-columns: 1fr 1fr; }
  .nationwide-explainer, .city-budget-grid, .nationwide-methodology, .interface-audit-stats, .national-watchpoints { grid-template-columns: 1fr; }
  .nationwide-explainer > div, .nationwide-explainer > div:first-child { border-left: 0; border-top: 1px solid var(--line); }
  .nationwide-explainer > div:first-child { border-top: 0; }
  .national-ranking-row { grid-template-columns: 1.6rem 95px minmax(60px, 1fr) auto; }
  .national-ranking-row b { min-width: 68px; }
  .journey-card, .journey-card:first-child, .journey-card:nth-child(3), .journey-card:nth-child(4) { min-height: auto; border-left: 0; border-top: 1px solid #eceeea; }
  .journey-card:first-child { border-top: 0; }
  .journey-card p { min-height: 0; }
  .journey-card h3 { margin-top: 1.2rem; }
  .investment-grid, .capital-feature-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .balance-grid { grid-template-columns: 1fr; }
  .balance-center { min-height: 180px; }
  .document-card, .document-card:nth-child(-n+3), .document-card:nth-child(3n+1) { min-height: 170px; border-left: 0; border-top: 1px solid #e3e6e1; }
  .document-card:first-child { border-top: 0; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-item:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); padding-top: 1rem; }
  .summary-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,.16); padding-top: 1rem; }
  .stat-grid, .stat-grid.compact { grid-template-columns: 1fr 1fr; }
  .table-toolbar { align-items: stretch; flex-direction: column; }
  .page-heading { padding-block: 3rem 1.5rem; }
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .footer-meta { align-items: flex-start; }
  .notice { flex-direction: column; }
  .trust-grid { grid-template-columns: 1fr 1fr; }
  .trust-grid > span:nth-child(3) { border-left: 0; border-top: 1px solid rgba(255,255,255,.13); }
  .trust-grid > span:nth-child(4) { border-top: 1px solid rgba(255,255,255,.13); }
}

@media (max-width: 440px) {
  .hero-glance .stat-grid, .stat-grid, .stat-grid.compact, .summary-strip { grid-template-columns: 1fr; }
  .summary-item, .summary-item:nth-child(3), .summary-item:nth-child(4) { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); padding-block: .8rem; }
  .summary-item:first-child { border-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Unified 22-locality information architecture */
.site-header { position: sticky; }
.openbook-header { min-height: 68px; }
.openbook-header .language-control { margin-left: auto; }
.header-baseline { padding: .28rem .65rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; color: rgba(255,255,255,.65); font-size: .7rem; font-weight: 700; }
.city-tabs-shell { border-top: 1px solid rgba(255,255,255,.09); background: #142f25; }
.city-tabs-track { display: flex; min-width: 0; }
.city-tabs { display: flex; min-width: 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.24) transparent; }
.city-tab { flex: 0 0 auto; min-height: 50px; padding: 0 1rem; border: 0; border-bottom: 3px solid transparent; color: rgba(255,255,255,.62); background: transparent; font-size: .76rem; font-weight: 800; white-space: nowrap; cursor: pointer; }
.city-tab:hover { color: #fff; background: rgba(255,255,255,.05); }
.city-tab.active { color: #fff; border-bottom-color: var(--gold); background: rgba(255,255,255,.06); }
.overview-tab { position: sticky; left: 0; z-index: 2; color: #fff; background: #142f25; box-shadow: 12px 0 20px rgba(10,24,18,.25); }

.source-relationship-panel { padding: 2.2rem; }
.source-relationship-intro { max-width: 760px; }
.source-flow { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1.5rem; margin-top: 2rem; }
.source-flow-card { position: relative; min-width: 0; min-height: 300px; padding: 1.5rem; border: 1px solid var(--line); border-top: 5px solid var(--green); border-radius: 12px; background: #fff; }
.source-flow-card.openfun { border-top-color: #d29b3f; }
.source-flow-card.twinkle { border-top-color: #6b6eb1; }
.source-flow-card > div { display: flex; align-items: center; gap: .6rem; }
.source-flow-card > div span { display: grid; width: 2.1rem; height: 2.1rem; place-items: center; border-radius: 50%; color: #fff; background: var(--forest); font-size: .68rem; font-weight: 900; }
.source-flow-card.openfun > div span { background: #9a6d23; }
.source-flow-card.twinkle > div span { background: #535691; }
.source-flow-card small { color: var(--ink-soft); font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.source-flow-card h3 { margin: 1.2rem 0 .6rem; font-size: 1.45rem; }
.source-flow-card p { color: var(--ink-soft); font-size: .86rem; }
.source-flow-card b { display: block; margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--forest); font-size: .76rem; line-height: 1.55; }
.source-flow-card > i { position: absolute; top: 44%; right: -2rem; z-index: 2; display: grid; width: 2.5rem; height: 2.5rem; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--green); background: var(--paper); font-style: normal; font-weight: 900; }
.source-use-rule { display: flex; gap: 1rem; margin-top: 1.4rem; padding: 1rem 1.2rem; border-left: 4px solid var(--green); color: #334b40; background: #eef4ef; }
.source-use-rule strong { flex: 0 0 auto; }
.interface-comparison { margin-top: 1.6rem; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fbfbf8; }
.comparison-heading { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.7fr); gap: 2rem; padding: 1.4rem 1.5rem; border-bottom: 1px solid var(--line); }
.comparison-heading span { color: #75602e; font-size: .67rem; font-weight: 900; letter-spacing: .12em; }
.comparison-heading h3 { margin: .35rem 0 0; font-size: 1.22rem; }
.comparison-heading p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.comparison-table-wrap { overflow-x: auto; }
.comparison-table { width: 100%; min-width: 760px; border-collapse: collapse; table-layout: fixed; }
.comparison-table th, .comparison-table td { padding: .9rem 1rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .78rem; line-height: 1.55; }
.comparison-table thead th { color: #fff; background: var(--header); font-size: .72rem; letter-spacing: .04em; }
.comparison-table tbody th { width: 16%; color: var(--forest); background: #f1f4ef; }
.comparison-table th:last-child, .comparison-table td:last-child { border-right: 0; }
.beta-note { display: flex; gap: 1rem; padding: 1rem 1.2rem; color: #5b461d; background: #f8efd8; font-size: .78rem; }
.beta-note strong { flex: 0 0 auto; }
.openfun-api-notice { display: grid; grid-template-columns: auto 1fr; gap: .15rem 1rem; margin-bottom: 1rem; padding: 1rem 1.2rem; border: 1px solid #ead9ad; border-radius: 10px; background: #fff8e7; }
.openfun-api-notice span { grid-row: 1 / 3; align-self: start; padding: .22rem .5rem; border-radius: 99px; color: #fff; background: #8b6423; font-size: .62rem; font-weight: 900; letter-spacing: .09em; }
.openfun-api-notice strong { color: #4d3914; }
.openfun-api-notice p { margin: .15rem 0 0; color: #715f39; font-size: .8rem; }

.coverage-panel { padding: 0; overflow: hidden; }
.coverage-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 2rem; border-bottom: 1px solid var(--line); }
.coverage-heading .section-intro { max-width: 720px; }
.coverage-controls { display: flex; flex: 0 0 360px; flex-direction: column; align-items: stretch; gap: .7rem; }
.coverage-controls .search-field { width: 100%; }
.coverage-table-wrap { max-height: 830px; }
.coverage-table { min-width: 1160px; }
.coverage-table th { position: sticky; top: 0; z-index: 2; }
.coverage-table tbody tr { transition: background 150ms ease; }
.coverage-table tbody tr:hover { background: #f5f8f5; }
.coverage-table td { vertical-align: middle; }
.coverage-table td:nth-child(1) { width: 150px; }
.coverage-table td:nth-child(2) { width: 175px; }
.coverage-table td:nth-child(3), .coverage-table td:nth-child(4) { width: 190px; }
.coverage-table td:nth-child(5) { min-width: 320px; }
.coverage-table td small { display: block; margin-top: .35rem; color: var(--ink-soft); font-size: .68rem; }
.city-name-button { display: block; width: 100%; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.city-name-button span { display: block; color: var(--ink-soft); font-size: .66rem; }
.city-name-button strong { font-size: 1rem; }
.audit-pill { display: inline-flex; padding: .3rem .6rem; border-radius: 999px; font-size: .68rem; font-weight: 900; }
.audit-pill.good, .state-good { color: #0c6243; background: #dcefe5; }
.audit-pill.warn, .state-warn { color: #795816; background: #f5e8c7; }
.audit-pill.bad, .state-bad { color: #8b3f35; background: #f3ddd8; }
.coverage-question { color: #3f4944; font-size: .78rem; line-height: 1.55; }
.row-open-button { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border: 1px solid #bdc9c0; border-radius: 50%; color: var(--green); background: #fff; font-weight: 900; cursor: pointer; }
.row-open-button:hover { color: #fff; background: var(--green); }
.national-ranking-row { width: 100%; padding: .2rem 0; border: 0; color: var(--ink); background: transparent; text-align: left; cursor: pointer; }
.national-ranking-row:hover strong { color: var(--green); }

.city-detail-heading { padding: 4.2rem 0 3.5rem; color: #fff; background: linear-gradient(135deg,#173d31,#21634e 70%,#8b6a33 180%); }
.city-detail-heading-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(460px,.85fr); align-items: end; gap: 3rem; }
.city-detail-heading .back-overview { margin-bottom: 2rem; color: rgba(255,255,255,.72); }
.city-detail-heading h1 { margin: .25rem 0 .7rem; color: #fff; font-size: clamp(3.4rem,7vw,6.8rem); line-height: 1; letter-spacing: -.06em; }
.city-detail-heading p { max-width: 650px; color: rgba(255,255,255,.7); }
.city-heading-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.4rem; }
.city-heading-badges span { padding: .35rem .7rem; border: 1px solid rgba(255,255,255,.24); border-radius: 999px; color: rgba(255,255,255,.82); font-size: .68rem; font-weight: 800; }
.city-primary-stats { grid-template-columns: repeat(2,1fr); }
.city-primary-stats .stat-card { min-height: 145px; border: 0; background: rgba(255,255,255,.96); box-shadow: 0 18px 50px rgba(5,25,18,.14); }
.city-primary-stats .stat-card strong { font-size: 1.55rem; }
.city-section-nav { position: sticky; top: 118px; z-index: 20; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.city-section-nav .shell { display: flex; gap: 1.6rem; overflow-x: auto; }
.city-section-nav a { flex: 0 0 auto; padding: .85rem 0; color: var(--ink-soft); font-size: .74rem; font-weight: 900; text-decoration: none; }
.city-section-nav a:hover { color: var(--green); }
.city-detail-content { padding-top: 2rem; }
.city-detail-content > * { scroll-margin-top: 175px; }

.city-question-panel { padding: 2rem; border-color: #dec892; background: #fbf7e9; }
.question-label { color: #88631f; font-size: .68rem; font-weight: 900; letter-spacing: .1em; }
.city-question-panel h2 { max-width: 980px; margin: .55rem 0; color: #3e3320; font-size: clamp(1.45rem,3vw,2.35rem); line-height: 1.35; }
.city-question-panel p { margin: 0; color: #786b52; font-size: .78rem; }
.city-budget-panel, .city-sources-panel, .taipei-extra-panel { padding: 2.2rem; }
.city-budget-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); gap: 3rem; margin-top: 2rem; }
.city-category-bars { display: grid; gap: .8rem; }
.city-category-row { display: grid; grid-template-columns: 1.7rem minmax(130px,1.1fr) minmax(120px,2fr) minmax(95px,auto) 3.4rem; align-items: center; gap: .8rem; font-size: .74rem; }
.city-category-row > span { color: #a2aaa5; font-variant-numeric: tabular-nums; }
.city-category-row > i, .mini-ranking i { height: 8px; overflow: hidden; border-radius: 8px; background: #ebefeb; }
.city-category-row > i b, .mini-ranking i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),var(--gold)); }
.city-category-row em { font-style: normal; font-weight: 900; text-align: right; }
.city-category-row small { color: var(--ink-soft); text-align: right; }
.financing-panel { padding: 1.5rem; border-radius: 12px; color: #fff; background: #183b2f; }
.financing-panel h3 { margin: 0; }
.financing-panel > p { color: rgba(255,255,255,.6); font-size: .75rem; }
.financing-equation { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: .6rem; margin-top: 1.3rem; }
.financing-equation > div { display: grid; align-content: start; gap: .5rem; }
.financing-equation > div > span { display: grid; min-height: 72px; align-content: center; padding: .7rem; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; background: rgba(255,255,255,.06); }
.financing-equation small { color: rgba(255,255,255,.56); font-size: .62rem; }
.financing-equation strong { color: #fff; font-size: .82rem; }
.financing-equation > b { align-self: center; color: var(--gold); font-size: 1.4rem; }

.city-source-stack { display: grid; gap: 1.2rem; margin-top: 2rem; }
.city-source-section { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.source-section-heading { display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.4rem; border-bottom: 1px solid var(--line); background: #f7f9f6; }
.source-section-heading .source-step { display: grid; width: 2.4rem; height: 2.4rem; place-items: center; border-radius: 50%; color: #fff; background: var(--green); font-size: .66rem; font-weight: 900; }
.openfun-source-section .source-step { background: #9a6d23; }
.twinkle-source-section .source-step { background: #535691; }
.source-section-heading > div { flex: 1; }
.source-role { display: block; color: var(--ink-soft); font-size: .62rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.source-section-heading h3 { margin: .1rem 0 0; font-size: 1.2rem; }
.source-state { flex: 0 0 auto; padding: .35rem .65rem; border-radius: 999px; font-size: .65rem; font-weight: 900; }
.state-primary { color: #fff; background: var(--green); }
.source-detail-grid { display: grid; grid-template-columns: minmax(260px,.75fr) minmax(0,1.25fr); gap: 2rem; padding: 1.5rem; }
.source-facts { display: grid; gap: .1rem; margin: 0; }
.source-facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.source-facts dt { color: var(--ink-soft); font-size: .7rem; }
.source-facts dd { margin: 0; font-size: .72rem; font-weight: 900; text-align: right; }
.source-explanation { padding: 1.2rem; border-radius: 10px; background: #f4f7f3; }
.source-explanation > strong { color: var(--forest); font-size: 1.05rem; }
.source-explanation p { color: var(--ink-soft); font-size: .8rem; }
.source-link-inline { display: inline-block; margin: .3rem 1rem .3rem 0; color: var(--green); font-size: .72rem; font-weight: 900; }
.source-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); }
.source-metrics .stat-card { min-height: 145px; border: 0; border-radius: 0; }
.source-subsection, .schema-panel { padding: 1.5rem; border-top: 1px solid var(--line); }
.subsection-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.subsection-heading h4 { margin: 0; font-size: 1rem; }
.subsection-heading span { color: var(--ink-soft); font-size: .68rem; }
.detail-table { min-width: 820px; }
.detail-table td small { display: block; margin-top: .2rem; }
.change-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 0 1.5rem 1.5rem; }
.change-card { padding: 1.2rem; border: 1px solid #ead8a7; border-radius: 10px; background: #fbf7eb; }
.change-card.decrease { border-color: #cbdcd2; background: #f1f6f2; }
.change-card span, .change-card small { display: block; color: var(--ink-soft); font-size: .66rem; }
.change-card strong { display: block; margin: .3rem 0; }
.change-card b { color: #9a5b24; font-size: 1.5rem; }
.change-card.decrease b { color: var(--green); }
.source-actions { padding: 1rem 1.5rem; border-top: 1px solid var(--line); background: #f8f9f7; }
.source-empty { padding: 2rem; }
.source-empty p { color: var(--ink-soft); }
.twinkle-selected { margin: 1.5rem; padding: 1.4rem; border: 1px solid #d9d9ea; border-left: 5px solid #686ba7; border-radius: 10px; background: #f7f7fb; }
.twinkle-selected > span { color: #5a5c8a; font-size: .65rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.twinkle-selected h4 { margin: .55rem 0; font-size: 1.2rem; }
.twinkle-selected p { color: var(--ink-soft); font-size: .8rem; }
.dataset-meta { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin: 1rem 0; }
.dataset-meta span { color: var(--ink-soft); font-size: .68rem; }
.dataset-meta b { color: var(--ink); }
.twinkle-row-panel { margin: 1.5rem; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.twinkle-row-panel > div:first-child { padding: 1.25rem 1.4rem; }
.twinkle-row-panel > div > span { display: block; margin-bottom: .35rem; font-size: .65rem; font-weight: 900; letter-spacing: .1em; }
.twinkle-row-panel > div > strong { display: block; font-size: 1.05rem; }
.twinkle-row-panel > div > p { margin: .5rem 0 0; color: var(--ink-soft); font-size: .82rem; }
.twinkle-row-panel > div > small { display: block; margin-top: .55rem; color: var(--ink-soft); font-size: .7rem; }
.twinkle-row-panel.accepted { border-color: #b7d9c8; background: #f3faf6; }
.twinkle-row-panel.accepted > div > span { color: #14704c; }
.twinkle-row-panel.accepted .detail-table { background: #fff; }
.twinkle-row-panel.rejected { border-color: #e5c2ba; background: #fff7f5; }
.twinkle-row-panel.rejected > div > span { color: var(--red); }
.twinkle-row-panel.search-only { border-color: #d9d9ea; background: #f7f7fb; }
.twinkle-row-panel.search-only > div > span { color: #5a5c8a; }
.schema-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.schema-chips code { max-width: 100%; padding: .35rem .55rem; overflow: hidden; border: 1px solid #dddfea; border-radius: 6px; color: #3e416b; background: #f6f6fa; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.schema-chips > span { align-self: center; color: var(--ink-soft); font-size: .7rem; }

.taipei-extra-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-top: 2rem; }
.taipei-extra-grid h3 { margin-top: 0; }
.mini-ranking { display: grid; gap: .7rem; }
.mini-ranking > div { display: grid; grid-template-columns: minmax(130px,1fr) minmax(80px,1.2fr) auto; align-items: center; gap: .7rem; font-size: .7rem; }
.mini-ranking strong { min-width: 86px; text-align: right; }
.city-method-panel { display: grid; grid-template-columns: minmax(220px,.55fr) minmax(0,1.45fr); gap: 2rem; padding: 2rem; }
.city-method-panel h2 { margin: .35rem 0; }
.city-method-panel p { color: var(--ink-soft); }

@media (max-width: 1040px) {
  .openbook-header { flex-wrap: nowrap; width: min(calc(100% - 2rem),var(--shell)); padding-top: 0; }
  .city-tabs-track { width: 100%; }
  .source-flow { grid-template-columns: 1fr; }
  .source-flow-card { min-height: 0; }
  .source-flow-card > i { right: 50%; top: auto; bottom: -2rem; transform: translateX(50%) rotate(90deg); }
  .city-detail-heading-grid { grid-template-columns: 1fr; }
  .city-primary-stats { max-width: 760px; }
  .city-budget-layout { grid-template-columns: 1fr; }
  .source-metrics { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 760px) {
  .site-header { position: sticky; }
  .openbook-header { min-height: 64px; gap: .5rem; }
  .openbook-header .brand small { display: none; }
  .openbook-header .brand strong { font-size: .8rem; }
  .header-baseline { display: none; }
  .language-control button { font-size: .64rem; }
  .city-tabs-shell .shell { width: 100%; }
  .city-tab { min-height: 46px; padding-inline: .8rem; }
  .nationwide-heading { padding-block: 3.2rem 2.7rem; }
  .nationwide-heading h1 { font-size: clamp(3.2rem,15vw,4.8rem); }
  .nationwide-stats, .city-primary-stats { grid-template-columns: 1fr 1fr; }
  .source-relationship-panel, .city-budget-panel, .city-sources-panel, .taipei-extra-panel { padding: 1.25rem; }
  .source-use-rule { flex-direction: column; }
  .comparison-heading { grid-template-columns: 1fr; gap: .75rem; }
  .beta-note { flex-direction: column; }
  .openfun-api-notice { grid-template-columns: 1fr; }
  .openfun-api-notice span { grid-row: auto; width: max-content; }
  .coverage-heading { align-items: stretch; flex-direction: column; padding: 1.3rem; }
  .coverage-controls { flex-basis: auto; }
  .city-detail-heading { padding: 3rem 0 2.6rem; }
  .city-detail-heading h1 { font-size: 4rem; }
  .city-section-nav { top: 110px; }
  .city-section-nav .shell { gap: 1.2rem; }
  .city-detail-content > * { scroll-margin-top: 165px; }
  .city-category-row { grid-template-columns: 1.5rem minmax(115px,1fr) 3.2rem; gap: .5rem; }
  .city-category-row > i { grid-column: 2 / -1; grid-row: 2; }
  .city-category-row em { font-size: .68rem; }
  .city-category-row small { grid-column: 3; grid-row: 1; }
  .financing-equation { grid-template-columns: 1fr; }
  .financing-equation > b { justify-self: center; transform: rotate(90deg); }
  .source-section-heading { align-items: flex-start; flex-wrap: wrap; }
  .source-state { margin-left: 3.4rem; }
  .source-detail-grid { grid-template-columns: 1fr; padding: 1rem; }
  .source-metrics { grid-template-columns: 1fr 1fr; }
  .source-metrics .stat-card { min-height: 130px; padding: 1rem; }
  .source-metrics .stat-card strong { font-size: 1.15rem; }
  .change-grid, .taipei-extra-grid, .city-method-panel { grid-template-columns: 1fr; }
  .mini-ranking > div { grid-template-columns: 1fr auto; }
  .mini-ranking i { grid-column: 1 / -1; grid-row: 2; }
  .city-method-panel { gap: .5rem; }
}

@media (max-width: 440px) {
  .openbook-header { width: calc(100% - 1rem); }
  .openbook-header .brand-mark { display: none; }
  .nationwide-stats, .city-primary-stats, .source-metrics { grid-template-columns: 1fr; }
  .city-primary-stats .stat-card { min-height: 110px; }
  .city-detail-heading h1 { font-size: 3.4rem; }
  .source-state { width: 100%; margin-left: 0; text-align: center; }
}
