/* ── design tokens ──────────────────────────────────────────── */
:root {
  --bg:       #0f172a;
  --surface:  #1e293b;
  --surface2: #334155;
  --border:   #334155;
  --text:     #e2e8f0;
  --muted:    #94a3b8;
  --accent:   #3b82f6;
  --green:    #22c55e;
  --amber:    #f59e0b;
  --orange:   #f97316;
  --red:      #ef4444;
  --radius:   10px;
  --font:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── base reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body { font-family: var(--font); background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── language toggle (all pages) ────────────────────────────── */
.lang-toggle { font-size: .75rem; color: #475569; margin-bottom: 1.5rem; }
.lang-toggle a { color: #64748b; text-decoration: none; }
.lang-toggle a:hover { color: var(--muted); }

/* ════════════════════════════════════════════════════════════ */
/* DOWNLOAD PAGES                                               */
/* ════════════════════════════════════════════════════════════ */
body.download { display: flex; flex-direction: column; align-items: center; padding: 2rem; }
body.download h1 { font-size: 2rem; margin-bottom: .5rem; }
body.download .subtitle { color: var(--muted); margin-bottom: .5rem; }
body.download .card { background: var(--surface); border-radius: 12px; padding: 2rem; max-width: 500px; width: 100%; text-align: center; }

.detected { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: .75rem 2rem; border-radius: 8px; text-decoration: none; font-size: 1.1rem; font-weight: 500; transition: background .2s; }
.btn:hover { background: #2563eb; }
.btn.disabled { background: #475569; cursor: not-allowed; pointer-events: none; }
.all-platforms { margin-top: 2rem; }
.toggle { background: none; border: none; color: #60a5fa; cursor: pointer; font-size: .9rem; text-decoration: underline; }
.platforms { display: none; margin-top: 1rem; text-align: left; }
.platforms.show { display: block; }
.platforms a { display: block; color: #93c5fd; padding: .4rem 0; text-decoration: none; }
.platforms a:hover { color: #bfdbfe; }
.install-cmd { margin-top: 2rem; background: var(--bg); border-radius: 8px; padding: 1rem; font-family: monospace; font-size: .85rem; color: #a5b4fc; position: relative; text-align: left; word-break: break-all; }
.copy-btn { position: absolute; top: .5rem; right: .5rem; background: var(--surface2); border: none; color: var(--text); padding: .3rem .6rem; border-radius: 4px; cursor: pointer; font-size: .75rem; }
.copy-btn:hover { background: #475569; }
.unsupported { color: #f87171; background: var(--surface); border: 1px solid #7f1d1d; border-radius: 8px; padding: 1rem; margin-top: 1rem; font-size: .9rem; }
.chmod-note { margin-top: 1rem; font-size: .8rem; color: #64748b; }
.chmod-note code { background: var(--bg); padding: .1rem .35rem; border-radius: 3px; font-family: monospace; color: #a5b4fc; }
.app-note { margin-top: 1.25rem; background: var(--bg); border-radius: 8px; padding: 1rem; font-size: .8rem; color: var(--muted); text-align: left; }
.app-note summary { cursor: pointer; color: #60a5fa; font-size: .85rem; margin-bottom: .5rem; list-style: none; }
.app-note summary::-webkit-details-marker { display: none; }
.app-note pre { margin: .5rem 0 0; font-family: monospace; font-size: .8rem; color: #a5b4fc; white-space: pre-wrap; word-break: break-all; }
.sec-note { margin-top: 1.25rem; background: var(--bg); border-radius: 8px; padding: 1rem; font-size: .8rem; color: var(--muted); text-align: left; }
.sec-note summary { cursor: pointer; color: #fbbf24; font-size: .85rem; font-weight: 600; list-style: none; display: flex; align-items: center; gap: .4rem; }
.sec-note summary::-webkit-details-marker { display: none; }
.sec-note summary::before { content: "⚠"; font-size: .9rem; }
.sec-block { margin-top: .85rem; padding-top: .75rem; border-top: 1px solid var(--surface); }
.sec-block:first-of-type { margin-top: .5rem; padding-top: .5rem; border-top: none; }
.sec-block strong { color: var(--text); display: block; margin-bottom: .4rem; font-size: .82rem; }
.sec-block ol { padding-left: 1.2rem; margin: 0; }
.sec-block li { margin-bottom: .25rem; line-height: 1.5; }
.sec-block code { background: var(--surface); padding: .1rem .3rem; border-radius: 3px; font-family: monospace; color: #a5b4fc; font-size: .8rem; }
.sec-block em { color: #cbd5e1; font-style: normal; background: var(--surface); padding: .05rem .3rem; border-radius: 3px; }

/* ════════════════════════════════════════════════════════════ */
/* COMMUNITY PAGES                                              */
/* ════════════════════════════════════════════════════════════ */
body.community { padding: 2rem; }
body.community h1 { text-align: center; font-size: 2rem; margin-bottom: .5rem; }
body.community .subtitle { text-align: center; color: var(--muted); margin-bottom: .35rem; }
body.community .lang-toggle { text-align: center; }
body.community .card { background: var(--surface); border-radius: var(--radius); padding: 1.2rem; text-align: center; }
body.community h2 { max-width: 900px; margin: 2rem auto .75rem; font-size: 1.2rem; }
body.community table { max-width: 900px; margin: 0 auto; width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; }
body.community th, body.community td { padding: .6rem 1rem; text-align: left; border-bottom: 1px solid var(--surface2); }
body.community th { background: var(--bg); color: var(--muted); font-size: .8rem; text-transform: uppercase; }

.header { display: flex; align-items: center; justify-content: center; gap: 1.5rem; margin-bottom: .5rem; }
.header h1 { margin: 0; }
.header .cta-btn { font-size: .9rem; padding: .5rem 1.2rem; }
.card .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; }
.card .value { font-size: 1.8rem; font-weight: 700; margin-top: .3rem; }
.green { color: #4ade80; }
.blue  { color: #60a5fa; }
.yellow{ color: #fbbf24; }
.purple{ color: #a78bfa; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 1rem; max-width: 900px; margin: 0 auto 2rem; }
.gpu-list { max-width: 900px; margin: 0 auto; }
.gpu-item { display: flex; justify-content: space-between; padding: .4rem 0; border-bottom: 1px solid var(--surface); }
.loading { text-align: center; color: #64748b; padding: 2rem; }
.cta-btn { display: inline-block; background: #4ade80; color: var(--bg); padding: .75rem 2rem; border-radius: 8px; text-decoration: none; font-size: 1.1rem; font-weight: 600; transition: background .2s; }
.cta-btn:hover { background: var(--green); }

/* ════════════════════════════════════════════════════════════ */
/* INSTALLATION PAGES                                           */
/* ════════════════════════════════════════════════════════════ */
body.installation { line-height: 1.65; padding: 2.5rem 1.5rem 4rem; }
body.installation a { color: var(--accent); text-decoration: none; }
body.installation a:hover { text-decoration: underline; }
body.installation code { font-family: "SF Mono", "Fira Code", monospace; background: var(--surface); padding: .15em .4em; border-radius: 4px; font-size: .875em; color: #a5b4fc; }
body.installation h3 { font-size: 1.05rem; color: var(--amber); margin: 1.5rem 0 .5rem; font-weight: 600; }
body.installation p { margin-bottom: .85rem; }
body.installation ul, body.installation ol { padding-left: 1.5rem; margin-bottom: .85rem; }
body.installation li { margin: .35rem 0; }

.page { max-width: 780px; margin: 0 auto; }

.cover { text-align: center; padding: 3rem 1rem 2.5rem; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.cover h1 { font-size: 2.4rem; font-weight: 700; letter-spacing: -.5px; }
.cover h1 span { font-weight: 400; color: var(--muted); }
.cover p { color: var(--muted); margin-top: .5rem; font-size: 1.05rem; }
.cover .version { display: inline-block; margin-top: 1rem; background: var(--surface); border-radius: 99px; padding: .3rem 1rem; font-size: .85rem; color: var(--muted); }

.toc { background: var(--surface); border-radius: var(--radius); padding: 1.5rem 2rem; margin-bottom: 3rem; }
.toc h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 1rem; }
.toc ol { padding-left: 1.4rem; }
.toc li { margin: .35rem 0; }
.toc a { color: var(--text); font-size: .95rem; }
.toc a:hover { color: var(--accent); }

section { margin-bottom: 3.5rem; }
section + section { border-top: 1px solid var(--border); padding-top: 3rem; }
h2.section-title { font-size: 1.55rem; font-weight: 700; margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem; }
h2.section-title .num { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .85rem; font-weight: 700; flex-shrink: 0; }

.callout { border-radius: var(--radius); padding: .85rem 1.1rem; margin: 1.1rem 0; font-size: .92rem; line-height: 1.6; }
.callout.warning { background: #451a03; border-left: 3px solid var(--orange); color: #fed7aa; font-weight: 500; }
.callout.info    { background: #0c2340; border-left: 3px solid var(--accent);  color: #bfdbfe; }
.callout.success { background: #052e16; border-left: 3px solid var(--green);   color: #bbf7d0; }
.callout.danger  { background: #450a0a; border-left: 3px solid var(--red);     color: #fecaca; }

.screenshot { border-radius: var(--radius); overflow: hidden; margin: 1.4rem 0; border: 1px solid var(--border); background: var(--surface); }
.screenshot img { display: block; width: 100%; height: auto; }
.screenshot figcaption { font-size: .78rem; color: var(--muted); text-align: center; padding: .5rem .75rem .6rem; background: var(--surface2); }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 4px; font-size: .8rem; font-weight: 600; background: var(--surface2); color: var(--text); border: 1px solid var(--border); }
.badge.green { background: #14532d; color: #86efac; border-color: #16a34a; }
.badge.amber { background: #451a03; color: #fde68a; border-color: #d97706; }
.badge.red   { background: #450a0a; color: #fca5a5; border-color: #dc2626; }

.platform-block { background: var(--surface); border-radius: var(--radius); padding: 1rem 1.25rem; margin: .85rem 0; }
.platform-block strong { display: block; font-size: .92rem; color: var(--text); margin-bottom: .45rem; }
.platform-block ol { margin: 0; }

.sec-guarantees { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.sec-guarantees li { padding: .65rem .9rem .65rem 2.6rem; margin: .4rem 0; background: var(--surface); border-radius: 8px; position: relative; font-size: .92rem; line-height: 1.6; }
.sec-guarantees li::before { content: "✓"; position: absolute; left: .9rem; top: .65rem; color: var(--green); font-weight: 700; font-size: 1rem; }
.sec-guarantees li strong { color: var(--text); }

#back-to-top { position: fixed; bottom: 2rem; right: 2rem; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--accent); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 16px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 999; }
#back-to-top.visible { opacity: 1; pointer-events: auto; }
#back-to-top:hover { transform: translateY(-3px); }

@media print {
  :root { --bg: #fff; --surface: #f1f5f9; --surface2: #e2e8f0; --border: #cbd5e1; --text: #1e293b; --muted: #475569; --accent: #2563eb; }
  body { background: #fff; color: #1e293b; padding: 0; }
  .toc { break-inside: avoid; }
  section { break-inside: avoid; }
  h2.section-title .num { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .callout { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  #back-to-top { display: none; }
}
