/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --ink: #0E2A3B;
  --ink-2: #4A6172;          /* texto secundário: 6,47:1 em branco, 5,81:1 em tile */
  --ground: #FFFFFF;
  --tile: #E8F5F9;
  --rule: #C4D6DE;
  --dim: #B9C9D2;            /* linha inactiva no mapa, sólida */
  --action: #FFC629;         /* acção única: tinta --ink por cima, 9,46:1 */
  --action-hover: #FFD65E;
  --logo: #5CC4D8;
  --on-dark: #FFFFFF;        /* texto sobre --ink */
  --on-dark-2: #C9D8E0;      /* texto de apoio sobre --ink */
  --rule-dark: #2A4657;      /* filete sobre --ink */

  /* linhas da rede — texto sobre a cor medido ≥4,5:1 */
  --l-i: #0B5E8E;  --l-i-on: #FFFFFF;
  --l-s: #0F7584;  --l-s-on: #FFFFFF;
  --l-p: #5CC4D8;  --l-p-on: #0E2A3B;
  --l-m: #C23A62;  --l-m-on: #FFFFFF;
  --l-f: #287A45;  --l-f-on: #FFFFFF;
  --l-r: #B24A18;  --l-r-on: #FFFFFF;

  --f-display: "Overpass", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", "Segoe UI", system-ui, sans-serif;

  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2rem; --s-7: 3rem; --s-8: 4.5rem; --s-9: 7rem;

  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 84rem;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.125rem/1.6 var(--f-body);
  font-variant-numeric: lining-nums;
  accent-color: var(--ink);
  caret-color: var(--ink);
}
img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }
::selection { background: var(--action); color: var(--ink); }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--action);
  border-radius: 2px;
}
a { color: var(--l-i); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-display); margin: 0; letter-spacing: -.02em; text-wrap: balance; overflow-wrap: break-word; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: var(--s-4); top: var(--s-4); z-index: 20; background: var(--action); color: var(--ink); padding: var(--s-3) var(--s-4); font-weight: 700; }
.sr-only, .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Cabeçalho: faixa de sinalética com o feixe de linhas ─ */
.site-head { background: var(--ground); position: relative; }
.site-head::after {
  content: ""; display: block; height: 8px;
  background: linear-gradient(90deg,
    var(--l-i) 0 16.66%, var(--l-s) 0 33.33%, var(--l-p) 0 50%,
    var(--l-m) 0 66.66%, var(--l-f) 0 83.33%, var(--l-r) 0);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); padding-block: var(--s-3); flex-wrap: wrap; }
.brand { display: flex; align-items: center; min-height: 44px; }
.brand img { height: 72px; width: auto; }
.nav { display: flex; gap: var(--s-1); flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s-4);
  font: 700 1.0625rem/1 var(--f-display); color: var(--ink); text-decoration: none;
  border: 2px solid transparent;
}
.nav a:hover { border-color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--on-dark); }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2); min-height: 48px;
  padding: 0 var(--s-5); border: 2px solid var(--ink); background: var(--ground); color: var(--ink);
  font: 800 1.0625rem/1 var(--f-display); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--tile); color: var(--ink); }
.btn--action { background: var(--action); }
.btn--action:hover { background: var(--action-hover); }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* ── Hexágono (estação) ─────────────────────────────────── */
.hex {
  display: inline-grid; place-items: center; flex: none;
  width: 2.75rem; aspect-ratio: 1 / .866;
  clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%);
  background: var(--c, var(--ink)); color: var(--on, var(--on-dark));
  font: 800 .9375rem/1 var(--f-display); letter-spacing: 0;
}
.hex--ring { background: var(--ink); position: relative; }
.hex--ring > span {
  position: absolute; inset: 4px;
  clip-path: inherit; background: var(--ground); color: var(--ink);
  display: grid; place-items: center;
}
[data-l="I"] { --c: var(--l-i); --on: var(--l-i-on); }
[data-l="S"] { --c: var(--l-s); --on: var(--l-s-on); }
[data-l="P"] { --c: var(--l-p); --on: var(--l-p-on); }
[data-l="M"] { --c: var(--l-m); --on: var(--l-m-on); }
[data-l="F"] { --c: var(--l-f); --on: var(--l-f-on); }
[data-l="R"] { --c: var(--l-r); --on: var(--l-r-on); }

