/*
 * Kolibri — one stylesheet for the whole site and the panel.
 *
 * Dark only, like Discord itself. Solid surfaces, one brand colour and the
 * hummingbird's sunset for the big moments — no glass, no glow. Fonts live
 * on this site (Unbounded for headings, Onest for text, both SIL OFL), no
 * external requests, no inline styles (the Content-Security-Policy allows
 * only files from this site). Every animation is switched off for people
 * who asked their system for less motion.
 */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/assets/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url('/assets/fonts/unbounded-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Unbounded';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url('/assets/fonts/unbounded-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg: #0f0f13;
  --bg-2: #141419;
  --panel: #18181e;
  --panel-2: #1f1f27;
  --panel-3: #272731;
  /* Kept for the panel's older rules: now plain tints of the solid surfaces. */
  --glass: #18181e;
  --glass-2: #22222b;
  --line: #25252e;
  --line-2: #34343f;
  --text: #f4f3f8;
  --muted: #a4a2b0;
  --faint: #6d6b7a;
  --amber: #fcaf01;
  --coral: #ff4a3d;
  --magenta: #e910c0;
  --violet: #8b5cf6;
  --accent: #e910c0;
  --accent-2: #ff3aa8;
  --accent-soft: rgba(233, 16, 192, 0.14);
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #f87171;
  /* The hummingbird's sunset: the logo, the hero, the last call. */
  --sunset: linear-gradient(125deg, #ffb000 0%, #ff4a3d 46%, #e910c0 100%);
  /* One colour where the old design had a gradient: buttons, marks, switches. */
  --gradient: linear-gradient(var(--accent), var(--accent));
  --gradient-soft: linear-gradient(var(--accent-soft), var(--accent-soft));
  --radius: 20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.8);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --font: 'Onest', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: 'Unbounded', 'Onest', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', 'SF Mono', 'SFMono-Regular', Consolas, monospace;
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font: 16px/1.6 var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(233, 16, 192, 0.4);
}

a {
  color: inherit;
}

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

code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.08em 0.4em;
}

h1,
h2,
h3 {
  text-wrap: balance;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

h3 {
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.sr-only:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  z-index: 100;
  background: var(--panel);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow {
  max-width: 840px;
}

.muted {
  color: var(--muted);
}

/* One highlighted word in a heading: the brand colour, solid. */
.gradient-text,
.accent-text {
  color: var(--accent-2);
}

/* Premium is gold everywhere. */
.gold-text {
  color: var(--amber);
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--accent-2);
}

/* --- reveal on scroll --------------------------------------------------------
 * Hidden until site.js sees them. If the script never runs, a delayed
 * animation shows everything anyway.
 */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal-fallback 0.01s 1.4s forwards;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  transition-delay: calc(var(--i, 0) * 50ms);
}

