/* =========================================================
   ARTICLE / SINGLE-PAGE READ
   Long-form essay layout — uses original palette
   ========================================================= */

.utility-bar { background: var(--ink); color: rgba(255,255,255,0.78); font-size: 12px; }
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; }
.utility-bar .live::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--warm); margin-right: 8px; vertical-align: 1px;
}

/* Breadcrumb */
.crumbs { padding: 24px 0 0; font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); transition: color 160ms; }
.crumbs a:hover { color: var(--teal); }
.crumbs .sep { margin: 0 10px; opacity: 0.5; }
.crumbs .here { color: var(--ink); font-weight: 500; }

/* =========================================================
   READING-PROGRESS BAR (top of page)
   ========================================================= */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px;
  background: transparent;
  z-index: 100;
  pointer-events: none;
}
.progress-bar .fill {
  height: 100%;
  background: var(--teal);
  width: 0%;
  transition: width 100ms linear;
}

/* =========================================================
   ARTICLE MASTHEAD
   ========================================================= */
.art-mast {
  padding: 40px 0 24px;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}
.art-mast .kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 22px;
}
.art-mast .kicker .vol {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--warm);
  font-size: 13px;
}
.art-mast h1 {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 500;
  line-height: 1.0;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: balance;
}
.art-mast h1 em { font-style: italic; color: var(--teal); font-weight: 500; }
.art-mast .standfirst {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 680px;
  margin: 0 auto 36px;
  font-weight: 400;
  text-wrap: balance;
}

.art-byline {
  display: flex; justify-content: center; align-items: center; gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 18px 0;
  max-width: 680px;
  margin: 0 auto;
}
.art-byline .author {
  display: flex; align-items: center; gap: 10px;
}
.art-byline .author .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--sand);
}
.art-byline .author strong { color: var(--ink); font-weight: 600; }
.art-byline .dot { width: 3px; height: 3px; background: var(--muted-2); border-radius: 50%; }
.art-byline .share {
  display: flex; align-items: center; gap: 8px;
}
.art-byline .share button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--rule);
  background: var(--paper);
  color: var(--ink-2);
  cursor: pointer;
  display: grid; place-items: center;
  transition: all 160ms;
}
.art-byline .share button:hover { border-color: var(--teal); color: var(--teal); }

/* Hero photo */
.art-hero-img {
  margin: 48px auto 0;
  max-width: 1280px;
  aspect-ratio: 21 / 9;
  border-radius: var(--r-lg);
  background-size: cover; background-position: center;
  background-color: var(--cream);
}
.art-hero-cap {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  margin: 14px auto 0;
  max-width: 680px;
  line-height: 1.5;
}

/* =========================================================
   BODY GRID
   ========================================================= */
.art-body {
  display: grid;
  grid-template-columns: 220px 1fr 220px;
  gap: 48px;
  padding: 96px 0 80px;
  align-items: start;
}

/* Left rail — table of contents */
.toc {
  position: sticky;
  top: 100px;
  font-size: 13px;
}
.toc .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--rule);
}
.toc li { padding: 7px 0 7px 16px; margin-left: -1px; border-left: 2px solid transparent; transition: all 160ms; }
.toc li.active { border-left-color: var(--teal); }
.toc li.active a { color: var(--teal); font-weight: 600; }
.toc a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
  display: flex; gap: 10px;
}
.toc a:hover { color: var(--ink); }
.toc a .num {
  font-family: var(--serif);
  font-style: italic;
  color: var(--warm);
  flex-shrink: 0;
}

/* Center column */
.art-col {
  max-width: 680px;
  margin: 0 auto;
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 19px;
  line-height: 1.7;
}
.art-col > section { margin-bottom: 48px; scroll-margin-top: 100px; }
.art-col h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 56px 0 20px;
  color: var(--ink);
  text-wrap: balance;
}
.art-col h2 em { font-style: italic; color: var(--teal); font-weight: 500; }
.art-col h2 .num {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--warm);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.art-col p { margin: 0 0 22px; }
.art-col p:first-of-type::first-letter {
  font-family: var(--serif);
  font-size: 5em;
  float: left;
  line-height: 0.86;
  margin: 8px 12px 0 0;
  color: var(--teal);
  font-weight: 600;
}
.art-col em { font-style: italic; }
.art-col strong { color: var(--ink); font-weight: 600; }
.art-col a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.art-col a:hover { background: var(--teal-soft); }

