/* prisma2r.com — one stylesheet, no framework.
   Colours follow brand.md (the app's own stylesheet). Dark first, light supported. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- tokens ---------- */
:root {
  color-scheme: dark;
  --bg: #0f1115;
  --bg-2: #13161c;
  --card: #171a21;
  --card-2: #1d212a;
  --line: #2a2f3a;
  --line-soft: #222631;
  --text: #c9ced8;
  --text-strong: #eef0f4;
  --text-muted: #8b93a3;
  --accent: #8b7cf6;
  --accent-dark: #6d5ae6;
  --accent-press: #5a47d6;
  --accent-text: #8b7cf6;
  --link: #b4a9ff;
  --link-hover: #d3ccff;
  --btn-bg: #6d5ae6;
  --btn-bg-hover: #5a47d6;
  --btn-text: #ffffff;
  --glow: rgba(139, 124, 246, 0.22);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --spectrum: linear-gradient(90deg, #f5a65b, #ec6fa8, #8b7cf6, #4fc3d9, #5ed39a);
  --radius: 10px;
  --radius-sm: 7px;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f7fb;
  --bg-2: #eef0f6;
  --card: #ffffff;
  --card-2: #f3f4f9;
  --line: #d9dce6;
  --line-soft: #e6e8f0;
  --text: #2c313c;
  --text-strong: #11141a;
  --text-muted: #565e6d;
  --link: #5443d0;
  --accent-text: #5f4bdc;
  --link-hover: #3b2db0;
  --glow: rgba(109, 90, 230, 0.16);
  --shadow: 0 20px 50px rgba(30, 30, 60, 0.18);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f7fb;
    --bg-2: #eef0f6;
    --card: #ffffff;
    --card-2: #f3f4f9;
    --line: #d9dce6;
    --line-soft: #e6e8f0;
    --text: #2c313c;
    --text-strong: #11141a;
    --text-muted: #565e6d;
    --link: #5443d0;
  --accent-text: #5f4bdc;
    --link-hover: #3b2db0;
    --glow: rgba(109, 90, 230, 0.16);
    --shadow: 0 20px 50px rgba(30, 30, 60, 0.18);
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { color: var(--text-strong); line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 3.6vw, 3.6rem); font-weight: 760; letter-spacing: -0.03em; line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 1.15rem + 1.4vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 650; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.25em; }
li + li { margin-top: 0.35em; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
strong { color: var(--text-strong); font-weight: 650; }
code, kbd {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--card-2);
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 0.08em 0.38em;
  color: var(--text-strong);
}
hr { border: 0; height: 1px; background: var(--line); margin: 2.5rem 0; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 780px; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--btn-bg); color: var(--btn-text); padding: 10px 16px; border-radius: var(--radius-sm);
  font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--btn-text); }

/* ---------- header ---------- */
.site-header { position: relative; background: var(--bg); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--spectrum); opacity: 0.85; }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-strong); font-weight: 720; font-size: 1.25rem; letter-spacing: -0.02em; margin-right: auto; }
.brand:hover { color: var(--text-strong); }
.brand img { width: 34px; height: 34px; }
.brand .two-r, .wordmark .two-r { color: var(--accent-text); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text); text-decoration: none; font-weight: 550; font-size: 0.98rem;
}
.site-nav a:hover { background: var(--card); color: var(--text-strong); }
.site-nav a[aria-current="page"] { color: var(--text-strong); background: var(--card); box-shadow: inset 0 -2px 0 var(--accent); }
.site-nav .ext::after { content: " \2197"; font-size: 0.85em; color: var(--text-muted); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: transparent; color: var(--text); border: 1px solid var(--line);
  cursor: pointer; padding: 0; font: inherit;
}
.icon-btn:hover { background: var(--card); color: var(--text-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="dark"]) .theme-toggle .icon-moon { display: none; }
}
.theme-toggle, .menu-toggle { display: none; }
.js .theme-toggle { display: inline-flex; }

@media (max-width: 799px) {
  .header-row { flex-wrap: wrap; }
  .js .menu-toggle { display: inline-flex; }
  .site-nav { order: 3; flex-basis: 100%; }
  .js .site-nav { display: none; }
  .js .site-nav.is-open { display: block; padding-bottom: 14px; }
  .js .site-nav ul { flex-direction: column; }
  .js .site-nav a { padding: 12px; font-size: 1.05rem; }
  html:not(.js) .site-nav { padding-bottom: 10px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius);
  font-weight: 650; font-size: 1.02rem; text-decoration: none; line-height: 1.2;
  border: 1px solid transparent; transition: background-color .15s ease, border-color .15s ease;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-text); box-shadow: 0 8px 24px rgba(109, 90, 230, 0.35); }
.btn-primary:hover { background: var(--btn-bg-hover); color: var(--btn-text); }
.btn-secondary { background: var(--card); color: var(--text-strong); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--accent); color: var(--text-strong); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- sections ---------- */
main { display: block; }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section-tight { padding-block: clamp(32px, 5vw, 64px); }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.eyebrow {
  display: inline-block; margin: 0 0 10px; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--link);
}
.lead { font-size: clamp(1.1rem, 1rem + 0.45vw, 1.3rem); color: var(--text); max-width: 46ch; }
.section-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head p { color: var(--text); }

