/* Ninely Strategy Hub & Guide Styles */
:root {
  --guide-bg: #0c1a14;
  --guide-card: #13271e;
  --guide-border: rgba(242, 201, 76, 0.25);
  --cell-bg: #1c3529;
  --cell-fixed: #0f2118;
  --cell-target: #f59e0b;
  --cell-highlight: rgba(56, 189, 248, 0.25);
  --candidate-dim: #94a3b8;
  --candidate-elim: #ef4444;
  --candidate-keep: #10b981;
}

.strategy-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 900px) {
  .guide-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 28px;
    align-items: start;
  }
}

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

.guide-meta {
  font-size: 0.9rem;
  color: var(--dim);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.guide-section {
  background: var(--guide-card);
  border: 1px solid var(--guide-border);
  border-radius: 12px;
  padding: 20px;
  margin: 18px 0;
  line-height: 1.65;
}

.guide-section h2 {
  color: var(--gold);
  margin-top: 0;
  font-size: 1.3rem;
  border-bottom: 1px solid rgba(242, 201, 76, 0.15);
  padding-bottom: 6px;
}

.guide-section h3 {
  color: #a7f3d0;
  font-size: 1.1rem;
  margin: 14px 0 6px;
}

/* Static & Interactive Boards */
.board-wrapper {
  margin: 16px 0;
  text-align: center;
}

.diagram-board {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr)); /* cells shrink on 320 px phones (WCAG 1.4.10) */
  gap: 1px;
  background: #064e3b;
  border: 3px solid #042719;
  border-radius: 8px;
  margin: 12px auto;
  max-width: 360px;
  aspect-ratio: 1;
  padding: 2px;
}

.diagram-cell {
  background: var(--cell-bg);
  color: #fff;
  font-size: 1.1rem;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  position: relative;
  aspect-ratio: 1;
}

.diagram-cell.fixed {
  background: var(--cell-fixed);
  color: #94a3b8;
}

.diagram-cell.target {
  background: var(--cell-target);
  color: #000;
  font-weight: 800;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
}

.diagram-cell.highlight {
  background: var(--cell-highlight);
  outline: 2px dashed #38bdf8;
  outline-offset: -2px;
}

.diagram-cell.danger {
  background: rgba(239, 68, 68, 0.25);
  outline: 2px solid #ef4444;
  outline-offset: -2px;
}

.diagram-cell:nth-child(3n) { border-right: 2px solid #34d399; }
.diagram-cell:nth-child(9n) { border-right: none; }
.diagram-cell:nth-child(n+19):nth-child(-n+27),
.diagram-cell:nth-child(n+46):nth-child(-n+54) { border-bottom: 2px solid #34d399; }

/* Mini Candidate Grid inside a cell */
.candidates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  padding: 2px;
  font-size: 0.65rem;
  line-height: 1;
}

.cand-num {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--candidate-dim);
}

.cand-num.keep {
  color: #10b981;
  font-weight: 900;
  font-size: 0.8rem;
}

.cand-num.elim {
  color: #ef4444;
  text-decoration: line-through;
  opacity: 0.7;
}

/* Step controls */
.step-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
}

.step-btn {
  background: rgba(242, 201, 76, 0.2);
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 6px;
  padding: 6px 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.15s;
}

.step-btn:hover:not(:disabled) {
  background: var(--gold);
  color: #000;
}

.step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.step-indicator {
  font-size: 0.9rem;
  color: var(--dim);
}

/* Callout Box */
.wrong-move-box {
  background: rgba(239, 68, 68, 0.12);
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}

.wrong-move-box h3, .wrong-move-box h4 {
  color: #fca5a5;
  margin: 0 0 6px;
  font-size: 1rem;
}

.tip-box {
  background: rgba(16, 185, 129, 0.12);
  border-left: 4px solid #10b981;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
}

.tip-box h3, .tip-box h4 {
  color: #6ee7b7;
  margin: 0 0 6px;
  font-size: 1rem;
}

/* Ad Rails & Placeholders */
.ad-slot-container {
  margin: 20px 0;
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #64748b;
  margin-bottom: 4px;
}

.ad-placeholder {
  min-height: 250px;
  min-width: 280px;
  max-width: 336px;
  margin: 0 auto;
  border: 1px dashed rgba(242, 201, 76, 0.25);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 0.8rem;
  padding: 12px;
}

.ad-rail {
  position: static;
}

/* Practice CTA bar */
.practice-cta {
  background: linear-gradient(135deg, rgba(14, 107, 67, 0.5) 0%, rgba(7, 64, 42, 0.8) 100%);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  margin: 28px 0;
}

.practice-cta h3 {
  color: var(--gold);
  margin: 0 0 8px;
}

.cta-btn {
  display: inline-block;
  background: var(--gold);
  color: #042719;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 10px 22px;
  border-radius: 8px;
  margin-top: 10px;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s;
}

.cta-btn:hover {
  background: var(--gold-hover);
  text-decoration: none;
  transform: translateY(-2px);
}

.diagram-board .diagram-cell { min-width: 0; overflow: hidden; }
