:root {
  --sky-top: #BCE0EA;
  --sky-low: #E4F4F7;
  --paper: #F6FBFC;
  --ink: #06303A;
  --muted: #3D5F69;
  --sea: #0E6E8C;
  --sea-light: #5FB3C8;
  --sun: #F2B705;
  --line: #B7D6DE;
  --good: #1B7A4F;
  --ok: #8A6A00;
  --meh: #B4570E;
  --bad: #B3281F;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

h1, h2, .brand, .temp {
  font-family: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  letter-spacing: -0.02em;
}
h1 { font-weight: 800; font-size: clamp(2.2rem, 6.5vw, 4.4rem); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 18px; max-width: 18ch; }
h2 { font-weight: 700; font-size: clamp(1.4rem, 3vw, 1.9rem); line-height: 1.15; margin: 0 0 18px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 40px); }

/* Cabeçalho */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 18px clamp(20px, 5vw, 40px); }
.brand { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 4px 0; border-bottom: 2px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { border-bottom-color: var(--sun); }

/* Abertura das páginas de cidade */
.intro { background: linear-gradient(var(--sky-top), var(--sky-low)); padding-bottom: clamp(36px, 7vw, 72px); }
.intro .lead { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 52ch; margin: 0; }
.updated { color: var(--muted); font-size: .95rem; margin: 14px 0 0; }

section.block { padding: clamp(32px, 6vw, 56px) 0 0; }
.note { color: var(--muted); font-size: .95rem; max-width: 62ch; margin: 14px 0 0; }

/* Agora */
.now { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 40px; margin-bottom: 22px; }
.temp { font-weight: 800; font-size: clamp(4.5rem, 14vw, 8rem); line-height: .9; letter-spacing: -0.05em; }
.cond { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 600; padding-bottom: 8px; }
dl.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 28px; margin: 0; }
dl.facts div { border-top: 1px solid var(--line); padding: 12px 0 14px; }
dl.facts dt { color: var(--muted); font-size: .95rem; }
dl.facts dd { margin: 2px 0 0; font-size: 1.5rem; font-weight: 600; }

