/* ==========================================================================
   Serra do Rio do Rastro — tema escuro "serra à noite"
   Paleta: azul-noite das encostas, neblina clara e o âmbar das lâmpadas
   de sódio que iluminam as curvas da SC-390.
   ========================================================================== */

:root {
  --night: #0F1A2B;       /* fundo */
  --slope: #152338;       /* superfícies */
  --slope-2: #1C2E46;     /* superfícies elevadas */
  --ridge: #2A3F5C;       /* bordas */
  --mist: #E6ECF3;        /* texto principal */
  --mist-2: #9DAEC3;      /* texto secundário */
  --accent: #F2B544;      /* âmbar de lâmpada de sódio (editável no painel) */
  --open: #4FD1A5;
  --restricted: #F08A3E;
  --closed: #F2665C;

  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --step-4: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem);

  --radius-s: 6px;
  --radius-m: 12px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[id] { scroll-margin-top: 80px; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--mist);
  font-family: var(--font);
  font-size: var(--step-0);
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.1; margin: 0; font-stretch: 112%; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1180px, 100%); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { width: min(760px, 100%); }
.muted { color: var(--mist-2); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--night); padding: 8px 14px; border-radius: var(--radius-s); z-index: 10; }
.skip-link:focus { left: 8px; }

/* Botões e links ---------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px;
  background: var(--accent); color: var(--night);
  font: 700 var(--step--1)/1 var(--font); font-stretch: 108%;
  border: 0; border-radius: 999px; text-decoration: none; cursor: pointer;
  transition: transform .15s var(--ease), filter .15s;
}
.button:hover { filter: brightness(1.08); }
.button:active { transform: scale(.98); }
.button--ghost { background: transparent; color: var(--mist); box-shadow: inset 0 0 0 1.5px var(--ridge); }
.button--ghost:hover { box-shadow: inset 0 0 0 1.5px var(--mist-2); filter: none; }
.text-link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px; font-weight: 600; }
.icon-button {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--slope-2); color: var(--mist); cursor: pointer;
}
.icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button:hover { background: var(--ridge); }
.icon-button:disabled { opacity: .35; cursor: default; }

/* Cabeçalho --------------------------------------------------------------- */
.site-header { border-bottom: 1px solid var(--ridge); background: var(--night); position: sticky; top: 0; z-index: 5; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand__mark { width: 28px; height: 28px; color: var(--accent); }
.brand__logo { height: 32px; width: auto; }
.brand__name { font-weight: 800; font-stretch: 115%; }
.brand__road { font-size: var(--step--1); color: var(--night); background: var(--mist); padding: 1px 7px; border-radius: 4px; font-weight: 700; }
.site-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-size: var(--step--1); }
.site-nav a { text-decoration: none; color: var(--mist-2); font-weight: 600; padding: 6px 0; }
.site-nav a:hover { color: var(--mist); }
.site-nav__admin { color: var(--accent) !important; }

/* Avisos ------------------------------------------------------------------ */
.notices { padding-block: 12px; display: grid; gap: 8px; }
.notices .wrap { display: grid; gap: 8px; }
.notice {
  display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline;
  padding: 12px 16px; border-radius: var(--radius-s);
  background: var(--slope); border-left: 4px solid var(--mist-2); font-size: var(--step--1);
}
.notice--warning { border-color: var(--restricted); }
.notice--danger { border-color: var(--closed); background: color-mix(in srgb, var(--closed) 12%, var(--slope)); }
.notice__body { color: var(--mist-2); }
.notice__link { color: var(--accent); }

