:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef4f2;
  --text: #17201d;
  --muted: #5a6864;
  --line: #d7dfdc;
  --theme: #1f6f63;
  --theme-2: #2f927f;
  --theme-ink: #0f3d36;
  --theme-soft: #e2f2ee;
  --footer: #10241f;
  --shadow: 0 18px 42px rgba(20, 35, 31, .10);
  --shadow-soft: 0 10px 24px rgba(20, 35, 31, .07);
  --radius: 8px;
  --max: 1180px;
}

body[data-section="pesca"] {
  --theme: #007f8f;
  --theme-2: #00a6a6;
  --theme-ink: #00515b;
  --theme-soft: #dff6f4;
  --surface-2: #edf8f7;
}

body[data-section="caza"] {
  --theme: #8a2332;
  --theme-2: #b9414f;
  --theme-ink: #5c1721;
  --theme-soft: #f7e3e6;
  --surface-2: #fbf0f2;
}

body[data-section="huerto"] {
  --theme: #3f8f38;
  --theme-2: #72a842;
  --theme-ink: #285d25;
  --theme-soft: #e8f4df;
  --surface-2: #f1f8ec;
}

body[data-section="licencias"] {
  --theme: #6653c6;
  --theme-2: #008c8a;
  --theme-ink: #40358e;
  --theme-soft: #ece9fb;
  --surface-2: #f3f1fc;
}

body[data-section="recursos"],
body[data-section="legal"] {
  --theme: #4f6670;
  --theme-2: #1f8f7a;
  --theme-ink: #30434b;
  --theme-soft: #e8f0f2;
  --surface-2: #f0f5f6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background:
    linear-gradient(180deg, var(--surface-2) 0, var(--bg) 360px),
    var(--bg);
  color: var(--text);
  line-height: 1.68;
}

a { color: var(--theme-ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--theme); }

.container { width: min(var(--max), calc(100% - 32px)); margin-inline: auto; }
.section { padding: 64px 0; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--theme) 20%, var(--line));
}

.header-wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand-text { display: inline-flex; flex-direction: column; color: var(--text); font-weight: 900; letter-spacing: 0; line-height: 1; }
.brand-text span { color: var(--theme-ink); }
.brand-text small { margin-top: 5px; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: 0; }
.brand-text:hover { text-decoration: none; }

.site-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.nav-link {
  padding: 8px 11px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 750;
  border: 1px solid transparent;
}
.nav-link.is-active,
.nav-link:hover {
  background: var(--theme-soft);
  border-color: color-mix(in srgb, var(--theme) 30%, var(--line));
  color: var(--theme-ink);
  text-decoration: none;
}
.nav-toggle { display: none; }

.hero { padding: 66px 0 34px; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: stretch; }
.hero-copy,
.text-hero {
  max-width: 1040px;
  padding: 54px;
  color: #fff;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-ink) 88%, #000) 0%, var(--theme) 54%, var(--theme-2) 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,.65) 0 28px, rgba(255,255,255,.18) 28px 56px);
}
.hero-copy .lead { color: rgba(255,255,255,.90); max-width: 68ch; }
.hero h1 { max-width: 19ch; }