/* ── Primeira dobra: "Que apoio procura?" ───────────────── */
.rede { padding-block: var(--s-6) var(--s-8); }
.rede .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6) var(--s-7); align-items: start; }
.rede h1 {
  font-size: clamp(2.75rem, 1.2rem + 5.2vw, 5.75rem);
  line-height: .92; font-weight: 900; letter-spacing: -.035em;
}
.rede .lede { margin-top: var(--s-5); font-size: 1.25rem; max-width: 34ch; }
.rede .lede strong { font-weight: 700; }

.needs { margin: var(--s-6) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); position: relative; }
.needs > li { position: relative; }
.needs > li + li::before { content: ""; position: absolute; left: calc(var(--s-2) + 2px + 1.25rem - 4px); top: calc(-1 * var(--s-2) - 2px); height: calc(var(--s-2) + 4px); width: 8px; background: var(--ink); }
.need {
  width: 100%; display: flex; align-items: center; gap: var(--s-3);
  min-height: 56px; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-2);
  background: var(--ground); color: var(--ink); text-align: left; cursor: pointer;
  border: 2px solid var(--rule); font: 700 1.125rem/1.3 var(--f-display);
  transition: border-color .15s, background-color .15s;
}
.need .hex { width: 2.5rem; }
.need small { display: block; font: 400 .9375rem/1.35 var(--f-body); color: var(--ink-2); margin-top: 2px; }
.need .arrow { margin-left: auto; width: 1.25rem; height: 1.25rem; flex: none; transition: transform .25s var(--ease-out); }
.need:hover { border-color: var(--ink); }
.need[aria-expanded="true"] { border-color: var(--c); background: var(--c); color: var(--on); }
.need[aria-expanded="true"] small { color: inherit; }
.need[aria-expanded="true"] .hex { background: var(--on); color: var(--c); }
.need[aria-expanded="true"] .arrow { transform: rotate(90deg); }

.clear { margin-top: var(--s-3); background: none; border: 0; padding: var(--s-2) 0; min-height: 44px; font: 700 1rem var(--f-display); color: var(--ink); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }

/* ── Mapa SVG ───────────────────────────────────────────── */
.map { position: sticky; top: var(--s-4); margin: 0; }
.map svg { width: 100%; height: auto; display: block; overflow: visible; }
.map .ln { fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s; }
.map .ln-case { fill: none; stroke: var(--ink); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.map .st polygon { stroke: var(--ink); stroke-width: 5; fill: var(--ground); transition: fill .3s; }
.map .sign rect { fill: var(--c); }
.map .sign text { fill: var(--on); font: 800 18px var(--f-display); }
.map[data-active] .sign:not(.on) rect { fill: var(--dim); }
.map[data-active] .sign:not(.on) text { fill: var(--ink); }

.map .st text { font: 700 21px var(--f-display); fill: var(--ink); }
.map .st .code { font: 800 16px var(--f-display); fill: var(--ink); }
.map .st { cursor: pointer; }
.map .st:hover polygon { fill: var(--tile); }
.map .hub polygon { fill: var(--ink); stroke: none; }
.map .hub text { fill: var(--on-dark); font: 900 26px var(--f-display); letter-spacing: -.5px; }
.map .hub .sub { font: 700 13px var(--f-display); letter-spacing: .5px; }
.map[data-active] .ln:not(.on) { stroke: var(--dim); }
.map[data-active] .ln-case:not(.on) { stroke: var(--dim); }
.map[data-active] .st:not(.on) text { fill: var(--ink-2); }
.map[data-active] .st:not(.on) polygon { stroke: var(--dim); }
.map .st.on polygon { fill: var(--c); stroke: var(--ink); }
.map .st.on .code { fill: var(--on); }
.map .st.sel polygon { fill: var(--ink); stroke: var(--ink); }
.map .st.sel .code { fill: var(--on-dark); }
.map .ln.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw .7s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .map .ln.draw { animation: none; stroke-dashoffset: 0; } }

