/* X Downloader — Shared styles
   Designed to match the iOS app: X-blue accent (#1D9BF0) on a clean,
   high-contrast surface. Light by default, auto-switches to dark via
   prefers-color-scheme. No external fonts or assets beyond /assets. */

:root {
  --accent:        #1D9BF0;
  --accent-strong: #1A8CD8;
  --bg-page:       #F7F8FA;
  --bg-card:       #FFFFFF;
  --bg-input:      #F2F3F5;
  --border:        #E5E7EB;
  --border-strong: #D1D5DB;
  --text-primary:  #0F1419;
  --text-secondary:#536471;
  --text-muted:    #8B98A5;
  --shadow:        0 1px 2px rgba(15,20,25,.04), 0 8px 24px rgba(15,20,25,.06);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page:       #0B0B0E;
    --bg-card:       #16161A;
    --bg-input:      #1E1E24;
    --border:        #2A2A2E;
    --border-strong: #3A3A40;
    --text-primary:  #FAFAF9;
    --text-secondary:#9BA3AE;
    --text-muted:    #6B6B70;
    --shadow:        0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji",
    "Segoe UI Emoji", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
a:hover { color: var(--accent-strong); border-bottom-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  background: color-mix(in srgb, var(--bg-page) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
  border: none;
}
.brand img {
  width: 32px; height: 32px;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.18);
}
.brand-name { font-size: 16px; }
.nav-spacer { flex: 1; }
.nav {
  display: flex; gap: 18px; align-items: center;
}
.nav a {
  font-size: 14px;
  color: var(--text-secondary);
  border: none;
}
.nav a:hover { color: var(--text-primary); }
.nav a.active { color: var(--text-primary); font-weight: 600; }

/* ---------- Hero / page heading ---------- */
.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px 20px 64px;
}

.page-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 8px 0 8px;
}
.page-subtitle {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 4px;
}
.updated {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 32px;
}

/* ---------- Content cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 8px;
  margin: 0 0 20px;
  box-shadow: var(--shadow);
}

h2 {
  font-size: 20px;
  margin: 8px 0 12px;
  letter-spacing: -.01em;
}
h3 {
  font-size: 16px;
  margin: 18px 0 6px;
  letter-spacing: -.005em;
}
p, ul, ol {
  color: var(--text-primary);
  margin: 0 0 16px;
}
ul, ol { padding-left: 22px; }
li { margin: 6px 0; }

strong { font-weight: 600; }

/* Highlighted facts */
.callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
  margin: 0 0 16px;
}
.callout .dot {
  flex: 0 0 auto;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}
.callout p { margin: 0; color: var(--text-primary); }

/* FAQ list */
details {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
details:first-of-type { border-top: none; }
details summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
}
details summary::-webkit-details-marker { display: none; }
details summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
details[open] summary::after { transform: rotate(-135deg); }
details > div, details > p {
  padding-top: 10px;
  color: var(--text-secondary);
}
details ol, details ul { color: var(--text-secondary); }

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 8px 0 16px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 12px 10px 44px;
  border-bottom: 1px solid var(--border);
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 8px; top: 50%;
  transform: translateY(-50%);
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Email / button */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 600;
  font-size: 14px;
  border: none;
  text-decoration: none;
}
.btn:hover { background: var(--accent-strong); border-color: transparent; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 20px 40px;
}
.site-footer .inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  color: var(--text-muted);
  font-size: 13px;
}
.site-footer .inner a {
  color: var(--text-secondary);
  border: none;
}
.site-footer .inner a:hover { color: var(--text-primary); }
.spacer { flex: 1; }

/* Small screens */
@media (max-width: 520px) {
  .site-header .inner { padding: 10px 16px; gap: 10px; }
  .page { padding: 24px 16px 56px; }
  .card { padding: 20px 18px 4px; border-radius: var(--radius-md); }
  .nav { gap: 14px; }
  .brand-name { display: none; }
}
