/* Ficha da Instituição — a calm, data-first look: navy ink, one confident blue, white register cards on a cool paper
   grey, IBM Plex (OFL, self-hosted). The "ficha cadastral" identity lives in the small mono labels and the boxed facts. */
@font-face { font-family: "Plex Sans"; src: url(/assets/fonts/plex-sans.woff2) format("woff2"); font-weight: 100 700; font-display: swap; }
@font-face { font-family: "Plex Serif"; src: url(/assets/fonts/plex-serif-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/assets/fonts/plex-mono-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Plex Mono"; src: url(/assets/fonts/plex-mono-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
:root {
  --bg: #f3f5f9; --card: #fff; --ink: #0f1b2e; --ink-2: #26344b; --muted: #5d6879; --faint: #8a94a5;
  --line: #e1e6ee; --line-2: #eef1f6;
  --navy: #0f1f3d; --navy-2: #172c55;
  --accent: #1f5fbf; --accent-2: #174b99; --accent-soft: #eaf1fc; --accent-line: #c8d9f4;
  --good: #1b7a45; --good-soft: #e7f5ec; --warn: #9a5b05; --warn-soft: #fdf3e2; --bad: #b42323; --bad-soft: #fcebeb;
  --gold: #e8a33b;
  --r: 12px; --r-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 6px 20px rgba(15, 27, 46, .05);
  --shadow-lg: 0 2px 4px rgba(15, 27, 46, .06), 0 16px 40px rgba(15, 27, 46, .10);
  --display: "Plex Serif", Georgia, "Times New Roman", serif;
  --body: "Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Plex Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 160px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.62 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.18; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-family: var(--display); font-size: clamp(28px, 4.4vw, 42px); letter-spacing: -.01em; }
h2 { font-size: 22px; font-weight: 650; letter-spacing: -.005em; }
h3 { font-size: 17px; font-weight: 650; }
p { margin: 0; max-width: 72ch; }
ul, ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
li { max-width: 72ch; }
code, .mono { font-family: var(--mono); font-size: .92em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 99; }
.muted { color: var(--muted); }
.note { font-size: 14px; color: var(--muted); }
.label { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------------------------------------------------------------- header */
.indep { background: var(--navy); color: #c3cee2; font-size: 12.5px; padding: 6px 0; max-width: none; }
.indep .wrap { display: block; }
.indep a { color: #fff; }
.top { background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { display: flex; align-items: center; gap: 10px 28px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.logo:hover { color: var(--ink); }
.logo .mark { width: 32px; height: 32px; flex: none; }
.logo .word { font-family: var(--display); font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 2px; font-size: 15px; flex: 1; justify-content: flex-end; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 7px 11px; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.nav a:hover { background: var(--accent-soft); color: var(--accent-2); }
.nav a[aria-current] { color: var(--accent); background: var(--accent-soft); }
.nav .nav-cta { margin-left: 8px; background: var(--accent); color: #fff; display: inline-flex; gap: 6px; align-items: center; }
.nav .nav-cta:hover, .nav .nav-cta[aria-current] { background: var(--accent-2); color: #fff; }
.nav .nav-cta .ico { width: 17px; height: 17px; }
@media (max-width: 920px) {
  .top { position: static; }
  .top-in { flex-wrap: wrap; padding-top: 10px; padding-bottom: 0; min-height: 0; }
  .nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 4px 16px 10px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav .nav-cta { margin-left: 4px; }
}

/* ---------------------------------------------------------------- main + footer */
main { padding: 22px 0 64px; }
main .wrap > * + * { margin-top: 20px; }
.crumbs { font-size: 13.5px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); text-decoration: underline; }
.byline { font-size: 13px; color: var(--faint); }
.byline a { color: var(--muted); }
.foot { background: var(--navy); color: #b7c2d6; font-size: 14px; padding: 44px 0 52px; }
.foot a { color: #e6ecf6; text-decoration: none; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot .logo, .foot .logo:hover { color: #fff; }
.foot-in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px; }
.foot-about { display: grid; gap: 12px; align-content: start; }
.foot-about strong { color: #fff; }
.foot .fine { font-size: 13px; color: #8e9bb3; }
.foot-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; align-content: start; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- generic blocks */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px clamp(16px, 3vw, 28px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; box-shadow: var(--shadow); }
.card > *, details, figure { min-width: 0; }
.card > h2 { display: flex; align-items: center; gap: 10px; }
.card > h2 .ico { width: 22px; height: 22px; color: var(--accent); }
.lede { font-size: 18px; color: var(--ink-2); }
.intro { display: grid; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 26px clamp(18px, 3.5vw, 32px); position: relative; overflow: hidden; }
.intro::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--navy), var(--accent)); }
.intro .lede { max-width: 70ch; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.cols > * { min-width: 0; }
.box { border: 1px solid var(--line); background: var(--card); border-radius: var(--r); padding: 16px 18px; display: grid; gap: 4px; align-content: start; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
a.box:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lg); transform: translateY(-1px); color: var(--ink); }
a.box strong { color: var(--accent-2); }
.box .ico { width: 26px; height: 26px; color: var(--accent); margin-bottom: 4px; }
.caveat { border: 1px solid #f1dcb6; border-left: 4px solid var(--gold); background: var(--warn-soft); padding: 12px 16px; font-size: 15px; border-radius: var(--r-sm); color: #4a3510; }
.caveat .muted { color: #7a6038; }
.alert { border: 1px solid #f2caca; border-left: 4px solid var(--bad); background: var(--bad-soft); padding: 12px 16px; border-radius: var(--r-sm); }
.method { font-size: 13.5px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 10px; max-width: none; }
.method a { color: var(--muted); }
section.card .method { margin-top: 2px; }

/* ---------------------------------------------------------------- institution page */
.ent-hero { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.ent-hero-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 24px; background: linear-gradient(90deg, var(--navy), var(--navy-2)); }
.ent-hero-head .label { color: #c3cee2; }
.ent-hero-body { padding: 22px 24px 22px; display: grid; gap: 14px; }
@media (max-width: 600px) { .ent-hero-head, .ent-hero-body { padding-left: 16px; padding-right: 16px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 4px 11px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip .ico { width: 15px; height: 15px; }
.chip.ok { background: var(--good-soft); color: var(--good); font-weight: 600; }
.chip.warn { background: var(--warn-soft); color: var(--warn); font-weight: 600; }
.chip.bad { background: var(--bad-soft); color: var(--bad); font-weight: 600; }
.chip.neutral { background: var(--line-2); color: var(--muted); font-weight: 600; }
.chip.blue { background: var(--accent-soft); color: var(--accent-2); }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis { gap: 10px; } .kpi { padding: 12px 13px; } .kpi .v { font-size: 22px; } .kpi .v.sm { font-size: 16px; } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px 15px; box-shadow: var(--shadow); display: grid; gap: 4px; align-content: start; min-width: 0; }
.kpi .v { font-size: 27px; font-weight: 650; line-height: 1.1; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .v.sm { font-size: 19px; line-height: 1.25; }
.kpi .s { font-size: 13px; color: var(--muted); }
.kpi.ok .v { color: var(--good); } .kpi.warn .v { color: var(--warn); } .kpi.bad .v { color: var(--bad); }
.ent-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.ent-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; min-width: 0; }
.ent-main > *, .ent-side > * { min-width: 0; }
.ent-side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: 108px; }
@media (max-width: 980px) { .ent-grid { grid-template-columns: 1fr; } .ent-side { position: static; order: -1; } }
.side-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.side-card h2 { font-size: 15px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fafbfd; display: flex; align-items: center; gap: 8px; }
.side-card h2 .ico { width: 18px; height: 18px; color: var(--accent); }
.dl { margin: 0; display: grid; }
.dl > div { display: grid; grid-template-columns: 98px minmax(0, 1fr); gap: 10px; padding: 9px 18px; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.dl > div:last-child { border-bottom: 0; }
.dl dt { color: var(--muted); font-size: 12.5px; padding-top: 1px; }
.dl dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.dl dd .sub { display: block; color: var(--faint); font-size: 12px; }
.side-card .pad { padding: 14px 18px; display: grid; gap: 10px; font-size: 14px; }
.btn-out { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; border-radius: 9px; border: 1.5px solid var(--accent); color: var(--accent); font-weight: 600; text-decoration: none; font-size: 14.5px; }
.btn-out:hover { background: var(--accent); color: #fff; }
.btn-out .ico { width: 16px; height: 16px; }
.toc { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow); position: sticky; top: 108px; z-index: 5; }
.toc::-webkit-scrollbar { display: none; }
.toc a { white-space: nowrap; padding: 6px 13px; border-radius: 999px; font-size: 14px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
.toc a:hover { background: var(--accent-soft); color: var(--accent-2); }
@media (max-width: 920px) { html { scroll-padding-top: 70px; } .toc { top: 0; border-radius: 0; margin: 0 -16px; border-left: 0; border-right: 0; } }

/* Fact boxes inside sections */
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.fields > div { padding: 10px 14px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; background: #fff; }
.fields > div:nth-child(3n) { border-right: 0; }
.fields .v { font-size: 16px; font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.fields .v.big { font-size: 24px; font-weight: 650; line-height: 1.15; }
.fields .sub { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
@media (max-width: 680px) {
  .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fields > div:nth-child(3n) { border-right: 1px solid var(--line); }
  .fields > div:nth-child(2n) { border-right: 0; }
}
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; }
.status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.status.ok { color: var(--good); } .status.warn { color: var(--warn); } .status.bad { color: var(--bad); } .status.neutral { color: var(--muted); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-family: var(--mono); font-size: 11.5px; padding: 2px 8px; border: 1px solid currentColor; border-radius: 4px; white-space: nowrap; color: var(--accent); }
.pill.warn { color: var(--warn); } .pill.muted { color: var(--muted); }
.tag-cativa { display: inline-block; margin-left: 6px; font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); vertical-align: 1px; }

/* ---------------------------------------------------------------- tables */
.tw { overflow-x: auto; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: middle; padding: 9px 12px; border-bottom: 1px solid var(--line-2); }
th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 400; background: #f7f9fc; white-space: nowrap; border-bottom: 1px solid var(--line); }
tbody tr:hover td { background: #f8fafd; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td .sub { display: block; color: var(--muted); font-size: 12.5px; }
tr.me td { background: #fff7e6 !important; font-weight: 600; }
caption { text-align: left; padding: 9px 12px; font-size: 13px; color: var(--muted); caption-side: bottom; border-top: 1px solid var(--line-2); }
td.barcell { width: 32%; min-width: 120px; }
.hbar { display: block; height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.hbar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6b9be0, var(--accent)); }
.hbar.warm > i { background: linear-gradient(90deg, #f0c27a, var(--gold)); }
.rank-n { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--line-2); font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* details / FAQ */
details { border: 1px solid var(--line); background: var(--card); border-radius: var(--r-sm); }
details > summary { cursor: pointer; padding: 11px 16px; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: ""; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .2s; flex: none; margin-top: -4px; }
details[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details > :not(summary) { margin: 0 16px 14px; }
details > .tw { margin: 0 12px 12px; }
.faq { display: grid; gap: 8px; }
.faq details > div { display: grid; gap: 8px; color: var(--ink-2); }

/* ---------------------------------------------------------------- charts */
figure { margin: 0; display: grid; gap: 6px; }
figcaption { font-size: 13px; color: var(--muted); }
.spark { width: 100%; max-width: 640px; height: auto; display: block; }
.spark text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.spark .area { fill: url(#sparkfill); opacity: 1; }
.spark .line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.spark .dot { fill: #fff; stroke: var(--accent); stroke-width: 2.5; }
.spark .grid { stroke: var(--line); stroke-width: 1; }
.spark .gap { stroke: var(--faint); stroke-dasharray: 3 3; }
.spark .val { font-family: var(--body); font-size: 12.5px; font-weight: 600; fill: var(--ink); }
.strip { width: 100%; height: auto; display: block; }
.strip text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.strip .axis { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.strip .other { fill: #b9c6db; }
.strip .med { stroke: var(--ink-2); stroke-width: 2; }
.strip .me { fill: var(--gold); stroke: #fff; stroke-width: 2.5; }
.strip .melabel { font-family: var(--body); font-size: 12.5px; font-weight: 650; fill: var(--ink); }
.range { width: 130px; height: 18px; display: block; }
.range .track { stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.range .med { stroke: var(--ink-2); stroke-width: 2; }
.range .me { fill: var(--accent); stroke: #fff; stroke-width: 2; }

/* ---------------------------------------------------------------- lists and search */
.grid-links { columns: 3 230px; column-gap: 28px; padding: 0; list-style: none; display: block; }
.grid-links li { break-inside: avoid; padding: 3px 0; }
.search { display: grid; gap: 8px; position: relative; }
.search label { font-weight: 600; }
.searchbox { position: relative; max-width: 640px; }
.searchbox .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 20px; height: 20px; pointer-events: none; }
.search input, .calc input, .calc select { font: inherit; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; width: 100%; background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.searchbox input { padding-left: 44px; font-size: 17px; }
.search input:focus, .calc input:focus, .calc select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-results { list-style: none; padding: 0; display: grid; gap: 0; max-width: 640px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.search-results:empty { display: none; }
.search-results li a { display: block; padding: 9px 14px; text-decoration: none; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.search-results li:last-child a { border-bottom: 0; }
.search-results li a:hover { background: var(--accent-soft); }
.search-results .note { display: block; font-size: 12.5px; }
.search-results li { padding: 0; }
.search-results li > strong { display: inline-block; padding: 9px 14px; }
.hide { display: none !important; }

/* ---------------------------------------------------------------- home */
.home-hero { background: radial-gradient(1200px 400px at 85% -10%, #2a4f93 0%, transparent 60%), linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #e8eef8; margin-top: -22px; padding: 56px 0 64px; }
.home-hero h1 { color: #fff; font-size: clamp(30px, 5vw, 50px); max-width: 20ch; }
.home-hero .lede { color: #c3cee2; font-size: 18.5px; max-width: 62ch; }
.home-hero .wrap { display: grid; gap: 18px; }
.home-hero .search label { color: #fff; }
.home-hero .search input { border-color: transparent; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.home-hero .search .note { color: #9fb0cc; }
.home-hero .search-results { box-shadow: var(--shadow-lg); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: #9fb0cc; }
.quick a { color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); padding: 4px 12px; border-radius: 999px; text-decoration: none; }
.quick a:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-lg); margin-top: -36px !important; position: relative; }
.stats > div { padding: 16px 20px; border-right: 1px solid var(--line-2); display: grid; gap: 2px; }
.stats > div:last-child { border-right: 0; }
.stats .v { font-size: 26px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stats .s { font-size: 13px; color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > div:nth-child(2) { border-right: 0; } .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); } }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-title a { font-size: 14.5px; font-weight: 600; text-decoration: none; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .two { grid-template-columns: 1fr; } }
.rate-tiles { display: grid; gap: 10px; }
.rate-tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; color: var(--ink); }
.rate-tile:hover { border-color: var(--accent-line); background: #fbfcff; color: var(--ink); }
.rate-tile .n { font-weight: 600; }
.rate-tile .v { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--accent-2); text-align: right; }
.rate-tile .s { font-size: 12.5px; color: var(--muted); grid-column: 1 / -1; }
.band { background: linear-gradient(135deg, var(--accent) 0%, #2c74d8 100%); color: #fff; border-radius: var(--r); padding: 26px clamp(18px, 4vw, 34px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; box-shadow: var(--shadow-lg); }
.band h2 { color: #fff; }
.band p { color: #dfe9fa; }
.band .btn-light { background: #fff; color: var(--accent-2); padding: 11px 18px; border-radius: 10px; font-weight: 650; text-decoration: none; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.band .btn-light .ico { width: 18px; height: 18px; }
@media (max-width: 700px) { .band { grid-template-columns: 1fr; } }
.liq { display: grid; gap: 8px; }
.liq a { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; border: 1px solid #f2d2d2; background: var(--bad-soft); border-radius: 10px; text-decoration: none; color: var(--ink); }
.liq a span { color: var(--bad); font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- calculator + widget */
.calc { display: grid; gap: 16px; }
.calc .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px 18px; }
.calc label { display: grid; gap: 4px; font-size: 14.5px; font-weight: 600; align-content: start; }
.calc label span { font-weight: 400; color: var(--muted); font-size: 13px; }
.result { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.result > div { border: 1px solid var(--line); background: #f8fafd; border-radius: 10px; padding: 14px 16px; display: grid; gap: 3px; }
.result > div:last-child { background: var(--accent-soft); border-color: var(--accent-line); }
.result .v { font-size: 26px; font-weight: 650; font-variant-numeric: tabular-nums; }
.embed-code { width: 100%; min-height: 110px; font: 12.5px/1.45 var(--mono); padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fafd; color: var(--ink-2); }
.btn { font: inherit; font-weight: 600; padding: 8px 16px; border: 1.5px solid var(--accent); background: var(--accent); color: #fff; border-radius: 9px; cursor: pointer; }
dl.card dt { margin-top: 6px; }
dl.card dd { margin: 0 0 6px; color: var(--ink-2); }
.side-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: 14px; }
h2 > .ico { width: 22px; height: 22px; color: var(--accent); vertical-align: -4px; margin-right: 8px; }
.card > h2 > .ico, .side-card h2 > .ico { margin-right: 0; vertical-align: 0; }
td:has(> .hbar) { width: 28%; min-width: 90px; }
@media (max-width: 600px) { .tw td:first-child, .tw th:first-child { min-width: 150px; } .tw td:first-child:has(.rank-n) { min-width: 0; } .tw td:nth-child(2):has(a) { min-width: 150px; } }

/* ---------------------------------------------------------------- calmer links
   Body-text links stay blue with a soft underline; links that ARE the content (table rows, lists, tiles) read as
   text and only turn blue on hover. */
a { text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
a:hover { text-decoration-color: currentColor; }
td a, .side-list a, .grid-links a, .search-results a, .faq a.plain { color: var(--ink); font-weight: 550; text-decoration: none; }
td a:hover, .side-list a:hover, .grid-links a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: currentColor; }
tbody tr:hover td a { color: var(--accent-2); }
.method a, .byline a, .crumbs a { text-decoration: none; }
.method a:hover, .byline a:hover { text-decoration: underline; }

/* chip navigation (jump to a group) */
.chipnav { display: flex; flex-wrap: wrap; gap: 8px; }
.chipnav a { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; box-shadow: 0 1px 2px rgba(15, 27, 46, .04); }
.chipnav a span { font-size: 12px; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.chipnav a:hover { border-color: var(--accent-line); color: var(--accent-2); background: var(--accent-soft); }
.chipnav a:hover span { background: #fff; }
.count { font-size: 14px; font-weight: 600; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 2px 9px; vertical-align: 3px; font-family: var(--body); }
.section-title .note { flex-basis: 100%; }

/* directory tiles */
.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.tiles li { min-width: 0; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n k" "m k"; gap: 1px 10px; align-items: center; height: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .12s, background .12s, box-shadow .12s; }
.tile:hover { border-color: var(--accent-line); background: #fbfcff; box-shadow: var(--shadow); color: var(--ink); }
.tile-n { grid-area: n; font-weight: 600; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.tile:hover .tile-n { color: var(--accent-2); }
.tile-m { grid-area: m; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-k { grid-area: k; font-size: 12px; color: var(--ink-2); background: var(--line-2); padding: 2px 8px; border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stats-inline { margin-top: 0 !important; box-shadow: var(--shadow); }

/* rate overview cards */
.ratecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.ratecard { display: grid; gap: 6px; padding: 16px 18px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ratecard:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lg); transform: translateY(-1px); color: var(--ink); }
.ratecard .n { font-weight: 650; font-size: 15.5px; line-height: 1.3; }
.ratecard:hover .n { color: var(--accent-2); }
.ratecard .v { font-size: 30px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ratecard .v small { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.ratecard .s { font-size: 13px; color: var(--muted); }
.ratecard .tag-cativa { margin: 0; justify-self: start; }
.mini { width: 100%; height: 34px; display: block; }
.mini path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.mini .a { fill: color-mix(in srgb, var(--accent) 12%, transparent); stroke: none; }
.section-title .note { flex-basis: 100%; max-width: none; }
.tile { align-content: center; }
.ratecard { display: flex; flex-direction: column; }
.ratecard .mini { margin-top: auto; padding-top: 6px; height: 40px; }

/* ---------------------------------------------------------------- directory table (/instituicoes, /cooperativas) */
[hidden] { display: none !important; }
.dir { gap: 14px; }
.dir-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dir-controls .searchbox { flex: 1 1 320px; max-width: none; }
.dir-controls input { font: inherit; width: 100%; padding: 11px 14px 11px 44px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.dir-controls input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dir-controls select { font: inherit; padding: 11px 36px 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235d6879' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 16px; color: var(--ink); appearance: none; min-width: 210px; }
.dir-controls select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.segmented { display: flex; flex-wrap: wrap; gap: 6px; }
.segmented button { font: inherit; font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.segmented button span { font-size: 12px; color: var(--muted); background: var(--line-2); border-radius: 999px; padding: 0 7px; font-variant-numeric: tabular-nums; }
.segmented button:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.segmented button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.segmented button[aria-pressed="true"] span { background: rgba(255, 255, 255, .18); color: #fff; }
.dir:not(.js) .segmented, .dir:not(.js) .dir-controls { display: none; }
.dir-count { margin: 0; }
.dir-table td { padding-top: 10px; padding-bottom: 10px; }
.dir-table td .sub:empty { display: none; }
.dir-table th button { font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.dir-table th button::after { content: "↕"; font-size: 11px; opacity: .45; }
.dir-table th[aria-sort="ascending"] button::after { content: "↑"; opacity: 1; color: var(--accent); }
.dir-table th[aria-sort="descending"] button::after { content: "↓"; opacity: 1; color: var(--accent); }
.dir-table th[aria-sort="ascending"], .dir-table th[aria-sort="descending"] { color: var(--accent-2); }
.dir-table td.c-tipo { color: var(--ink-2); font-size: 14px; }
.dir-table td.c-sede { font-size: 14px; white-space: nowrap; }
.only-m { display: none; }
.btn-more { justify-self: center; font: inherit; font-weight: 600; padding: 10px 22px; border-radius: 10px; border: 1.5px solid var(--accent); background: #fff; color: var(--accent); cursor: pointer; }
.btn-more:hover { background: var(--accent); color: #fff; }
@media (max-width: 680px) {
  .dir-table .c-tipo, .dir-table .c-sede { display: none; }
  .only-m { display: inline; }
  .dir-controls select { flex: 1 1 100%; }
  .segmented { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px 2px; }
  .segmented::-webkit-scrollbar { display: none; }
  .segmented button { flex: none; }
  .dir .tw td:first-child { min-width: 0; }
  .dir-table th, .dir-table td { padding-left: 9px; padding-right: 9px; }
  .dir-table td { font-size: 14px; }
  .dir-table th { white-space: normal; letter-spacing: .03em; }
  .dir-table td.num { padding-left: 4px; }
}
.up { color: var(--good); font-weight: 600; } .down { color: var(--bad); font-weight: 600; }
.dir.js .c-nojs { display: none; }
.list-head { padding: 6px 2px 0; }
.list-head + .dir { margin-top: 12px !important; }
@media (max-width: 680px) {
  .dir-table td, .dir-table th { min-width: 0 !important; }
  .dir-table .rank-n { min-width: 22px; height: 20px; padding: 0 4px; font-size: 11.5px; }
  .dir-table td a { overflow-wrap: anywhere; }
  .dir-table th { font-size: 9.5px; letter-spacing: 0; }
  .dir-table td.num .muted { white-space: normal; display: inline-block; max-width: 80px; text-align: right; line-height: 1.25; }
}