.page-head { padding-block: clamp(40px, 6vw, 80px) clamp(24px, 3vw, 40px); }
.page-head .lead { max-width: 60ch; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 8vw, 104px) 0; text-align: center; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 55%; width: min(1400px, 160%); height: 900px;
  transform: translate(-50%, -30%); pointer-events: none;
  background: radial-gradient(closest-side, var(--glow), transparent 72%);
}
.hero > .wrap { position: relative; }
.hero h1 { max-width: 16ch; margin-inline: auto; }
.hero .lead { margin: 0 auto 30px; max-width: 54ch; }
.hero .actions { justify-content: center; margin-bottom: clamp(40px, 6vw, 64px); }
.hero .shot { max-width: 1100px; margin-inline: auto; }
.hero .mock-note { justify-content: center; text-align: center; margin-bottom: 0; padding-bottom: clamp(40px, 6vw, 72px); }

/* ---------- screenshots ---------- */
.shot { margin: 0; }
.shot-frame {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid rgba(180, 169, 255, 0.22); background: #0f1115;
  box-shadow: var(--shadow), 0 0 0 5px rgba(139, 124, 246, 0.06);
  aspect-ratio: 16 / 10;
}
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 12px; font-size: 0.93rem; color: var(--text-muted); line-height: 1.5; }
.shot figcaption strong { color: var(--text); font-weight: 600; }

.mock-note {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 18px 0 0; font-size: 0.88rem; color: var(--text-muted); line-height: 1.5;
}
.mock-note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }

.shot-grid { display: grid; gap: clamp(24px, 3vw, 36px); grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 900px) {
  .shot-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .shot-grid.cols-2 .span-2 { grid-column: 1 / -1; }
}

/* ---------- steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(40px, 6vw, 80px); }
.steps > li + li { margin-top: 0; }
.step { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; margin-bottom: 14px;
  background: var(--card); border: 1px solid var(--accent); color: var(--text-strong);
  font-weight: 700; font-variant-numeric: tabular-nums;
}
.step h3 { font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.75rem); font-weight: 700; }
.step p { max-width: 46ch; }
@media (min-width: 900px) {
  .step { grid-template-columns: 5fr 7fr; gap: 56px; }
  .steps > li:nth-child(even) .step-text { order: 2; }
}

.mod-line {
  margin: clamp(48px, 6vw, 72px) 0 0; padding: 18px 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); color: var(--text); text-align: center;
}

/* ---------- features ---------- */
.feature-index { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 24px 0 0; }
.feature-index li + li { margin-top: 0; }
.feature-index a {
  display: inline-block; padding: 8px 14px; border-radius: 999px; text-decoration: none;
  border: 1px solid var(--line); background: var(--card); color: var(--text); font-size: 0.93rem; font-weight: 550;
}
.feature-index a:hover { border-color: var(--accent); color: var(--text-strong); }

.feature-group { padding-block: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-soft); }
.feature-group:first-of-type { border-top: 0; }
.feature-cols { display: grid; gap: 8px 48px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .feature-cols { grid-template-columns: 5fr 7fr; } }
.feature-cols ul { margin: 0; }
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 0.62em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-50%);
}

/* ---------- cards ---------- */
.cards { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cards.cols-2 { grid-template-columns: 1fr 1fr; } }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 28px);
}
.card h2, .card h3 { margin-bottom: 0.4em; }
.card p:last-child { margin-bottom: 0; }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em;
  color: var(--text-strong); background: var(--card-2); border: 1px solid var(--accent);
}
.note {
  border-left: 3px solid var(--accent); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin: 24px 0;
}
.note p:last-child { margin-bottom: 0; }

/* ---------- docs / prose ---------- */
.prose h2 { margin-top: 2.2em; scroll-margin-top: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ol > li, .prose ul > li { padding-left: 4px; }
.doc-steps { counter-reset: doc; list-style: none; padding: 0; }
.doc-steps { margin: 0; }
.prose .doc-steps > li { counter-increment: doc; position: relative; padding-left: 58px; margin-top: 2.6em; }
.prose .doc-steps > li:first-child { margin-top: 0; }
.doc-steps > li::before {
  content: counter(doc); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--accent); color: var(--text-strong); font-weight: 700;
}
.prose .doc-steps > li > h2 { margin-top: 0; min-height: 38px; display: flex; align-items: center; font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.6rem); }
.toc { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.toc li + li { margin-top: 0; }
.toc a { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); text-decoration: none; color: var(--text); font-size: 0.92rem; }
.toc a:hover { border-color: var(--accent); color: var(--text-strong); }

.faq-item { padding-block: 24px; border-top: 1px solid var(--line-soft); }
.faq-item:first-child { border-top: 0; padding-top: 0; }
.faq-item h2 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem); margin-bottom: 0.45em; }
.faq-item p:last-child, .faq-item ul:last-child { margin-bottom: 0; }

.legal-meta { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- download ---------- */
.dl-card { display: flex; flex-direction: column; }
.dl-card .badge { align-self: flex-start; }
.dl-card .soon { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-weight: 600; }
.dl-card .soon::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #f2b544; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding-block: clamp(64px, 12vw, 140px); }
.not-found img { width: 96px; height: 96px; margin: 0 auto 24px; }
.not-found .actions { justify-content: center; margin-top: 28px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); background: var(--bg-2); padding-block: 48px 40px; font-size: 0.95rem; }
.footer-top { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 800px) { .footer-top { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .brand { font-size: 1.15rem; margin-bottom: 10px; }
.footer-brand .brand img { width: 28px; height: 28px; }
.site-footer h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li + li { margin-top: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--text-strong); text-decoration: underline; }
.footer-legal { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 0.86rem; line-height: 1.6; }
.footer-legal p { margin-bottom: 0.6em; max-width: 90ch; }
.footer-legal a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--text-strong); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .skip-link, .actions { display: none !important; }
  body { background: #fff; color: #000; }
}
