﻿:root {
      --bg: #0f1419;
      --surface: #1a2332;
      --surface2: #243044;
      --border: #2d3a4f;
      --text: #e6edf3;
      --muted: #8b949e;
      --accent: #58a6ff;
      --green: #3fb950;
      --yellow: #d29922;
      --branch: #a371f7;
      --font: "Segoe UI", system-ui, sans-serif;
      --mono: "Cascadia Code", "Consolas", monospace;
      --max-w: 52rem;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: var(--font);
      background: var(--bg);
      color: var(--text);
      line-height: 1.65;
    }

    a { color: var(--accent); }
    a:hover { text-decoration: none; }

    .wrap {
      max-width: var(--max-w);
      margin: 0 auto;
      padding: 2rem 1.25rem 4rem;
    }

    header {
      margin-bottom: 2.5rem;
      padding-bottom: 2rem;
      border-bottom: 1px solid var(--border);
    }

    header h1 {
      font-size: 2rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-bottom: 0.35rem;
    }

    header .tagline {
      font-size: 1.1rem;
      color: var(--muted);
      margin-bottom: 1.25rem;
    }

    .hero-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.65rem;
    }

    .btn {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font: inherit;
      font-size: 0.9rem;
      padding: 0.55rem 1rem;
      border: 1px solid var(--border);
      border-radius: 8px;
      background: var(--surface2);
      color: var(--text);
      text-decoration: none;
      cursor: pointer;
      transition: background 0.15s, border-color 0.15s;
    }

    .btn:hover { background: var(--border); color: var(--text); }
    .btn-primary {
      background: var(--accent);
      border-color: var(--accent);
      color: #fff;
    }
    .btn-primary:hover { background: #4393e6; color: #fff; }

    section {
      margin-bottom: 2.5rem;
    }

    h2 {
      font-size: 1.15rem;
      font-weight: 600;
      margin-bottom: 0.75rem;
      color: var(--text);
    }

    h3 {
      font-size: 0.95rem;
      font-weight: 600;
      margin: 1.25rem 0 0.5rem;
      color: var(--muted);
    }

    p, li { color: var(--text); font-size: 0.95rem; }
    p { margin-bottom: 0.75rem; }

    ul, ol {
      margin: 0 0 0.75rem 1.25rem;
    }

    li { margin-bottom: 0.35rem; }

    .muted { color: var(--muted); font-size: 0.88rem; }

    .card-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
      gap: 0.75rem;
      margin-top: 1rem;
    }

    .card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 1rem 1.1rem;
    }

    .card strong {
      display: block;
      font-family: var(--mono);
      font-size: 0.85rem;
      color: var(--accent);
      margin-bottom: 0.35rem;
    }

    .card span { font-size: 0.85rem; color: var(--muted); }

    pre, code {
      font-family: var(--mono);
      font-size: 0.82rem;
    }

    pre {
      background: #0d1117;
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 1rem;
      overflow-x: auto;
      margin: 0.75rem 0;
      line-height: 1.5;
      color: var(--green);
    }

    .tree-demo {
      color: var(--muted);
      font-size: 0.85rem;
      line-height: 1.7;
    }

    .tree-demo .b { color: var(--branch); }
    .tree-demo .l { color: var(--green); }

    .download-box {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 1.25rem;
    }

    .download-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      margin: 1rem 0;
    }

    .file-list {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .file-list li {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 1rem;
      padding: 0.5rem 0;
      border-bottom: 1px solid var(--border);
      font-size: 0.88rem;
    }

    .file-list li:last-child { border-bottom: none; }

    .file-list code { color: var(--accent); }

    .warn {
      background: #9e6a0322;
      border: 1px solid #9e6a0355;
      border-radius: 8px;
      padding: 0.75rem 1rem;
      font-size: 0.88rem;
      color: var(--yellow);
      margin: 1rem 0;
    }

    .steps {
      counter-reset: step;
      list-style: none;
      margin: 0;
      padding: 0;
    }

    .steps li {
      counter-increment: step;
      position: relative;
      padding-left: 2.25rem;
      margin-bottom: 1rem;
    }

    .steps li::before {
      content: counter(step);
      position: absolute;
      left: 0;
      top: 0.1rem;
      width: 1.5rem;
      height: 1.5rem;
      border-radius: 50%;
      background: var(--surface2);
      border: 1px solid var(--border);
      font-size: 0.75rem;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--muted);
    }

    footer {
      margin-top: 3rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--border);
      font-size: 0.82rem;
      color: var(--muted);
    }

    #copyStatus {
      font-size: 0.82rem;
      color: var(--green);
      min-height: 1.25rem;
    }

    .diagram {
      margin: 0 0 2.5rem;
      text-align: center;
    }

    .diagram img {
      display: block;
      max-width: min(100%, 22rem);
      height: auto;
      margin: 0 auto;
      padding: 1.25rem 1.5rem;
      border-radius: 10px;
      background: #fff;
      border: 1px solid var(--border);
    }

    .diagram figcaption {
      margin-top: 0.75rem;
      font-size: 0.88rem;
      color: var(--muted);
      max-width: 28rem;
      margin-left: auto;
      margin-right: auto;
    }


.back-home {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-bottom: 0.65rem;
}
.back-home:hover {
  color: var(--text);
  text-decoration: underline;
}
