    /* ── THEME TOKENS ──
       Light is the default palette on bare :root. A boot script (right
       after this stylesheet) resolves the effective theme — a stored
       explicit choice, else the OS preference — and sets data-theme on
       <html> before paint, so this file only needs two token blocks: the
       light default and the [data-theme="dark"] override. No media query
       needed; the boot script (and a matchMedia listener for live OS
       changes when nothing is stored) is the single source of truth. */
    :root {
      --g1: #0D9488;
      --g2: #2563EB;
      --g3: #7C3AED;
      --g1-rgb: 13, 148, 136;
      --g2-rgb: 37, 99, 235;
      --g3-rgb: 124, 58, 237;
      --on-accent: #FFFFFF;
      --bg: #FFFFFF;
      --bg2: #F6F7F9;
      --bg3: #EEF1F5;
      --border: rgba(15, 23, 42, 0.1);
      --text: #1A1D23;
      --text-secondary: #4B5563;
      --muted: #5B6472;
      --card: #FFFFFF;
      --surface-hover: rgba(15, 23, 42, 0.035);
      --surface-active: rgba(15, 23, 42, 0.06);
      --hairline: rgba(15, 23, 42, 0.08);
      --border-hover: rgba(15, 23, 42, 0.18);
      --tok-str: #B45309;
      --tok-attr: #BE185D;
      --tok-val: #C2410C;
      --nav-bg: rgba(255, 255, 255, 0.85);
      --shadow-window: rgba(15, 23, 42, 0.12);
    }

    :root[data-theme="dark"] {
      --g1: #2BEBA0;
      --g2: #5B9FED;
      --g3: #A855F7;
      --g1-rgb: 43, 235, 160;
      --g2-rgb: 91, 159, 237;
      --g3-rgb: 168, 85, 247;
      --on-accent: #0A0C10;
      --bg: #0A0C10;
      --bg2: #111419;
      --bg3: #181C24;
      --border: rgba(255, 255, 255, 0.07);
      --text: #E2E8F0;
      --text-secondary: #9CA3AF;
      --muted: #6B7280;
      --card: #13171F;
      --surface-hover: rgba(255, 255, 255, 0.04);
      --surface-active: rgba(255, 255, 255, 0.07);
      --hairline: rgba(255, 255, 255, 0.04);
      --border-hover: rgba(255, 255, 255, 0.18);
      --tok-str: #F9C86A;
      --tok-attr: #F48FB1;
      --tok-val: #CE9178;
      --nav-bg: rgba(10, 12, 16, 0.85);
      --shadow-window: rgba(0, 0, 0, 0.5);
    }

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

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      overflow-x: hidden;
      transition: background-color 0.25s ease, color 0.25s ease;
    }

    /* ── GRADIENT TEXT ── */
    .grad {
      background: linear-gradient(120deg, var(--g1) 0%, var(--g2) 55%, var(--g3) 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    /* ── HEADING OVERRIDES ── */
    h1,
    h2,
    h3,
    h4 {
      font-family: sans-serif;
      font-weight: 800;
      letter-spacing: -0.03em;
      margin-top : 24px;
    }

    /* ── NAV ── */
    nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      gap: 0;
      padding: 0 2.5rem;
      height: 64px;
      background: var(--nav-bg);
      backdrop-filter: blur(16px);
      border-bottom: 1px solid var(--border);
    }

    .nav-logo {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-right: auto;
      text-decoration: none;
      cursor: pointer;
    }

    .nav-logo svg {
      width: 36px;
      height: 36px;
    }

    .nav-logo-text {
      font-size: 1.15rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      color: var(--text);
    }

    .nav-links {
      display: flex;
      gap: 2px;
    }

    .nav-link {
      display: inline-flex;
      align-items: center;
      padding: 8px 18px;
      border-radius: 8px;
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--muted);
      cursor: pointer;
      border: none;
      background: transparent;
      font-family: 'Syne', sans-serif;
      letter-spacing: 0.01em;
      text-decoration: none;
      transition: color 0.2s, background 0.2s;
    }

    .nav-link:hover {
      color: var(--text);
      background: var(--surface-hover);
    }

    .nav-link.active {
      color: var(--text);
      background: var(--surface-active);
    }

    .nav-github {
      margin-left: 16px;
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-weight: 600;
      color: var(--on-accent);
      background: linear-gradient(135deg, var(--g1), var(--g2));
      text-decoration: none;
      font-family: 'Syne', sans-serif;
      transition: opacity 0.2s;
    }

    .nav-github:hover {
      opacity: 0.85;
    }

    .theme-toggle {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 36px;
      height: 36px;
      margin-left: 6px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: transparent;
      color: var(--muted);
      cursor: pointer;
      transition: color 0.2s, background 0.2s, border-color 0.2s;
    }

    .theme-toggle:hover {
      color: var(--text);
      background: var(--surface-hover);
    }

    .theme-toggle svg {
      width: 18px;
      height: 18px;
    }

    /* ── PAGES ── */
    .page {
      padding-top: 64px;
    }

    /* ── HOME ── */
    .hero {
      position: relative;
      min-height: calc(100vh - 64px);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 4rem 2rem;
      overflow: hidden;
    }

    .hero-bg {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background: radial-gradient(ellipse 80% 60% at 50% 20%, rgba(var(--g1-rgb), 0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 60% at 80% 60%, rgba(var(--g3-rgb), 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 50% 50% at 20% 70%, rgba(var(--g2-rgb), 0.06) 0%, transparent 70%);
    }

    .hero-badge {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 6px 14px;
      border-radius: 999px;
      border: 1px solid rgba(var(--g1-rgb), 0.25);
      background: rgba(var(--g1-rgb), 0.05);
      font-size: 0.78rem;
      font-family: 'DM Mono', monospace;
      color: var(--g1);
      margin-bottom: 2rem;
      letter-spacing: 0.05em;
    }

    .hero h1 {
      font-size: clamp(3rem, 8vw, 6.5rem);
      font-weight: 800;
      line-height: 0.95;
      letter-spacing: -0.05em;
      margin-bottom: 1.75rem;
    }

    .hero p {
      font-size: clamp(1rem, 2vw, 1.25rem);
      color: var(--muted);
      max-width: 560px;
      line-height: 1.7;
      margin-bottom: 2.5rem;
      font-weight: 400;
    }

    .hero-actions {
      display: flex;
      gap: 14px;
      flex-wrap: wrap;
      justify-content: center;
    }

    .btn-primary {
      padding: 13px 28px;
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      font-family: 'Syne', sans-serif;
      background: linear-gradient(135deg, var(--g1), var(--g2));
      color: var(--on-accent);
      border: none;
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: transform 0.2s, box-shadow 0.2s;
    }

    .btn-primary:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 30px rgba(var(--g1-rgb), 0.3);
    }

    .btn-secondary {
      padding: 13px 28px;
      border-radius: 10px;
      font-size: 0.95rem;
      font-weight: 600;
      font-family: 'Syne', sans-serif;
      background: transparent;
      color: var(--text);
      border: 1px solid var(--border);
      cursor: pointer;
      text-decoration: none;
      display: inline-block;
      transition: border-color 0.2s, background 0.2s;
    }

    .btn-secondary:hover {
      border-color: var(--border-hover);
      background: var(--surface-hover);
    }

    /* code snippet hero */
    .hero-code {
      margin-top: 4rem;
      width: 100%;
      max-width: 720px;
      text-align: left;
    }

    .code-window {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      box-shadow: 0 32px 80px var(--shadow-window);
    }

    .code-window-bar {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 14px 16px;
      background: var(--bg3);
      border-bottom: 1px solid var(--border);
    }

    .dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
    }

    .dot-r {
      background: #FF5F57;
    }

    .dot-y {
      background: #FFBD2E;
    }

    .dot-g {
      background: #28C840;
    }

    .code-window-title {
      margin-left: 8px;
      font-family: 'DM Mono', monospace;
      font-size: 0.78rem;
      color: var(--muted);
    }

    pre.code-block {
      padding: 1.5rem;
      font-family: 'DM Mono', monospace;
      font-size: 0.82rem;
      line-height: 1.7;
      overflow-x: auto;
      color: var(--text);
    }

    .tok-kw {
      color: var(--g1);
    }

    .tok-fn {
      color: var(--g2);
    }

    .tok-str {
      color: var(--tok-str);
    }

    .tok-cm {
      color: var(--muted);
      font-style: italic;
    }

    .tok-attr {
      color: var(--tok-attr);
    }

    .tok-tag {
      color: var(--g3);
    }

    .tok-val {
      color: var(--tok-val);
    }

    /* ── FEATURES ── */
    .section {
      padding: 6rem 2rem;
      max-width: 1100px;
      margin: 0 auto;
    }

    .section-label {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      font-family: 'DM Mono', monospace;
      font-size: 0.72rem;
      letter-spacing: 0.14em;
      color: var(--g1);
      text-transform: uppercase;
      margin-bottom: 1rem;
    }

    .section-label::before {
      content: '';
      display: inline-block;
      width: 18px;
      height: 1px;
      background: var(--g1);
    }

    .section-title {
      font-size: clamp(2rem, 4vw, 3rem);
      font-weight: 800;
      letter-spacing: -0.04em;
      line-height: 1.05;
      margin-bottom: 1.1rem;
    }

    .section-sub {
      font-size: 1.05rem;
      color: var(--muted);
      line-height: 1.7;
      max-width: 600px;
      margin-bottom: 3rem;
    }

    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 1.25rem;
    }

    .feature-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.75rem;
      transition: border-color 0.25s, transform 0.2s;
    }

    .feature-card:hover {
      border-color: rgba(var(--g1-rgb), 0.2);
      transform: translateY(-3px);
    }

    .feature-icon {
      width: 42px;
      height: 42px;
      border-radius: 10px;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 1.1rem;
      font-size: 1.2rem;
      background: var(--bg3);
    }

    .feature-card h3 {
      font-size: 1.05rem;
      font-weight: 700;
      margin-bottom: 0.55rem;
      letter-spacing: -0.02em;
      color: var(--text);
    }

    .feature-card p {
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.65;
      font-family: 'DM Mono', monospace;
    }

    /* ── DIVIDER ── */
    .divider {
      height: 1px;
      background: var(--border);
      margin: 0 2rem;
    }

    /* ── DOWNLOAD ── */
    .install-box {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      overflow: hidden;
      width: 100%;
    }

    .install-next {
      margin-top: 1.25rem;
      font-size: 0.9rem;
      color: var(--text-secondary);
    }

    .install-next a {
      color: var(--g2);
      font-weight: 600;
      text-decoration: none;
      cursor: pointer;
    }

    .install-next a:hover {
      text-decoration: underline;
    }

    .install-tabs {
      display: flex;
      border-bottom: 1px solid var(--border);
    }

    .install-tab {
      padding: 10px 20px;
      font-size: 0.82rem;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
      cursor: pointer;
      border: none;
      background: none;
      font-family: 'DM Mono', monospace;
      border-bottom: 2px solid transparent;
      margin-bottom: -1px;
      transition: color 0.2s, border-color 0.2s;
    }

    .install-tab.active {
      color: var(--g1);
      border-bottom-color: var(--g1);
    }

    .install-content {
      padding: 0;
    }

    .install-pane {
      display: none;
    }

    .install-pane.active {
      display: block;
    }

    .install-cmd {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1rem 1.25rem;
      font-family: 'DM Mono', monospace;
      font-size: 0.85rem;
      color: var(--g2);
      gap: 12px;
    }

    .install-cmd span {
      overflow-wrap: anywhere;
    }

    .install-note {
      padding: 0 1.25rem 1.25rem;
      font-size: 0.82rem;
      color: var(--text-secondary);
      line-height: 1.6;
    }

    .copy-btn {
      font-size: 0.75rem;
      padding: 5px 12px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg3);
      color: var(--muted);
      cursor: pointer;
      font-family: 'DM Mono', monospace;
      transition: color 0.2s, border-color 0.2s;
      white-space: nowrap;
    }

    .copy-btn:hover {
      color: var(--g1);
      border-color: var(--g1);
    }

    /* ── DOCS ── */
    .docs-layout {
      display: flex;
      min-height: calc(100vh - 64px);
    }

    .docs-sidebar {
      width: 260px;
      flex-shrink: 0;
      position: sticky;
      top: 64px;
      height: calc(100vh - 64px);
      overflow-y: auto;
      border-right: 1px solid var(--border);
      padding: 2rem 0;
      background: var(--bg);
    }

    .docs-sidebar::-webkit-scrollbar {
      width: 4px;
    }

    .docs-sidebar::-webkit-scrollbar-track {
      background: transparent;
    }

    .docs-sidebar::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 2px;
    }

    .sidebar-section {
      margin-bottom: 1.5rem;
    }

    .sidebar-section-label {
      font-size: 0.68rem;
      font-family: 'DM Mono', monospace;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--muted);
      padding: 0 1.5rem;
      margin-bottom: 0.4rem;
    }

    .sidebar-link {
      display: block;
      padding: 7px 1.5rem;
      font-size: 0.875rem;
      color: var(--muted);
      cursor: pointer;
      border-left: 2px solid transparent;
      transition: color 0.18s, border-color 0.18s, background 0.18s;
      text-decoration: none;
    }

    .sidebar-link:hover {
      color: var(--text);
      background: var(--surface-hover);
    }

    .sidebar-link.active {
      color: var(--g1);
      border-left-color: var(--g1);
      background: rgba(var(--g1-rgb), 0.05);
    }

    .docs-content {
      flex: 1;
      padding: 3rem 3.5rem;
      max-width: 820px;
    }

    .docs-content h2 {
      font-size: 1.75rem;
      font-weight: 800;
      letter-spacing: -0.04em;
      margin-bottom: 0.75rem;
      margin-top: 3rem;
      padding-top: 3rem;
      border-top: 1px solid var(--border);
      color: var(--text);
    }

    .docs-content h2:first-child {
      border-top: none;
      padding-top: 0;
      margin-top: 0;
    }

    .docs-content h3 {
      font-size: 1.05rem;
      font-weight: 700;
      letter-spacing: -0.02em;
      margin-top: 2rem;
      margin-bottom: 0.5rem;
      color: var(--g2);
      font-family: 'DM Mono', monospace;
    }

    .docs-content p {
      font-size: 0.94rem;
      color: var(--text-secondary);
      line-height: 1.75;
      margin-bottom: 1rem;
    }

    .docs-content ul {
      margin: 0.5rem 0 1rem 1.25rem;
    }

    .docs-content li {
      font-size: 0.9rem;
      color: var(--text-secondary);
      line-height: 1.8;
    }

    .docs-content code {
      font-family: 'DM Mono', monospace;
      font-size: 0.82rem;
      background: var(--bg3);
      border: 1px solid var(--border);
      padding: 2px 7px;
      border-radius: 5px;
      color: var(--g1);
    }

    .docs-content pre {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.25rem 1.5rem;
      overflow-x: auto;
      margin: 1rem 0 1.5rem;
    }

    .docs-content pre code {
      background: none;
      border: none;
      padding: 0;
      font-size: 0.82rem;
      line-height: 1.7;
      color: var(--text);
    }

    .api-card {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.25rem 1.5rem;
      margin: 1rem 0;
    }

    .api-card-name {
      font-family: 'DM Mono', monospace;
      font-size: 0.92rem;
      color: var(--g2);
      font-weight: 500;
      margin-bottom: 0.5rem;
    }

    .api-card-desc {
      font-size: 0.88rem;
      color: var(--muted);
      line-height: 1.65;
    }

    .badge-binding {
      display: inline-block;
      font-family: 'DM Mono', monospace;
      font-size: 0.72rem;
      padding: 3px 8px;
      border-radius: 5px;
      background: rgba(var(--g2-rgb), 0.1);
      border: 1px solid rgba(var(--g2-rgb), 0.25);
      color: var(--g2);
      margin-right: 6px;
      margin-bottom: 6px;
    }

    .table {
      width: 100%;
      border-collapse: collapse;
      margin: 1rem 0 1.5rem;
    }

    .table th {
      text-align: left;
      font-size: 0.78rem;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: 0.06em;
      padding: 8px 12px;
      border-bottom: 1px solid var(--border);
    }

    .table td {
      font-size: 0.88rem;
      padding: 10px 12px;
      border-bottom: 1px solid var(--hairline);
      color: var(--text-secondary);
    }

    .table td:first-child {
      font-family: 'DM Mono', monospace;
      color: var(--g1);
      font-size: 0.82rem;
    }

    .table tr:hover td {
      background: var(--surface-hover);
    }

    /* ── EXAMPLES ── */
    .examples-layout {
      max-width: 1000px;
      margin: 0 auto;
      padding: 3rem 2rem;
    }

    .examples-layout h1 {
      font-size: 2.5rem;
      font-weight: 800;
      letter-spacing: -0.04em;
      margin-bottom: 0.4rem;
      line-height: 1;
    }

    .examples-layout>p {
      color: var(--muted);
      font-size: 0.95rem;
      margin-bottom: 2.5rem;
      font-family: 'DM Mono', monospace;
      font-size: 0.82rem;
    }

    .example-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 2rem;
    }

    .ex-tab {
      padding: 8px 16px;
      border-radius: 8px;
      font-size: 0.82rem;
      font-family: 'DM Mono', monospace;
      border: 1px solid var(--border);
      background: none;
      color: var(--muted);
      cursor: pointer;
      transition: all 0.18s;
    }

    .ex-tab:hover {
      color: var(--text);
      border-color: var(--border-hover);
    }

    .ex-tab.active {
      border-color: var(--g2);
      color: var(--g2);
      background: rgba(var(--g2-rgb), 0.08);
    }

    .example-pane {
      display: none;
    }

    .example-pane.active {
      display: block;
    }

    .example-header {
      margin-bottom: 1.5rem;
    }

    .example-header h2 {
      font-size: 1.6rem;
      font-weight: 800;
      letter-spacing: -0.04em;
      margin-bottom: 0.4rem;
    }

    .example-header p {
      font-size: 0.85rem;
      color: var(--muted);
      line-height: 1.6;
      font-family: 'DM Mono', monospace;
    }

    .example-split {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 1.5rem;
      margin-top: 1.5rem;
    }

    @media (max-width: 700px) {
      .example-split {
        grid-template-columns: 1fr;
      }
    }

    .example-code-panel {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
    }

    .panel-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 10px 14px;
      background: var(--bg3);
      border-bottom: 1px solid var(--border);
      font-size: 0.75rem;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
    }

    .panel-header .dot {
      width: 9px;
      height: 9px;
    }

    .example-code-panel pre {
      padding: 1.25rem;
      font-family: 'DM Mono', monospace;
      font-size: 0.78rem;
      line-height: 1.7;
      overflow-x: auto;
      max-height: 400px;
      overflow-y: auto;
      color: var(--text);
    }

    .example-demo-panel {
      background: var(--bg2);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 1.75rem;
    }

    .demo-label {
      font-size: 0.7rem;
      font-family: 'DM Mono', monospace;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: var(--muted);
      margin-bottom: 1rem;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .demo-label::before {
      content: '';
      display: inline-block;
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--g1);
      animation: pulse 2s infinite;
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: 0.4
      }
    }

    /* Demo component styles */
    .demo input[type=text],
    .demo input[type=number],
    .demo textarea,
    .demo select {
      background: var(--bg3);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 7px;
      padding: 8px 12px;
      font-family: 'DM Mono', monospace;
      font-size: 0.85rem;
      width: 100%;
      margin-bottom: 10px;
      outline: none;
      transition: border-color 0.2s;
    }

    .demo input:focus,
    .demo textarea:focus,
    .demo select:focus {
      border-color: var(--g2);
    }

    .demo label {
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 0.88rem;
      color: var(--muted);
      margin-bottom: 8px;
      cursor: pointer;
    }

    .demo label input[type=checkbox],
    .demo label input[type=radio] {
      accent-color: var(--g1);
      width: 16px;
      height: 16px;
      margin: 0;
    }

    .demo .out {
      background: var(--bg3);
      border: 1px solid var(--border);
      border-radius: 7px;
      padding: 10px 14px;
      font-family: 'DM Mono', monospace;
      font-size: 0.85rem;
      color: var(--g1);
      margin-top: 10px;
      min-height: 40px;
    }

    .demo button {
      padding: 8px 18px;
      border-radius: 7px;
      background: linear-gradient(135deg, var(--g1), var(--g2));
      color: var(--on-accent);
      border: none;
      font-weight: 600;
      font-family: 'Syne', sans-serif;
      font-size: 0.85rem;
      cursor: pointer;
      margin-right: 8px;
      margin-bottom: 8px;
      transition: opacity 0.2s;
    }

    .demo button:hover {
      opacity: 0.85;
    }

    .demo table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.82rem;
    }

    .demo table th {
      color: var(--muted);
      font-family: 'DM Mono', monospace;
      font-size: 0.72rem;
      text-transform: uppercase;
      padding: 6px 8px;
      border-bottom: 1px solid var(--border);
      text-align: left;
    }

    .demo table td {
      padding: 8px;
      border-bottom: 1px solid var(--hairline);
      color: var(--text);
    }

    .demo table tr.active-row td {
      background: rgba(var(--g1-rgb), 0.12);
    }

    .demo .demo-state-label {
      font-size: 0.75rem;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
      margin-bottom: 4px;
    }

    .footer {
      border-top: 1px solid var(--border);
      padding: 2.5rem;
      text-align: center;
      font-size: 0.82rem;
      color: var(--muted);
      font-family: 'DM Mono', monospace;
    }

    .footer a {
      color: var(--g2);
      text-decoration: none;
    }

    /* scrollbar global */
    ::-webkit-scrollbar {
      width: 6px;
      height: 6px;
    }

    ::-webkit-scrollbar-track {
      background: var(--bg);
    }

    ::-webkit-scrollbar-thumb {
      background: var(--border);
      border-radius: 3px;
    }

    /* ── POS DEMO ── */
    .pos-layout {
      max-width: 1400px;
      margin: 0 auto;
      padding: 2rem 2.5rem 3rem;
    }

    .pos-topbar {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 2rem;
      flex-wrap: wrap;
      margin-bottom: 1.5rem;
    }

    .pos-title {
      font-size: 2rem;
      margin-bottom: 0.4rem;
    }

    .pos-subtitle {
      color: var(--text-secondary);
      font-size: 0.92rem;
      max-width: 640px;
      line-height: 1.6;
    }

    .pos-today-stat {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
      gap: 4px;
      padding: 10px 18px;
      border: 1px solid var(--border);
      border-radius: 10px;
      background: var(--card);
      white-space: nowrap;
    }

    .pos-today-label {
      font-size: 0.7rem;
      text-transform: uppercase;
      letter-spacing: 0.08em;
      color: var(--muted);
    }

    .pos-today-value {
      font-family: 'DM Mono', monospace;
      font-size: 0.95rem;
      color: var(--g1);
    }

    .pos-toast {
      margin-bottom: 1rem;
      padding: 10px 16px;
      border-radius: 8px;
      border: 1px solid var(--g1);
      background: rgba(var(--g1-rgb), 0.08);
      color: var(--g1);
      font-size: 0.85rem;
      font-family: 'DM Mono', monospace;
    }

    .pos-grid {
      display: grid;
      grid-template-columns: 220px 1fr 340px;
      gap: 1.25rem;
      align-items: start;
    }

    @media (max-width: 980px) {
      .pos-grid {
        grid-template-columns: 1fr;
      }
    }

    .pos-sidebar,
    .pos-cart {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 1.1rem;
    }

    .pos-sidebar {
      position: sticky;
      top: 84px;
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    .pos-search {
      width: 100%;
      background: var(--bg3);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 8px;
      padding: 9px 12px;
      font-family: 'DM Mono', monospace;
      font-size: 0.85rem;
    }

    .pos-search:focus {
      outline: none;
      border-color: var(--g2);
    }

    .pos-categories {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .pos-category-pill {
      text-align: left;
      padding: 9px 12px;
      border-radius: 8px;
      font-size: 0.85rem;
      font-family: 'Syne', sans-serif;
      border: 1px solid var(--border);
      background: none;
      color: var(--muted);
      cursor: pointer;
    }

    .pos-category-pill:hover {
      color: var(--text);
      border-color: var(--border-hover);
    }

    .pos-category-pill.active {
      border-color: var(--g2);
      color: var(--g2);
      background: rgba(var(--g2-rgb), 0.08);
    }

    .pos-products {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 0.9rem;
      align-content: start;
    }

    .pos-product-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      text-align: center;
      gap: 6px;
      padding: 1.1rem 0.8rem;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 12px;
      cursor: pointer;
      font-family: 'Syne', sans-serif;
      transition: border-color 0.15s, transform 0.1s;
    }

    .pos-product-card:hover {
      border-color: var(--g1);
      transform: translateY(-2px);
    }

    .pos-product-card:active {
      transform: translateY(0);
    }

    .pos-product-icon {
      font-size: 1.8rem;
    }

    .pos-product-name {
      font-size: 0.85rem;
      color: var(--text);
      font-weight: 600;
    }

    .pos-product-price {
      font-size: 0.8rem;
      font-family: 'DM Mono', monospace;
      color: var(--g1);
    }

    .pos-cart {
      position: sticky;
      top: 84px;
      display: flex;
      flex-direction: column;
      gap: 1rem;
    }

    .pos-cart-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .pos-cart-header h2 {
      font-size: 1.05rem;
    }

    .pos-cart-count {
      font-family: 'DM Mono', monospace;
      font-size: 0.78rem;
      color: var(--muted);
      background: var(--bg3);
      padding: 3px 9px;
      border-radius: 999px;
    }

    .pos-cart-items {
      display: flex;
      flex-direction: column;
      gap: 8px;
      max-height: 320px;
      overflow-y: auto;
    }

    .pos-cart-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 8px 0;
      border-bottom: 1px solid var(--hairline);
    }

    .pos-cart-row-name {
      font-size: 0.85rem;
      color: var(--text);
    }

    .pos-cart-row-line {
      font-size: 0.78rem;
      font-family: 'DM Mono', monospace;
      color: var(--muted);
    }

    .pos-cart-row-qty {
      display: flex;
      align-items: center;
      gap: 6px;
      font-family: 'DM Mono', monospace;
      font-size: 0.82rem;
    }

    .pos-qty-btn,
    .pos-remove-btn {
      width: 24px;
      height: 24px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg3);
      color: var(--text);
      cursor: pointer;
      line-height: 1;
      font-family: 'DM Mono', monospace;
    }

    .pos-qty-btn:hover {
      border-color: var(--g2);
      color: var(--g2);
    }

    .pos-remove-btn {
      margin-left: 4px;
      color: var(--muted);
    }

    .pos-remove-btn:hover {
      border-color: #EF4444;
      color: #EF4444;
    }

    .pos-cart-empty {
      font-size: 0.82rem;
      color: var(--muted);
      text-align: center;
      padding: 1rem 0;
    }

    .pos-totals {
      border-top: 1px solid var(--border);
      padding-top: 0.75rem;
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .pos-totals-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.85rem;
      color: var(--text-secondary);
    }

    .pos-totals-row.pos-totals-grand {
      font-size: 1rem;
      font-weight: 700;
      color: var(--text);
      font-family: 'Syne', sans-serif;
    }

    .pos-payment {
      display: flex;
      gap: 1rem;
    }

    .pos-payment-option {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 0.85rem;
      color: var(--text);
      cursor: pointer;
    }

    .pos-payment-option input {
      accent-color: var(--g1);
    }

    .pos-cash-panel {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .pos-cash-label {
      font-size: 0.78rem;
      color: var(--muted);
    }

    .pos-cash-input {
      background: var(--bg3);
      border: 1px solid var(--border);
      color: var(--text);
      border-radius: 8px;
      padding: 8px 12px;
      font-family: 'DM Mono', monospace;
      font-size: 0.9rem;
    }

    .pos-cash-input:focus {
      outline: none;
      border-color: var(--g2);
    }

    .pos-change-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.85rem;
      color: var(--g1);
      font-family: 'DM Mono', monospace;
    }

    .pos-cart-actions {
      display: flex;
      gap: 10px;
    }

    .pos-cart-actions .btn-primary,
    .pos-cart-actions .btn-secondary {
      flex: 1;
      padding: 11px 0;
      text-align: center;
    }

    .pos-charge-btn.is-disabled {
      opacity: 0.45;
      pointer-events: none;
    }

    #receipt-slot {
      position: relative;
      z-index: 5;
    }

    .pos-receipt {
      max-width: 340px;
      margin: 0 0 1.25rem;
      padding: 1rem 1.1rem;
      border: 1px solid var(--g1);
      border-radius: 12px;
      background: rgba(var(--g1-rgb), 0.08);
    }

    .pos-receipt-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 0.6rem;
      font-family: 'Syne', sans-serif;
      color: var(--text);
    }

    .pos-receipt-dismiss {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      border: 1px solid var(--border);
      background: var(--bg3);
      color: var(--muted);
      cursor: pointer;
      line-height: 1;
    }

    .pos-receipt-dismiss:hover {
      border-color: #EF4444;
      color: #EF4444;
    }

    .pos-receipt-summary {
      font-size: 0.8rem;
      color: var(--text-secondary);
      margin-bottom: 0.6rem;
    }

    .pos-receipt-totals {
      display: flex;
      flex-direction: column;
      gap: 4px;
      font-size: 0.85rem;
      color: var(--text-secondary);
      border-top: 1px solid var(--hairline);
      padding-top: 0.5rem;
    }

    .pos-receipt-totals>div {
      display: flex;
      justify-content: space-between;
    }

    .pos-receipt-total {
      font-weight: 700;
      color: var(--g1);
      font-family: 'DM Mono', monospace;
    }
