:root {
  --bg: #f4f7fb;
  --bg-elev: #ffffff;
  --bg-soft: #eef3f9;
  --text: #1b2430;
  --text-muted: #4a5a70;
  --heading: #0f1722;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-bg: #dff7f1;
  --border: #d7e0eb;
  --code-bg: #0f1722;
  --code-text: #e8f1ff;
  --link: #0b63ce;
  --shadow: 0 10px 30px rgba(15, 23, 34, 0.08);
  --focus: #2563eb;
  --canvas-fade: rgba(244,247,251,0.82);
}
html[data-theme="dark"] {
  --bg: #0b1118;
  --bg-elev: #121a24;
  --bg-soft: #172231;
  --text: #e6edf6;
  --text-muted: #a9b8cc;
  --heading: #f7fbff;
  --accent: #5eead4;
  --accent-strong: #99f6e4;
  --accent-bg: rgba(94,234,212,0.12);
  --border: #243244;
  --code-bg: #091018;
  --code-text: #e6f1ff;
  --link: #7dd3fc;
  --shadow: 0 12px 34px rgba(0,0,0,0.35);
  --focus: #7dd3fc;
  --canvas-fade: rgba(11,17,24,0.78);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 19px;
  line-height: 1.75;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#torus { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; opacity: 0.55; }
.overlay { position: relative; z-index: 1; }
.skip-link { position: absolute; left: -999px; top: auto; }
.skip-link:focus { left: 16px; top: 16px; background: var(--bg-elev); color: var(--heading); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { font-weight: 700; color: var(--heading); letter-spacing: .02em; }
.topnav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.topnav a { color: var(--text-muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.topnav a:hover, .topnav a:focus { color: var(--accent-strong); }
.theme-toggle {
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--heading);
  padding: 8px 14px; border-radius: 999px; font-size: .95rem; cursor: pointer; font-weight: 600;
}
.theme-toggle:hover { border-color: var(--accent); }
main, .hero-wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.hero-wrap { padding-top: 36px; }
.hero {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px;
  padding: 36px; box-shadow: var(--shadow);
}
.eyebrow { color: var(--accent-strong); text-transform: uppercase; letter-spacing: .14em; font-size: .8rem; font-weight: 700; margin: 0 0 10px; }
h1, h2, h3 { color: var(--heading); line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 4.2vw, 3.4rem); margin: 0 0 14px; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 2.5vw, 2.2rem); margin: 0 0 14px; }
h3 { font-size: 1.25rem; margin: 0 0 8px; }
.lede { font-size: 1.15rem; color: var(--text-muted); max-width: 70ch; margin: 0 0 16px; }
.reading { max-width: 72ch; }
.reading-wide { max-width: 78ch; }
.muted { color: var(--text-muted); }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.pill { padding: 8px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-bg); color: var(--accent-strong); font-size: .92rem; font-weight: 600; }
.cta-row { display: flex; gap: 12px; margin: 22px 0 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px; border: 1px solid var(--border);
  color: var(--heading); text-decoration: none; background: var(--bg-soft); cursor: pointer;
  font-weight: 600; font-size: 1rem; line-height: 1.3;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); color: #062a25; border-color: transparent; }