/* Hero: a curva da serra é o elemento-assinatura ------------------------- */
.hero { --status: var(--open); position: relative; overflow: hidden; padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 88px); }
.hero--restricted { --status: var(--restricted); }
.hero--closed { --status: var(--closed); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--hero-image, none) center/cover no-repeat;
  opacity: .18; filter: saturate(.6);
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero__inner { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero__date { color: var(--mist-2); font-weight: 600; text-transform: lowercase; }
.hero__date::first-letter { text-transform: uppercase; }
.hero__headline {
  font-size: var(--step-4); font-stretch: 125%; font-weight: 900; line-height: .98;
  margin: 14px 0 18px; text-wrap: balance;
}
.hero__message { font-size: var(--step-1); color: var(--mist-2); max-width: 34ch; margin-bottom: 28px; }
.hero .windows { margin-bottom: 28px; }

.road-art { width: 100%; max-width: 420px; justify-self: end; overflow: visible; }
.road-art__contours path { stroke: var(--ridge); opacity: .55; }
.road-art__asphalt { stroke: var(--slope-2); stroke-width: 22; stroke-linecap: round; stroke-linejoin: round; }
.road-art__line {
  stroke: var(--status, var(--open)); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1000; stroke-dashoffset: 1000;
  filter: drop-shadow(0 0 6px var(--status, var(--open)));
  animation: draw 2.4s var(--ease) .2s forwards;
}
.road-art--closed .road-art__line { stroke-dasharray: 10 14; stroke-dashoffset: 0; animation: none; opacity: .9; }
.road-art__lamps circle { fill: var(--accent); filter: drop-shadow(0 0 5px var(--accent)); }
.road-art--closed .road-art__lamps circle { fill: var(--ridge); filter: none; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* Janelas de restrição ---------------------------------------------------- */
.windows { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.window {
  display: grid; grid-template-columns: 7.2em 1fr; gap: 12px; align-items: start;
  padding: 10px 14px; border-radius: var(--radius-s);
  background: var(--slope); border-left: 3px solid var(--restricted);
}
.window--closed { border-color: var(--closed); }
.window__time { font-weight: 700; font-stretch: 105%; }
.window__body { display: grid; gap: 2px; }
.window__title { font-weight: 600; }
.window__title a { text-decoration-color: var(--ridge); text-underline-offset: 3px; }
.window__impact, .window__detail { font-size: var(--step--1); color: var(--mist-2); }

/* Seções ------------------------------------------------------------------ */
.lookup, .events-preview, .faq, .contacts, .about { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ridge); }
.section-head { margin-bottom: 28px; max-width: 60ch; }
.section-head p { color: var(--mist-2); margin-top: 8px; }
.section-head--row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; max-width: none; }

/* Consulta / calendário --------------------------------------------------- */
.lookup__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.calendar { background: var(--slope); border-radius: var(--radius-m); padding: clamp(14px, 2.5vw, 24px); }
.calendar__bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar__month::first-letter { text-transform: uppercase; }
.calendar__month { font-weight: 800; font-stretch: 112%; font-size: var(--step-1); }
.calendar__weekdays, .calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar__weekdays span { text-align: center; font-size: var(--step--1); color: var(--mist-2); padding-bottom: 6px; }
.calendar__loading { grid-column: 1 / -1; color: var(--mist-2); padding: 40px 0; text-align: center; }

.day {
  --c: var(--open);
  position: relative; aspect-ratio: 1 / .92;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; border-radius: var(--radius-s); cursor: pointer;
  background: transparent; color: var(--mist); font: 600 var(--step-0)/1 var(--font);
  transition: background .15s;
}
.day::after { content: ""; width: 60%; max-width: 26px; height: 4px; border-radius: 2px; background: var(--c); }
.day--restricted { --c: var(--restricted); }
.day--closed { --c: var(--closed); }
.day--closed .day__n { text-decoration: line-through; text-decoration-color: var(--closed); text-decoration-thickness: 2px; }
.day:hover { background: var(--slope-2); }
.day[aria-selected="true"] { background: var(--mist); color: var(--night); }
.day--today .day__n { color: var(--accent); }
.day[aria-selected="true"].day--today .day__n { color: var(--night); }
.day--event::before {
  content: ""; position: absolute; top: 6px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.day:disabled { opacity: .25; cursor: default; }
.day:disabled::after { background: var(--ridge); }
.day--blank { visibility: hidden; }

.legend { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: var(--step--1); color: var(--mist-2); }
.legend__item { display: flex; align-items: center; gap: 6px; }
.legend__item::before { content: ""; width: 14px; height: 4px; border-radius: 2px; background: var(--open); }
.legend__item--restricted::before { background: var(--restricted); }
.legend__item--closed::before { background: var(--closed); }
.legend__item--event::before { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.jump { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ridge); }
.jump label { display: block; font-size: var(--step--1); color: var(--mist-2); margin-bottom: 6px; }
.jump__row { display: flex; gap: 8px; flex-wrap: wrap; }
.jump input {
  flex: 1 1 160px; min-height: 46px; padding: 0 14px;
  background: var(--night); color: var(--mist); border: 1.5px solid var(--ridge); border-radius: var(--radius-s);
  font: inherit;
}
.jump input:focus { border-color: var(--accent); outline: none; }

/* Resultado do dia -------------------------------------------------------- */
.result { position: sticky; top: 88px; }
.day-detail { --c: var(--open); padding-left: 20px; border-left: 4px solid var(--c); }
.day-detail--restricted { --c: var(--restricted); }
.day-detail--closed { --c: var(--closed); }
.day-detail__date { color: var(--mist-2); font-weight: 600; }
.day-detail__date::first-letter { text-transform: uppercase; }
.day-detail__status { display: flex; align-items: center; gap: 12px; font-size: var(--step-4); font-weight: 900; font-stretch: 125%; line-height: 1; margin: 10px 0 12px; }
.status-dot { width: .32em; height: .32em; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 6px color-mix(in srgb, var(--c) 22%, transparent); flex: none; }
.day-detail__message { color: var(--mist-2); font-size: var(--step-1); margin-bottom: 20px; max-width: 40ch; }
.day-detail__subhead { font-weight: 700; margin: 22px 0 8px; }
.day-detail__events ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; }
.day-detail__events a { text-underline-offset: 3px; }
.result.is-loading .day-detail { opacity: .5; transition: opacity .2s; }
.result .day-detail { animation: settle .35s var(--ease); }
@keyframes settle { from { opacity: 0; transform: translateY(6px); } }
.error-text { color: var(--closed); }

/* Eventos ----------------------------------------------------------------- */
.event-rows { list-style: none; padding: 0; margin: 0; }
.event-row {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 8px 24px; align-items: start;
  padding: 22px 0; border-bottom: 1px solid var(--ridge);
}
.event-row:first-child { border-top: 1px solid var(--ridge); }
.event-row__date { display: grid; justify-items: start; line-height: 1; }
.event-row__day { font-size: var(--step-2); font-weight: 900; font-stretch: 120%; }
.event-row__month { color: var(--mist-2); font-weight: 600; text-transform: lowercase; margin-top: 4px; }
.event-row__title { font-size: var(--step-1); font-stretch: 108%; }
.event-row__title a { text-decoration: none; }
.event-row__title a:hover { text-decoration: underline; text-underline-offset: 4px; }
.event-row__meta { color: var(--mist-2); font-size: var(--step--1); margin-top: 6px; }
.event-row__meta::first-letter { text-transform: uppercase; }
.event-row__summary { margin-top: 8px; max-width: 64ch; }
.event-row__tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

.tag {
  --tag: var(--mist-2);
  display: inline-flex; align-items: center; gap: 6px; font-size: var(--step--1); font-weight: 600; color: var(--mist);
}
.tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tag); }
.impact { font-size: var(--step--1); font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.impact--restricted { background: color-mix(in srgb, var(--restricted) 20%, transparent); color: var(--restricted); }
.impact--closed { background: color-mix(in srgb, var(--closed) 20%, transparent); color: var(--closed); }
.rules { margin-top: 48px; }
.rules__list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.rules__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 14px 16px; background: var(--slope); border: 1px solid var(--ridge); border-radius: var(--radius-m); }
.rules__list p { grid-column: 1 / -1; }
.empty { color: var(--mist-2); padding: 28px 0; }