.js [data-reveal] {
  animation: none;
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

@keyframes reveal-fallback {
  to {
    opacity: 1;
    transform: none;
  }
}

/* Load-time entrance for the first screen. */
.rise {
  animation: rise 0.7s var(--ease) both;
}

.d1 {
  animation-delay: 0.06s;
}

.d2 {
  animation-delay: 0.12s;
}

.d3 {
  animation-delay: 0.18s;
}

.d4 {
  animation-delay: 0.24s;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- header and footer ------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

/* On the landing page the header sits on the sunset until the page scrolls. */
.on-sunset .site-header {
  background: transparent;
  border-bottom-color: transparent;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.on-sunset .site-header.scrolled {
  background: var(--bg);
  border-bottom-color: var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  transition: transform 0.4s var(--spring);
}

.brand:hover img {
  transform: rotate(-10deg);
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: color 0.15s ease, background 0.15s ease;
}

.site-nav a:hover {
  color: var(--text);
  background: var(--panel-2);
}

.site-nav a[aria-current='page'] {
  color: var(--text);
  background: var(--panel-2);
}

.on-sunset .site-header:not(.scrolled) .site-nav a {
  color: rgba(255, 255, 255, 0.86);
}

.on-sunset .site-header:not(.scrolled) .site-nav a:hover {
  color: #fff;
  background: rgba(0, 0, 0, 0.16);
}

.header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* The panel's account menu sits next to the language switch. */
.header-account {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* RU / EN: the same page in the other language. */
.lang-switch {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  padding: 0 9px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.lang-switch:hover {
  color: var(--text);
  border-color: #454552;
  background: var(--panel-2);
}

.on-sunset .site-header:not(.scrolled) .lang-switch {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.on-sunset .site-header:not(.scrolled) .lang-switch:hover {
  background: rgba(0, 0, 0, 0.16);
}

.nf-actions {
  justify-content: center;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 40px 0;
  color: var(--muted);
  font-size: 0.92rem;
  background: var(--bg-2);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 28px;
  align-items: center;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer .brand {
  color: var(--text);
}

.site-footer .fine {
  margin-left: auto;
  color: var(--faint);
}

/* --- buttons -------------------------------------------------------------------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s var(--ease), background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.btn:hover {
  background: var(--panel-3);
  border-color: #454552;
}

.btn:active {
  transform: scale(0.97);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

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

.btn-primary:hover {
  background: var(--accent-2);
  border-color: transparent;
}

.btn-discord {
  background: #5865f2;
  border-color: transparent;
  color: #fff;
}

.btn-discord:hover {
  background: #6d78f4;
  border-color: transparent;
}

/* For the sunset: white and near-black, like the reference Discord bots' heroes. */
.btn-light {
  background: #fff;
  border-color: transparent;
  color: #16161c;
}

.btn-light:hover {
  background: #f1eff5;
  border-color: transparent;
}

.btn-dark {
  background: #121217;
  border-color: transparent;
  color: #fff;
}

.btn-dark:hover {
  background: #1d1d24;
  border-color: transparent;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--panel-2);
  border-color: var(--line);
}

.btn-danger {
  color: var(--danger);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.88rem;
  border-radius: 10px;
}

.btn-lg {
  padding: 15px 26px;
  font-size: 1.02rem;
  border-radius: 14px;
}

.btn-block {
  width: 100%;
}

.btn .arrow {
  transition: transform 0.25s var(--ease);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

/* --- cards ------------------------------------------------------------------------ */

.card,
.tile,
.system,
.step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* The old cursor light: gone. The class stays harmless for markup that still has it. */
.spot {
  --x: 50%;
  --y: 50%;
}

.card {
  padding: 26px;
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 0.95rem;
}

/* --- landing: the sunset hero ------------------------------------------------------------ */

.sunset-hero {
  position: relative;
  margin-top: -71px;
  padding: 150px 0 170px;
  background: var(--sunset);
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  /* The last pixel row under the wave, where the sunset would peek through. */
  border-bottom: 2px solid var(--bg);
}

/* Soft sun discs behind the bird: shapes, not glow. */
.sunset-hero::before,
.sunset-hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  pointer-events: none;
}

.sunset-hero::before {
  width: 620px;
  height: 620px;
  right: -80px;
  top: 30px;
  background: rgba(255, 255, 255, 0.1);
}

.sunset-hero::after {
  width: 380px;
  height: 380px;
  right: 120px;
  top: 150px;
  background: rgba(255, 255, 255, 0.1);
}

.sunset-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.sunset-tag {
  display: inline-block;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  margin-bottom: 22px;
}

.sunset-hero h1 {
  font-size: clamp(2.1rem, 3.9vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin-bottom: 22px;
}

.sunset-hero .lead {
  font-size: 1.15rem;
  line-height: 1.55;
  max-width: 540px;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sunset-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.sunset-facts strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  color: #fff;
  margin-right: 4px;
}

.sunset-bird {
  display: flex;
  justify-content: center;
}

.sunset-bird svg {
  width: 100%;
  max-width: 520px;
  height: auto;
  overflow: visible;
  animation: hover-bird 5s ease-in-out infinite;
}

/* The upper wing beats — the hummingbird never quite stands still. */
.bird-wing {
  transform-box: fill-box;
  transform-origin: 90% 85%;
  animation: flutter 0.9s ease-in-out infinite;
}

@keyframes flutter {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(-7deg) scaleY(0.9);
  }
}

@keyframes hover-bird {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

.off .sunset-bird svg,
.off .bird-wing,
.off .cta-bird {
  animation-play-state: paused;
}

/* The waves the sunset ends in, like the edge of the sky. */
.wave {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: 120px;
  display: block;
}

.wave.top {
  top: -1px;
  bottom: auto;
}

.wave-back {
  fill: rgba(15, 15, 19, 0.35);
}

.wave-front {
  fill: var(--bg);
}

/* --- landing: sections --------------------------------------------------------------------- */

.section {
  padding: 90px 24px 10px;
}

.section-title {
  max-width: 720px;
  margin: 0 auto 44px;
  text-align: center;
}

.section-title h2,
.show-copy h2,
.row-title h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-title p {
  color: var(--muted);
  font-size: 1.08rem;
}

.section-title a,
.show-copy a:not(.btn) {
  color: var(--accent-2);
}

.text-link {
  display: inline-flex;
  gap: 6px;
  font-weight: 700;
  text-decoration: none;
}

.text-link:hover {
  text-decoration: underline;
}

/* Two columns: something to look at, and what it means. */
.showcase {
  padding-top: 40px;
}

.show-row {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  padding: 40px 0;
}

.show-row.flip .show-visual {
  order: 2;
}

.show-copy p {
  color: var(--muted);
  font-size: 1.06rem;
}

/* The Discord window: Discord's own colours, so it reads as the real thing. */
.discord {
  background: #313338;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #1e1f22;
  box-shadow: var(--shadow);
}

.discord-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid #26282c;
  font-weight: 700;
  color: #f2f3f5;
}

.discord-bar .channel b {
  color: #80848e;
  margin-right: 4px;
  font-weight: 700;
}

/* A fixed height, like a real chat: new messages push old ones off the top,
 * and the page around it never moves. */
.discord-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 18px 14px;
  height: 490px;
  overflow: hidden;
  justify-content: flex-end;
}

.msg,
.typing {
  flex: none;
}

.msg {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.playing .msg:not(.show),
.typing:not(.show) {
  display: none;
}

.playing .msg.show {
  animation: msg-in 0.35s var(--ease) both;
}

.playing.fade .msg {
  opacity: 0;
  transition: opacity 0.5s ease;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.msg-avatar {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
}

.av-a {
  background: #5865f2;
}

.av-m {
  background: #23a55a;
}

.msg-main {
  min-width: 0;
  flex: 1;
}

.msg-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.92rem;
}

.msg-head b {
  color: #f2f3f5;
}

.msg-head .n-a {
  color: #8ea1ff;
}

.msg-head .n-m {
  color: #57d98b;
}

.msg-head time {
  color: #949ba4;
  font-size: 0.75rem;
}

.bot-tag {
  background: #5865f2;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

.msg-text {
  color: #dbdee1;
  font-size: 0.95rem;
}

.slash {
  background: rgba(88, 101, 242, 0.3);
  color: #c9cdfb;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.v2card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
  padding: 12px 14px 12px 18px;
  background: #2b2d31;
  border: 1px solid #3a3c42;
  border-radius: 8px;
  max-width: 360px;
  overflow: hidden;
}

.v2card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.v2card img {
  width: 40px;
  height: 40px;
  flex: none;
}

.v2card strong {
  display: block;
  color: #f2f3f5;
  font-size: 0.95rem;
}

.v2card p {
  margin: 0;
  color: #b5bac1;
  font-size: 0.86rem;
}

.v2card .num {
  color: #fff;
  font-weight: 700;
}

.bar {
  height: 6px;
  width: 170px;
  border-radius: 3px;
  background: #1e1f22;
  margin: 6px 0 4px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  width: 72%;
  border-radius: 3px;
  background: var(--accent);
}

.msg.show .bar i {
  animation: fill 1s var(--ease) both;
}

@keyframes fill {
  from {
    width: 0;
  }
}

.typing {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #949ba4;
  font-size: 0.82rem;
}

.typing span {
  display: inline-flex;
  gap: 3px;
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #b5bac1;
  animation: bounce 1s infinite;
}

.typing i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  60%,
  100% {
    transform: none;
    opacity: 0.5;
  }
  30% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

/* A command being typed. */
.terminal {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin: 8px 0 22px;
  max-width: 380px;
}

.terminal .prompt {
  color: var(--accent-2);
  font-weight: 700;
}

.caret {
  width: 2px;
  height: 1.1em;
  background: var(--text);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* The panel, in miniature. */
.mini-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.mini-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 14px;
}

.mini-head img {
  border-radius: 8px;
}

.mini-head span {
  margin-left: auto;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-2);
  margin-top: 6px;
}

.mini-row div {
  flex: 1;
  min-width: 0;
}

.mini-row b {
  display: block;
  font-size: 0.95rem;
}

.mini-row small {
  color: var(--muted);
  font-size: 0.82rem;
}

.mini-switch {
  flex: none;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--panel-3);
  position: relative;
}

.mini-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #8a8896;
  transition: transform 0.3s var(--spring), background 0.2s ease;
}

.mini-switch.on {
  background: var(--accent);
}

.mini-switch.on::after {
  transform: translateX(18px);
  background: #fff;
}

/* The big systems: solid cards with what is inside. */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.feature:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
}

.feature.wide {
  grid-column: span 2;
}

.feature img {
  margin-bottom: 18px;
}

.feature h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature p {
  color: var(--muted);
  margin-bottom: 18px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tags li {
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  color: #ff8fd8;
  background: var(--accent-soft);
  border: 1px solid rgba(233, 16, 192, 0.25);
}

.more-title {
  font-family: var(--display);
  font-size: 1.2rem;
  margin: 56px 0 18px;
}

/* Every system, small. */
.systems-group {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 26px 0 12px;
}

.systems-group:first-child {
  margin-top: 0;
}

.systems {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.system {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 12px;
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.system:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
}

.system img {
  width: 32px;
  height: 32px;
  flex: none;
}

.system > div {
  min-width: 0;
}

.system strong {
  display: block;
  font-size: 0.95rem;
}

.system span {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* A heading with a button on the right. */
.row-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.row-title h2 {
  margin: 0;
}

/* What we promise. */
.promises {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.promise {
  padding: 28px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
}

.promise:nth-child(2) {
  border-top-color: var(--coral);
}

.promise:nth-child(3) {
  border-top-color: var(--amber);
}

.promise img {
  margin-bottom: 14px;
}

.promise h3 {
  font-size: 1.1rem;
}

.promise p {
  color: var(--muted);
  margin: 0;
}

/* Premium, in one band. */
.premium-band {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 34px 38px;
  border-radius: 24px;
  background: #1c170c;
  border: 1px solid rgba(252, 175, 1, 0.35);
}

.premium-band h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 800;
  color: var(--amber);
  margin-bottom: 8px;
}

.premium-band p {
  color: #d9d2c0;
  margin: 0;
}

.premium-band > div {
  flex: 1;
}

.premium-band .btn-light {
  background: var(--amber);
}

.premium-band .btn-light:hover {
  background: #ffc233;
}

/* The last call. */
.sunset-cta {
  position: relative;
  border-top: 2px solid var(--bg);
  margin-top: 110px;
  padding: 170px 0 110px;
  background: var(--sunset);
  color: #fff;
  text-align: center;
  overflow: hidden;
}

.sunset-cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sunset-cta h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  font-weight: 900;
  letter-spacing: -0.035em;
  margin: 18px 0 10px;
}

.sunset-cta p {
  font-size: 1.12rem;
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 28px;
}

.sunset-cta .hero-actions {
  justify-content: center;
}

.cta-bird {
  overflow: visible;
  animation: hover-bird 5s ease-in-out infinite;
}

/* The sunset page ends in the sunset: no gap before the footer. */
.on-sunset .sunset-cta + * {
  margin-top: 0;
}

.on-sunset .site-footer {
  border-top: 0;
}

@media (max-width: 980px) {
  .sunset-grid,
  .show-row {
    grid-template-columns: 1fr;
  }

  .show-row.flip .show-visual {
    order: 0;
  }

  .sunset-bird {
    order: -1;
  }

  .sunset-bird svg {
    max-width: 300px;
  }

  .sunset-hero::before {
    width: 380px;
    height: 380px;
    right: -120px;
    top: 60px;
  }

  .sunset-hero::after {
    display: none;
  }

  .features,
  .promises {
    grid-template-columns: 1fr 1fr;
  }

  .feature.wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .sunset-hero {
    padding: 96px 0 120px;
  }

  .sunset-grid {
    gap: 20px;
  }

  .sunset-bird svg {
    max-width: 170px;
  }

  .sunset-tag {
    font-size: 0.8rem;
    margin-bottom: 16px;
  }

  .features,
  .promises {
    grid-template-columns: 1fr;
  }

  .feature.wide {
    grid-column: auto;
  }

  .premium-band {
    flex-direction: column;
    align-items: flex-start;
    padding: 28px 24px;
  }

  .discord-body {
    height: 440px;
  }

  .wave {
    height: 70px;
  }

  .sunset-cta {
    padding: 120px 0 80px;
  }
}

/* --- document pages (guide, privacy, terms, commands) ------------------------------------ */

.page-head {
  padding-top: 56px;
  padding-bottom: 28px;
  animation: rise 0.8s var(--ease) both;
}

.page-head h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-head p {
  color: var(--muted);
  max-width: 720px;
  font-size: 1.05rem;
}

.prose {
  max-width: 780px;
  line-height: 1.75;
}

.container.narrow.prose {
  max-width: 840px;
  padding-bottom: 64px;
}

.prose h2 {
  font-size: 1.55rem;
  margin-top: 2em;
}

.prose h3 {
  font-size: 1.15rem;
  margin-top: 1.5em;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li {
  margin: 0.35em 0;
}

.prose li::marker {
  color: var(--accent);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2em 0;
  font-size: 0.93rem;
}

.prose th,
.prose td {
  border: 1px solid var(--line);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

.prose th {
  background: var(--glass-2);
}

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  background: var(--gradient-soft);
  border: 1px solid rgba(233, 16, 192, 0.25);
  color: var(--text);
}

.prose blockquote p {
  margin: 0;
}

.prose pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
}

.prose pre code {
  border: 0;
  background: none;
  padding: 0;
}

.prose a {
  color: #ff7ad9;
  text-decoration-color: rgba(255, 122, 217, 0.4);
  text-underline-offset: 3px;
}

.prose hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
  margin: 2.4em 0;
}

.table-wrap {
  overflow-x: auto;
}

/* The guide's own title repeats the page heading. */
#guide > h1:first-child {
  display: none;
}

.doc-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 44px;
  padding-bottom: 64px;
}

.toc {
  position: sticky;
  top: 92px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.9rem;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(17, 15, 25, 0.75);
  scrollbar-width: thin;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.toc a {
  display: block;
  position: relative;
  color: var(--muted);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.toc a:hover {
  color: var(--text);
  background: var(--glass-2);
}

.toc a.active {
  color: var(--text);
  background: var(--accent-soft);
}

.toc a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  border-radius: 3px;
  background: var(--gradient);
}

/* commands */

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.search {
  flex: 1 1 280px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 0 20px;
  transition: border-color 0.2s ease, box-shadow 0.3s ease;
}

.search:focus-within {
  border-color: rgba(233, 16, 192, 0.6);
  box-shadow: 0 0 0 4px rgba(233, 16, 192, 0.15);
}

.search input {
  flex: 1;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  padding: 13px 0;
  outline: none;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.87rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s var(--spring);
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.chip:active {
  transform: scale(0.95);
}

.chip[aria-pressed='true'] {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

.cmd-count {
  color: var(--faint);
  font-size: 0.9rem;
}

.cmd-list {
  display: grid;
  gap: 8px;
  padding-bottom: 64px;
}

.cmd {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
  animation: rise 0.5s var(--ease) both;
}

.cmd:hover {
  border-color: var(--line-2);
}

.cmd[open] {
  border-color: rgba(233, 16, 192, 0.4);
  background: linear-gradient(180deg, rgba(233, 16, 192, 0.06), rgba(255, 255, 255, 0.015));
}

.cmd summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.cmd summary::-webkit-details-marker {
  display: none;
}

.cmd-name {
  font-family: var(--mono);
  font-weight: 600;
  color: #ffd27a;
}

.cmd-desc {
  color: var(--muted);
  font-size: 0.93rem;
}

.cmd-meta {
  margin-left: auto;
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--glass-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.admin {
  color: var(--amber);
  border-color: rgba(252, 175, 1, 0.3);
}

.cmd-body {
  padding: 4px 18px 18px;
  display: grid;
  gap: 14px;
  font-size: 0.93rem;
  animation: rise 0.4s var(--ease) both;
}

.cmd-body h5 {
  margin: 0 0 6px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--faint);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.subs {
  display: grid;
  gap: 8px;
}

.sub {
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 12px;
}

.sub small {
  display: block;
  color: var(--faint);
}

.empty {
  color: var(--muted);
  padding: 28px 0;
}

/* --- the panel ------------------------------------------------------------------------ */

.panel-main {
  padding: 36px 0 80px;
}

.center-card {
  position: relative;
  max-width: 460px;
  margin: 48px auto;
  text-align: center;
  padding: 40px 34px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.7s var(--ease) both;
}

.center-card h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.center-card h1.gradient-text {
  font-size: 4.2rem;
  margin-bottom: 8px;
}

.center-card .hero-bird {
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  border-radius: 22px;
  box-shadow: none;
  animation: hover-bird 4s ease-in-out infinite alternate;
}

.center-card .note {
  color: var(--faint);
  font-size: 0.85rem;
  margin: 18px 0 0;
}

.center-card .banner {
  text-align: left;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  font-size: 0.92rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 3px 12px 3px 3px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.user-chip:hover,
.user-chip[aria-expanded='true'] {
  background: var(--glass-2);
  border-color: var(--line);
  color: var(--text);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--gradient);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 26px;
  animation: rise 0.6s var(--ease) both;
}

.panel-head h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin: 0;
}

.panel-head p {
  color: var(--muted);
  margin: 4px 0 0;
}

.panel-main .note.muted {
  margin-top: 24px;
  font-size: 0.88rem;
  color: var(--faint);
}

/* Server cards. */

.guild-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

.guild-grid > .empty {
  grid-column: 1 / -1;
}

.guild-card {
  --hue: 320;
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: rise 0.6s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 55ms);
  transition: transform 0.4s var(--ease), box-shadow 0.4s ease;
}

.guild-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.guild-banner {
  height: 96px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 30%, hsl(var(--hue) 90% 60% / 0.9), transparent 60%),
    radial-gradient(circle at 85% 70%, hsl(calc(var(--hue) + 50) 90% 55% / 0.85), transparent 60%),
    hsl(calc(var(--hue) + 20) 60% 22%);
  transition: transform 0.6s var(--ease);
}

.guild-banner.has-icon {
  background-size: cover;
  background-position: center;
}

/* A server icon, blown up and blurred into a banner (a still filter, drawn once). */
.guild-banner.has-icon::after {
  content: '';
  position: absolute;
  inset: -30px;
  background: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.75) saturate(1.3);
}

.guild-card:hover .guild-banner {
  transform: scale(1.06);
}

.guild-card.absent .guild-banner {
  filter: grayscale(0.7) brightness(0.7);
}

.guild-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--panel);
  background: var(--panel-2);
  margin: -34px 0 0 18px;
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  object-fit: cover;
  transition: transform 0.5s var(--spring);
}

