:root {
  --ink: #152032;
  --muted: #5c6678;
  --line: #dfe4ea;
  --paper: #fff;
  --soft: #f5f7fa;
  --blue: #1769aa;
  --blue2: #0d4e82;
  --yellow: #f2c94c;
  --max: 1180px;
  --radius: 18px;
  --shadow: 0 12px 36px rgba(22,38,61,.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

a {
  color: var(--blue2);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

button,input,select {
  font: inherit;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 99;
  background: #fff;
  padding: .7rem 1rem;
  border: 2px solid var(--blue);
}

.topbar {
  background: #101b2c;
  color: #fff;
  font-size: .9rem;
}

.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .55rem 1rem;
}

.wrap {
  max-width: var(--max);
  margin: auto;
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

.sitehead {
  border-bottom: 1px solid var(--line);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 30;
}

.brandrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 82px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  text-decoration: none;
  color: var(--ink);
}

.mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,var(--blue),var(--blue2));
  color: #fff;
  font-weight: 900;
  border: 5px solid #e8f2fa;
  letter-spacing: -.08em;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  display: block;
  color: var(--muted);
}

nav {
  display: flex;
  align-items: center;
  gap: .15rem;
  flex-wrap: wrap;
}

nav a {
  padding: .62rem .72rem;
  border-radius: 9px;
  text-decoration: none;
  color: var(--ink);
  font-size: .93rem;
}

nav a:hover,nav a[aria-current=page] {
  background: #edf5fb;
  color: var(--blue2);
}

.menu-btn {
  display: none;
}

.hero {
  background: radial-gradient(circle at 85% 15%,rgba(242,201,76,.22),transparent 25%),linear-gradient(145deg,#eef7fd,#fff 58%);
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  padding-top: 4.8rem;
  padding-bottom: 4.5rem;
}

.eyebrow {
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--blue2);
  font-weight: 800;
}

.hero h1 {
  max-width: 1150px;
  font-size: clamp(2.25rem,5vw,4.5rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  margin: .7rem 0 1.1rem;
}

.lead {
  font-size: 1.17rem;
  max-width: 980px;
  color: #3e4a5c;
}

.actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.7rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .82rem 1.05rem;
  border-radius: 11px;
  border: 1px solid var(--blue);
  background: var(--blue);
  color: white;
  text-decoration: none;
  font-weight: 750;
  cursor: pointer;
}

.btn.secondary {
  background: #fff;
  color: var(--blue2);
}

.btn.ghost {
  background: transparent;
  color: var(--blue2);
  border-color: var(--line);
}

.section {
  padding: 4rem 0;
}

.section.soft {
  background: var(--soft);
}

h2 {
  font-size: clamp(1.75rem,3vw,2.7rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  margin: 0 0 .8rem;
}

h3 {
  line-height: 1.25;
}

.intro {
  max-width: 760px;
  color: var(--muted);
  margin-bottom: 2rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1.2rem;
}

.grid.two {
  grid-template-columns: repeat(2,1fr);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 3px 10px rgba(22,38,61,.035);
}

.card h3 {
  margin: .1rem 0 .6rem;
}

.card p {
  color: var(--muted);
}

.number {
  font-size: 2rem;
  font-weight: 900;
  color: var(--blue);
}

.tag {
  display: inline-flex;
  background: #e8f3fb;
  color: var(--blue2);
  padding: .25rem .55rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.notice {
  border-left: 5px solid var(--yellow);
  background: #fff9e8;
  padding: 1rem 1.15rem;
  border-radius: 0 12px 12px 0;
}

.official {
  border-left-color: var(--blue);
  background: #eef7fd;
}

.breadcrumbs {
  font-size: .9rem;
  color: var(--muted);
  padding-top: 1.4rem;
}

.pagehead {
  padding: 2.4rem 0 2rem;
  border-bottom: 1px solid var(--line);
}

.pagehead h1 {
  font-size: clamp(2rem,4vw,3.5rem);
  letter-spacing: -.04em;
  margin: .4rem 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 300px;
  gap: 2rem;
}

.side {
  position: sticky;
  top: 110px;
  height: max-content;
}

.side a {
  display: block;
  padding: .55rem .7rem;
  border-left: 2px solid var(--line);
  text-decoration: none;
}

.side a:hover {
  border-color: var(--blue);
  background: #f1f7fb;
}

.article-list details {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: .7rem 0;
  background: #fff;
}

.article-list summary {
  cursor: pointer;
  padding: 1rem;
  font-weight: 800;
}

.article-list .body {
  padding: 0 1rem 1rem;
  color: #455064;
}

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.old,.new {
  padding: 1rem;
  border-radius: 12px;
}

.old {
  background: #f6f6f6;
}

.new {
  background: #edf7fd;
}

.sim-grid {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(320px,.8fr);
  gap: 1.2rem;
}

.toolbar {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.club {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin: .8rem 0;
  background: #fff;
}

.club-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.fields {
  display: grid;
  grid-template-columns: repeat(4,minmax(110px,1fr));
  gap: .7rem;
}

.field label {
  display: block;
  font-size: .78rem;
  font-weight: 750;
  color: #4d5868;
  margin-bottom: .25rem;
}

.field input,.field select,textarea {
  width: 100%;
  border: 1px solid #cdd5df;
  border-radius: 9px;
  padding: .62rem;
  background: #fff;
}

.check {
  display: flex;
  align-items: center;
  gap: .45rem;
}

.check input {
  width: auto;
}

.remove {
  border: 0;
  background: #fff1f1;
  color: #9d2020;
  border-radius: 8px;
  padding: .4rem .6rem;
  cursor: pointer;
}

.results {
  position: sticky;
  top: 110px;
  height: max-content;
}

.metric {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--line);
}

.metric strong {
  font-size: 1.08rem;
}

.tablewrap {
  overflow: auto;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: .91rem;
}

th,td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: .65rem .5rem;
}

th {
  background: #f6f8fa;
}

.status-ok {
  color: #147443;
}

.status-warn {
  color: #9a5b00;
}

.steps details {
  border-top: 1px solid var(--line);
  padding: .7rem 0;
}

.steps summary {
  cursor: pointer;
  font-weight: 750;
}

.footer {
  background: #101b2c;
  color: #e8edf4;
  padding: 3rem 0;
  margin-top: 3rem;
}

.footer a {
  color: #fff;
}

.footergrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.small {
  font-size: .88rem;
  color: var(--muted);
}

@media (max-width:950px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
  .layout,.sim-grid {
    grid-template-columns: 1fr;
  }
  .side,.results {
    position: static;
  }
  .fields {
    grid-template-columns: repeat(2,1fr);
  }
  nav {
    display: none;
  }
  .menu-btn {
    display: block;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: .55rem;
  }
  .sitehead.open nav {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 82px;
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width:620px) {
  .grid,.grid.two,.compare,.footergrid {
    grid-template-columns: 1fr;
  }
  .fields {
    grid-template-columns: 1fr;
  }
  .hero .wrap {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
  .topbar .wrap {
    display: block;
  }
  .brand small {
    display: none;
  }
}

.dataset-editor {
  margin-top: 1rem;
  border: 1px solid var(--line,#d9dde3);
  border-radius: 12px;
  background: #fff;
  padding: 1rem;
}

.dataset-editor>summary {
  cursor: pointer;
  list-style-position: inside;
}

.notice.soft {
  background: #f4f7f8;
  border-color: #cbd5da;
}

/*Visual 3 — comparação das fases do cálculo*/

.comparison-chart {
  margin-top: 1.25rem;
  display: grid;
  gap: 1.2rem;
}

.compare-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .35rem;
}

.compare-bar-head span {
  font-weight: 750;
}

.compare-bar-head strong {
  font-size: 1.15rem;
}

.compare-bar-track {
  height: 28px;
  background: #edf1f5;
  border-radius: 999px;
  position: relative;
  overflow: visible;
  border: 1px solid #d8e0e8;
}

.compare-bar-fill {
  display: block;
  height: 100%;
  min-width: 2px;
  border-radius: 999px;
  transition: width .25s ease;
}

.compare-bar-fill.stage-1 {
  background: #7a8796;
}

.compare-bar-fill.stage-2 {
  background: #3b83b9;
}

.compare-bar-fill.stage-3 {
  background: #1769aa;
}

.limit-marker {
  position: absolute;
  top: -7px;
  bottom: -7px;
  width: 2px;
  background: #d57b00;
  transform: translateX(-1px);
}

.compare-bar-row small {
  display: block;
  color: var(--muted);
  margin-top: .3rem;
}

.compare-legend {
  font-size: .86rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}

.legend-line {
  display: inline-block;
  width: 18px;
  height: 2px;
  background: #d57b00;
  vertical-align: middle;
  margin-right: .35rem;
}

@media (max-width:620px) {
  .compare-bar-track {
    height: 24px;
  }
}

/*Hemiciclo da Assembleia Geral*/

.assembly-card {
  overflow: hidden;
}

.assembly-toolbar {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.assembly-mode.is-active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.assembly-chart {
  min-height: 390px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg,#fbfdff,#f5f8fb);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  overflow: auto;
}

.assembly-chart svg {
  width: 100%;
  max-width: 940px;
  height: auto;
  display: block;
}

.assembly-seat {
  stroke: #fff;
  stroke-width: 1.25;
  transition: opacity .18s ease,transform .18s ease;
  transform-box: fill-box;
  transform-origin: center;
}

.assembly-seat:hover {
  opacity: .72;
  transform: scale(1.45);
}

.assembly-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  margin-top: 1rem;
}

.assembly-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .88rem;
  color: #435064;
}

.assembly-swatch {
  width: .85rem;
  height: .85rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
}

.assembly-note {
  margin-bottom: 0;
}

.assembly-total-label {
  font-size: 20px;
  font-weight: 900;
  fill: #152032;
  text-anchor: middle;
}

.assembly-total-sub {
  font-size: 12px;
  fill: #5c6678;
  text-anchor: middle;
}

.assembly-empty {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width:620px) {
  .assembly-chart {
    min-height: 280px;
    padding: .55rem;
  }
  .assembly-seat {
    stroke-width: .8;
  }
  .assembly-total-label {
    font-size: 17px;
  }
  .assembly-total-sub {
    font-size: 11px;
  }
}

/*Assembleia Geral — composição e explicação*/

.assembly-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) 260px;
  gap: 1rem;
  align-items: stretch;
}

