/* PricePulse BD — brand: the Bangladesh flag (bottle green #006a4e, red disc #f42a41).
   Flag green/red stay on the page chrome only: data marks keep the validated
   colour-blind-safe palette, because red-vs-green is the pair colour-blind readers
   can't separate. */
:root {
  color-scheme: light;
  --font-bn: "Noto Sans Bengali", "Nirmala UI", system-ui, sans-serif;
  --page: #f9f9f7; --surface: #fcfcfb; --ink: #0b0b0b; --ink2: #52514e; --muted: #898781;
  --grid: #e1e0d9; --axis: #c3c2b7; --border: rgba(11, 11, 11, .10); --wash: rgba(11, 11, 11, .04);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4;
  --up: #e34948; --down: #2a78d6; --context: #c3c2b7;
  --div-down: #1c5cab; --div-mid: #f0efec; --div-up: #c03535;
  --green: #006a4e; --green-deep: #004d38; --green-press: #006a4e; --green-ink: #006a4e;
  --red: #f42a41; --red-ink: #d91e36;
  --on-hero: #ffffff; --on-hero2: #d7ebe4;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Bengali", "Nirmala UI", "Hind Siliguri", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d0d0d; --surface: #1a1a19; --ink: #f0efec; --ink2: #c3c2b7; --muted: #898781;
    --grid: #2c2c2a; --axis: #383835; --border: rgba(255, 255, 255, .10); --wash: rgba(255, 255, 255, .05);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181;
    --up: #e66767; --down: #3987e5; --context: #52514e;
    --div-down: #5598e7; --div-mid: #383835; --div-up: #e66767;
    --green-press: #0b7a58; --green-ink: #4cc49a; --red-ink: #f45a6c;
  }
}
html:lang(bn) { --font: var(--font-bn); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 56px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 16px/1.5 var(--font); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.hero :focus-visible, footer :focus-visible { outline-color: #fff; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--green) 0%, var(--green-deep) 100%); color: var(--on-hero); padding: 14px 0 26px; }
.hero > .wrap { position: relative; z-index: 1; }
/* the red disc of the flag, as a rising sun behind the headline */
.sun { position: absolute; z-index: 0; width: 300px; height: 300px; border-radius: 50%; background: var(--red);
       right: max(-80px, calc((100vw - 1080px) / 2 - 20px)); top: -142px; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--red); }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 18px; letter-spacing: .2px; }
