:root {
  --bg: #0e0d12;
  --panel: #17151e;
  --panel-2: #1e1b27;
  --line: #2b2736;
  --text: #efeaf6;
  --muted: #9a93a8;
  --faint: #5e586b;
  --total: #7ee0c3;
  --tulip: #f0609e;
  --furry: #a57cff;
  --sunflower: #ffc21a;
  --blurple: #8b9bff;
  --ok: #4ade80;
  --bad: #f87171;
  --tip-bg: #000000cc;
  --md-text: #d8d2e2;
  --radius: 14px;
  color-scheme: dark;
}
/* light mode: soft pink. Accent colours are deepened so text stays readable on the light background. */
:root[data-theme="light"] {
  --bg: #fff0f6;
  --panel: #ffffff;
  --panel-2: #ffe6f0;
  --line: #f6cadb;
  --text: #3b1d2c;
  --muted: #86566b;
  --faint: #b58a9c;
  --total: #13977a;
  --tulip: #d52f78;
  --furry: #7a4ae0;
  --sunflower: #b07400;
  --blurple: #5865f2;
  --ok: #16a34a;
  --bad: #dc2626;
  --tip-bg: #fffffff2;
  --md-text: #4a2a3a;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 "Space Grotesk", system-ui, sans-serif;
  transition: background-color .2s ease, color .2s ease;
}

/* theme toggle + trans flag */
.theme-toggle {
  margin-left: 18px; width: 34px; height: 34px; border-radius: 999px; cursor: pointer;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  display: inline-grid; place-items: center; vertical-align: middle; padding: 0;
}
.theme-toggle:hover { border-color: var(--muted); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.flag {
  display: inline-block; vertical-align: middle; border-radius: 3px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--line); flex: none;
}
.flag svg { display: block; width: 100%; height: 100%; }
.brand .flag { width: 22px; height: 14px; margin-left: 8px; }
.hero h1 .flag { width: 0.95em; height: 0.6em; margin-left: 0.25em; border-radius: 6px; vertical-align: 0.08em; }
a { color: inherit; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

header.top { border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; white-space: nowrap; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; text-decoration: none; }
.brand .head { width: 28px; height: 28px; margin-right: 10px; border-radius: 4px; image-rendering: pixelated; flex: none; }
.brand span { color: var(--total); }
nav a { color: var(--muted); text-decoration: none; margin-left: 20px; font-size: 15px; }
nav a:hover, nav a[aria-current] { color: var(--text); }

.hero { padding: 56px 0 28px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 12px; letter-spacing: -0.03em; }
.hero p { color: var(--muted); margin: 0; max-width: 560px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.02em; }
.section-head .note { color: var(--faint); font-size: 13px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }

/* combined box */
.total { padding: 22px 22px 14px; }
.total-row { display: flex; gap: 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.big { font-size: clamp(48px, 9vw, 76px); font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: var(--total); font-variant-numeric: tabular-nums; }
.big small { font-size: 16px; color: var(--muted); font-weight: 400; letter-spacing: 0; margin-left: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip b { font-variant-numeric: tabular-nums; }
.share { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin: 18px 0 4px; background: var(--panel-2); }
.share div { transition: width .6s ease; }
.share div + div { border-left: 2px solid var(--panel); }

.stats { display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 10px; }
.stats b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* chart */
.chart { position: relative; margin-top: 12px; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .axis { fill: var(--faint); font: 11px "JetBrains Mono", monospace; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .empty { fill: var(--faint); font: 13px "Space Grotesk", sans-serif; }
.tip {
  position: absolute; pointer-events: none; transform: translate(-50%, -100%);
  background: var(--tip-bg); border: 1px solid var(--line); border-radius: 8px; color: var(--text);
  padding: 5px 9px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity .1s;
}
.tip b { font-size: 14px; }

/* project cards */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { padding: 20px; display: flex; flex-direction: column; border-top: 3px solid var(--c); }
.card-head { display: flex; gap: 14px; align-items: center; }
.logo { width: 56px; height: 56px; border-radius: 12px; image-rendering: pixelated; flex: none; background: var(--panel-2); }
.card h3 { margin: 0; font-size: 20px; letter-spacing: -0.01em; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.tag { font-size: 13px; color: var(--muted); }
.blurb { color: var(--muted); font-size: 14px; margin: 14px 0; flex: 1; }
.now { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.count { font-size: 38px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--c); font-variant-numeric: tabular-nums; }
.count small { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.status { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.status.on i { background: var(--ok); box-shadow: 0 0 0 3px #4ade8026; }
.status.off i { background: var(--bad); }
.card .stats { gap: 14px; }
.actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.btn {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 7px 11px; font: 13px "JetBrains Mono", monospace; cursor: pointer; text-decoration: none;
}
.btn:hover { border-color: var(--c, var(--muted)); }

/* discord */
.dc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 16px 0 8px; }
.dc {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--c);
  border-radius: 10px; padding: 12px 14px;
}
.dc:hover { border-color: var(--c); }
.dc img { width: 44px; height: 44px; border-radius: 50%; flex: none; background: var(--line); }
.dc-name { font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-nums { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dc-nums b { color: var(--text); font-size: 18px; font-weight: 700; margin-right: 2px; }
.dc-nums .on::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin: 0 5px 1px 10px; }
.dc > div { min-width: 0; }

footer { color: var(--faint); font-size: 13px; padding: 48px 0 40px; }
footer a { color: var(--muted); }

/* phones: name + flag on the first row, links + theme toggle on the second */
@media (max-width: 560px) {
  header.top .wrap { height: auto; flex-wrap: wrap; row-gap: 8px; padding-top: 12px; padding-bottom: 10px; }
  nav { display: flex; align-items: center; gap: 18px; width: 100%; }
  nav a { margin-left: 0; font-size: 14px; }
  .theme-toggle { margin-left: auto; }
}
