/*
BMBL Updates (Resources > BMBL Updates). Ported from the BMBL Edition Changes
artifact and re-skinned with the theme's tokens. Everything is scoped under
.bmbl so it can't leak into other pages. The status colors (del/ins/mov, the
reflected/partly/not ratings) are deliberately fixed: they carry meaning in
the redline and rating UIs.
*/

.bmbl {
	--b-bg: var(--wp--preset--color--background);
	--surface: #fbfafa;
	--ink: var(--wp--preset--color--text);
	--muted: color-mix(in srgb, var(--wp--preset--color--text) 64%, transparent);
	--line: var(--wp--custom--divider);
	--accent: var(--wp--preset--color--accent-700);
	--accent-soft: var(--wp--preset--color--accent-200);
	--del: #a3261b; --del-bg: #fbe7e4;
	--ins: #1d6b3a; --ins-bg: #e2f3e7;
	--mov: #7a5a00; --mov-bg: #fbf1d6;
	--yes: #1d6b3a; --part: #8a6100; --no: #a3261b; --oth: #4a4f8a;
	--f-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color: var(--ink);
	font-size: 15px;
	line-height: 1.55;
}
.bmbl *, .bmbl *::before, .bmbl *::after { box-sizing: border-box; }

/* — shell — */
.bmbl-head { display: flex; flex-direction: column; gap: 10px; padding-bottom: 28px; }
.bmbl-head p { margin: 0; }
.bmbl-head .kicker { margin-bottom: 0; }
.bmbl-head .kicker a { color: inherit; text-decoration: none; }
.bmbl-head .kicker a:hover { text-decoration: underline; }
.bmbl-sub { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bmbl-title { margin: 0; font-size: clamp(26px, 4vw, 40px); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; max-width: 26em; }
.bmbl-lede { max-width: 80ch; }

.bmbl-tabs {
	position: sticky;
	top: var(--bmbl-hdr, 0px);
	z-index: 5;
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	background: var(--b-bg);
	border-bottom: 1px solid var(--line);
	margin-bottom: 28px;
}
.bmbl-tabs a {
	flex: none;
	text-decoration: none;
	color: var(--muted);
	font-weight: 600;
	font-size: 14px;
	padding: 11px 12px;
	border-bottom: 3px solid transparent;
}
.bmbl-tabs a:hover { color: var(--ink); }
.bmbl-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* — type — */
.bmbl h2 { font-size: 24px; line-height: 1.2; margin: 0; font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }
.bmbl h3 { font-size: 17px; line-height: 1.25; margin: 0; font-weight: 600; letter-spacing: 0; }
.bmbl p { margin: 0; max-width: 72ch; }
.bmbl a { color: var(--accent); }
.bmbl a:hover { color: var(--wp--preset--color--accent-800); }
.bmbl .eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bmbl .lede { font-size: 17px; max-width: 70ch; }
.bmbl .small { font-size: 13px; }
.bmbl .muted { color: var(--muted); }
.bmbl .mono { font-family: var(--f-mono); font-size: 12.5px; }
.bmbl .num { font-variant-numeric: tabular-nums; }
.bmbl .stack { display: flex; flex-direction: column; gap: 14px; }
.bmbl ul.tight { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; max-width: 75ch; }
.bmbl :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bmbl section[hidden] { display: none; }
.bmbl-view { gap: 26px; }
.bmbl-view > .stack, .bmbl-view > section.stack { gap: 14px; }
.bmbl .stack > *, .bmbl .grid2 > * { margin-block: 0; } /* undo core flow-layout margins */

/* — panels — */
.bmbl .card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 2px;
	padding: 18px;
	box-shadow: 0 1px 2px color-mix(in srgb, var(--wp--preset--color--neutral-900) 10%, transparent);
}
.bmbl .grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.bmbl .grid2 > * { min-width: 0; }
.bmbl .challenge { border-left: 4px solid var(--part); background: var(--surface); padding: 14px 16px; border-radius: 0 2px 2px 0; }

