@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("/fonts/lato-300.ttf") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/lato-400.ttf") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/lato-700.ttf") format("truetype");
}
@font-face {
  font-family: "Lato";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/fonts/lato-900.ttf") format("truetype");
}

:root {
  --ink: #171715;
  --muted: #666159;
  --paper: #fffefa;
  --canvas: #e9e6de;
  --soft: #f3f0e8;
  --rule: #1b1b19;
  --hairline: #c9c4b9;
  --font-sans: "Lato", "Segoe UI", Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--canvas); }
body {
  min-height: 100%; margin: 0; background: var(--canvas); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration-color: var(--hairline); text-underline-offset: .16em; }
a:hover { text-decoration-color: var(--ink); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--ink); outline-offset: 3px;
}
button {
  min-height: 2.65rem; border: 1px solid var(--rule); border-radius: 0;
  background: transparent; color: var(--ink); padding: .62rem 1rem; cursor: pointer;
  font-family: var(--font-sans); font-size: .7rem; font-weight: 800;
  letter-spacing: .11em; text-transform: uppercase;
}
button:hover { background: var(--soft); }
button:disabled { cursor: wait; opacity: .5; }

.newspaper-shell {
  width: calc(100% - 2rem); max-width: 70rem; min-height: calc(100vh - 4rem);
  margin: 2rem auto; border: 1px solid var(--hairline); background: var(--paper);
  padding: 1.6rem 2.4rem 1.25rem; box-shadow: 0 1rem 3rem rgba(35, 32, 25, .09);
}
.newspaper-shell * { animation: none !important; transition: none !important; }
.kicker, .masthead-meta, .masthead-date, .page-footer, .section-heading > p,
.form-help, .form-error, .detail-label, .detail-card span {
  font-family: var(--font-sans);
}
.kicker {
  margin: 0; color: var(--muted); font-size: .64rem; font-weight: 300;
  letter-spacing: .16em; text-transform: uppercase;
}

.masthead {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) max-content;
  grid-template-areas: "edition date" "title actions";
  align-items: end; column-gap: 2.5rem; row-gap: .25rem;
  border-top: .48rem solid var(--rule); border-bottom: 1px solid var(--rule); padding: 1rem 0 1.15rem;
}
.masthead #edition-label {
  grid-area: edition;
}
.masthead #edition-label, .masthead-date {
  align-self: center; white-space: nowrap; font-size: clamp(.5rem, 1.1vw, .64rem);
}
.masthead-date {
  grid-area: date; justify-self: end; text-align: right;
}
.masthead h1, .section-heading h2, .weather-current h2, .moon-panel h2,
.panel-heading h2 {
  font-family: var(--font-sans);
}
.masthead h1 {
  grid-area: title; max-width: 42rem; margin: .16rem 0 0; font-size: 4.5rem; font-weight: 700;
  line-height: .94; letter-spacing: -.055em;
}
.masthead-meta {
  grid-area: actions; display: flex; flex-direction: column; align-items: flex-end;
  color: var(--muted); font-size: .68rem; line-height: 1.45; text-align: right; text-transform: uppercase;
}
.masthead-meta strong { margin: 0; }
.masthead-meta strong {
  display: block; margin-top: .2rem; color: var(--ink); font-size: 1.8rem;
  font-variant-numeric: tabular-nums; letter-spacing: -.03em;
}
.masthead-settings {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2rem; margin-top: .55rem; padding: .3rem .55rem; background: var(--paper);
  font-size: .58rem;
}
.masthead-settings[aria-expanded="true"] { background: var(--ink); color: var(--paper); }

.notices {
  position: relative;
  margin: 1rem 0 0; border: 1px solid var(--hairline); border-left: .3rem solid var(--rule);
  background: var(--soft); padding: .75rem 3rem .75rem 1rem;
  font-family: var(--font-sans); font-size: .76rem; line-height: 1.5;
}
.notices::before {
  display: block; margin-bottom: .25rem; font-size: .62rem; font-weight: 800;
  letter-spacing: .12em; text-transform: uppercase; content: "Aviso de actualización";
}
.notices p { margin: 0; }
.notice-close {
  position: absolute; top: .55rem; right: .65rem;
  display: grid; width: 1.8rem; height: 1.8rem; padding: 0; place-items: center;
  border: 1px solid var(--rule); background: transparent; color: var(--ink);
  font-family: var(--font-sans); font-size: 1.35rem; font-weight: 500; line-height: 1;
  cursor: pointer;
}
.notice-close:hover, .notice-close:focus-visible { background: var(--ink); color: var(--paper); }