html[data-theme="dark"] .btn.primary { color: #042f2e; }
.btn.small { padding: 9px 14px; font-size: .95rem; border-radius: 10px; }
.live-panel { display: grid; grid-template-columns: 1fr 1.5fr; gap: 20px; margin-top: 22px; }
.label { display: block; color: var(--accent-strong); font-size: .9rem; font-weight: 600; margin-bottom: 8px; }
.chord-ring { display: flex; flex-wrap: wrap; gap: 8px; min-height: 48px; align-content: flex-start; }
.chord { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--bg-soft); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.demo-box { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 16px; padding: 18px; }
.demo-grid { display: grid; gap: 10px; }
.demo-grid label { display: grid; gap: 5px; color: var(--text-muted); font-size: .98rem; font-weight: 500; }
input, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-elev); color: var(--text); font-size: 1rem; font-family: inherit;
}
input:focus, textarea:focus, .btn:focus, .theme-toggle:focus, a:focus { outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent); outline-offset: 2px; }
.demo-actions { margin: 12px 0; display: flex; gap: 10px; flex-wrap: wrap; }
main { padding-top: 28px; padding-bottom: 64px; display: grid; gap: 26px; }
.card { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.card-sub { margin-top: 20px; padding: 18px 20px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--border); }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.step { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid article { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.grid.scenarios { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.scenario .tag { display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-bg); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; font-weight: 700; }
.scenario p { margin: 8px 0; color: var(--text-muted); }
.scenario p strong { color: var(--heading); }
.note-inline { font-size: .92rem; color: #7a4b00; border-left: 4px solid #e0a100; padding: 8px 12px; background: rgba(224,161,0,0.08); border-radius: 6px; }
html[data-theme="dark"] .note-inline { color: #ffdca8; border-left-color: #f0b429; background: rgba(240,180,41,0.08); }
.card.highlight { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); }
.lede-sm { font-size: 1.08rem; color: var(--text-muted); max-width: 75ch; }
.quantum-grid ul, .why-next ul, #integrations ul { margin: 10px 0 0 22px; padding: 0; color: var(--text-muted); }
.quantum-grid li, .why-next li, #integrations li { margin: 10px 0; }
.quantum-grid li strong, .why-next li strong { color: var(--heading); }
.qr-note { margin-top: 18px; padding: 18px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-soft); color: var(--text-muted); }
.table-wrap { overflow-x: auto; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { border: 1px solid var(--border); padding: 14px 16px; vertical-align: top; text-align: left; }
th { background: var(--bg-soft); color: var(--heading); }
tr:nth-child(even) td { background: color-mix(in srgb, var(--bg-soft) 50%, transparent); }
pre, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
code { background: var(--bg-soft); border: 1px solid var(--border); padding: 2px 6px; border-radius: 6px; font-size: .92em; color: var(--heading); }
pre { background: var(--code-bg); color: var(--code-text); border: 1px solid #1f2b3a; border-radius: 14px; padding: 18px; overflow: auto; font-size: .95rem; line-height: 1.65; }
pre code { background: none; border: none; padding: 0; color: inherit; font-size: 1em; }
.code.small { font-size: .9rem; max-height: 260px; white-space: pre-wrap; word-break: break-word; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
.sdk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.download-all { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 18px 20px; background: var(--accent-bg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border)); border-radius: 14px; margin: 10px 0 18px; }
footer { margin-top: 10px; color: var(--text-muted); text-align: center; font-size: .98rem; padding: 20px 0 10px; }
/* doc pages */
.doc-page main { max-width: 860px; margin: 0 auto; padding: 28px 24px 64px; }
.doc-header { margin-bottom: 22px; }
.doc-meta { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.back-link { display: inline-flex; margin-bottom: 12px; font-weight: 600; }
.prose { max-width: 72ch; font-size: 1.05rem; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin-top: 32px; }
.prose h3 { margin-top: 24px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 8px 0; }
.notice { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
@media (max-width: 900px) {
  .live-panel { grid-template-columns: 1fr; }
  .hero, .card { padding: 22px; }
  .topbar-inner { padding: 12px 16px; }
  body { font-size: 18px; }
}
@media print {
  #torus, .topbar, .cta-row, .live-panel, .theme-toggle { display: none !important; }
  body { background: #fff; color: #111; }
  .card, .hero { box-shadow: none; }
}

/* 1-click solution presentation */
.shield-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 8px; }
.shield-pill { padding: 9px 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--border)); background: var(--accent-bg); color: var(--accent-strong); font-size: .95rem; font-weight: 700; }
.one-click-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; margin: 14px 0 20px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-bg), var(--bg-soft));
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
}
.banner-title { margin: 0 0 4px; font-size: 1.3rem; font-weight: 700; color: var(--heading); }
.one-click-grid .action-card { position: relative; }
.action-card .tag { display: inline-block; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-bg); padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; font-weight: 700; }
.steps-list { margin: 10px 0 0 22px; padding: 0; color: var(--text-muted); }
.steps-list li { margin: 8px 0; }

.integrations-grid .action-card p { margin: 8px 0; }
.integrations-grid .sdk-actions { margin-top: 10px; }