/* — bars, legends, pills — */
.bmbl .bar { display: flex; height: 12px; border-radius: 2px; overflow: hidden; background: var(--line); }
.bmbl .bar span { display: block; height: 100%; }
.bmbl .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.bmbl .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.bmbl .pill { display: inline-block; font-family: var(--f-mono); font-size: 11.5px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; font-weight: 500; }
.bmbl .k-explicit { color: var(--del); } .bmbl .k-implied { color: var(--oth); }
.bmbl .b-capital { color: var(--del); } .bmbl .b-recurring { color: var(--accent); } .bmbl .b-one-time { color: var(--oth); } .bmbl .b-relief { color: var(--yes); } .bmbl .b-none { color: var(--muted); }
.bmbl .r-yes { color: var(--yes); } .bmbl .r-partly { color: var(--part); } .bmbl .r-no { color: var(--no); } .bmbl .r-other { color: var(--oth); }
.bmbl .v-verified { color: var(--yes); } .bmbl .v-unverified { color: var(--no); } .bmbl .v-inferred { color: var(--oth); }
.bmbl .kind { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }

/* — controls — */
.bmbl .filters, .bmbl .vtools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bmbl .seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--surface); }
.bmbl .seg button { border: 0; background: transparent; color: var(--muted); font-weight: 600; font-size: 13px; line-height: 1.2; font-family: inherit; padding: 8px 12px; cursor: pointer; }
.bmbl .seg button:hover { color: var(--ink); }
.bmbl .seg button[aria-pressed="true"] { background: var(--accent-soft); color: var(--ink); }
.bmbl button.btn, .bmbl select, .bmbl input[type=search] {
	font-weight: 500; font-size: 14px; line-height: 1.3; font-family: inherit; color: var(--ink); background: var(--surface);
	border: 1px solid var(--line); border-radius: 2px; padding: 7px 10px;
}
.bmbl button.btn { cursor: pointer; }
.bmbl select { max-width: 100%; }

