:root {
  --canvas: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #0B0B0F;
  --ink-hover: #2A2C33;
  --secondary: #5B6170;
  --muted: #9BA1AE;
  --faded: #D5D8DE;
  --divider: #EEF0F3;
  --on-ink: #FFFFFF;
  --violet: #7C3AED;
  --card-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.05);
  --hairline: transparent;
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0B0B0F;
    --surface: #17181D;
    --ink: #F4F5F7;
    --ink-hover: #D5D8DE;
    --secondary: #A3A9B6;
    --muted: #7C8291;
    --faded: #34363F;
    --divider: #22242A;
    --on-ink: #0B0B0F;
    --violet: #A78BFA;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 8px 24px rgba(0, 0, 0, 0.35);
    --hairline: rgba(255, 255, 255, 0.06);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 460px;
  margin: 0 auto;
  padding: 36px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 4px 0 4px;
}

.hero-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  background: var(--surface);
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.5px;
  margin: 0;
  line-height: 1;
}

.hero-tagline {
  font-size: 16px;
  font-weight: 500;
  color: var(--secondary);
  margin: 0;
}

.download-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-height: 56px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 999px;
  text-decoration: none;
  padding: 10px 24px;
  box-shadow: var(--card-shadow);
}

.download-pill-main {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 16px;
}

.download-pill-meta {
  font-size: 12px;
  font-weight: 500;
  opacity: 0.72;
}

.hero-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: -6px 0 0;
}

/* Flow card: QR + Obtainium + install steps as one continuous sequence */

.flow-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--hairline);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.flow-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qr-code {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  padding: 6px;
  background: var(--canvas);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-code img, .qr-code canvas, .qr-code svg {
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.flow-row-text {
  min-width: 0;
}

.flow-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 2px;
}

.flow-row-sub {
  font-size: 13px;
  color: var(--secondary);
  margin: 0;
}

.inline-link {
  color: var(--violet);
  font-weight: 600;
  text-decoration: none;
}

.flow-divider {
  height: 1px;
  background: var(--divider);
  margin: 0 -20px;
}

.flow-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--secondary);
  margin: 0;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-index {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.step-text {
  font-size: 14px;
  color: var(--ink-hover);
}

.step-text strong {
  color: var(--ink);
}

/* Generic cards */

.card {
  background: var(--surface);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--hairline);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 12px;
}

.card-text {
  font-size: 14px;
  color: var(--secondary);
  margin: 0 0 12px;
}

.changelog-entry {
  border-bottom: 1px solid var(--divider);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.changelog-latest:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.changelog-version {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin: 0 0 6px;
}

.changelog-date {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 8px;
}

.changelog-list {
  list-style: disc;
  margin: 0;
  padding-left: 18px;
  color: var(--secondary);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.changelog-loading {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.changelog-older {
  margin-top: 4px;
}

.changelog-older summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  padding: 8px 0 4px;
  list-style: none;
}

.changelog-older summary::-webkit-details-marker {
  display: none;
}

.changelog-older summary::after {
  content: '›';
  display: inline-block;
  margin-left: 6px;
  transform: rotate(90deg);
  transition: transform 0.15s ease;
}

.changelog-older[open] summary::after {
  transform: rotate(-90deg);
}

#changelog-history {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 8px;
}

/* SHA card collapses behind a summary to de-emphasize it */

.sha-card {
  padding: 14px 20px;
}

.sha-summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--secondary);
  list-style: none;
}

.sha-summary::-webkit-details-marker {
  display: none;
}

.sha-card .card-text {
  margin: 12px 0 8px;
}

.sha-value {
  display: block;
  word-break: break-all;
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--secondary);
  background: var(--divider);
  border-radius: 12px;
  padding: 10px 12px;
}

.signoff {
  text-align: center;
  padding: 28px 0 12px;
}

.signoff-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 40px;
  letter-spacing: -1.5px;
  color: var(--faded);
  margin: 0;
}

.signoff-recap {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

@media (min-width: 640px) {
  .page {
    padding-top: 56px;
  }

  .signoff-headline {
    font-size: 52px;
    letter-spacing: -2px;
  }
}
