:root {
      --bg:        #0a0a0f;
      --bg-soft:   #14141c;
      --card:      #ffffff;
      --border:    #23232e;
      --text:      #e8e8ec;
      --text-dim:  #8a8a98;
      --accent:    #76b900;
      --accent-2:  #ea580c;
      --radius:    14px;
      --max:       1180px;
      --pad:       24px;
      --font:      "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
      --mono:      ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    }
    * { box-sizing: border-box; }
    html, body {
      margin: 0; padding: 0;
      background: var(--bg);
      color: var(--text);
      font-family: var(--font);
      font-size: 16px;
      line-height: 1.55;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--accent); text-decoration: none; }
    a:hover { text-decoration: underline; }
    code, pre { font-family: var(--mono); }

    /* ── Nav ─────────────────────────────────────────────────────── */
    nav {
      position: sticky; top: 0; z-index: 10;
      background: rgba(10, 10, 15, 0.85);
      backdrop-filter: saturate(180%) blur(10px);
      border-bottom: 1px solid var(--border);
    }
    .nav-inner {
      max-width: var(--max);
      margin: 0 auto;
      padding: 14px var(--pad);
      display: flex; align-items: center; justify-content: space-between;
    }
    .brand {
      font-weight: 700; font-size: 18px;
      display: flex; align-items: center; gap: 8px;
      color: var(--text);
    }
    .brand-dot {
      width: 10px; height: 10px; border-radius: 3px;
      background: var(--accent);
    }
    .nav-links { display: flex; gap: 22px; font-size: 14px; }
    .nav-links a { color: var(--text-dim); }
    .nav-links a:hover { color: var(--text); text-decoration: none; }

    /* ── Hero ────────────────────────────────────────────────────── */
    .hero {
      max-width: var(--max);
      margin: 0 auto;
      padding: 80px var(--pad) 48px;
      text-align: center;
    }
    .hero h1 {
      margin: 0 0 18px;
      font-size: clamp(40px, 7vw, 72px);
      font-weight: 800; line-height: 1.05;
      letter-spacing: -0.025em;
      background: linear-gradient(180deg, #ffffff 0%, #b8b8c4 100%);
      -webkit-background-clip: text; background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    .hero p.lead {
      margin: 0 auto 36px;
      max-width: 640px;
      font-size: clamp(17px, 2vw, 20px);
      color: var(--text-dim);
    }
    .install {
      display: inline-flex; align-items: center; gap: 12px;
      padding: 14px 20px;
      background: var(--bg-soft);
      border: 1px solid var(--border);
      border-radius: 10px;
      font-family: var(--mono); font-size: 14px;
      color: var(--text);
    }
    .install::before {
      content: "$"; color: var(--accent); font-weight: 700;
    }
    .ctas { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
    .btn {
      display: inline-flex; align-items: center; gap: 8px;
      padding: 11px 18px;
      border-radius: 9px;
      font-size: 14px; font-weight: 600;
      transition: transform 0.12s ease, background 0.12s ease;
    }
    .btn:hover { text-decoration: none; transform: translateY(-1px); }
    .btn-primary { background: var(--accent); color: #0a0a0f; }
    .btn-primary:hover { background: #8ad000; }
    .btn-ghost {
      background: transparent; color: var(--text);
      border: 1px solid var(--border);
    }
    .btn-ghost:hover { background: var(--bg-soft); }

    /* ── Hero preview ────────────────────────────────────────────── */
    .preview {
      max-width: var(--max);
      margin: 24px auto 80px;
      padding: 0 var(--pad);
    }
    .preview-frame {
      background: var(--card);
      border-radius: var(--radius);
      padding: 24px;
      box-shadow: 0 30px 80px rgba(118, 185, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.5);
      overflow: hidden;
    }
    .preview-frame img { display: block; width: 100%; height: auto; }

    /* ── Samples grid ────────────────────────────────────────────── */
    section.samples {
      max-width: var(--max);
      margin: 0 auto;
      padding: 60px var(--pad) 100px;
    }
    .section-header {
      display: flex; align-items: baseline; justify-content: space-between;
      margin-bottom: 36px;
      flex-wrap: wrap; gap: 8px;
    }
    .section-header h2 {
      margin: 0;
      font-size: 32px; font-weight: 700;
      letter-spacing: -0.015em;
    }
    .section-header .hint { color: var(--text-dim); font-size: 14px; }

    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 24px;
    }
    .card {
      background: var(--bg-soft);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      overflow: hidden;
      transition: transform 0.18s ease, border-color 0.18s ease;
      display: flex; flex-direction: column;
      cursor: pointer;
    }
    .card:hover {
      transform: translateY(-3px);
      border-color: #3a3a4a;
    }
    .card-preview {
      background: var(--card);
      aspect-ratio: 16 / 9;
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
      border-bottom: 1px solid var(--border);
    }
    .card-preview img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
    .card-body { padding: 20px 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
    .card-title {
      margin: 0;
      font-size: 16px; font-weight: 700; color: var(--text);
    }
    .card-desc {
      margin: 0;
      color: var(--text-dim); font-size: 14px;
    }
    .card-meta {
      margin-top: auto; padding-top: 16px;
      display: flex; gap: 14px; align-items: center;
      font-size: 12px; color: var(--text-dim);
      font-family: var(--mono);
    }

    /* ── Modal (sample detail) ───────────────────────────────────── */
    body.modal-open { overflow: hidden; }
    .modal {
      position: fixed; inset: 0;
      display: none; z-index: 100;
    }
    .modal.open { display: block; }
    .modal-overlay {
      position: absolute; inset: 0;
      background: rgba(5, 5, 10, 0.78);
      backdrop-filter: blur(6px);
    }
    .modal-content {
      position: absolute;
      top: 50%; left: 50%; transform: translate(-50%, -50%);
      width: min(1240px, 96vw);
      height: min(820px, 92vh);
      background: var(--bg);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      display: flex; flex-direction: column;
      overflow: hidden;
      box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
    }
    .modal-header {
      display: flex; align-items: center; justify-content: space-between;
      padding: 16px 22px;
      border-bottom: 1px solid var(--border);
      gap: 16px;
    }
    .modal-title { margin: 0; font-size: 16px; font-weight: 700; }
    .modal-actions { display: flex; gap: 14px; align-items: center; }
    .modal-gh { font-size: 13px; color: var(--text-dim); }
    .modal-gh:hover { color: var(--text); text-decoration: none; }
    .modal-close {
      background: transparent; border: 1px solid var(--border);
      color: var(--text-dim); border-radius: 8px;
      width: 32px; height: 32px;
      cursor: pointer; font-size: 14px;
      display: inline-flex; align-items: center; justify-content: center;
    }
    .modal-close:hover { color: var(--text); border-color: #3a3a4a; }
    .modal-body {
      flex: 1;
      display: grid; grid-template-columns: minmax(320px, 1fr) 1.2fr;
      min-height: 0;
    }
    .modal-pane-source {
      border-right: 1px solid var(--border);
      background: #0f0f16;
      overflow: auto;
    }
    .modal-pane-source pre {
      margin: 0;
      padding: 20px 22px;
      font-size: 12.5px; line-height: 1.65;
      color: var(--text);
      white-space: pre;
      tab-size: 2;
    }
    .modal-pane-preview {
      background: var(--card);
      overflow: auto;
      padding: 24px;
      display: flex; align-items: center; justify-content: center;
    }
    .modal-pane-preview img { max-width: 100%; max-height: 100%; }

    /* DSL syntax tokens */
    .tok-comment { color: #6a6a78; font-style: italic; }
    .tok-kw { color: #76b900; font-weight: 600; }
    .tok-str { color: #ea580c; }
    .tok-op { color: #c0c0d0; font-weight: 600; }

    @media (max-width: 820px) {
      .modal-content { width: 96vw; height: 94vh; }
      .modal-body { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
      .modal-pane-source { border-right: none; border-bottom: 1px solid var(--border); }
    }

    /* ── Footer ──────────────────────────────────────────────────── */
    footer {
      border-top: 1px solid var(--border);
      padding: 32px var(--pad);
      text-align: center;
      color: var(--text-dim);
      font-size: 13px;
    }
    footer a { color: var(--text-dim); }
    footer a:hover { color: var(--text); }
