/* Previsão do Tempo. Direção: boletim meteorológico impresso. Numeral em serifa (Instrument Serif), texto em grotesca (Schibsted Grotesk),
   rótulos e eixos em mono (DM Mono), filetes finos no lugar de caixas, desenhos em serigrafia (contorno de tinta + cor deslocada).
   Tema CLARO por padrão e escuro só por botão (nunca o do sistema). Um destaque por vez: --sky, que muda com o céu do momento.
   Cores dos dados (--c-*) seguem a paleta validada do dataviz; o status (bom, atenção, sério, crítico) sempre leva ícone e palavra. */

@font-face { font-family: 'Instrument Serif'; src: url('/vendor/previsao-do-tempo/instrument-serif-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('/vendor/previsao-do-tempo/instrument-serif-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('/vendor/previsao-do-tempo/schibsted-grotesk.woff2') format('woff2'); font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/vendor/previsao-do-tempo/dm-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Mono'; src: url('/vendor/previsao-do-tempo/dm-mono-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }

:root {
	--serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
	--sans: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
	color-scheme: light;
	--bg: #f3f5f7; --surface: #ffffff; --surface-2: #e8edf1; --ink: #0e1620; --ink-2: #414d5b; --ink-3: #596573;
	--line: #dce2e8; --line-2: #bfc9d3; --focus: #1d5fd1; --band: rgba(14, 22, 32, 0.05);
	--good: #0b7a2b; --warning: #8a5a00; --serious: #b3481b; --critical: #b02222;
	--good-f: #0ca30c; --warning-f: #fab219; --serious-f: #ec835a; --critical-f: #d03b3b;
	--c-temp: #eb6834; --c-rain: #2a78d6; --c-wind: #1baf7a; --c-humidity: #6250d6; --c-pressure: #008300; --c-cloud: #7d8896;
	--gx-sun: #f6b73c; --gx-moon: #d4d2f6; --gx-cloud: #bcd1ec; --gx-paper: #ffffff; --gx-rain: #2a78d6; --gx-bolt: #f6b73c;
	--sky: var(--sky-l); --sky-l: #c4620a; --sky-d: #f5a54a;
	--radius: 16px; --gutter: clamp(16px, 4vw, 40px);
}
:root[data-theme='dark'] {
	color-scheme: dark;
	--bg: #0d1218; --surface: #151b23; --surface-2: #1d252f; --ink: #e9eef3; --ink-2: #aab5c1; --ink-3: #8b97a4;
	--line: #252d37; --line-2: #364251; --focus: #6aa6ff; --band: rgba(255, 255, 255, 0.04);
	--good: #4cc46a; --warning: #f3b23c; --serious: #f29a72; --critical: #f58a8a;
	--c-temp: #d95926; --c-rain: #3987e5; --c-wind: #199e70; --c-humidity: #9085e9; --c-pressure: #2fa32f; --c-cloud: #8f9aa8;
	--gx-moon: #8e8bd6; --gx-cloud: #3a4b66; --gx-paper: #151b23; --gx-rain: #5a9cf0;
	--sky: var(--sky-d);
}
:root[data-sky='clear'] { --sky-l: #c4620a; --sky-d: #f5a54a; }
:root[data-sky='night'] { --sky-l: #4457c8; --sky-d: #97a6ff; }
:root[data-sky='cloud'] { --sky-l: #4a6485; --sky-d: #9db4d3; }
:root[data-sky='rain'] { --sky-l: #2a6fdb; --sky-d: #6aa6ff; }
:root[data-sky='storm'] { --sky-l: #6b4fd1; --sky-d: #a495f2; }
:root[data-sky='snow'] { --sky-l: #1f7f99; --sky-d: #7fd0e6; }
:root[data-sky='fog'] { --sky-l: #5d6874; --sky-d: #b4bcc6; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--sans); min-height: 100vh; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 2 * var(--gutter), 1240px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--ink); color: var(--bg); border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
.i { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i--sm { width: 16px; height: 16px; } .i--xs { width: 13px; height: 13px; } .i--lg { width: 36px; height: 36px; }
.kicker { font: 500 0.6875rem/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); }

/* ───────── cabeçalho ───────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 10px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -0.01em; flex: none; }
.brand__mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--ink); color: var(--bg); }
.brand__name { font-size: 1.0625rem; }
.place { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: min(46vw, 360px); padding: 0 14px; margin-left: 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 0.9375rem; }
.place:hover { border-color: var(--ink-3); }
.place { min-width: 0; } .place__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.top__tools { flex: none; }
.top__tools { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.tool { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--ink); }
.tool:hover { background: var(--surface-2); }
.tool:active { transform: scale(0.96); }
.tool--sm { width: 40px; height: 40px; }
.tool:disabled { opacity: 0.5; cursor: progress; }
.tool--refresh.is-spinning .i { animation: spin 0.9s linear infinite; }
#themeToggle .i--moon { display: none; } #themeToggle[aria-pressed='true'] .i--sun { display: none; } #themeToggle[aria-pressed='true'] .i--moon { display: block; }
.pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-weight: 600; font-size: 0.875rem; }
.jump { border-top: 1px solid var(--line); }
.jump__in { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.jump a { padding: 11px 14px; font: 600 0.875rem/1 var(--sans); color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.jump a:hover { color: var(--ink); }
.jump a[aria-current] { color: var(--ink); border-bottom-color: var(--sky); }

.main { padding-block: clamp(20px, 4vw, 40px) 24px; outline: none; }

/* ───────── botões e campos ───────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: 600 0.9375rem/1 var(--sans); text-decoration: none; transition: background 0.15s, border-color 0.15s, transform 0.1s; }
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--primary:hover { background: var(--ink); opacity: 0.88; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 1.0625rem; border-radius: 14px; }
.btn--block { width: 100%; }
.btn--quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--danger { background: var(--critical-f); border-color: var(--critical-f); color: #fff; }
.btn--danger:hover { background: var(--critical-f); opacity: 0.9; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[aria-busy='true'] { cursor: progress; position: relative; color: transparent; }
.btn[aria-busy='true']::after { content: ''; position: absolute; width: 18px; height: 18px; border: 2px solid var(--bg); border-top-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
.btn--primary[aria-busy='true']::after { border-color: var(--bg); border-top-color: transparent; }
.link { background: none; border: 0; padding: 0; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font: 500 0.875rem/1 var(--sans); }
.chip:hover { border-color: var(--ink-3); background: var(--surface-2); }
.chip:disabled { opacity: 0.55; }
.search { position: relative; }
.search__icon { position: absolute; left: 16px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.search__input { width: 100%; min-height: 54px; padding: 0 16px 0 46px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); font-size: 1rem; }
.search__input::placeholder { color: var(--ink-3); }
.search__input:hover { border-color: var(--ink-3); }
.search__input:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.results { margin-top: 8px; padding: 6px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); max-height: 320px; overflow: auto; }
.result { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 8px 12px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.result:hover, .result:focus-visible { background: var(--surface-2); }
.result span { display: flex; flex-direction: column; min-width: 0; }
.result small, .saved__text small { color: var(--ink-3); font-size: 0.8125rem; }
.results__none { padding: 14px; color: var(--ink-2); }
.seg { display: inline-flex; gap: 2px; max-width: 100%; padding: 3px; border: 1px solid var(--line-2); border-radius: 13px; background: var(--surface); overflow-x: auto; scrollbar-width: none; }
.seg button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font: 600 0.875rem/1 var(--sans); white-space: nowrap; }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.seg button[aria-checked='true'] { background: var(--ink); color: var(--bg); }
.seg--sm button { min-height: 36px; padding: 0 12px; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; font-weight: 600; }
.switch__track { width: 46px; height: 28px; border-radius: 999px; background: var(--line-2); position: relative; transition: background 0.2s; flex: none; }
.switch__knob { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: translate 0.2s; }
.switch[aria-pressed='true'] .switch__track { background: var(--ink); }
.switch[aria-pressed='true'] .switch__knob { translate: 18px 0; background: var(--bg); }

/* ───────── boas-vindas ───────── */
.welcome { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 5vw, 72px); align-items: center; min-height: min(640px, calc(100vh - 160px)); }
.welcome__title { font: 400 clamp(3.2rem, 9vw, 6.4rem)/0.92 var(--serif); letter-spacing: -0.02em; margin: 12px 0 18px; }
.welcome__title em { color: var(--sky); }
.welcome__lead { font-size: 1.1875rem; color: var(--ink-2); max-width: 34ch; }
.welcome__actions { display: grid; gap: 14px; margin-top: 28px; max-width: 480px; }
.welcome__or { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font: 500 0.75rem var(--mono); text-transform: uppercase; letter-spacing: 0.1em; }
.welcome__or::before, .welcome__or::after { content: ''; flex: 1; height: 1px; background: var(--line-2); }
.welcome__quick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-3); font-size: 0.875rem; }
.welcome__privacy { display: flex; gap: 10px; margin-top: 26px; max-width: 480px; color: var(--ink-2); font-size: 0.875rem; }
.welcome__privacy .i { margin-top: 2px; width: 18px; height: 18px; color: var(--ink-3); }
.welcome__msg { margin-top: 14px; padding: 12px 14px; max-width: 480px; border: 1px solid var(--line-2); border-left: 4px solid var(--serious-f); border-radius: 10px; background: var(--surface); font-size: 0.9375rem; }
.welcome__art { position: relative; aspect-ratio: 1; max-height: 560px; border: 1px solid var(--line); border-radius: 32px; background: color-mix(in srgb, var(--sky) 9%, var(--surface)); overflow: hidden; color: var(--sky); }
.welcome__art .isobars { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.9; }
.welcome__art .wx--art { position: absolute; width: 58%; height: 58%; left: 22%; top: 18%; color: var(--ink); }
.welcome__stamp { position: absolute; right: 22px; bottom: 22px; padding: 8px 12px; border: 1.5px solid var(--ink); border-radius: 4px; font: 500 0.6875rem/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink); rotate: -7deg; background: color-mix(in srgb, var(--bg) 70%, transparent); }

/* ───────── carregando e erro ───────── */
.sk { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: shimmer 1.5s ease infinite; }
.sk--hero { height: clamp(320px, 46vw, 440px); } .sk--strip { height: 118px; margin-top: 24px; } .sk--block { height: 240px; }
.sk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 24px; }
.failure { max-width: 560px; margin: 8vh auto; text-align: center; display: grid; justify-items: center; gap: 12px; }
.failure .i { color: var(--serious); }
.failure__title { font: 400 2.25rem/1.05 var(--serif); }
.failure__text { color: var(--ink-2); }
.failure__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

/* ───────── seções ───────── */
.sec { padding-top: clamp(32px, 6vw, 64px); scroll-margin-top: 120px; }
.sec__head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 18px; }
.sec__title { font: 400 clamp(2rem, 5vw, 3rem)/1 var(--serif); letter-spacing: -0.01em; margin-top: 6px; }
.sec__lead { color: var(--ink-2); max-width: 62ch; margin-bottom: 16px; }
.sub { font: 400 1.75rem/1.1 var(--serif); margin: 28px 0 12px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

/* ───────── agora (herói) ───────── */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'main art' 'say say' 'alerts alerts' 'upd upd'; gap: 14px 20px; padding: clamp(20px, 4vw, 44px); margin-top: 0; border: 1px solid color-mix(in srgb, var(--sky) 24%, var(--line)); border-radius: 28px; background: color-mix(in srgb, var(--sky) 8%, var(--surface)); overflow: hidden; scroll-margin-top: 130px; }
.hero__iso { position: absolute; right: -8%; top: -10%; width: 70%; height: 130%; color: var(--sky); opacity: 0.5; pointer-events: none; }
.hero > :not(.hero__iso) { position: relative; }
.hero__main { grid-area: main; min-width: 0; }
.hero__art { grid-area: art; width: clamp(96px, 24vw, 340px); aspect-ratio: 1; align-self: start; color: var(--ink); }
.hero__when { font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); }
.hero__place { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-weight: 600; font-size: 1.0625rem; }
.hero__place .i { width: 18px; height: 18px; color: var(--ink-3); }
.hero__temp { display: flex; align-items: flex-start; margin-top: clamp(14px, 3vw, 30px); color: var(--ink); font-size: clamp(7rem, 26vw, 13rem); line-height: 1; }
.hero__num { font: 400 1em/0.78 var(--serif); letter-spacing: -0.05em; }
.hero__deg { font: 400 0.34em/0.8 var(--serif); margin: 0.06em 0 0 0.06em; color: var(--sky); }
.hero__unit { font: 500 0.0875em/1 var(--mono); margin: 0.1em 0 0 0.02em; color: var(--ink-3); letter-spacing: 0.04em; }
.hero__sky { margin-top: clamp(12px, 2vw, 20px); font: 600 clamp(1.25rem, 3vw, 1.625rem)/1.2 var(--sans); }
.hero__range { margin-top: 6px; color: var(--ink-2); font-size: 1rem; }
.hero__say { grid-area: say; display: grid; gap: 6px; max-width: 60ch; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--sky) 28%, var(--line)); }
.hero__lead { font: 400 clamp(1.5rem, 3.4vw, 2.125rem)/1.15 var(--serif); }
.hero__outlook { font-size: 1.0625rem; color: var(--ink-2); }
.hero__tip { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 600; }
.hero__tip .i { width: 20px; height: 20px; color: var(--sky); }
.alerts { grid-area: alerts; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.alert { display: flex; gap: 12px; padding: 12px 14px; border: 1px solid var(--line-2); border-left-width: 5px; border-radius: 12px; background: var(--surface); align-items: flex-start; }
.alert > div { display: grid; gap: 2px; min-width: 0; }
.alert b { font-size: 0.9375rem; } .alert span { font-size: 0.875rem; color: var(--ink-2); }
.alert--critical { border-left-color: var(--critical-f); } .alert--critical .i { color: var(--critical); }
.alert--serious { border-left-color: var(--serious-f); } .alert--serious .i { color: var(--serious); }
.alert--warning { border-left-color: var(--warning-f); } .alert--warning .i { color: var(--warning); }
.alert--good { border-left-color: var(--good-f); } .alert--good .i { color: var(--good); }
.hero__upd { grid-area: upd; font: 400 0.75rem/1.4 var(--mono); color: var(--ink-3); }

/* ───────── desenhos do tempo (serigrafia) ───────── */
symbol { overflow: visible; }
.wx { display: inline-block; width: 1em; height: 1em; color: var(--ink); overflow: visible; flex: none; }
.wx--sm { width: 36px; height: 36px; } .wx--hero { width: 100%; height: 100%; } .wx--empty { background: var(--surface-2); border-radius: 50%; }
.f { stroke: none; } .f-sun { fill: var(--gx-sun); } .f-moon { fill: var(--gx-moon); } .f-cloud { fill: var(--gx-cloud); } .f-bolt { fill: var(--gx-bolt); }
.o { fill: none; stroke: currentColor; stroke-width: var(--gx-stroke, 2.2); stroke-linecap: round; stroke-linejoin: round; }
.o.paper { fill: var(--gx-paper); } .o-rain { stroke: var(--gx-rain); }
.wx--hero, .wx--art { --gx-stroke: 1.9; }
[data-motion='full'] .wx--hero, [data-motion='full'] .wx--art { --gx-play: running; }
.gx-rays { transform-origin: 32px 32px; animation: spin 60s linear infinite; animation-play-state: var(--gx-play, paused); }
.gx-cloud-a { animation: drift 7s ease-in-out infinite alternate; animation-play-state: var(--gx-play, paused); }
.gx-cloud-b { animation: drift 9s ease-in-out infinite alternate-reverse; animation-play-state: var(--gx-play, paused); }
.gx-drop { stroke-dasharray: 5 5; animation: fall 0.9s linear infinite; animation-play-state: var(--gx-play, paused); }
.gx-flakes { animation: sway 3s ease-in-out infinite alternate; animation-play-state: var(--gx-play, paused); }
.gx-bolt { animation: flash 4.5s infinite; animation-play-state: var(--gx-play, paused); }
.gx-fog { animation: drift 6s ease-in-out infinite alternate; animation-play-state: var(--gx-play, paused); }
.gx-star { animation: twinkle 3.5s ease-in-out infinite alternate; animation-play-state: var(--gx-play, paused); }

/* ───────── horas ───────── */
.strip { display: flex; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 10px; scrollbar-width: thin; }
.hr { flex: none; min-width: 68px; display: grid; justify-items: center; gap: 4px; padding: 12px 8px; scroll-snap-align: start; border-left: 1px solid var(--line); }
.hr:first-child { border-left: 0; }
.hr--now { background: color-mix(in srgb, var(--sky) 10%, var(--surface)); border-radius: 14px; border-left-color: transparent; }
.hr__t { font: 500 0.75rem/1 var(--mono); color: var(--ink-3); text-transform: uppercase; }
.hr--now .hr__t { color: var(--ink); font-weight: 500; }
.hr__temp { font-size: 1.125rem; }
.hr__pop { display: inline-flex; align-items: center; gap: 3px; font: 500 0.75rem/1 var(--mono); color: var(--c-rain); min-height: 14px; }
:root[data-theme='dark'] .hr__pop { color: #7fb2f5; }
.hr__pop--none { color: var(--line-2); }
.chartbox { padding: 16px clamp(12px, 2vw, 22px) 12px; margin-top: 18px; }
.chartbox__bar { margin-bottom: 14px; }
.chartbox__caption { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; font-size: 0.875rem; color: var(--ink-2); margin-bottom: 4px; }
.chartbox__caption b { color: var(--ink); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.key { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--k, var(--ink-3)); }
.key--dash { border-top: 2px dashed var(--ink-3); }
.chart { position: relative; min-height: 220px; border-radius: 10px; touch-action: pan-y; }
.chart:focus-visible { outline-offset: 4px; }
.ch { display: block; width: 100%; height: auto; overflow: visible; }
.ch__grid { stroke: var(--line); stroke-width: 1; } .ch__axis { stroke: var(--line-2); stroke-width: 1; } .ch__tickmark { stroke: var(--line-2); }
.ch__tick { fill: var(--ink-3); font: 400 11px var(--mono); } .ch__band { fill: var(--band); }
.ch__line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch__line--second { stroke: var(--ink-3); stroke-width: 1.75; stroke-dasharray: 5 4; }
.ch__area { opacity: 0.1; } .ch__dot { stroke: var(--surface); stroke-width: 2; }
.ch__value { fill: var(--ink); font: 600 12px var(--sans); paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.ch__now { fill: var(--ink-3); font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: 0.08em; }
.ch__nowline { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 2 3; }
.ch__cross { stroke: var(--ink-2); stroke-width: 1; } .ch__hover { stroke: var(--surface); stroke-width: 2; } .ch__hover--second { fill: var(--ink-3); }
.ch__bar { transition: opacity 0.15s; }
.tip { position: absolute; top: 4px; transform: translateX(-50%); display: grid; gap: 2px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14); pointer-events: none; font-size: 0.8125rem; white-space: nowrap; z-index: 3; }
.tip__when { font: 500 0.6875rem/1.2 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.tip__row { display: flex; align-items: center; gap: 8px; } .tip__row strong { font-size: 1rem; } .tip__row span { color: var(--ink-2); }
.tip__key { width: 14px; height: 2px; border-radius: 1px; background: var(--ink-3); } .tip__row--second .tip__key { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px); }
.tip__note { color: var(--ink-2); }
.tablebox { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.tablebox summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; font-weight: 600; font-size: 0.875rem; color: var(--ink-2); }
.tablewrap { max-height: 280px; overflow: auto; }
.table { width: 100%; border-collapse: collapse; font: 400 0.8125rem/1.4 var(--mono); }
.table th, .table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--line); } .table thead th { position: sticky; top: 0; background: var(--surface); }