.daily-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 10rem;
  margin-top: 1rem; border-top: 2px solid var(--rule); border-bottom: 2px solid var(--rule);
}
.weather-panel, .moon-panel { min-width: 0; padding: .85rem 0; }
.weather-panel { padding-right: 1.1rem; }
#weather-content {
  display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); grid-template-rows: auto 1fr;
  align-items: center; column-gap: 1rem;
}
.moon-panel {
  border-left: 1px solid var(--hairline); background: var(--soft); padding-right: .65rem;
  padding-left: .65rem; text-align: center;
}
.panel-kicker { grid-column: 1 / -1; margin-bottom: .35rem; }
.weather-current {
  display: flex; min-width: 0; height: 100%; align-items: center; gap: .55rem;
  border-right: 1px solid var(--hairline); padding-right: .65rem;
}
.current-weather-icon {
  display: block; width: 4.15rem; height: 4.15rem; flex: 0 0 auto; object-fit: contain;
}
.temperature {
  margin: 0; font-size: 4.2rem; font-weight: 750; line-height: .8;
  letter-spacing: -.075em; font-variant-numeric: tabular-nums;
}
.weather-current h2 {
  margin: .35rem 0 0; font-size: 1rem; line-height: 1.08; letter-spacing: -.015em;
}
.moon-panel h2 {
  margin: .35rem 0 0; font-size: .9rem; line-height: 1.08; letter-spacing: -.015em;
}
.forecast-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0; margin: 0;
}
.forecast-grid article {
  min-width: 0; border-left: 1px solid var(--hairline); padding: .1rem .5rem; text-align: left;
}
.forecast-grid article:first-child { border-left: 0; padding-left: 0; }
.forecast-grid article:last-child { padding-right: 0; }
.forecast-icon {
  display: block; width: 2.7rem; height: 2.7rem; margin: .25rem 0 .15rem;
  object-fit: contain;
}
.forecast-grid p, .forecast-grid span {
  margin: 0; color: var(--muted); font-family: var(--font-sans);
  font-size: .58rem; letter-spacing: .035em; text-transform: uppercase;
}
.forecast-grid .forecast-status {
  min-height: 2.4em; margin-top: .22rem; color: var(--ink); line-height: 1.2;
  letter-spacing: 0; text-transform: none;
}
.forecast-grid strong { display: block; margin-top: .3rem; font-size: .8rem; }
.forecast-grid span { display: block; margin-top: .05rem; font-size: .5rem; }
.moon-panel img {
  display: block; width: 3.7rem; height: 3.7rem; margin: .35rem auto 0; object-fit: contain;
}

