:root {
  color-scheme: light;
  --paper:#f7f6f1; --surface:#fffefa; --ink:#26352f; --green:#31584b;
  --muted:#515f57; --gold:#835d23; --sand:#e7ddcc; --rule:#dbddd3;
  --tint:#eef1e9; --max:1460px;
  font: 100%/1.5 "Avenir Next", Avenir, system-ui, sans-serif;
  color:var(--ink); background:var(--paper);
}
* { box-sizing:border-box; }
body { margin:0; }
[hidden] { display:none !important; }
h1,h2,h3,p { margin:0; }
h1,h2 { letter-spacing:-.035em; line-height:1.13; }
h2 { font-size:1.55rem; }
h3 { line-height:1.25; }
a { color:var(--green); }
button,input,select,textarea { font:inherit; color:inherit; }
button,select,summary { cursor:pointer; }
button { background:var(--surface); border:1px solid var(--rule); padding:.53rem .82rem; border-radius:6px; }
button:hover { border-color:var(--green); }
button:disabled { cursor:default; opacity:.48; }
:focus-visible { outline:3px solid #9e7533; outline-offset:3px; }
.shell { width:min(var(--max), calc(100% - 80px)); margin-inline:auto; }
.kicker { color:var(--gold); font-size:.75rem; font-weight:750; letter-spacing:.12em; }
.skip { position:absolute; z-index:10; top:-6rem; left:1rem; background:white; padding:1rem; }
.skip:focus { top:1rem; }
.top { border-bottom:1px solid var(--rule); background:var(--surface); }
.top-inner { min-height:77px; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:1rem; }
.brand { display:inline-flex; flex-direction:column; align-items:flex-start; text-decoration:none; width:max-content; }
.brand img { display:block; width:clamp(9rem,16vw,11rem); height:auto; }
.brand small { padding-left:20%; }
.brand small,.top-year { color:var(--muted); font-size:.8rem; }
.top-year { justify-self:end; }
nav { display:flex; gap:1.7rem; align-self:stretch; }
nav a { display:grid; align-items:center; text-decoration:none; font-size:.92rem; font-weight:650; color:var(--muted); border-bottom:2px solid transparent; }
nav a[aria-current] { color:var(--ink); border-color:var(--green); }
.hero { display:grid; grid-template-columns:1fr minmax(250px,32%); min-height:240px; margin-top:2rem; border:1px solid var(--rule); background:var(--surface); overflow:hidden; }
.hero-copy { padding:2.55rem 2.4rem; align-self:center; }
.hero h1 { font-size:clamp(2.2rem,4.2vw,4.45rem); max-width:14ch; margin:.5rem 0 .8rem; }
.hero p { color:var(--muted); max-width:57ch; }
.hero-photo { background-color:var(--green); background-size:cover; background-position:center 48%; border-left:1px solid var(--rule); min-height:150px; }
.hero.compact { min-height:155px; }
.hero.compact .hero-copy { padding-block:1.6rem; }
.hero.compact h1 { font-size:clamp(2rem,3.2vw,3.25rem); max-width:none; }
.metrics { margin:1.3rem 0 2rem; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid var(--rule); background:var(--surface); }
.metric { padding:1rem 1.3rem; }
.metric + .metric { border-left:1px solid var(--rule); }
.metric strong { display:block; font-size:clamp(1.35rem,2.4vw,2.2rem); line-height:1.12; color:var(--green); font-variant-numeric:tabular-nums; }
.metric span { font-size:.86rem; color:var(--muted); }
.workspace { display:grid; grid-template-columns:245px minmax(0,1fr); gap:2rem; align-items:start; margin-top:1.4rem; }
.filters { padding:1.1rem; border:1px solid var(--rule); background:var(--surface); }
.filters-title { display:flex; align-items:center; justify-content:space-between; gap:.45rem; margin-bottom:.6rem; }
.filters-title h2 { font-size:1.2rem; }
.link-button { background:none; border:0; padding:.2rem; color:var(--green); text-decoration:underline; text-underline-offset:.18em; font-size:.84rem; }
.facet { border-top:1px solid var(--rule); }
.facet summary { padding:.55rem 0; font-weight:650; font-size:.88rem; }
.facet-search { width:100%; margin:.15rem 0 .35rem; font-size:.84rem; }
.facet-options { display:grid; max-height:13rem; overflow:auto; padding:0 .15rem .4rem; }
.facet-option { display:flex; align-items:baseline; gap:.4rem; padding:.24rem 0; font-size:.86rem; overflow-wrap:anywhere; }
.facet-option input { accent-color:var(--green); flex:none; }
.facet-option span { flex:1; }
.facet-option small { color:var(--muted); }
input[type="search"],textarea,select { background:var(--surface); border:1px solid #a9b2a5; border-radius:5px; padding:.55rem .65rem; min-width:0; }
.searchbar label { display:block; font-size:.87rem; font-weight:700; margin-bottom:.35rem; }
.search-field { display:flex; align-items:center; gap:.35rem; background:var(--surface); border:1px solid #a9b2a5; border-radius:5px; padding:0 .75rem; }
.search-field span { font-size:1.65rem; line-height:1; color:var(--green); }
.search-field input { width:100%; border:0; background:transparent; padding:.65rem .2rem; }
.active-filters { display:flex; flex-wrap:wrap; gap:.35rem; margin:.45rem 0; }
.active-filters button { border-color:#cdd7cb; background:var(--tint); font-size:.84rem; overflow-wrap:anywhere; padding:.3rem .46rem; text-align:left; }
.result-heading { display:flex; align-items:end; justify-content:space-between; gap:.8rem; margin:1.45rem 0 1rem; }
.result-heading h2 { margin-top:.3rem; }
output { color:var(--green); font-weight:700; font-size:.88rem; text-align:right; }
.chart-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.85rem; }
.chart { border:1px solid var(--rule); background:var(--surface); padding:1.1rem; min-width:0; }
.chart h3 { font-size:1rem; margin-bottom:.75rem; }
.bar-list { display:grid; gap:.3rem; }
.bar { border:0; background:transparent; border-radius:2px; text-align:left; display:grid; grid-template-columns:minmax(82px,1.14fr) minmax(35px,1.2fr) auto; align-items:center; gap:.45rem; padding:.22rem .15rem; font-size:.82rem; }
.bar:hover,.bar[aria-pressed="true"] { background:var(--tint); }
.bar span:first-child { overflow-wrap:anywhere; }
.bar-value { font-variant-numeric:tabular-nums; min-width:2.3ch; text-align:right; color:var(--green); font-weight:650; }
.bar-track { height:8px; border-radius:2px; background:#eaeee8; display:block; overflow:hidden; }
.bar-track i { display:block; height:100%; background:var(--green); }
.chart:nth-child(2n) .bar-track i { background:#a27b45; }
.note { font-size:.86rem; color:var(--muted); margin:.8rem 0 1.15rem; }
.list-head,.pager { display:flex; gap:.65rem; align-items:center; justify-content:space-between; flex-wrap:wrap; margin:1rem 0; }
.list-head label { font-size:.87rem; }
.list-head select { margin-left:.4rem; }
.product-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.product-card { display:flex; flex-direction:column; border:1px solid var(--rule); background:var(--surface); min-width:0; }
.product-card a { display:block; text-decoration:none; color:var(--ink); height:100%; }
.product-card a:hover h3 { text-decoration:underline; text-underline-offset:.18em; }
.product-img { display:grid; place-items:center; aspect-ratio:1.5; margin:0; background:#ebece3; overflow:hidden; }
.product-img img { width:100%; height:100%; object-fit:contain; }
.product-copy { padding:.85rem .9rem 1rem; overflow-wrap:anywhere; }
.product-brand { color:var(--gold); font-size:.76rem; font-weight:750; letter-spacing:.055em; }
.product-card h3 { font-size:1rem; margin:.22rem 0 .5rem; }
.product-card small { font-size:.78rem; color:var(--muted); }
.pager { justify-content:center; }
.empty { padding:1.35rem; border:1px dashed var(--rule); color:var(--muted); background:var(--surface); }
dialog { border:1px solid var(--rule); background:var(--surface); color:var(--ink); width:min(940px, calc(100% - 1.4rem)); max-height:90vh; padding:0; border-radius:8px; }
dialog::backdrop { background:#14271f9e; }
.dialog-top { border-bottom:1px solid var(--rule); position:sticky; top:0; background:var(--surface); z-index:1; }
.dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:.6rem; padding:.6rem 1.2rem .4rem; }
.product-navigation { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:.8rem; padding:0 1.2rem .6rem; }
.product-navigation button { min-width:44px; min-height:44px; padding:0 .55rem; font-size:1.35rem; line-height:1; color:var(--green); }
.product-navigation button:hover:enabled { background:var(--tint); }
.product-navigation [role="status"] { text-align:center; color:var(--muted); font-size:.875rem; }
.detail { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:1.3rem; padding:1.2rem; }
.detail figure { margin:0 0 .8rem; }
.detail img { display:block; width:100%; max-height:460px; object-fit:contain; background:var(--tint); }
.detail figcaption { font-size:.82rem; margin-top:.35rem; }
.detail h2 { font-size:clamp(1.55rem,3vw,2.2rem); margin:.35rem 0; overflow-wrap:anywhere; }
.detail h3 { font-size:1rem; margin:1.1rem 0 .4rem; }
.detail ul { padding-left:1.15rem; margin:.25rem 0; }
.detail dt { font-weight:700; }
.detail dd { margin:0 0 .46rem; }
.detail dl { font-size:.88rem; margin:.5rem 0; overflow-wrap:anywhere; }
.detail .description { white-space:pre-line; }
.tags { display:flex; gap:.3rem; flex-wrap:wrap; }
.tag { display:inline-block; font-size:.78rem; padding:.12rem .4rem; background:var(--tint); color:var(--green); }
.edit { border:1px solid var(--rule); padding:.6rem; margin-top:.8rem; }
.edit form { display:grid; gap:.5rem; }
.edit label { display:grid; font-size:.85rem; }
.edit textarea { width:100%; min-height:3rem; }
.reports-controls { display:flex; flex-wrap:wrap; align-items:end; justify-content:space-between; gap:1rem; margin:1.4rem 0 1rem; }
.reports-controls label { display:grid; font-size:.84rem; gap:.3rem; }
.report { border:1px solid var(--rule); margin-bottom:.55rem; background:var(--surface); }
.report summary,#audit summary { padding:.82rem 1rem; font-weight:650; }
.report summary small { display:block; margin:.25rem 0 0 1rem; font-size:.78rem; color:var(--muted); }
.report-content { padding:.25rem 1.05rem 1rem; }
.report-content p { margin:.45rem 0; white-space:pre-line; }
.report-content img { width:min(100%, 380px); max-height:510px; object-fit:contain; margin:.5rem .5rem .5rem 0; display:inline-block; }
.report-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin:.3rem 0 .75rem; }
.report-content table,#audit table { border-collapse:collapse; width:100%; font-size:.92rem; }
th,td { border-bottom:1px solid var(--rule); text-align:left; padding:.4rem; vertical-align:top; }
.report-content .count { width:7rem; text-align:right; }
.report-content article { display:grid; gap:.18rem; padding:.55rem 0; border-bottom:1px solid var(--rule); }
.report-content article small { color:var(--muted); }
#audit { border:1px solid var(--rule); margin-block:1.1rem; background:var(--surface); }
#audit-content { padding:0 1rem 1rem; }
.footer { display:flex; justify-content:space-between; gap:.5rem; color:var(--muted); border-top:1px solid var(--rule); margin-top:2.5rem; padding:1.1rem 0 1.6rem; font-size:.75rem; }
#carregamento { padding:2rem 0; }
@media (max-width:1000px) {
  .shell { width:calc(100% - 40px); }
  .workspace { grid-template-columns:205px minmax(0,1fr); gap:1rem; }
  .product-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
  .shell { width:calc(100% - 26px); }
  .top-inner { grid-template-columns:1fr auto; padding-top:.6rem; gap:.3rem; }
  .top-year { grid-column:2; grid-row:1; }
  nav { grid-column:1/-1; gap:1.2rem; min-height:43px; }
  .hero { margin-top:1rem; grid-template-columns:1fr; }
  .hero-copy { padding:1.4rem 1.1rem; }
  .hero-photo { min-height:125px; background-position:center 62%; border-left:0; }
  .hero.compact .hero-photo { display:none; }
  .metrics { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:1.15rem; }
  .metric { padding:.7rem; }
  .metric:nth-child(3) { border-left:0; }
  .metric:nth-child(n+3) { border-top:1px solid var(--rule); }
  .workspace { display:flex; flex-direction:column; }
  .filters,.results { width:100%; }
  .filters { padding:.65rem; }
  #facetas { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 .7rem; }
  .facet-options { max-height:10rem; }
  .chart { padding:.65rem; }
  .bar { grid-template-columns:minmax(65px,1.45fr) minmax(13px,.6fr) auto; gap:.25rem; }
  .detail { grid-template-columns:1fr; }
  .detail img { max-height:300px; }
  .footer { flex-wrap:wrap; }
}
@media (max-width:460px) {
  .chart-grid { grid-template-columns:1fr; }
  .product-grid { gap:.55rem; }
  .product-copy { padding:.6rem; }
}
.table-scroll { overflow:auto; }
.bar span,.report-content,.detail { overflow-wrap:anywhere; }
