/**
 * Dossier editorial — layout propio con Bootstrap 5 como rejilla.
 * Variables :root y componentes de lectura larga.
 */
:root {
  --dss-bg: #0d1117;
  --dss-bg-soft: #161b22;
  --dss-paper: #f6f0e8;
  --dss-paper-2: #ebe4d8;
  --dss-ink: #121417;
  --dss-muted: #4a4f57;
  --dss-accent: #c45c26;
  --dss-accent-dim: rgba(196, 92, 38, 0.15);
  --dss-line: rgba(18, 20, 23, 0.12);
  --dss-line-dark: rgba(255, 255, 255, 0.12);
  --dss-serif: "DM Serif Display", "Georgia", serif;
  --dss-sans: "DM Sans", system-ui, sans-serif;
  --dss-max: 40rem;
  --dss-sticky-top: 5.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 6rem;
}

body.dss-body {
  margin: 0;
  background: var(--dss-paper);
  color: var(--dss-ink);
  font-family: var(--dss-sans);
  font-size: 1.05rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.dss-body a {
  color: var(--dss-accent);
  font-weight: 600;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dss-body a:hover {
  color: #9a4218;
}

.dss-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dss-skip:focus {
  position: fixed;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 3000;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #fff;
  border: 2px solid var(--dss-ink);
}

/* —— Barra superior (contraste con búsquedas tóxicas) —— */
.dss-prebar {
  background: var(--dss-bg-soft);
  color: #c9d1d9;
  font-size: 0.8125rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--dss-line-dark);
}

.dss-prebar a {
  color: #8fbcff;
  font-weight: 600;
}

/* —— Masthead —— */
.dss-masthead {
  background: var(--dss-bg);
  color: #e6edf3;
  padding: clamp(2rem, 6vw, 4rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  position: relative;
  overflow: hidden;
}

.dss-masthead::after {
  content: "";
  position: absolute;
  right: -20%;
  top: -30%;
  width: 55%;
  height: 160%;
  background: radial-gradient(ellipse, var(--dss-accent-dim), transparent 70%);
  pointer-events: none;
}

.dss-masthead-inner {
  position: relative;
  z-index: 1;
}

.dss-mast-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #8b949e;
  margin-bottom: 1rem;
  font-weight: 700;
  text-align:center;
}

.dss-masthead h1 {
  font-family: var(--dss-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  /* max-width: 22ch; */
  text-wrap:balance;
  text-align:center;

}

.dss-mast-dek {
  font-size: 1.125rem;
  line-height: 1.55;
  color: #adbac7;
  /* max-width: 38rem; */
  margin: 0;
  text-align:center;
  text-wrap:balance;
}

.dss-mast-meta {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--dss-line-dark);
  font-size: 0.85rem;
  color: #8b949e;
}

/* —— Layout artículo + TOC —— */
.dss-shell {
  padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 8vw, 5rem);
}

.dss-toc {
  position: sticky;
  top: var(--dss-sticky-top);
  font-size: 0.8125rem;
  border-left: 3px solid var(--dss-accent);
  padding-left: 1rem;
  margin-bottom: 2rem;
}

.dss-toc-title {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.65rem;
  color: var(--dss-muted);
  margin-bottom: 0.75rem;
}

.dss-toc a,
.dss-toc-mobile a {
  display: block;
  color: var(--dss-ink);
  font-weight: 600;
  padding: 0.35rem 0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.dss-toc a:hover,
.dss-toc a.is-active,
.dss-toc a.is-active:hover,
.dss-toc-mobile a:hover,
.dss-toc-mobile a.is-active,
.dss-toc-mobile a.is-active:hover {
  border-bottom-color: var(--dss-accent);
  color: var(--dss-accent);
}

.dss-article h2 {
  font-family: var(--dss-serif);
  font-weight: 400;
  font-size: clamp(1.45rem, 2.8vw, 1.85rem);
  line-height: 1.2;
  margin: 2.75rem 0 1rem;
  letter-spacing: -0.02em;
  scroll-margin-top: 6rem;
}

.dss-article h2:first-of-type {
  margin-top: 0;
}

.dss-article h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 0.5rem;
}

