:root {
  --bg: #0b1120;
  --bg-soft: #111a2e;
  --panel: #14203a;
  --panel-2: #1b2a49;
  --line: rgba(148, 178, 255, 0.14);
  --line-strong: rgba(148, 178, 255, 0.28);
  --text: #eaf0ff;
  --muted: #9fb0d4;
  --brand: #2dd4bf;
  --brand-2: #38bdf8;
  --gold: #f5c451;
  --green: #36d399;
  --danger: #fb7185;
  --shadow: 0 18px 40px rgba(2, 8, 23, 0.45);
  --radius: 16px;
  --shell: 1120px;
  font-synthesis-weight: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(56, 189, 248, 0.12), transparent 60%),
              radial-gradient(900px 500px at 0% 0%, rgba(45, 212, 191, 0.1), transparent 55%),
              var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(11, 17, 32, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #04111c; font-size: 18px; font-weight: 800;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-size: 15px; }
.brand-copy span { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px;
}
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel-2); }

/* Hero */
.hero { padding: 56px 0 28px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 28px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; margin: 0 0 16px; letter-spacing: -0.02em; }
h2 { font-size: clamp(22px, 3vw, 30px); margin: 0 0 12px; letter-spacing: -0.01em; }
h3 { font-size: 18px; margin: 0 0 8px; }
.lead { color: var(--muted); font-size: 18px; max-width: 56ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.button {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px;
  padding: 12px 20px; border-radius: 12px; border: 1px solid transparent; cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
}
.button:hover { text-decoration: none; transform: translateY(-1px); }
.button.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #04111c; box-shadow: 0 10px 24px rgba(45, 212, 191, 0.25); }
.button.secondary { background: var(--panel); color: var(--text); border-color: var(--line-strong); }
.button.ghost { background: transparent; color: var(--muted); border-color: var(--line); }

/* Cards / panels */
.card, .panel {
  background: linear-gradient(180deg, var(--panel), var(--bg-soft));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel { padding: 26px; }
.section { padding: 30px 0; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px; text-align: left; }
.stat .num { font-size: 26px; font-weight: 800; color: var(--text); }
.stat .lbl { color: var(--muted); font-size: 13px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.feature { padding: 22px; }
.feature .ic { font-size: 24px; }
.feature h3 { margin-top: 10px; }
.feature p { color: var(--muted); margin: 0; }

/* Progress */
.tracker-bar {
  position: sticky; top: 64px; z-index: 20;
  background: rgba(11, 17, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.tracker-bar .row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.progress { flex: 1; min-width: 220px; height: 14px; background: var(--panel-2); border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.progress > span { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--green)); transition: width .35s ease; }
.progress-meta { font-weight: 700; font-size: 15px; white-space: nowrap; }
.progress-meta b { color: var(--brand); }

/* Group / team grid */
.groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.group { padding: 18px; }
.group h3 { display: flex; align-items: center; justify-content: space-between; }
.group h3 .gpct { font-size: 13px; color: var(--muted); font-weight: 700; }
.team {
  display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line);
}
.team:first-of-type { border-top: 0; }
.team .flag { font-size: 22px; width: 28px; text-align: center; }
.team .tname { flex: 1; font-weight: 600; }
.team .counter { display: flex; align-items: center; gap: 8px; }
.iconbtn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line-strong);
  background: var(--panel-2); color: var(--text); font-size: 16px; font-weight: 800; cursor: pointer; line-height: 1;
}
.iconbtn:hover { background: var(--brand); color: #04111c; }
.team .have { width: 64px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.team .have small { color: var(--muted); font-weight: 600; }
.team.done .tname { color: var(--green); }

/* Per-number checklist */
.group-head { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.group-head .gpct { font-size: 13px; color: var(--muted); font-weight: 700; }
.entry { padding: 12px 0; border-top: 1px solid var(--line); }
.entry:first-of-type { border-top: 0; }
.entry-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.entry-head .flag { width: 28px; text-align: center; font-size: 20px; }
.entry-head .tname { flex: 1; font-weight: 600; }
.entry-head .ecount { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--muted); }
.entry.done .tname { color: var(--green); }
.entry.done .ecount b { color: var(--green); }
.sticker-grid { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { min-width: 30px; height: 28px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .05s ease, background .12s ease; }
.chip:hover { transform: translateY(-1px); }
.chip.got { background: var(--green); border-color: var(--green); color: #04140d; }
.chip.spare { background: var(--gold); border-color: var(--gold); color: #1a1304; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 6px 0 14px; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--panel-2); display: inline-block; }
.legend .sw.got { background: var(--green); border-color: var(--green); }
.legend .sw.spare { background: var(--gold); border-color: var(--gold); }
.legend-tip { margin-left: auto; }

.mini-actions { display: inline-flex; gap: 4px; margin-left: 8px; }
.mini { width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--muted); font-size: 12px; line-height: 1; cursor: pointer; }
.mini:hover { color: var(--text); border-color: var(--brand); }

.datatools { margin: 4px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.datatools > summary { cursor: pointer; padding: 12px 16px; font-weight: 700; list-style: none; }
.datatools > summary::-webkit-details-marker { display: none; }
.datatools-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.datatools-body label, .dt-hint { color: var(--muted); font-size: 13px; margin: 0; }
.datatools-body textarea { width: 100%; background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text); border-radius: 10px; padding: 10px; font-family: inherit; font-size: 14px; resize: vertical; }
.datatools-body hr { border: 0; border-top: 1px solid var(--line); width: 100%; margin: 4px 0; }
.dt-row { display: flex; gap: 10px; flex-wrap: wrap; }
.datatools-body .button { align-self: flex-start; }

.chip.flash { outline: 3px solid var(--brand); outline-offset: 2px; }
.chip.flash { animation: chipflash .5s ease 2; }
@keyframes chipflash { 50% { transform: scale(1.28); } }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0; }
.toolbar input[type="search"] {
  background: var(--panel-2); border: 1px solid var(--line-strong); color: var(--text);
  padding: 10px 12px; border-radius: 10px; min-width: 200px;
}
.search-wrap { position: relative; display: inline-flex; align-items: center; }
.search-wrap .search-ic { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.search-wrap input[type="search"] { padding-left: 34px; }
.btn-label { white-space: nowrap; }
.flagimg { display: inline-block; vertical-align: middle; width: 26px; height: auto; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.good { color: var(--green); border-color: rgba(54, 211, 153, .4); }

/* Tables / content */
.prose { max-width: 72ch; }
.prose p, .prose li { color: var(--muted); }
.prose h2 { margin-top: 28px; }
.prose strong { color: var(--text); }
table.data { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.data th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }

.note { border-left: 3px solid var(--gold); background: rgba(245, 196, 81, 0.08); padding: 12px 16px; border-radius: 0 12px 12px 0; color: var(--muted); font-size: 14px; }
.note strong { color: var(--gold); }

.buy-card { padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.buy-card .price { font-size: 22px; font-weight: 800; }
.faq dt { font-weight: 700; margin-top: 16px; }
.faq dd { color: var(--muted); margin: 6px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 30px 0; color: var(--muted); font-size: 14px; }
.footer-grid { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-grid a { color: var(--muted); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

figure.media { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel-2); }
figure.media img { display: block; width: 100%; height: auto; }
.page-hero { margin: 18px 0 6px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--panel-2); }
.page-hero img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

@media (max-width: 880px) {
  .hero-grid, .grid-3, .grid-2, .groups { grid-template-columns: 1fr; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .nav { display: none; }
}
