/* Public website: home, commands, status, servers, login, leaderboard, legal pages (needs theme.css first). */
body.site { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.6; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.narrow-wrap { max-width: 880px; }

/* ---------------------------------------------------------------- top bar */
.sitenav { position: relative; z-index: 5; }
.sitenav .wrap { display: flex; align-items: center; gap: 24px; height: 76px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--moon); }
.brand:hover { text-decoration: none; }
.brand .ava { width: 34px; height: 34px; }
.brand .display { font-size: 21px; font-weight: 600; }
.sitenav nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.sitenav nav > a:not(.btn) { color: var(--haze); font-weight: 500; font-size: 15px; }
.sitenav nav > a:not(.btn):hover { color: var(--moon); text-decoration: none; }
.me { margin: 0; }
.me-btn { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; cursor: pointer;
  background: transparent; border: 1px solid var(--line-2); color: var(--haze); }
.me-btn:hover { color: var(--moon); border-color: var(--haze); }
.me-btn .ava { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- night sky backdrop */
.sky-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1.4px 1.4px at 8% 14%, #fff, transparent), radial-gradient(1px 1px at 19% 38%, #fff, transparent),
    radial-gradient(1px 1px at 27% 9%, #fff, transparent), radial-gradient(1.6px 1.6px at 38% 27%, #fff, transparent),
    radial-gradient(1px 1px at 52% 7%, #fff, transparent), radial-gradient(1.2px 1.2px at 61% 33%, #fff, transparent),
    radial-gradient(1px 1px at 72% 18%, #fff, transparent), radial-gradient(1.4px 1.4px at 84% 42%, #fff, transparent),
    radial-gradient(1px 1px at 93% 12%, #fff, transparent), radial-gradient(1px 1px at 4% 58%, #fff, transparent),
    radial-gradient(1px 1px at 46% 52%, #fff, transparent), radial-gradient(1.2px 1.2px at 77% 63%, #fff, transparent);
  opacity: .5; }

/* ---------------------------------------------------------------- hero */
.hero { position: relative; overflow: hidden; margin-top: -76px; padding: 150px 0 110px;
  background:
    radial-gradient(800px 380px at 50% 112%, rgb(243 220 163 / .10), transparent 70%),
    linear-gradient(180deg, #0a0f24 0%, #0f173a 60%, #16204a 100%); }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(243 220 163 / .35), transparent); }
/* the moon rises behind the Discord preview, top right */
.hero-moon { position: absolute; z-index: 0; top: 64px; left: calc(50% + 430px); width: 210px; height: 210px;
  transform: rotate(-24deg); }
.hero-moon .moon-phase { width: 100%; height: 100%; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(52px, 8vw, 104px); line-height: .98; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 22px;
  overflow-wrap: anywhere; }
.hero .lede { font-size: 19px; color: #c9cfe8; max-width: 36ch; margin: 0 0 32px; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.reach { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; color: var(--haze); font-size: 14.5px; }

/* Discord chat preview */
.chat { min-width: 0; background: #313338; border-radius: 16px; padding: 18px 18px 6px; color: #dbdee1;
  box-shadow: 0 40px 90px rgb(3 6 24 / .6), 0 0 0 1px rgb(255 255 255 / .06); font: 15px/1.375 var(--font); }
.chat-head { display: flex; align-items: center; gap: 6px; color: #80848e; font-weight: 600; font-size: 15px;
  padding: 0 18px 12px; margin: 0 -18px 14px; border-bottom: 1px solid #26272b; }
.chat-head b { color: #f2f3f5; }
.msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin-bottom: 16px; }
.msg .pfp { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.msg .pfp.letter { font-size: 16px; background: var(--accent); color: var(--accent-ink); }
.msg .who { font-weight: 600; color: #f2f3f5; }
.msg .tag { background: var(--blurple); color: #fff; font-size: 10px; font-weight: 700; border-radius: 4px; padding: 1px 5px;
  margin-left: 5px; vertical-align: 2px; }
.msg time { color: #949ba4; font-size: 12px; font-weight: 400; margin-left: 6px; }
.msg .used { color: #949ba4; font-size: 13px; margin-bottom: 2px; }
.msg .used b { color: #c9cdfb; font-weight: 500; }
.mention { background: rgb(88 101 242 / .3); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.embed { margin-top: 6px; background: #2b2d31; border-left: 4px solid var(--accent); border-radius: 4px;
  padding: 10px 14px 12px; max-width: 430px; }
.embed strong { display: block; color: #f2f3f5; margin-bottom: 4px; }
.embed .desc { white-space: pre-wrap; font-size: 14px; overflow-wrap: anywhere; }
.embed small { display: block; color: #b5bac1; font-size: 12px; margin-top: 8px; }
.bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: #b5bac1; }
.bar span { flex: 1; height: 8px; border-radius: 4px; background: #1e1f22; overflow: hidden; }
.bar span i { display: block; height: 100%; background: var(--glow); }
/* a picture the bot sent (the /rank card), like an attachment in Discord */
.msg .attach { display: block; width: 100%; max-width: 440px; height: auto; margin-top: 6px; border-radius: 2.8% / 8.75%;
  background: #0c1229; }

/* ---------------------------------------------------------------- sections */
.section { padding: 96px 0 8px; }
.section h2 { font-size: clamp(32px, 4vw, 46px); font-weight: 560; letter-spacing: -0.015em; margin: 0 0 12px; }
.section .sub { color: var(--haze); max-width: 56ch; margin: 0 0 40px; font-size: 17px; }
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; margin: 0; padding: 0; list-style: none; }
.features li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.f-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2);
  background: var(--panel); border: 1px solid var(--line); }
.f-ico.sm { width: 32px; height: 32px; border-radius: 10px; }
.f-ico.sm .ic { width: 16px; height: 16px; }
.features strong { display: block; font-size: 17px; margin-bottom: 2px; }
.features span { color: var(--haze); font-size: 15px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; counter-reset: step; margin: 0; padding: 0; list-style: none; }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line-2); }
.steps li::before { content: counter(step); display: block; font: 500 44px/1 var(--display); color: var(--glow); margin-bottom: 14px; }
.steps strong { display: block; font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--haze); margin: 0; }
.final { margin-top: 110px; padding: 64px 0; border-top: 1px solid var(--line);
  background: radial-gradient(600px 220px at 50% 0%, rgb(243 220 163 / .06), transparent 70%); }
.final-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.final h2 { font-size: clamp(32px, 4vw, 48px); font-weight: 560; letter-spacing: -0.015em; }

/* ---------------------------------------------------------------- footer */
.sitefoot { margin-top: auto; border-top: 1px solid var(--line); color: var(--haze); font-size: 14px; background: var(--night-2); }
.sitefoot .wrap { padding-top: 40px; padding-bottom: 44px; }
.sitefoot a { color: var(--haze); }
.sitefoot a:hover { color: var(--moon); }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-brand { display: flex; flex-direction: column; gap: 8px; }
.foot-brand .display { color: var(--moon); font-size: 22px; font-weight: 600; }
.foot-status { display: flex; align-items: center; gap: 9px; }
.foot-brand small { font-size: 12.5px; color: var(--faint); }
.foot-col { display: flex; flex-direction: column; gap: 9px; }
.foot-col h2 { margin: 0 0 4px; color: var(--moon); font-size: 14px; font-weight: 650; }

/* ---------------------------------------------------------------- inner pages */
.page { padding: 36px 0 90px; flex: 1; }
.page h1 { font-size: clamp(36px, 5vw, 52px); font-weight: 560; letter-spacing: -0.018em; margin: 0 0 8px; }
.page .sub { color: var(--haze); margin: 0 0 28px; max-width: 62ch; }
.page-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.page-top .sub { margin-bottom: 20px; }
.flashes:empty { display: none; }

/* servers */
.srv-list { list-style: none; margin: 0; padding: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.srv { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-top: 1px solid var(--line); }
.srv:first-child { border-top: 0; }
.srv .server-ico { width: 48px; height: 48px; border-radius: 14px; font-size: 19px; }
.srv:not(.has-bot) .server-ico { opacity: .6; }
.srv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.srv-text strong { font-size: 16.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv-text small { color: var(--haze); font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.empty-state { background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r-lg); padding: 36px; }
.empty-state h2 { font-size: 26px; font-weight: 560; margin-bottom: 8px; }
.empty-state p { color: var(--haze); margin: 0 0 18px; }

/* commands */
.search-box { display: flex; align-items: center; gap: 10px; max-width: 440px; margin: 0 0 36px; padding: 0 16px;
  background: var(--deep); border: 1px solid var(--line-2); border-radius: 12px; color: var(--faint); }
.search-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .18); }
.search-box input { flex: 1; min-width: 0; font: inherit; color: var(--moon); background: transparent; border: 0; padding: 12px 0; outline: none; }
.cmd-group { margin-bottom: 40px; }
.cmd-group h2 { display: flex; align-items: center; gap: 12px; font-size: 18px; font-weight: 650; margin: 0 0 10px; }
.cmd { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr); gap: 20px; padding: 12px 0; border-top: 1px solid var(--line); }
.cmd code { background: none; border: 0; padding: 0; font-size: 14.5px; color: var(--accent-2); }
.cmd span { color: #c9cfe8; font-size: 15px; }

/* public leaderboard */
.lb-head { display: flex; align-items: center; gap: 18px; margin-bottom: 26px; }
.server-ico.big { width: 76px; height: 76px; border-radius: 22px; font-size: 28px; }
.lb-head .sub { margin: 0; }
.lb { list-style: none; margin: 0; padding: 0; }
.lb li { display: grid; grid-template-columns: 40px 44px minmax(0, 1fr) 230px; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.lb .rank { font: 500 20px/1 var(--display); color: var(--faint); text-align: center; font-variant-numeric: tabular-nums; }
.lb li:nth-child(-n+3) .rank { color: var(--glow); }
.lb .ava { width: 44px; height: 44px; }
.lb .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .lvl { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.xp-track { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.xp-track i { display: block; height: 100%; background: var(--accent); }

/* ---------------------------------------------------------------- login / add bot / error */
body.centered .sitenav { position: absolute; left: 0; right: 0; }
.center-wrap { position: relative; flex: 1; display: grid; place-items: center; padding: 110px 24px 60px; overflow: hidden;
  background: radial-gradient(700px 400px at 50% 0%, rgb(120 140 230 / .10), transparent 70%); }
.card-box { position: relative; z-index: 1; width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 22px; padding: 36px 34px 30px; text-align: center; box-shadow: 0 30px 80px rgb(2 4 16 / .5); }
.card-box h1 { font-size: 30px; font-weight: 560; margin: 14px 0 8px; letter-spacing: -0.01em; }
.card-box > p { color: var(--haze); margin: 0 0 24px; }
.box-moon { display: block; width: 64px; height: 64px; margin: 0 auto; }
.box-moon .moon-phase { width: 100%; height: 100%; }
.box-pfp { display: inline-grid; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; font-size: 26px; }
.card-box .flashes .flash { text-align: left; }
.card-box form { display: flex; flex-direction: column; gap: 10px; }
.pw-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.pw-form input { font: inherit; color: var(--moon); background: var(--deep); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.pw-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .18); }
.card-box .alt { display: inline-block; margin-top: 18px; color: var(--haze); font-size: 14px; }
.card-box .note { font-size: 14px; text-align: left; background: var(--deep); border-radius: 12px; padding: 12px 14px; color: #c9cfe8; }
.agree { font-size: 13px; color: var(--haze); margin: 14px 0 0; }
.verify-box .box-pfp.letter { place-items: center; background: var(--deep); color: var(--moon); }
.verify-mark { display: grid; place-items: center; width: 56px; height: 56px; margin: 16px auto 0; border-radius: 50%; }
.verify-mark.ok { color: var(--ok); background: rgb(95 212 166 / .12); }
.verify-mark.bad { color: var(--bad); background: rgb(255 125 149 / .12); }
.card-box .muted { color: var(--faint); font-size: 14px; }
.agree a { color: #cdd3ea; text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- legal pages */
.legal-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 52px; align-items: start; }
.legal-nav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.legal-nav a { color: var(--haze); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 15px; }
.legal-nav a:hover { color: var(--moon); background: var(--panel); text-decoration: none; }
.legal-nav a[aria-current=page] { color: var(--moon); background: var(--panel-2); }
.doc { max-width: 72ch; line-height: 1.7; color: #d3d8ee; }
.doc h1 { margin-bottom: 6px; }
.doc h2 { font: 560 23px/1.3 var(--display); color: var(--moon); margin: 40px 0 10px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--accent-2); }
.doc strong { color: var(--moon); }
.doc-meta { color: var(--haze); font-size: 14px; }
.todo { background: rgb(var(--accent-rgb) / .16); color: var(--accent-2); border-radius: 5px; padding: 0 5px; }
.todo-note { background: rgb(var(--accent-rgb) / .08); border: 1px solid rgb(var(--accent-rgb) / .3); border-radius: 12px; padding: 12px 16px; }
.doc-table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15px; }
.doc-table th { text-align: left; font-size: 13px; font-weight: 650; color: var(--haze); padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line-2); }
.doc-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table td:first-child { color: var(--moon); font-weight: 600; white-space: nowrap; }

/* ---------------------------------------------------------------- status page */
.st-hero { display: flex; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 20px; background: var(--panel);
  border: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.st-hero.up { background: linear-gradient(120deg, rgb(95 212 166 / .10), transparent 55%), var(--panel); border-color: rgb(95 212 166 / .3); }
.st-hero.down { background: linear-gradient(120deg, rgb(255 125 149 / .12), transparent 55%), var(--panel); border-color: rgb(255 125 149 / .35); }
.st-hero > div { flex: 1 1 260px; min-width: 0; }
.st-hero h1 { font-size: clamp(28px, 3.6vw, 38px) !important; margin-bottom: 4px !important; }
.st-hero .sub { margin: 0; }
.st-pfp { width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover; font-size: 24px; }
.st-pill { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px;
  background: rgb(95 212 166 / .13); color: var(--ok); }
.st-pill i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: st-pulse 2s infinite; }
.down .st-pill { background: rgb(255 125 149 / .13); color: var(--bad); }
@keyframes st-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
.st-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-bottom: 18px; background: var(--line);
  border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.st-stats > div { background: var(--panel); padding: 16px 20px; }
.st-stats small { display: block; color: var(--haze); font-size: 13px; margin-bottom: 4px; }
.st-stats strong { font: 560 28px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.st-stats em { font: 500 14px var(--font); color: var(--haze); font-style: normal; margin-left: 2px; }
.st-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; margin-bottom: 18px; }
.st-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.st-card-head h2 { margin: 0; font-size: 16.5px; font-weight: 650; }
.st-card-head span { color: var(--haze); font-size: 14px; }
.st-bars { display: grid; grid-template-columns: repeat(30, 1fr); gap: 4px; height: 44px; }
.st-bars.hours { grid-template-columns: repeat(24, 1fr); }
.st-bar { border-radius: 4px; background: var(--panel-2); transition: transform .12s, filter .12s; cursor: default; }
.st-bar:hover, .st-bar:focus-visible { transform: scaleY(1.12); filter: brightness(1.2); outline: none; }
.st-bar.ok { background: var(--ok); }
.st-bar.warn { background: var(--warn); }
.st-bar.bad { background: var(--bad); }
.st-axis { display: flex; justify-content: space-between; color: var(--haze); font-size: 12.5px; margin-top: 8px; }
.st-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--haze); font-size: 13px; }
.st-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; background: var(--panel-2); }
.st-legend i.ok { background: var(--ok); } .st-legend i.warn { background: var(--warn); } .st-legend i.bad { background: var(--bad); }
.st-foot { color: var(--haze); font-size: 13.5px; }
.st-tip { position: absolute; z-index: 30; background: #070b1a; color: var(--moon); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 6px 10px; font-size: 13px; pointer-events: none; white-space: nowrap; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 1240px) and (min-width: 901px) {
  .hero-moon { left: auto; right: -50px; top: 40px; width: 170px; height: 170px; }
}
@media (max-width: 900px) {
  .hero { padding: 120px 0 80px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero-moon { width: 84px; height: 84px; top: 92px; left: auto; right: 22px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .cmd { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .lb li { grid-template-columns: 30px 40px minmax(0, 1fr); }
  .lb .lvl { grid-column: 3; margin-top: -6px; }
  .sitenav nav > a.hide-sm { display: none; }
  .legal-wrap { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .legal-nav { position: static; flex-direction: row; flex-wrap: wrap; }
  .doc-table td:first-child { white-space: normal; }
  .st-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .sitenav .wrap { gap: 12px; height: 68px; }
  .hero { margin-top: -68px; }
  .brand .display { font-size: 19px; }
  .sitenav nav { gap: 10px; }
  .hero .lede { font-size: 17px; }
  .ctas .btn { flex: 1 1 auto; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .srv { flex-wrap: wrap; padding: 14px 16px; }
  .srv .btn { margin-left: 64px; }
  .card-box { padding: 28px 22px 24px; }
  .doc-table thead { display: none; }
  .doc-table tr, .doc-table td { display: block; }
  .doc-table td { border: 0; padding: 2px 0; }
  .doc-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .st-bars { gap: 2px; }
}