/* Páginas internas -------------------------------------------------------- */
.page { padding-block: clamp(36px, 6vw, 72px) clamp(56px, 8vw, 96px); }
.page__head { margin-bottom: 28px; display: grid; gap: 12px; justify-items: start; }
.page__head h1 { font-size: var(--step-4); font-stretch: 120%; text-wrap: balance; }
.page__head p { color: var(--mist-2); max-width: 60ch; }
.lead { font-size: var(--step-1); }
.back-link { display: inline-block; margin-bottom: 24px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 28px; }
.filters__sep { width: 1px; height: 22px; background: var(--ridge); margin-inline: 6px; }
.chip { text-decoration: none; padding: 7px 14px; border-radius: 999px; font-size: var(--step--1); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--ridge); color: var(--mist-2); }
.chip:hover { color: var(--mist); }
.chip.is-active { background: var(--mist); color: var(--night); box-shadow: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.event-detail__image { border-radius: var(--radius-m); margin-bottom: 28px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 32px; padding: 20px; background: var(--slope); border-radius: var(--radius-m); }
.facts dt { font-size: var(--step--1); color: var(--mist-2); margin-bottom: 4px; }
.facts dd { margin: 0; font-weight: 600; }
.facts__impact { padding-left: 12px; border-left: 3px solid var(--open); }
.facts__impact--restricted { border-color: var(--restricted); }
.facts__impact--closed { border-color: var(--closed); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: 1em; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.day-page .day-detail { margin-bottom: 12px; }

/* FAQ e contatos ---------------------------------------------------------- */
.faq h2, .contacts h2, .about h2 { margin-bottom: 24px; }
.faq__item { border-bottom: 1px solid var(--ridge); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; font-weight: 700; font-size: var(--step-1); font-stretch: 105%;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; position: absolute; right: 4px; top: 50%; translate: 0 -50%; font-size: 1.4em; color: var(--accent); transition: rotate .2s var(--ease); }
.faq__item[open] summary::after { rotate: 45deg; }
.faq__item .prose { padding-bottom: 20px; color: var(--mist-2); }

.contacts__group + .contacts__group { margin-top: 32px; }
.contacts__group-title { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--mist-2); }
.contacts__group-title::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--mist-2); }
.contacts__group-title--emergency { color: var(--closed); }
.contacts__group-title--emergency::before { background: var(--closed); box-shadow: 0 0 0 4px color-mix(in srgb, var(--closed) 25%, transparent); }
.contacts__list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.contact {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 18px 18px 16px; overflow: hidden;
  background: var(--slope); border: 1px solid var(--ridge); border-radius: var(--radius-m);
}
.contact::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--ridge); }
.contact--emergency::before { background: var(--closed); }
.contact__main { display: grid; gap: 4px; align-content: start; flex: 1; }
.contact__phone { font-size: var(--step-2); font-weight: 900; font-stretch: 115%; line-height: 1.1; white-space: nowrap; text-decoration: none; color: var(--mist); margin-bottom: 6px; }
.contact__phone:hover { color: var(--accent); }
.contact__name { font-weight: 700; }
.contact__desc { color: var(--mist-2); font-size: var(--step--1); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.contact__button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px;
  background: var(--mist); color: var(--night); font-size: var(--step--1); font-weight: 700; text-decoration: none;
  transition: filter .15s var(--ease);
}
.contact--emergency .contact__button { background: var(--closed); color: var(--night); }
.contact__button:hover { filter: brightness(1.1); }
.contact__button svg { width: 16px; height: 16px; fill: currentColor; }
.contact__button--ghost, .contact--emergency .contact__button--ghost { background: transparent; color: var(--mist); box-shadow: inset 0 0 0 1.5px var(--ridge); }
.contacts__list--wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.contacts__list--wide .contact { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.contacts__list--wide .contact__main { min-width: min(100%, 240px); }

/* Rodapé ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--ridge); padding-block: 36px 48px; font-size: var(--step--1); color: var(--mist-2); }
.site-footer__inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.site-footer__name { color: var(--mist); font-weight: 700; margin-bottom: 4px; }
.site-footer__note { max-width: 52ch; }
.site-footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: start; }
.site-footer__links a { color: var(--mist-2); }
.site-footer__links a:hover { color: var(--mist); }

/* Páginas simples (manutenção, erro) ------------------------------------- */
.page-plain { min-height: 100vh; display: grid; place-items: center; }
.plain, .plain-block { display: grid; gap: 16px; justify-items: start; max-width: 520px; padding: var(--gutter); }
.plain h1, .plain-block h1 { font-size: var(--step-2); font-stretch: 120%; }
.plain p, .plain-block p { color: var(--mist-2); }

/* Responsivo -------------------------------------------------------------- */
@media (max-width: 860px) {
  .hero__inner, .lookup__grid { grid-template-columns: 1fr; }
  .hero__art { order: -1; }
  .road-art { max-width: 200px; justify-self: start; margin-bottom: -8px; }
  .result { position: static; }
}
@media (max-width: 560px) {
  .event-row { grid-template-columns: 3.2rem minmax(0, 1fr); }
  .event-row__tags { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .window { grid-template-columns: 1fr; gap: 2px; }
  .site-nav { gap: 4px 14px; }
  .brand__name { font-size: .95rem; }
  .day { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .road-art__line { stroke-dashoffset: 0; }
}

/* Anúncios ---------------------------------------------------------------- */
.ad { margin-block: 40px; min-height: 100px; }
.ad__label { font-size: .75rem; color: var(--mist-2); margin-bottom: 6px; }
.ad__preview {
  display: grid; place-items: center; min-height: 120px; padding: 16px; text-align: center;
  border: 1.5px dashed var(--ridge); border-radius: var(--radius-s); color: var(--mist-2); font-size: var(--step--1);
}
.ad ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }

/* Aviso de cookies -------------------------------------------------------- */
.consent {
  position: fixed; inset: auto 0 0 0; z-index: 20; padding: 16px var(--gutter) calc(16px + env(safe-area-inset-bottom));
  background: var(--slope-2); border-top: 1px solid var(--ridge); box-shadow: 0 -12px 32px rgba(0, 0, 0, .35);
}
.consent[hidden] { display: none; }
.consent__inner { width: min(1180px, 100%); margin-inline: auto; display: grid; grid-template-columns: 1fr auto; gap: 8px 32px; align-items: center; }
.consent__title { font-weight: 800; font-stretch: 110%; }
.consent__text { color: var(--mist-2); font-size: var(--step--1); grid-column: 1; max-width: 72ch; }
.consent__text a { color: var(--accent); }
.consent__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 8px; }
@media (max-width: 640px) {
  .consent__inner { grid-template-columns: 1fr; }
  .consent__actions { grid-column: 1; grid-row: auto; }
  .consent__actions .button { flex: 1; }
}

/* Rodapé e páginas institucionais ---------------------------------------- */
.site-footer__links--legal { flex-basis: 100%; padding-top: 16px; border-top: 1px solid var(--ridge); }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--mist-2); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--mist); }
.prose--rich h2 { font-size: var(--step-1); margin: 1.8em 0 .5em; }
.prose--rich ul { padding-left: 1.2em; }
.prose--rich li + li { margin-top: .35em; }
.prose--rich a { color: var(--accent); }
.prose--rich p + p, .prose--rich p + ul, .prose--rich ul + p { margin-top: 1em; }
.contact-page__subhead { margin: 48px 0 24px; }
.facts--contact a { color: var(--accent); }

