:root {
  --bg: #0d1117; --bg-2: #161b22; --bg-3: #1c2330; --line: #30363d; --text: #e6edf3; --muted: #8b949e;
  --like: #ff7b72; --quantum: #79c0ff; --inspired: #d2a8ff; --viz: #7ee787; --accent: #79c0ff;
  --code-bg: #0b0f15; --radius: 14px; --max: 1120px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root { --bg: #ffffff; --bg-2: #f6f8fa; --bg-3: #eef2f7; --line: #d0d7de; --text: #1f2328; --muted: #57606a;
          --like: #cf222e; --quantum: #0969da; --inspired: #8250df; --viz: #1a7f37; --accent: #0969da;
          --code-bg: #f6f8fa; color-scheme: light; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre { font-family: SFMono-Regular, Consolas, Menlo, monospace; font-size: 0.9em; }
pre { background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; overflow-x: auto; line-height: 1.45; }
:not(pre) > code { background: var(--bg-3); padding: 0.1em 0.35em; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; gap: 18px; height: 58px; }
header.top .brand { font-weight: 700; color: var(--text); white-space: nowrap; }
header.top nav { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
header.top nav a { color: var(--muted); white-space: nowrap; font-size: 0.95em; }
header.top nav a:hover { color: var(--text); text-decoration: none; }
.gh { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--text); white-space: nowrap; font-size: 0.9em; }
section { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 58px; }
section h2 { font-size: 1.7em; margin: 0 0 8px; }
section .lead { color: var(--muted); margin: 0 0 28px; max-width: 760px; }
.hero { padding: 40px 0 48px; }
.hero h1 { font-size: clamp(1.9em, 5vw, 3em); line-height: 1.15; margin: 18px 0 12px; }
.hero p { font-size: 1.12em; color: var(--muted); max-width: 780px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 8px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 10px; font-weight: 600; border: 1px solid var(--line); color: var(--text); background: var(--bg-2); }
.btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.install { margin-top: 18px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.grid3 > *, .grid2 > *, .pg > *, .spheres > * { min-width: 0; }
pre { max-width: 100%; }
@media (max-width: 560px) { header.top .brand { display: none; } .gh { padding: 4px 10px; } }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin: 0 0 6px; font-size: 1.15em; }
.card p { margin: 0 0 10px; color: var(--muted); }
.card ul { margin: 0; padding-left: 20px; }
.card.like { border-top: 4px solid var(--like); } .card.quantum { border-top: 4px solid var(--quantum); }
.card.inspired { border-top: 4px solid var(--inspired); } .card.viz { border-top: 4px solid var(--viz); }
.tag { font-size: 0.8em; color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 0.95em; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.tablewrap { overflow-x: auto; }
.demo-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.figure { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.figure figcaption { color: var(--muted); font-size: 0.9em; margin-top: 8px; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button { background: var(--bg-2); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 6px 14px; cursor: pointer; font: inherit; }
.tabs button[aria-selected="true"] { background: var(--accent); color: var(--bg); border-color: var(--accent); }
/* playground */
.pg { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
@media (max-width: 960px) { .pg { grid-template-columns: 1fr; } }
.pg .spheres { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px) { .pg .spheres { grid-template-columns: 1fr; } }
.pg .sphere { height: 340px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.pg .panel { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.pg .gates { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 12px; }
.pg .gates button, .pg .wide { background: var(--bg-3); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 0; cursor: pointer; font: 600 0.9em/1 SFMono-Regular, Consolas, monospace; }
.pg .gates button:hover, .pg .wide:hover { border-color: var(--accent); }
.pg .wide { width: 100%; padding: 9px 6px; margin-top: 6px; white-space: normal; line-height: 1.3; }
.pg .q0 { color: var(--like); } .pg .q1 { color: var(--quantum); }
.pg .readout { font: 0.85em/1.5 SFMono-Regular, Consolas, monospace; color: var(--muted); white-space: pre-wrap; margin-top: 10px; }
.pg .spheres + .panel { margin-top: 10px; }
.pg .meter { height: 8px; background: var(--bg-3); border-radius: 99px; overflow: hidden; margin: 4px 0 10px; }
.pg .meter > div { height: 100%; width: 0; background: var(--viz); transition: width 0.2s; }
.pg .history { font: 0.85em SFMono-Regular, Consolas, monospace; color: var(--muted); min-height: 1.4em; overflow-wrap: anywhere; }
footer { padding: 36px 0 60px; color: var(--muted); font-size: 0.92em; }
.note { color: var(--muted); font-size: 0.92em; }
.doc { padding: 36px 0 60px; }
.doc h1 { font-size: 2em; } .doc h2 { margin-top: 1.8em; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.doc table { margin: 12px 0; display: block; overflow-x: auto; }
header.top .brand { display: inline-flex; align-items: center; gap: 8px; }
header.top .brand img { display: block; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.badges img { display: block; }
.audience { margin-top: 18px; }
.audience .card h3 { margin-top: 0; }
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent, #79c0ff); }
@media (max-width: 720px) { header.top nav { overflow-x: auto; white-space: nowrap; } }