.assembly-chart {
  min-height: 430px;
  background: radial-gradient(circle at 50% 92%,rgba(23,105,170,.08),transparent 37%),linear-gradient(180deg,#fff,#f5f8fb);
  border-color: #d7e1eb;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.assembly-chart svg {
  max-width: 880px;
}

.assembly-summary {
  border: 1px solid #d7e1eb;
  border-radius: 16px;
  background: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .65rem;
}

.assembly-summary-total {
  padding-bottom: .8rem;
  border-bottom: 1px solid var(--line);
}

.assembly-summary-total strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: #142238;
}

.assembly-summary-total span {
  font-size: .82rem;
  color: var(--muted);
}

.assembly-summary-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: .55rem;
  font-size: .84rem;
  color: #465469;
}

.assembly-summary-row i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.assembly-summary-row strong {
  color: #17243a;
}

.assembly-stage {
  fill: none;
  stroke: #dce5ee;
  stroke-width: 2;
  stroke-linecap: round;
}

.assembly-inner-stage {
  fill: #fff;
  stroke: #dce5ee;
  stroke-width: 1.5;
}

.assembly-seat {
  stroke: #fff;
  stroke-width: 1.5;
  filter: drop-shadow(0 1px 1px rgba(24,42,64,.12));
}

.assembly-seat:hover,.assembly-seat:focus {
  opacity: 1;
  transform: scale(1.55);
  outline: none;
  filter: drop-shadow(0 2px 3px rgba(24,42,64,.25));
}

.assembly-total-label {
  font-size: 23px;
}