/* Previsão do tempo ------------------------------------------------------- */
.weather-band { border-top: 1px solid var(--ridge); padding-block: clamp(48px, 7vw, 88px); }
.weather { display: grid; gap: 20px; }
.weather__head p { color: var(--mist-2); margin-top: 8px; max-width: 60ch; }
.weather__embed {
  max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: clamp(10px, 2vw, 18px); background: var(--slope); border-radius: var(--radius-m);
}
.weather__embed iframe, .weather__embed img, .weather__embed > div { max-width: 100%; }
.weather__embed iframe { display: block; border: 0; width: 100%; }
.weather__source { justify-self: start; }
.day-page .weather { margin-top: 48px; }

/* Previsão própria (Open-Meteo), estilo "previsão do Google" */
.forecast {
  display: grid; gap: clamp(16px, 2.5vw, 24px); padding: clamp(16px, 3vw, 28px); min-width: 0;
  background: linear-gradient(160deg, color-mix(in srgb, var(--slope-2) 70%, var(--accent) 6%) 0%, var(--slope) 55%);
  border: 1px solid var(--ridge); border-radius: calc(var(--radius-m) + 4px);
  box-shadow: 0 18px 40px -24px rgb(0 0 0 / .6);
}
.forecast > * { min-width: 0; }
.forecast [hidden] { display: none !important; }