/* ── Estações da linha escolhida (strip map) ────────────── */
.strip { padding: var(--s-3) 0 var(--s-4); }
.strip h2 { font-size: 1.5rem; font-weight: 800; display: flex; align-items: center; gap: var(--s-3); }
.stops { list-style: none; margin: var(--s-4) 0 0; padding: 0; position: relative; }
.stops::before {
  content: ""; position: absolute; left: calc(1.375rem - 6px); top: 1.5rem; bottom: 1.5rem; width: 12px; background: var(--c);
}
.stops li { position: relative; }
.stop {
  width: 100%; display: flex; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-2) var(--s-3) var(--s-2) 0;
  background: none; border: 0; color: var(--ink); text-align: left; cursor: pointer; font: inherit;
}
.stop .hex { position: relative; z-index: 1; }
.stop b { font: 800 1.1875rem/1.3 var(--f-display); display: block; }
.stop span.what { display: block; font-size: 1rem; color: var(--ink-2); line-height: 1.35; }
.stop:hover b { text-decoration: underline; text-underline-offset: .18em; }
.stop[aria-expanded="true"] .hex { background: var(--ink); color: var(--on-dark); }

/* ── Ficha de atendimento ───────────────────────────────── */
.ficha {
  margin: var(--s-2) 0 var(--s-4) 3.75rem; padding: var(--s-5);
  background: var(--tile); border-top: 6px solid var(--c);
  animation: open .45s var(--ease-out);
}
@keyframes open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: reduce) { .ficha { animation: none; } }
.ficha p + p { margin-top: var(--s-3); }
.ficha .who { font-size: 1rem; color: var(--ink-2); }
.contacts { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-5); }
.contacts .btn { font-size: 1rem; min-height: 48px; padding: 0 var(--s-4); }
.addr { margin-top: var(--s-4); font-size: 1rem; }
.addr b { font-family: var(--f-display); }
.missing { margin-top: var(--s-4); font-size: 1rem; color: var(--ink-2); font-style: italic; }
.ficha .more { display: inline-flex; align-items: center; min-height: 44px; margin-top: var(--s-2); font: 700 1rem var(--f-display); }

/* ── Secções ────────────────────────────────────────────── */
.section { padding-block: var(--s-8); }
.section--tile { background: var(--tile); }
.section--ink { background: var(--ink); color: var(--on-dark); }
.section--ink a { color: var(--on-dark); }
.sec-head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6) var(--s-7); align-items: end; margin-bottom: var(--s-7); }
.sec-head h2 { font-size: clamp(2rem, 1rem + 3vw, 3.5rem); line-height: 1; font-weight: 900; letter-spacing: -.03em; }
.sec-head p { max-width: 52ch; font-size: 1.125rem; }

/* Linhas de leitura */
.reading { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7); }
.series h3 { font-size: 1.625rem; font-weight: 800; line-height: 1.1; display: flex; gap: var(--s-3); align-items: center; }
.series > p { margin-top: var(--s-2); color: var(--ink-2); }
.series ol { list-style: none; margin: var(--s-5) 0 0; padding: 0; position: relative; counter-reset: st; }
.series ol::before { content: ""; position: absolute; left: calc(1.125rem - 5px); top: 1.25rem; bottom: 1.25rem; width: 10px; background: var(--c); }
.series li { position: relative; }
.series li a {
  display: flex; align-items: center; gap: var(--s-4); min-height: 52px; padding-block: var(--s-1);
  color: var(--ink); text-decoration: none; font: 700 1.0625rem/1.25 var(--f-display);
}
.series li a .hex { width: 2.25rem; font-size: .875rem; background: var(--c); color: var(--on); position: relative; z-index: 1; }
.series li a:hover span:last-child { text-decoration: underline; text-underline-offset: .18em; }

/* Feiras */
.fairs { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--s-3); }
.fairs figure { margin: 0; position: relative; overflow: hidden; background: var(--ink); }
.fairs img { width: 100%; height: 100%; object-fit: cover; }
.fairs .f1 { grid-column: 1 / span 7; grid-row: 1 / span 2; }
.fairs .f2 { grid-column: 8 / span 5; aspect-ratio: 4 / 3; }
.fairs .f3 { grid-column: 8 / span 5; aspect-ratio: 4 / 3; }
.fairs figcaption { position: absolute; left: 0; bottom: 0; background: var(--ink); color: var(--on-dark); padding: var(--s-2) var(--s-3); font: 700 .9375rem/1.3 var(--f-display); max-width: 100%; }
.events { list-style: none; margin: var(--s-6) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5) var(--s-7); }
.events li { border-top: 4px solid var(--ink); padding-top: var(--s-4); }
.events .when { font: 700 1rem var(--f-display); color: var(--ink-2); margin-top: var(--s-1); }
.events h3 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.events p { margin-top: var(--s-2); }

