/* ---------- Base / Theme ---------- */
:root{
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --card: #ffffff;
  --border: #e6e6e6;
  --accent: #0a7b0a;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  --container: clamp(320px, 92vw, 920px);
  --gap: 14px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0f1115;
    --text: #ededed;
    --muted: #a0a0a0;
    --card: #151821;
    --border: #252a35;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* ---------- Layout ---------- */
.container {
  width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(12px, 4vw, 18px);
}

.site-header {
  padding: clamp(16px, 3vw, 28px) 0 6px;
}
.site-header h1 {
  margin: 0;
  font-size: clamp(22px, 3.2vw, 32px);
  letter-spacing: .2px;
}
.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 2.3vw, 16px);
}

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}

/* ---------- Cards ---------- */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(14px, 3.2vw, 22px);
  margin: 12px 0;
}

.section-title{
  margin: 0 0 10px;
  font-size: clamp(18px, 2.6vw, 22px);
}

/* ---------- Stats ---------- */
.stat-grid{
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
}
@media (min-width: 520px){
  .stat-grid{ grid-template-columns: repeat(3, 1fr); }
}
.stat{
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.stat-label{
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}
.stat-value{
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
}

/* ---------- Download grid ---------- */
.download-grid{
  display: grid;
  gap: var(--gap);
  grid-template-columns: 1fr;
  margin-top: 6px;
}
@media (min-width: 620px){
  .download-grid{ grid-template-columns: repeat(3, 1fr); }
}

.btn{
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: clamp(12px, 2.8vw, 16px);
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  background: linear-gradient(0deg, rgba(0,0,0,0.02), rgba(255,255,255,0.02));
  transition: transform .06s ease, background .2s ease, border-color .2s ease;
  min-height: 72px;            /* large tap target on mobile */
  font-weight: 600;
}
.btn:hover{ transform: translateY(-1px); border-color: #cfd4dc; }
.btn-sub{ font-weight: 400; color: var(--muted); font-size: 13px; }

.tip{
  margin-top: 12px;
  font-style: italic;
  color: var(--muted);
}

.hint{
  margin-top: 8px;
  color: var(--accent);
  font-weight: 700;
}

.recommended{ border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in oklab, var(--accent) 24%, transparent); }

/* ---------- Accessibility tweaks ---------- */
@media (hover: none){
  .btn:hover{ transform:none; }
}