.guild-card:hover .guild-icon {
  transform: scale(1.08) rotate(-4deg);
}

.guild-body {
  padding: 10px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.guild-name {
  font-weight: 700;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guild-meta {
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}

.dot.on {
  background: var(--ok);
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.7);
}

.guild-meta .dot.on::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--ok);
  animation: ping 2s ease-out infinite;
}

@keyframes ping {
  from {
    transform: scale(1);
    opacity: 0.7;
  }
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}

.dot.none {
  background: transparent;
  box-shadow: none;
}

.guild-body .btn {
  margin-top: auto;
}

.banner {
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  background: var(--glass);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  animation: rise 0.5s var(--ease) both;
}

.banner.warn {
  border-color: rgba(251, 191, 36, 0.35);
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.02));
}

.banner.ok {
  border-color: rgba(52, 211, 153, 0.35);
  background: linear-gradient(120deg, rgba(52, 211, 153, 0.1), rgba(52, 211, 153, 0.02));
}

.banner.error {
  border-color: rgba(248, 113, 113, 0.4);
  background: linear-gradient(120deg, rgba(248, 113, 113, 0.12), rgba(248, 113, 113, 0.02));
}

.banner p {
  margin: 0;
  flex: 1 1 240px;
}

/* The settings screen. */

.settings {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.side-guild {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}

.side-guild img,
.side-guild .initial {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--gradient);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex: none;
}