/* A rede: quadro de parceiros */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-6); }
.board h3 { font-size: 1.5rem; font-weight: 900; line-height: 1.1; color: var(--logo); padding-bottom: var(--s-2); }
.board ul { list-style: none; margin: var(--s-3) 0 0; padding: 0; }
.board li { font: 700 1.25rem/1.3 var(--f-display); padding-block: var(--s-3); border-top: 2px solid var(--rule-dark); }
.board li a { color: var(--on-dark); text-underline-offset: .2em; display: inline-flex; min-height: 44px; align-items: center; }
.board li a:hover { color: var(--logo); }
.board li small { display: block; font: 400 1rem/1.4 var(--f-body); color: var(--on-dark-2); }

/* Rodapé */
.site-foot { background: var(--tile); padding-block: var(--s-7) var(--s-6); }
.site-foot .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6); }
.site-foot img { height: 80px; width: auto; }
.site-foot p { margin-top: var(--s-4); max-width: 44ch; font-size: 1rem; }
.foot-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-5); align-content: start; }
.foot-nav h2 { font-size: 1rem; font-weight: 800; }
.foot-nav ul { list-style: none; margin: var(--s-2) 0 0; padding: 0; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); font-size: 1rem; }
.foot-legal { grid-column: 1 / -1; border-top: 2px solid var(--rule); padding-top: var(--s-4); font-size: .9375rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.foot-legal a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }

/* ── Artigo ─────────────────────────────────────────────── */
.crumbs { font: 700 .9375rem var(--f-display); padding-block: var(--s-4) 0; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.crumbs li + li::before { content: "/"; margin-right: var(--s-2); color: var(--ink-2); }
.crumbs a { color: var(--ink); display: inline-flex; min-height: 44px; align-items: center; padding-inline: var(--s-2); margin-inline: calc(-1 * var(--s-2)); }
.crumbs [aria-current] { color: var(--ink-2); display: inline-flex; min-height: 44px; align-items: center; }

.art-head { padding-block: var(--s-5) var(--s-6); }
.art-head .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6) var(--s-7); align-items: end; }
.art-head h1 { font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem); line-height: .98; font-weight: 900; letter-spacing: -.03em; }
.art-head .meta { margin-top: var(--s-5); display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-5); font: 700 1rem var(--f-display); color: var(--ink-2); }
.art-head img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.progress { background: var(--tile); padding-block: var(--s-4); }
.progress .wrap { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.progress p { font: 800 1rem var(--f-display); }
.progress ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; position: relative; }
.progress ol::before { content: ""; position: absolute; left: 1rem; right: 1rem; top: 50%; height: 8px; margin-top: -4px; background: var(--c); }
.progress li { position: relative; }
.progress a { display: grid; place-items: center; width: 44px; height: 44px; text-decoration: none; }
.progress .hex { width: 2.125rem; font-size: .8125rem; background: var(--ground); color: var(--ink); }
.progress .hex.done { background: var(--c); color: var(--on); }
.progress [aria-current] .hex { background: var(--ink); color: var(--on-dark); width: 2.625rem; }

.prose { max-width: calc(40rem + 2 * var(--gutter)); margin-inline: auto; padding: var(--s-7) var(--gutter) var(--s-8); font-size: 1.1875rem; line-height: 1.65; }
.prose > * + * { margin-top: var(--s-4); }
.prose h2 { font-size: 2rem; line-height: 1.1; font-weight: 900; margin-top: var(--s-8); }
.prose h3 { font-size: 1.4375rem; line-height: 1.2; font-weight: 800; margin-top: var(--s-7); }
.prose h2 + *, .prose h3 + * { margin-top: var(--s-3); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: var(--s-2); }
.prose li::marker { color: var(--l-i); }
.prose .summary { background: var(--tile); padding: var(--s-5); list-style: none; counter-reset: s; }
.prose .summary li { counter-increment: s; display: flex; gap: var(--s-3); font: 700 1.125rem/1.3 var(--f-display); }
.prose .summary li::before { content: counter(s); font-weight: 900; color: var(--l-i); min-width: 1ch; }
.prose blockquote { margin: var(--s-7) 0 0; padding: 0; font: 800 clamp(1.5rem, 1rem + 1.5vw, 2rem)/1.2 var(--f-display); letter-spacing: -.02em; }

