:root {
  --paper: #f5f1ea;
  --paper-2: #ece6dc;
  --ink: #16130f;
  --ink-2: #4a443c;
  --ink-3: #7b7368;
  --line: #d6cdbf;
  --red: #c8102e;
  --card: #fffdf9;
  --head: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #14120f;
    --paper-2: #1d1a16;
    --ink: #f1ebe1;
    --ink-2: #c4bbad;
    --ink-3: #8f877b;
    --line: #34302a;
    --red: #ff3b4f;
    --card: #1a1814;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Cabecera */
.masthead { border-bottom: 3px solid var(--ink); background: var(--paper); }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--head); font-size: 12px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ink-3); padding-top: 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.topbar .date::first-letter { text-transform: uppercase; }
.topbar .rss { font-weight: 700; color: var(--red); }
.brand-row {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  padding-top: 22px; padding-bottom: 18px;
}
.logo {
  font-family: var(--head); font-weight: 900; font-size: clamp(38px, 6vw, 64px);
  line-height: .9; letter-spacing: -.045em; color: var(--ink);
}
.logo .x {
  color: var(--red); display: inline-block; transform: skewX(-8deg) scale(1.12);
  margin: 0 .02em;
}
.logo.small { font-size: 26px; }
.tagline {
  margin: 0; font-style: italic; color: var(--ink-2); font-size: 17px;
  border-left: 2px solid var(--line); padding-left: 18px; max-width: 32ch;
}
.search { display: flex; border: 2px solid var(--ink); background: var(--card); }
.search input {
  border: 0; background: transparent; color: var(--ink); font: 15px var(--head);
  padding: 10px 12px; width: 220px; outline: none;
}
.search button { border: 0; background: var(--ink); color: var(--paper); padding: 0 12px; cursor: pointer; }
.search:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 35%, transparent); }

.catnav { border-top: 1px solid var(--line); }
.catnav-inner {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  font-family: var(--head); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .05em;
}
.catnav-inner::-webkit-scrollbar { display: none; }
.catnav a {
  white-space: nowrap; padding: 12px 12px 10px; border-bottom: 3px solid transparent; color: var(--ink-2);
}
.catnav a:hover { color: var(--ink); border-bottom-color: var(--c, var(--ink)); }
.catnav a.on { color: var(--ink); border-bottom-color: var(--c, var(--red)); }

/* Distribución */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 40px; padding-top: 28px; padding-bottom: 48px; }

.section-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px;
  border-bottom: 2px solid var(--ink); margin-bottom: 22px; padding-bottom: 10px;
}
.section-head h1 {
  margin: 0; font-family: var(--head); font-weight: 900; font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em;
  border-left: 8px solid var(--c, var(--red)); padding-left: 12px; line-height: 1;
}
.section-head .count { font-family: var(--head); color: var(--ink-3); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.section-head .out { margin-left: auto; font-family: var(--head); font-size: 13px; font-weight: 700; color: var(--red); }

.rule { display: flex; align-items: center; gap: 12px; margin: 34px 0 20px; font: 900 14px var(--head); text-transform: uppercase; letter-spacing: .1em; }
.rule::before, .rule::after { content: ''; flex: 1; height: 2px; background: var(--ink); }
.rule span { color: var(--red); }

/* Tarjetas */
.card { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); min-width: 0; }
.card .media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.card .media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .media img { transform: scale(1.03); }
.card .media .ph {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center;
  font: 900 22px/1 var(--head); letter-spacing: -.02em; color: var(--ink-3);
  background: repeating-linear-gradient(-45deg, var(--paper-2) 0 12px, color-mix(in srgb, var(--paper-2) 70%, var(--line)) 12px 13px);
}
.card .media img + .ph { display: none; }
.card .media.broken img { display: none; }
.card .media.broken .ph { display: grid; }
.card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.meta { display: flex; gap: 10px; align-items: center; font: 700 11.5px var(--head); text-transform: uppercase; letter-spacing: .07em; }
.meta .src { color: var(--red); }
.meta .src:hover { text-decoration: underline; }
.meta time { color: var(--ink-3); font-weight: 500; }
.title { margin: 0; font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -.005em; }
.title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--red); }
.excerpt { margin: 0; color: var(--ink-2); font-size: 15.5px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.tags a {
  font: 700 11px var(--head); text-transform: uppercase; letter-spacing: .05em;
  padding: 3px 7px; border: 1px solid var(--c); color: var(--c);
}
.tags a:hover { background: var(--c); color: #fff; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }

.featured { display: grid; grid-template-columns: 1.65fr 1fr; grid-template-rows: repeat(3, auto); gap: 16px; }
.card-lead { grid-row: 1 / span 3; border: 0; background: transparent; }
.card-lead .media { aspect-ratio: 3 / 2; }
.card-lead .body { padding: 16px 0 0; }
.card-lead .title { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.08; letter-spacing: -.015em; }
.card-lead .excerpt { font-size: 18px; -webkit-line-clamp: 5; }
.card-side { flex-direction: row; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding-bottom: 16px; }
.card-side:last-child { border-bottom: 0; }
.card-side .media { flex: 0 0 120px; aspect-ratio: 1; order: 2; }
.card-side .media .ph { font-size: 13px; }
.card-side .body { padding: 0 14px 0 0; }
.card-side .title { font-size: 18px; }
.card-side .tags { display: none; }

.empty { border: 2px dashed var(--line); padding: 48px 24px; text-align: center; font-size: 19px; }
.empty .hint { color: var(--ink-3); font-size: 15px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 36px; border-top: 2px solid var(--ink); padding-top: 14px; font-family: var(--head); font-weight: 700; font-size: 14px; }
.pager a { color: var(--red); }
.pager a:hover { text-decoration: underline; }
.pager .pos { color: var(--ink-3); font-weight: 500; }

/* Lateral */
.side .box { margin-bottom: 30px; }
.side h3 { margin: 0 0 10px; font: 900 13px var(--head); text-transform: uppercase; letter-spacing: .1em; border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.side ul { list-style: none; margin: 0; padding: 0; font-family: var(--head); font-size: 14.5px; }
.side li { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.side li a { padding: 8px 0; flex: 1; display: flex; align-items: center; gap: 8px; }
.side li a:hover, .side li a.on { color: var(--red); }
.catlist i { width: 10px; height: 10px; background: var(--c); display: inline-block; }
.catlist span { color: var(--ink-3); font-size: 12.5px; }

.foot { border-top: 3px solid var(--ink); padding: 24px 0 40px; color: var(--ink-3); font-size: 14px; }
.foot .wrap { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.foot p { margin: 0; max-width: 70ch; }

.notfound { text-align: center; padding: 80px 20px; }
.notfound h1 { font-family: var(--head); }
.notfound a:not(.logo) { color: var(--red); font-family: var(--head); font-weight: 700; }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .brand-row { grid-template-columns: 1fr auto; }
  .tagline { display: none; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .brand-row { grid-template-columns: 1fr; gap: 14px; padding-top: 16px; }
  .search input { width: 100%; }
  .search { width: 100%; }
  .featured { grid-template-columns: 1fr; }
  .card-lead { grid-row: auto; }
  .side { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .card-side .media { flex-basis: 96px; }
}