.assembly-total-sub {
  font-size: 11px;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.assembly-legend {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.assembly-legend-item {
  background: #f7f9fb;
  border: 1px solid #e0e6ed;
  border-radius: 999px;
  padding: .38rem .65rem;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.eyebrow {
  display: block;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: .25rem;
}

.formula-badge {
  white-space: nowrap;
  border: 1px solid #cfe0ee;
  background: #eff7fc;
  color: #145d91;
  border-radius: 999px;
  padding: .35rem .65rem;
  font-size: .78rem;
  font-weight: 800;
}

.delegate-calculation {
  display: grid;
  gap: 1rem;
  margin-top: 1.2rem;
}

.calc-flow {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  gap: .75rem;
}

.calc-step {
  position: relative;
  border: 1px solid #dce4ec;
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  min-height: 148px;
}

.calc-step:not(:last-child)::after {
  content: '→';
  position: absolute;
  right: -.65rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eaf3fa;
  color: var(--blue);
  font-weight: 900;
}

.calc-number {
  display: inline-grid;
  place-items: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: #1769aa;
  color: #fff;
  font-size: .78rem;
  font-weight: 900;
  margin-bottom: .65rem;
}

.calc-step h3 {
  font-size: .92rem;
  margin: 0 0 .4rem;
}

.calc-formula {
  font-family: ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size: .8rem;
  background: #f4f7fa;
  border-radius: 8px;
  padding: .5rem;
  overflow-wrap: anywhere;
}

.calc-result {
  display: block;
  font-size: 1.35rem;
  color: #142238;
  margin-top: .5rem;
}

.delegate-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .8rem;
}

.delegate-box {
  border: 1px solid #dce4ec;
  border-radius: 14px;
  padding: 1rem;
  background: #f9fbfd;
}

.delegate-box-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .55rem;
}

.delegate-box-head i {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
}

.delegate-box h3 {
  font-size: .9rem;
  margin: 0;
}

.delegate-total {
  font-size: 1.55rem;
  font-weight: 900;
  color: #17243a;
}

.delegate-split {
  font-size: .83rem;
  color: var(--muted);
  margin-top: .25rem;
}

.delegate-note {
  border-left: 4px solid #e6a700;
  background: #fff9e8;
  padding: .75rem .9rem;
  border-radius: 0 10px 10px 0;
  font-size: .86rem;
  color: #5f4b0b;
}

@media (max-width:950px) {
  .assembly-layout {
    grid-template-columns: 1fr;
  }
  .assembly-summary {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
  }
  .assembly-summary-total {
    grid-row: span 2;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    padding-right: .8rem;
  }
  .calc-flow {
    grid-template-columns: 1fr 1fr;
  }
  .calc-step:not(:last-child)::after {
    display: none;
  }
  .delegate-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:620px) {
  .assembly-chart {
    min-height: 300px;
  }
  .assembly-summary {
    grid-template-columns: 1fr 1fr;
  }
  .assembly-summary-total {
    grid-column: 1/-1;
    grid-row: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .calc-flow,.delegate-grid {
    grid-template-columns: 1fr;
  }
  .section-heading-row {
    display: block;
  }
  .formula-badge {
    display: inline-block;
    margin-top: .4rem;
  }
}

.scenario-controls {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.scenario-controls label {
  display: grid;
  gap: .4rem;
  min-width: min(100%,360px);
  font-weight: 700;
}

.scenario-controls select {
  padding: .85rem 1rem;
  border: 1px solid #ccd7e3;
  border-radius: .65rem;
  background: #fff;
  font: inherit;
}

.filter-group {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid #cbd7e4;
  background: #fff;
  border-radius: 999px;
  padding: .45rem .75rem;
  cursor: pointer;
  font-weight: 700;
}

.chip.is-active {
  background: #173b68;
  color: #fff;
  border-color: #173b68;
}

.impact-kpis {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .8rem;
  margin: 1rem 0;
}

.impact-kpis>div {
  background: #f3f7fb;
  border: 1px solid #dbe5ef;
  border-radius: .75rem;
  padding: 1rem;
}

.impact-kpis strong {
  display: block;
  font-size: 1.6rem;
}

.impact-kpis span {
  font-size: .85rem;
  color: #536176;
}

.flow-list {
  display: grid;
  gap: .55rem;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(110px,1.2fr) repeat(6,auto);
  gap: .55rem;
  align-items: center;
  border-top: 1px solid #e4eaf0;
  padding: .7rem 0;
}

.delta {
  display: inline-flex;
  min-width: 2.6rem;
  justify-content: center;
  padding: .22rem .5rem;
  border-radius: 999px;
  font-weight: 800;
}

.delta.positive {
  color: #15733a;
  background: #e6f6ec;
}

.delta.negative {
  color: #b42318;
  background: #fdebea;
}

.delta.neutral {
  color: #697586;
  background: #f1f3f5;
}

.mini-negative {
  color: #b42318;
  font-weight: 700;
}

.empty-row {
  text-align: center;
  color: #697586;
  padding: 1.5rem;
}

.club-editor {
  border: 1px solid #dbe4ed;
  border-radius: .8rem;
  padding: 1rem;
  margin-bottom: .8rem;
  background: #fff;
}

.club-editor-head {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
}

.club-editor-head label:first-child {
  flex: 1;
  min-width: 220px;
}

.club-editor label {
  display: grid;
  gap: .3rem;
  font-size: .85rem;
  font-weight: 700;
}

.club-editor input {
  padding: .55rem;
  border: 1px solid #cbd7e4;
  border-radius: .5rem;
}

.club-editor .check {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.remove-club {
  border: 0;
  background: #fdebea;
  color: #b42318;
  border-radius: .5rem;
  padding: .6rem .8rem;
  font-weight: 700;
  cursor: pointer;
}

.club-fields {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .65rem;
  margin-top: .9rem;
}

@media (max-width:900px) {
  .impact-kpis {
    grid-template-columns: repeat(2,1fr);
  }
  .flow-row {
    grid-template-columns: 1fr 1fr;
  }
  .club-fields {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:560px) {
  .impact-kpis,.club-fields {
    grid-template-columns: 1fr;
  }
  .flow-row {
    display: flex;
    flex-wrap: wrap;
  }
  .scenario-controls>* {
    width: 100%;
  }
}

/*Simulador de quórum*/

.simulator-switch {
  display: flex;
  gap: .5rem;
  margin: 1.2rem 0;
  flex-wrap: wrap;
}

.switch-link {
  display: inline-flex;
  padding: .75rem 1rem;
  border: 1px solid #cbd7e5;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  background: #fff;
  color: #17324d;
}

.switch-link.is-active {
  background: #176fb3;
  color: #fff;
  border-color: #176fb3;
}

.quorum-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.quorum-inputs .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.quorum-inputs label {
  display: grid;
  gap: .35rem;
  font-weight: 700;
  color: #263b52;
}

.quorum-inputs label.wide {
  grid-column: 1/-1;
}

.quorum-inputs input,.quorum-inputs select {
  width: 100%;
  padding: .7rem .75rem;
  border: 1px solid #b9c7d7;
  border-radius: 8px;
  background: #fff;
  font: inherit;
}

.quick-presence {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.quick-presence button {
  border: 1px solid #c4d1df;
  border-radius: 999px;
  padding: .35rem .7rem;
  background: #f7fafc;
  cursor: pointer;
}

.result-panel {
  margin-top: 1rem;
}

.result-status {
  display: flex;
  gap: .8rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid;
}

.result-status.ok {
  background: #f0fdf4;
  border-color: #86d19a;
  color: #135c2c;
}

.result-status.no {
  background: #fff7ed;
  border-color: #f0b36d;
  color: #8b3d0b;
}

.status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 50%;
  font-weight: 900;
  background: rgba(255,255,255,.75);
}

.result-status p {
  margin: .25rem 0 0;
  color: inherit;
}

.result-note {
  font-weight: 700;
}

.vote-balance {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .5rem;
  margin-top: 1rem;
}

.vote-balance>div {
  padding: .7rem;
  border-radius: 9px;
  background: #f3f6f9;
  display: grid;
  gap: .15rem;
}

.vote-balance span {
  font-size: .78rem;
  color: #5d6c7d;
}

.vote-balance strong {
  font-size: 1.15rem;
}

.text-negative {
  color: #b42318;
}

.quorum-visual {
  margin-top: 1rem;
  padding: 1.25rem;
  background: #f6f9fc;
  border: 1px solid #d8e1eb;
  border-radius: 14px;
}

.vote-dot-grid {
  display: grid;
  grid-template-columns: repeat(31,1fr);
  gap: 5px;
  max-width: 900px;
  margin: auto;
}

.vote-dot-grid i {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  min-width: 5px;
}

.q-for {
  background: #2e9b57;
}

.q-against {
  background: #d84b45;
}

.q-abstain {
  background: #e5a52f;
}

.q-blank {
  background: #8a6bb8;
}

.q-unused {
  background: #4c84b8;
}

.q-absent {
  background: #d8dee6;
}

.quorum-legend {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: .88rem;
}

.quorum-legend span {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.quorum-legend i {
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  display: inline-block;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: .8rem;
}

.rules-grid article {
  padding: 1rem;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  background: #fbfcfe;
}

.rules-grid p {
  margin: .35rem 0 0;
  font-size: .9rem;
  color: #53657a;
}

@media (max-width:850px) {
  .quorum-grid {
    grid-template-columns: 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr 1fr;
  }
  .vote-dot-grid {
    grid-template-columns: repeat(20,1fr);
  }
}

@media (max-width:560px) {
  .quorum-inputs .form-grid {
    grid-template-columns: 1fr;
  }
  .quorum-inputs label.wide {
    grid-column: auto;
  }
  .vote-balance {
    grid-template-columns: 1fr 1fr;
  }
  .rules-grid {
    grid-template-columns: 1fr;
  }
  .vote-dot-grid {
    grid-template-columns: repeat(15,1fr);
  }
}

/*Página dos órgãos — v8*/

.organs-hero {
  background: radial-gradient(circle at 88% 25%,rgba(242,201,76,.18),transparent 24%),linear-gradient(145deg,#eef7fd,#fff 68%);
}

.organ-jump {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.35rem;
}

.organ-jump a {
  display: inline-flex;
  padding: .48rem .72rem;
  border: 1px solid #c9d9e7;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: .86rem;
  font-weight: 750;
}

.organ-jump a:hover {
  background: #eaf4fb;
}

.organ-map {
  border: 1px solid #d9e3ec;
  background: linear-gradient(180deg,#fff,#f6f9fc);
  border-radius: 22px;
  padding: 1.8rem 1.4rem 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);

  min-height: 0;
  height: auto;
  max-height: none;
}

.organ-map-top {
  display: flex;
  justify-content: center;
}

.organ-map-grid {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  gap: .8rem;
}

.map-lines {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  height: 42px;
  margin: 0 8%;
}

.map-lines span {
  border-top: 2px solid #cbd9e5;
  border-left: 2px solid #cbd9e5;
}

.map-lines span:last-child {
  border-right: 2px solid #cbd9e5;
}

.map-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .25rem;
  padding: .9rem .6rem;
  border: 1px solid #dbe5ed;
  border-radius: 14px;
  background: #fff;
  min-height: 124px;
}

.map-node.ag {
  width: min(420px,100%);
  border-color: #87b9df;
  background: #edf7fd;
}

.map-node.independent {
  border-top: 4px solid #7c5db3;
}

.map-node.autonomous {
  border-top: 4px solid #2f8a68;
}

.map-node strong {
  font-size: .92rem;
}

.map-node small {
  font-size: .76rem;
  color: var(--muted);
}

.organ-icon {
  display: grid;
  place-items: center;
  flex: 0 0 66px;
  width: 66px;
  height: 66px;
  border-radius: 18px;
  background: #eaf4fb;
  color: #1769aa;
}

.organ-icon svg {
  width: 42px;
  height: 42px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.organ-icon.small {
  width: 44px;
  height: 44px;
  flex-basis: 44px;
  border-radius: 13px;
}

.organ-icon.small svg {
  width: 28px;
  height: 28px;
}

.organ-icon.amber {
  color: #9a6500;
  background: #fff4d5;
}

.organ-icon.teal {
  color: #087878;
  background: #e5f7f5;
}

.organ-icon.violet {
  color: #6c4ba3;
  background: #f0eafb;
}

.organ-icon.red {
  color: #a23b3b;
  background: #faeaea;
}

.organ-icon.green {
  color: #26765b;
  background: #e7f5ef;
}

.organ-card-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1.1rem;
}

.organ-card {
  background: #fff;
  border: 1px solid #dbe4ec;
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 4px 16px rgba(25,45,68,.055);
  scroll-margin-top: 110px;
}

.organ-card-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.organ-card-head h3 {
  font-size: 1.25rem;
  margin: .45rem 0 .25rem;
}

.organ-card-head p {
  margin: 0;
  color: var(--muted);
}

.organ-facts {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .55rem;
  margin: 1.1rem 0;
}

.organ-facts span {
  display: block;
  padding: .72rem;
  background: #f5f8fb;
  border-radius: 10px;
  font-size: .78rem;
  color: #536176;
}

.organ-facts b {
  display: block;
  color: #21354a;
  margin-bottom: .15rem;
}

.organ-card details {
  border-top: 1px solid var(--line);
  padding-top: .8rem;
}

.organ-card summary {
  cursor: pointer;
  font-weight: 800;
  color: var(--blue2);
  list-style: none;
}

.organ-card summary::after {
  content: '＋';
  float: right;
}

.organ-card details[open] summary::after {
  content: '−';
}

.organ-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-top: 1rem;
}

.organ-detail h4 {
  margin: 0 0 .45rem;
}

.organ-detail p,.organ-detail li {
  font-size: .9rem;
  color: #4d5b6d;
}

.organ-detail ul {
  margin: .4rem 0;
  padding-left: 1.15rem;
}

.practice {
  grid-column: 1/-1;
  padding: .85rem 1rem;
  border-left: 4px solid var(--yellow);
  background: #fff9e8;
  border-radius: 0 10px 10px 0;
}

.practice p {
  margin: .25rem 0 0;
  color: #594b1b;
}

.organ-table td:first-child {
  white-space: nowrap;
}

.competence-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .8rem;
}

.competence-grid article {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid #dce5ed;
  border-radius: 13px;
  background: #fff;
}

.competence-grid span {
  color: var(--blue2);
  font-weight: 850;
}

@media (max-width:950px) {
  .organ-map-grid {
    grid-template-columns: repeat(2,1fr);
  }
  .map-lines {
    display: none;
  }
  .organ-card-grid {
    grid-template-columns: 1fr;
  }
  .competence-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:620px) {
  .organ-map-grid,.competence-grid {
    grid-template-columns: 1fr;
  }
  .organ-facts,.organ-detail {
    grid-template-columns: 1fr;
  }
  .organ-card-head {
    display: block;
  }
  .organ-card-head .organ-icon {
    margin-bottom: .8rem;
  }
  .practice {
    grid-column: auto;
  }
}

/*v9 — mapa interativo e fichas modais*/

.organ-map-interactive .map-help {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: .9rem;
  text-align: center;
}

.organ-map-interactive button.map-node {
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease;
  background: #fff;
}

.organ-map-interactive button.map-node:hover,.organ-map-interactive button.map-node:focus-visible,.organ-map-interactive button.map-node.selected {
  transform: translateY(-4px);
  border-color: #2c7fbd;
  box-shadow: 0 12px 28px rgba(24,77,117,.15);
  outline: none;
}

.organ-map-interactive button.map-node.selected {
  background: #edf7fd;
}

.map-action {
  font-size: .72rem;
  font-weight: 850;
  color: var(--blue2);
  opacity: 0;
  transform: translateY(4px);
  transition: .18s;
}

.map-node:hover .map-action,.map-node:focus-visible .map-action,.map-node.selected .map-action {
  opacity: 1;
  transform: none;
}

.map-connectors {
  display: grid;
  grid-template-columns: repeat(5,1fr);
  height: 72px;
  margin: 0 8%;
}

.map-connectors span {
  border-top: 2px solid #cbd9e5;
  border-left: 2px solid #cbd9e5;
}

.map-connectors span:last-child {
  border-right: 2px solid #cbd9e5;
}

.map-relation-panel {
  display: flex;
  gap: .65rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;

  margin-top: 2rem;
  padding: 1rem 1.2rem;

  border-radius: 12px;
  background: #eef6fc;
  color: #3b5268;
  text-align: center;
}

.map-relation-panel strong {
  color: #123d60;
}

.organ-card.compact {
  display: flex;
  flex-direction: column;
  min-height: 350px;
}

.organ-card.compact .organ-facts {
  grid-template-columns: 1fr 1fr;
}

.organ-card-button {
  margin-top: auto;
  justify-content: space-between;
  width: 100%;
}

body.modal-open {
  overflow: hidden;
}

.organ-modal[hidden] {
  display: none;
}

.organ-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.2rem;
}

.organ-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,24,40,.66);
  backdrop-filter: blur(5px);
}

.organ-modal-dialog {
  position: relative;
  width: min(1040px,calc(100vw - 2rem));
  max-height: min(860px,calc(100vh - 2rem));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 28px 90px rgba(0,0,0,.32);
  outline: none;
}

.organ-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #d5e0e8;
  background: #fff;
  font-size: 1.55rem;
  cursor: pointer;
}

