/* Ajustes de interfaz y accesibilidad */

/* Todos los desplegables funcionan mediante <details>/<summary>. */
details.native-accordion{display:block}
details.native-accordion>summary{list-style:none;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
details.native-accordion>summary::-webkit-details-marker{display:none}
details.native-accordion>summary::marker{content:""}
details.native-accordion>summary:focus-visible{outline:3px solid rgba(201,110,74,.48);outline-offset:4px;border-radius:17px}
details.native-accordion[open]>.discovery-note-panel,
details.native-accordion[open]>.reading-note-panel,
details.native-accordion[open]>.toc-accordion-panel{animation:native-details-in .3s cubic-bezier(.2,.78,.25,1) both}
@keyframes native-details-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.accordion-state::before{content:"Abrir"}
details[open] .accordion-state::before{content:"Cerrar"}

/* Índice de lectura nativo. */
.page-toc details.toc-accordion{padding:0;overflow:hidden}
.page-toc .toc-accordion-trigger{list-style:none}
.page-toc details[open] .toc-accordion-icon{transform:rotate(180deg);background:#fff}
.page-toc details[open] .toc-accordion-icon::after{opacity:0;transform:translate(-50%,-50%) rotate(0)}
.page-toc .toc-accordion-panel{border-top:1px solid var(--line)}

/* Notas: siempre plegadas al cargar y con toda la cabecera clicable. */
.discovery-note>summary,.reading-note>summary{width:100%;box-sizing:border-box}
.discovery-note[open],.reading-note[open]{overflow:visible}
.discovery-note:not([open]) .discovery-note-panel,
.reading-note:not([open]) .reading-note-panel{display:none}
.discovery-note[open] .discovery-note-panel,
.reading-note[open] .reading-note-panel{display:block;grid-template-rows:none}
.discovery-note[open] .discovery-note-paper{animation:note-native-open .38s cubic-bezier(.2,.8,.25,1) both}
@keyframes note-native-open{from{opacity:0;transform:translateY(-7px) rotate(-.4deg)}to{opacity:1;transform:translateY(0) rotate(-.18deg)}}

/* Fichas de plantas y animales: tarjeta nativa, visible en el flujo y sin popovers ocultos. */
.species-guide{align-items:flex-start!important}
.species-guide>span{font-style:normal!important;font-family:inherit!important}
details.species-details{
  position:relative;display:inline-block;max-width:100%;margin:.22rem .12rem;vertical-align:middle;
  border:1px solid rgba(45,116,91,.25);border-radius:14px;background:linear-gradient(135deg,#edf3ea,#fbf8f1);
  color:#173a2f;box-shadow:inset 0 1px 0 rgba(255,255,255,.88);transition:border-color .2s,box-shadow .2s,background .2s;
}
details.species-details>summary{
  display:flex;align-items:center;justify-content:space-between;gap:.8rem;min-height:38px;padding:.42rem .48rem .42rem .72rem;
  list-style:none;cursor:pointer;border-radius:13px;-webkit-tap-highlight-color:transparent;touch-action:manipulation;
}
details.species-details>summary::-webkit-details-marker{display:none}
details.species-details>summary::marker{content:""}
details.species-details>summary:hover{background:rgba(255,255,255,.58)}
details.species-details>summary:focus-visible{outline:3px solid rgba(214,179,109,.44);outline-offset:3px}
.species-name{min-width:0;font-size:.94em;line-height:1.4}
.species-action{flex:0 0 auto;display:inline-flex;align-items:center;gap:.45rem;padding-left:.18rem;color:#2d745b;font-size:.58rem;font-weight:900;text-transform:uppercase;letter-spacing:.075em;white-space:nowrap}
.species-action-text::before{content:"Ver ficha"}
details.species-details[open] .species-action-text::before{content:"Cerrar ficha"}
.species-details-chevron{position:relative;width:25px;height:25px;border:1px solid rgba(45,116,91,.24);border-radius:50%;background:#fff;transition:transform .25s,background .25s}
.species-details-chevron::before{content:"";position:absolute;left:50%;top:47%;width:6px;height:6px;border-right:2px solid #c96e4a;border-bottom:2px solid #c96e4a;transform:translate(-50%,-50%) rotate(45deg)}
details.species-details[open]{display:block;width:min(100%,650px);margin:1rem 0;border-color:rgba(201,110,74,.43);background:#fff;box-shadow:0 18px 42px rgba(8,39,31,.13)}
details.species-details[open] .species-details-chevron{transform:rotate(180deg);background:#f7f3ea}
.species-details-panel{padding:0 .7rem .7rem}
.species-details-card{position:relative;padding:1.15rem 1.2rem 1.05rem;border-radius:13px;background:linear-gradient(150deg,#12372d,#09261f);color:#fff;box-shadow:inset 0 1px 0 rgba(255,255,255,.08);animation:species-native-in .3s cubic-bezier(.2,.78,.25,1) both}
@keyframes species-native-in{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
.species-card-kicker{display:block;margin-bottom:.65rem;color:#e5c98f;font-size:.59rem;font-weight:900;text-transform:uppercase;letter-spacing:.14em}
.species-details-card p{margin:.48rem 0!important;color:rgba(255,255,255,.84)!important;font-size:.82rem!important;line-height:1.58!important}
.species-details-card .species-tooltip-title{display:none}
.species-details-card .species-tooltip-line{display:grid;grid-template-columns:1.5rem minmax(0,1fr);gap:.65rem;align-items:start}
.species-details-card .species-tooltip-line>span{display:grid;place-items:center;width:1.5rem;min-height:1.5rem;border-radius:8px;background:rgba(255,255,255,.09)}

/* Cronologías: un único eje vertical continuo desde el borde superior al inferior. */
.timeline{
  counter-reset:timeline-step!important;position:relative!important;display:block!important;overflow:visible!important;
  margin:3rem 0!important;padding:2.6rem clamp(1rem,3vw,2rem)!important;border-radius:26px!important;
}
.timeline::before{
  content:""!important;position:absolute!important;z-index:0!important;left:50%!important;top:0!important;bottom:0!important;
  right:auto!important;width:4px!important;height:auto!important;transform:translateX(-50%)!important;border-radius:999px!important;
  background:linear-gradient(180deg,#c96e4a 0%,#d6b36d 50%,#2d745b 100%)!important;
  box-shadow:0 0 0 5px rgba(255,255,255,.72),0 0 20px rgba(201,110,74,.2)!important;
}
.timeline-item{counter-increment:timeline-step!important;position:relative!important;z-index:1!important;width:100%!important;min-width:0!important;margin:0 0 1.6rem!important;padding:0!important}
.timeline-item:last-child{margin-bottom:0!important}
.timeline-item::before{
  content:counter(timeline-step,decimal-leading-zero)!important;position:absolute!important;z-index:4!important;left:50%!important;top:1.25rem!important;
  width:2.55rem!important;height:2.55rem!important;display:grid!important;place-items:center!important;transform:translateX(-50%)!important;
  border:5px solid #f4f2eb!important;border-radius:50%!important;background:#0b3026!important;color:#fff!important;
  font-size:.64rem!important;font-weight:900!important;letter-spacing:.07em!important;box-shadow:0 8px 20px rgba(8,39,31,.22)!important;
}
.timeline-item::after{content:none!important;display:none!important}
.timeline-content{position:relative!important;z-index:2!important;width:calc(50% - 3.2rem)!important;min-height:128px!important;margin:0!important;padding:1.45rem!important}
.timeline-item:nth-child(odd) .timeline-content{margin-right:calc(50% + 3.2rem)!important;margin-left:0!important}
.timeline-item:nth-child(even) .timeline-content{margin-left:calc(50% + 3.2rem)!important;margin-right:0!important}
.timeline-item:nth-child(odd) .timeline-content::after,.timeline-item:nth-child(even) .timeline-content::after{top:1.65rem!important}

@media(max-width:760px){
  .species-action{font-size:.55rem}
  details.species-details,details.species-details[open]{width:100%;margin:.35rem 0}
  details.species-details>summary{padding:.52rem .52rem .52rem .7rem}
  .timeline{padding:2.2rem .9rem 2.2rem 3.95rem!important}
  .timeline::before{left:2.15rem!important;top:0!important;bottom:0!important;transform:none!important}
  .timeline-item::before{left:-1.8rem!important;top:1rem!important;transform:translateX(-50%)!important;width:2.25rem!important;height:2.25rem!important;border-width:4px!important}
  .timeline-content,.timeline-item:nth-child(odd) .timeline-content,.timeline-item:nth-child(even) .timeline-content{width:100%!important;min-height:0!important;margin:0!important}
  .timeline-item:nth-child(odd) .timeline-content::after,.timeline-item:nth-child(even) .timeline-content::after{left:-8px!important;right:auto!important}
}
@media(prefers-reduced-motion:reduce){
  details.native-accordion[open]>*:not(summary),.species-details-card,.discovery-note[open] .discovery-note-paper{animation:none!important}
}

/* Ajuste de alineación de las notas editoriales: acción y chevrón en la misma fila. */
.reading-note>summary{grid-template-columns:auto minmax(0,1fr) auto auto!important;gap:.85rem!important}
.reading-note-action{display:inline-flex!important;align-items:center;color:#2d745b;font-size:.62rem;font-weight:900;text-transform:uppercase;letter-spacing:.09em;white-space:nowrap}
@media(max-width:620px){
  .reading-note>summary{grid-template-columns:auto minmax(0,1fr) auto!important}
  .reading-note-action{display:none!important}
}


/* Ajustes de interfaz y accesibilidad */
.article-card .infrastructure-panel h3{color:#f4fbf8!important;text-shadow:0 1px 0 rgba(0,0,0,.22)!important}
.article-card .infrastructure-item h3{color:#ffffff!important;text-shadow:0 1px 0 rgba(0,0,0,.22)!important;font-size:1.22rem!important;line-height:1.18!important}
.article-card .infrastructure-item p{color:rgba(255,255,255,.9)!important}

.service-overview-photo{display:grid!important;grid-template-rows:auto auto!important;min-height:0!important;background:#fff!important;border:1px solid rgba(17,36,30,.12)!important;box-shadow:0 12px 30px rgba(8,39,31,.08)!important}
.service-overview-photo img{min-height:260px!important;max-height:430px!important;filter:saturate(.92) contrast(1.01)!important}
.service-overview-photo figcaption{position:static!important;left:auto!important;bottom:auto!important;padding:.9rem 1rem!important;background:#f5f1e7!important;backdrop-filter:none!important;color:#425750!important;font-size:.78rem!important;line-height:1.45!important;border-top:1px solid rgba(17,36,30,.08)!important}

.memory-poster{background:linear-gradient(135deg,rgba(8,39,31,.96),rgba(21,74,59,.88))!important;color:#fff!important}
.memory-poster::after{content:"";position:absolute;inset:auto -120px -120px auto;width:300px;height:300px;border-radius:50%;background:radial-gradient(circle,rgba(214,179,109,.18),rgba(214,179,109,0) 68%);pointer-events:none}


/* Ajustes de interfaz y accesibilidad */
.article-card .memory-poster h3,
.article-card .callout-dark h3,
.article-card .archive-panel h3,
.article-card .infrastructure-panel > h3,
.article-card .infrastructure-item h3{
  color:#fff!important;
  font-family:var(--sans)!important;
  font-weight:800!important;
  letter-spacing:-.025em!important;
  line-height:1.12!important;
  text-shadow:none!important;
}
.article-card .memory-poster h3{max-width:20ch!important;font-size:clamp(1.9rem,4vw,3.15rem)!important}
.article-card .callout-dark h3,
.article-card .archive-panel h3,
.article-card .infrastructure-panel > h3{font-size:clamp(1.45rem,2.6vw,2.2rem)!important}
.article-card .infrastructure-item h3{font-size:1.18rem!important;line-height:1.2!important}


/* Publicación final — fuentes de página */
.page-sources{margin-top:3rem!important}
.page-sources .reading-note-body{max-width:none}
.page-sources .reading-note-body ul{columns:1;column-gap:2rem}
.page-sources .reading-note-body li{break-inside:avoid;margin:.55rem 0}
.page-sources .source-method-note{margin-top:1rem;padding-top:1rem;border-top:1px solid rgba(17,36,30,.12);font-size:.86rem!important;color:#5c6d67!important}
.documentary-note{margin:1.2rem 0}
@media(min-width:980px){.page-sources .reading-note-body ul{columns:2}}

/* Mirador astronómico: fotografía original completa, sin recorte ni desenfoque. */
.story-photo-frame--natural {
  aspect-ratio: auto;
  height: auto;
}
.story-photo-frame--natural img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}
.story-photo-single .story-photo-frame.story-photo-frame--natural {
  aspect-ratio: auto !important;
  height: auto !important;
}
.article-card .story-photo-frame.story-photo-frame--natural img,
.story-photo-card:hover .story-photo-frame.story-photo-frame--natural img {
  width: 100%;
  height: auto !important;
  object-fit: contain;
  filter: none !important;
  transform: none !important;
}
.story-photo-frame.story-photo-frame--natural::after {
  display: none;
}

/* 2026-07-20 · Pie de foto unificado */
.article-card figure figcaption,
.article-card .story-photo-card figcaption,
.article-card .service-overview-photo figcaption {
  position: static !important;
  left: auto !important;
  bottom: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: .86rem 1rem .92rem !important;
  border: 0 !important;
  border-top: 1px solid rgba(17,36,30,.10) !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: #f5f1e7 !important;
  backdrop-filter: none !important;
  color: #425750 !important;
  font-size: .78rem !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  text-align: left !important;
}
.article-card figure figcaption strong {
  font-weight: 500 !important;
}
.article-card figure .photo-credit,
.photo-credit {
  display: block !important;
  margin-top: .42rem !important;
  color: #786f65 !important;
  font-size: .66rem !important;
  font-weight: 650 !important;
  letter-spacing: .035em !important;
  line-height: 1.35 !important;
  text-transform: none !important;
}