.side-guild strong {
  font-size: 0.97rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.93rem;
  min-width: 0;
  transition: color 0.2s ease, background 0.2s ease, transform 0.25s var(--ease);
}

.side a > span:not(.crown):not(.dot) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.side a:hover {
  background: var(--glass-2);
  color: var(--text);
  transform: translateX(3px);
}

.side a[aria-current='page'] {
  background: var(--gradient-soft);
  color: var(--text);
}

.side a[aria-current='page']::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--gradient);
}

.side .back {
  color: var(--faint);
  font-size: 0.86rem;
}

.section-panel {
  animation: rise 0.5s var(--ease) both;
}

/* The section rises once, when the server opens. After that it never moves:
 * another section only fades in, and a save or a system switch redraws it
 * in place. Motion on every click is tiring to look at. */
.section-panel.swap {
  animation: fade-in 0.2s ease both;
}

.section-panel.still,
.section-panel:is(.still, .swap) :is(.section-icon, .banner),
.savebar.steady {
  animation: none;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

/* While the next section loads, the current one dims, but only if it takes a moment. */
.section-host {
  transition: opacity 0.15s ease;
}

.section-host.busy {
  opacity: 0.55;
  pointer-events: none;
  transition-delay: 0.12s;
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.section-panel h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  color: var(--faint);
}

.status.on {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.08);
}

.section-panel > .desc {
  color: var(--muted);
  margin: 6px 0 20px;
}

.form {
  display: grid;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.form-group {
  padding: 20px 22px 8px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--faint);
  border-top: 1px solid var(--line);
}

.form-group:first-child {
  border-top: 0;
}