.organ-modal-close:hover {
  background: #f1f6f9;
}

.organ-modal-header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  padding: 1.65rem 4.5rem 1.3rem 1.65rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg,#fff,#f4f9fc);
}

.organ-modal-header h2 {
  margin: .35rem 0;
  font-size: 1.7rem;
}

.organ-modal-header p {
  margin: 0;
  color: var(--muted);
  max-width: 760px;
}

.modal-badges {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-top: .8rem;
}

.modal-badges span {
  padding: .38rem .65rem;
  background: #eaf4fb;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 750;
  color: #164f7b;
}

.organ-modal-tabs {
  display: flex;
  gap: .2rem;
  padding: .7rem 1.4rem 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.organ-modal-tabs button {
  border: 0;
  background: transparent;
  padding: .75rem .9rem;
  font: inherit;
  font-weight: 800;
  color: #536176;
  white-space: nowrap;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}

.organ-modal-tabs button.active {
  color: var(--blue2);
  border-bottom-color: var(--blue);
}

.organ-modal-body {
  padding: 1.45rem 1.65rem;
  overflow: auto;
  min-height: 320px;
}

.organ-modal-body h3 {
  margin-top: 0;
  color: #17334c;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.modal-grid section {
  padding: 1rem;
  border: 1px solid #dde6ee;
  border-radius: 14px;
  background: #f9fbfd;
}

.modal-grid section p {
  margin: .25rem 0 0;
  color: #4d5b6d;
}

.modal-grid .practice {
  grid-column: 1/-1;
  background: #fff8e4;
  border: 0;
  border-left: 4px solid var(--yellow);
}

.modal-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem 1.6rem;
  padding-left: 1.25rem;
}