/* ───────── dias ───────── */
.days { border-top: 1px solid var(--ink); }
.day { display: grid; grid-template-columns: 78px 40px 58px minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px 2px; border-bottom: 1px solid var(--line); }
.day--today { background: color-mix(in srgb, var(--sky) 7%, transparent); }
.day__name { display: grid; line-height: 1.2; } .day__name b { font-size: 1rem; } .day__name small { color: var(--ink-3); font: 400 0.75rem var(--mono); }
.day__pop { display: inline-flex; align-items: center; gap: 3px; font: 500 0.8125rem var(--mono); color: var(--c-rain); } :root[data-theme='dark'] .day__pop { color: #7fb2f5; } .day__pop--none { color: var(--line-2); }
.day__range { display: grid; grid-template-columns: 38px minmax(0, 1fr) 38px; align-items: center; gap: 8px; font: 500 0.9375rem var(--sans); }
.day__min { text-align: right; color: var(--ink-3); } .day__max { font-weight: 700; }
.day__track { position: relative; height: 8px; border-radius: 999px; background: var(--surface-2); }
.day__fill { position: absolute; top: 0; bottom: 0; left: var(--a); right: calc(100% - var(--b)); min-width: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--c-rain), var(--c-temp)); }
.day__now { position: absolute; top: 50%; left: var(--n); width: 12px; height: 12px; translate: -50% -50%; border-radius: 50%; background: var(--ink); border: 2px solid var(--surface); }