.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  gap: 10px 28px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid var(--line);
  transition: background 0.2s ease;
}

.form-group + .field,
.field:first-child {
  border-top: 0;
}

.field:hover {
  background: rgba(255, 255, 255, 0.02);
}

.field.wide {
  grid-template-columns: 1fr;
}

.field label,
.field .label {
  font-weight: 600;
  font-size: 0.98rem;
}

.field .hint {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 400;
  margin-top: 3px;
}

.field .error {
  grid-column: 1 / -1;
  color: var(--danger);
  font-size: 0.86rem;
  animation: rise 0.3s var(--ease) both;
}

.field.has-error {
  background: rgba(248, 113, 113, 0.06);
}

.input,
.select,
.textarea {
  width: 100%;
  background: rgba(7, 6, 12, 0.6);
  color: var(--text);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.select {
  cursor: pointer;
}

.textarea {
  min-height: 110px;
  resize: vertical;
  font-family: var(--font);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: rgba(255, 255, 255, 0.24);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: rgba(233, 16, 192, 0.7);
  box-shadow: 0 0 0 4px rgba(233, 16, 192, 0.15);
}

.with-unit {
  display: flex;
  align-items: center;
  gap: 10px;
}

.with-unit .unit {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.counter {
  text-align: right;
  color: var(--faint);
  font-size: 0.78rem;
  margin-top: 4px;
}

/* The switch: springs across. */

.switch {
  justify-self: end;
  position: relative;
  width: 50px;
  height: 28px;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--line-2);
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.switch span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #cfc9dc;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.45s var(--spring), background 0.2s ease, width 0.2s ease;
}

.switch input:active + span::after {
  width: 26px;
}

.switch input:checked + span {
  background: var(--gradient);
  border-color: transparent;
  box-shadow: none;
}

.switch input:checked + span::after {
  transform: translateX(22px);
  background: #fff;
}

.switch input:checked:active + span::after {
  transform: translateX(16px);
}

.switch input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Picked channels and roles. */

.picker {
  display: grid;
  gap: 10px;
}

.picked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 3px 4px 3px 12px;
  font-size: 0.88rem;
}

/* Only the pill just added pops: the others stay put when the list is redrawn. */
.pill.new {
  animation: pop 0.35s var(--spring) both;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.pill .swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--faint);
}

.pill button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.pill button:hover {
  background: rgba(248, 113, 113, 0.2);
  color: #fff;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checks label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  background: var(--glass);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.checks label:has(input:checked) {
  border-color: rgba(233, 16, 192, 0.55);
  background: var(--accent-soft);
}

.checks input {
  accent-color: var(--magenta);
}

.rolemap {
  display: grid;
  gap: 8px;
}

.rolemap .counter {
  text-align: left;
}

.rolemap-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.rolemap-row.new {
  animation: rise 0.35s var(--ease) both;
}

/* A list of things of one kind (boards, counters, tags…): each item a small card of its fields. */

.list-field {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  overflow: hidden;
}

.list-item.new {
  animation: rise 0.35s var(--ease) both;
}

.list-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}

.list-item-head strong {
  min-width: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.list-item-body {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding: 14px;
}

.list-sub {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.list-sub.wide {
  grid-column: 1 / -1;
}

.list-sub .label {
  font-weight: 600;
  font-size: 0.92rem;
}

.list-sub .hint {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.list-empty {
  margin: 0;
}

.list-field > .btn {
  justify-self: start;
}

@media (max-width: 640px) {
  .list-item-body {
    grid-template-columns: 1fr;
  }
}

/* Reset data: at the bottom of a section, apart from the form. */

.danger-zone {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  padding: 18px 22px;
  border: 1px solid color-mix(in srgb, var(--danger) 40%, var(--line));
  border-radius: var(--radius);
}

.danger-zone h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--danger);
}

.danger-zone > .hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.danger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.danger-info {
  display: grid;
  flex: 1 1 260px;
  gap: 4px;
  min-width: 0;
}

.danger-info .hint {
  color: var(--muted);
  font-size: 0.85rem;
}

.danger-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-confirm .input {
  width: 120px;
}

.module-off {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Save bar and toast. */

.savebar {
  position: sticky;
  bottom: 18px;
  z-index: 5;
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 20px;
  border-radius: 999px;
  background: var(--panel-2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(233, 16, 192, 0.35);
  box-shadow: 0 20px 50px -16px rgba(0, 0, 0, 0.8);
  animation: slide-up 0.45s var(--spring) both;
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.savebar p {
  margin: 0 auto 0 0;
  color: var(--muted);
}

.savebar[hidden] {
  display: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  background: rgba(24, 21, 33, 0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: 0.94rem;
  animation: toast-in 0.5s var(--spring) both, toast-out 0.4s ease 2.8s forwards;
}

.toast::before {
  content: '';
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
}

.toast.error::before {
  background: var(--danger);
  box-shadow: 0 0 12px var(--danger);
}

.toast.ok {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.45);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translate(-50%, 10px);
  }
}

.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin: 80px auto;
  background: conic-gradient(from 0deg, transparent 0deg, var(--amber) 120deg, var(--magenta) 300deg, transparent 360deg);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  color: var(--faint);
  text-align: center;
  padding: 60px 0;
}

.note {
  font-size: 0.85rem;
}

/* --- small screens --------------------------------------------------------------------- */

@media (max-width: 860px) {
  .settings,
  .doc-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    max-height: none;
  }

  .field {
    grid-template-columns: 1fr;
  }

  .switch {
    justify-self: start;
  }

  /* On a phone the sections are one swipeable row above the form. */
  .side {
    position: static;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    max-height: none;
    padding: 8px;
    scrollbar-width: none;
  }

  .side a,
  .side .side-guild {
    flex: none;
    white-space: nowrap;
  }

  .side a:hover {
    transform: none;
  }

  .side a[aria-current='page']::before {
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 2px;
    width: auto;
    height: 2px;
  }

  .side .side-guild {
    border-bottom: 0;
    margin: 0;
    padding: 0 10px 0 4px;
    border-right: 1px solid var(--line);
  }

  .side .side-guild strong {
    max-width: 140px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }

  .site-nav {
    display: none;
  }

  .site-header .container {
    gap: 12px;
  }

  .user-chip > span:not(.avatar):not(.dd-chevron) {
    display: none;
  }

  .section {
    padding: 60px 16px 0;
  }

  .discord-body {
    padding: 14px 12px 16px;
  }

  .rolemap-row {
    grid-template-columns: 84px minmax(0, 1fr) auto;
  }

  .site-footer .fine {
    margin-left: 0;
  }

  .savebar {
    border-radius: var(--radius);
  }
}

/* --- less motion ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
  }

  /* The panel removes a toast itself; without motion it simply stays until then. */
  .toast {
    animation: none !important;
    transform: translateX(-50%);
  }
}

