:root {
  --bg: #f7f8f6;
  --bg-band: #eef2ee;
  --surface: #ffffff;
  --text: #1c2420;
  --muted: #5b6862;
  --border: #d9e0db;
  --accent: #2f7d5b;
  --accent-hover: #256649;
  --accent-text: #ffffff;
  --accent-soft: #e0efe7;
  --yes: #2f7d5b;
  --no: #b54a3c;
  --code-bg: #1f2724;
  --code-text: #e6ece8;
  --shadow: 0 12px 40px rgba(28, 36, 32, 0.12);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121614;
    --bg-band: #181e1b;
    --surface: #1d2420;
    --text: #e6ece8;
    --muted: #9aa8a1;
    --border: #2c3631;
    --accent: #5cbf8f;
    --accent-hover: #74cfa2;
    --accent-text: #0d1a14;
    --accent-soft: #1f3a2d;
    --yes: #5cbf8f;
    --no: #e07b6d;
    --code-bg: #0c0f0e;
    --code-text: #dfe7e2;
    --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 64px; }

body {
  margin: 0;
  overflow-wrap: anywhere;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.brand:hover { text-decoration: none; }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--text); text-decoration: none; }
.topnav select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  font: inherit;
}

.hero { text-align: center; padding-top: 56px; padding-bottom: 48px; }
.hero-icon { margin: 0 auto 12px; }
.hero h1 { font-size: 44px; margin: 0; letter-spacing: -0.02em; }
.tagline { font-size: 24px; font-weight: 600; margin: 8px 0 4px; }
.lead { color: var(--muted); font-size: 18px; max-width: 600px; margin: 0 auto; }

.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn small { font-weight: 400; font-size: 13px; opacity: 0.85; }
.btn small:empty { display: none; }

.release-line { color: var(--muted); font-size: 14px; margin-top: 14px; }

.hero-shot, .level-shot { margin: 40px auto 0; }
.hero-shot img, .level-shot img, .duo img {
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  width: 100%;
  height: auto;
}

.band { background: var(--bg-band); padding: 56px 0; }
section { padding: 56px 0; }
.hero { padding-left: 16px; padding-right: 16px; }

h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 0 0 6px; }
/* Negative tracking pulls apart joined letters in these scripts */
:is(:lang(ar), :lang(hi), :lang(bn)) h2 { letter-spacing: 0; }
.section-lead { color: var(--muted); margin: 0 0 28px; max-width: 680px; }

.levels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.level {
  text-align: start;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.level span { color: var(--muted); font-size: 14px; }
.level:hover { border-color: var(--accent); }
.level[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.level-shot { margin-top: 24px; }

.table-scroll { overflow-x: auto; margin-top: 32px; }
.compare { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 12px; overflow: hidden; font-size: 15px; }
.compare th, .compare td { padding: 10px 14px; border-bottom: 1px solid var(--border); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: start; }
.compare tbody tr:last-child td { border-bottom: none; }
.compare thead th { background: var(--accent-soft); }
.yes { color: var(--yes); font-weight: 700; }
.no { color: var(--no); font-weight: 700; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.features article { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

.duo { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; margin-top: 40px; align-items: start; }
.duo figure { margin: 0; }
.duo figcaption { color: var(--muted); font-size: 14px; text-align: center; margin-top: 10px; }

.os-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.os-tabs button {
  font: inherit;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
.os-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.os-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.os-panel[hidden] { display: none; }
.os-panel h3 { margin-top: 18px; }
.os-panel h3:first-child { margin-top: 0; }

pre {
  position: relative;
  direction: ltr;
  text-align: left;
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 8px;
  padding: 14px 16px;
  padding-right: 72px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 12px;
}
code { font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace; }
.copy {
  position: absolute;
  top: 8px;
  right: 8px;
  font: 12px/1 system-ui, sans-serif;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: var(--code-text);
  cursor: pointer;
}
.copy:hover { background: rgba(255, 255, 255, 0.16); }

.assets { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.asset {
  display: inline-flex;
  flex-direction: column;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
}
.asset:hover { border-color: var(--accent); text-decoration: none; }
.asset small { color: var(--muted); }
.note { color: var(--muted); font-size: 14px; margin: 4px 0; }

.verify { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; }
.verify summary { cursor: pointer; font-weight: 600; }
.verify p { color: var(--muted); font-size: 15px; }

.why-for { font-weight: 600; margin: 0; }
#why .features { margin-top: 12px; }

.rivals { min-width: 720px; font-size: 14px; }
.rivals td { vertical-align: top; }
.rivals th:nth-child(2), .rivals td:nth-child(2) { background: var(--accent-soft); }
.rivals thead th:nth-child(2) { color: var(--accent); }
.cmp-note { margin-top: 12px; max-width: 760px; }

:not(pre) > code {
  direction: ltr;
  unicode-bidi: isolate;
  font-size: 0.9em;
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 1px 5px;
}

.faq { display: grid; gap: 10px; margin-top: 20px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); font-size: 15px; margin: 10px 0 2px; }

#contribute p { max-width: 680px; }
.cta-left { justify-content: flex-start; margin-top: 16px; }

.footer { text-align: center; padding: 32px 16px 48px; font-size: 14px; }
.muted { color: var(--muted); }

@media (max-width: 760px) {
  .topnav a:not([href^="http"]) { display: none; }
  .hero { padding-top: 36px; }
  .hero h1 { font-size: 34px; }
  .tagline { font-size: 20px; }
  .levels, .features, .duo { grid-template-columns: minmax(0, 1fr); }
  .btn { width: 100%; }
}