/* ───────── detalhes ───────── */
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 0 clamp(20px, 4vw, 48px); border-top: 1px solid var(--ink); }
.fact { display: grid; align-content: start; gap: 8px; padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.fact__label { display: flex; align-items: center; gap: 8px; font: 500 0.75rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.fact__label .i { width: 18px; height: 18px; }
.fact__main { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 64px; }
.fact__val { font: 700 clamp(1.75rem, 4vw, 2.25rem)/1.05 var(--sans); letter-spacing: -0.02em; font-variant-numeric: proportional-nums; }
.unit { font: 500 0.875rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0; }
.fact__note { color: var(--ink-2); font-size: 0.9375rem; max-width: 46ch; }
@media (min-width: 720px) { .fact--wide { grid-column: span 2; } }
.meter { display: inline-flex; gap: 3px; flex: none; } .meter i { width: 20px; height: 9px; border-radius: 2px; background: var(--line); }
.meter--good i.on { background: var(--good-f); } .meter--warning i.on { background: var(--warning-f); } .meter--serious i.on { background: var(--serious-f); } .meter--critical i.on { background: var(--critical-f); }
.bar { position: relative; width: 120px; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; flex: none; }
.bar__fill { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 999px; background: var(--c-humidity); } .bar__fill--soft { background: var(--c-cloud); }
.bar__good { position: absolute; top: 0; bottom: 0; left: 30%; width: 30%; background: color-mix(in srgb, var(--good-f) 22%, transparent); }
.compass { flex: none; } .compass circle { fill: none; stroke: var(--line-2); stroke-width: 1.5; } .compass text { fill: var(--ink-3); font: 500 8px var(--mono); }
.compass__arrow { transform-origin: 32px 32px; transition: transform 0.6s cubic-bezier(0.3, 0.7, 0.3, 1); } .compass__arrow path:first-child { fill: var(--sky); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; } .compass__arrow path:last-child { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.spark { flex: none; } .spark__line { fill: none; stroke: var(--c-pressure); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; } .spark__dot { fill: var(--c-pressure); stroke: var(--surface); stroke-width: 2; }
.sunarc { flex: none; } .sunarc line { stroke: var(--line-2); stroke-width: 1.5; } .sunarc__path { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 4; } .sunarc__sun { fill: var(--gx-sun); stroke: var(--ink); stroke-width: 2; }
.moon { flex: none; } .moon__disc { fill: var(--surface-2); } .moon__lit { fill: var(--gx-moon); } .moon__rim { fill: none; stroke: var(--ink); stroke-width: 1.8; }

/* ───────── histórico ───────── */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 24px; margin-top: 18px; border-top: 1px solid var(--ink); }
.stat { padding: 14px 0 16px; border-bottom: 1px solid var(--line); } .stat__label { font: 500 0.6875rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); } .stat__val { font: 700 1.75rem/1.1 var(--sans); letter-spacing: -0.02em; margin-top: 4px; } .stat__note { color: var(--ink-3); font-size: 0.8125rem; margin-top: 2px; }
.accuracy { display: flex; gap: 12px; align-items: flex-start; margin-top: 18px; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 0.9375rem; } .accuracy .i { color: var(--good); margin-top: 2px; } .accuracy b { color: var(--ink); }
.timeline { display: grid; gap: 18px; }
.tl-day__name { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.tl-day ul { display: grid; gap: 0; position: relative; margin-left: 16px; border-left: 1px solid var(--line-2); }
.tl { display: flex; gap: 14px; padding: 8px 0 12px 22px; position: relative; }
.tl__ico { position: absolute; left: -17px; top: 8px; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 1px solid var(--line-2); } .tl__ico .i { width: 16px; height: 16px; }
.tl__title { font-size: 1rem; } .tl__time { font: 400 0.8125rem var(--mono); color: var(--ink-3); } .tl__detail { color: var(--ink-2); font-size: 0.9375rem; }
.tl--rain-start .tl__ico, .tl--rain-end .tl__ico { color: var(--c-rain); } .tl--temp .tl__ico, .tl--max .tl__ico, .tl--min .tl__ico { color: var(--c-temp); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.empty { display: grid; justify-items: start; gap: 10px; padding: 28px; border: 1px dashed var(--line-2); border-radius: var(--radius); max-width: 640px; } .empty .i { color: var(--ink-3); } .empty__title { font: 400 1.75rem/1.1 var(--serif); } .empty p { color: var(--ink-2); }

/* ───────── janelas ───────── */
.sheet { width: min(540px, calc(100vw - 24px)); max-height: min(88vh, 760px); padding: 0; border: 1px solid var(--line-2); border-radius: 22px; background: var(--surface); color: var(--ink); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.3); }
.sheet[open] { display: flex; flex-direction: column; animation: sheet-in 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }
.sheet::backdrop { background: rgba(8, 12, 18, 0.5); }
.sheet--small { width: min(440px, calc(100vw - 24px)); }
.sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 12px 22px; border-bottom: 1px solid var(--line); flex: none; } .sheet__head h2 { font: 400 1.75rem/1 var(--serif); }
.sheet__body { display: flex; flex-direction: column; gap: 14px; padding: 18px 22px 22px; overflow: auto; } .sheet__body > * { flex: none; } /* flex e não grid: num grid, a lista rolável (overflow) tem altura mínima 0 e colapsa por baixo do item seguinte */ .sheet--small .sheet__body h2 { font: 400 1.75rem/1.1 var(--serif); }
.sheet__sub { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; }
.sheet__note { display: flex; gap: 8px; align-items: center; color: var(--ink-3); font-size: 0.8125rem; } .sheet__note .i { width: 16px; height: 16px; }
.sheet__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.saved { display: grid; gap: 4px; } .saved__item { display: flex; align-items: center; gap: 4px; border-radius: 14px; } .saved__item.is-current { background: color-mix(in srgb, var(--sky) 10%, transparent); }
.saved__pick { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 60px; padding: 8px 10px; border: 0; border-radius: 14px; background: transparent; text-align: left; } .saved__pick:hover { background: var(--surface-2); }
.saved__text { display: flex; flex-direction: column; min-width: 0; flex: 1; } .saved__text b, .saved__text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .saved__temp { font: 700 1.25rem var(--sans); }
.saved__empty { color: var(--ink-3); padding: 8px 0; }
.set { display: grid; gap: 2px; } .set h3 { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin: 14px 0 4px; }
.set__row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.set__label { display: grid; } .set__label small { color: var(--ink-3); font-size: 0.8125rem; max-width: 34ch; } .set__note { color: var(--ink-2); font-size: 0.875rem; padding: 6px 0; }
.set--danger .btn { justify-self: start; }

/* ───────── rodapé e avisos ───────── */
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); translate: -50% 0; z-index: 60; display: flex; align-items: center; gap: 14px; max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 0.9375rem; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); animation: toast-in 0.25s ease; }
.toast__btn { min-height: 36px; padding: 0 12px; border: 1px solid color-mix(in srgb, var(--bg) 50%, transparent); border-radius: 9px; background: transparent; color: var(--bg); font-weight: 700; }
.foot { margin-top: 88px; padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--ink-3); font-size: 0.8125rem; }
.foot__src { max-width: 72ch; margin-top: 22px; } .foot__author { margin-top: 12px; }
.foot a { color: var(--ink-2); }
.foot .usage { --usage-ink: var(--ink); }

