/* ============================================================
   Expediente SEO — Oviedo
   Concepto: carpeta de expediente sobre una mesa. Pestañas de
   carpeta como navegación, hojas sueltas como secciones,
   sello y clip como acentos. Sin eyebrows, sin insignias
   redondeadas de plantilla, sin tarjetas con sombra.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --kraft: #DCC9A0;
  --kraft-dark: #C7AF7D;
  --paper: #F6F0E2;
  --paper-line: #E4D9BE;
  --ink: #2A2013;
  --ink-soft: #6B5D45;
  --red: #A3331F;
  --red-dark: #822717;
  --forest: #33513C;
  --forest-dark: #24392A;
  --rule: #D3C4A0;
  --rule-strong: #B39F6E;
  --amber: #A8791A;

  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1080px;
  --pad: 24px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--kraft);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(42,32,19,0.055) 1px, transparent 0);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

img{ max-width: 100%; display: block; }
a{ color: var(--red-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible{
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

.wrap{ max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.page-wrap{ margin: 20px auto 40px; padding: 0 var(--pad); }
.sheet-pad > section:first-child{ padding-top: 0; }
.sheet-pad > section:last-child{ padding-bottom: 0; }

h1, h2, h3{ font-family: var(--serif); font-weight: 600; line-height: 1.16; margin: 0 0 0.5em; color: var(--ink); }
h1{ font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 700; max-width: 18ch; }
h2{ font-size: clamp(1.35rem, 2.1vw, 1.7rem); }
h3{ font-size: 1.1rem; }
p{ margin: 0 0 1em; max-width: 66ch; }
.lede{ font-size: 1.08rem; color: var(--ink-soft); max-width: 54ch; }

/* ---------- "Sheet" — a loose page sitting on the kraft desk ---------- */
.sheet{
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  box-shadow: 0 1px 0 var(--kraft-dark), 3px 4px 0 rgba(42,32,19,0.08);
  position: relative;
}
.sheet::before{
  content: ""; position: absolute; top: -9px; left: 34px; width: 34px; height: 22px;
  border: 2px solid var(--rule-strong); border-radius: 3px 3px 0 0 / 8px 8px 0 0;
  border-bottom: none; background: transparent; opacity: 0.75;
}
.sheet-pad{ padding: 40px var(--pad); }
@media (min-width: 640px){ .sheet-pad{ padding: 48px 56px; } }