.help { background: var(--ink); color: var(--on-dark); padding-block: var(--s-8); }
.help .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6) var(--s-7); }
.help h2 { font-size: clamp(2rem, 1rem + 3vw, 3.25rem); line-height: 1; font-weight: 900; letter-spacing: -.03em; }
.help p { margin-top: var(--s-4); color: var(--on-dark-2); max-width: 40ch; }
.help ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.help a.row {
  display: flex; align-items: center; gap: var(--s-4); min-height: 64px; padding: var(--s-3) var(--s-4);
  background: var(--ground); color: var(--ink); text-decoration: none; font: 800 1.1875rem/1.3 var(--f-display);
}
.help a.row small { display: block; font: 400 1rem/1.35 var(--f-body); color: var(--ink-2); }
.help a.row:hover { background: var(--tile); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); max-width: calc(40rem + 2 * var(--gutter)); margin: 0 auto var(--s-8); }
.pager a { display: block; border-top: 4px solid var(--ink); padding-top: var(--s-3); color: var(--ink); text-decoration: none; font: 800 1.125rem/1.3 var(--f-display); }
.pager a small { display: block; font: 700 .9375rem var(--f-display); color: var(--ink-2); }
.pager a:last-child { text-align: right; }
.pager a:hover span { text-decoration: underline; text-underline-offset: .18em; }

/* ── Página de atendimento ──────────────────────────────── */
.station-head { padding-block: var(--s-6) var(--s-7); border-bottom: 12px solid var(--c); }
.station-head .wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s-5) var(--s-6); align-items: center; }
.station-head .hex { width: clamp(5rem, 3rem + 6vw, 9rem); font-size: clamp(1.5rem, 1rem + 1.5vw, 2.5rem); }
.station-head .line-name { font: 700 1.1875rem/1.4 var(--f-display); color: var(--ink-2); margin-top: var(--s-3); }
.station-head h1 { font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem); line-height: .98; font-weight: 900; letter-spacing: -.03em; }
.station-body .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-7); padding-block: var(--s-7) var(--s-8); }
.station-body .desc { font-size: 1.3125rem; line-height: 1.55; max-width: 52ch; }
.station-body .desc + p { margin-top: var(--s-4); max-width: 60ch; }
.station-body aside { background: var(--tile); padding: var(--s-5); align-self: start; }
.station-body aside h2 { font-size: 1.25rem; font-weight: 800; }
.station-body aside .contacts { flex-direction: column; align-items: stretch; margin-top: var(--s-4); }
.station-body aside .btn { justify-content: flex-start; }

/* ── Quem somos ─────────────────────────────────────────── */
.intro { padding-block: var(--s-7) var(--s-8); }
.intro .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-6) var(--s-7); align-items: end; }
.intro h1 { font-size: clamp(2.75rem, 1.2rem + 5vw, 5.5rem); line-height: .92; font-weight: 900; letter-spacing: -.035em; }
.intro p { font-size: 1.25rem; max-width: 44ch; }
.values { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6); }
.values li { border-top: 4px solid var(--ink); padding-top: var(--s-4); }
.values h3 { font-size: 1.375rem; font-weight: 800; line-height: 1.15; }
.values p { margin-top: var(--s-2); font-size: 1.0625rem; }
.statement { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6) var(--s-7); }
.statement + .statement { margin-top: var(--s-7); padding-top: var(--s-7); border-top: 2px solid var(--rule); }
.statement h2 { font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem); font-weight: 900; line-height: 1.05; }
.statement p { font-size: 1.3125rem; line-height: 1.5; max-width: 50ch; }

/* ── WordPress ──────────────────────────────────────────── */
/* Séries: passo ainda por publicar, ligação ao guia */
.series > p a { font-weight: 700; }
.series li .soon {
  display: flex; align-items: center; gap: var(--s-4); min-height: 52px; padding-block: var(--s-1);
  color: var(--ink-2); font: 700 1.0625rem/1.25 var(--f-display);
}
.series li .soon .hex { width: 2.25rem; font-size: .875rem; background: var(--dim); color: var(--ink); position: relative; z-index: 1; }
.series li .soon small { display: block; font: 400 .9375rem/1.3 var(--f-body); }
.progress .step-soon { display: grid; place-items: center; width: 44px; height: 44px; }
.progress .step-soon .hex { background: var(--dim); }
.art-head .meta a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 44px; }
.art-head .meta a:hover { color: var(--ink); }

