/* ================================================================
   Guía — cómo dibujar en cuadrícula
   ================================================================ */

.page-gutter {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ---------- Breadcrumb ---------- */

.crumbs {
  padding-top: clamp(14px, 2vw, 22px);
}

.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.crumbs li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.crumbs li + li::before {
  content: "/";
  color: var(--rule-strong);
}

.crumbs a {
  padding-block: 4px;
  border-bottom: 1px solid transparent;
  transition: color 180ms ease, border-color 180ms ease;
}

.crumbs a:hover {
  color: var(--ink);
  border-color: var(--ink);
}

.crumbs [aria-current="page"] {
  color: var(--ink);
}

/* ---------- Hero ---------- */

.guide-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.72fr);
  gap: clamp(38px, 6vw, 90px);
  align-items: center;
  padding-top: clamp(24px, 3.4vw, 46px);
  padding-bottom: clamp(46px, 6vw, 82px);
}

.guide-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-faint);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-eyebrow .dot-red {
  width: 6px;
  height: 6px;
}

.guide-hero h1 {
  max-width: 12ch;
  margin-top: 14px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(50px, 6vw, 86px);
  font-weight: 680;
  font-stretch: 81%;
  line-height: 0.86;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.guide-lede {
  max-width: 48ch;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.55;
  letter-spacing: -0.008em;
}

.guide-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 15px 24px;
  margin-top: 26px;
}

