/* Guías del panel — layout didáctico + snippets inertes (no funcionales) */
.guide-page {
  --g-max: 72rem;
  --g-rail: 15rem;
  --g-snip-bg: var(--panel-surface);
  --g-snip-chrome: var(--panel-surface-2);
  --g-callout: var(--panel-accent-soft);
  max-width: var(--g-max);
  margin: 0 auto 2.5rem;
}

.guide-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.guide-hero h1 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 .35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  /* style.css legacy: h1 { color:#fff } */
  color: var(--panel-text) !important;
}

.guide-hero__sub {
  margin: 0;
  color: var(--panel-muted);
  max-width: 40rem;
  line-height: 1.45;
}

.guide-layout {
  display: grid;
  grid-template-columns: var(--g-rail) minmax(0, 1fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.guide-toc {
  position: sticky;
  top: .75rem;
  padding: .85rem 1rem;
  border-radius: var(--panel-radius);
  background: var(--panel-surface);
  border: 1px solid var(--panel-border);
  font-size: .88rem;
}

.guide-toc__title {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--panel-muted) !important;
  margin: 0 0 .55rem;
  font-weight: 700;
}

.guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: gtoc;
}

.guide-toc li {
  margin: 0;
}

/* style.css legacy: nav li a { color:#fff !important } — pisa el TOC en light */
.guide-toc a,
.guide-toc li a {
  display: flex;
  gap: .5rem;
  align-items: baseline;
  padding: .35rem 0;
  color: var(--panel-text) !important;
  text-decoration: none;
  border-radius: 6px;
  line-height: 1.3;
}

.guide-toc a::before,
.guide-toc li a::before {
  counter-increment: gtoc;
  content: counter(gtoc);
  flex: 0 0 1.25rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--panel-accent-soft);
  color: var(--panel-accent) !important;
}

.guide-toc a:hover,
.guide-toc li a:hover {
  color: var(--panel-accent) !important;
}

html[data-theme="light"] .guide-toc a,
html[data-theme="light"] .guide-toc li a {
  color: #1c1c1a !important;
}

html[data-theme="light"] .guide-toc a:hover,
html[data-theme="light"] .guide-toc li a:hover {
  color: #1f5fbf !important;
}

html[data-theme="light"] .guide-toc__title {
  color: #6b6b66 !important;
}

html[data-theme="light"] .guide-hero h1 {
  color: #1c1c1a !important;
}

.guide-article {
  min-width: 0;
}

.guide-section {
  margin: 0 0 2.25rem;
  scroll-margin-top: 1rem;
}

.guide-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  letter-spacing: -.01em;
  color: var(--panel-text) !important;
}

.guide-section > p,
.guide-prose p {
  color: var(--panel-muted);
  line-height: 1.55;
  margin: 0 0 .85rem;
  max-width: 42rem;
}

.guide-prose strong {
  color: var(--panel-text);
  font-weight: 600;
}

.guide-callout {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .85rem 1rem;
  border-radius: 10px;
  background: var(--g-callout);
  border: 1px solid var(--panel-border);
  margin: 0 0 1rem;
  max-width: 42rem;
  font-size: .92rem;
  line-height: 1.45;
}

.guide-callout--tip { --g-callout: rgba(56, 180, 74, 0.12); }
.guide-callout--warn { --g-callout: rgba(239, 183, 62, 0.14); }
.guide-callout--info { --g-callout: var(--panel-accent-soft); }

.guide-callout i {
  margin-top: .15rem;
  color: var(--panel-accent);
  flex: 0 0 auto;
}

.guide-callout--tip i { color: #38b44a; }
.guide-callout--warn i { color: #d4a017; }

.guide-callout p { margin: 0; color: var(--panel-text); }

.guide-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  max-width: 42rem;
  counter-reset: gstep;
}

.guide-steps li {
  position: relative;
  padding: .35rem 0 .35rem 2rem;
  color: var(--panel-muted);
  line-height: 1.45;
  counter-increment: gstep;
}

.guide-steps li::before {
  content: counter(gstep);
  position: absolute;
  left: 0;
  top: .4rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-accent-soft);
  color: var(--panel-accent);
}

