:root {
  --navy: #152e36;
  --teal: #168b82;
  --ivory: #faf9f6;
  --muted: #5c6b70;
  --line: #e4e2dc;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: Arial, Helvetica, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: var(--sans);
  line-height: 1.45;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button, input { font: inherit; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--navy);
  color: #fff;
  padding: 0.4rem 0.7rem;
}

.skip:focus { top: 0.5rem; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin: 0 auto;
}

.topbar {
  border-bottom: 1px solid #f0eeea;
}

.topbar-inner {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a9498;
}

.social { display: flex; gap: 1rem; letter-spacing: 0.04em; }

.brandbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0 0.35rem;
}

.wordmark { display: block; width: min(340px, 58vw); }
.wordmark img { width: 100%; height: auto; }

.brand-actions { display: flex; align-items: center; gap: 0.85rem; }

.search-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  border-radius: 999px;
}

.search-toggle:hover { background: var(--ivory); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 0.62rem 1rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:hover { filter: brightness(0.95); }

.search-panel {
  padding-bottom: 0.8rem;
}

.search-panel form { display: flex; gap: 0.5rem; }

.search-panel input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.7rem 0.8rem;
  color: var(--navy);
}

.nav {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.nav a {
  flex: 1 0 auto;
  text-align: center;
  padding: 0.8rem 0.7rem 0.7rem;
  font-size: 0.95rem;
  color: #24383f;
  border-bottom: 2px solid transparent;
}

.nav a[aria-current="page"] {
  color: var(--teal);
  border-bottom-color: var(--teal);
  font-weight: 700;
}

.nav a:hover { color: var(--teal); }

.mercado {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.4rem;
  align-items: baseline;
  padding: 0.9rem 0 0.75rem;
  border-bottom: 1px solid var(--line);
}

.mercado .kicker { margin: 0; }

.quote {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.quote small {
  font-family: var(--sans);
  font-size: 0.82rem;
  margin-left: 0.35rem;
}

.quote.up small { color: var(--teal); }
.quote.down small { color: #9a3b32; }

.quote-time {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.8rem;
}

.transporte {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  padding: 1.5rem 0 0.2rem;
}

.transporte h2 {
  margin: 0 0 0.7rem;
  font-family: var(--serif);
  font-size: 1.45rem;
}

.desk-list { list-style: none; margin: 0; padding: 0; }
.desk-list li { margin: 0 0 0.85rem; }
.desk-list a { font-weight: 700; }
.desk-list a:hover { color: var(--teal); }

.front {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.78fr) minmax(240px, 0.72fr);
  gap: 1.4rem 1.6rem;
  padding: 1.35rem 0 0.4rem;
}

.photo {
  width: 100%;
  object-fit: cover;
  background: var(--ivory);
}

.hero .photo { height: 390px; object-position: center 78%; }
.stack .photo { height: 168px; object-position: center 55%; }
.card .photo { height: 180px; object-position: center 70%; }
.story-page .photo { width: 100%; height: min(520px, 58vw); object-fit: cover; }

.kicker {
  margin: 0.75rem 0 0.3rem;
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1, .side h2, .card h2, .story-page h1, .rank-title, .section-title {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 2.7vw, 2.55rem);
  line-height: 1.08;
}

.dek { margin: 0.45rem 0 0; color: var(--muted); font-size: 1rem; }

.stack { display: flex; flex-direction: column; gap: 1.15rem; padding-top: 0; }
.side h2 { margin: 0; font-size: 1.28rem; line-height: 1.15; }
.side .dek { font-size: 0.92rem; }
.side .kicker { margin-top: 0.55rem; }

.aside h2 {
  margin: 0 0 0.8rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.55rem;
}

.ranked { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.95rem; }

.ranked li { display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.45rem; }

.rank {
  color: var(--teal);
  font-family: var(--serif);
  font-size: 1.55rem;
  line-height: 1;
  font-weight: 700;
}

.rank-title { display: block; font-size: 1rem; line-height: 1.2; }
.ranked .dek { margin-top: 0.2rem; font-size: 0.86rem; }

.boletin {
  margin-top: 1.3rem;
  background: var(--navy);
  color: #fff;
  border-radius: 8px;
  padding: 1.05rem 1rem 1rem;
}

.boletin h2 {
  margin: 0;
  border: 0;
  padding: 0;
  color: #fff;
  font-size: 1.45rem;
}

.boletin p { margin: 0.25rem 0 0.75rem; color: #d5dddf; font-size: 0.92rem; }

.boletin input {
  width: 100%;
  border: 0;
  border-radius: 5px;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.55rem;
}

.boletin .btn { width: 100%; }

.boletin .thanks { margin: 0.4rem 0 0; color: #fff; }

.latest { padding: 0.3rem 0 2.4rem; }

.latest-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.latest-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.7rem;
}

.more { color: var(--teal); font-size: 0.92rem; white-space: nowrap; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.card { padding-right: 1.1rem; }
.card + .card { padding-left: 1.1rem; border-left: 1px solid var(--line); }
.card h2 { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.card .dek { font-size: 0.92rem; }
.card .kicker { margin-top: 0.6rem; }

.page {
  padding: 1.6rem 0 3rem;
}

.page > h1, .section-title {
  margin: 0 0 0.4rem;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
}

.lead { max-width: 40rem; color: var(--muted); margin: 0 0 1.4rem; }

.story-list { display: grid; gap: 1.2rem; }

.story-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.story-row .photo { height: 140px; }
.story-row h2 { margin: 0.15rem 0 0; font-family: var(--serif); font-size: 1.45rem; }

.story-page { max-width: 760px; }
.story-page .note {
  margin-top: 1rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.story-body p {
  font-size: 1.08rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 0.9rem 0 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #8a9498;
  font-size: 0.75rem;
}

.empty {
  padding: 1.2rem 0 2rem;
  color: var(--muted);
}

.result { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
.result h2 { margin: 0.15rem 0; font-family: var(--serif); font-size: 1.35rem; }

@media (max-width: 980px) {
  .front, .cards, .transporte { grid-template-columns: 1fr; }
  .quote-time { margin-left: 0; }
  .hero .photo, .stack .photo, .card .photo { height: auto; aspect-ratio: 16 / 10; }
  .card + .card { padding-left: 0; border-left: 0; padding-top: 1rem; }
  .story-row { grid-template-columns: 1fr; }
  .social { display: none; }
  .footer { flex-direction: column; }
}