/* ---------- Header — one clean sticky bar ---------- */
.site-header{
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); border-bottom: 3px solid var(--red);
}
.header-bar{
  display: flex; align-items: center; gap: 22px; padding: 13px var(--pad);
  max-width: var(--maxw); margin: 0 auto;
}
.brand{
  font-family: var(--serif); font-weight: 700; font-size: 1.08rem;
  color: var(--paper); text-decoration: none; white-space: nowrap; flex: none;
}
.brand span{ color: #C9B98C; font-weight: 500; font-size: 0.82em; margin-left: 3px; }
.main-nav{
  display: flex; align-items: center; justify-content: center; gap: 26px;
  flex: 1; min-width: 0;
}
.main-nav a{
  color: rgba(246,240,226,0.78); text-decoration: none; font-size: 0.92rem;
  font-weight: 600; padding: 6px 0; border-bottom: 2px solid transparent; white-space: nowrap;
}
.main-nav a:hover{ color: #fff; }
.main-nav a[aria-current="page"]{ color: #fff; border-bottom-color: var(--red); }
.btn-call{
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  background: var(--red); color: #fff;
  padding: 9px 16px; border-radius: 3px;
  text-decoration: none; font-weight: 700; font-size: 0.9rem; white-space: nowrap;
}
.btn-call:hover{ background: var(--red-dark); }
.btn-call svg{ width: 14px; height: 14px; flex: none; }
.nav-toggle{
  display: none; flex: none; background: none; border: 1px solid rgba(246,240,226,0.4);
  border-radius: 3px; width: 38px; height: 34px; cursor: pointer; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-toggle span{ display: block; width: 18px; height: 2px; background: var(--paper); }

@media (max-width: 860px){
  .main-nav{
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); border-bottom: 3px solid var(--red);
    padding: 6px var(--pad) 12px;
  }
  .main-nav.open{ display: flex; }
  .main-nav a{
    padding: 12px 0; border-bottom: 1px solid rgba(246,240,226,0.14);
    width: 100%;
  }
  .btn-call span{ display: none; }
  .btn-call{ padding: 9px 11px; }
  .nav-toggle{ display: flex; }
}
@media (max-width: 480px){
  .main-nav{ top: 58px; }
}

/* ---------- Buttons ---------- */
.btn{
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 2px; text-decoration: none;
  font-weight: 700; font-size: 0.96rem; border: 1px solid transparent; cursor: pointer;
  font-family: var(--sans); transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 2px 3px 0 rgba(42,32,19,0.18); }
.btn:active{ transform: translateY(0); box-shadow: none; }
.btn-primary{ background: var(--red); color: #fff; }
.btn-primary:hover{ background: var(--red-dark); }
.btn-outline{ background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn-outline:hover{ border-color: var(--ink); background: rgba(42,32,19,0.04); }
.btn-whatsapp{ background: var(--forest); color: #fff; }
.btn-whatsapp:hover{ background: var(--forest-dark); }
.cta-row{ display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

/* ---------- Layout rhythm ---------- */
section{ padding: 30px 0; }
section.tight{ padding: 14px 0; }
.section-head{ margin-bottom: 24px; }

.hero{ padding: 34px 0 30px; }
.hero-grid{ display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
@media (max-width: 900px){ .hero-grid{ grid-template-columns: 1fr; } }
.hero-simple .lede{ max-width: 62ch; }

.breadcrumb{
  padding: 14px var(--pad) 0; font-size: 0.83rem; color: var(--ink-soft);
  display: flex; gap: 8px; align-items: center; max-width: var(--maxw); margin: 0 auto;
}
.breadcrumb a{ color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover{ text-decoration: underline; }
.breadcrumb span[aria-current]{ color: var(--ink); }

/* ---------- Folder illustration in the hero ---------- */
.folder-art{ position: relative; padding: 6px 0 18px 26px; }
.folder-art svg{ width: 100%; height: auto; display: block; }

/* Folder tab — a literal case-file tab clipped to a trapezoid,
   attached to a panel. Not a caption line above a heading. */
.folder-tab{
  display: inline-block; font-family: var(--mono); font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink);
  background: var(--kraft-dark); padding: 7px 22px 9px 16px; margin: 0 0 -1px 14px;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0% 100%);
  position: relative; z-index: 1;
}
.snapshot{ background: var(--paper); border: 1px solid var(--rule-strong); }
.snapshot-head{
  padding: 9px 14px; border-bottom: 1px solid var(--rule);
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.04em;
  color: var(--ink-soft); text-transform: uppercase;
}
.snapshot-body{ padding: 16px; }
.serp{ border-bottom: 1px dashed var(--rule); padding-bottom: 13px; margin-bottom: 13px; }
.serp:last-child{ border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.serp .label{ font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); display: block; margin-bottom: 4px; }
.serp.after .label{ color: var(--forest-dark); }
.serp .url{ font-family: var(--mono); font-size: 0.76rem; color: #4d6b3f; margin: 0; }
.serp .title{ color: #1a3f8a; font-size: 0.98rem; margin: 2px 0; }
.serp .desc{ font-size: 0.84rem; color: var(--ink-soft); margin: 0; }
.serp.before .title, .serp.before .url{ color: #948a6f; }

/* ---------- Deliverables: a typed list, not boxed cards ---------- */
.deliverables{ margin: 0; padding: 0; }
.deliverables .row{ display: grid; grid-template-columns: 210px 1fr; gap: 18px; padding: 15px 0; border-top: 1px dashed var(--rule); }
.deliverables .row:first-child{ border-top: 0; }
.deliverables dt{ font-weight: 700; font-family: var(--mono); font-size: 0.86rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--ink); }
.deliverables dd{ margin: 0; color: var(--ink-soft); }
@media (max-width: 700px){ .deliverables .row{ grid-template-columns: 1fr; gap: 4px; } }

.grid-2{ display: grid; grid-template-columns: 1fr 1fr; gap: 30px 44px; }
@media (max-width: 760px){ .grid-2{ grid-template-columns: 1fr; } }

.item{ padding: 18px 12px; margin: 0 -12px; border-top: 1px dashed var(--rule); transition: background 0.12s ease; }
.item:first-child{ border-top: 0; }
.item:hover{ background: rgba(163,51,31,0.05); }
.item h3{ margin-bottom: 6px; }
.item h3 a{ text-decoration: none; }
.item h3 a:hover{ text-decoration: underline; }
.item p{ margin: 0; color: var(--ink-soft); }

/* Checklist — literal checkbox marks */
.check-list{ list-style: none; margin: 0; padding: 0; }
.check-list li{ padding: 10px 0 10px 30px; border-top: 1px dashed var(--rule); position: relative; color: var(--ink-soft); }
.check-list li:first-child{ border-top: 0; }
.check-list li::before{
  content: "✓"; position: absolute; left: 0; top: 9px; width: 18px; height: 18px;
  border: 1.5px solid var(--forest); color: var(--forest); font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* Process steps — case-file numbering, genuinely sequential */
.steps{ counter-reset: step; }
.step{ display: grid; grid-template-columns: 46px 1fr; gap: 16px; padding: 16px 0; border-top: 1px dashed var(--rule); }
.step:first-child{ border-top: 0; }
.step .num{ counter-increment: step; font-family: var(--mono); font-weight: 700; font-size: 1rem; color: var(--red); padding-top: 2px; }
.step .num::before{ content: counter(step, decimal-leading-zero) "."; }

/* FAQ styled as clipped memo notes */
details.faq{ border-top: 1px dashed var(--rule); padding: 14px 0; position: relative; }
details.faq:last-child{ border-bottom: 1px dashed var(--rule); }
details.faq summary{
  cursor: pointer; font-weight: 600; list-style: none; position: relative;
  padding-right: 28px; font-size: 1rem;
}
details.faq summary::-webkit-details-marker{ display: none; }
details.faq summary::after{
  content: "+"; position: absolute; right: 0; top: -3px; font-size: 1.3rem; color: var(--red); font-family: var(--serif);
}
details.faq[open] summary::after{ content: "–"; }
details.faq p{ margin-top: 10px; color: var(--ink-soft); }

/* ---------- Contact ---------- */
.contact-layout{ display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 800px){ .contact-layout{ grid-template-columns: 1fr; } }

.form-grid{ display: grid; gap: 16px; max-width: 560px; }
.field label{ display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.93rem; }
.field input, .field textarea, .field select{
  width: 100%; padding: 11px 12px; border: 1px solid var(--rule-strong);
  border-radius: 2px; font-family: var(--sans); font-size: 1rem; background: #fff; color: var(--ink);
}
.field textarea{ resize: vertical; min-height: 120px; }
.field small{ color: var(--ink-soft); font-weight: 400; }
.hp-field{ position: absolute; left: -9999px; }
.form-note{ font-size: 0.84rem; color: var(--ink-soft); }
.form-success{ border: 1px solid var(--forest); background: #fff; color: var(--forest-dark); padding: 16px; font-weight: 600; }

.contact-panel{ border: 1px solid var(--rule-strong); background: var(--paper); padding: 22px; }
.contact-panel a{ display: block; margin-bottom: 10px; font-weight: 600; }

.quick-form{ margin-top: 26px; padding-top: 26px; border-top: 1px dashed var(--rule-strong); max-width: 560px; }
.quick-form .form-note a{ font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer{ margin-top: 30px; background: var(--ink); color: rgba(246,240,226,0.82); padding: 40px 0 22px; }
.footer-grid{ display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; }
@media (max-width: 760px){ .footer-grid{ grid-template-columns: 1fr; } }
.footer-grid h2{ font-family: var(--mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 14px; color: #C9B98C; }
.footer-grid p{ color: rgba(246,240,226,0.7); }
.footer-grid ul{ list-style: none; margin: 0; padding: 0; }
.footer-grid li{ margin-bottom: 9px; }
.footer-grid a{ color: rgba(246,240,226,0.82); text-decoration: none; font-size: 0.93rem; }
.footer-grid a:hover{ color: #fff; text-decoration: underline; }
.footer-bottom{
  margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(246,240,226,0.16);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.8rem; color: rgba(246,240,226,0.6);
}
.footer-bottom a{ color: rgba(246,240,226,0.6); }
.footer-bottom a:hover{ color: #fff; }
.wrap.footer-bottom{ max-width: var(--maxw); margin: 0 auto; padding: 22px var(--pad); border-top: none; }

.skip-link{ position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus{ left: 16px; top: 16px; }

/* ---------- Aparición suave al hacer scroll (detalle, opcional vía JS) ---------- */
.reveal-pending{
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-pending.in-view{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal-pending{ opacity: 1; transform: none; transition: none; }
}

/* Realce suave del resultado "después" en el hero de la home */
@keyframes serp-glow{
  0%{ box-shadow: inset 0 0 0 0 rgba(51,81,60,0); }
  30%{ box-shadow: inset 0 0 0 2px rgba(51,81,60,0.35); }
  100%{ box-shadow: inset 0 0 0 0 rgba(51,81,60,0); }
}
.serp.after{ animation: serp-glow 1.8s ease-out 1s 1; border-radius: 3px; }
@media (prefers-reduced-motion: reduce){
  .serp.after{ animation: none; }
}

/* ---------- Barra de métricas en directo ---------- */
.metrics-bar{ background: var(--ink); border-bottom: 1px solid rgba(246,240,226,0.12); }
.metrics-toggle{
  width: 100%; max-width: var(--maxw); margin: 0 auto; display: flex;
  align-items: center; gap: 10px; padding: 7px var(--pad);
  background: none; border: none; cursor: pointer; font-family: var(--mono);
  font-size: 0.76rem; color: rgba(246,240,226,0.72);
}
.metrics-toggle:hover{ color: #fff; }
.metrics-led{
  width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--rule-strong);
}
.metrics-led[data-estado="bueno"]{ background: #5C9A72; }
.metrics-led[data-estado="atencion"]{ background: var(--amber); }
.metrics-led[data-estado="malo"]{ background: #C0554A; }
.metrics-toggle b{ color: #fff; font-weight: 600; }
.metrics-sep{ opacity: 0.4; }
.metrics-toggle .m-item{ display: inline-flex; gap: 4px; }
@media (max-width: 640px){
  .metrics-toggle .m-hide-mobile{ display: none; }
}
.metrics-arrow{
  margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg); flex: none;
}
.metrics-toggle[aria-expanded="true"] .metrics-arrow{ transform: rotate(-135deg); }

.metrics-panel{
  background: var(--ink); border-bottom: 3px solid var(--red);
  color: rgba(246,240,226,0.85);
}
.metrics-panel-inner{ max-width: var(--maxw); margin: 0 auto; padding: 4px var(--pad) 20px; }
.metrics-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px 22px;
  margin: 10px 0 14px;
}
.metrics-grid dt{ font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: rgba(246,240,226,0.55); margin-bottom: 2px; }
.metrics-grid dd{ margin: 0; font-family: var(--mono); font-size: 0.95rem; color: #fff; font-weight: 600; }
.metrics-note{ font-size: 0.84rem; color: rgba(246,240,226,0.68); margin: 0; max-width: 62ch; }

/* ---------- Tarjetas de servicio con icono ---------- */
.service-cards{ display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1px; background: var(--rule-strong); border: 1px solid var(--rule-strong); }
.service-card{
  display: block; background: var(--paper); padding: 22px 20px; text-decoration: none; color: var(--ink);
  transition: background 0.15s ease;
}
.service-card:hover{ background: #FBF7EC; }
.service-card-icon{
  width: 34px; height: 34px; margin-bottom: 14px; color: var(--red);
}
.service-card h3{ margin: 0 0 6px; font-size: 1.02rem; }
.service-card p{ margin: 0; color: var(--ink-soft); font-size: 0.9rem; }

.closing{ padding: 44px 0; scroll-margin-top: 90px; }

/* ---------- Cookie banner — centered, animated ---------- */
.cookie-banner{
  position: fixed; left: 50%; bottom: 22px; z-index: 300;
  width: calc(100% - 32px); max-width: 640px;
  transform: translate(-50%, 0);
  animation: cookie-pop 0.4s ease-out 0.3s both;
}
@keyframes cookie-pop{
  from{ opacity: 0; transform: translate(-50%, 24px); }
  to{ opacity: 1; transform: translate(-50%, 0); }
}
.cookie-banner-inner{
  background: var(--paper); border: 1px solid var(--rule-strong); border-top: 4px solid var(--red);
  border-radius: 8px; padding: 22px 24px;
  box-shadow: 0 10px 30px rgba(42,32,19,0.28);
  display: flex; flex-direction: column; gap: 16px;
}
.cookie-banner p{ margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.cookie-banner a{ color: var(--red-dark); font-weight: 600; }
.cookie-actions{ display: flex; gap: 10px; justify-content: flex-end; }
.cookie-actions .btn{ padding: 9px 18px; font-size: 0.88rem; }
@media (max-width: 480px){
  .cookie-banner{ bottom: 12px; width: calc(100% - 20px); }
  .cookie-banner-inner{ padding: 18px; }
  .cookie-actions{ flex-direction: column-reverse; }
  .cookie-actions .btn{ width: 100%; justify-content: center; }
}

/* ---------- Floating WhatsApp button (injected by main.js on every page) ---------- */
.wa-float{
  position: fixed; right: 20px; bottom: 20px; z-index: 250;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--forest); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(42,32,19,0.35);
  text-decoration: none;
}
.wa-float:hover{ background: var(--forest-dark); }
.wa-float svg{ width: 28px; height: 28px; }
@media (max-width: 480px){
  .wa-float{ width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .wa-float svg{ width: 25px; height: 25px; }
}
/* keep the floating button from covering the cookie banner on small screens */
body:has(#cookie-banner:not([hidden]))  .wa-float{ display: none; }
@media (max-width: 480px){
  body:has(#cookie-banner:not([hidden])) .wa-float{ display: none; }
}

/* ============================================================
   Blog — mismas reglas del expediente: papel, filetes,
   monoespaciada para metadatos. Sin tarjetas flotantes.
   ============================================================ */

/* Rejilla de artículos */
.post-grid{
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1px; background: var(--rule-strong);
  border: 1px solid var(--rule-strong); margin-top: 6px;
}
.post-card{
  background: var(--paper); padding: 20px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; gap: 8px; transition: background 0.15s ease;
}
.post-card:hover{ background: #FBF7EC; }
.post-meta{
  font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.post-meta .cat{ color: var(--red-dark); font-weight: 600; }
.post-meta .dot{ opacity: 0.45; }
.post-card h3{ margin: 0; font-size: 1.05rem; line-height: 1.25; }
.post-card p{ margin: 0; font-size: 0.9rem; color: var(--ink-soft); }

/* Artículo destacado: ficha grande con número de expediente */
.post-featured{
  border: 1px solid var(--rule-strong); background: var(--paper);
  padding: 26px 24px; display: block; text-decoration: none; color: var(--ink);
  border-left: 4px solid var(--red);
}
.post-featured:hover{ background: #FBF7EC; }
.post-featured h3{ font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 8px 0 8px; max-width: 26ch; }
.post-featured p{ margin: 0; color: var(--ink-soft); max-width: 60ch; }

/* Categorías del blog */
.cat-grid{
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: var(--rule-strong);
  border: 1px solid var(--rule-strong);
}
.cat-card{
  background: var(--paper); padding: 18px; text-decoration: none; color: var(--ink);
  display: flex; align-items: center; gap: 12px; transition: background 0.15s ease;
}
.cat-card:hover{ background: #FBF7EC; }
.cat-card svg{ width: 24px; height: 24px; color: var(--red); flex: none; }
.cat-card b{ font-family: var(--serif); font-weight: 600; font-size: 1rem; display: block; }
.cat-card span{ font-family: var(--mono); font-size: 0.7rem; color: var(--ink-soft); }

/* ---------- Cuerpo del artículo ---------- */
.article-body{ max-width: 68ch; }
.article-body h2{ margin-top: 1.9em; scroll-margin-top: 90px; }
.article-body h3{ margin-top: 1.5em; font-size: 1.05rem; }
.article-body ul, .article-body ol{ max-width: 66ch; padding-left: 1.2em; }
.article-body li{ margin-bottom: 0.5em; }
.article-head-meta{
  font-family: var(--mono); font-size: 0.74rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px;
}
.article-head-meta .cat{ color: var(--red-dark); font-weight: 600; text-decoration: none; }

/* Índice de contenidos: hoja grapada al principio */
.toc{
  border: 1px solid var(--rule-strong); background: #FBF7EC;
  padding: 18px 20px; margin: 26px 0 30px; max-width: 60ch;
}
.toc p{ font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--ink-soft); margin: 0 0 10px; }
.toc ol{ margin: 0; padding-left: 1.1em; }
.toc li{ margin-bottom: 6px; }
.toc a{ color: var(--ink); text-decoration: none; }
.toc a:hover{ color: var(--red-dark); text-decoration: underline; }

/* Caja destacada */
.callout{
  border-left: 4px solid var(--forest); background: #FBF7EC;
  border-top: 1px solid var(--rule); border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 20px; margin: 26px 0; max-width: 64ch;
}
.callout p:last-child{ margin-bottom: 0; }
.callout b{ display: block; font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--forest-dark); margin-bottom: 8px; }
.callout--aviso{ border-left-color: var(--amber); }
.callout--aviso b{ color: var(--amber); }

/* Cita destacada */
.pull{
  border-left: 3px solid var(--red); padding: 4px 0 4px 20px; margin: 30px 0;
  font-family: var(--serif); font-size: 1.22rem; line-height: 1.4; color: var(--ink);
  max-width: 54ch;
}

/* Checklist del artículo */
.article-check{ list-style: none; margin: 24px 0; padding: 0; max-width: 64ch; }
.article-check li{
  padding: 11px 0 11px 32px; border-top: 1px dashed var(--rule);
  position: relative; color: var(--ink-soft);
}
.article-check li:last-child{ border-bottom: 1px dashed var(--rule); }
.article-check li::before{
  content: ""; position: absolute; left: 0; top: 14px;
  width: 16px; height: 16px; border: 1.5px solid var(--forest);
}
.article-check strong{ color: var(--ink); }

/* Tabla comparativa */
.table-wrap{ overflow-x: auto; margin: 26px 0; }
.article-body table{
  border-collapse: collapse; width: 100%; min-width: 440px;
  border: 1px solid var(--rule-strong); font-size: 0.93rem;
}
.article-body th, .article-body td{
  border: 1px solid var(--rule); padding: 11px 13px; text-align: left; vertical-align: top;
}
.article-body th{
  background: #FBF7EC; font-family: var(--mono); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); font-weight: 600;
}

/* CTA de cierre del artículo */
.article-cta{
  border: 1px solid var(--rule-strong); border-top: 4px solid var(--red);
  background: #FBF7EC; padding: 24px; margin: 36px 0 0; max-width: 64ch;
}
.article-cta h2{ margin-top: 0; font-size: 1.25rem; }
.article-cta p{ color: var(--ink-soft); }

/* Artículos relacionados */
.related{ border-top: 1px dashed var(--rule-strong); margin-top: 34px; padding-top: 22px; }