.forecast__top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px clamp(16px, 3vw, 32px); }
.forecast__now { display: flex; align-items: center; gap: 14px; }
.forecast__icon { font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; filter: drop-shadow(0 4px 10px rgb(0 0 0 / .3)); }
.forecast__icon--sm { font-size: 1.75rem; filter: none; }
.forecast__temp { font-size: clamp(3rem, 2rem + 4vw, 4.8rem); font-weight: 800; line-height: .9; display: flex; align-items: flex-start; letter-spacing: -.02em; }
.forecast__unit { font-size: var(--step-1); font-weight: 600; margin: .25em 0 0 .1em; color: var(--mist-2); letter-spacing: 0; }
.forecast__day-name { font-weight: 700; font-size: var(--step-1); }
.forecast__label { color: var(--mist); margin-top: 2px; }
.forecast__minmax { color: var(--mist-2); font-size: var(--step--1); margin-top: 2px; }
.forecast__stats { margin: 0; display: grid; gap: 8px; }
.forecast__stat { display: flex; justify-content: space-between; gap: 14px; padding: 7px 12px; min-width: 170px; background: color-mix(in srgb, var(--night) 45%, transparent); border: 1px solid var(--ridge); border-radius: 999px; font-size: var(--step--1); }
.forecast__stat dt { color: var(--mist-2); }
.forecast__stat dd { margin: 0; font-weight: 700; }
.forecast__credit { color: var(--mist-2); font-size: var(--step--1); }
.forecast__credit a { color: var(--mist-2); text-decoration: underline; }
.forecast__alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-left: 4px solid var(--restricted); border-radius: var(--radius-s); background: color-mix(in srgb, var(--restricted) 14%, var(--slope)); }

