:root {
  --bg: #eaf0f6;
  --card: #ffffff;
  --text: #0f172a;
  --dim: #64748b;
  --line: #dbe3ec;
  --accent: #0369a1;
  --head: #0f172a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #131c2e;
    --text: #e2e8f0;
    --dim: #94a3b8;
    --line: #243147;
    --accent: #38bdf8;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

a { color: var(--accent); }

.top {
  background: var(--head);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
}
.top a { color: #fff; text-decoration: none; }
.top .brand { font-weight: 700; }
.top nav { display: flex; gap: 1rem; font-size: 0.95rem; }

main { max-width: 860px; margin: 0 auto; padding: 1rem; }

h1 { font-size: 1.7rem; line-height: 1.2; margin: 0.4rem 0 0.2rem; }
h2 { font-size: 1.2rem; margin: 2rem 0 0.7rem; }

.dim { color: var(--dim); font-size: 0.92em; }
.crumbs { font-size: 0.88rem; color: var(--dim); }

.now {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
}
.now p { margin: 0.15rem 0; }
.now-main { display: flex; align-items: center; gap: 0.5rem; }
.now-ico { font-size: 3rem; }
.now-temp { font-size: 3.2rem; font-weight: 700; }
.now-label { font-weight: 700; font-size: 1.15rem; }

.resumen { font-size: 1.05rem; }

.qa { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.7rem; margin: 0; }
.qa div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 0.8rem 1rem; }
.qa dt { font-weight: 700; margin-bottom: 0.3rem; }
.qa dd { margin: 0; }

.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.5rem 0.7rem; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--dim); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
.ico { display: inline-block; width: 1.4em; }

.btn {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--head);
  color: #fff;
  text-decoration: none;
}

.links, .grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.4rem 1rem; }
.links { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

footer { max-width: 860px; margin: 2rem auto 0; padding: 1rem; font-size: 0.85rem; color: var(--dim); border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  h1 { font-size: 1.4rem; }
  .now-temp { font-size: 2.6rem; }
  th, td { padding: 0.45rem 0.5rem; }
}

.dir { display: inline-block; font-weight: 900; font-size: 1.15em; line-height: 1; color: var(--accent); }

.aviso {
  margin: 0.8rem 0 0;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border-left: 6px solid;
  background: var(--card);
}
.aviso span { color: var(--dim); font-size: 0.92em; }
.aviso-amarillo { border-color: #eab308; background: color-mix(in srgb, #facc15 14%, var(--card)); }
.aviso-naranja { border-color: #f97316; background: color-mix(in srgb, #fb923c 18%, var(--card)); }
.aviso-rojo { border-color: #dc2626; background: color-mix(in srgb, #ef4444 18%, var(--card)); }
.aviso-fuente { margin-top: 0.3rem; }
.avisos { list-style: none; padding: 0; margin: 0; }
.avisos li { margin-bottom: 0.9rem; }
.avisos li p { margin: 0.3rem 0 0 0.3rem; }

/* Las letras del viento llevan la explicación al pasar el ratón, sin el subrayado del navegador */
abbr[title] { text-decoration: none; border-bottom: 0; cursor: help; }
