/* Secure Backup — website styles. No external fonts or frameworks. */

:root {
  --bg: #09090b;
  --bg-soft: #0f0f12;
  --surface: #141418;
  --surface-2: #1b1b21;
  --border: #26262e;
  --border-strong: #34343e;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --accent: #3b82f6;
  --accent-2: #6366f1;
  --accent-soft: rgba(59, 130, 246, 0.12);
  --success: #10b981;
  --success-soft: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --danger: #f43f5e;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --max: 1160px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #fafafa;
  --bg-soft: #f4f4f5;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --success-soft: rgba(16, 185, 129, 0.1);
  --shadow: 0 20px 50px -25px rgba(24, 24, 27, 0.25);
  color-scheme: light;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
code, pre, kbd { font-family: var(--mono); font-size: 0.9em; }
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
}
pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  overflow-x: auto;
  line-height: 1.55;
}
pre code { background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--text-muted); font-size: 0.92rem; font-weight: 500;
  padding: 8px 12px; border-radius: 8px; transition: color .15s, background .15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  cursor: pointer; transition: color .15s, border-color .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 12px;
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s, border-color .15s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 10px 30px -10px rgba(79, 70, 229, 0.6);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -10px rgba(79, 70, 229, 0.75); }
.btn-secondary { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn-sm { height: 38px; padding: 0 14px; font-size: 0.88rem; border-radius: 10px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  padding: 5px 12px; border-radius: 999px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.12rem; font-weight: 650; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.gradient-text {
  background: linear-gradient(135deg, #60a5fa 0%, #818cf8 55%, #34d399 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
[data-theme="light"] .gradient-text { background-image: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #059669 100%); }

/* ---------- Sections ---------- */
section { padding: 96px 0; }
.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head p { margin: 14px 0 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* ---------- Hero ---------- */
.hero { padding: 88px 0 40px; text-align: center; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 640px; z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(59, 130, 246, 0.18), transparent 70%),
    radial-gradient(ellipse 40% 40% at 70% 40%, rgba(99, 102, 241, 0.14), transparent 70%);
}
.hero h1 { margin: 22px auto 0; max-width: 900px; }
.hero .lead { margin: 22px auto 0; max-width: 680px; }
.hero-cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-note { margin-top: 16px; font-size: 0.85rem; color: var(--text-faint); }
.hero-shot {
  margin: 56px auto 0; max-width: 1100px;
  border-radius: var(--radius-lg); border: 1px solid var(--border-strong);
  overflow: hidden; box-shadow: var(--shadow), 0 0 0 6px color-mix(in srgb, var(--surface) 60%, transparent);
}
.window-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.window-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border-strong); }
.window-bar em { margin-left: 10px; font-style: normal; font-size: 0.78rem; color: var(--text-faint); }

/* ---------- Trust strip ---------- */
.trust { padding: 28px 0 8px; }
.trust ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 0; padding: 0; }
.trust li { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.trust svg { width: 16px; height: 16px; color: var(--success); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; transition: border-color .2s, transform .2s;
}
.card:hover { border-color: var(--border-strong); }
.card p { margin: 10px 0 0; color: var(--text-muted); font-size: 0.95rem; }
.card .icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.card .icon.green { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.card .icon svg { width: 21px; height: 21px; }

.problem .card { padding: 24px; }
.problem .quote { font-weight: 650; color: var(--text); font-size: 1.02rem; }
.problem .answer { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--border-strong); color: var(--text-muted); font-size: 0.93rem; }
.problem .answer strong { color: var(--success); font-weight: 650; }

/* ---------- Tour ---------- */
.tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 26px; }
.tab {
  font: inherit; font-size: 0.92rem; font-weight: 600; color: var(--text-muted);
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 16px; cursor: pointer; transition: all .15s;
}
.tab[aria-selected="true"] { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.tab:hover:not([aria-selected="true"]) { color: var(--text); border-color: var(--border-strong); }
.tab-panel { display: none; }
.tab-panel.active { display: grid; grid-template-columns: 1fr 2.1fr; gap: 32px; align-items: center; }
.tab-panel h3 { font-size: 1.4rem; }
.tab-panel ul { margin: 16px 0 0; padding: 0; list-style: none; }
.tab-panel li { position: relative; padding-left: 26px; margin: 10px 0; color: var(--text-muted); }
.tab-panel li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px;
  border-left: 2px solid var(--success); border-bottom: 2px solid var(--success); transform: rotate(-45deg);
}
.shot { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-family: var(--mono); font-weight: 700; font-size: 0.85rem;
  color: var(--accent); margin-bottom: 12px;
}

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.94rem; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 650; color: var(--text); background: var(--surface-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { color: var(--text-muted); }
td:first-child { color: var(--text); font-weight: 550; }
.yes { color: var(--success); font-weight: 600; }
.no { color: var(--danger); font-weight: 600; }
.part { color: var(--warning); font-weight: 600; }
.highlight-col { background: color-mix(in srgb, var(--accent) 6%, transparent); }

/* ---------- Security split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 20px 0 0; }
.checklist li { display: flex; gap: 12px; margin: 14px 0; color: var(--text-muted); }
.checklist li svg { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--success); }
.checklist li strong { color: var(--text); font-weight: 600; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 0.92rem; margin: 0; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; color: var(--text); font-family: var(--mono); font-size: 0.86rem; }
.kv dd.yes { color: var(--success); }
.kv dd.part { color: var(--warning); }

/* ---------- Downloads ---------- */
.dl-card { display: flex; flex-direction: column; }
.dl-card .os { display: flex; align-items: center; gap: 12px; }
.dl-card .os svg { width: 28px; height: 28px; color: var(--text); }
.dl-card .badge { margin-left: auto; }
.dl-card .actions { display: grid; gap: 8px; margin-top: auto; padding-top: 22px; }
.dl-card .actions .btn { width: 100%; }
.dl-card.recommended { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.badge {
  display: inline-flex; align-items: center; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text-muted);
}
.badge.green { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); background: var(--success-soft); }
.badge.blue { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); background: var(--accent-soft); }
.badge.amber { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.alt-links { margin: 12px 0 0; font-size: 0.85rem; color: var(--text-faint); }
.alt-links a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.release-line { text-align: center; margin-top: 22px; color: var(--text-faint); font-size: 0.88rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin: 0 auto; }
.faq details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 0 22px; margin-bottom: 10px; transition: border-color .15s;
}
.faq details[open] { border-color: var(--border-strong); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 600;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-faint); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 18px; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center; border-radius: 28px; padding: 64px 28px;
  background:
    radial-gradient(ellipse 70% 120% at 50% 0%, rgba(59, 130, 246, 0.2), transparent 70%),
    var(--surface);
  border: 1px solid var(--border);
}
.cta-band p { margin: 14px auto 28px; max-width: 560px; }