.guide-meta {
  margin-top: 26px;
  padding-top: 12px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 9.5px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.guide-cover {
  position: relative;
  width: min(100%, 420px);
  margin: 0 0 0 auto;
  padding-top: 12px;
}

.guide-cover__tab {
  position: absolute;
  top: -6px;
  left: 18px;
  z-index: 2;
  display: flex;
  gap: 13px;
  padding: 8px 11px;
  background: var(--ink);
  color: var(--paper-2);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-cover__tab strong {
  color: var(--red-light);
  font-weight: 500;
}

.guide-cover__frame {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  padding: 18px;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  box-shadow: 14px 16px 0 rgba(23, 23, 19, 0.06);
}

.guide-cover__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guide-cover figcaption {
  margin-top: 14px;
  padding-top: 9px;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: uppercase;
}

/* ---------- Layout ---------- */

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
  padding-bottom: clamp(60px, 7vw, 100px);
}

.guide-body {
  min-width: 0;
  max-width: 780px;
  padding-top: 4px;
}

.guide-intro {
  padding-bottom: clamp(30px, 4vw, 46px);
  color: var(--ink);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.55;
  letter-spacing: -0.012em;
}

.guide-body section {
  padding: clamp(30px, 4vw, 46px) 0;
  border-top: 1px solid var(--rule);
}

.guide-kicker {
  color: var(--red-deep);
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.guide-body h2 {
  margin-top: 9px;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(33px, 3.4vw, 48px);
  font-weight: 670;
  font-stretch: 83%;
  line-height: 0.95;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.guide-body h3 {
  margin-top: 22px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 650;
  font-stretch: 84%;
  line-height: 1;
  letter-spacing: -0.035em;
}

.guide-body p:not(.guide-kicker):not(.guide-note) {
  max-width: 68ch;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

.guide-list {
  max-width: 68ch;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.guide-list li {
  padding: 13px 0 13px 24px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
}

.guide-list li strong {
  color: var(--ink);
  font-weight: 650;
}

.guide-list li::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 12px;
  margin-left: -24px;
  background: var(--red-deep);
  vertical-align: 2px;
}

.guide-list--warnings li::before {
  content: "—";
  width: auto;
  height: auto;
  margin-right: 10px;
  background: transparent;
  color: var(--red-deep);
  font-family: var(--mono);
  font-weight: 700;
  vertical-align: 1px;
}

.guide-note {
  max-width: 68ch;
  margin-top: 18px;
  padding-left: 13px;
  border-left: 2px solid var(--red-deep);
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.6;
}

.guide-note strong {
  color: var(--ink);
}

/* ---------- Tables ---------- */

.guide-table-wrap {
  margin-top: 22px;
  overflow-x: auto;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  line-height: 1.45;
}

.guide-table:not(.guide-table--sizes) th:first-child {
  width: 52px;
}

.guide-table:not(.guide-table--sizes) th:nth-child(2) {
  width: 150px;
}

.guide-table--sizes {
  min-width: 620px;
}

.guide-table-hint {
  display: none;
  margin-top: 8px;
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.guide-table th,
.guide-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: middle;
}

.guide-table thead th {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.guide-table tbody th {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.guide-table tbody tr:last-child th,
.guide-table tbody tr:last-child td {
  border-bottom: 0;
}

.guide-table td:nth-child(2) {
  color: var(--ink);
  white-space: nowrap;
}

.guide-table td:last-child {
  color: var(--ink-soft);
}

.guide-table a {
  border-bottom: 1px solid var(--rule-strong);
  color: var(--ink);
}

.guide-table a:hover {
  color: var(--red-deep);
  border-color: var(--red-deep);
}

.guide-table--sizes td:nth-child(2),
.guide-table--sizes td:nth-child(3),
.guide-table--sizes td:nth-child(4) {
  font-family: var(--mono);
  font-size: 11px;
  white-space: nowrap;
}

.guide-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 1px solid var(--rule);
  background: var(--paper-2);
  vertical-align: middle;
}

.guide-swatch svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.4;
}

.guide-swatch--empty {
  background: var(--paper-2);
}

.guide-swatch--block {
  background: var(--ink);
}

/* ---------- Steps ---------- */

.guide-steps {
  max-width: 68ch;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-steps li {
  position: relative;
  padding: 14px 0 14px 42px;
  border-top: 1px solid var(--rule);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  counter-increment: guide-step;
}

.guide-steps li:last-child {
  border-bottom: 1px solid var(--rule);
}

.guide-steps li::before {
  content: counter(guide-step, decimal-leading-zero);
  position: absolute;
  top: 15px;
  left: 0;
  color: var(--red-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.guide-steps strong {
  color: var(--ink);
  font-weight: 650;
}

.guide-pullquote {
  max-width: 68ch;
  margin-top: 26px;
  padding: 22px 24px;
  border-left: 3px solid var(--red-deep);
  background: var(--paper-2);
}

.guide-pullquote p {
  max-width: 32ch !important;
  margin: 0 !important;
  color: var(--ink) !important;
  font-family: var(--display);
  font-size: clamp(23px, 2.4vw, 30px) !important;
  font-weight: 650;
  font-stretch: 84%;
  line-height: 1.05 !important;
  letter-spacing: -0.035em;
}

/* ---------- FAQ ---------- */

.guide-faq {
  max-width: 68ch;
  margin-top: 22px;
  border-top: 1px solid var(--ink);
}

.guide-faq details {
  border-bottom: 1px solid var(--rule);
}

.guide-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  cursor: pointer;
  list-style: none;
}

.guide-faq summary::-webkit-details-marker {
  display: none;
}

.guide-faq summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--red-deep);
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.guide-faq details[open] summary::after {
  content: "−";
}

.guide-faq p {
  max-width: 64ch !important;
  padding: 0 32px 16px 0;
  color: var(--ink-soft) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* ---------- CTA ---------- */

.guide-cta {
  margin-top: 10px;
  padding: clamp(28px, 4vw, 44px);
  background: var(--ink);
  color: var(--paper-2);
}

.guide-cta .guide-kicker {
  color: var(--red-light);
}

.guide-cta h2 {
  margin-top: 10px;
  color: var(--paper-2);
  font-family: var(--display);
  font-size: clamp(38px, 4.4vw, 58px);
  font-weight: 670;
  font-stretch: 82%;
  line-height: 0.92;
  letter-spacing: -0.05em;
}

.guide-cta > p:not(.guide-kicker) {
  max-width: 48ch;
  margin-top: 15px;
  color: rgba(251, 248, 241, 0.7);
  font-size: 13.5px;
  line-height: 1.6;
}

.guide-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  margin-top: 24px;
}

.guide-cta .button--ink {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.guide-cta .button--ink:hover {
  background: var(--paper-2);
  border-color: var(--paper-2);
  color: var(--ink);
}

.guide-cta .text-link {
  color: var(--paper-2);
  border-color: rgba(251, 248, 241, 0.4);
}

.guide-cta .text-link:hover {
  color: var(--red-light);
  border-color: var(--red-light);
}

/* ---------- Aside ---------- */

.guide-aside {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 26px;
  min-width: 0;
}

.guide-toc {
  padding-top: 12px;
  border-top: 1px solid var(--ink);
}

.guide-toc > p {
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-toc ol {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}

.guide-toc li {
  counter-increment: toc;
  border-bottom: 1px solid var(--rule);
}

.guide-toc a {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 8px 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  transition: color 160ms ease;
}

.guide-toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
}

.guide-toc a:hover {
  color: var(--red-deep);
}

.guide-aside__download {
  position: relative;
  padding: 18px;
  background: var(--ink);
  color: var(--paper-2);
}

.guide-aside__download::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(251, 248, 241, 0.16);
  pointer-events: none;
}

.guide-aside__download > p {
  color: var(--red-light);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.guide-aside__download strong {
  display: block;
  margin-top: 10px;
  font-family: var(--display);
  font-size: 34px;
  font-weight: 660;
  font-stretch: 83%;
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.guide-aside__download > span {
  display: block;
  margin-top: 7px;
  color: rgba(251, 248, 241, 0.55);
  font-size: 8.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.button--download {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 0 14px;
  border: 1px solid var(--red);
  background: var(--red);
  color: #fff;
  font-family: var(--body);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.2;
  transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.button--download svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button--download:hover {
  border-color: var(--paper-2);
  background: var(--paper-2);
  color: var(--ink);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .guide-hero {
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.7fr);
    gap: 40px;
  }

  .guide-cover {
    width: min(100%, 360px);
  }
}

@media (max-width: 980px) {
  .guide-hero {
    grid-template-columns: 1fr;
    gap: 42px;
    padding-top: 24px;
  }

  .guide-cover {
    width: min(100%, 480px);
    margin-inline: auto;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .guide-body {
    max-width: none;
  }

  .guide-aside {
    position: static;
    order: -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.72fr);
    gap: 30px;
    align-items: start;
  }

  .guide-toc {
    min-width: 0;
  }

  .guide-toc ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }

  .guide-aside__download {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .guide-hero h1 {
    font-size: clamp(38px, 12vw, 60px);
  }

  .guide-lede {
    margin-top: 17px;
  }

  .guide-aside {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .guide-toc ol {
    grid-template-columns: 1fr;
  }

  .guide-aside__download {
    width: min(100%, 360px);
  }

  .guide-body h2 {
    font-size: clamp(30px, 8.4vw, 40px);
  }

  .guide-table {
    font-size: 12px;
  }

  .guide-table th,
  .guide-table td {
    padding-right: 9px;
  }

  .guide-table:not(.guide-table--sizes) th:first-child {
    width: 40px;
  }

  .guide-table:not(.guide-table--sizes) th:nth-child(2) {
    width: 112px;
  }

  .guide-table:not(.guide-table--sizes) td:nth-child(2) {
    white-space: normal;
  }

  .guide-table-hint {
    display: block;
  }

  .guide-steps li {
    padding-left: 35px;
  }

  .guide-cta {
    padding: 24px 20px;
  }

  .guide-cta__actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .guide-cta__actions .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .guide-hero h1 {
    font-size: 34px;
  }

  .guide-swatch {
    width: 24px;
    height: 24px;
  }
}

@media print {
  .site-header,
  .mobile-nav,
  .crumbs,
  .guide-cover,
  .guide-aside,
  .guide-hero__actions,
  .guide-meta,
  .guide-cta,
  .site-footer,
  .skip-link,
  .download-toast {
    display: none !important;
  }

  .guide-hero {
    display: block;
    padding: 0;
  }

  .guide-layout {
    display: block;
    padding: 0;
  }

  .guide-body {
    max-width: none;
  }

  .guide-body section {
    padding: 18pt 0;
  }

  .page-gutter {
    padding-inline: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