/* Cabeça de página genérica */
.page-head { padding-block: var(--s-5) var(--s-6); }
.page-head h1 { font-size: clamp(2.25rem, 1rem + 4vw, 4.5rem); line-height: .98; font-weight: 900; letter-spacing: -.03em; max-width: 20ch; }
.page-head p { margin-top: var(--s-4); font-size: 1.25rem; max-width: 44ch; }
.page-head .contacts { margin-top: var(--s-6); }
.builder { padding-block: var(--s-5) var(--s-8); }

/* Listas de artigos */
.list-wrap { padding-block: var(--s-5) var(--s-8); }
.post-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-6) var(--s-7); }
.post-list li { border-top: 4px solid var(--ink); padding-top: var(--s-4); }
.post-list h2 { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.post-list h2 a { color: var(--ink); text-decoration: none; }
.post-list h2 a:hover { text-decoration: underline; text-underline-offset: .18em; }
.post-list .when { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); font: 700 1rem var(--f-display); color: var(--ink-2); margin-top: var(--s-2); }
.post-list p + p { margin-top: var(--s-2); }
.pages { margin-top: var(--s-7); }
.pages ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pages a, .pages span { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; padding: 0 var(--s-4); border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font: 800 1rem var(--f-display); }
.pages a:hover { background: var(--tile); }
.pages .current { background: var(--ink); color: var(--on-dark); }
.pages .dots { border-color: transparent; }
.empty { font-size: 1.25rem; max-width: 44ch; margin-bottom: var(--s-5); }

/* Pesquisa */
.search-form { display: flex; flex-wrap: wrap; gap: var(--s-2); max-width: 40rem; }
.search-form label { flex: 1 1 16rem; }
.search-field { width: 100%; min-height: 48px; padding: 0 var(--s-4); border: 2px solid var(--ink); border-radius: 0; font: 400 1.125rem var(--f-body); color: var(--ink); background: var(--ground); }
.search-submit, .wpcf7-submit { min-height: 48px; padding: 0 var(--s-5); border: 2px solid var(--ink); border-radius: 0; background: var(--action); color: var(--ink); font: 800 1.0625rem/1 var(--f-display); cursor: pointer; }
.search-submit:hover, .wpcf7-submit:hover { background: var(--action-hover); }

/* Formulários do Contact Form 7 */
.wpcf7 input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]), .wpcf7 textarea, .wpcf7 select {
  width: 100%; min-height: 48px; padding: var(--s-2) var(--s-4); border: 2px solid var(--ink); border-radius: 0;
  font: 400 1.125rem var(--f-body); color: var(--ink); background: var(--ground);
}
.wpcf7 label { font: 700 1rem var(--f-display); }
.wpcf7 textarea { min-height: 9rem; resize: vertical; }
.wpcf7 ::placeholder { color: var(--ink-2); opacity: 1; }
.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"] { width: 1.5rem; height: 1.5rem; margin: 0 var(--s-2) 0 0; vertical-align: middle; }
.wpcf7 .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-list-item label { display: inline-flex; align-items: center; min-height: 44px; font: 400 1rem/1.35 var(--f-body); }
/* Estados: o erro mostra-se por peso (borda grossa, aviso a negro em Overpass), sem depender de cor. */
.wpcf7 .wpcf7-form-control.wpcf7-not-valid:not([type="submit"]):not([type="checkbox"]):not([type="radio"]) { border-width: 4px; }
.wpcf7 .wpcf7-not-valid-tip { display: block; margin-top: var(--s-1); color: var(--ink); font: 800 1rem/1.3 var(--f-display); }
.wpcf7 form.wpcf7-form .wpcf7-response-output {
  margin: var(--s-4) 0 0; padding: var(--s-3) var(--s-4); border: 2px solid var(--ink);
  background: var(--ink); color: var(--on-dark); font: 700 1.0625rem/1.35 var(--f-display);
}
.wpcf7 form.wpcf7-form.sent .wpcf7-response-output { background: var(--tile); color: var(--ink); }
.wpcf7 form.submitting .wpcf7-submit { background: var(--tile); cursor: progress; }
.wpcf7-submit:disabled { background: var(--tile); color: var(--ink-2); border-color: var(--ink-2); cursor: not-allowed; }

