:root {
  color-scheme: light;
  --bg: #f8f6f9;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --panel: #ffffff;
  --line: rgba(0, 0, 0, 0.07);
  --accent: #9b6dd7;
  --accent-hover: #8559c4;
  --accent-ink: #ffffff;
  --accent-light: #f3eefa;
  --gradient: linear-gradient(135deg, #e8a4c8, #c5a0e8, #a0c4f0, #a0e0d0);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(155, 109, 215, 0.15);
  --shadow-lg: 0 12px 40px rgba(155, 109, 215, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", "Noto Sans TC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

.page-shell {
  width: min(640px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 56px 0 80px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Hero ──────────────────────────────────── */

.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 36px 40px;
  text-align: center;
}

.hero-icon {
  display: block;
  margin: 0 auto 24px;
  width: 108px;
  height: 108px;
  border-radius: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.hero-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(36px, 8vw, 52px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 auto;
  max-width: 420px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.hero-cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.hero-meta {
  font-size: 13px;
  color: var(--muted);
}

/* ── Buttons ───────────────────────────────── */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.button:active {
  transform: scale(0.97);
}

.button-primary {
  background: var(--gradient);
  color: var(--accent-ink);
  box-shadow: var(--shadow-md);
}

.button-primary:hover {
  opacity: 0.88;
}

.button-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── Status ────────────────────────────────── */

.status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
}

.status-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.status-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Details ───────────────────────────────── */

.details-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 520px) {
  .details-grid {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 14px 16px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-card strong {
  font-size: 18px;
  font-weight: 700;
}

/* ── Tech details (collapsible) ────────────── */

.tech-details {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.tech-details summary {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.tech-details summary:hover {
  color: var(--ink);
}

.tech-grid {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tech-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.tech-label {
  flex-shrink: 0;
  width: 90px;
  color: var(--muted);
  font-weight: 500;
}

.tech-row code {
  font-family: "JetBrains Mono", "SFMono-Regular", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.sha256 {
  font-size: 11px !important;
  word-break: break-all;
}

/* ── Requirements ──────────────────────────── */

.requirements-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px 28px;
}

.req-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}