/* ───────── movimento ───────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -100% 0; } }
@keyframes drift { from { transform: translateX(-2.5px); } to { transform: translateX(2.5px); } }
@keyframes fall { to { stroke-dashoffset: -10; } }
@keyframes sway { from { transform: translateY(-1px); } to { transform: translateY(2.5px); } }
@keyframes flash { 0%, 90%, 94%, 100% { opacity: 1; } 92% { opacity: 0.25; } 96% { opacity: 0.4; } }
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 1; } }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
[data-motion='full'] .hero__main, [data-motion='full'] .hero__say, [data-motion='full'] .sec { animation: rise 0.45s ease both; }
html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ───────── telas pequenas ───────── */
@media (max-width: 859px) {
	.welcome { grid-template-columns: 1fr; min-height: 0; }
	.welcome__art { order: -1; aspect-ratio: 16 / 9; max-height: 220px; border-radius: 22px; }
	.welcome__art .wx--art { width: 40%; height: 100%; left: 30%; top: 0; }
	.welcome__stamp { display: none; }
}
@media (max-width: 719px) {
	.brand__name { display: none; }
	.place { flex: 1; max-width: none; justify-content: flex-start; }
	.top__tools { gap: 0; } .top__in { gap: 8px; }
	.tool { width: 42px; }
	#themeToggle { display: none; } /* no celular o tema fica nos Ajustes: o nome do lugar precisa de espaço */
	.hero { border-radius: 22px; }
	.hero__iso { width: 110%; right: -30%; }
	.day { grid-template-columns: 66px 36px 46px minmax(0, 1fr); gap: 2px 6px; }
	.day__range { grid-template-columns: 32px minmax(0, 1fr) 32px; gap: 6px; }
	.sheet { width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; border-bottom: 0; }
	.sheet--small { margin: auto; width: calc(100vw - 24px); border-radius: 22px; border-bottom: 1px solid var(--line-2); }
	.tip { white-space: normal; max-width: 70vw; }
}
@media (min-width: 720px) { .hero { grid-template-areas: 'main art' 'say art' 'alerts alerts' 'upd upd'; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); } .hero__art { width: 100%; max-width: 380px; justify-self: end; align-self: center; } }