.guide-steps strong { color: var(--panel-text); }

/* —— Snippet “captura” inerte —— */
.guide-snip {
  margin: 0 0 1.25rem;
  border-radius: 14px;
  border: 1px solid var(--panel-border);
  background: var(--g-snip-bg);
  box-shadow: var(--panel-shadow);
  overflow: hidden;
  max-width: 36rem;
}

.guide-snip--wide { max-width: 48rem; }

.guide-snip__chrome {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem .85rem;
  background: var(--g-snip-chrome);
  border-bottom: 1px solid var(--panel-border);
  font-size: .75rem;
  color: var(--panel-muted);
  user-select: none;
}

.guide-snip__dots {
  display: flex;
  gap: .28rem;
}

.guide-snip__dots span {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: rgba(128, 128, 128, 0.35);
}

.guide-snip__dots span:nth-child(1) { background: #ff5f57; }
.guide-snip__dots span:nth-child(2) { background: #febc2e; }
.guide-snip__dots span:nth-child(3) { background: #28c840; }

.guide-snip__label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guide-snip__badge {
  flex: 0 0 auto;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem .4rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.18);
  color: var(--panel-muted);
}

.guide-snip__stage {
  padding: 1rem;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.guide-snip__stage * {
  pointer-events: none !important;
  cursor: default !important;
}

.guide-snip__cap {
  margin: 0;
  padding: .65rem .9rem .85rem;
  font-size: .85rem;
  color: var(--panel-muted);
  line-height: 1.4;
  border-top: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .guide-snip__cap {
  background: rgba(255, 255, 255, 0.03);
}

.guide-snip__cap strong {
  color: var(--panel-text);
  font-weight: 600;
}

/* Piezas visuales del mock (gs-*) */
.gs-dropzone {
  border: 2px dashed rgba(128, 128, 128, 0.45);
  border-radius: 12px;
  padding: 1.75rem 1rem;
  text-align: center;
  background: rgba(128, 128, 128, 0.06);
}

.gs-dropzone__title {
  margin: 0 0 .25rem;
  font-weight: 600;
  font-size: .95rem;
  color: var(--panel-text);
}

.gs-dropzone__sub {
  margin: 0;
  font-size: .8rem;
  color: var(--panel-muted);
}

.gs-card {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel-surface);
  padding: .65rem;
}

.gs-card.is-alert {
  border-color: #ffc107;
  box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.35);
}

.gs-card__img {
  height: 120px;
  border-radius: 8px;
  margin-bottom: .55rem;
  background:
    radial-gradient(circle at 30% 40%, rgba(160, 90, 255, 0.35), transparent 45%),
    radial-gradient(circle at 70% 55%, rgba(80, 180, 255, 0.25), transparent 40%),
    linear-gradient(145deg, #1a1a22 0%, #2a2238 45%, #121218 100%);
  position: relative;
  overflow: hidden;
}

.gs-card__img::before,
.gs-card__img::after {
  content: "";
  position: absolute;
  background: rgba(240, 240, 245, 0.12);
  border: 1px solid rgba(240, 240, 245, 0.28);
}

.gs-card__img::before {
  left: 14%;
  top: 38%;
  width: 48%;
  height: 28%;
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(160, 90, 255, 0.35);
}

.gs-card__img::after {
  right: 16%;
  top: 42%;
  width: 18%;
  height: 22%;
  border-radius: 50% 50% 45% 45%;
  box-shadow: 0 0 14px rgba(80, 180, 255, 0.35);
}

.gs-badge {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: #6c757d;
  color: #fff;
  margin-right: .25rem;
}

.gs-badge--ok { background: #38b44a; }
.gs-badge--warn { background: #efb73e; color: #222; }
.gs-badge--info { background: #17a2b8; }

.gs-field {
  margin-bottom: .4rem;
}

.gs-field label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: .1rem;
  color: var(--panel-text);
}

.gs-field .gs-input,
.gs-field .gs-select,
.gs-field .gs-area {
  display: block;
  width: 100%;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: .3rem .5rem;
  font-size: .8rem;
  background: var(--panel-surface-2);
  color: var(--panel-text);
  min-height: 1.9rem;
}

.gs-field .gs-area {
  min-height: 2.6rem;
  white-space: pre-wrap;
}

.gs-field .gs-input.is-empty {
  color: var(--panel-muted);
}

.gs-field .gs-input.is-focus {
  outline: 2px solid var(--panel-accent);
  outline-offset: 0;
  border-color: var(--panel-accent);
}

.gs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}

.gs-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: .45rem;
}

.gs-btn {
  display: inline-block;
  font-size: .72rem;
  padding: .25rem .55rem;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  background: var(--panel-action-bg);
  color: var(--panel-text);
}

.gs-btn--primary {
  background: var(--panel-accent);
  border-color: transparent;
  color: #fff;
}

html[data-theme="light"] .gs-btn--primary { color: #fff; }

.gs-btn--danger {
  color: #df382c;
  border-color: rgba(223, 56, 44, 0.35);
}

.gs-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  padding: .55rem .65rem;
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  background: var(--panel-surface-2);
}

.gs-toolbar .gs-muted {
  font-size: .78rem;
  color: var(--panel-muted);
  margin-right: .25rem;
}

.gs-dupe {
  margin: .4rem 0 .55rem;
  padding: .4rem .55rem;
  border-radius: 8px;
  border: 1px solid #ffc107;
  background: rgba(255, 248, 225, 0.95);
  font-size: .75rem;
  color: #333;
}

html[data-theme="dark"] .gs-dupe {
  background: rgba(80, 60, 10, 0.45);
  color: #f5e6b8;
  border-color: rgba(255, 193, 7, 0.5);
}

/* Hub de cartas */
.guide-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1rem;
}

.guide-hub-card {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: 1.1rem 1.15rem;
  border-radius: var(--panel-radius);
  background: var(--panel-surface);
  border: 1px solid var(--panel-border);
  text-decoration: none !important;
  color: var(--panel-text) !important;
  transition: border-color .15s, transform .15s;
  min-height: 8.5rem;
}

.guide-hub-card:hover {
  border-color: var(--panel-accent);
  transform: translateY(-2px);
}

.guide-hub-card.is-soon {
  opacity: .72;
  cursor: default;
}

.guide-hub-card.is-soon:hover {
  transform: none;
  border-color: var(--panel-border);
}

.guide-hub-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel-accent-soft);
  color: var(--panel-accent);
}

.guide-hub-card h2 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 700;
}

.guide-hub-card p {
  margin: 0;
  font-size: .88rem;
  color: var(--panel-muted);
  line-height: 1.4;
  flex: 1;
}

.guide-hub-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
}

.guide-tag {
  font-size: .68rem;
  font-weight: 600;
  padding: .12rem .4rem;
  border-radius: 999px;
  background: rgba(128, 128, 128, 0.15);
  color: var(--panel-muted);
}

.guide-tag--ready {
  background: rgba(56, 180, 74, 0.18);
  color: #38b44a;
}

.guide-tag--soon {
  background: rgba(128, 128, 128, 0.18);
  color: var(--panel-muted);
}

.guide-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-border);
}

@media (max-width: 900px) {
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .guide-toc {
    position: static;
  }

  .guide-toc ol {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
  }

  .guide-toc a {
    padding: .2rem 0;
  }
}

@media (max-width: 520px) {
  .gs-row { grid-template-columns: 1fr; }
  .guide-snip__stage { padding: .75rem; }
  .gs-card__img { height: 100px; }
}