.brand .mark { flex: none; }
.brand b { font-weight: 700; }
.lang { display: flex; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; overflow: hidden; background: var(--green-deep); }
.lang button { background: none; border: 0; padding: 5px 13px; color: var(--on-hero); cursor: pointer; font-size: 14px; }
.lang button[aria-pressed="true"] { background: #fff; color: var(--green); font-weight: 700; }
.hero h1 { font-size: clamp(26px, 5vw, 40px); line-height: 1.15; font-weight: 700; letter-spacing: -.3px; }
.hero-sub { color: var(--on-hero2); font-size: 14px; margin-top: 8px; max-width: 62ch; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.tile { background: rgba(0, 50, 36, .55); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(6px); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.tile .t-label { font-size: 13px; color: var(--on-hero2); }
.tile .t-value { font-size: 30px; font-weight: 650; line-height: 1.2; margin-top: 2px; }
.tile .t-sub { font-size: 13px; color: var(--on-hero2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .t-sub .up { color: #f2a3a2; } .tile .t-sub .down { color: #9ec5f4; }
.tile svg { display: block; margin-top: 6px; width: 100%; height: 26px; }

/* ---------- tabs ---------- */
.tabs { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--border); }
.tabs-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-row::-webkit-scrollbar { display: none; }
.tabs a { padding: 13px 12px; color: var(--ink2); text-decoration: none; font-size: 15px; white-space: nowrap; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--red); font-weight: 600; }

/* ---------- sections ---------- */
section { padding: 34px 0 6px; }
h2 { font-size: 22px; font-weight: 700; letter-spacing: -.2px; margin-bottom: 12px; }
main h2 { display: flex; align-items: center; gap: 10px; }
main h2::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 18%, transparent); }
h3 { font-size: 16px; font-weight: 650; }
.lede, .hint, .note, .sub { color: var(--ink2); font-size: 14px; }
.lede { margin: -6px 0 14px; max-width: 70ch; }
.hint { margin-top: 8px; color: var(--muted); }
.note { margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; min-width: 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two .card { margin-bottom: 0; }
.error { background: #fdecec; color: #7a1616; border-radius: 10px; padding: 10px 14px; margin-top: 16px; font-size: 14px; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
#search { flex: 1 1 220px; min-width: 0; padding: 9px 12px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface); }
.sort { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink2); }
.sort select { padding: 8px 10px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface); max-width: 60vw; }
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip, .seg button, .more { border: 1px solid var(--axis); background: var(--surface); border-radius: 999px; padding: 6px 13px; font-size: 14px; cursor: pointer; white-space: nowrap; color: var(--ink2); }
.chip:hover, .seg button:hover, .more:hover { background: var(--wash); color: var(--ink); }
.chip[aria-pressed="true"], .seg button[aria-pressed="true"] { background: var(--green-press); border-color: var(--green-press); color: #fff; font-weight: 600; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.seg.small button { padding: 4px 11px; font-size: 13px; }
.more { display: block; margin: 12px auto 0; }

/* ---------- price table ---------- */
.table-card { padding: 4px 0; overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-weight: 500; font-size: 13px; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--grid); white-space: nowrap; }
td { padding: 10px 12px; border-bottom: 1px solid var(--grid); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
#price-body tr { cursor: pointer; }
#price-body tr:hover, #price-body tr:focus-visible { background: var(--wash); }
tr.cat-row td { background: var(--wash); font-size: 12px; font-weight: 600; color: var(--ink2); letter-spacing: .4px; text-transform: uppercase; padding: 6px 12px; cursor: default; }
.i-name { font-weight: 550; }
.i-unit { color: var(--muted); font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--up); color: var(--ink); margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.badge::before { content: "▲"; color: var(--up); font-size: 10px; }
.chg { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.chg i { font-style: normal; font-size: 10px; }
.chg.up i { color: var(--up); } .chg.down i { color: var(--down); } .chg.flat { color: var(--muted); }
.spark { display: block; width: 84px; height: 24px; }
.empty { padding: 18px; color: var(--muted); text-align: center; }

/* ---------- alerts ---------- */
.alert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.alert { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: left; width: 100%; }
.alert:hover { background: var(--wash); }
.alert .a-name { font-weight: 600; }
.alert .a-pct { font-size: 24px; font-weight: 650; margin: 2px 0; display: flex; align-items: baseline; gap: 6px; }
.alert .a-pct i { font-style: normal; font-size: 14px; color: var(--up); }
.alert .a-meta { font-size: 13px; color: var(--ink2); }
.alert .live { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; float: right; }
.alert .live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--up); }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; height: 280px; margin-top: 6px; }
.chart.tall { height: 300px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; touch-action: pan-y; }
.chart text { font: 12px var(--font); fill: var(--ink2); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .cross { stroke: var(--ink2); stroke-width: 1; }
.chart .end { fill: var(--ink); font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--ink2); margin: 8px 0 2px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; }
.k-line { width: 16px; height: 0; border-top: 2px solid; }
.k-dots { width: 16px; height: 0; border-top: 2px dotted; }
.k-rect { width: 14px; height: 10px; border-radius: 2px; }
.k-dot { width: 10px; height: 10px; border-radius: 50%; }
.k-ring { width: 10px; height: 10px; border-radius: 50%; border: 2px solid; background: var(--surface); }

/* lollipop rows (HTML, so labels wrap and rows are focusable) */
.lp-row { display: grid; grid-template-columns: minmax(96px, 34%) 1fr 58px; align-items: center; gap: 10px; padding: 5px 4px; border-radius: 6px; font-size: 14px; }
.lp-row:hover, .lp-row:focus-visible { background: var(--wash); }
.lp-label { color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-track { position: relative; height: 16px; }
.lp-zero { position: absolute; top: -5px; bottom: -5px; width: 1px; background: var(--axis); }
.lp-bar { position: absolute; top: 7px; height: 2px; opacity: .55; border-radius: 2px; }
.lp-dot { position: absolute; top: 3px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.lp-dot.hollow { background: var(--surface) !important; border: 2px solid; }
.lp-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 550; }
.lp.wide .lp-row { grid-template-columns: minmax(150px, 48%) 1fr 52px; }
.lp.wide .lp-label { white-space: normal; }

/* festivals */
.countdown { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cd { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.cd b { display: block; font-size: 20px; font-weight: 650; }
.cd span { color: var(--ink2); font-size: 13px; }

/* forecast */
.lead-card { border-left: 4px solid var(--red); }
.lead { font-size: clamp(20px, 3.4vw, 28px); font-weight: 700; line-height: 1.25; letter-spacing: -.2px; }
.mini-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.mini { background: var(--wash); border-radius: 10px; padding: 10px; text-align: center; }
.mini b { display: block; font-size: 20px; font-weight: 650; }
.mini span { font-size: 12px; color: var(--ink2); }

/* data tables */
details.data { margin-top: 10px; font-size: 14px; }
details.data summary { cursor: pointer; color: var(--green-ink); width: fit-content; }
.table-scroll { max-height: 260px; overflow: auto; margin-top: 8px; border: 1px solid var(--grid); border-radius: 10px; }
.table-scroll table { font-size: 13px; }
.table-scroll th { position: sticky; top: 0; background: var(--surface); }
.table-scroll td, .table-scroll th { padding: 6px 10px; }

/* dialog */
dialog { border: 0; border-radius: 18px; padding: 18px; width: min(760px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
dialog::backdrop { background: rgba(10, 23, 38, .55); }
.d-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.d-head h2 { margin-bottom: 0; font-size: 20px; }
.close { border: 0; background: var(--wash); width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; flex: none; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 14px 0; }
.d-stat { background: var(--wash); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.d-stat span { display: block; font-size: 12px; color: var(--ink2); }
.d-stat b { font-size: 17px; font-weight: 650; white-space: nowrap; }
.fc-box { margin-top: 12px; border: 1px solid var(--grid); border-radius: 12px; padding: 12px; }
.fc-box h3 { font-size: 15px; margin-bottom: 8px; }
.fc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.fc-cell { background: var(--wash); border-radius: 10px; padding: 8px; text-align: center; min-width: 0; }
.fc-cell span { display: block; font-size: 12px; color: var(--ink2); }
.fc-cell b { font-size: 15px; font-weight: 650; white-space: nowrap; }

/* tooltip */
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); padding: 8px 10px; font-size: 13px; max-width: 260px; }
.tip .tip-h { color: var(--ink2); margin-bottom: 4px; }
.tip .tip-r { display: flex; align-items: center; gap: 8px; }
.tip .tip-r i { width: 12px; height: 0; border-top: 2px solid; flex: none; }
.tip .tip-r b { font-weight: 650; font-variant-numeric: tabular-nums; }
.tip .tip-r span { color: var(--ink2); }

footer { margin-top: 44px; padding: 24px 0 36px; background: var(--green-deep); color: var(--on-hero2); font-size: 13px; border-top: 4px solid var(--red); }
.foot-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.foot-brand svg { border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35); }
footer p + p { margin-top: 4px; }

@media (max-width: 760px) {
  .sun { width: 200px; height: 200px; right: -60px; top: -96px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .two { grid-template-columns: 1fr; }
  .two .card { margin-bottom: 14px; }
  .tile .t-value { font-size: 26px; }
}
@media (max-width: 600px) {
  .hide-s { display: none; }
  td, th { padding: 10px 10px; }
  .d-stats, .fc-grid { grid-template-columns: 1fr 1fr; }
  .lp-row { grid-template-columns: minmax(90px, 40%) 1fr 52px; gap: 8px; font-size: 13px; }
  dialog { padding: 14px; }
  .chart { height: 240px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- shared bits ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h3.mt { margin-top: 18px; }
a.tile { color: inherit; text-decoration: none; display: block; transition: background .15s; }
a.tile:hover { background: rgba(0, 40, 28, .75); }
a.tile .t-label::after { content: " →"; opacity: .7; }
select.add { padding: 8px 10px; border: 1px dashed var(--axis); border-radius: 10px; background: var(--surface); color: var(--ink2); max-width: 100%; }

/* ---------- my bazaar ---------- */
.basket-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 14px; align-items: start; }
.basket-grid .card { margin-bottom: 0; }
.b-table td { padding: 7px 8px; }
.b-table th { padding: 8px; }
.b-table .i-unit { font-size: 12px; }
.qty { display: inline-flex; align-items: center; gap: 4px; }
.qty input { width: 64px; padding: 6px 8px; border: 1px solid var(--axis); border-radius: 8px; background: var(--surface); text-align: right; font-variant-numeric: tabular-nums; }
.qty button, .rm { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--axis); background: var(--surface); cursor: pointer; line-height: 1; color: var(--ink2); flex: none; }
.qty button:hover, .rm:hover { background: var(--wash); color: var(--ink); }
.rm { border-color: transparent; font-size: 18px; }
.b-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.b-actions .more { margin: 0; }
.b-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.b-tile { background: var(--wash); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.b-tile span { display: block; font-size: 12px; color: var(--ink2); }
.b-tile b { display: block; font-size: 22px; font-weight: 650; line-height: 1.25; }
.b-tile i { font-style: normal; font-size: 13px; color: var(--ink2); }
.b-tile .delta-up { color: var(--red-ink); font-weight: 600; } .b-tile .delta-down { color: var(--green-ink); font-weight: 600; }
.segbar { display: flex; gap: 2px; height: 28px; margin: 8px 0 6px; }
.segbar > div { position: relative; border-radius: 4px; min-width: 3px; display: flex; align-items: center; padding-left: 6px; font-size: 12px; font-weight: 600; color: #fff; overflow: hidden; white-space: nowrap; cursor: default; }
.segbar > div.dark-text { color: #0b0b0b; }

/* ---------- compare ---------- */
.cmp-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0 2px; }
.cmp-controls .seg { margin: 0; }
.legend .rm-key { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--grid); border-radius: 999px; padding: 2px 4px 2px 10px; }
.legend .rm-key button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 16px; line-height: 1; padding: 0 4px; }
.legend .rm-key button:hover { color: var(--ink); }

/* ---------- heatmap ---------- */
.heat-scroll { overflow-x: auto; margin-top: 8px; }
.heat { display: grid; gap: 2px; min-width: 520px; font-size: 12px; }
.heat .hl { color: var(--ink2); padding-right: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; align-self: center; }
.heat .hm { color: var(--muted); text-align: center; font-size: 11px; height: 16px; }
.heat .c { height: 22px; border-radius: 3px; cursor: pointer; }
.heat .c:hover, .heat .c:focus-visible { outline: 2px solid var(--ink); outline-offset: -1px; }
.heat .c.na { background: repeating-linear-gradient(45deg, transparent 0 3px, var(--grid) 3px 4px); cursor: default; }
.heat-legend { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink2); margin-top: 8px; }
.heat-legend .bar { width: 160px; height: 10px; border-radius: 3px; }

/* ---------- festival path ---------- */
.path-box { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--grid); }
.lp-row.sel { background: var(--wash); box-shadow: inset 3px 0 0 var(--green-ink); }

/* ---------- dialog extras ---------- */
.d-btns { display: flex; gap: 8px; align-items: center; flex: none; }
.share { border: 1px solid var(--axis); background: var(--surface); border-radius: 999px; padding: 6px 14px; cursor: pointer; font-size: 14px; color: var(--ink); }
.share:hover { background: var(--wash); }
.season-box { margin-top: 12px; border: 1px solid var(--grid); border-radius: 12px; padding: 12px; }
.season-box h3 { font-size: 15px; margin-bottom: 4px; }
.season { position: relative; width: 100%; height: 130px; margin-top: 6px; }
.season svg { display: block; width: 100%; height: 100%; overflow: visible; }
.season text { font: 11px var(--font); fill: var(--ink2); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; background: var(--ink); color: var(--surface); padding: 8px 16px; border-radius: 999px; font-size: 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

@media (max-width: 860px) {
  .basket-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .b-tiles { grid-template-columns: 1fr 1fr; }
  .b-tile:first-child { grid-column: 1 / -1; }
  .b-tile b { font-size: 19px; }
  .qty input { width: 54px; }
  .heat { min-width: 0; }
}
.k-sq { width: 12px; height: 12px; border-radius: 3px; }

/* ---------- Bazardor additions (Mohd Imtiaz Karim) ---------- */
.hero h1 .by { display: inline-block; vertical-align: middle; font-size: .5em; font-weight: 700; letter-spacing: 0;
  background: var(--red); color: #fff; padding: 3px 12px; border-radius: 999px; margin-left: 4px; }
.dev { display: inline-flex; align-items: center; gap: 12px; margin: 12px 0 2px; padding: 8px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .7); font-size: 15px; font-weight: 700;
  color: #fff; max-width: 100%; backdrop-filter: blur(4px); }
.dev strong { color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.dev .role { padding-left: 10px; border-left: 2px solid var(--red); color: var(--on-hero2); font-weight: 700; }
.dev-photo { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; background: var(--green-deep); }
.dev-text { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; min-width: 0; }
.star { background: none; border: 0; padding: 0 6px 0 0; font-size: 17px; line-height: 1; cursor: pointer; color: var(--muted); vertical-align: -1px; }
.star.on { color: var(--s4); }
.star:hover { color: var(--s4); }
.cat-row.watch-row td { color: var(--s4); }
.star-btn.on { border-color: var(--s4); color: var(--ink); background: color-mix(in srgb, var(--s4) 16%, var(--surface)); }
.tools-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tools-row .more { margin: 0; }
.dist-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 12px; }
.dist-controls .sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink2); }
.dist-controls select { padding: 8px 10px; border: 1px solid var(--axis); border-radius: 10px; background: var(--surface); max-width: 62vw; }
.dist-big { margin: 10px 0 12px; padding: 12px 14px; border-radius: 12px; background: var(--wash); font-size: 15px; }
.dist-big p + p { margin-top: 4px; }
.dist-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dist-table th { text-align: left; font-weight: 600; color: var(--ink2); font-size: 13px; padding: 6px 6px; border-bottom: 1px solid var(--grid); }
.dist-table td { padding: 7px 6px; border-bottom: 1px solid var(--grid); vertical-align: top; }
.dist-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dist-table tbody tr { cursor: pointer; }
.dist-table tbody tr:hover, .dist-table tr.sel { background: var(--wash); }
.dist-table tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--s2); }
#districts .two .card { min-width: 0; }
.foot-link { color: #fff; }
.foot-credit { opacity: .85; }
@media (max-width: 639px) {
  .dev { font-size: 13px; padding: 7px 10px; gap: 10px; }
  .dev strong { font-size: 15px; }
  .dev-photo { width: 42px; height: 42px; }
  .dev .role { padding-left: 0; border-left: 0; }
}
#districts .table-scroll { max-height: 540px; margin-top: 10px; }
@media (max-width: 639px) {
  .d-head { flex-wrap: wrap; row-gap: 10px; }
  .d-head > div:first-child { flex: 1 1 100%; order: 2; }
  .d-btns { order: 1; width: 100%; justify-content: flex-end; flex-wrap: wrap; }
}