.modal-list li {
  padding-left: .15rem;
  color: #405164;
}

.relation-cards {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: .8rem;
}

.relation-cards article {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: 1rem;
  border: 1px solid #dce6ee;
  border-radius: 13px;
  background: #f7fafc;
}

.relation-cards b {
  color: var(--blue2);
}

.relation-cards span {
  color: #526175;
}

.organ-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1.4rem;
  border-top: 1px solid var(--line);
  background: #f7fafc;
  font-size: .78rem;
  color: var(--muted);
}

@media (max-width:950px) {
  .map-connectors {
    display: none;
  }
  .organ-modal {
    padding: .5rem;
  }
  .organ-modal-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    border-radius: 16px;
  }
  .modal-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width:620px) {
  .organ-modal-header {
    grid-template-columns: 1fr;
    padding: 1.2rem 3.8rem 1rem 1.2rem;
  }
  .organ-modal-header .organ-icon {
    width: 54px;
    height: 54px;
  }
  .organ-modal-header h2 {
    font-size: 1.35rem;
  }
  .organ-modal-tabs {
    padding-left: .65rem;
  }
  .organ-modal-body {
    padding: 1rem;
  }
  .modal-grid,.relation-cards {
    grid-template-columns: 1fr;
  }
  .modal-grid .practice {
    grid-column: auto;
  }
  .organ-modal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .organ-card.compact {
    min-height: auto;
  }
}

/*v10 — Estatutos interativos*/

.statutes-hero {
  background: radial-gradient(circle at 88% 18%,rgba(242,201,76,.2),transparent 22%),linear-gradient(145deg,#eef7fd,#fff 68%);
}

.statutes-title-row {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}

.statutes-count {
  flex: 0 0 auto;
  min-width: 145px;
  text-align: center;
  padding: 1rem;
  border: 1px solid #bcd7eb;
  border-radius: 18px;
  background: #fff;
  color: var(--blue2);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 1.1;
}

.statutes-count small {
  font-size: .78rem;
  color: var(--muted);
}

.statutes-modes {
  display: flex;
  gap: .35rem;
  margin: 2rem 0 1.4rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.statutes-modes button {
  border: 0;
  background: transparent;
  padding: .9rem 1rem;
  font-weight: 850;
  color: #526176;
  cursor: pointer;
  border-bottom: 4px solid transparent;
  white-space: nowrap;
}

.statutes-modes button.active {
  color: var(--blue2);
  border-bottom-color: var(--blue);
}

.statutes-mode {
  display: none;
}

.statutes-mode.active {
  display: block;
}

.statutes-workspace {
  display: grid;
  grid-template-columns: 310px minmax(0,1fr);
  gap: 1.5rem;
}

.statutes-sidebar {
  position: sticky;
  top: 105px;
  align-self: start;
  max-height: calc(100vh - 125px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
  padding: .85rem;
}

.sidebar-search label {
  display: block;
  font-size: .78rem;
  font-weight: 800;
  margin-bottom: .3rem;
}

.sidebar-search input {
  width: 100%;
  padding: .68rem;
  border: 1px solid #cbd6df;
  border-radius: 9px;
  margin-bottom: .75rem;
}

.title-tree details {
  border-top: 1px solid #dbe3ea;
}

.title-tree details:first-of-type {
  border-top: 0;
}

.title-tree summary {
  cursor: pointer;
  padding: .78rem .35rem;
  list-style: none;
}

.title-tree summary span,.title-tree summary b,.title-tree summary small {
  display: block;
}

.title-tree summary span {
  font-size: .7rem;
  color: var(--blue2);
  font-weight: 900;
  text-transform: uppercase;
}

.title-tree summary b {
  font-size: .9rem;
}

.title-tree summary small {
  font-size: .72rem;
  color: var(--muted);
}

.tree-chapter {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: .5rem;
  text-align: left;
  border: 0;
  background: transparent;
  padding: .55rem .6rem;
  border-radius: 8px;
  color: #39495b;
  cursor: pointer;
  font-size: .78rem;
}

.tree-chapter:hover {
  background: #eaf3fa;
  color: var(--blue2);
}

.tree-chapter span {
  color: #748194;
  white-space: nowrap;
}

.content-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.content-toolbar h2 {
  margin: .2rem 0;
}

.chapter-grid {
  display: grid;
  gap: 1rem;
}

.title-card {
  border: 1px solid #dbe4ec;
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(25,45,68,.045);
}

.title-card>header {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1rem;
  padding: 1.2rem;
  background: linear-gradient(135deg,#fff,#f4f9fc);
}

.title-card h3 {
  margin: .35rem 0;
}

.title-card p {
  margin: 0;
  color: var(--muted);
}

.title-roman {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #e8f3fb;
  color: var(--blue2);
  font-size: 1.35rem;
  font-weight: 950;
}

.chapter-list {
  padding: 0 1.2rem 1.2rem;
}

.chapter-list details {
  border-top: 1px solid var(--line);
}

.chapter-list summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
  cursor: pointer;
}

.chapter-list summary span {
  font-size: .8rem;
  color: var(--muted);
}

.chapter-articles {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .55rem;
  padding-bottom: .9rem;
}

.article-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  border: 1px solid #dbe4ec;
  border-radius: 10px;
  background: #fff;
  padding: .7rem .8rem;
  cursor: pointer;
  color: var(--ink);
}

.article-link:hover,.article-link:focus-visible {
  border-color: #65a5d2;
  background: #f0f8fd;
  outline: none;
}

.article-link span {
  font-size: .68rem;
  font-weight: 900;
  color: var(--blue2);
  text-transform: uppercase;
}

.article-link b {
  font-size: .84rem;
  line-height: 1.25;
}

.article-link.mini {
  min-width: 145px;
}

.article-link.network {
  min-width: 170px;
}

.article-link.search-result {
  margin: .45rem 0;
  width: 100%;
}

.mode-intro {
  max-width: 820px;
  margin-bottom: 1.5rem;
}

.mode-intro h2 {
  margin: .2rem 0;
}

.mode-intro p {
  color: var(--muted);
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}

.path-card {
  position: relative;
  border: 1px solid #dbe4ec;
  border-radius: 18px;
  padding: 1.25rem;
  background: #fff;
  overflow: hidden;
}

.path-icon {
  position: absolute;
  right: 1rem;
  top: .7rem;
  font-size: 3.2rem;
  color: #d9ebf7;
  font-weight: 900;
}

.path-card h3 {
  margin: .55rem 0;
}

.path-card>p {
  color: var(--muted);
}

.path-flow {
  display: flex;
  gap: .35rem;
  align-items: center;
  overflow-x: auto;
  padding: .7rem 0 .2rem;
}

.path-flow i {
  font-style: normal;
  color: #8da1b2;
  font-weight: 900;
}

.relations-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
}

.relation-topics {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.relation-topics button {
  text-align: left;
  border: 1px solid #dbe4ec;
  background: #fff;
  border-radius: 10px;
  padding: .75rem;
  cursor: pointer;
  font-weight: 750;
}

.relation-topics button.active {
  background: #eaf4fb;
  border-color: #77afd5;
  color: var(--blue2);
}

.relation-canvas {
  border: 1px solid #dbe4ec;
  border-radius: 18px;
  background: radial-gradient(circle at center,#fff,#f5f8fb);
  padding: 1.2rem;
  min-height: 480px;
}

.network-title {
  text-align: center;
}

.network-title h3 {
  margin: .4rem 0 1.2rem;
}

.network-nodes {
  display: flex;
  justify-content: center;
  gap: .7rem;
  flex-wrap: wrap;
}

.network-edges {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: .55rem;
  margin-top: 1.3rem;
}

.network-edges button {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .6rem;
  border: 1px solid #dfe6ec;
  background: #fff;
  border-radius: 10px;
  padding: .65rem;
  color: #506074;
}

.network-edges b {
  font-size: .7rem;
  text-transform: uppercase;
  color: #8b5f00;
  background: #fff3cd;
  padding: .25rem .45rem;
  border-radius: 99px;
}

.relation-legend {
  display: flex;
  justify-content: center;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1rem;
  font-size: .75rem;
  color: var(--muted);
}

.relation-legend span {
  display: flex;
  gap: .3rem;
  align-items: center;
}

.relation-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.article-modal[hidden],.article-search-modal[hidden] {
  display: none;
}

.article-modal,.article-search-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.article-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8,24,40,.68);
  backdrop-filter: blur(5px);
}

.article-modal-dialog,.search-dialog {
  position: relative;
  width: min(980px,calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0,0,0,.35);
  outline: none;
}

.article-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid #d3dee7;
  background: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
}