.center-card p.muted {
  margin: 0 0 26px;
}

/* Animations rest while their block is off screen (site.js toggles .off). */
.off,
.off *,
.off::before,
.off::after,
.off *::before,
.off *::after {
  animation-play-state: paused !important;
}

/* Section icons in the panel: the bot's own emoji set. */
.side a .section-icon {
  width: 22px;
  height: 22px;
  flex: none;
  transition: transform 0.4s var(--spring);
}

.side a:hover .section-icon,
.side a[aria-current='page'] .section-icon {
  transform: scale(1.15) rotate(-6deg);
}

.side a .dot {
  margin-left: auto;
  width: 7px;
  height: 7px;
}

.section-title-row .section-icon {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.5));
  animation: pop 0.5s var(--spring) both;
}

.sub > code {
  align-self: start;
  justify-self: start;
}

/* --- the panel's dropdown ----------------------------------------------------------- */

.dd {
  position: relative;
  min-width: 0;
}

.dd-button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(7, 6, 12, 0.6);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}

.dd-button:hover {
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.04);
}

.dd.open .dd-button,
.dd-button:focus-visible {
  outline: none;
  border-color: rgba(233, 16, 192, 0.7);
  box-shadow: 0 0 0 4px rgba(233, 16, 192, 0.15);
}

.dd-button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.dd-face {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  flex: 1;
}

.dd-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dd-placeholder {
  flex: 1;
  color: var(--faint);
}

.dd-mark {
  flex: none;
  width: 18px;
  text-align: center;
  color: var(--faint);
  font-weight: 700;
  font-size: 0.9rem;
}

.dd-swatch {
  flex: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.dd-chevron {
  flex: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s var(--spring);
}

.dd.open .dd-chevron,
.user-chip[aria-expanded='true'] .dd-chevron {
  transform: translateY(2px) rotate(225deg);
}

.dd-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 220px;
  max-height: 340px;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(22, 19, 31, 0.98);
  box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(233, 16, 192, 0.08);
  overflow: hidden;
  transform-origin: top center;
  animation: dd-in 0.18s var(--ease) both;
}

.dd-menu.up {
  top: auto;
  bottom: calc(100% + 6px);
  transform-origin: bottom center;
}

@keyframes dd-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

.dd-search {
  flex: none;
  margin: 8px 8px 4px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(7, 6, 12, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
}

.dd-search:focus {
  outline: none;
  border-color: rgba(233, 16, 192, 0.6);
}

.dd-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.dd-list:focus {
  outline: none;
}

.dd-group {
  padding: 10px 10px 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}

.dd-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 34px 9px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 0.94rem;
  transition: background 0.12s ease;
}

.dd-option.active {
  background: rgba(255, 255, 255, 0.07);
}

.dd-option.selected {
  background: var(--accent-soft);
}

.dd-option.selected::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 5px;
  height: 10px;
  border-right: 2px solid #ff7ad9;
  border-bottom: 2px solid #ff7ad9;
  transform: translateY(-65%) rotate(45deg);
}

.dd-option.clear .dd-label {
  color: var(--faint);
}

.dd-option small {
  margin-left: auto;
  color: var(--faint);
  font-size: 0.78rem;
  white-space: nowrap;
}

.dd-option[aria-disabled='true'] {
  opacity: 0.45;
  cursor: not-allowed;
}

.dd-empty {
  padding: 14px 10px;
  color: var(--faint);
  font-size: 0.9rem;
  text-align: center;
}

.rolemap-row .dd-button,
.picker .dd-button {
  min-height: 40px;
}

/* --- account menu ----------------------------------------------------------------------- */

.account-menu {
  position: relative;
}

.account-list {
  left: auto;
  right: 0;
  min-width: 240px;
  padding: 6px;
}

.account-list button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  cursor: pointer;
}

.account-list button:hover,
.account-list button:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

.account-list button.danger {
  color: var(--danger);
}

/* --- search in the panel --------------------------------------------------------------- */

.side-wrap {
  position: sticky;
  top: 92px;
  align-self: start;
  display: grid;
  /* The column is the limit: a long section name or the search box never widens it. */
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
  animation: rise 0.6s var(--ease) both;
}

.panel-search {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--panel);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}

.panel-search:focus-within {
  border-color: rgba(233, 16, 192, 0.6);
  box-shadow: 0 0 0 4px rgba(233, 16, 192, 0.13);
}

/* A magnifying glass drawn in CSS: no extra file, no inline SVG. */
.panel-search::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 2px solid var(--faint);
  border-radius: 50%;
  transform: translateY(-60%);
  pointer-events: none;
}

.panel-search::after {
  content: '';
  position: absolute;
  left: 25px;
  top: 50%;
  width: 2px;
  height: 6px;
  background: var(--faint);
  transform: translateY(20%) rotate(-45deg);
  pointer-events: none;
}

.panel-search input {
  flex: 1;
  min-width: 0;
  padding: 11px 10px 11px 38px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.93rem;
  outline: none;
}

.panel-search kbd {
  margin-right: 10px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  color: var(--faint);
  font-family: var(--font);
  font-size: 0.72rem;
  white-space: nowrap;
}

.search-results {
  min-width: 300px;
  max-height: 420px;
}

.dd-option.result {
  padding-right: 10px;
}

.dd-option.result .section-icon {
  width: 22px;
  height: 22px;
  flex: none;
}

.result-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.result-text small {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-kind {
  flex: none;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid var(--line);
}

/* --- the system switch in a section header, links to a system's settings ---------------- */

.section-switch {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--glass);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.section-switch.on {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.07);
}

.section-switch .switch {
  justify-self: auto;
}

.field-link {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ff7ad9;
  text-decoration: none;
  transition: transform 0.2s var(--ease), color 0.2s ease;
}

.field-link:hover {
  color: #ffb0ea;
  transform: translateX(3px);
}

/* A setting found by the search lights up for a moment. */
.field.flash {
  animation: flash 2.2s var(--ease);
}

@keyframes flash {
  0%,
  35% {
    background: rgba(233, 16, 192, 0.16);
    box-shadow: inset 3px 0 0 var(--magenta);
  }
  100% {
    background: transparent;
    box-shadow: inset 3px 0 0 transparent;
  }
}

@media (max-width: 860px) {
  .side-wrap {
    position: static;
  }

  .section-switch {
    margin-left: 0;
  }

  .search-results {
    min-width: 0;
  }
}

.avatar {
  display: inline-block;
  flex: none;
}

/* The dropdown's list is placed on the page itself (panel.js), so no form or column can clip it. */
.dd-menu.floating {
  position: fixed;
  right: auto;
  z-index: 60;
}