.art-col .pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.3;
  color: var(--ink);
  margin: 40px 0;
  padding: 8px 0 8px 28px;
  border-left: 3px solid var(--warm);
  text-wrap: balance;
}

.art-col .photo-block {
  margin: 40px -60px;
  border-radius: var(--r);
  overflow: hidden;
}
.art-col .photo-block .img {
  aspect-ratio: 16 / 10;
  background-size: cover; background-position: center;
  background-color: var(--cream);
}
.art-col .photo-block figcaption {
  font-family: var(--serif);
  font-style: italic;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

.art-col .callout {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 22px 26px;
  margin: 32px 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.art-col .callout h5 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 8px;
}
.art-col .callout p { font-family: var(--sans); font-size: 15px; margin: 0; }
.art-col .callout p::first-letter { font-size: inherit; float: none; margin: 0; color: inherit; font-weight: inherit; }

/* In-line list */
.art-col ul.bul {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: flex; flex-direction: column; gap: 12px;
}
.art-col ul.bul li {
  padding-left: 28px;
  position: relative;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
}
.art-col ul.bul li::before {
  content: "";
  position: absolute;
  left: 0; top: 14px;
  width: 14px; height: 1px;
  background: var(--warm);
}

/* Right rail — fact box */
.factbox {
  position: sticky;
  top: 100px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 22px;
  font-size: 13px;
}
.factbox .label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
}
.factbox dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.factbox dt {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 2px;
}
.factbox dd {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.factbox .save-btn {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--teal);
  background: var(--paper);
  color: var(--teal);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 160ms;
}
.factbox .save-btn:hover { background: var(--teal-soft); }

/* End matter */
.art-end {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.art-end .stamp {
  font-family: var(--serif);
  font-style: italic;
  color: var(--warm);
  font-size: 18px;
  text-align: center;
  margin: 0 0 32px;
  letter-spacing: 0.04em;
}
.art-end .stamp::before, .art-end .stamp::after { content: " ·  "; color: var(--rule); margin: 0 8px; }

.art-bio {
  background: var(--cream);
  border-radius: var(--r-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 22px;
  margin-bottom: 32px;
}
.art-bio .av {
  width: 80px; height: 80px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--sand);
}
.art-bio .nm {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}
.art-bio .role { font-size: 12px; color: var(--teal); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px; }
.art-bio .body { font-family: var(--sans); font-size: 14px; color: var(--ink-2); line-height: 1.55; margin: 0 0 12px; }
.art-bio .links { display: flex; gap: 18px; font-size: 13px; }
.art-bio .links a { color: var(--teal); font-weight: 600; }

.disclosure-card {
  border: 1px dashed var(--rule);
  background: var(--paper);
  border-radius: var(--r);
  padding: 18px 22px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.6;
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 48px;
}
.disclosure-card svg { color: var(--teal); flex-shrink: 0; margin-top: 2px; }
.disclosure-card strong { color: var(--ink); font-weight: 600; }

/* Comments / responses */
.responses {
  max-width: 680px;
  margin: 0 auto 80px;
}
.responses h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.responses h3 em { font-style: italic; color: var(--teal); font-weight: 500; }
.responses .sub {
  font-size: 13px; color: var(--muted); margin-bottom: 24px;
}
.response {
  border-top: 1px solid var(--rule);
  padding: 20px 0;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
}
.response .av {
  width: 36px; height: 36px;
  border-radius: 50%;
  background-size: cover; background-position: center;
  background-color: var(--sand);
}
.response .name { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--ink); }
.response .meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.response p { font-family: var(--serif); font-size: 16px; line-height: 1.55; color: var(--ink-2); margin: 0; }
.response.editor { background: var(--teal-soft); border-radius: var(--r); padding: 18px; border-top: 0; }
.response.editor .name::after { content: " · Respuesta del editor"; color: var(--teal); font-style: italic; font-weight: 500; }