.home-page { overflow: hidden; }
.home-hero {
  padding: 52px 0 34px;
  background:
    linear-gradient(135deg, #0f3d36 0%, #1f6f63 55%, #0f8f8a 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.24);
}
.home-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .75fr);
  gap: 22px;
  align-items: stretch;
}
.home-intro,
.home-panel {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.10);
  box-shadow: 0 24px 55px rgba(0,0,0,.18);
  border-radius: var(--radius);
}
.home-intro { padding: 46px; }
.home-intro .eyebrow { background: #fff; }
.home-intro h1 { max-width: 18ch; color: #fff; }
.home-intro .lead { color: rgba(255,255,255,.90); max-width: 64ch; }
.home-search { max-width: 760px; }
.home-panel {
  padding: 24px;
  display: grid;
  align-content: center;
  gap: 10px;
}
.panel-kicker {
  margin: 0 0 6px;
  color: rgba(255,255,255,.78);
  font-weight: 850;
  text-transform: uppercase;
  font-size: .78rem;
}
.home-panel a {
  display: block;
  padding: 14px 16px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  color: #103c35;
  font-weight: 900;
  text-decoration: none;
}
.home-panel a:hover { background: #fff; transform: translateX(3px); }

.home-topics,
.home-guides { padding: 42px 0; }
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.topic-card {
  min-height: 210px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 24px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.25);
}
.topic-card span,
.story-card span {
  font-size: .78rem;
  text-transform: uppercase;
  font-weight: 950;
  color: rgba(255,255,255,.82);
}
.topic-card h2,
.topic-card p { margin: 0; }
.topic-card h2 { font-size: 1.55rem; }
.topic-card h2 a { color: #fff; text-decoration: none; }
.topic-card p { color: rgba(255,255,255,.86); }
.topic-pesca { background: linear-gradient(145deg, #00515b, #00a6a6); }
.topic-caza { background: linear-gradient(145deg, #5c1721, #b9414f); }
.topic-huerto { background: linear-gradient(145deg, #285d25, #72a842); }
.topic-licencias { background: linear-gradient(145deg, #40358e, #008c8a); }

.home-band {
  padding: 54px 0;
  background: #111f1d;
  color: #fff;
}
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 30px;
  align-items: center;
}
.feature-copy h2 {
  max-width: 14ch;
  color: #fff;
}
.feature-copy p { color: rgba(255,255,255,.78); max-width: 62ch; }
.feature-copy .eyebrow { background: #fff; }
.feature-list-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.feature-list-cards a {
  min-height: 140px;
  padding: 20px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  border-left: 7px solid #6653c6;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
}
.feature-list-cards a:hover { transform: translateY(-3px); }
.feature-list-cards strong { font-size: 1.12rem; color: #40358e; }
.feature-list-cards span { color: var(--muted); }

.section-heading {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 20px;
}
.section-heading h2 { max-width: 22ch; }
.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.story-card {
  min-height: 210px;
  padding: 22px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(145deg, #00515b, #00a6a6);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-shadow: var(--shadow);
}
.story-large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 436px;
}
.story-caza { background: linear-gradient(145deg, #5c1721, #b9414f); }
.story-huerto { background: linear-gradient(145deg, #285d25, #72a842); }
.story-card h3 { font-size: 1.42rem; }
.story-large h3 { font-size: 2rem; }
.story-card h3 a { color: #fff; text-decoration: none; }
.story-card p { color: rgba(255,255,255,.84); margin-bottom: 0; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--theme-ink);
  background: var(--theme-soft);
  border: 1px solid color-mix(in srgb, var(--theme) 24%, var(--line));
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 850;
}
.hero-copy .eyebrow { background: rgba(255,255,255,.92); border-color: rgba(255,255,255,.35); }

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; letter-spacing: 0; }
h1 { font-size: 3.1rem; max-width: 13ch; }
h2 { font-size: 2rem; }
h3 { font-size: 1.25rem; }
.lead { font-size: 1.08rem; color: var(--muted); }

.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 850;
  text-decoration: none;
}
.btn-primary { background: var(--theme); color: #fff; box-shadow: 0 10px 22px color-mix(in srgb, var(--theme) 28%, transparent); }
.btn-primary:hover { background: var(--theme-ink); color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: var(--theme-ink); border-color: color-mix(in srgb, var(--theme) 25%, var(--line)); }
.btn-secondary:hover { background: var(--theme-soft); text-decoration: none; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }

.card,
.mini-card,
.directory article,
.official-box,
.related-panel {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--theme) 16%, var(--line));
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.card::before,
.mini-card::before,
.directory article::before,
.related-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 5px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, var(--theme), var(--theme-2));
}
.card:hover,
.mini-card:hover,
.directory article:hover,
.link-list a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--theme) 38%, var(--line));
}
.card,
.mini-card,
.directory article,
.link-list a { transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }

.card-body { padding: 0; }
.card p,
.directory p,
.mini-card p { color: var(--muted); margin-bottom: 0; }
.directory { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:22px; }
.directory h3 a,
.mini-card h3 a,
.card h3 a {
  color: var(--text);
  text-decoration: none;
}
.directory h3 a:hover,
.mini-card h3 a:hover,
.card h3 a:hover { color: var(--theme); }

.section-contrast {
  background: linear-gradient(180deg, var(--theme-soft), color-mix(in srgb, var(--theme-soft) 45%, #fff));
  border-block: 1px solid color-mix(in srgb, var(--theme) 22%, var(--line));
}

.article-layout { padding-top: 34px; }
.split { display:grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.article {
  background: rgba(255,255,255,.96);
  border: 1px solid color-mix(in srgb, var(--theme) 18%, var(--line));
  border-radius: var(--radius);
  padding: 46px;
  box-shadow: var(--shadow);
}
.article h1 { color: var(--theme-ink); max-width: 16ch; }
.article h2 {
  margin-top: 38px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--theme) 20%, var(--line));
  color: var(--theme-ink);
}
.article p, .article li, .article dd { font-size: 1.04rem; }
.article > .lead {
  padding: 18px 20px;
  border-left: 5px solid var(--theme);
  background: var(--theme-soft);
  border-radius: 0 8px 8px 0;
  color: color-mix(in srgb, var(--theme-ink) 70%, var(--text));
}

.breadcrumbs { font-size: .92rem; color: var(--muted); margin: 18px 0 14px; }
.breadcrumbs a { color: var(--theme-ink); font-weight: 750; }

.sidebar { position: sticky; top: 90px; align-self: start; }
.toc {
  padding: 18px;
  border-left: 5px solid var(--theme);
  background: #fff;
}
.toc h3 { color: var(--theme-ink); }
.toc ul { margin: 0; padding-left: 18px; }

.official-box { border-left: 7px solid var(--theme); margin: 30px 0; background: var(--theme-soft); }
.related-panel { margin-top: 34px; background: linear-gradient(180deg, #fff, var(--surface-2)); }

.feature-list { padding-left: 0; list-style: none; }
.feature-list li {
  margin: 10px 0;
  padding: 10px 12px 10px 36px;
  background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--theme) 12%, var(--line));
  border-radius: 8px;
  position: relative;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 1.1em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--theme);
}

.search-box { display:flex; gap: 10px; margin-top: 18px; }
.search-box input { flex:1; padding: 13px 15px; border-radius: 8px; border:1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.94); color: var(--text); }
.search-box input:focus { outline: 3px solid rgba(255,255,255,.28); border-color: #fff; }
.search-results { list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px; }
.search-results li { background:rgba(255,255,255,.94); border-radius:8px; padding:8px 10px; }

.badge { display:inline-block; font-size:.8rem; padding:6px 10px; border-radius:8px; background:var(--theme-soft); color:var(--theme-ink); border:1px solid color-mix(in srgb, var(--theme) 22%, var(--line)); }

.table-wrap { overflow:auto; border-radius: var(--radius); box-shadow: var(--shadow-soft); }
table { width:100%; border-collapse: collapse; background: var(--surface); border:1px solid var(--line); overflow:hidden; }
th, td { padding: 13px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
th { background: var(--theme-ink); color: #fff; }
tbody tr:nth-child(even) { background: var(--surface-2); }

.link-list { display:grid; gap:10px; }
.link-list a {
  background:#fff;
  border:1px solid color-mix(in srgb, var(--theme) 18%, var(--line));
  border-left: 5px solid var(--theme);
  border-radius:8px;
  padding:13px 15px;
  font-weight:850;
  color: var(--text);
  text-decoration: none;
}
.link-list a:hover { color: var(--theme-ink); background: var(--theme-soft); }

.kpis { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 16px; }
.kpi { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; text-align: center; }
.kpi strong { display:block; font-size: 1.4rem; color: var(--theme); }

.site-footer { background: var(--footer); color: #eef5f2; margin-top: 70px; border-top: 8px solid var(--theme); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 24px; padding: 38px 0; }
.footer-brand { color: #fff; margin-bottom: 12px; }
.footer-brand small { color: #d9e7e2; }
.footer-text { color: #d9e7e2; max-width: 54ch; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin: 8px 0; }
.footer-list a { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); padding: 14px 0 26px; color: #d9e7e2; }

.consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  background: var(--surface);
  border:1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.consent-actions { display:flex; gap: 8px; flex-wrap: wrap; }
.faq-item { border-top: 1px solid var(--line); padding: 12px 0; }
.faq-q { width:100%; text-align:left; background:none; border:none; font: inherit; font-weight:800; padding:8px 0; cursor:pointer; }
.faq-a[hidden] { display:none; }
.ad-slot { min-height: 1px; }

body[data-page="/guias/"] .split,
body[data-page="/licencias/"] .split,
body[data-page="/categorias/"] .split,
body[data-page="/herramientas/"] .split,
body[data-page="/comparativas/"] .split,
body[data-page="/recursos/"] .split,
body[data-page="/ayudas/"] .split,
body[data-page="/local/"] .split,
body[data-page="/legal/"] .split,
body[data-page="/categorias/pesca"] .split,
body[data-page="/categorias/caza"] .split,
body[data-page="/categorias/agricultura-y-huerto"] .split {
  display: block;
}

body[data-page="/guias/"] .sidebar,
body[data-page="/licencias/"] .sidebar,
body[data-page="/categorias/"] .sidebar,
body[data-page="/herramientas/"] .sidebar,
body[data-page="/comparativas/"] .sidebar,
body[data-page="/recursos/"] .sidebar,
body[data-page="/ayudas/"] .sidebar,
body[data-page="/local/"] .sidebar,
body[data-page="/legal/"] .sidebar,
body[data-page="/categorias/pesca"] .sidebar,
body[data-page="/categorias/caza"] .sidebar,
body[data-page="/categorias/agricultura-y-huerto"] .sidebar {
  display: none;
}

body[data-page="/guias/"] .article,
body[data-page="/licencias/"] .article,
body[data-page="/categorias/"] .article,
body[data-page="/herramientas/"] .article,
body[data-page="/comparativas/"] .article,
body[data-page="/recursos/"] .article,
body[data-page="/ayudas/"] .article,
body[data-page="/local/"] .article,
body[data-page="/legal/"] .article,
body[data-page="/categorias/pesca"] .article,
body[data-page="/categorias/caza"] .article,
body[data-page="/categorias/agricultura-y-huerto"] .article {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 14px 0 0;
}

body[data-page="/guias/"] .article > .lead,
body[data-page="/licencias/"] .article > .lead,
body[data-page="/categorias/"] .article > .lead,
body[data-page="/herramientas/"] .article > .lead,
body[data-page="/comparativas/"] .article > .lead,
body[data-page="/recursos/"] .article > .lead,
body[data-page="/ayudas/"] .article > .lead,
body[data-page="/local/"] .article > .lead,
body[data-page="/legal/"] .article > .lead,
body[data-page="/categorias/pesca"] .article > .lead,
body[data-page="/categorias/caza"] .article > .lead,
body[data-page="/categorias/agricultura-y-huerto"] .article > .lead {
  max-width: 760px;
}

body[data-page="/guias/"] .article h1,
body[data-page="/licencias/"] .article h1,
body[data-page="/categorias/"] .article h1,
body[data-page="/herramientas/"] .article h1,
body[data-page="/comparativas/"] .article h1,
body[data-page="/recursos/"] .article h1,
body[data-page="/ayudas/"] .article h1,
body[data-page="/local/"] .article h1,
body[data-page="/legal/"] .article h1,
body[data-page="/categorias/pesca"] .article h1,
body[data-page="/categorias/caza"] .article h1,
body[data-page="/categorias/agricultura-y-huerto"] .article h1 {
  max-width: 18ch;
}

body[data-page="/licencias/"] .directory,
body[data-page="/local/"] .directory {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 980px) {
  .container { width: min(var(--max), calc(100% - 24px)); }
  .section { padding: 44px 0; }
  .hero-copy, .text-hero, .article { padding: 28px; }
  h1 { font-size: 2.15rem; max-width: none; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.12rem; }
  .hero-grid, .grid-4, .grid-3, .grid-2, .kpis, .footer-grid, .split, .directory { grid-template-columns: 1fr; }
  .site-nav { display:none; position:absolute; top:68px; left:16px; right:16px; background: var(--surface); padding: 12px; border:1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
  .site-nav.is-open { display:flex; flex-direction:column; align-items: stretch; }
  .nav-toggle { display:inline-flex; padding:10px 12px; border:1px solid var(--line); border-radius: 8px; background: var(--surface); }
  .search-box, .consent-banner { flex-direction:column; align-items: stretch; }
  .home-hero-grid,
  .topic-grid,
  .feature-layout,
  .feature-list-cards,
  .section-heading,
  .story-grid,
  body[data-page="/licencias/"] .directory,
  body[data-page="/local/"] .directory {
    grid-template-columns: 1fr;
  }
  .home-intro { padding: 30px; }
  .home-panel { align-content: start; }
  .topic-card,
  .story-card,
  .feature-list-cards a { min-height: 170px; }
  .story-large { grid-column: auto; grid-row: auto; min-height: 240px; }
}

/* Minimal editorial redesign pass */
:root,
body[data-section="home"],
body[data-section="pesca"],
body[data-section="caza"],
body[data-section="huerto"],
body[data-section="licencias"],
body[data-section="recursos"],
body[data-section="legal"] {
  --bg: #fbfbf7;
  --surface: #ffffff;
  --surface-2: #f4f5f1;
  --text: #161a18;
  --muted: #626b66;
  --line: #e2e4df;
  --theme: #1d5a49;
  --theme-2: #6f8f82;
  --theme-ink: #153b32;
  --theme-soft: #eef4f1;
  --footer: #111815;
  --shadow: 0 18px 42px rgba(20, 24, 22, .07);
  --shadow-soft: 0 8px 24px rgba(20, 24, 22, .05);
}

body {
  background: var(--bg);
  color: var(--text);
}

.site-header {
  background: rgba(251,251,247,.94);
  border-bottom: 1px solid var(--line);
}

.header-wrap { padding: 16px 0; }
.brand-text span { color: var(--text); }
.brand-text small { color: var(--muted); }
.site-nav { gap: 4px; }
.nav-link {
  color: var(--muted);
  font-weight: 760;
  padding: 8px 12px;
}
.nav-link.is-active,
.nav-link:hover {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.section { padding: 48px 0; }
.breadcrumbs { margin: 18px 0 22px; }
.breadcrumbs a { color: var(--muted); }

h1 { font-size: 3rem; max-width: 18ch; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.15rem; }
.lead { color: var(--muted); }
.eyebrow {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  font-weight: 820;
}

.home-hero {
  padding: 58px 0 34px;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--line);
}
.home-hero-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
  gap: 18px;
}
.home-intro,
.home-panel,
.hero-copy,
.text-hero {
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.home-intro { padding: clamp(30px, 5vw, 58px); }
.home-intro h1,
.home-intro .lead,
.hero-copy .lead { color: inherit; }
.home-intro .lead { color: var(--muted); }
.home-intro .eyebrow,
.hero-copy .eyebrow { background: transparent; border-color: var(--line); }
.home-panel { background: var(--surface-2); padding: 24px; }
.panel-kicker { color: var(--muted); }
.home-panel a {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: none;
}
.home-panel a:hover { transform: none; border-color: var(--theme); color: var(--theme-ink); }
.hero-copy::after { display: none; }
.home-search input,
.search-box input {
  border: 1px solid var(--line);
  background: #fff;
}
.search-box input:focus { outline: 3px solid var(--theme-soft); border-color: var(--theme); }

.topic-grid,
.story-grid,
.feature-list-cards,
.directory,
.grid-2,
.grid-3,
.grid-4 { gap: 14px; }
.topic-card,
.story-card,
.card,
.mini-card,
.directory article,
.official-box,
.related-panel,
.feature-list-cards a,
.link-list a,
.surface,
.article {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}
.topic-card,
.story-card {
  min-height: 178px;
  justify-content: space-between;
  padding: 22px;
}
.topic-card span,
.story-card span {
  color: var(--muted);
  letter-spacing: 0;
}
.topic-card h2 a,
.story-card h3 a,
.topic-card p,
.story-card p {
  color: var(--text);
}
.topic-card p,
.story-card p { color: var(--muted); }
.topic-pesca,
.topic-caza,
.topic-huerto,
.topic-licencias,
.story-card,
.story-caza,
.story-huerto {
  background: #fff;
}
.story-large { min-height: 370px; }
.story-card h3 a:hover,
.topic-card h2 a:hover { color: var(--theme-ink); }

.card::before,
.mini-card::before,
.directory article::before,
.related-panel::before { display: none; }
.directory article,
.mini-card,
.card,
.topic-card,
.story-card,
.feature-list-cards a {
  border-top: 3px solid transparent;
}
.directory article:hover,
.mini-card:hover,
.card:hover,
.topic-card:hover,
.story-card:hover,
.feature-list-cards a:hover,
.link-list a:hover {
  transform: none;
  border-color: #cdd4cf;
  border-top-color: var(--theme);
  box-shadow: var(--shadow);
}
.directory h3 a,
.mini-card h3 a,
.card h3 a { color: var(--text); }
.directory h3 a:hover,
.mini-card h3 a:hover,
.card h3 a:hover { color: var(--theme-ink); }

.home-band {
  background: var(--surface-2);
  color: var(--text);
  border-block: 1px solid var(--line);
}
.feature-layout { gap: 18px; }
.feature-copy h2 { color: var(--text); max-width: 18ch; }
.feature-copy p { color: var(--muted); }
.feature-copy .eyebrow { background: transparent; }
.feature-list-cards a { min-height: 126px; border-left: 0; }
.feature-list-cards strong { color: var(--text); }
.feature-list-cards span { color: var(--muted); }
.section-heading { grid-template-columns: 1fr; gap: 10px; }
.section-heading h2 { max-width: 24ch; }

.article-layout { padding-top: 20px; }
.split {
  grid-template-columns: minmax(0, 920px) 260px;
  justify-content: center;
}
.article {
  padding: clamp(28px, 5vw, 56px);
  border-radius: var(--radius);
}
.article h1 { color: var(--text); max-width: 20ch; }
.article h2 {
  color: var(--text);
  border-top: 1px solid var(--line);
}
.article > .lead {
  border-left: 0;
  background: var(--surface-2);
  color: var(--muted);
  border-radius: var(--radius);
}
.toc {
  border-left: 0;
  background: #fff;
  border: 1px solid var(--line);
}
.toc h3 { color: var(--text); }
.official-box {
  border-left: 0;
  background: var(--surface-2);
}
.related-panel { background: var(--surface-2); }
.section-contrast {
  background: var(--surface-2);
  border-block: 1px solid var(--line);
}
.feature-list li {
  background: #fff;
  border-color: var(--line);
}
.feature-list li::before { background: var(--theme); }
.table-wrap { box-shadow: none; border: 1px solid var(--line); }
th { background: var(--surface-2); color: var(--text); }
tbody tr:nth-child(even) { background: #fafaf7; }

.btn-primary {
  background: var(--text);
  color: #fff;
  box-shadow: none;
}
.btn-primary:hover { background: var(--theme-ink); }
.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { background: var(--surface-2); }

body[data-page="/guias/"] .article,
body[data-page="/licencias/"] .article,
body[data-page="/categorias/"] .article,
body[data-page="/herramientas/"] .article,
body[data-page="/comparativas/"] .article,
body[data-page="/recursos/"] .article,
body[data-page="/ayudas/"] .article,
body[data-page="/local/"] .article,
body[data-page="/legal/"] .article,
body[data-page="/categorias/pesca"] .article,
body[data-page="/categorias/caza"] .article,
body[data-page="/categorias/agricultura-y-huerto"] .article {
  background: transparent;
  box-shadow: none;
  border: 0;
}

body[data-page="/licencias/"] .directory,
body[data-page="/local/"] .directory,
body[data-page="/guias/"] .directory {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-footer {
  background: #111815;
  border-top: 1px solid #26302c;
  margin-top: 56px;
}

@media (max-width: 980px) {
  .home-hero-grid,
  .topic-grid,
  .feature-layout,
  .feature-list-cards,
  .story-grid,
  body[data-page="/licencias/"] .directory,
  body[data-page="/local/"] .directory,
  body[data-page="/guias/"] .directory { grid-template-columns: 1fr; }
  .story-large { min-height: 220px; }
}

/* Mobile polish pass */
@media (max-width: 980px) {
  html,
  body {
    overflow-x: clip;
  }

  .container {
    width: min(var(--max), calc(100% - 24px));
  }

  .header-wrap {
    position: relative;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text span,
  .brand-text small {
    overflow-wrap: anywhere;
  }

  .site-nav {
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }

  .nav-link {
    width: 100%;
    padding: 11px 12px;
  }

  .section,
  .home-topics,
  .home-guides,
  .home-band {
    padding: 34px 0;
  }

  .home-hero {
    padding: 26px 0 24px;
  }

  .home-hero-grid,
  .topic-grid,
  .feature-layout,
  .feature-list-cards,
  .story-grid,
  .footer-grid,
  .split,
  .directory,
  .grid-2,
  .grid-3,
  .grid-4,
  .kpis,
  body[data-page="/licencias/"] .directory,
  body[data-page="/local/"] .directory,
  body[data-page="/guias/"] .directory {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .split {
    gap: 0;
    justify-content: stretch;
  }

  .sidebar {
    display: none;
  }

  .home-intro,
  .home-panel,
  .hero-copy,
  .text-hero,
  .article {
    width: 100%;
    min-width: 0;
    padding: 24px;
  }

  .article {
    overflow: hidden;
  }

  .article-layout {
    padding-top: 14px;
  }

  .breadcrumbs {
    margin: 10px 0 14px;
    overflow-wrap: anywhere;
  }

  h1,
  .article h1,
  .home-intro h1,
  body[data-page="/guias/"] .article h1,
  body[data-page="/licencias/"] .article h1,
  body[data-page="/categorias/"] .article h1,
  body[data-page="/herramientas/"] .article h1,
  body[data-page="/comparativas/"] .article h1,
  body[data-page="/recursos/"] .article h1,
  body[data-page="/ayudas/"] .article h1,
  body[data-page="/local/"] .article h1,
  body[data-page="/legal/"] .article h1,
  body[data-page="/categorias/pesca"] .article h1,
  body[data-page="/categorias/caza"] .article h1,
  body[data-page="/categorias/agricultura-y-huerto"] .article h1 {
    max-width: none;
    font-size: 2rem;
    overflow-wrap: anywhere;
  }

  h2,
  .feature-copy h2,
  .section-heading h2 {
    max-width: none;
    font-size: 1.45rem;
  }

  h3 {
    font-size: 1.1rem;
  }

  .lead,
  .article p,
  .article li,
  .article dd {
    font-size: 1rem;
  }

  .search-box,
  .actions,
  .consent-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .search-box button {
    width: 100%;
  }

  .topic-card,
  .story-card,
  .story-large,
  .feature-list-cards a {
    min-height: 0;
  }

  .card,
  .mini-card,
  .directory article,
  .official-box,
  .related-panel,
  .topic-card,
  .story-card,
  .feature-list-cards a,
  .link-list a,
  .surface {
    padding: 18px;
  }

  .article > .lead,
  .official-box,
  .related-panel {
    margin-inline: 0;
  }

  .feature-list {
    padding-left: 0;
  }

  .table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 560px;
  }

  th,
  td {
    padding: 10px;
  }

  .footer-grid {
    padding: 28px 0;
  }

  .site-footer {
    margin-top: 38px;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--max), calc(100% - 20px));
  }

  .brand-text small {
    font-size: .68rem;
  }

  .nav-toggle {
    padding: 9px 10px;
  }

  .home-intro,
  .home-panel,
  .hero-copy,
  .text-hero,
  .article {
    padding: 20px;
  }

  h1,
  .article h1,
  .home-intro h1 {
    font-size: 1.82rem;
  }

  h2,
  .feature-copy h2,
  .section-heading h2 {
    font-size: 1.32rem;
  }

  .lead,
  .article p,
  .article li,
  .article dd {
    font-size: .98rem;
  }

  .eyebrow {
    max-width: 100%;
    white-space: normal;
  }

  .card,
  .mini-card,
  .directory article,
  .official-box,
  .related-panel,
  .topic-card,
  .story-card,
  .feature-list-cards a,
  .link-list a,
  .surface {
    padding: 16px;
  }

}
