:root {
  --bg: #eef0f8;
  --bg-accent: #e8e0fc;
  --surface: #ffffff;
  --text: #142033;
  --muted: #5f6f86;
  --accent: #6b4ce6;
  --accent-soft: rgba(107, 76, 230, 0.12);
  --border: #d4deea;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(20, 32, 51, 0.08);
  --done: #0d7a6f;
  --done-soft: rgba(13, 122, 111, 0.12);
  --partial: #1a5fb4;
  --partial-soft: rgba(26, 95, 180, 0.12);
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
}

html.theme-dark,
body.theme-dark {
  --bg: #0b1018;
  --bg-accent: #1a1430;
  --surface: #151d2b;
  --text: #e8edf5;
  --muted: #94a3b8;
  --accent: #a78bfa;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --border: #2a3648;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --done: #3ecfb8;
  --done-soft: rgba(62, 207, 184, 0.12);
  --partial: #5ba3f5;
  --partial-soft: rgba(91, 163, 245, 0.14);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, var(--bg-accent), transparent),
    radial-gradient(circle at 100% 20%, rgba(107, 76, 230, 0.08), transparent 40%),
    var(--bg);
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  max-width: 960px;
  margin: 0 auto;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
}

.site-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}

.site-brand-mark svg {
  width: 20px;
  height: 20px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav a.nav-muted:hover {
  color: var(--accent);
}

.home {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 24px 48px;
}

.hero {
  text-align: center;
  padding: 32px 0 40px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-meta {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.highlight-card {
  padding: 24px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}

.highlight-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--accent);
}

.highlight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.55;
}

.home-more {
  text-align: center;
  margin: 0;
}

.home-more a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.home-more a:hover {
  text-decoration: underline;
}

.page-info .page-intro {
  text-align: center;
  margin-bottom: 24px;
}

.page-info .page-intro h1 {
  margin: 0 0 10px;
}

.actions-bottom {
  margin-top: 8px;
  margin-bottom: 0;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon,
.theme-toggle .theme-label-dark { display: none; }

html.theme-dark .theme-toggle .icon-sun,
body.theme-dark .theme-toggle .icon-sun,
html.theme-dark .theme-toggle .theme-label-light,
body.theme-dark .theme-toggle .theme-label-light { display: none; }

html.theme-dark .theme-toggle .icon-moon,
body.theme-dark .theme-toggle .icon-moon,
html.theme-dark .theme-toggle .theme-label-dark,
body.theme-dark .theme-toggle .theme-label-dark { display: inline-flex; }

.landing {
  max-width: 820px;
  margin: 0 auto;
  padding: 8px 20px 48px;
  text-align: center;
}

.hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin-bottom: 16px;
  border-radius: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: var(--shadow);
}

.hero-icon svg { width: 56px; height: 56px; }

.badge {
  display: inline-block;
  margin: 0 0 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  letter-spacing: -0.02em;
}

.tagline {
  margin: 0 auto 20px;
  max-width: 540px;
  color: var(--muted);
  font-size: 1.08rem;
}

.notice {
  margin: 0 auto 24px;
  max-width: 620px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  font-size: 0.95rem;
  box-shadow: var(--shadow);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-outline {
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface);
}

.apk-meta {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 0.88rem;
}

.section {
  margin-bottom: 32px;
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
}

.section-muted {
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft));
}

.section h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
  text-align: center;
}

.section-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.section-lead a {
  color: var(--accent);
}

.features {
  margin: 0;
  padding-left: 1.2rem;
  text-align: left;
}

.features li {
  margin-bottom: 10px;
}

.crypto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.crypto-item {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.arch-diagram {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.72rem;
  line-height: 1.45;
  white-space: pre;
}

.roadmap {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.roadmap th,
.roadmap td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.roadmap th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.roadmap tr:last-child td { border-bottom: none; }

.status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-done {
  background: var(--done-soft);
  color: var(--done);
}

.status-partial {
  background: var(--partial-soft);
  color: var(--partial);
}

.status-planned {
  background: var(--accent-soft);
  color: var(--muted);
}

.tree {
  margin: 0;
  padding-left: 1.2rem;
  text-align: left;
}

.tree li { margin-bottom: 6px; }

code {
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg);
  font-size: 0.88em;
}

.landing-footer {
  padding: 24px 20px 32px;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.landing-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.landing-footer a:hover {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .site-header { padding: 14px 16px; }
  .site-brand-text { font-size: 0.92rem; }
  .home, .landing { padding-left: 16px; padding-right: 16px; }
  .section { padding: 20px 16px; }
  .roadmap { font-size: 0.82rem; }
  .roadmap th:nth-child(2),
  .roadmap td:nth-child(2) { min-width: 140px; }
}