.response-form {
  margin-top: 20px;
  display: flex; flex-direction: column; gap: 12px;
}
.response-form textarea {
  width: 100%;
  min-height: 90px;
  padding: 14px 16px;
  border-radius: var(--r);
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  resize: vertical;
}
.response-form textarea:focus { outline: 0; border-color: var(--teal); }
.response-form .row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.response-form .fine { font-size: 12px; color: var(--muted); }
.response-form button {
  background: var(--teal); color: var(--paper);
  border: 0; padding: 11px 20px; border-radius: var(--r-pill);
  font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer;
}
.response-form button:hover { background: var(--teal-2); }

/* Related strip — compact horizontal list */
.art-related {
  border-top: 1px solid var(--rule);
  padding: 56px 0 72px;
  background: var(--cream);
}
.art-related .head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}
.art-related .head .left { display: flex; align-items: baseline; gap: 14px; }
.art-related h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0;
}
.art-related h2 em { font-style: italic; color: var(--teal); font-weight: 500; }
.art-related .head .ct {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--muted);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.related-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease;
}
.related-card:hover { border-color: var(--teal); transform: translateY(-1px); }
.related-card .thumb {
  width: 96px; height: 96px;
  border-radius: calc(var(--r) - 4px);
  background-size: cover; background-position: center;
  background-color: var(--cream);
  flex-shrink: 0;
}
.related-card .body { display: flex; flex-direction: column; min-width: 0; }
.related-card .meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.related-card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }
.related-card .meta .read { color: var(--muted); font-weight: 500; }
.related-card .ttl {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-card:hover .ttl { color: var(--teal); }
.related-card .arr {
  margin-top: auto;
  color: var(--teal);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  letter-spacing: 0.04em;
}

@media (max-width: 1100px) {
  .art-body { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .toc, .factbox { position: static; }
  .toc { display: none; }
  .factbox { max-width: 680px; margin: 0 auto; }
  .art-col .photo-block { margin: 32px 0; }
  .related-grid { grid-template-columns: 1fr; }
  .art-hero-img { aspect-ratio: 16 / 10; }
}

/* === WP additions === */

/* Retícula del cuerpo cuando falta algún raíl (TOC sin secciones / ficha vacía) */
@media (min-width: 1101px) {
  .art-body.no-toc { grid-template-columns: 1fr 220px; }
  .art-body.no-factbox { grid-template-columns: 220px 1fr; }
  .art-body.no-toc.no-factbox { grid-template-columns: 1fr; }
}

/* Enlace "ver todos" de la sección de relacionados (estilos inline del prototipo) */
.art-related .head .all {
  color: var(--teal);
  font-weight: 600;
  font-size: 13px;
  display: inline-flex; align-items: center; gap: 6px;
}

/* Feedback del botón "copiar enlace" (innley.js añade .copied) */
.art-byline .share button.copied { border-color: var(--teal); color: var(--teal); background: var(--teal-soft); }

/* Bloques Gutenberg equivalentes a los del prototipo */
.art-col .wp-block-image.photo-block img {
  width: 100%; height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background-color: var(--cream);
}
.art-col ul.wp-block-list.bul { list-style: none; padding-left: 0; }
.art-col .wp-block-group.callout p + p { margin-top: 10px; }
.art-col .wp-block-group.callout h5.wp-block-heading { margin: 0 0 8px; }

/* Accesibilidad: títulos ocultos generados por WordPress (formulario/navegación) */
.responses .screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden;
  padding: 0; position: absolute; word-wrap: normal;
}

/* Comentarios de WordPress dentro del diseño "Respuestas de lectores" */
.response .response { grid-column: 1 / -1; } /* respuestas anidadas a ancho completo */
.response p + p { margin-top: 10px; }
.response .comment-awaiting-moderation {
  display: block;
  font-family: var(--sans);
  font-size: 12px;
  color: var(--warm);
  font-style: italic;
  margin-top: 6px;
}
.responses .comment-navigation { margin: 16px 0 0; font-size: 13px; }
.responses .comment-navigation .nav-links { display: flex; justify-content: space-between; gap: 12px; }
.responses .comment-navigation a { color: var(--teal); font-weight: 600; }
.responses .closed-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* Formulario de comentarios (comment_form) con el aspecto de .response-form */
.response-form p { margin: 0; }
.response-form input[type="text"],
.response-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--r);
  border: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
}
.response-form input[type="text"]:focus,
.response-form input[type="email"]:focus { outline: 0; border-color: var(--teal); }
.response-form .comment-form-cookies-consent {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--muted);
}
.response-form .comment-form-cookies-consent input { accent-color: var(--teal); margin: 0; }
.response-form .logged-in-as { font-size: 12px; color: var(--muted); }
.response-form .logged-in-as a { color: var(--teal); }
@media (min-width: 700px) {
  .response-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .response-form .comment-form-comment,
  .response-form .comment-form-cookies-consent,
  .response-form .logged-in-as,
  .response-form .row { grid-column: 1 / -1; }
}