.article-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 4.5rem 1.2rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg,#fff,#f1f8fc);
}

.article-number {
  font-size: .72rem;
  font-weight: 950;
  color: var(--blue2);
  text-transform: uppercase;
}

.article-modal-header h2 {
  font-size: 1.8rem;
  margin: .25rem 0;
}

.article-modal-header p {
  margin: 0;
  color: var(--muted);
}

.article-modal-tabs {
  display: flex;
  gap: .15rem;
  padding: .6rem 1.2rem 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.article-modal-tabs button {
  border: 0;
  background: transparent;
  padding: .75rem .85rem;
  font-weight: 800;
  color: #586779;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.article-modal-tabs button.active {
  color: var(--blue2);
  border-bottom-color: var(--blue);
}

.article-modal-body {
  padding: 1.35rem 1.5rem;
  overflow: auto;
  min-height: 300px;
}

.article-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.2rem;
  border-top: 1px solid var(--line);
  background: #f7fafc;
  font-size: .76rem;
  color: var(--muted);
}

.article-modal-footer div {
  display: flex;
  gap: .4rem;
}

.article-modal-footer button:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.article-summary-grid,.source-grid {
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 1rem;
}

.article-summary-grid section,.source-grid section {
  padding: 1rem;
  border: 1px solid #dce5ed;
  border-radius: 14px;
  background: #f9fbfd;
}

.article-summary-grid h3 {
  margin: .3rem 0;
}

.topic-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .7rem;
}

.topic-tags span {
  padding: .35rem .55rem;
  border-radius: 999px;
  background: #eaf4fb;
  color: var(--blue2);
  font-size: .75rem;
  font-weight: 750;
}

.article-relations {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: .7rem;
}

.article-relations>div {
  position: relative;
  border: 1px solid #dce5ed;
  border-radius: 13px;
  padding: 2rem .8rem .8rem;
  background: #f9fbfd;
}

.article-relations .article-link {
  width: 100%;
}

.article-relations p {
  margin: .45rem 0 0;
  font-size: .78rem;
  color: var(--muted);
}

.relation-type {
  position: absolute;
  top: .55rem;
  left: .7rem;
  font-size: .65rem;
  text-transform: uppercase;
  font-weight: 900;
  color: #8b5f00;
}

.practice-panel {
  padding: 1.2rem;
  border-radius: 14px;
  background: #fff7dc;
  border-left: 5px solid var(--yellow);
}

.practice-panel h3 {
  margin: .3rem 0;
}

.search-dialog {
  width: min(720px,calc(100vw - 2rem));
  padding: 1.5rem;
  overflow: auto;
}

.search-dialog h2 {
  margin-top: 0;
}

.search-dialog label {
  display: block;
  font-weight: 800;
  font-size: .8rem;
}

.search-dialog input {
  width: 100%;
  padding: .8rem;
  border: 1px solid #cbd6df;
  border-radius: 10px;
  margin: .35rem 0 1rem;
}

.search-results {
  max-height: 60vh;
  overflow: auto;
}