.forecast__graph { position: relative; display: grid; gap: 12px; padding: clamp(12px, 2vw, 18px); background: color-mix(in srgb, var(--night) 40%, transparent); border: 1px solid var(--ridge); border-radius: var(--radius-m); }
.forecast__graph-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.forecast__graph-title { font-weight: 700; }
.forecast__tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--night); border: 1px solid var(--ridge); border-radius: 999px; }
.forecast__tabs button {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 0; border-radius: 999px;
  background: transparent; color: var(--mist-2); font: inherit; font-size: var(--step--1); font-weight: 600; cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.forecast__tabs button:hover { color: var(--mist); background: color-mix(in srgb, var(--mist) 8%, transparent); }
.forecast__tabs button[aria-selected="true"] { background: var(--accent); color: var(--night); }
.forecast__tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.forecast__chart { width: 100%; min-width: 0; overflow: hidden; border-radius: var(--radius-s); }
.forecast__chart:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.forecast__svg { display: block; touch-action: pan-y; cursor: crosshair; }
.forecast__grid { stroke: var(--ridge); stroke-width: 1; opacity: .5; }
.forecast__axis { stroke: var(--ridge); stroke-width: 1; }
.forecast__cross { stroke: var(--mist-2); stroke-width: 1; }
.forecast__point { stroke: var(--slope); stroke-width: 2; }
.forecast__dot { stroke: var(--night); stroke-width: 3; }
.forecast__value { fill: var(--mist); font-size: 12px; font-weight: 700; font-family: var(--font); }
.forecast__hour { fill: var(--mist-2); font-size: 11px; font-weight: 500; font-family: var(--font); }
.forecast__tip { position: absolute; pointer-events: none; display: grid; gap: 2px; padding: 7px 11px; background: var(--night); border: 1px solid var(--ridge); border-radius: var(--radius-s); font-size: var(--step--1); white-space: nowrap; box-shadow: 0 8px 22px rgb(0 0 0 / .4); z-index: 1; }
.forecast__tip strong { font-size: var(--step-0); }
.forecast__tip span { color: var(--mist-2); }

.forecast__days { list-style: none; margin: 0; padding: 2px 2px 6px; display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.forecast__days li { scroll-snap-align: start; }
.forecast__day {
  position: relative; width: 100%; display: grid; justify-items: center; gap: 6px; padding: 14px 10px 12px;
  background: var(--slope-2); border: 1px solid var(--ridge); border-radius: var(--radius-m); color: var(--mist);
  font: inherit; text-align: center; cursor: pointer;
  transition: transform .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease);
}
.forecast__day:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 45%, var(--ridge)); }
.forecast__day[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--slope-2)); box-shadow: 0 0 0 1px var(--accent), 0 10px 24px -14px var(--accent); }
.forecast__day:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.forecast__weekday { text-transform: capitalize; font-weight: 700; }
.forecast__date { color: var(--mist-2); font-size: 11px; margin-top: -4px; }
.forecast__range { display: flex; gap: 6px; align-items: baseline; }
.forecast__range strong { font-size: var(--step-0); }
.forecast__range span { color: var(--mist-2); font-size: var(--step--1); }
.forecast__bar { position: relative; width: 100%; height: 4px; border-radius: 999px; background: var(--night); overflow: hidden; }
.forecast__bar span { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #8FB3FF, #F2B544); }
.forecast__rain { color: var(--mist-2); font-size: var(--step--1); }
@media (max-width: 760px) {
  .forecast__top { grid-template-columns: auto 1fr; }
  .forecast__stats { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forecast__stat { min-width: 0; flex-direction: column; align-items: center; gap: 2px; border-radius: var(--radius-m); padding: 8px 6px; text-align: center; }
}
@media (max-width: 480px) {
  .forecast__tabs { width: 100%; }
  .forecast__tabs button { flex: 1; justify-content: center; padding: 7px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .forecast__day, .forecast__tabs button { transition: none; }
  .forecast__day:hover { transform: none; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Janela fixa de apoio (Pix): acompanha a rolagem, sem botão de fechar ------- */
.pix-float { position: fixed; z-index: 4; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
.pix-float__card { display: none; }
.pix-float__pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--slope-2) 92%, transparent); color: var(--mist); text-decoration: none;
  font-size: var(--step--1); border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--ridge));
  box-shadow: 0 8px 24px -10px rgb(0 0 0 / .6); backdrop-filter: blur(6px);
}
.pix-float__pill strong { color: var(--accent); }
.pix-float__pill:hover { border-color: var(--accent); }
@media (min-width: 1500px) {
  .pix-float { top: calc(64px + 24px + env(safe-area-inset-top, 0px)); bottom: auto; right: 20px; width: 152px; }
  .pix-float__pill { display: none; }
  .pix-float__card {
    display: grid; justify-items: center; gap: 6px; padding: 14px 12px 12px; text-align: center;
    background: color-mix(in srgb, var(--slope) 94%, transparent); backdrop-filter: blur(6px);
    border: 1px solid var(--ridge); border-top: 3px solid var(--accent); border-radius: var(--radius-m);
    box-shadow: 0 14px 32px -16px rgb(0 0 0 / .7);
  }
  .pix-float__title { font-weight: 800; font-size: var(--step--1); }
  .pix-float__text { color: var(--mist-2); font-size: var(--step--1); margin-top: -4px; }
  .pix-float__qr { display: block; margin-top: 4px; padding: 6px; background: #fff; border-radius: var(--radius-s); line-height: 0; }
  .pix-float__qr img { width: 112px; height: 112px; object-fit: contain; }
  .pix-float__hint { color: var(--mist-2); font-size: 11px; line-height: 1.3; }
  .pix-float__copy {
    margin-top: 2px; width: 100%; padding: 6px 8px; border: 0; border-radius: 999px; cursor: pointer; text-decoration: none;
    background: var(--accent); color: var(--night); font: inherit; font-size: 12px; font-weight: 700;
  }
  .pix-float__copy:hover { filter: brightness(1.08); }
  .pix-float__copy.is-copied { background: var(--open); }
}
@media print { .pix-float { display: none; } }

/* Apoio via Pix ----------------------------------------------------------- */
.support { padding-block: clamp(48px, 7vw, 88px); border-top: 1px solid var(--ridge); }
.donation { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(20px, 4vw, 48px); align-items: start; }
.donation:not(:has(.donation__qr)) { grid-template-columns: minmax(0, 1fr); }
.donation__qr { margin: 0; display: grid; gap: 8px; justify-items: center; }
.donation__qr img {
  width: clamp(180px, 24vw, 240px); height: auto; aspect-ratio: 1; object-fit: contain;
  background: #fff; padding: 12px; border-radius: var(--radius-m);
}
.donation__qr figcaption { font-size: var(--step--1); color: var(--mist-2); }
.donation__body { display: grid; gap: 16px; justify-items: start; max-width: 62ch; }
.donation__text { color: var(--mist-2); }
.donation__text p + p { margin-top: .8em; }
.donation__receiver { font-size: var(--step--1); color: var(--mist-2); }
.donation__receiver strong { color: var(--mist); }
.pix-field { display: grid; gap: 6px; width: 100%; }
.pix-field__label { font-size: var(--step--1); color: var(--mist-2); }
.pix-field__row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pix-field__value {
  flex: 1 1 220px; min-width: 0; padding: 10px 14px; border-radius: var(--radius-s);
  background: var(--night); border: 1.5px solid var(--ridge); color: var(--mist);
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92rem; overflow-wrap: anywhere;
}
.pix-field__value--long { max-height: 4.8em; overflow: auto; font-size: .8rem; }
.button--small { min-height: 40px; padding: 0 16px; }
.button.is-copied { background: var(--open); }
.site-nav__support { color: var(--accent) !important; }
@media (max-width: 640px) {
  .donation { grid-template-columns: 1fr; }
  .donation__qr { justify-self: center; order: 1; }
}

/* Link com ícone de rede social (página de contato) */
.social-link { display: inline-flex; align-items: center; gap: 8px; }
.social-link svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
/* Página de contato: telefones primeiro, depois o título e os canais da equipe */
.page .wrap > .contact-page__subhead:first-child { margin-top: 0; }
.page__head--after { margin-top: 48px; }
