:root {
  --bg: #ffffff;
  --fg: #1f2937;
  --muted: #6b7280;
  --primary: #1a73e8;
  --surface: #f3f4f6;
  --border: #e5e7eb;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f14;
    --fg: #e5e7eb;
    --muted: #9ca3af;
    --primary: #4ea1ff;
    --surface: #11161c;
    --border: #1f2937;
  }
}

* { box-sizing: border-box }

html, body { height: 100% }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--primary);
  color: #fff;
  padding: 8px 12px;
  border-radius: 6px;
}

.wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 56px 0 32px;
  background: linear-gradient(180deg, rgba(26,115,232,0.08) 0%, rgba(26,115,232,0) 100%);
  border-radius: 18px;
}

header img {
  width: 140px;
  height: auto;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.tagline {
  margin: 0;
  font-size: 1.05rem;
  color: var(--muted);
}

.meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
}

.meta img {
  width: 12px;
  height: auto;
  display: inline-block;
}

.actions { margin-top: 6px }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .12s ease, filter .12s ease, box-shadow .12s ease;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #1a73e8 0%, #1667cf 100%);
  box-shadow: 0 8px 16px rgba(26,115,232,.16);
}
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px) }
.btn-primary:active { transform: translateY(0) }
.btn:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  transition: transform .12s ease, box-shadow .12s ease;
}
.card.featured { grid-column: 1 / -1 }
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.08) }
.card:focus-within { outline: 3px solid var(--primary); outline-offset: 3px }

.card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px }
.card-header h3 { margin: 0; font-size: 1.2rem }
.icon { width: 22px; height: 22px; color: var(--primary) }

.download-list { list-style: none; padding: 0; margin: 10px 0 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px }
.pill { display: inline-flex; align-items: center; justify-content: center; padding: 10px 12px; border-radius: 999px; border: 1px solid var(--border); text-decoration: none; color: var(--fg); background: var(--bg) }
.pill:hover { filter: brightness(1.05) }
.pill:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px }

h2, h3 {
  margin: 0 0 12px;
  color: var(--fg);
}

h2 { font-size: 1.75rem }
h3 { font-size: 1.25rem }

p { margin: 0 0 12px }

ul { margin: 0 0 12px 20px }
li { margin: 6px 0 }

a { color: var(--primary) }
a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px }

pre {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  overflow-x: auto;
}

.codeblock { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg) }
.code-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface); border-bottom: 1px solid var(--border) }
.code-title { font-weight: 600; color: var(--muted) }
.code-content { margin: 0; border: 0; border-radius: 0 }
.btn-ghost { color: var(--fg); background: transparent; border: 1px solid var(--border) }
.btn-ghost:hover { background: var(--surface); filter: none }

footer {
  text-align: center;
  padding: 28px 0 40px;
  color: var(--muted);
}

footer a { color: var(--primary); text-decoration: none }
footer a:hover { text-decoration: underline }
footer a:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px }

@media (max-width: 640px) {
  .wrapper { padding: 16px }
  header h1 { font-size: 1.9rem }
  .cards { grid-template-columns: 1fr; gap: 14px }
}

@media (min-width: 641px) and (max-width: 960px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)) }
  .download-list { grid-template-columns: repeat(2, minmax(0, 1fr)) }
}