/*
Theme Name: Advocacy (Bricks child)
Description: Child theme for the regulator reporting template. Design lives in Bricks (theme style, variables, classes, components). This file only covers things Bricks has no control for.
Template: bricks
Version: 1.0.0
*/

/* Tables inside rich text and post content */
.brxe-text table, .brxe-post-content table { width: 100%; border-collapse: collapse; font-size: var(--text-s); margin-block: var(--space-m); }
.brxe-text th, .brxe-text td, .brxe-post-content th, .brxe-post-content td { text-align: left; vertical-align: top; padding: var(--space-xs) var(--space-s) var(--space-xs) 0; border-bottom: 1px solid var(--rule); }
.brxe-text thead th, .brxe-post-content thead th { border-bottom: 2px solid var(--ink); font-weight: 600; }
.brxe-text td.num, .brxe-text th.num, .brxe-post-content td.num, .brxe-post-content th.num { text-align: right; font-variant-numeric: tabular-nums; padding-right: 0; }

/* Wide tables scroll sideways on small screens instead of breaking the page */
.brxe-text:has(> table), .brxe-post-content:has(> table) { overflow-x: auto; }


/* ---------- Regulator Review: grades, hub, lists ---------- */
.rr-grade{display:inline-flex;align-items:center;justify-content:center;width:2rem;height:2rem;border:2px solid currentColor;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;color:var(--ink);background:#fff}
.rr-grade--sm{width:1.75rem;height:1.75rem;font-size:.95rem}
.rr-grade--lg{width:4.5rem;height:4.5rem;font-size:2.6rem;border-width:3px}
.rr-grade[data-grade="A"]{color:#1d6b3a}
.rr-grade[data-grade="B"]{color:#3b6b1d}
.rr-grade[data-grade="C"]{color:#7a5a00}
.rr-grade[data-grade="D"]{color:#9a4a00}
.rr-grade[data-grade="E"],.rr-grade[data-grade="F"]{color:#a1121f}
.rr-grade--none{color:var(--muted)}
.rr-verdict{display:flex;gap:var(--space-s,1rem);align-items:center;background:#fff;color:var(--ink);padding:var(--space-s,1rem);max-width:26rem}
.rr-verdict__text p{margin:0}
.rr-verdict__label{font-weight:700;font-size:var(--text-s,.9rem);text-transform:uppercase;letter-spacing:.06em}
.rr-verdict__summary{margin-top:.25rem!important;line-height:1.4}
.rr-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:var(--space-l,2rem);align-items:end;width:100%}
@media (max-width:767px){.rr-head{grid-template-columns:1fr}}
.rr-c{text-align:center;width:5rem}
.rr-table td,.rr-table th,.rr-criteria td,.rr-criteria th{vertical-align:top}
.rr-table th a{font-weight:700}
.rr-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr));gap:var(--space-s,1rem)}
.rr-card__link{display:flex;flex-direction:column;gap:.35rem;height:100%;padding:var(--space-s,1rem);border:1px solid var(--rule);border-top:3px solid var(--accent);background:#fff;color:var(--ink);text-decoration:none}
.rr-card__link:hover .rr-card__title{text-decoration:underline}
.rr-card__title{font-weight:700;font-size:var(--text-l,1.15rem)}
.rr-card__text{color:var(--muted);font-size:var(--text-s,.95rem);line-height:1.45}
.rr-posts{list-style:none;margin:0;padding:0;border-top:2px solid var(--ink)}
.rr-post{display:grid;grid-template-columns:8rem minmax(0,1fr);gap:var(--space-s,1rem);padding:var(--space-s,1rem) 0;border-bottom:1px solid var(--rule)}
@media (max-width:600px){.rr-post{grid-template-columns:1fr;gap:.25rem}}
.rr-post__date{font-size:var(--text-s,.9rem);color:var(--muted);font-variant-numeric:tabular-nums;padding-top:.2rem}
.rr-post__title{font-weight:700;font-size:var(--text-l,1.1rem)}
.rr-post__text{margin:.3rem 0 0;color:var(--muted)}
.rr-sources{margin:0;padding-left:1.1rem}
.rr-sources li{margin:.3rem 0}
.rr-sources__pub{color:var(--muted);font-size:var(--text-s,.9rem)}
.rr-facts{font-size:var(--text-s,.9rem)}
.rr-facts a{color:inherit}
.rr-post__reg{display:block;font-size:var(--text-s,.85rem);font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--accent)}
.rr-table,.rr-criteria{width:100%}
.rr-table td:last-child,.rr-criteria td:last-child{color:var(--muted)}
.home-head .rr-verdict,.home-head .rr-verdict p{color:var(--ink)}
.home-head .rr-verdict .rr-grade--none{color:var(--muted)}
.rr-post > div{display:flex;flex-direction:column;gap:.3rem}
.rr-post__text{margin:0}
.hp-wrap > .brxe-text{width:100%}
@media (max-width:600px){.rr-table thead{display:none}.rr-table tr{display:grid;grid-template-columns:1fr auto;gap:.25rem .75rem;padding:.6rem 0;border-bottom:1px solid var(--rule)}.rr-table th,.rr-table td{border:0!important;padding:0!important;background:none!important}.rr-table td:nth-child(2){grid-row:2}.rr-table td.rr-c{grid-column:2;grid-row:1/3;width:auto}.rr-table td:last-child{grid-column:1/3}}

/* Regulator pages: wide report layout */
.single-regulator .home-body__article{max-width:none;width:100%}
.single-regulator .home-body__article .brxe-post-content > p,.single-regulator .home-body__article .brxe-post-content > ul,.single-regulator .home-body__article .brxe-post-content > ol,.single-regulator .home-body__article .brxe-post-content > blockquote{max-width:80ch}
.single-regulator .brxe-post-content .wp-block-table{overflow-x:auto;margin-left:0;margin-right:0}
.single-regulator .brxe-post-content table{width:100%}
.single-regulator .brxe-post-content td,.single-regulator .brxe-post-content th{vertical-align:top}
