/* guide.css - styles for vibecoding.html (guide page)
 * Loaded in addition to styles.css on vibecoding.html only.
 */

    /* ================================================
       Guide page — vibecoding.html
       ================================================ */

    body.guide-body {
      overflow: hidden;
      background: var(--bg-page);
      /* Allow text selection in the guide content */
      user-select: text;
      -webkit-user-select: text;
    }

    .guide-wrap {
      margin-left: var(--nav-width);
      margin-top: var(--banner-h, 0px);
      max-width: 720px;
      height: calc(100vh - var(--banner-h, 0px));
      overflow-y: auto;
      overflow-x: hidden;
      scroll-behavior: smooth;
      overscroll-behavior: contain;
      transition: margin-top 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                  height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .guide-hero {
      padding: 64px 48px 44px;
      border-bottom: 1px solid var(--border);
    }

    .guide-hero-tag {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 10px;
      background: rgba(249, 115, 22, 0.12);
      border: 1px solid rgba(249, 115, 22, 0.25);
      border-radius: 20px;
      font-size: 11px;
      font-weight: 700;
      color: #f97316;
      margin-bottom: 20px;
      text-transform: uppercase;
      letter-spacing: 0.07em;
    }

    .guide-hero h1 {
      font-size: 34px;
      font-weight: 800;
      line-height: 1.15;
      letter-spacing: -0.02em;
      color: var(--text-primary);
      margin-bottom: 14px;
    }

    .guide-hero-desc {
      font-size: 15px;
      color: var(--text-secondary);
      line-height: 1.65;
      margin-bottom: 24px;
      text-align: justify;
      hyphens: auto;
    }

    .guide-hero-meta {
      display: flex;
      gap: 20px;
      flex-wrap: wrap;
      margin-bottom: 32px;
    }

    .guide-hero-meta-item {
      font-size: 12px;
      color: var(--text-muted);
    }

    .guide-hero-meta-item strong {
      color: var(--text-secondary);
    }

    /* Module overview table */
    .guide-overview-table {
      border: 1px solid var(--border);
      border-radius: 10px;
      overflow: hidden;
    }

    .guide-overview-row {
      display: flex;
      align-items: flex-start;
      gap: 14px;
      padding: 11px 16px;
      border-bottom: 1px solid var(--border);
      font-size: 13px;
      text-decoration: none;
      transition: background var(--trans-fast);
      cursor: pointer;
    }

    .guide-overview-row:last-child {
      border-bottom: none;
    }

    .guide-overview-row:hover {
      background: rgba(255,255,255,0.03);
    }

    .guide-overview-num {
      width: 22px;
      height: 22px;
      border-radius: 50%;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 800;
      margin-top: 0;
      color: #000;
    }

    .guide-overview-title {
      font-weight: 600;
      color: var(--text-primary);
      flex: 0 0 180px;
      line-height: 1.4;
    }

    .guide-overview-result {
      color: var(--text-muted);
      font-size: 12px;
      flex: 1;
      line-height: 1.4;
    }

    /* Main content */
    .guide-content {
      padding: 0 48px 80px;
    }

    /* Module sections */
    .guide-module {
      margin-top: 56px;
      padding-top: 56px;
      border-top: 1px solid var(--border);
      scroll-margin-top: 20px;
    }

    .guide-module:first-child {
      margin-top: 40px;
      border-top: none;
    }

    .guide-module-header {
      display: flex;
      align-items: flex-start;
      gap: 16px;
      margin-bottom: 28px;
    }

    .guide-module-number {
      width: 36px;
      height: 36px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      font-weight: 800;
      flex-shrink: 0;
      color: #000;
    }

    .guide-module-title-block {}

    .guide-module-label {
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.12em;
      color: var(--text-muted);
      margin-bottom: 4px;
    }

    .guide-module-title {
      font-size: 22px;
      font-weight: 700;
      letter-spacing: -0.01em;
      color: var(--text-primary);
      line-height: 1.2;
    }

    .guide-module-subtitle {
      font-size: 13px;
      color: var(--text-secondary);
      margin-top: 5px;
      line-height: 1.5;
    }

    /* Sub-sections */
    .guide-section {
      margin-top: 30px;
      scroll-margin-top: 20px;
    }

    .guide-section-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 10px;
    }

    .guide-p {
      font-size: 14px;
      line-height: 1.75;
      color: var(--text-secondary);
      margin-bottom: 12px;
      text-align: justify;
      hyphens: auto;
    }

    .guide-p strong {
      color: var(--text-primary);
      font-weight: 600;
    }

    .guide-p code {
      font-family: var(--font-mono);
      font-size: 12px;
      background: rgba(255,255,255,0.08);
      padding: 2px 6px;
      border-radius: 4px;
      color: #c9d1d9;
    }

    /* Lists */
    .guide-list {
      list-style: none;
      margin: 10px 0 14px;
      padding: 0;
    }

    .guide-list li {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.65;
      padding: 3px 0 3px 20px;
      position: relative;
    }

    .guide-list li::before {
      content: '·';
      position: absolute;
      left: 6px;
      color: var(--text-muted);
      font-size: 18px;
      line-height: 1.3;
    }

    .guide-list.numbered {
      counter-reset: guide-counter;
    }

    .guide-list.numbered li {
      counter-increment: guide-counter;
      padding-left: 26px;
    }

    .guide-list.numbered li::before {
      content: counter(guide-counter) '.';
      font-size: 11px;
      font-weight: 700;
      color: var(--text-muted);
      left: 0;
      top: 5px;
      font-family: var(--font-mono);
    }

    /* Tables */
    .guide-table-wrap {
      overflow-x: auto;
      margin: 14px 0 18px;
      border-radius: 10px;
      border: 1px solid var(--border);
    }

    .guide-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 13px;
    }

    .guide-table th {
      padding: 9px 14px;
      text-align: left;
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      color: var(--text-muted);
      background: rgba(255,255,255,0.03);
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
    }

    .guide-table td {
      padding: 9px 14px;
      color: var(--text-secondary);
      border-bottom: 1px solid var(--border);
      vertical-align: top;
      line-height: 1.5;
    }

    .guide-table td strong {
      color: var(--text-primary);
      font-weight: 600;
    }

    .guide-table tr:last-child td {
      border-bottom: none;
    }

    .guide-table tr:hover td {
      background: rgba(255,255,255,0.02);
    }

    /* Code blocks */
    .guide-code {
      background: rgba(255,255,255,0.04);
      border: 1px solid var(--border);
      border-left: 3px solid rgba(255,255,255,0.12);
      border-radius: 0 8px 8px 0;
      padding: 14px 16px;
      font-family: var(--font-mono);
      font-size: 12px;
      line-height: 1.65;
      color: #c9d1d9;
      overflow-x: auto;
      margin: 12px 0 16px;
      white-space: pre;
    }

    /* Callout — CTA / "На практикуме" */
    .guide-callout {
      border-left: 3px solid rgba(249, 115, 22, 0.6);
      background: rgba(249, 115, 22, 0.06);
      padding: 12px 16px;
      border-radius: 0 8px 8px 0;
      margin: 18px 0;
    }

    .guide-callout p {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin: 0;
    }

    /* Practice block */
    .guide-practice {
      border: 1px solid rgba(59, 130, 246, 0.22);
      background: rgba(59, 130, 246, 0.05);
      border-radius: 8px;
      padding: 12px 16px;
      margin: 16px 0;
    }

    .guide-practice-label {
      font-size: 9px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.09em;
      color: #3b82f6;
      margin-bottom: 5px;
    }

    .guide-practice p {
      font-size: 13px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin: 0;
    }

    /* Final CTA block */
    .guide-cta-block {
      margin: 56px 0 0;
      padding: 28px 32px;
      background: rgba(249, 115, 22, 0.07);
      border: 1px solid rgba(249, 115, 22, 0.18);
      border-radius: 14px;
    }

    .guide-cta-block h2 {
      font-size: 22px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 8px;
    }

    .guide-cta-block p {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 20px;
    }

    .guide-cta-btn {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 11px 22px;
      background: #f97316;
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      border-radius: 10px;
      text-decoration: none;
      transition: background var(--trans-fast), transform var(--trans-fast);
      font-family: var(--font);
    }

    .guide-cta-btn:hover {
      background: #ea6c0e;
      transform: translateY(-1px);
    }

    /* Resources section */
    .guide-resources {
      margin-top: 48px;
      padding-top: 40px;
      border-top: 1px solid var(--border);
    }

    .guide-resources h2 {
      font-size: 18px;
      font-weight: 700;
      color: var(--text-primary);
      margin-bottom: 14px;
    }

    /* Mobile — guide + nav */
    @media (max-width: 768px) {
      .nav-toggle {
        display: flex;
      }

      /* Hide hamburger when a panel is open to prevent overlap */
      body.panel-open .nav-toggle,
      body.detail-open .nav-toggle {
        display: none;
      }

      .left-nav {
        transform: translateX(-100%);
        transition: transform 0.25s ease-out;
        z-index: 1100;
      }

      .left-nav.open {
        transform: translateX(0);
      }

      /* Push brand down so hamburger (X) doesn't overlap "by @jmurdasov" */
      .left-nav .left-nav-brand {
        padding-top: 56px;
      }

      /* Safe area bottom padding for footer buttons (iOS home indicator) */
      .left-nav .left-nav-footer {
        padding-bottom: max(20px, env(safe-area-inset-bottom, 20px));
      }

      .guide-wrap {
        margin-left: 0;
        height: calc(100vh - var(--banner-h, 0px));
      }

      .guide-hero {
        padding: 68px 20px 28px;
      }

      .guide-content {
        padding: 0 20px 60px;
      }

      .guide-hero h1 {
        font-size: 28px;
      }

      .guide-overview-result {
        display: none;
      }

      body.has-nav #grade-legend {
        left: 24px;
      }

      body.has-nav #map-label {
        left: 50%;
        transform: translateX(-50%);
        padding-left: 48px;
      }

      body.has-nav #zoom-indicator {
        left: 50%;
        transform: translateX(-50%);
      }
    }

    /* ================================================
       LIGHT THEME — body.theme-light
       Dark theme is default (no class). All hardcoded
       dark values and variables are remapped here.
       ================================================ */

    body.theme-light .guide-overview-row:hover { background: rgba(0,0,0,0.03); }

    body.theme-light .guide-p code {
      background: rgba(0,0,0,0.07);
      color:      #2A2A2A;
    }

    body.theme-light .guide-code {
      background:        #EEECEA;
      border-color:      rgba(0,0,0,0.09);
      border-left-color: rgba(0,0,0,0.22);
      color:             #2A2A2A;
    }

    body.theme-light .guide-table th          { background: rgba(0,0,0,0.04); }
    body.theme-light .guide-table tr:hover td { background: rgba(0,0,0,0.025); }

/* ================================================
   PRINT — readable output without dark background
   ================================================ */
@media print {
  .left-nav, .promo-banner, .theme-toggle-btn, .nav-toggle, .nav-overlay { display: none !important; }
  .guide-wrap { margin-left: 0; }
  body { background: #fff !important; color: #000 !important; }
  .guide-hero { background: none !important; color: #000 !important; }
  .guide-hero h1, .guide-hero p { color: #000 !important; }
  a { color: #000; text-decoration: underline; }
  pre, code { background: #f4f4f4 !important; border: 1px solid #ddd; color: #000 !important; }
}