@media (max-width:950px) {
  .statutes-workspace,.relations-layout {
    grid-template-columns: 1fr;
  }
  .statutes-sidebar {
    position: static;
    max-height: none;
  }
  .paths-grid {
    grid-template-columns: 1fr;
  }
  .chapter-articles {
    grid-template-columns: 1fr;
  }
  .network-edges {
    grid-template-columns: 1fr;
  }
  .statutes-title-row {
    display: block;
  }
  .statutes-count {
    display: inline-block;
    margin-top: 1rem;
  }
  .article-summary-grid,.source-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width:620px) {
  .content-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .title-card>header {
    grid-template-columns: 1fr;
  }
  .paths-grid {
    grid-template-columns: 1fr;
  }
  .article-modal,.article-search-modal {
    padding: .4rem;
  }
  .article-modal-dialog,.search-dialog {
    width: calc(100vw - .8rem);
    max-height: calc(100vh - .8rem);
    border-radius: 15px;
  }
  .article-modal-header {
    display: block;
    padding: 1.2rem 3.8rem 1rem 1rem;
  }
  .article-modal-header .btn {
    margin-top: .8rem;
  }
  .article-modal-body {
    padding: 1rem;
  }
  .article-relations {
    grid-template-columns: 1fr;
  }
  .article-modal-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .network-edges button {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

/*Versão 11*/

.compare-toolbar,.guide-toolbar {
  display: flex;
  gap: 1rem;
  align-items: end;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.compare-toolbar label {
  display: grid;
  gap: .35rem;
  font-weight: 700;
}

.compare-toolbar select,.compare-toolbar input,.guide-toolbar input {
  min-width: 240px;
  padding: .8rem .9rem;
  border: 1px solid #cbd5e1;
  border-radius: .7rem;
  background: #fff;
  font: inherit;
}

.compare-grid {
  display: grid;
  gap: 1.25rem;
}

.compare-card {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 1rem;
  padding: 1.35rem;
  box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.compare-head {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex-wrap: wrap;
}

.compare-head h2 {
  margin: .1rem 0;
}

.change {
  display: inline-flex;
  padding: .3rem .6rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
}

.change.new {
  background: #dcfce7;
  color: #166534;
}

.change.reform {
  background: #dbeafe;
  color: #1e40af;
}

.change.reinforced {
  background: #fef3c7;
  color: #92400e;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}

.before-after section {
  padding: 1rem;
  border-radius: .8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.before-after h3 {
  margin-top: 0;
}

.impact {
  border-left: 4px solid var(--accent,#eb6b2c);
  padding-left: 1rem;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  background: #f8fafc;
  border-radius: 1rem;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 1rem;
}

.quick-grid article {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: 1rem;
  padding: 1.1rem;
}

.quick-grid article>span {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #0f2747;
  color: #fff;
  font-weight: 800;
}

.quick-grid h3 {
  margin: .75rem 0 .35rem;
}

.glossary-list {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 1rem;
}

.glossary-list>div {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: .9rem;
  padding: 1rem;
}

.glossary-list dt {
  font-weight: 850;
  font-size: 1.05rem;
}

.glossary-list dd {
  margin: .45rem 0 0;
  color: #475569;
}

.faq-list {
  display: grid;
  gap: .75rem;
}

.faq-list details {
  background: #fff;
  border: 1px solid #dbe3ec;
  border-radius: .85rem;
  padding: 0 1rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 800;
  padding: 1rem 0;
}

.faq-list details p {
  margin-top: 0;
}

.timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 0;
}

.timeline li {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.5rem;
}

.timeline li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 2.5rem;
  bottom: 0;
  width: 2px;
  background: #cbd5e1;
}

.timeline li>span {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0f2747;
  color: #fff;
  font-weight: 900;
  z-index: 1;
}

.timeline h3 {
  margin: .1rem 0 .25rem;
}

@media (max-width:850px) {
  .before-after,.glossary-list {
    grid-template-columns: 1fr;
  }
  .quick-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width:560px) {
  .quick-grid {
    grid-template-columns: 1fr;
  }
  .compare-toolbar label,.compare-toolbar select,.compare-toolbar input,.guide-toolbar input {
    width: 100%;
    min-width: 0;
  }
}

/*Versão 12 — Principais alterações detalhadas*/

.changes-hero {
  background: linear-gradient(135deg,#f8fbfd 0%,#eef7fc 62%,#fff8e2 100%);
}

.eyebrow,.section-kicker {
  display: inline-block;
  font-size: .72rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 900;
  color: var(--blue2);
}

.changes-summary {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.changes-summary div {
  min-width: 145px;
  padding: .8rem 1rem;
  border: 1px solid rgba(28,100,151,.16);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(4px);
}

.changes-summary strong {
  display: block;
  font-size: 1.55rem;
  color: var(--blue2);
}

.changes-summary span {
  font-size: .78rem;
  color: var(--muted);
}

.compact-section {
  padding: 1.6rem 0;
}

.change-jump {
  display: flex;
  gap: .55rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.change-jump a {
  padding: .55rem .8rem;
  border: 1px solid #cfdae4;
  border-radius: 999px;
  background: #fff;
  text-decoration: none;
  font-size: .82rem;
  font-weight: 800;
  color: #3b5268;
}

.change-jump a:hover {
  border-color: var(--blue);
  color: var(--blue2);
  background: #eff8fd;
}

.change-section {
  scroll-margin-top: 90px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.section-heading h2 {
  margin: .25rem 0 .4rem;
}

.section-heading p {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
}

.change-box-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 1rem;
}

.change-box {
  display: grid;
  gap: .75rem;
  background: #fff;
  border: 1px solid #d9e3ec;
  border-radius: 18px;
  padding: 1.15rem;
  box-shadow: 0 7px 24px rgba(20,43,65,.055);
}

.change-box.featured {
  border-top: 4px solid var(--yellow);
}

.change-box>header {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: flex-start;
}

.change-number {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 12px;
  background: #102f4b;
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
}

.change-box h3 {
  margin: .35rem 0 0;
  font-size: 1.18rem;
}

.mini-box {
  border-radius: 12px;
  padding: .8rem .9rem;
  border: 1px solid #e0e7ee;
}

.mini-box strong {
  display: block;
  margin-bottom: .25rem;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.mini-box p {
  margin: 0;
  font-size: .9rem;
  line-height: 1.52;
  color: #4d5b6c;
}

.mini-box.before {
  background: #f7f8fa;
}

.mini-box.before strong {
  color: #687584;
}

.mini-box.after {
  background: #eef8fd;
  border-color: #cee5f4;
}

.mini-box.after strong {
  color: #155c8d;
}

.mini-box.practical {
  background: #fff9e9;
  border-color: #f2df9e;
}

.mini-box.practical strong {
  color: #8a6400;
}

.change-box footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .7rem;
  padding-top: .2rem;
  font-size: .78rem;
}

.change-box footer span {
  font-weight: 850;
  color: #536176;
}

.change-box footer a {
  font-weight: 850;
  color: var(--blue2);
  text-decoration: none;
}

.change-box footer a:hover {
  text-decoration: underline;
}

.change-box .change {
  font-size: .68rem;
  padding: .24rem .5rem;
}

.changes-next {
  padding-top: 2.5rem;
}

.next-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding: 1.7rem;
  border-radius: 20px;
  background: #102f4b;
  color: #fff;
}

.next-panel h2 {
  margin: .25rem 0;
}

.next-panel p {
  margin: 0;
  color: #d9e7f2;
}

.next-actions {
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
}

.next-panel .btn.ghost {
  color: #fff;
  border-color: #7693aa;
  background: transparent;
}

.next-panel .btn.ghost:hover {
  background: #fff;
  color: #102f4b;
}

@media (max-width:850px) {
  .change-box-grid {
    grid-template-columns: 1fr;
  }
  .section-heading,.next-panel {
    align-items: flex-start;
    flex-direction: column;
  }
  .next-actions {
    width: 100%;
  }
}

@media (max-width:560px) {
  .changes-summary {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: .4rem;
  }
  .changes-summary div {
    min-width: 0;
    padding: .65rem;
  }
  .changes-summary strong {
    font-size: 1.2rem;
  }
  .changes-summary span {
    font-size: .66rem;
  }
  .change-box footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .change-jump {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .change-jump a {
    text-align: center;
  }
  .next-actions {
    display: grid;
  }
  .next-actions .btn {
    text-align: center;
  }
}

/*v13 — consulta integral*/

.full-controls {
  display: flex;
  gap: 1rem;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.full-searchbox {
  flex: 1;
  min-width: 280px;
}

.full-searchbox label {
  display: block;
  font-weight: 800;
  margin-bottom: .45rem;
}

.full-searchbox input {
  width: 100%;
  padding: .9rem 1rem;
  border: 1px solid #cfd6de;
  border-radius: 12px;
  font: inherit;
}

.view-switch {
  display: flex;
  padding: .25rem;
  background: #eef2f5;
  border-radius: 12px;
}

.view-switch button {
  border: 0;
  background: transparent;
  padding: .65rem .9rem;
  border-radius: 9px;
  font-weight: 800;
}

.view-switch button.active {
  background: #fff;
  box-shadow: 0 2px 8px #0001;
}

.full-index {
  display: grid;
  grid-template-columns: minmax(250px,340px) 1fr;
  gap: 1.5rem;
}

.full-tree {
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 16px;
  padding: .5rem;
  max-height: 72vh;
  overflow: auto;
  position: sticky;
  top: 1rem;
}

.full-tree summary {
  cursor: pointer;
  padding: .8rem;
  border-radius: 10px;
}

.full-tree summary span,.full-tree summary small {
  display: block;
  color: #68727d;
}

.full-tree summary b {
  display: block;
  margin: .15rem 0;
}

.full-article-list {
  display: grid;
  gap: .25rem;
  padding: .25rem;
}

.full-article-list button {
  text-align: left;
  border: 0;
  background: #f7f8fa;
  padding: .65rem .75rem;
  border-radius: 9px;
  cursor: pointer;
}

.full-article-list button:hover,.full-article-list button:focus {
  background: #fff0e8;
  outline: 2px solid #ee6b2f;
}

.full-article-list span {
  font-size: .78rem;
  color: #6a727c;
  display: block;
}

.full-index-intro {
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 16px;
  padding: 2rem;
  align-self: start;
}

.full-articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(270px,1fr));
  gap: 1rem;
}

.full-article-card {
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.full-article-card h3 {
  font-size: .9rem;
  color: #ef6c2f;
  margin: .7rem 0 .1rem;
}

.full-article-card h4 {
  font-size: 1.15rem;
  margin: .15rem 0 .6rem;
}

.full-article-card p {
  flex: 1;
}

.full-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.full-modal[hidden] {
  display: none;
}

.full-modal-backdrop {
  position: absolute;
  inset: 0;
  background: #0b1723cc;
  backdrop-filter: blur(3px);
}

.full-modal-dialog {
  position: relative;
  width: min(1050px,calc(100% - 2rem));
  max-height: 92vh;
  overflow: hidden;
  margin: 4vh auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 25px 80px #0007;
  display: flex;
  flex-direction: column;
}

.full-modal-head {
  padding: 1.35rem 4rem 1.1rem 1.5rem;
  border-bottom: 1px solid #e2e7eb;
}

.full-modal-head h2 {
  margin: .15rem 0;
}

.full-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  background: #f0f2f4;
  cursor: pointer;
}

.full-tabs {
  display: flex;
  gap: .25rem;
  padding: .7rem 1.5rem;
  border-bottom: 1px solid #e2e7eb;
  overflow: auto;
}

.full-tabs button {
  border: 0;
  background: transparent;
  padding: .65rem .8rem;
  border-radius: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.full-tabs button.active {
  background: #fff0e8;
  color: #a84316;
}

.full-modal-body {
  padding: 1.5rem;
  overflow: auto;
  line-height: 1.65;
}

.official-text {
  font-family: Georgia,'Times New Roman',serif;
  font-size: 1.04rem;
  white-space: normal;
}

.official-badge {
  display: inline-block;
  background: #17324d;
  color: #fff;
  padding: .3rem .6rem;
  border-radius: 999px;
  font: 700 .75rem system-ui;
  margin-bottom: 1rem;
}

.full-modal-foot {
  border-top: 1px solid #e2e7eb;
  padding: 1rem 1.5rem;
  display: flex;
  gap: .7rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.full-modal-actions {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

@media (max-width:800px) {
  .full-index {
    grid-template-columns: 1fr;
  }
  .full-tree {
    position: static;
    max-height: none;
  }
  .full-modal-dialog {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }
  .full-modal-head {
    padding-top: 1rem;
  }
  .full-modal-foot {
    position: sticky;
    bottom: 0;
    background: #fff;
  }
}

/*v14a revisão — navegação e tipografia estatutária*/

.sitehead nav a[aria-current="page"] {
  background: #edf5fb;
  color: var(--blue2);
  font-weight: 800;
}

.official-text {
  max-width: 78ch;
  margin: 0 auto;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink);
  letter-spacing: 0;
}

.official-text p {
  margin: 0 0 1rem;
}

.official-text .statute-clause,
.official-text .statute-item {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: start;
  column-gap: 0.65rem;
}

.official-text .statute-item {
  margin-left: 1.7rem;
}

.official-text .statute-marker {
  min-width: 2.25rem;
  font-weight: 800;
  color: #23364a;
  white-space: nowrap;
}

.official-text .statute-formula {
  margin: 1.15rem 0 1.35rem;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f9fb;
}

.official-text .statute-formula pre {
  margin: 0;
  font-family: "Cambria Math", "STIX Two Math", "Segoe UI Symbol", ui-monospace, monospace;
  font-size: 1rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.full-modal-head h2,
.full-article-card h4,
.full-tree summary b {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (max-width: 620px) {
  .official-text {
    font-size: 0.98rem;
    line-height: 1.68;
  }
  .official-text .statute-item {
    margin-left: 0.7rem;
  }
  .official-text .statute-clause,
  .official-text .statute-item {
    column-gap: 0.45rem;
  }
}


/* v14c — leitor de Estatutos em duas colunas */
.full-controls {
  grid-template-columns: minmax(0, 1fr);
}

.full-index {
  align-items: start;
}

.full-article-list button[aria-current="true"] {
  background: #fff0e8;
  box-shadow: inset 3px 0 0 #ee6b2f;
}

.statute-reader {
  min-width: 0;
  align-self: start;
  background: #fff;
  border: 1px solid #dde3e8;
  border-radius: 16px;
  overflow: hidden;
  position: sticky;
  top: 1rem;
}

.statute-reader-placeholder {
  padding: 2rem;
}

.statute-reader-article {
  min-width: 0;
}

.statute-reader-head {
  padding: 1.45rem 1.6rem 1.15rem;
  border-bottom: 1px solid #e2e7eb;
}

.statute-reader-head .article-number {
  display: block;
  margin-bottom: .3rem;
  color: #a84316;
  font-weight: 800;
  letter-spacing: .02em;
}

.statute-reader-head h2 {
  margin: 0 0 .35rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.2;
}

.statute-reader-head p {
  margin: 0;
  color: #68727d;
}

.statute-reader-body {
  max-height: calc(72vh - 205px);
  min-height: 320px;
  padding: 1.5rem 1.6rem;
  overflow: auto;
  overscroll-behavior: contain;
}

.statute-reader .official-text {
  max-width: none;
  margin: 0;
}

.statute-reader-foot {
  border-top: 1px solid #e2e7eb;
  padding: 1rem 1.5rem;
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  background: #fff;
}

.reader-pager {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

@media (max-width: 800px) {
  .statute-reader {
    position: static;
  }

  .statute-reader-body {
    max-height: none;
    min-height: 0;
    overflow: visible;
  }

  .statute-reader-foot {
    position: static;
  }
}


/* v17c — identidade ACL, largura e navegação uniformizada */
:root {
  --max: 1460px;
}

.wrap {
  width: min(calc(100% - 48px), var(--max));
  max-width: none;
  margin-left: auto;
  margin-right: auto;
  padding-left: 0;
  padding-right: 0;
}

.brand {
  min-width: max-content;
  gap: 0.8rem;
}

.brand-logo {
  display: block;
  width: 42px;
  height: 62px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-copy {
  display: block;
}

.brand-copy strong {
  display: block;
  font-size: 1.05rem;
}

.brand-copy small {
  display: block;
  color: var(--muted);
}

.brandrow {
  min-height: 86px;
}

.sitehead.open nav {
  top: 86px;
}

nav a {
  padding-left: 0.64rem;
  padding-right: 0.64rem;
}

@media (max-width: 1120px) {
  .sitehead nav {
    display: none;
  }

  .menu-btn {
    display: block;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 9px;
    padding: 0.55rem;
  }

  .sitehead.open nav {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 86px;
    background: #fff;
    padding: 1rem;
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 620px) {
  .wrap {
    width: calc(100% - 32px);
  }

  .brand-logo {
    width: 34px;
    height: 52px;
  }

  .brandrow {
    min-height: 72px;
  }

  .sitehead.open nav {
    top: 72px;
  }

  .brand-copy small {
    display: none;
  }
}