/* --- the check on the way into a server (/verify/<server>) ------------------------------ */

/* The first card rises; the ones after it (signed in, checked) only fade in. */
.verify-card.again {
  animation: fade-in 0.25s ease both;
}

.verify-card .verify-guild {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  border-radius: 24px;
  display: block;
  box-shadow: none;
}

.verify-card .verify-server {
  margin: 0 0 6px;
  color: var(--muted);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.verify-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  background: var(--glass-2);
  border: 1px solid var(--line-2);
}

.verify-mark.ok {
  background: linear-gradient(140deg, #34d399, #059669);
  border-color: transparent;
  box-shadow: 0 14px 36px -12px rgba(52, 211, 153, 0.8);
}

.verify-mark.wait {
  background: linear-gradient(140deg, var(--amber), var(--coral));
  border-color: transparent;
  box-shadow: none;
}

.verify-mark.stop {
  background: linear-gradient(140deg, var(--coral), var(--magenta));
  border-color: transparent;
  box-shadow: none;
}

.verify-who {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.verify-who img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.verify-who strong {
  color: var(--text);
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--faint);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-button:hover {
  color: var(--text);
}

.verify-facts {
  list-style: none;
  margin: 0 0 22px;
  padding: 16px 18px;
  display: grid;
  gap: 10px;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--line);
}

.verify-facts li {
  position: relative;
  padding-left: 22px;
}

.verify-facts li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
}

.verify-card .banner {
  text-align: left;
}

/* --- premium in the panel ----------------------------------------------------------------- */

.side a .crown {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--faint);
}

.side a .crown.on {
  color: var(--amber);
}

.side a .crown + .dot {
  margin-left: 6px;
}

.side-premium {
  display: block;
  margin: -4px 0 8px;
  font-size: 0.82rem;
  color: var(--faint);
}

.side-premium.on {
  color: var(--amber);
  font-weight: 600;
}

.banner.premium {
  border-color: rgba(252, 175, 1, 0.35);
  background: linear-gradient(120deg, rgba(252, 175, 1, 0.12), rgba(233, 16, 192, 0.08));
}

.form-lock {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  opacity: 0.55;
}

.view-empty {
  color: var(--muted);
  padding: 22px 4px;
}

.view-title {
  margin: 26px 0 10px;
  font-size: 1.05rem;
}

.view-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

/* --- analytics ------------------------------------------------------------------------------ */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 8px 0 20px;
}

.kpi {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--line);
}

.kpi-label,
.kpi-note {
  font-size: 0.8rem;
  color: var(--muted);
}

.kpi strong {
  font-size: 1.45rem;
  font-weight: 800;
}

.chart {
  margin: 0 0 16px;
  padding: 14px 16px 10px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--line);
}

.chart figcaption {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.chart figcaption strong {
  color: var(--text);
}

.chart svg {
  display: block;
  width: 100%;
  height: 160px;
}

.chart-line {
  fill: none;
  stroke: var(--magenta);
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.chart-area {
  fill: rgba(233, 16, 192, 0.14);
}

.chart-bar {
  fill: var(--amber);
  opacity: 0.85;
}

.chart-bar:hover {
  opacity: 1;
}

.chart-axis {
  stroke: var(--line-2);
  vector-effect: non-scaling-stroke;
}

.chart-dates {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--faint);
}

.heat-grid {
  display: grid;
  grid-template-columns: 28px repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: center;
}

.heat-cell {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--magenta);
}

.heat-day,
.heat-hour {
  font-size: 0.7rem;
  color: var(--faint);
}

.heat-hour {
  text-align: center;
}

.table-wrap {
  overflow-x: auto;
}

table.invites {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.invites th,
table.invites td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

table.invites th {
  color: var(--muted);
  font-weight: 600;
}

.small {
  font-size: 0.85rem;
}

/* --- copies and history -------------------------------------------------------------------- */

.history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.history-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--glass);
  border: 1px solid var(--line);
}

.history-list li.undone {
  opacity: 0.55;
}

.copy-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.copy-row .dd {
  flex: 1 1 240px;
}

.appeal-text {
  width: 100%;
  margin: 8px 0 4px;
  text-align: left;
}

/* --- the server list (/servers) -------------------------------------------------------- */

.srv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 8px;
}

.srv-grid > .spinner,
.srv-grid > .banner,
.srv-grid > .srv-empty {
  grid-column: 1 / -1;
}

/* A card: a painted cover, the icon standing on its edge, then the facts. */
.srv-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.25s var(--ease);
}

.srv-card:hover {
  border-color: var(--line-2);
  transform: translateY(-3px);
}

.srv-card.premium {
  border-color: rgba(252, 175, 1, 0.45);
}

.srv-cover {
  display: block;
  height: 96px;
}

/* Painted skies: a few colour washes with a soft hill of light, no pictures to load. */
.cover-0,
.cover-1,
.cover-2,
.cover-3,
.cover-4,
.cover-5,
.cover-sunset {
  background-color: #2a2a35;
  background-image: radial-gradient(120% 90% at 85% 120%, rgba(255, 255, 255, 0.28), transparent 60%), var(--cover);
}