/* — change / evidence lists — */
.bmbl .change { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px 0; border-top: 1px solid var(--line); }
.bmbl .change:first-child { border-top: 0; }
.bmbl .change .head { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.bmbl .ev { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.bmbl .ev li { font-size: 13.5px; color: var(--muted); padding-left: 10px; border-left: 2px solid var(--line); }
.bmbl .ev b { font-family: var(--f-mono); font-weight: 500; color: var(--ink); font-size: 12px; margin-right: 6px; }

/* — tables — */
.bmbl .tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.bmbl table { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 0; }
.bmbl th, .bmbl td { text-align: left; vertical-align: top; padding: 9px 11px; border: 0; border-top: 1px solid var(--line); }
.bmbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-top: 0; background: var(--surface); position: sticky; top: 0; font-weight: 600; }
.bmbl tbody tr:hover { background: transparent; }
.bmbl td.ask { color: var(--muted); min-width: 180px; }
.bmbl td.evd { min-width: 240px; }

/* — redline viewer — */
.bmbl .vmeta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); }
.bmbl .redline { background: var(--surface); border: 1px solid var(--line); border-radius: 2px; padding: 6px 0; font-size: 14.5px; }
.bmbl .op { padding: 6px 16px 6px 12px; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; border-left: 3px solid transparent; }
.bmbl .op .pg { font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); padding-top: 3px; white-space: nowrap; }
.bmbl .op.del { border-left-color: var(--del); } .bmbl .op.ins { border-left-color: var(--ins); } .bmbl .op.mod { border-left-color: var(--accent); }
.bmbl .op.del .t { color: var(--del); text-decoration: line-through; text-decoration-thickness: 1px; }
.bmbl .op.ins .t { color: var(--ins); }
.bmbl .op .rel { display: inline-block; margin-top: 3px; font-size: 12px; color: var(--mov); background: var(--mov-bg); padding: 0 6px; border-radius: 4px; text-decoration: none; }
.bmbl del.w { background: var(--del-bg); color: var(--del); text-decoration-thickness: 1px; }
.bmbl ins.w { background: var(--ins-bg); color: var(--ins); text-decoration: none; }
.bmbl .eqrun { padding: 4px 16px 4px 12px; display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; color: var(--muted); }
.bmbl .eqrun button { justify-self: start; border: 1px dashed var(--line); background: transparent; color: var(--muted); font-weight: 500; font-size: 12.5px; line-height: 1.3; font-family: inherit; padding: 3px 9px; border-radius: 2px; cursor: pointer; }
.bmbl .eqrun .t { color: var(--muted); }
.bmbl .hit { padding: 9px 0; border-top: 1px solid var(--line); display: grid; gap: 3px; }
.bmbl .hit:first-child { border-top: 0; }
.bmbl mark { background: var(--mov-bg); color: inherit; }
@media (max-width: 560px) { .bmbl .op, .bmbl .eqrun { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* — digest theme cards — */
.bmbl .th { display: flex; align-items: center; gap: 10px; }
.bmbl .badge { flex: none; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 2px; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.bmbl .ico { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bmbl .ico-s { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bmbl .ctas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 4px; }
.bmbl a.cta { display: inline-flex; align-items: center; gap: 7px; background: var(--c); color: #fff; text-decoration: none; font-weight: 600; font-size: 13.5px; line-height: 1.2; font-family: inherit; padding: 8px 12px; border-radius: 2px; }
.bmbl a.cta:hover { filter: brightness(1.1); color: #fff; }
.bmbl a.cta:focus-visible { outline-color: var(--ink); }
.bmbl #v-digest .grid2 > .card { display: flex; flex-direction: column; }

/* — law & policy — */
.bmbl .flag { font-family: var(--f-mono); font-size: 11.5px; color: var(--no); overflow-wrap: anywhere; }
.bmbl table.mx th[scope=row] { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--ink); position: static; min-width: 220px; font-weight: 600; }
.bmbl table.mx th[scope=row] a { color: var(--ink); text-decoration: none; }
.bmbl table.mx td.c, .bmbl table.mx th.c { text-align: center; width: 64px; min-width: 56px; padding-inline: 4px; }
.bmbl .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; vertical-align: middle; }
.bmbl .dot.t1 { background: var(--del); }
.bmbl .dot.t2 { background: linear-gradient(90deg, var(--part) 50%, transparent 50%); border: 2px solid var(--part); width: 13px; height: 13px; }
.bmbl .dot.t3 { border: 2px solid var(--oth); }
.bmbl .dot.t4 { width: 10px; height: 2px; border-radius: 1px; background: var(--muted); }
.bmbl .dot.na { display: none; }
@media (max-width: 640px) {
	.bmbl table.mx th[scope=row] { min-width: 140px; font-size: 12.5px; }
	.bmbl table.mx th[scope=row] .small { display: none; }
	.bmbl table.mx td.c, .bmbl table.mx th.c { width: 40px; min-width: 38px; }
	.bmbl table.mx th.c .muted { display: block; font-size: 10px; }
}
.bmbl .t1 { color: var(--del); } .bmbl .t2 { color: var(--part); } .bmbl .t3 { color: var(--oth); } .bmbl .t4 { color: var(--muted); }
.bmbl td.na { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); }
.bmbl .tlegend { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.bmbl .tlegend i.sw { display: inline-block; width: 22px; text-align: center; font-style: normal; }
.bmbl .tlegend i.na { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--line) 6px 7px); height: 12px; vertical-align: -1px; margin-right: 4px; }
.bmbl .tlegend > span { display: flex; gap: 6px; align-items: baseline; }
.bmbl .tlegend b { color: var(--ink); font-weight: 600; }
.bmbl .meta { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.bmbl .tiers { display: flex; flex-wrap: wrap; gap: 6px; }
.bmbl .pill.tp.t1, .bmbl .pill.tp.t2, .bmbl .pill.tp.t3, .bmbl .pill.tp.t4 { font-size: 11px; }
.bmbl .read { border-left: 3px solid var(--accent); padding-left: 10px; }
.bmbl .read .kind { display: block; margin-bottom: 2px; }
.bmbl ol.tw { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; max-width: 78ch; }
.bmbl ol.tw b { display: inline-block; min-width: 44px; color: var(--accent); }
.bmbl #v-law article.card { scroll-margin-top: 130px; }
.bmbl #v-law > section.stack { gap: 14px; }

@media (prefers-reduced-motion: reduce) { .bmbl * { scroll-behavior: auto !important; } }