/* ---------- Docs pages ---------- */
.page-hero { padding: 64px 0 28px; border-bottom: 1px solid var(--border); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.page-hero p { margin: 14px 0 0; max-width: 720px; }
.doc { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 48px 0 96px; }
.toc { position: sticky; top: 88px; align-self: start; font-size: 0.9rem; }
.toc p { margin: 0 0 10px; font-weight: 650; color: var(--text); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.toc a { display: block; color: var(--text-muted); padding: 6px 0 6px 12px; border-left: 2px solid var(--border); }
.toc a:hover { color: var(--text); border-left-color: var(--accent); }
.prose { max-width: 760px; min-width: 0; }
.prose h2 { font-size: 1.55rem; margin: 48px 0 14px; scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 10px; font-size: 1.1rem; }
.prose p, .prose li { color: var(--text-muted); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.callout {
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--border));
  background: color-mix(in srgb, var(--warning) 8%, transparent);
  border-radius: var(--radius); padding: 14px 18px; margin: 20px 0; color: var(--text-muted);
}
.callout.info { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); background: var(--accent-soft); }
.callout strong { color: var(--text); }
.updated { font-size: 0.85rem; color: var(--text-faint); margin-top: 10px; }

/* Changelog */
.release { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); padding: 28px; margin-bottom: 22px; }
.release header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.release header h2 { margin: 0; font-size: 1.4rem; }
.change-group h3 { margin-top: 24px; display: flex; align-items: center; gap: 8px; }
.change-group ul { list-style: none; padding: 0; margin: 8px 0 0; }
.change-group li { padding: 9px 0; border-bottom: 1px solid var(--border); color: var(--text-muted); display: flex; gap: 12px; }
.change-group li:last-child { border-bottom: 0; }
.change-group li a.issue { font-family: var(--mono); font-size: 0.82rem; color: var(--accent); text-decoration: none; flex: none; min-width: 42px; padding-top: 2px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 48px 0 36px; font-size: 0.9rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-grid h4 { margin: 0 0 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); }
.footer-grid a { display: block; color: var(--text-muted); padding: 4px 0; }
.footer-grid a:hover { color: var(--text); }
.footer-grid .about p { color: var(--text-muted); max-width: 320px; margin: 12px 0 0; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-faint); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; }
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .card { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .tab-panel.active { grid-template-columns: 1fr; }
  .doc { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  section { padding: 72px 0; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .menu-btn { display: inline-flex; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 10px 16px 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .github-label { display: none; }
  .hero { padding-top: 56px; }
  .footer-grid { grid-template-columns: 1fr; }
}