.details-section { padding-top: 1.35rem; }
.section-heading {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  border-bottom: .18rem solid var(--rule); padding-bottom: .6rem;
}
.section-heading h2 {
  margin: 0; font-size: 2.55rem; font-weight: 700; line-height: .95; letter-spacing: -.04em;
}
.section-heading > p {
  margin: 0; color: var(--muted); font-size: .64rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.compact-heading h2 { font-size: 2.25rem; }
.details-grid {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--rule);
}
.detail-card {
  min-width: 0; min-height: 6.7rem; border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline); padding: .85rem .75rem .8rem;
}
.detail-card:nth-child(5n) { border-right: 0; }
.detail-card:nth-child(n+6) { border-bottom: 0; }
.detail-icon {
  display: block; width: 1.65rem; height: 1.65rem; margin: 0 0 .4rem;
  fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.detail-label {
  margin: 0; color: var(--muted); font-size: .58rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
}
.detail-card strong {
  display: block; margin-top: .32rem; font-size: 1.25rem; line-height: 1.15;
  letter-spacing: -.025em; font-variant-numeric: tabular-nums;
}
.detail-card span {
  display: block; margin-top: .25rem; color: var(--muted); font-size: .58rem; line-height: 1.25;
}

.personal-grid {
  margin-top: 1.35rem;
  border-top: 2px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.quote-panel { min-width: 0; background: var(--soft); padding: 1rem 1.1rem; text-align: center; }
.quote-panel blockquote {
  max-width: 52rem; margin: .8rem auto 0; font-size: 1.65rem; font-weight: 700; line-height: 1.18;
  letter-spacing: -.03em;
}
.empty-copy { grid-column: 1 / -1; margin: .8rem 0; font-size: 1rem; line-height: 1.5; }
.page-footer {
  display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.6rem;
  border-top: 1px solid var(--hairline); border-bottom: .45rem solid var(--rule);
  padding: .8rem 0 1rem; color: var(--muted); font-size: .62rem;
}
.page-footer p { margin: 0; }

.settings-panel {
  margin: 1rem 0 0; border: 1px solid var(--hairline); background: var(--soft); padding: 1.35rem;
}
.settings-panel .section-heading { border-bottom-width: 1px; }
.settings-panel .section-heading h2 { font-size: 2rem; }
.settings-panel form {
  display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem;
  font-family: var(--font-sans);
}
.settings-panel fieldset {
  min-width: 0; margin: 0; border: 1px solid var(--hairline); background: var(--paper); padding: 1rem;
}
.settings-panel legend {
  padding: 0 .4rem; font-size: .7rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase;
}
.settings-panel label { display: block; margin-top: .8rem; font-size: .76rem; font-weight: 750; }
.settings-panel input {
  display: block; width: 100%; min-height: 2.7rem; margin-top: .3rem;
  border: 1px solid var(--hairline); border-radius: 0; background: var(--paper); color: var(--ink);
  padding: .58rem .65rem; font-size: .94rem;
}
.settings-panel input:focus { border-color: var(--ink); }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.secondary-button { margin-top: .8rem; }
.primary-button { align-self: end; background: var(--ink); color: var(--paper); }
.text-button { min-height: 2.2rem; padding: .32rem .6rem; }
.form-help, .form-error { grid-column: 1 / -1; margin: .6rem 0 0; font-size: .7rem; line-height: 1.45; }
.form-error { border: 1px solid var(--rule); background: var(--paper); padding: .7rem; font-weight: 700; }
[hidden] { display: none !important; }

@media (max-width: 860px) {
  .newspaper-shell { width: 100%; min-height: 100vh; margin: 0; border: 0; padding: 1.25rem; box-shadow: none; }
  .masthead h1 { font-size: 3.6rem; }
  .daily-grid { grid-template-columns: minmax(0, 1fr) 9rem; }
}

@media (max-width: 620px) {
  .newspaper-shell { padding: 1rem; }
  .masthead { column-gap: 1rem; row-gap: .2rem; }
  .masthead h1 { font-size: 3rem; }
  .daily-grid { grid-template-columns: minmax(0, 1fr) 7.5rem; }
  .weather-panel { padding-right: .65rem; }
  #weather-content { grid-template-columns: 7.25rem minmax(0, 1fr); column-gap: .5rem; }
  .temperature { font-size: 3rem; }
  .current-weather-icon { width: 2.75rem; height: 2.75rem; }
  .forecast-grid article { padding-right: .25rem; padding-left: .25rem; }
  .forecast-icon { width: 2.2rem; height: 2.2rem; }
  .forecast-grid .forecast-status { font-size: .52rem; }
  .forecast-grid span { display: none; }
  .moon-panel { padding-right: .4rem; padding-left: .4rem; }
  .moon-panel img { width: 3.2rem; height: 3.2rem; }
}

@media (max-width: 560px) {
  .details-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-card, .detail-card:nth-child(5n), .detail-card:nth-child(n+6) {
    border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  }
  .detail-card:nth-child(even) { border-right: 0; }
  .detail-card:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .newspaper-shell { padding: .8rem; }
  .page-footer { align-items: flex-start; flex-direction: column; }
  .masthead { column-gap: .65rem; }
  .masthead h1 { font-size: 2.8rem; }
  .masthead-meta { align-items: flex-end; margin-right: 0; text-align: right; }
  .daily-grid, .settings-panel form { grid-template-columns: 1fr; }
  .weather-panel { padding-right: 0; }
  #weather-content { grid-template-columns: 1fr; }
  .temperature { font-size: 3.8rem; }
  .current-weather-icon { width: 4.25rem; height: 4.25rem; }
  .weather-current h2 { margin: 0; }
  .forecast-grid { grid-template-columns: repeat(2, 1fr); }
  .weather-current { border-right: 0; padding-right: 0; }
  .forecast-grid article { margin-top: .7rem; }
  .forecast-icon { width: 2.8rem; height: 2.8rem; }
  .forecast-grid article:nth-child(odd) { border-left: 0; padding-left: 0; }
  .forecast-grid article:nth-child(n+3) { border-top: 1px solid var(--hairline); padding-top: .45rem; }
  .moon-panel {
    display: grid; grid-template-columns: auto 3.7rem minmax(0, 1fr); align-items: center; gap: .7rem;
    border-top: 1px solid var(--hairline); border-left: 0; padding: .55rem; text-align: left;
  }
  .moon-panel img, .moon-panel h2 { margin: 0; }
  .form-columns { grid-template-columns: 1fr; }
  .section-heading h2 { font-size: 2.05rem; }
  .section-heading > p { text-align: right; }
  .detail-card { min-height: 6rem; padding: .7rem .55rem; }
  .detail-card strong { font-size: 1.05rem; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .quote-panel blockquote { font-size: 1.4rem; }
}

@media print {
  html, body { background: #fff; }
  .newspaper-shell { width: 100%; max-width: none; min-height: 0; margin: 0; border: 0; box-shadow: none; }
  .masthead-settings, .settings-panel { display: none !important; }
}