/* Rodapé: botão de preferências de cookies com aspecto de ligação */
.foot-legal button { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--ink-2); text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .18em; cursor: pointer; }
.foot-legal button:hover { color: var(--ink); }

/* Conteúdo vindo do editor. As cores escolhidas à mão no editor (azuis inline nos títulos)
   não são deste sistema: a hierarquia faz-se por peso e escala. */
.prose .has-text-color { color: inherit !important; }
.prose .has-background { background: var(--tile) !important; color: var(--ink) !important; }
.prose a { overflow-wrap: anywhere; }
.prose ol:not(.summary) { padding-left: 1.5rem; }
.prose ol:not(.summary) li::marker { color: var(--l-i); font-family: var(--f-display); font-weight: 800; }
.prose h4 { font-size: 1.1875rem; font-weight: 800; margin-top: var(--s-6); }
.prose h5, .prose h6 { font-size: 1.0625rem; font-weight: 800; line-height: 1.3; letter-spacing: 0; margin-top: var(--s-5); }
.prose h4 + *, .prose h5 + *, .prose h6 + * { margin-top: var(--s-2); }
/* Espaçadores postos à mão no editor: o ritmo vertical é o do sistema. */
.prose .wp-block-spacer { height: var(--s-4) !important; }
.prose img { height: auto; }
.prose figure { margin-inline: 0; }
.prose figcaption, .prose .wp-element-caption { margin-top: var(--s-2); font: 700 .9375rem/1.3 var(--f-display); color: var(--ink-2); }
.prose hr, .prose .wp-block-separator { border: 0; border-top: 2px solid var(--rule); margin-block: var(--s-7); }
.prose blockquote cite { display: block; margin-top: var(--s-3); font: 700 1rem var(--f-display); color: var(--ink-2); font-style: normal; }
.prose .wp-block-table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; line-height: 1.45; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 2px solid var(--rule); }
.prose th { font-family: var(--f-display); font-weight: 800; border-bottom-color: var(--ink); }
.prose iframe, .prose video { max-width: 100%; }
.prose .wp-block-embed__wrapper iframe { width: 100%; }
.prose .wp-block-button__link, .prose .wp-element-button {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 var(--s-5); border: 2px solid var(--ink); border-radius: 0;
  background: var(--ground); color: var(--ink); font: 800 1.0625rem/1 var(--f-display); text-decoration: none;
}
.prose .wp-block-button__link:hover { background: var(--tile); }
.prose pre { overflow-x: auto; background: var(--tile); padding: var(--s-4); font-size: .9375rem; }
.prose .aligncenter { margin-inline: auto; }
.prose .has-text-align-center { text-align: center; }

/* Quem somos: faixas de declarações vindas do editor.
   Cada h2 abre uma linha na coluna da esquerda; o que se segue vai para a direita. */
.intro .wrap > p { font-size: 1.25rem; max-width: 44ch; }
.statements { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--s-7); position: relative; }
.statements > * { grid-column: 2; margin: 0; }
.statements > * + * { margin-top: var(--s-4); }
.statements > h2 {
  grid-column: 1; font-size: clamp(1.75rem, 1rem + 2vw, 2.5rem); font-weight: 900; line-height: 1.05;
}
.statements > h2 + * { margin-top: 0; }
/* O filete entre declarações atravessa as duas colunas de uma vez, à largura do contentor. */
.statements > h2:not(:first-child) { margin-top: var(--s-7); padding-top: var(--s-7); }
.statements > h2:not(:first-child)::before {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter);
  margin-top: calc(-1 * var(--s-7)); border-top: 2px solid var(--rule);
}
.statements > h2:not(:first-child) + * { margin-top: calc(2 * var(--s-7)); }
.statements > p { font-size: 1.3125rem; line-height: 1.5; max-width: 50ch; }
.statements > ul:not(.values) { padding-left: 1.25rem; max-width: 56ch; font-size: 1.125rem; }
.statements > ul:not(.values) li + li { margin-top: var(--s-2); }
.statements > ul:not(.values) li::marker { color: var(--l-i); }
.statements .values li { font-size: 1.0625rem; }
.values strong { display: block; font: 800 1.375rem/1.15 var(--f-display); letter-spacing: -.02em; margin-bottom: var(--s-2); }