/* ───────── avisos (push) ───────── */
.tool--alerts { position: relative; }
.tool__dot { position: absolute; top: 9px; right: 9px; width: 10px; height: 10px; border-radius: 50%; background: var(--sky); border: 2px solid var(--bg); display: none; }
.tool--alerts[data-on='1'] .tool__dot { display: block; }
.alerts__lead { color: var(--ink-2); }
.alerts__place { display: flex; align-items: center; gap: 8px; color: var(--ink-2); } .alerts__place .i { width: 18px; height: 18px; color: var(--ink-3); } .alerts__place b { color: var(--ink); }
.rules { display: grid; gap: 0; border-top: 1px solid var(--ink); }
.rule { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule__head { display: flex; align-items: center; gap: 10px; } .rule__head > .i { width: 20px; height: 20px; color: var(--ink-3); flex: none; }
.rule__head .switch { flex: 1; min-width: 0; text-align: left; }
.tag { padding: 3px 8px; border: 1px solid var(--serious-f); border-radius: 999px; font: 500 0.6875rem/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--serious); flex: none; }
.rule__desc { margin-left: 30px; color: var(--ink-3); font-size: 0.875rem; }
.rule__params { display: grid; gap: 10px; margin: 8px 0 2px 30px; padding-left: 14px; border-left: 2px solid color-mix(in srgb, var(--sky) 40%, var(--line)); }
.field { display: grid; gap: 4px; font-size: 0.875rem; color: var(--ink-2); }
.field select { min-height: 46px; padding: 0 12px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); font: 500 0.9375rem var(--sans); }
.field select:hover { border-color: var(--ink-3); }
.alerts__quiet { display: grid; gap: 10px; padding: 10px 0; } .alerts__quiet h3 { font: 500 0.75rem var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.alerts__privacy { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: 0.8125rem; } .alerts__privacy .i { width: 18px; height: 18px; margin-top: 2px; color: var(--ink-3); }
.alerts__notice { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-2); border-left: 4px solid var(--ink-3); border-radius: 10px; background: var(--surface); font-size: 0.9375rem; } .alerts__notice--warn { border-left-color: var(--serious-f); } .alerts__notice .i { flex: none; margin-top: 1px; }
.alerts__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fact__val .sunrow { display: block; font-size: 0.78em; }