/* === Patrones Innley (pros/contras y comparativa) — copiado de review.css === */
.art-col .proscons-grid, .art-col .compare { margin: 32px 0; }
/* Pros / cons */
.proscons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 56px;
}
.pc-card {
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 24px;
  background: var(--paper);
}
.pc-card.pro { border-color: rgba(46,139,87,0.3); background: rgba(46,139,87,0.04); }
.pc-card.con { border-color: rgba(196,76,61,0.25); background: rgba(196,76,61,0.04); }
.pc-card h4 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
.pc-card.pro h4 { color: var(--green); }
.pc-card.con h4 { color: var(--red); }
.pc-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pc-card li { font-size: 14.5px; color: var(--ink-2); line-height: 1.5; display: flex; gap: 10px; }
.pc-card li svg { flex-shrink: 0; margin-top: 4px; }
.pc-card.pro li svg { color: var(--green); }
.pc-card.con li svg { color: var(--red); }
/* Comparison block */
.compare {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px;
  margin-bottom: 56px;
}
.compare h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.compare > .sub {
  font-size: 14px; color: var(--muted); margin: 0 0 22px;
}
.compare-table {
  display: grid;
  grid-template-columns: 1fr repeat(3, 1fr);
  border-top: 1px solid var(--rule);
}
.compare-table > div {
  padding: 14px 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.compare-table .row-h {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}
.compare-table .col-h {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  background: var(--cream-2);
  position: relative;
}
.compare-table .col-h.this {
  background: var(--teal);
  color: var(--paper);
  border-radius: var(--r) var(--r) 0 0;
}
.compare-table .pic {
  height: 100px;
  background-size: cover; background-position: center;
  border-radius: 0 0 var(--r) var(--r);
}
.compare-table .pic.this { border-bottom: 0; }
.compare-table .val { font-family: var(--serif); color: var(--ink); font-weight: 500; }
.compare-table .num-cell { font-family: var(--serif); font-weight: 600; color: var(--teal); font-size: 16px; }
.compare-table .col-h .col-sub { font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 2px; }
.compare-table .col-h.this .col-sub { color: inherit; opacity: 0.85; }
.compare-table .val.verdict-cell { font-style: italic; color: var(--teal); }
/* Comparativa con 3 competidores (5 columnas) */
.compare-table.cols-5 { grid-template-columns: 1fr repeat(4, 1fr); }

@media (max-width: 980px) {
  .proscons-grid { grid-template-columns: 1fr; }
  .compare-table { grid-template-columns: 1fr 1fr; font-size: 12px; }
  .compare-table .col-3 { display: none; }
  .compare-table .col-4 { display: none; }
  .compare-table.cols-5 { grid-template-columns: 1fr 1fr; }
}
