/* Guías y páginas internas de la nueva web. Comparte el sistema visual de la
   portada: papel crema, tinta azul, tipografía local y tema claro/oscuro. */

.v2-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.v2-breadcrumbs a {
  text-decoration: none;
}

.v2-breadcrumbs a:hover {
  text-decoration: underline;
}

.v2-page-hero {
  padding-block: 28px 56px;
  border-bottom: 1px solid var(--rule);
}

.v2-page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 48px 72px;
}

.v2-page-hero h1 {
  max-width: 18ch;
  margin-bottom: 24px;
  font-size: clamp(2.125rem, 1.65rem + 2.1vw, 3.75rem);
  font-stretch: 112%;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

.v2-page-lead {
  max-width: 45ch;
  margin-bottom: 26px;
  font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  line-height: 1.55;
}

.v2-page-hero .actions {
  align-items: center;
  gap: 12px 24px;
}

.v2-page-note {
  max-width: 60ch;
  margin: 20px 0 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.v2-page-summary {
  align-self: center;
  border-top: 3px solid var(--oro);
  padding-top: 20px;
}

.v2-page-summary > p {
  margin-bottom: 18px;
  color: var(--ink-2);
  font-size: 0.875rem;
}

.v2-page-summary dl {
  margin: 0;
}

.v2-page-summary dl > div {
  padding-block: 16px;
  border-top: 1px solid var(--rule);
}

.v2-page-summary dt {
  margin-bottom: 4px;
  font-size: 0.9375rem;
  font-weight: 700;
}

.v2-page-summary dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.5;
}

.v2-page-preview {
  min-width: 0;
}

.v2-page-preview .shot figcaption {
  font-size: 0.8125rem;
}

.v2-page-preview .window,
.v2-doc-content .window {
  padding-top: 0;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 44px -30px rgba(20, 48, 95, 0.4);
}

.v2-page-preview .window::before,
.v2-doc-content .window::before {
  display: none;
}

.v2-page-preview .window img,
.v2-doc-content .window img {
  border: 0;
  border-radius: 9px;
}

.v2-doc-layout {
  display: grid;
  grid-template-columns: 212px minmax(0, 1fr);
  gap: clamp(40px, 5vw, 80px);
  padding-block: 56px 80px;
  align-items: start;
}

.v2-page-sidebar {
  position: sticky;
  top: 24px;
  max-height: calc(100dvh - 48px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.v2-page-sidebar::-webkit-scrollbar {
  display: none;
}

.v2-page-toc summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  padding-block: 8px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.v2-page-toc summary::-webkit-details-marker {
  display: none;
}

.v2-page-toc summary > span {
  color: var(--azul);
  font-size: 1.125rem;
  font-weight: 400;
}

.v2-page-toc[open] summary > span {
  transform: rotate(45deg);
}

.v2-toc-links {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.v2-toc-links li {
  margin: 0;
}

.v2-toc-links a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.4;
  text-decoration: none;
}

.v2-toc-links a > span:first-child {
  flex: 0 0 20px;
  font: 500 0.6875rem/1.4 var(--font-mono);
  color: var(--azul);
}

.v2-toc-links a:hover,
.v2-toc-links a[aria-current="location"] {
  color: var(--ink);
  background: var(--tint);
}

.v2-doc-content {
  min-width: 0;
  container-type: inline-size;
  counter-reset: chapter;
}

.v2-doc-content > .section {
  padding-block: 44px;
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  counter-increment: chapter;
  scroll-margin-top: 24px;
}

.v2-doc-content > .section:first-child {
  padding-top: 0;
  border-top: 0;
}

.v2-doc-content > .section:last-child {
  padding-bottom: 0;
}

.v2-doc-content > .section > .wrap {
  max-width: none;
  margin: 0;
  padding: 0;
}

.v2-doc-content h2 {
  max-width: 27ch;
  margin-bottom: 26px;
  font-size: clamp(1.625rem, 1.3rem + 1vw, 2.125rem);
  font-stretch: 108%;
  line-height: 1.15;
}

.v2-doc-content > .section h2::before {
  content: counter(chapter, decimal-leading-zero);
  display: block;
  margin-bottom: 14px;
  color: var(--azul);
  font: 600 0.8125rem/1.4 var(--font-mono);
  letter-spacing: 0;
}

.v2-doc-content h3 {
  font-size: 1.1875rem;
  line-height: 1.3;
}

.v2-doc-content p,
.v2-doc-content li,
.v2-doc-content td {
  font-size: 1.0625rem;
}

.v2-doc-content .section-lead {
  max-width: 64ch;
  margin-bottom: 28px;
  font-size: 1.125rem;
}

.v2-doc-content .split {
  gap: 28px 36px;
}

.v2-doc-content .split-media {
  grid-template-columns: minmax(0, 1fr);
}

.v2-doc-content .split > *,
.v2-doc-content .rows > li > *,
.v2-doc-content .stack-code > * {
  min-width: 0;
}

.v2-doc-content .shot {
  max-width: 760px;
}

.v2-doc-content .rows {
  margin-top: 28px;
}

.v2-doc-content .rows > li {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.5fr);
  gap: 10px 32px;
}

.v2-doc-content .verdicts > li {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.v2-doc-content .verdict-word {
  font-size: 1.375rem;
}

.v2-doc-content pre,
.v2-doc-content .term,
.v2-doc-content .table-wrap,
.v2-doc-content .table-scroll {
  max-width: 100%;
  min-width: 0;
}

.v2-doc-content pre,
.v2-doc-content .table-wrap,
.v2-doc-content .table-scroll {
  overflow-x: auto;
}

.v2-doc-content .term {
  padding-top: 48px;
  border-radius: 9px;
  box-shadow: none;
}

.v2-doc-content .term::before {
  height: 48px;
  border-radius: 9px 9px 0 0;
}

.v2-doc-content .term::after {
  content: "Terminal";
  top: 15px;
  left: 18px;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--term-dim);
  font: 500 0.75rem/1.5 var(--font-mono);
}

.v2-doc-content .term pre {
  padding: 18px;
  font-size: 0.8125rem;
}

.v2-doc-content .copy {
  top: 2px;
  min-height: 44px;
  font-size: 0.8125rem;
}

.v2-doc-content .pins {
  font-size: 0.75rem;
}

.v2-doc-content .plain-list {
  padding-left: 1.2em;
}

.v2-doc-content .chat {
  max-width: 100%;
  margin-inline: 0;
}

.v2-source-note {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 2px solid var(--oro);
  background: var(--panel-2);
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.v2-security-details {
  border-block: 1px solid var(--rule);
}

.v2-security-details summary {
  min-height: 56px;
  padding-block: 16px;
  color: var(--link);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
}

.v2-security-details > div {
  padding-block: 12px 24px;
}

.v2-security-details h4 {
  margin: 0;
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.v2-contact {
  padding: 24px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--panel);
}

.v2-contact h3 {
  margin-bottom: 14px;
}

.v2-contact + .v2-contact {
  margin-top: 20px;
}

.v2-contact .btn {
  max-width: 100%;
}

.v2-contact a {
  overflow-wrap: anywhere;
}

.v2-related {
  border-block: 1px solid var(--rule);
  padding-block: 40px;
  background: var(--panel-2);
}

.v2-related-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

.v2-related h2 {
  margin: 0;
  font-size: 1.375rem;
}

.v2-related a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  min-height: 44px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 1.0625rem;
  font-weight: 700;
  text-decoration: none;
}

.v2-related a:hover {
  text-decoration: underline;
}

.v2-related a > span {
  flex: none;
}

@container (max-width: 740px) {
  .v2-doc-content .split,
  .v2-doc-content .rows > li {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 1000px) {
  .v2-page-hero-grid {
    gap: 36px;
  }

  .v2-doc-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 36px;
  }
}

@media (max-width: 800px) {
  .v2-page-hero {
    padding-bottom: 36px;
  }

  .v2-page-hero-grid,
  .v2-doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .v2-page-summary {
    max-width: 600px;
  }

  .v2-page-preview {
    max-width: 480px;
  }

  .v2-doc-layout {
    padding-block: 28px 48px;
    gap: 36px;
  }

  .v2-page-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    border-bottom: 1px solid var(--rule);
  }

  .v2-page-toc summary {
    padding-block: 16px;
    min-height: 56px;
  }

  .v2-toc-links {
    margin: 0 0 16px;
  }

  .v2-related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .v2-page-hero {
    padding-top: 20px;
  }

  .v2-breadcrumbs {
    margin-bottom: 26px;
  }

  .v2-page-hero h1 {
    font-size: 2.125rem;
  }

  .v2-page-lead {
    font-size: 1.125rem;
  }

  .v2-page-hero-grid {
    gap: 28px;
  }

  .v2-doc-content > .section {
    padding-block: 36px;
  }

  .v2-contact {
    padding: 18px;
  }
}

@media print {
  .v2-page-sidebar,
  .v2-related,
  .v2-footer {
    display: none;
  }

  .v2-doc-layout,
  .v2-page-hero-grid {
    display: block;
  }

  .v2-page-hero,
  .v2-doc-layout,
  .v2-doc-content > .section {
    padding-block: 18pt;
  }

  .v2-doc-content .term::after {
    display: none;
  }
}