/* Maré */
.tide { width: 100%; height: auto; display: block; margin-top: 22px; }
.tide .axis { stroke: var(--line); stroke-width: 1; }
.tide .curve { fill: none; stroke: var(--sea); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.tide .area { fill: var(--sea-light); opacity: .25; }
.tide .nowline { stroke: var(--sun); stroke-width: 3; }
.tide text { fill: var(--ink); font-size: 13px; font-family: "Source Sans 3", system-ui, sans-serif; }
.tide .dot { fill: var(--sea); }

/* Previsão */
ol.days { list-style: none; margin: 0; padding: 0; }
ol.days li { display: grid; grid-template-columns: 5.5rem 1fr auto auto auto auto; gap: 8px 16px; align-items: center; border-top: 1px solid var(--line); padding: 12px 0; }
ol.days li:last-child { border-bottom: 1px solid var(--line); }
ol.days .d { font-weight: 600; }
ol.days .t { font-variant-numeric: tabular-nums; }
ol.days .r { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
ol.days .w { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 5.5rem; text-align: right; }
@media (max-width: 640px) {
  ol.days li { grid-template-columns: 4.2rem 1fr auto; }
  ol.days .d, ol.days .c { grid-row: 1; }
  ol.days .q { grid-row: 1; grid-column: 3; }
  ol.days .t { grid-row: 2; grid-column: 2 / -1; }
  ol.days .r, ol.days .w { display: none; }
}

/* Câmera e hospedagem */
.placeholder { border: 2px dashed var(--sea-light); border-radius: 6px; padding: 28px clamp(18px, 4vw, 32px); background: #fff; }
.placeholder p { margin: 0; max-width: 56ch; }
.placeholder p + p { margin-top: 8px; color: var(--muted); }

/* Praias */
ul.beaches { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 28px; }
ul.beaches li { border-top: 1px solid var(--line); padding: 12px 0; }
ul.beaches strong { display: block; }
ul.beaches a { color: var(--ink); text-decoration: none; }
ul.beaches a:hover strong { color: var(--sea); text-decoration: underline; text-underline-offset: 3px; }
ul.beaches > li > span { display: block; color: var(--muted); font-size: .97rem; }

/* Zonas */
.zonas { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.zona {
  font: inherit; font-weight: 600; color: var(--ink); background: transparent;
  border: 2px solid var(--ink); border-radius: 999px; padding: 10px 22px; min-height: 44px; cursor: pointer;
}
.zona:hover { background: var(--sky-low); }
.zona[aria-pressed="true"] { background: var(--ink); color: #fff; }
.zona-sufixo { font-weight: 700; color: var(--sea); }
h3 { font-family: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif; font-weight: 700; font-size: 1.15rem; margin: 26px 0 6px; letter-spacing: -0.01em; }

/* Contato */
.btn { display: inline-block; background: var(--ink); color: #fff; padding: 11px 22px; border: 2px solid var(--ink); border-radius: 6px; text-decoration: none; font: inherit; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn:hover { background: var(--sea); border-color: var(--sea); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--sky-low); color: var(--ink); border-color: var(--ink); }
ul.offer a { display: block; margin-top: 6px; }
ul.offer span { display: block; }
.lead a { font-weight: 600; }

/* Estados */
.loading { color: var(--muted); }
.error { color: #8A2B0E; }

/* Home */
.hero { background: linear-gradient(var(--sky-top), var(--sky-low) 70%); padding-bottom: clamp(48px, 9vw, 96px); position: relative; overflow: hidden; }
.hero .lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 46ch; margin: 0 0 32px; }
.sun { position: absolute; right: clamp(16px, 10vw, 160px); bottom: -80px; width: clamp(120px, 20vw, 240px); aspect-ratio: 1; border-radius: 50%; background: var(--sun); }
.hero .wrap { position: relative; z-index: 1; }
.choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 640px; }
.choose a { display: block; background: var(--ink); color: #fff; text-decoration: none; padding: 20px 22px; border-radius: 6px; }
.choose a:hover { background: var(--sea); color: #fff; }
.choose strong { display: block; font-family: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif; font-size: 1.6rem; line-height: 1.1; }
.choose span { font-size: .97rem; opacity: .9; }
ul.offer { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 28px; }
ul.offer li { border-top: 1px solid var(--line); padding: 14px 0 16px; }
ul.offer strong { display: block; }
ul.offer span { color: var(--muted); font-size: .97rem; }

/* Rodapé */
.sea { position: relative; margin-top: clamp(48px, 9vw, 96px); background: var(--sea); color: #fff; }
.sea::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: clamp(24px, 5vw, 56px); background: var(--sea); clip-path: polygon(0 100%, 0 55%, 12% 35%, 25% 50%, 38% 25%, 50% 45%, 63% 20%, 76% 45%, 88% 30%, 100% 50%, 100% 100%); }
.sea footer { padding: 26px clamp(20px, 5vw, 40px) 34px; font-size: .95rem; max-width: 960px; margin: 0 auto; }
.sea footer p { margin: 0 0 8px; max-width: 70ch; }
.sea a { color: #fff; }


/* ------------------------------------------------------------------ Acréscimos da versão com nota do dia */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px; z-index: 10; }
.pular:focus { left: 8px; }
.eyebrow { font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
.crumbs { margin: 0 0 10px; font-size: .95rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.chips-tags { margin: 14px 0 0; }
.texto { max-width: 720px; }
.texto p { max-width: 62ch; }

/* Etiquetas e notas */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.tag { font-size: .8rem; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.chip { --c: var(--muted); display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; white-space: nowrap; color: var(--ink); background: #fff; border: 1px solid var(--line); }
@supports (background: color-mix(in srgb, red 10%, white)) {
  .chip { background: color-mix(in srgb, var(--c) 14%, #fff); border-color: color-mix(in srgb, var(--c) 45%, #fff); }
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.b-otimo { --c: var(--good); }
.b-bom { --c: var(--ok); }
.b-regular { --c: var(--meh); }
.b-ruim { --c: var(--bad); }
.b-nd { --c: var(--muted); }

/* Alertas */
#alertas:empty { display: none; }
.alerta { --c: var(--meh); margin-top: 16px; max-width: 62ch; padding: 12px 16px; background: #fff; border: 1px solid var(--c); border-left-width: 6px; border-radius: 6px; font-size: .97rem; }
.alerta.n2 { --c: var(--bad); }
.alerta strong { display: block; margin-bottom: 2px; }

/* Home: abertura, ranking */
.hero .eyebrow { margin-top: 4px; }
.rank { list-style: none; margin: 16px 0 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.rank > li { border-top: 1px solid var(--line); }
.rank > li:first-child { border-top: 0; }
.rank > li.loading, .rank > li.error { padding: 16px; }
.row { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto auto; gap: 6px 16px; align-items: center; padding: 14px 16px; color: inherit; text-decoration: none; }
.row:hover { background: var(--sky-low); }
.row .pos { color: var(--muted); font-variant-numeric: tabular-nums; }
.row .who strong { display: block; font-family: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif; font-size: 1.15rem; line-height: 1.2; }
.row .who small { color: var(--muted); }
.row .mini { color: var(--muted); font-size: .92rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .row { grid-template-columns: 2rem minmax(0, 1fr) auto; }
  .row .mini { grid-column: 2 / -1; }
}

/* Leitura do dia */
.leitura { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.cartao { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; }
.cartao h3 { margin: 0 0 8px; }
.cartao p { margin: 10px 0 0; }
.aviso-zona { margin-top: 18px; }

/* Fim de semana */
.tabela-rolagem { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.tabela-rolagem table { border-collapse: collapse; width: 100%; min-width: 520px; font-variant-numeric: tabular-nums; }
.tabela-rolagem th, .tabela-rolagem td { text-align: left; vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--line); }
.tabela-rolagem thead th { border-top: 0; font-weight: 600; color: var(--muted); font-size: .92rem; }
.tabela-rolagem tbody th { font-weight: 400; }
.tabela-rolagem tbody th a { font-family: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.tabela-rolagem tbody th a:hover { color: var(--sea); }
.tabela-rolagem td small { display: block; margin-top: 4px; color: var(--muted); }
.melhor-marca { display: block; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--sea); }

/* Mapa esquemático */
.mapa { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--sky-low); }
.mapa svg { display: block; width: 100%; min-width: 640px; height: auto; }
.mapa .mar { fill: #D3EAF0; }
.mapa .terra { fill: #E7EDE4; stroke: var(--line); stroke-width: 1.5; }
.mapa .oceano { font: italic 600 13px "Source Sans 3", system-ui, sans-serif; fill: var(--muted); opacity: .85; }
.mapa .dot { fill: var(--muted); stroke: #fff; stroke-width: 3; }
.mapa .dot.b-otimo { fill: var(--good); }
.mapa .dot.b-bom { fill: var(--ok); }
.mapa .dot.b-regular { fill: var(--meh); }
.mapa .dot.b-ruim { fill: var(--bad); }
.mapa .mt { font: 700 14px "Source Sans 3", system-ui, sans-serif; fill: var(--ink); }
.mapa .ms { font-weight: 400; font-size: 12.5px; fill: var(--muted); }
.mapa a:hover .dot, .mapa a:focus-visible .dot { stroke: var(--ink); }
.legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 12px 0 0; }
.nota-mapa { color: var(--muted); font-size: .92rem; }

/* Blocos de apoio */
.duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.caixa { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 18px 20px; }
.caixa h3 { margin-top: 0; }
.caixa p { margin: 6px 0 0; }
ul.lista-simples { grid-template-columns: 1fr; }
.outros { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.outros a { color: var(--ink); text-decoration: none; font-weight: 600; border: 2px solid var(--ink); border-radius: 999px; padding: 8px 18px; }
.outros a:hover { background: var(--sky-low); }

/* Compartilhar e avisos */
.share { display: block; width: 100%; max-width: 62ch; font: inherit; padding: 12px 14px; border: 1px solid var(--muted); border-radius: 6px; background: #fff; color: var(--ink); resize: vertical; }
.acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.form { display: grid; gap: 16px; max-width: 520px; margin-top: 16px; }
.form p { margin: 0; }
.campo label { display: block; font-weight: 600; margin-bottom: 4px; }
.campo select, .campo input[type="text"] { width: 100%; min-height: 44px; font: inherit; padding: 10px 12px; border: 1px solid var(--muted); border-radius: 6px; background: #fff; color: var(--ink); }
.campo.check { display: flex; gap: 12px; align-items: flex-start; }
.campo.check input { flex: none; width: 22px; height: 22px; margin-top: 3px; }
.campo.check label { margin: 0; font-weight: 400; }
.armadilha { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; margin: 8px 0 0; color: var(--muted); }
.status.ok { color: var(--good); font-weight: 600; }
.status.erro { color: #8A2B0E; }

/* Gráfico da maré: horas no eixo */
.tide .tick { fill: var(--muted); font-size: 12px; }
.tide .tick.dia { fill: var(--ink); font-weight: 600; }
.tide .agora { font-weight: 600; paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
