/* Frozen Server 2 - modern institutional system.
   Light by default (warm off-white paper), a solid navy header band, the world blue (#56ccff) as the single accent,
   deep-navy text, Inter + Noto Sans Thai, 6px corners, quiet shadows. Dark only via the toggle. */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --elev: #f2f6fb;
  --line: #dfe6f0;
  --line-2: #c8d3e3;
  --text: #0e1c3a;
  --soft: #2c3b57;
  --muted: #52627d;
  --navy: #12274d;
  --navy-deep: #0b1a36;
  --accent: #56ccff;
  --accent-text: #0a63a8;
  --link: #0b5cab;
  --seal: #56ccff;
  --shadow: 0 1px 2px rgba(16, 29, 51, 0.06), 0 10px 24px -14px rgba(16, 29, 51, 0.2);

  --sans: "Inter", "Noto Sans Thai", system-ui, sans-serif;
  --wrap: 1180px;
  --r: 6px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220;
  --surface: #121b2e;
  --elev: #0f1829;
  --line: rgba(255, 255, 255, 0.1);
  --line-2: rgba(255, 255, 255, 0.2);
  --text: #eef2f8;
  --soft: #c6cfdd;
  --muted: #9aa6ba;
  --navy: #0e1b36;
  --navy-deep: #08101f;
  --accent-text: #56ccff;
  --link: #86bdff;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.65;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: #0b1a36; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.mono { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-variant-numeric: tabular-nums; }