.cover-0 {
  --cover: linear-gradient(120deg, #3b1d8f, #7b3fe4);
}

.cover-1 {
  --cover: linear-gradient(120deg, #0d3b8a, #2f7bf5);
}

.cover-2 {
  --cover: linear-gradient(120deg, #0c5c4c, #22b59a);
}

.cover-3 {
  --cover: linear-gradient(120deg, #7a1331, #e2345f);
}

.cover-4 {
  --cover: linear-gradient(120deg, #7a3a07, #f08a24);
}

.cover-5 {
  --cover: linear-gradient(120deg, #1f2a44, #56688f);
}

.cover-sunset {
  --cover: var(--sunset);
}

/* The server's own banner over the painted sky. */
.srv-cover.has-banner,
.srv-hero-cover.has-banner {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.srv-card > .srv-premium {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 15, 19, 0.72);
}

.srv-id {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0 18px;
  min-width: 0;
}

.srv-icon {
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-2);
}

.srv-card .srv-icon {
  width: 64px;
  height: 64px;
  margin-top: -32px;
  border: 4px solid var(--panel);
}

.srv-letters {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  color: var(--text);
  background: var(--panel-3);
}

.srv-card .srv-letters {
  font-size: 1.1rem;
}

.srv-name {
  min-width: 0;
  padding-top: 8px;
}

.srv-name h2 {
  font-family: var(--font);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.srv-name h2 a {
  text-decoration: none;
}

.srv-name h2 a:hover {
  color: var(--accent-2);
}

.srv-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 10px;
  font-size: 0.84rem;
  color: var(--muted);
}

.srv-online::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  margin-right: 5px;
  vertical-align: 1px;
}

.srv-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 0;
  font-size: 0.86rem;
}

.srv-line .srv-tags {
  flex: 1;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.srv-score,
.srv-votes {
  flex: none;
  font-weight: 700;
  color: var(--text);
}

.srv-score .star {
  color: var(--amber);
  margin-right: 3px;
}

.srv-votes {
  color: var(--muted);
}

.srv-bottom {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px 18px;
  margin-top: auto;
}

.srv-bottom .srv-short {
  flex: 1;
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.srv-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-width: 0;
}

.srv-title h1 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.srv-premium {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--amber);
  border: 1px solid rgba(252, 175, 1, 0.4);
  background: rgba(252, 175, 1, 0.1);
  white-space: nowrap;
}

.srv-premium.inline {
  vertical-align: 1px;
}

.srv-short {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.srv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.srv-tags .badge {
  text-decoration: none;
  white-space: nowrap;
}

.srv-tags .badge:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.srv-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

.srv-stats > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dot-members,
.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.dot-online {
  background: var(--ok);
}

.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--faint);
  letter-spacing: 0;
}

.stars .on {
  color: var(--amber);
}

.srv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.srv-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 28px 0 8px;
}

.srv-note {
  margin: 32px 0 70px;
  text-align: center;
}

.srv-tag-chips {
  max-height: none;
}

/* The catalog's head: a title with the search right under it. */
.srv-head-block h1 {
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* A server's page */

.srv-page {
  padding-top: 32px;
  padding-bottom: 80px;
}

.srv-back {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--muted);
  text-decoration: none;
}

.srv-back:hover {
  color: var(--text);
}

.srv-hero {
  display: grid;
  grid-template-columns: auto 1fr minmax(220px, 260px);
  gap: 0 24px;
  align-items: start;
  padding: 0 28px 28px;
  overflow: hidden;
}

.srv-hero.premium {
  border-color: rgba(252, 175, 1, 0.45);
}

/* The same painted sky as the server's card, across the top. */
.srv-hero-cover {
  grid-column: 1 / -1;
  height: 150px;
  margin: 0 -28px;
}

.srv-hero .srv-icon {
  width: 108px;
  height: 108px;
  margin-top: -46px;
  border: 5px solid var(--panel);
}

.srv-hero .srv-letters {
  font-size: 2rem;
}

.srv-hero-text {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding-top: 18px;
}

.srv-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 20px;
}

.srv-vote {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.srv-vote .btn {
  width: 100%;
}

.srv-vote .note {
  margin: 0;
}

.srv-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.srv-about h2 {
  font-size: 1.15rem;
  margin: 0 0 12px;
}

.srv-description {
  margin: 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.6;
}

.srv-reviews {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.srv-score {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
}

.srv-score-value {
  font-size: 2.6rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.srv-score .stars {
  font-size: 1.15rem;
}

.srv-score p {
  margin: 2px 0 0;
  font-size: 0.88rem;
}

.srv-review-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px 22px;
}

.srv-review-form h3 {
  margin: 0;
}

.srv-review-form .banner {
  margin: 0;
}

.star-row {
  display: flex;
  gap: 4px;
}

.star-pick {
  font-size: 1.7rem;
  line-height: 1;
  background: none;
  border: 0;
  padding: 2px;
  cursor: pointer;
  color: var(--faint);
  transition: color 0.15s ease, transform 0.2s var(--spring);
}

.star-pick[aria-pressed='true'] {
  color: var(--amber);
}

.star-pick:hover {
  transform: scale(1.15);
}

.srv-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.srv-review {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--glass);
}

.srv-review.mine {
  border-color: rgba(233, 16, 192, 0.35);
}

.srv-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 0.9rem;
}

.srv-review-head strong {
  overflow-wrap: anywhere;
}

.srv-review-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--panel-3);
  font-size: 0.95rem;
}

/* Text under the name lines up with it, not with the avatar. */
.srv-review p {
  padding-left: 46px;
}

/* A picture field in the panel: the preview at the banner's own shape. */
.image-control {
  display: grid;
  gap: 10px;
}

.image-preview {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 1;
  width: 100%;
  max-width: 600px;
  border-radius: 12px;
  border: 1px dashed var(--line-2);
  background: var(--panel-2);
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.srv-review p {
  margin: 8px 0 0;
  color: var(--muted);
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.srv-who {
  margin-top: 24px;
  text-align: center;
}

@media (max-width: 860px) {
  .srv-hero {
    grid-template-columns: auto 1fr;
  }

  .srv-hero-actions {
    grid-column: 1 / -1;
  }

  .srv-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .srv-grid {
    grid-template-columns: 1fr;
  }

  /* One row of topics to swipe, not half a screen of them. */
  .srv-tag-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -16px;
    padding: 0 16px 4px;
  }

  .srv-tag-chips .chip {
    flex: none;
  }

  .srv-hero {
    grid-template-columns: 1fr;
    padding: 0 18px 22px;
  }

  .srv-hero-cover {
    height: 110px;
    margin: 0 -18px;
  }

  .srv-hero .srv-icon {
    width: 84px;
    height: 84px;
    margin-top: -40px;
  }
}

/* --- premium (/premium) ---------------------------------------------------------------- */

.plans-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  margin: 12px 0 16px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.plans.two {
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
}

.plan {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px;
}

.plan h3 {
  margin: 0;
}

.plan-price {
  margin: 4px 0 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.card .plan-price strong {
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.plan-note {
  font-size: 0.9rem;
}

.plan-flag {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--amber);
  border: 1px solid rgba(252, 175, 1, 0.35);
  background: rgba(252, 175, 1, 0.08);
}

.plan.best {
  border-color: rgba(252, 175, 1, 0.45);
  background: #1c170c;
}

.plan.trial {
  border-style: dashed;
}

.perks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 18px 0 14px;
}

.perk {
  padding: 22px;
}

.perk img {
  display: block;
  margin-bottom: 10px;
}

.limits,
.how {
  padding: 24px;
  margin-bottom: 40px;
}

.limit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.limit-table th,
.limit-table td {
  text-align: left;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}

.limit-table th {
  color: var(--faint);
  font-weight: 600;
  font-size: 0.82rem;
}

.limit-table td:last-child {
  color: var(--amber);
  font-weight: 600;
}

.perk-list {
  color: var(--muted);
  margin: 16px 0 28px;
  padding-left: 20px;
  line-height: 1.8;
}

.how ol {
  color: var(--muted);
  padding-left: 20px;
  line-height: 1.7;
}

.how p {
  margin-top: 12px;
}

@media (max-width: 520px) {
  .limit-table {
    font-size: 0.86rem;
  }
}