/* Contactos: directório de atendimentos */
.directory { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-5); }
.directory > li { background: var(--ground); padding: var(--s-5); border-top: 6px solid var(--c); }
.directory h3 { display: flex; align-items: center; gap: var(--s-3); font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.directory h3 a { color: var(--ink); text-decoration-thickness: .08em; text-underline-offset: .18em; min-height: 44px; display: inline-flex; align-items: center; }
.directory .what { margin-top: var(--s-2); color: var(--ink-2); font-size: 1rem; }
.directory .contacts { margin-top: var(--s-4); }
.directory .who { margin-top: var(--s-4); font-size: 1rem; }
.form-block { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-6) var(--s-7); }
.form-block h2 { font-size: clamp(2rem, 1rem + 3vw, 3.25rem); line-height: 1; font-weight: 900; letter-spacing: -.03em; }
.form-block p { margin-top: var(--s-4); max-width: 40ch; }
.form-block .wpcf7 p { max-width: none; }
.form-block .wpcf7 p + p { margin-top: var(--s-4); }

/* Ofertas: listas do WP RSS Aggregator */
.prose .wpra-display { margin-top: var(--s-4); }
.prose .wpra-item-list { list-style: none; padding: 0; margin: 0; }
.prose .wpra-item { border-top: 2px solid var(--rule); padding-block: var(--s-3); margin: 0; }
.prose .wpra-item + .wpra-item { margin-top: 0; }
.prose .wpra-item > a { font: 700 1.125rem/1.3 var(--f-display); color: var(--ink); text-decoration-thickness: .08em; text-underline-offset: .18em; }
.prose .wpra-item > a:hover { color: var(--l-i); }
.prose .wprss-feed-meta { display: flex; flex-wrap: wrap; gap: 0 var(--s-4); margin-top: var(--s-1); font-size: .9375rem; line-height: 1.4; color: var(--ink-2); }
.prose .wprss-feed-meta a { color: var(--ink-2); }
.prose .feed-author { display: none; }
.prose .wpra-nav-links { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-4); }
.prose .wpra-nav-links::after { content: none; }
.prose .wpra-nav-links .alignleft { float: none; margin: 0; }
.prose .wpra-nav-links a, .prose .wpra-feed-current-page {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding: 0 var(--s-3);
  border: 2px solid var(--ink); color: var(--ink); text-decoration: none; font: 800 1rem var(--f-display); cursor: pointer;
}
.prose .wpra-feed-current-page { background: var(--ink); color: var(--on-dark); }
.prose .wpra-nav-links a:hover { background: var(--tile); }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 63.98rem) {
  .rede .wrap, .sec-head, .site-foot .wrap, .art-head .wrap, .help .wrap, .station-body .wrap, .intro .wrap, .statement { grid-template-columns: minmax(0, 1fr); }
  .reading { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
  .values { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .map { display: none; }
  .ficha { margin-left: 0; }
  .statements, .form-block { grid-template-columns: minmax(0, 1fr); }
  .statements > * { grid-column: 1; }
  .statements > h2 + * { margin-top: var(--s-4); }
  .statements > h2:not(:first-child) + * { margin-top: var(--s-4); }
  .directory { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 39.98rem) {
  body { font-size: 1.0625rem; }
  .brand img { height: 56px; }
  .nav .long { display: none; }
  .nav { width: 100%; }
  .nav a { padding: 0 var(--s-2); font-size: 1rem; }
  .nav { gap: 0; }
  .rede { padding-top: var(--s-5); }
  .fairs .f1, .fairs .f2, .fairs .f3 { grid-column: 1 / -1; grid-row: auto; }
  .events, .values, .foot-nav, .post-list { grid-template-columns: minmax(0, 1fr); }
  .foot-nav { gap: var(--s-3); }
  .progress ol { width: 100%; justify-content: space-between; }
  .progress a { width: 36px; }
  .progress .hex { width: 1.875rem; }
  .progress [aria-current] .hex { width: 2.25rem; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager a:last-child { text-align: left; }
  .station-head .wrap { grid-template-columns: minmax(0, 1fr); }
}