.dss-article p {
  margin: 0 0 1rem;
  max-width: var(--dss-max);
  color: var(--dss-muted);
}

.dss-article p strong,
.dss-article li strong {
  color: var(--dss-ink);
}

.dss-lede {
  font-size: 1.2rem;
  color: var(--dss-ink);
  line-height: 1.55;
  max-width: var(--dss-max);
  margin-bottom: 2rem;
}

.dss-pull {
  font-family: var(--dss-serif);
  font-size: 1.35rem;
  font-style: italic;
  line-height: 1.45;
  color: var(--dss-ink);
  border-inline-start: 4px solid var(--dss-accent);
  padding: 1rem 0 1rem 1.25rem;
  margin: 2rem 0;
  max-width: var(--dss-max);
  background: linear-gradient(90deg, var(--dss-accent-dim), transparent);
}

.dss-note {
  font-size: 0.9rem;
  background: #fff;
  border: 1px solid var(--dss-line);
  padding: 1rem 1.15rem;
  border-radius: 6px;
  max-width: var(--dss-max);
  margin: 1.5rem 0;
  color: var(--dss-muted);
}

.dss-timeline {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  max-width: var(--dss-max);
  border-left: 2px solid var(--dss-line);
}

.dss-timeline li {
  position: relative;
  padding: 0.65rem 0 0.65rem 1.25rem;
  color: var(--dss-muted);
}

.dss-timeline li::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dss-accent);
}

.dss-timeline .dss-tl-year {
  font-weight: 800;
  color: var(--dss-ink);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

.dss-figure {
  margin: 2rem 0;
  max-width: 28rem;
}

.dss-figure img {
  width: 100%;
  border-radius: 4px;
  border: 1px solid var(--dss-line);
}

.dss-figure figcaption {
  font-size: 0.78rem;
  color: var(--dss-muted);
  margin-top: 0.4rem;
}

.dss-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  max-width: var(--dss-max);
}

.dss-chip {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  background: #fff;
  border: 1px solid var(--dss-line);
  border-radius: 4px;
  color: var(--dss-muted);
}

/* —— FAQ acordeón (Bootstrap reset mínimo) —— */
.dss-faq-wrap {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--dss-ink);
}

.dss-faq-wrap h2 {
  margin-top: 0 !important;
}

.dss-accordion .accordion-button:not(.collapsed) {
  background: var(--dss-accent-dim);
  color: var(--dss-ink);
  box-shadow: none;
}

.dss-accordion .accordion-button {
  font-weight: 700;
  font-size: 0.95rem;
}

.dss-accordion .accordion-body {
  font-size: 0.95rem;
  color: var(--dss-muted);
  max-width: none;
}

/* —— Cierre —— */
.dss-footer-band {
  background: var(--dss-bg);
  color: #8b949e;
  padding: 2rem 0;
  font-size: 0.875rem;
}

.dss-footer-band a {
  color: #adbac7;
}

.dss-footer-band a:hover {
  color: #fff;
}

.dss-toplink {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 2000;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--dss-bg);
  color: #fff;
  border: 1px solid var(--dss-line-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.1rem;
  opacity: 0.92;
}

.dss-toplink:hover {
  color: #fff;
  background: var(--dss-accent);
  border-color: var(--dss-accent);
}

/* —— Reveal scroll (solo CSS) —— */
.dss-reveal {
  opacity: 1;
  transform: none;
}

@keyframes dss-reveal-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@supports (animation-timeline: view()) {
  .dss-reveal {
    opacity: 0;
    transform: translateY(22px);
    animation: dss-reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dss-reveal {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