.mono i { margin-right: 6px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 4px; }
.skip:focus { left: 8px; }
.ext-i { font-size: 0.7em; margin-left: 5px; opacity: 0.75; }
.link { color: var(--link); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- official strip ---------- */
.gov-strip { background: var(--navy-deep); color: #c8d1e2; font-size: 13px; }
.gov-strip .wrap { display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; padding: 7px 0; }
.gov-strip i { color: var(--accent); margin-right: 8px; }
.gov-strip b { color: #fff; font-weight: 600; }

/* ---------- masthead + nav ---------- */
.masthead { background: var(--surface); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 16px; }
.seal { width: 58px; height: 58px; flex: none; border-radius: 50%; border: 2px solid var(--accent); padding: 3px; background: #fff; }
.seal img { width: 100%; height: 100%; }
.brand strong { display: block; font-size: clamp(21px, 2.4vw, 28px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; color: var(--text); }
.brand small { display: block; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.theme { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); cursor: pointer; font-size: 14px; transition: background 0.12s; }
.theme:hover { background: var(--elev); }

#top { display: contents; } /* lets the sticky navbar stay put for the whole page, not just inside the header */
.navbar { position: sticky; top: 0; z-index: 50; background: var(--navy); border-bottom: 3px solid var(--accent); box-shadow: 0 6px 18px -12px rgba(0, 0, 0, 0.5); }
.bar { display: flex; align-items: stretch; justify-content: space-between; gap: 16px; }
.nav { display: flex; }
.nav a { display: flex; align-items: center; gap: 8px; padding: 14px 18px; font-size: 15px; font-weight: 500; color: rgba(255, 255, 255, 0.82); border-bottom: 3px solid transparent; margin-bottom: -3px; transition: background 0.12s, color 0.12s; }
.nav a i { font-size: 12px; color: var(--accent); }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a[aria-current="page"] { color: #fff; font-weight: 600; background: rgba(255, 255, 255, 0.1); border-bottom-color: var(--accent); }
.bar-cta { display: flex; align-items: center; padding: 7px 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-family: var(--sans); font-size: 15.5px; font-weight: 600;
  padding: 12px 22px; border-radius: 6px; border: 1.5px solid var(--navy); color: var(--navy); background: transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
:root[data-theme="dark"] .btn { border-color: var(--line-2); color: var(--text); }
.btn:hover { background: var(--navy); color: #fff; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-deep); }
.btn.sm { padding: 8px 16px; font-size: 14.5px; }
.btn i { font-size: 12.5px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
/* gold call-to-action on navy / photo */
.navbar .btn.primary, .hero .btn.primary { background: var(--accent); color: #101d33; border-color: var(--accent); }
.navbar .btn.primary:hover, .hero .btn.primary:hover { background: #8adcff; border-color: #8adcff; }

/* ---------- hero (photo under a navy wash) ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; border-bottom: 4px solid var(--accent); }
.hero-bg { position: absolute; inset: 0; z-index: -2; background: #0b1a36 url("../img/web/hero-night.webp") center 12% / cover no-repeat; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(9, 21, 46, 0.94) 0%, rgba(9, 21, 46, 0.78) 46%, rgba(9, 21, 46, 0.38) 100%);
}
.hero-in { min-height: clamp(540px, 48vw, 660px); display: flex; flex-direction: column; justify-content: center; padding: 76px 0 150px; }
.hero .eyebrow-line { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.hero .eyebrow-line::before { content: ""; width: 34px; height: 3px; background: var(--accent); }
.hero h1 { font-size: clamp(46px, 7vw, 92px); font-weight: 700; line-height: 1; letter-spacing: -0.045em; }
.hero .tagline { margin-top: 20px; font-size: clamp(24px, 3vw, 38px); font-weight: 500; line-height: 1.2; letter-spacing: -0.025em; color: rgba(255, 255, 255, 0.9); }
.hero .tagline-th { margin-top: 8px; font-size: clamp(17px, 1.8vw, 21px); font-weight: 500; color: rgba(255, 255, 255, 0.68); }
.hero .lead { margin-top: 24px; max-width: 54ch; font-size: 17.5px; color: rgba(255, 255, 255, 0.8); }
.hero .btn { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.hero .btn:hover { background: rgba(255, 255, 255, 0.14); border-color: #fff; color: #fff; }
.stats-wrap { position: relative; margin-top: -82px; z-index: 2; }

/* department logo strip */
.depts { padding: 52px 0 60px; }
.depts .label { text-align: center; margin-bottom: 22px; }
/* auto-scrolling strip with faded edges */
.marquee { width: min(var(--wrap), 100% - 48px); margin-inline: auto; overflow: hidden;-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%); }
.depts ul { display: flex; width: max-content; animation: scroll 42s linear infinite; }
.marquee:hover ul { animation-play-state: paused; }
@keyframes scroll { to { transform: translateX(-50%); } }
.depts li { display: flex; align-items: center; gap: 10px; flex: none; margin-right: 44px; opacity: 0.7; filter: grayscale(1); transition: opacity 0.2s, filter 0.2s; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .depts ul { width: auto; flex-wrap: wrap; justify-content: center; gap: 14px 38px; animation: none; transform: none; }
  .depts li { margin-right: 0; }
  .depts li[aria-hidden="true"] { display: none; }
}
.depts li:hover { opacity: 1; filter: none; }
.depts img { width: 30px; height: 30px; }
.depts span { font-weight: 600; font-size: 14.5px; letter-spacing: -0.01em; color: var(--soft); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-2); border-top: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); box-shadow: 0 1px 2px rgba(14, 28, 58, 0.08), 0 14px 30px -14px rgba(14, 28, 58, 0.28); }
:root[data-theme="dark"] .stats { border-color: var(--line); border-top-color: var(--accent); box-shadow: none; }
/* pale-navy band under the hero so the white stats card stands out */
.after-hero { background: var(--elev); border-bottom: 1px solid var(--line); }
.stat { padding: 26px 28px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font-size: clamp(34px, 4vw, 52px); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--text); }
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 15px; }

/* ---------- sections ---------- */
section.block { padding-top: 104px; }
/* pale-navy bands alternate with white for rhythm */
section.block.tint { background: var(--elev); padding: 88px 0 96px; margin-top: 104px; border-block: 1px solid var(--line); }
section.block.tint + section.block { padding-top: 104px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--accent-text); }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--accent); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(30px, 3.6vw, 46px); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; max-width: 22ch; }
.sec-head h2 span { color: var(--muted); font-weight: 600; }
.sec-head p { margin-top: 14px; color: var(--muted); font-size: 17px; max-width: 58ch; letter-spacing: 0; font-weight: 400; }
.sec-head .more { font-size: 15px; }

/* services (bento) */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 24px 24px 22px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); box-shadow: var(--shadow); transition: border-color 0.15s, box-shadow 0.15s; overflow: hidden;
}
a.card:hover { border-color: var(--navy); }
:root[data-theme="dark"] a.card:hover { border-color: var(--muted); }
.card.lg { grid-column: span 2; padding: 30px 30px 26px; }
.card.lg h3 { font-size: 26px; letter-spacing: -0.03em; }
.card.lg p { font-size: 16px; max-width: 46ch; }
.card .ico { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 6px; margin-bottom: 18px; font-size: 17px; color: #fff; background: var(--navy); }
:root[data-theme="dark"] .card .ico { background: #1d3059; color: var(--accent); }
.card h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.card .th { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.card p { margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.6; flex: 1; }
.card .go { margin-top: 18px; font-size: 14.5px; font-weight: 600; color: var(--link); }
.card .go i { margin-left: 5px; font-size: 11px; }
.card.photo-card { justify-content: flex-end; min-height: 290px; color: #fff; border-color: transparent; background: #0b1a36 url("../img/web/hanyang-city-1.webp") center / cover no-repeat; }
.card.photo-card::before { content: ""; position: absolute; inset: 0; z-index: 0; background: linear-gradient(to top, rgba(9, 21, 46, 0.95) 12%, rgba(9, 21, 46, 0.5) 65%, rgba(9, 21, 46, 0.35)); }
.card > * { position: relative; z-index: 1; }
.card.photo-card p { flex: none; }
.card.photo-card p, .card.photo-card .th { color: rgba(255, 255, 255, 0.8); }
.card.photo-card .go { color: var(--accent); }
.card.photo-card .ico { background: var(--accent); color: #101d33; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }


/* entries (news) */
.entries { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.entry { display: block; padding: 22px 28px 24px; border-top: 1px solid var(--line); transition: background 0.12s; }
.entry:first-child { border-top: 0; }
.entry:hover { background: var(--elev); }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.entry-meta b { font-size: 14.5px; font-weight: 600; }
.entry-meta .fs { font-size: 12.5px; color: var(--muted); padding-left: 14px; border-left: 1px solid var(--line-2); }
/* update types are colour-coded with the department colours */
:root { --t-version: #0dcb67; --t-law: #7f30bd; --t-world: #56ccff; --t-gov: #2556a1; --t-court: #f16d33; --t-build: #fcba03; }
:root[data-theme="dark"] { --t-law: #a566e8; --t-gov: #5b8fe0; }
.entry h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.4; }
.entry h3 a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.entry .en { margin-top: 3px; color: var(--muted); font-size: 15px; }
.entry .x { margin-top: 8px; color: var(--muted); font-size: 15px; max-width: 66ch; }
.entry .read { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--link); }
.entry .read:hover { text-decoration: underline; text-underline-offset: 3px; }

/* about */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: start; }
.about p { color: var(--muted); font-size: 17.5px; margin-bottom: 14px; max-width: 54ch; }
.about p.th { color: var(--soft); }
.vision { margin-top: 28px; padding: 26px 28px; border-radius: var(--r); background: var(--navy); border-left: 5px solid var(--accent); color: #fff; }
.vision > div { padding: 0; }
.vision .mono { display: block; margin-bottom: 8px; color: var(--accent); }
.vision p { color: #fff; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.35; margin: 0; max-width: none; }
.vision p + p { color: rgba(255, 255, 255, 0.75); font-size: 15.5px; font-weight: 400; margin-top: 6px; letter-spacing: 0; }
.facts { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; box-shadow: var(--shadow); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 0 16px; padding: 16px 24px; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); font-size: 14.5px; }
.facts dd { font-weight: 600; }
.facts dd small { display: block; font-weight: 400; color: var(--muted); font-size: 14px; }

/* nations */
/* photo galleries (nations, government) */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 16px; }
.gallery.two { grid-template-columns: repeat(2, 1fr); margin-bottom: 20px; }
.gallery figure { position: relative; overflow: hidden; border-radius: var(--r); border: 1px solid var(--line); background: var(--elev); }
.gallery img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.5s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; inset: auto 0 0 0; padding: 36px 16px 12px; font-size: 14.5px; font-weight: 600; color: #fff; background: linear-gradient(to top, rgba(9, 21, 46, 0.85), rgba(9, 21, 46, 0)); }
.gallery figcaption small { display: block; font-weight: 400; font-size: 12.5px; color: rgba(255, 255, 255, 0.75); }
@media (prefers-reduced-motion: reduce) { .gallery img { transition: none; } .gallery figure:hover img { transform: none; } }
.nations { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.nation { padding: 28px; }
.nation h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; }
.nation .th { color: var(--muted); margin: 2px 0 18px; font-size: 15px; flex: none; }
.cities { display: flex; flex-wrap: wrap; gap: 8px; }
.cities a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 15px; font-weight: 600; background: var(--surface); transition: background 0.12s, border-color 0.12s; }
.cities a:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.cities small { font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--accent-text); }
.cities a:hover small { color: var(--accent); }

/* government */
.branches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.branch { padding: 28px 24px 14px; border-top: 4px solid var(--navy); }
:root[data-theme="dark"] .branch { border-top-color: var(--accent); }
.branch h3 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-top: 6px; }
.branch .th { color: var(--muted); margin: 2px 0 18px; font-size: 15px; flex: none; }
.branch li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.branch li > div { flex: 1; min-width: 0; font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.branch li small { display: block; font-weight: 400; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.branch .dl { width: 36px; height: 36px; flex: none; }


/* ---------- footer ---------- */
footer { margin-top: 130px; background: var(--navy-deep); color: #c8d1e2; border-top: 5px solid var(--accent); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 36px; padding: 60px 0 44px; }
.foot-id { display: flex; gap: 14px; align-items: center; }
.foot-id .seal { width: 52px; height: 52px; }
.foot-id strong { display: block; font-size: 17px; color: #fff; letter-spacing: -0.015em; line-height: 1.3; }
.foot-id span.s { display: block; font-size: 14px; color: #9fb0cf; margin-top: 4px; }
.foot-col h4 { font-size: 12.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.foot-col a { display: block; padding: 4px 0; color: #c8d1e2; font-size: 15px; }
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-base { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 22px 0 32px; font-size: 13px; line-height: 1.8; color: #93a3c2; }
.foot-base a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.3); text-underline-offset: 3px; }
.foot-base a:hover { color: #fff; }

.ttt {
  position: fixed; right: 30px; bottom: 30px; width: 44px; height: 44px; display: grid; place-items: center; font-size: 14px; border-radius: 6px;
  background: var(--navy); color: var(--accent); border: 1px solid rgba(255, 255, 255, 0.2); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity 0.2s; cursor: pointer;
}
.ttt.show { opacity: 1; pointer-events: auto; }
.ttt:hover { background: var(--navy-deep); }
/* same corner offsets as the main website */
@media (max-width: 800px) { .ttt { right: 25px; bottom: 25px; } }
@media (max-width: 600px) { .ttt { right: 20px; bottom: 20px; } }

/* ---------- news page ---------- */
.page-head { background: var(--navy); color: #fff; border-bottom: 4px solid var(--accent); }
.crumbs { padding: 22px 0 0; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: rgba(255, 255, 255, 0.35); }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.page-title { padding: 24px 0 52px; }
.page-title h1 { font-size: clamp(36px, 4.6vw, 58px); font-weight: 700; line-height: 1.08; letter-spacing: -0.035em; max-width: 18ch; }
.page-title h1 span { color: rgba(255, 255, 255, 0.66); font-weight: 600; }
.page-title p { margin-top: 18px; max-width: 60ch; font-size: 17.5px; color: rgba(255, 255, 255, 0.82); }
.updated { margin-top: 16px; color: var(--accent) !important; }
.controls { position: sticky; top: var(--nav-h, 52px); z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line-2); }
.controls .wrap { display: flex; gap: 12px 20px; align-items: center; flex-wrap: wrap; padding: 14px 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  font-family: var(--sans); font-size: 14.5px; font-weight: 600; background: var(--surface); color: var(--soft);
  border: 1px solid var(--line-2); border-radius: 6px; padding: 7px 14px; cursor: pointer; transition: background 0.12s, color 0.12s;
}
.filters button:hover { background: var(--elev); }
.filters button[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.filters button i { font-size: 11px; margin-right: 6px; }
.filters button[data-tag="version"]:not([aria-pressed="true"]) i { color: var(--t-version); }
.filters button[data-tag="law"]:not([aria-pressed="true"]) i { color: var(--t-law); }
.filters button[data-tag="world"]:not([aria-pressed="true"]) i { color: #1b9fd6; }
.filters button[data-tag="gov"]:not([aria-pressed="true"]) i { color: var(--t-gov); }
.filters button[data-tag="court"]:not([aria-pressed="true"]) i { color: var(--t-court); }
.filters button[data-tag="build"]:not([aria-pressed="true"]) i { color: #d99a00; }
.filters button sup { font-size: 10.5px; margin-left: 6px; opacity: 0.7; vertical-align: baseline; }
.search { margin-left: auto; background: var(--surface); border: 1px solid var(--line-2); color: var(--text); font-family: var(--sans); font-size: 15px; padding: 9px 14px; width: min(300px, 100%); border-radius: 6px; }
.search::placeholder { color: var(--muted); }
.search:focus { outline: 3px solid var(--link); outline-offset: 0; }
#count { color: var(--muted); }
.year-group { display: grid; grid-template-columns: 170px 1fr; gap: 0 28px; margin-top: 48px; }
.year-label { font-size: clamp(32px, 3.8vw, 48px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; position: sticky; top: calc(var(--nav-h, 52px) + 88px); align-self: start; padding-top: 6px; }
.year-label small { display: block; margin-top: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); }
.empty { padding: 70px 0; color: var(--muted); display: none; font-size: 17px; }
.older { margin-top: 72px; padding: 24px 28px; display: flex; gap: 18px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.older p { color: var(--muted); max-width: 56ch; font-size: 16px; flex: none; }
.older p b { color: var(--text); font-weight: 700; }
.gov-links { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero::before { background: linear-gradient(90deg, rgba(9, 21, 46, 0.92), rgba(9, 21, 46, 0.7)); }
  .hero-in { padding-bottom: 130px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card.lg { grid-column: span 2; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about, .nations, .branches { grid-template-columns: 1fr; gap: 16px; }
  .about { gap: 32px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-id { grid-column: 1 / -1; }
  .year-group { grid-template-columns: 1fr; }
  .year-label { position: static; margin-bottom: 14px; }
  .search { margin-left: 0; width: 100%; }
}
@media (max-width: 760px) {
  .wrap, .marquee { width: min(var(--wrap), 100% - 32px); }
  .masthead .wrap { padding: 14px 0; }
  .seal { width: 48px; height: 48px; }
  .brand small { display: none; }
  .bar { flex-direction: column; gap: 0; }
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav a { white-space: nowrap; padding: 12px 14px; }
  .bar-cta { display: none; }
  .controls { position: static; }
  .cards { grid-template-columns: 1fr; }
  .gallery, .gallery.two { grid-template-columns: 1fr; }
  .card.lg { grid-column: auto; }
  .hero-in { min-height: 0; padding: 52px 0 120px; }
  .stats-wrap { margin-top: -60px; }
  .entry { padding: 18px; }
  .facts div { grid-template-columns: 1fr; gap: 2px; }
  section.block { padding-top: 76px; }
  .depts ul { gap: 14px 24px; }
}

/* department colours (Flags & Symbols Act) */

/* one label style everywhere: sharp outlined box with a solid colour block on the left */
.tag, .branch .abbr, .chips span { --c: var(--navy); display: inline-flex; align-items: stretch; gap: 10px; padding: 0 11px 0 0; border: 1.5px solid var(--c); border-radius: 0; font-weight: 600; letter-spacing: 0.01em; color: var(--text); white-space: nowrap; background: transparent; }
:root[data-theme="dark"] :where(.tag, .branch .abbr, .chips span, .dept) { --c: var(--muted); }   /* :where keeps this weaker than the colored .tag[data-tag] rules below */
.tag::before, .branch .abbr::before, .chips span::before { content: ""; width: 11px; background: var(--c); flex: none; }
.tag { font-size: 12.5px; line-height: 22px; }
.chips span { font-size: 13px; line-height: 24px; }
.branch .abbr { font-size: 11px; line-height: 20px; gap: 8px; padding-right: 9px; }
.branch .abbr::before { width: 9px; }
.tag[data-tag="version"] { --c: var(--t-version); }
.tag[data-tag="law"] { --c: var(--t-law); }
.tag[data-tag="world"] { --c: var(--t-world); }
.tag[data-tag="gov"] { --c: var(--t-gov); }
.tag[data-tag="court"] { --c: var(--t-court); }
.tag[data-tag="build"] { --c: var(--t-build); }

.nw { white-space: nowrap; }
@media (max-width: 520px) { .nw { white-space: normal; } }
.sec-head .more i { margin-left: 6px; font-size: 12px; }

/* news page: year tabs and compact rows */
.year-tabs { margin-top: 28px; }
.filters button:disabled { opacity: 0.4; cursor: not-allowed; }
.year-tabs + #years .year-group:first-child { margin-top: 28px; }
.rows .row { border-top: 1px solid var(--line); }
.rows .row:first-child { border-top: 0; }
.row-btn { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 112px 128px minmax(0, 1fr) 16px; gap: 14px; align-items: center; width: 100%; padding: 13px 22px; cursor: pointer; transition: background 0.12s; }
.row-btn:hover { background: var(--elev); }
.row-btn:focus-visible { outline: 3px solid var(--link); outline-offset: -3px; }
.r-date { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.r-title { font-size: 16px; font-weight: 600; line-height: 1.4; letter-spacing: -0.01em; }
.r-chev { font-size: 12px; color: var(--muted); transition: transform 0.18s; justify-self: end; }
.row-btn[aria-expanded="true"] .r-chev { transform: rotate(180deg); }
.row-btn[aria-expanded="true"] { background: var(--elev); }
.row-body { padding: 4px 22px 18px 268px; display: grid; gap: 8px; background: var(--elev); }
.row-body[hidden] { display: none; }
.row-body h3 { font-size: 17px; font-weight: 700; line-height: 1.45; letter-spacing: -0.01em; }
.row-body h3 a:hover { color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.row-body .x { color: var(--muted); font-size: 15px; max-width: 66ch; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.row-meta .read { font-size: 14px; font-weight: 600; color: var(--link); }
.row-meta .read:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 760px) {
  .row-btn { grid-template-columns: auto 1fr auto; grid-template-areas: "date tag chev" "title title title"; gap: 6px 12px; padding: 12px 16px; }
  .r-date { grid-area: date; }
  .row-btn .tag { grid-area: tag; justify-self: start; }
  .r-title { grid-area: title; }
  .r-chev { grid-area: chev; }
  .row-body { padding: 4px 16px 16px; }
}

/* Government dropdown in the navbar */
.nav-dd { display: flex; align-items: stretch; }
.nav-dd > a { padding-right: 8px; }
.dd-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; padding: 0 14px 0 4px; margin-bottom: -3px; border-bottom: 3px solid transparent; cursor: pointer; transition: background 0.12s; }
.nav-dd:hover > a:not([aria-current="page"]), .nav-dd:has(.dd-btn[aria-expanded="true"]) > a:not([aria-current="page"]) { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav-dd:hover .dd-btn, .dd-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }
.nav-dd:has(> a[aria-current="page"]):hover .dd-btn, .nav-dd:has(> a[aria-current="page"]) .dd-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.1); }
.dd-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.dd-btn i { font-size: 11px; color: var(--accent); transition: transform 0.18s; }
.dd-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.nav-dd:has(> a[aria-current="page"]) .dd-btn { background: rgba(255, 255, 255, 0.1); border-bottom-color: var(--accent); }
.dd-menu { position: fixed; z-index: 70; min-width: 250px; margin: 0; padding: 6px 0; list-style: none; background: var(--navy-deep); border: 1px solid rgba(255, 255, 255, 0.14); border-top: 3px solid var(--accent); border-radius: 0 0 6px 6px; box-shadow: 0 18px 36px -14px rgba(0, 0, 0, 0.65); }
.dd-menu[hidden] { display: none; }
.nav .dd-menu a { padding: 11px 18px; margin: 0; border-bottom: 0; white-space: nowrap; font-size: 15px; }
.nav .dd-menu a i { width: 16px; text-align: center; }
.nav .dd-menu a .ext-i { margin-left: auto; width: auto; opacity: 0.6; }

/* Government page */
.th-line { margin-top: 10px; font-size: 16px; color: rgba(255, 255, 255, 0.72); max-width: 70ch; }
.quick { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.quick .card { display: flex; flex-direction: column; }
.quick .card .go { margin-top: auto; padding-top: 14px; }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vm .card { padding: 26px 28px; display: grid; gap: 12px; align-content: start; }
.vm .card .th { font-size: 18px; font-weight: 600; color: var(--text); }
.emblem { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; align-items: start; }
.emblem-mark { display: grid; place-items: center; padding: 22px; background: var(--navy); border-radius: var(--r); border-bottom: 4px solid var(--accent); }
.emblem-mark img { width: 140px; height: 140px; }
.emblem-text { display: grid; gap: 12px; max-width: 70ch; }
.emblem-text h3 { font-size: 15px; font-weight: 700; margin-top: 8px; }
.rules { list-style: disc; margin: 0; padding-left: 20px; display: grid; gap: 8px; color: var(--soft); }
.sub { font-size: 14px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 44px 0 16px; }
.swatches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.swatch { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.swatch .chip { flex: none; width: 38px; height: 38px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12); }
.swatch b { display: block; font-size: 15px; font-weight: 600; }
.swatch small { display: block; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) {
  .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vm { grid-template-columns: 1fr; }
  .emblem { grid-template-columns: 1fr; gap: 24px; }
  .emblem-mark { width: 200px; }
}
@media (max-width: 760px) { .quick { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .quick { grid-template-columns: 1fr; } }

/* announcements table */
.table-wrap { margin-top: 28px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; padding: 12px 20px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: var(--elev); border-bottom: 1px solid var(--line-2); }
table.data td { padding: 16px 20px; vertical-align: top; border-top: 1px solid var(--line); }
table.data tbody tr:first-child td { border-top: 0; }
table.data tbody tr:hover { background: var(--elev); }
table.data[hidden] { display: none; }
.c-date { width: 150px; white-space: nowrap; }
.c-date b { display: block; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-date span { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-title .t-th { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.45; letter-spacing: -0.01em; }
.c-title .t-en { display: block; margin-top: 3px; color: var(--muted); font-size: 15px; }
.c-by { width: 290px; }
.c-doc { width: 130px; text-align: right; white-space: nowrap; }
.dept { --c: var(--navy); white-space: nowrap; display: inline-flex; align-items: stretch; gap: 10px; padding: 0 11px 0 0; border: 1.5px solid var(--c); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; color: var(--text); background: transparent; line-height: 1.6; }
.dept::before { content: ""; width: 11px; background: var(--c); flex: none; }
.filters .dept-btn::before { content: ""; display: inline-block; width: 9px; height: 9px; margin-right: 8px; background: var(--c); }
@media (max-width: 760px) {
  table.data thead { display: none; }
  table.data, table.data tbody, table.data tr, table.data td { display: block; width: auto; }
  table.data tr { padding: 14px 16px; border-top: 1px solid var(--line); }
  table.data tbody tr:first-child { border-top: 0; }
  table.data td { padding: 3px 0; border: 0; text-align: left; }
  .c-date { white-space: normal; }
  .c-date b, .c-date span { display: inline; margin-right: 10px; }
  .c-doc { padding-top: 8px; }
}

/* elections page */
.el-stats { margin-top: 36px; max-width: 720px; grid-template-columns: repeat(3, 1fr); }
.elections { display: grid; gap: 20px; margin: 28px 0 90px; max-width: 900px; }
.election { padding: 26px 30px; }
.election header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; flex-wrap: wrap; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.election h3 { margin-top: 6px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.election h3 span { color: var(--muted); font-weight: 600; }
.el-meta { text-align: right; font-variant-numeric: tabular-nums; }
.el-meta b { display: block; font-size: 15px; font-weight: 600; }
.el-meta span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.cands { list-style: none; margin: 0; padding: 0; display: grid; }
.cand { display: grid; grid-template-columns: 170px minmax(0, 1fr) 120px; gap: 18px; align-items: center; padding: 12px 0; }
.cand + .cand { border-top: 1px solid var(--line); }
.cand-name { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.cand-name .sw { width: 12px; height: 12px; border-radius: 2px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); }
.cand .crown { color: #e0a100; font-size: 13px; }
.cand-bar { height: 14px; background: var(--elev); border-radius: 3px; overflow: hidden; }
.cand-bar i { display: block; height: 100%; border-radius: 3px; }
.cand-n { text-align: right; font-variant-numeric: tabular-nums; }
.cand-n b { font-size: 15px; font-weight: 600; }
.cand-n small { margin-left: 8px; color: var(--muted); font-size: 13px; }
@media (max-width: 760px) {
  .election { padding: 20px 18px; }
  .el-meta { text-align: left; }
  .cand { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .cand-bar { grid-column: 1 / -1; order: 3; }
}

/* laws page */
.views { padding-right: 14px; margin-right: 6px; border-right: 1px solid var(--line-2); }
.c-type { width: 190px; }
.c-status { width: 150px; }
.status-chip { --c: var(--muted); display: inline-flex; align-items: stretch; gap: 10px; padding: 0 11px 0 0; border: 1.5px solid var(--c); font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.6; color: var(--text); }
.status-chip::before { content: ""; width: 11px; background: var(--c); flex: none; }
.status-chip[data-s="current"] { --c: var(--t-version); }
.status-chip[data-s="decree"] { --c: var(--t-court); }
.status-chip[data-s="replaced"] { --c: #9aa3b2; color: var(--muted); }
@media (max-width: 760px) { .views { border-right: 0; padding-right: 0; margin-right: 0; } }

/* addresses page */
.c-addr, .c-name, .c-owner { width: 33%; }
.c-addr b, .c-name b, .c-owner b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.45; }
.c-addr span, .c-name span, .c-owner span { display: block; margin-top: 3px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
@media (max-width: 760px) {
  .c-addr b, .c-name b, .c-owner b { display: inline; }
  .c-addr span, .c-name span, .c-owner span { display: block; }
  table.data td.c-name, table.data td.c-owner { padding-top: 8px; }
}
.c-addr, .c-name, .c-owner { width: 27%; }
.c-loc { width: 19%; white-space: nowrap; }
.c-loc b { display: block; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c-loc .none { color: var(--muted); font-size: 14px; }
.tp { all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; padding: 5px 10px; border: 1px solid var(--line-2); border-radius: 5px; font-size: 13px; font-weight: 600; color: var(--link); cursor: pointer; transition: background 0.12s; }
.tp:hover { background: var(--elev); }
.tp:focus-visible { outline: 3px solid var(--link); outline-offset: 1px; }
@media (max-width: 760px) { .c-loc { white-space: normal; padding-top: 8px; } .c-loc b { display: inline; margin-right: 10px; } }

/* map window on the addresses page */
.mapdlg { width: min(1180px, 96vw); height: min(88vh, 960px); max-width: none; padding: 0; border: 0; border-radius: 8px; background: var(--surface); color: var(--text); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); overflow: hidden; }
.mapdlg[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mapdlg::backdrop { background: rgba(8, 16, 34, 0.72); }
.mapdlg-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.mapdlg-head strong { display: block; font-size: 17px; letter-spacing: -0.01em; }
.mapdlg-head span { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }
.mapdlg-actions { display: flex; gap: 8px; flex: none; }
.mapdlg-actions .tp { margin-top: 0; }
.mapview { overflow: auto; background: #0b1a36; overscroll-behavior: contain; }
.mapcanvas { position: relative; width: var(--w); line-height: 0; }
.mapcanvas img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
.mapview.fit .mapcanvas { width: 100%; }
.mapview.fit .mapcanvas img { image-rendering: auto; }
.pin { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: #fff; border: 2px solid #0b1a36; opacity: 0.85; }
.pin.on { z-index: 3; width: 24px; height: 24px; margin: -12px 0 0 -12px; background: #ff2d78; border: 3px solid #fff; opacity: 1; box-shadow: 0 0 0 3px rgba(255, 45, 120, 0.45), 0 4px 14px rgba(0, 0, 0, 0.6); animation: ping 1.6s ease-out 3; }
.pin.on::after { content: attr(data-label); position: absolute; left: 50%; bottom: 150%; transform: translateX(-50%); padding: 5px 10px; border-radius: 5px; background: #fff; color: #0b1a36; font-size: 13px; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255, 45, 120, 0.7), 0 4px 14px rgba(0, 0, 0, 0.6); } 100% { box-shadow: 0 0 0 22px rgba(255, 45, 120, 0), 0 4px 14px rgba(0, 0, 0, 0.6); } }
@media (prefers-reduced-motion: reduce) { .pin.on { animation: none; } }
.tp.map { margin-left: 8px; }
.c-loc { width: 22%; }
@media (max-width: 760px) {
  .mapdlg { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .tp.map { margin-left: 0; }
}

/* map page */
.mapstage { background: var(--bg); }
.mapbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 14px 0; }
.mapbar .filters { flex: 1 1 520px; }
.mapsearch { position: relative; flex: 0 1 320px; }
.mapsearch .search { margin-left: 0; width: 100%; }
.results { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow); max-height: 340px; overflow: auto; }
.results[hidden] { display: none; }
.results button { all: unset; box-sizing: border-box; display: grid; gap: 1px; width: 100%; padding: 9px 12px; border-radius: 4px; cursor: pointer; }
.results button:hover, .results button:focus-visible { background: var(--elev); }
.results b { font-size: 14.5px; font-weight: 600; }
.results span { font-size: 13px; color: var(--muted); }
.results .none { padding: 10px 12px; font-size: 14px; color: var(--muted); }

.viewer { position: relative; height: clamp(520px, 78vh, 900px); overflow: hidden; background: #0b1a36; border-top: 4px solid var(--accent); cursor: grab; touch-action: none; user-select: none; outline: none; }
.viewer:active { cursor: grabbing; }
.viewer:focus-visible { box-shadow: inset 0 0 0 3px var(--link); }
.layer { position: absolute; inset: 0; }
.tiles img { position: absolute; max-width: none; display: block; }
.cbox { all: unset; position: absolute; box-sizing: border-box; border: 2px solid var(--accent); background: rgba(86, 204, 255, 0.07); cursor: pointer; transition: background 0.12s; }
.cbox:hover { background: rgba(86, 204, 255, 0.2); }
.cbox span { position: absolute; left: -2px; top: -2px; transform: translateY(-100%); padding: 3px 9px; background: var(--accent); color: #0b1a36; font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.4; }
.cbox.big { background: transparent; border-style: dashed; pointer-events: none; }
.cbox.big span { pointer-events: auto; }
.mpin { all: unset; position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: #fff; border: 3px solid #0b1a36; box-sizing: border-box; cursor: pointer; z-index: 2; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.mpin:hover, .mpin:focus-visible { background: #ff2d78; transform: scale(1.25); }
.mpin.on { z-index: 5; width: 22px; height: 22px; margin: -11px 0 0 -11px; background: #ff2d78; border: 3px solid #fff; }
.vcontrols { position: absolute; right: 14px; top: 14px; display: grid; gap: 6px; z-index: 10; }
.vcontrols button { all: unset; box-sizing: border-box; width: 40px; height: 40px; display: grid; place-items: center; background: var(--surface); color: var(--text); border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; font-size: 14px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.vcontrols button:hover { background: var(--elev); }
.vcontrols button:focus-visible { outline: 3px solid var(--accent); }
.vread { position: absolute; left: 12px; bottom: 12px; z-index: 10; padding: 4px 10px; border-radius: 4px; background: rgba(11, 26, 54, 0.82); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; pointer-events: none; }
.vread:empty { display: none; }
.vpop { position: absolute; z-index: 20; width: 280px; padding: 16px 18px; background: var(--surface); color: var(--text); border-radius: 8px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); cursor: default; display: grid; gap: 4px; }
.vpop[hidden] { display: none; }
.vpop b { font-size: 16px; padding-right: 22px; }
.vpop > span { font-size: 13px; color: var(--muted); }
.vpop p { margin: 6px 0 0; font-size: 15px; font-weight: 600; }
.vpop p small { display: block; color: var(--muted); font-weight: 500; font-size: 13.5px; }
.vpop .own { font-weight: 500; color: var(--soft); font-size: 14px; margin-top: 0; }
.vpop em { font-style: normal; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vpop .tp { margin: 8px 0 2px; justify-self: start; }
.pclose { all: unset; position: absolute; right: 8px; top: 6px; width: 28px; height: 28px; display: grid; place-items: center; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 4px; }
.pclose:hover { background: var(--elev); color: var(--text); }
@media (max-width: 760px) { .viewer { height: 70vh; } .mapsearch { flex-basis: 100%; } .vpop { width: 250px; } }

/* city flags */
.flag { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.22); flex: none; vertical-align: -3px; margin-right: 7px; }
.cities a .flag { margin-right: 0; }
.vpop > span { display: flex; align-items: center; }

/* selected filter, readable in dark mode */
:root[data-theme="dark"] .filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #0b1a36; }
:root[data-theme="dark"] .filters button[aria-pressed="true"] sup, :root[data-theme="dark"] .filters button[aria-pressed="true"] i { color: #0b1a36; opacity: 0.75; }
.vcontrols button[aria-pressed="false"] { opacity: 0.75; }
.vcontrols button[aria-pressed="true"]#zbox { background: var(--accent); color: #0b1a36; }
.viewer.no-outlines .cbox { display: none; }
