/* ServerOps website. One stylesheet, no web fonts, no scripts (the CSP allows neither).
   Dark first, with a light theme that follows the visitor's system. */

:root {
  --bg: #0b0d14;
  --bg-2: #0f121b;
  --panel: #141824;
  --panel-2: #1b2030;
  --line: #252b3c;
  --line-strong: #353d55;
  --text: #eef0f7;
  --muted: #9ba2b6;
  --faint: #6c7389;
  --brand: #7c84ff;
  --brand-2: #b07cff;
  --brand-text: #ffffff;
  --brand-soft: rgb(124 132 255 / 14%);
  --brand-line: rgb(124 132 255 / 40%);
  --grad: linear-gradient(135deg, #6d77ff 0%, #9c6bff 55%, #c86bff 100%);
  --success: #3ddc97;
  --success-soft: rgb(61 220 151 / 13%);
  --warning: #ffc94d;
  --warning-soft: rgb(255 201 77 / 12%);
  --danger: #ff5f6f;
  --danger-soft: rgb(255 95 111 / 12%);
  --off: #6c7389;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 rgb(255 255 255 / 4%) inset, 0 14px 40px rgb(0 0 0 / 35%);
  --shadow-sm: 0 6px 18px rgb(0 0 0 / 25%);
  --glow: radial-gradient(900px 480px at 75% -8%, rgb(124 132 255 / 22%), transparent 62%), radial-gradient(700px 420px at 5% 12%, rgb(176 124 255 / 12%), transparent 60%);
  --content: 1140px;
  --content-wide: 1340px;
  color-scheme: dark light;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7fc;
    --bg-2: #eef0f8;
    --panel: #ffffff;
    --panel-2: #f3f4fa;
    --line: #e2e5f0;
    --line-strong: #cdd2e2;
    --text: #12141d;
    --muted: #586078;
    --faint: #878ea3;
    --brand: #5865f2;
    --brand-2: #8b5cf6;
    --brand-soft: rgb(88 101 242 / 9%);
    --brand-line: rgb(88 101 242 / 35%);
    --grad: linear-gradient(135deg, #5865f2 0%, #7c5cf6 55%, #a855f7 100%);
    --success: #0f8a52;
    --success-soft: rgb(15 138 82 / 10%);
    --warning: #9a6700;
    --warning-soft: rgb(255 193 7 / 15%);
    --danger: #c8293a;
    --danger-soft: rgb(200 41 58 / 9%);
    --off: #8a90a3;
    --shadow: 0 1px 2px rgb(16 24 40 / 5%), 0 10px 30px rgb(16 24 40 / 8%);
    --shadow-sm: 0 4px 14px rgb(16 24 40 / 8%);
    --glow: radial-gradient(900px 480px at 75% -8%, rgb(88 101 242 / 13%), transparent 62%), radial-gradient(700px 420px at 5% 12%, rgb(139 92 246 / 8%), transparent 60%);
    color-scheme: light dark;
  }
}

/* --- Base ------------------------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--glow), var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 16px/1.6 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--brand-line); }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  font-size: 0.88em;
  background: var(--brand-soft);
  color: var(--text);
  border: 1px solid var(--brand-line);
  padding: 0.08em 0.4em;
  border-radius: 6px;
  white-space: nowrap;
}
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 10px; }
h2 { font-size: 1.25rem; margin: 32px 0 12px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 1.12rem; margin: 0 0 22px; max-width: 70ch; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* --- Header ---------------------------------------------------------------------------------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.top-in { display: flex; align-items: center; gap: 22px; max-width: var(--content); margin: 0 auto; padding: 12px 20px; }
.top-in.wide { max-width: var(--content-wide); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 9px; box-shadow: 0 4px 14px rgb(109 119 255 / 35%); }
.links { display: flex; align-items: center; gap: 4px; }
.links a { color: var(--muted); text-decoration: none; font-weight: 550; font-size: 0.95rem; padding: 7px 12px; border-radius: 9px; }
.links a:hover, .links a[aria-current="page"] { color: var(--text); background: var(--panel-2); }
.account { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.92rem; }
.me img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.inline { display: inline; margin: 0; }

/* --- Page frame ------------------------------------------------------------------------------ */
main { width: 100%; max-width: var(--content); margin: 0 auto; padding: 36px 20px 64px; flex: 1; }
main.wide { max-width: var(--content-wide); }
.site-foot { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
.foot-in { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; max-width: var(--content); margin: 0 auto; padding: 44px 20px 28px; }
.foot-in.wide { max-width: var(--content-wide); }
.foot-col h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); margin: 4px 0 12px; }
.foot-col a:not(.brand) { display: block; color: var(--muted); text-decoration: none; padding: 3px 0; font-size: 0.94rem; }
.foot-col a:not(.brand):hover { color: var(--text); }
.foot-brand p { margin-top: 12px; max-width: 34ch; }
.foot-bottom { max-width: var(--content); margin: 0 auto; padding: 16px 20px 32px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.85rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.foot-bottom.wide { max-width: var(--content-wide); }

/* --- Buttons, pills, badges ------------------------------------------------------------------ */
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.button:hover, button:hover { text-decoration: none; border-color: var(--brand-line); transform: translateY(-1px); }
.button:active, button:active { transform: translateY(0); }
.button.primary, button.primary {
  background: var(--grad);
  border-color: transparent;
  color: var(--brand-text);
  box-shadow: 0 8px 24px rgb(109 119 255 / 32%), 0 1px 0 rgb(255 255 255 / 20%) inset;
}
.button.primary:hover, button.primary:hover { box-shadow: 0 12px 30px rgb(109 119 255 / 42%), 0 1px 0 rgb(255 255 255 / 20%) inset; }
.button.large { padding: 13px 24px; font-size: 1.04rem; border-radius: 12px; }
.button.small { padding: 7px 13px; font-size: 0.9rem; }
.button.danger, button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.link { border: 0; background: none; padding: 0; color: var(--muted); font-weight: 500; transform: none; }
button.link:hover { color: var(--text); text-decoration: underline; transform: none; }
button[disabled], .button[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; transform: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; align-items: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 0.84rem;
  font-weight: 650;
  color: var(--text);
  background: var(--brand-soft);
  border: 1px solid var(--brand-line);
  margin: 0 0 18px;
}
.pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.eyebrow { color: var(--brand); font-weight: 750; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 10px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

.state { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 650; padding: 2px 10px; border-radius: 99px; white-space: nowrap; }
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.state.on { background: var(--success-soft); color: var(--success); }
.state.off { background: color-mix(in srgb, var(--off) 16%, transparent); color: var(--muted); }
.perm { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 650; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.perm.everyone { color: var(--success); border-color: color-mix(in srgb, var(--success) 35%, transparent); background: var(--success-soft); }
.perm.staff { color: var(--brand); border-color: var(--brand-line); background: var(--brand-soft); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.mention { background: var(--brand-soft); color: var(--brand); border-radius: 5px; padding: 0 4px; font-weight: 550; }

.notice { display: block; padding: 12px 16px; border-radius: 12px; margin: 0 0 20px; background: var(--brand-soft); border: 1px solid var(--brand-line); }
.notice.warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 45%, transparent); }
.notice.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.notice ul { margin: 6px 0 0; padding-left: 20px; }

/* --- The front page -------------------------------------------------------------------------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 56px; align-items: center; padding: 28px 0 64px; }
.hero h1 { font-size: clamp(2.3rem, 4.8vw, 3.6rem); line-height: 1.05; letter-spacing: -0.035em; margin-bottom: 18px; font-weight: 820; }
.hero .lead { font-size: 1.18rem; }
.hero .actions { margin: 26px 0 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 0.9rem; }
.trust span::before { content: "✓"; color: var(--success); font-weight: 800; margin-right: 6px; }
.hero-picture { position: relative; }
.hero-picture::before { content: ""; position: absolute; inset: -40px -20px; background: radial-gradient(closest-side, rgb(124 132 255 / 30%), transparent); filter: blur(10px); z-index: -1; }

.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 0 0 72px; }
.stats-strip div { background: var(--panel); padding: 22px; }
.stats-strip strong { display: block; font-size: 1.6rem; letter-spacing: -0.03em; }
.stats-strip span { color: var(--muted); font-size: 0.92rem; }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 12px; letter-spacing: -0.03em; }
.section-head .lead { margin: 0 auto; }

.steps { list-style: none; padding: 0; margin: 0 0 80px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.steps li { position: relative; padding: 26px 22px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); counter-increment: step; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--grad); color: #fff; font-weight: 800; margin-bottom: 14px; box-shadow: 0 6px 18px rgb(109 119 255 / 35%); }
.steps h3 { font-size: 1.08rem; }
.steps p { color: var(--muted); margin: 0; }

.features { display: grid; gap: 88px; padding: 8px 0 88px; }
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; scroll-margin-top: 90px; }
.feature.reverse .feature-text { order: 2; }
.feature h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 14px; letter-spacing: -0.03em; }
.feature-text > p { color: var(--muted); font-size: 1.05rem; }
.points { padding-left: 0; list-style: none; display: grid; gap: 10px; margin: 18px 0 0; }
.points li { display: flex; gap: 10px; align-items: flex-start; }
.points li::before { content: "✓"; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--success-soft); color: var(--success); font-weight: 800; font-size: 0.8rem; margin-top: 2px; }

.more { padding: 0 0 88px; }
.tiles { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tiles li { display: grid; gap: 6px; align-content: start; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.15s ease, transform 0.15s ease; }
.tiles li:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.tile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 1.35rem; margin-bottom: 8px; }
.tiles strong { font-size: 1.02rem; }
.tiles span { color: var(--muted); font-size: 0.94rem; }

.band { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 88px; }
.band > div { padding: 30px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.band h2 { margin-top: 0; font-size: 1.35rem; }

.cta { position: relative; overflow: hidden; text-align: center; padding: 56px 28px; border-radius: 24px; background: var(--panel); border: 1px solid var(--brand-line); box-shadow: var(--shadow); margin-bottom: 16px; }
.cta::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 260px at 50% -20%, rgb(124 132 255 / 28%), transparent 70%); pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0 0 12px; }
.cta .lead { margin: 0 auto; }
.cta .actions { justify-content: center; margin-bottom: 0; }
/* The closing call on older markup. */
.closing { text-align: center; padding: 8px 0 32px; }
.closing .actions { justify-content: center; }

/* A Discord message as members see it: always Discord's dark look. */
.dc { background: #313338; color: #dbdee1; border-radius: 16px; padding: 18px; box-shadow: 0 24px 60px rgb(0 0 0 / 40%), 0 0 0 1px rgb(255 255 255 / 6%); font-size: 0.95rem; }
.dc-msg { display: flex; gap: 12px; }
.dc-avatar { width: 40px; height: 40px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #6d77ff, #b07cff); display: grid; place-items: center; }
.dc-avatar::after { content: "S"; color: #fff; font-weight: 800; }
.dc-content { min-width: 0; flex: 1; }
.dc-name { font-weight: 600; color: #f2f3f5; margin-bottom: 4px; }
.dc-app { background: #5865f2; color: #fff; font-size: 0.65rem; padding: 1px 5px; border-radius: 4px; vertical-align: middle; }
.dc-time { color: #949ba4; font-size: 0.75rem; font-weight: 400; margin-left: 4px; }
.dc-card { background: #2b2d31; border-left: 4px solid #5865f2; border-radius: 6px; padding: 12px 14px; display: grid; gap: 6px; }
.dc-card.dc-success { border-left-color: #57f287; }
.dc-card.dc-warning { border-left-color: #fee75c; }
.dc-card.dc-neutral { border-left-color: #80848e; }
.dc-eyebrow { color: #949ba4; font-size: 0.78rem; }
.dc-title { color: #f2f3f5; font-weight: 700; font-size: 1.1rem; }
.dc-text, .dc-field, .dc-notice, .dc-bar { margin: 0; }
.dc-notice { color: #b5bac1; }
.dc-mention { background: rgb(88 101 242 / 30%); color: #c9cdfb; border-radius: 3px; padding: 0 2px; }
.dc-divider { height: 1px; background: #3f4147; margin: 4px 0; }
.dc-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.dc-btn { background: #4e5058; color: #fff; border-radius: 4px; padding: 6px 12px; font-size: 0.88rem; font-weight: 500; }
.dc-btn.primary { background: #5865f2; }
.dc-select { background: #1e1f22; border-radius: 4px; padding: 9px 12px; color: #949ba4; display: flex; justify-content: space-between; }
.dc-options { display: flex; gap: 6px; flex-wrap: wrap; font-size: 0.85rem; }
.dc-options span { background: #1e1f22; border-radius: 4px; padding: 4px 8px; }
.dc-board { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.dc-board code { background: #1e1f22; color: #dbdee1; border: 0; }
.dc-bar { color: #57f287; letter-spacing: 1px; }
.dc-bar span { color: #949ba4; letter-spacing: 0; font-size: 0.85rem; margin-left: 6px; }

/* --- Commands and the guide ------------------------------------------------------------------ */
.page-hero { padding: 12px 0 28px; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.035em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; }
.toc a { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.toc a:hover { color: var(--text); border-color: var(--brand-line); }
.cmd-group { margin: 0 0 44px; scroll-margin-top: 90px; }
.cmd-group > h2 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin: 0 0 6px; }
.cmd-group > p { color: var(--muted); margin: 0 0 18px; }
.cmd-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 480px), 1fr)); }
.cmd { padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); scroll-margin-top: 90px; }
.cmd-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cmd-name { font-family: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace; font-size: 1.08rem; font-weight: 750; color: var(--text); }
.cmd > p { color: var(--muted); margin: 0 0 12px; }
.subs { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.subs li { display: grid; gap: 3px; }
.subs code { justify-self: start; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.subs span { color: var(--muted); font-size: 0.94rem; padding-left: 2px; }
/* Commands with many subcommands take the full row, their list in two columns. */
.cmd.span { grid-column: 1 / -1; }
.cmd.span .subs { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 12px 32px; }
.tip { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--text); font-size: 0.92rem; }
.tip::before { content: "💡 "; }

.guide-steps { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 18px; counter-reset: gstep; }
.guide-steps > li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); counter-increment: gstep; scroll-margin-top: 90px; }
.guide-steps > li::before { content: counter(gstep); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--grad); color: #fff; font-weight: 800; font-size: 1.15rem; box-shadow: 0 6px 18px rgb(109 119 255 / 35%); }
.guide-steps h2 { margin: 6px 0 8px; font-size: 1.25rem; }
.guide-steps ul, .guide-steps ol { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.guide-steps p:last-child { margin-bottom: 0; }
.faq { display: grid; gap: 10px; margin: 0 0 40px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq summary { cursor: pointer; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--muted); }

/* --- The server list ------------------------------------------------------------------------- */
.servers { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.servers a { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease; box-shadow: var(--shadow); }
.servers a:hover { border-color: var(--brand-line); transform: translateY(-2px); }
.servers .name { font-weight: 700; overflow-wrap: anywhere; }

.icon { width: 48px; height: 48px; border-radius: 14px; flex: none; background: var(--brand-soft); border: 1px solid var(--brand-line); display: grid; place-items: center; font-weight: 800; color: var(--brand); overflow: hidden; }
.icon img { width: 100%; height: 100%; object-fit: cover; }
.icon.large { width: 68px; height: 68px; border-radius: 20px; font-size: 1.35rem; }
.icon.small { width: 30px; height: 30px; border-radius: 9px; font-size: 0.75rem; }

/* --- The dashboard --------------------------------------------------------------------------- */
.dash { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 28px; align-items: start; }
.side { position: sticky; top: 80px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; max-height: calc(100vh - 100px); overflow: auto; box-shadow: var(--shadow); scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.switcher { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 6px; }
.switcher summary { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; list-style: none; font-weight: 750; }
.switcher summary::-webkit-details-marker { display: none; }
.switcher summary:hover { background: var(--panel-2); }
.switcher-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { color: var(--muted); transition: transform 0.15s ease; }
.switcher[open] .chevron { transform: rotate(180deg); }
.switcher ul { list-style: none; padding: 4px 0 0; margin: 0; }
.switcher li a { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 0.94rem; }
.switcher li a:hover { background: var(--panel-2); }
.side nav ul { list-style: none; padding: 0; margin: 0; }
.side-group { margin: 14px 10px 4px; font-size: 0.72rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; color: var(--faint); }
.side-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; color: var(--text); text-decoration: none; font-size: 0.94rem; font-weight: 520; }
.side-link:hover { background: var(--panel-2); text-decoration: none; }
.side-link.current { background: var(--brand-soft); color: var(--text); font-weight: 680; }
.side-link.current::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.side-label { flex: 1; min-width: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--off); opacity: 0.55; }
.dot.on { background: var(--success); opacity: 1; box-shadow: 0 0 0 3px var(--success-soft); }
.dot.always { background: var(--brand); opacity: 1; box-shadow: 0 0 0 3px var(--brand-soft); }
.side-help { margin: 12px 4px 4px; padding: 12px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 0.86rem; color: var(--muted); }
.side-help a { font-weight: 650; }
.to-menu { display: none; }
.path { color: var(--muted); font-size: 0.9rem; margin: 0 0 10px; }
.path a { color: var(--muted); text-decoration: none; }
.path a:hover { color: var(--text); }

.head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.head h1 { margin: 0; overflow-wrap: anywhere; font-size: 1.85rem; }
.module-head { justify-content: space-between; flex-wrap: wrap; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.module-head form { margin: 0; }
.module-head .muted { margin-top: 6px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 0 0 8px; }
.stat { padding: 18px 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.stat strong { display: block; font-size: 1.7rem; letter-spacing: -0.03em; line-height: 1.15; }
.stat span { color: var(--muted); font-size: 0.9rem; }
.stat.good strong { color: var(--success); }
.stat.warn strong { color: var(--warning); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; }
.notice.start { margin: 16px 0 0; }

.problems { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.problems li { background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); padding: 12px 16px; border-radius: 12px; }
.problems .more { display: block; color: var(--muted); font-size: 0.88rem; }
.fix { color: var(--warning); font-weight: 650; }
.fix-link { margin-left: 6px; font-weight: 700; }

.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; box-shadow: var(--shadow); }
.card:hover { border-color: var(--brand-line); transform: translateY(-2px); text-decoration: none; }
.card.needs-fix { border-color: color-mix(in srgb, var(--warning) 50%, var(--line)); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.card-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); border: 1px solid var(--brand-line); font-size: 1.3rem; }
.card-title { font-weight: 750; font-size: 1.02rem; }
.card-text { color: var(--muted); font-size: 0.9rem; flex: 1; }
.card-detail { font-size: 0.9rem; color: var(--text); }
.card-foot { display: flex; justify-content: space-between; gap: 8px; font-size: 0.88rem; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.card-go { color: var(--brand); margin-left: auto; font-weight: 650; }

.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; font-size: 0.9rem; }
.jump a { color: var(--muted); padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); text-decoration: none; font-weight: 600; }
.jump a:hover { color: var(--text); border-color: var(--brand-line); }

/* Module pages */
.section { margin-top: 18px; scroll-margin-top: 90px; }
.section > h2 { margin: 0 0 4px; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.section > h2 + .muted { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.section form.action { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.field { display: grid; gap: 7px; margin: 0 0 18px; border: 0; padding: 0; min-width: 0; }
.field label, .field legend { font-weight: 650; padding: 0; font-size: 0.95rem; }
.field input[type="text"], .field select, .field textarea, .option-rows input[type="text"], .option-rows select {
  width: 100%;
  max-width: 600px;
  font: inherit;
  font-size: 0.96rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 12px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input[type="text"]:hover, .field select:hover, .field textarea:hover { border-color: var(--brand-line); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible, .option-rows input:focus-visible, .option-rows select:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.field textarea { resize: vertical; line-height: 1.5; }
.field [aria-invalid="true"] { border-color: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 24px; align-items: start; padding: 14px 0 0; border-top: 1px solid var(--line); }
.field-row .field { margin: 0 0 14px; }
form > input[type="hidden"]:first-child + .field-row { border-top: 0; padding-top: 0; }
.with-unit { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.with-unit input { max-width: 170px; }
.checks { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); max-height: 260px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-2); max-width: 760px; }
.checks label { font-weight: 450; display: flex; gap: 8px; align-items: center; overflow-wrap: anywhere; font-size: 0.94rem; }
input[type="checkbox"] { accent-color: var(--brand); width: 16px; height: 16px; }

/* On/off settings as switches. */
.field.toggle label { font-weight: 600; display: flex; gap: 12px; align-items: center; cursor: pointer; }
.field.toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 99px;
  background: var(--line-strong);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease;
}
.field.toggle input[type="checkbox"]::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); transition: transform 0.15s ease; }
.field.toggle input[type="checkbox"]:checked { background: var(--grad); }
.field.toggle input[type="checkbox"]:checked::before { transform: translateX(18px); }
.field.toggle input[type="checkbox"]:focus-visible { box-shadow: 0 0 0 4px var(--brand-soft); outline: none; }

.help { color: var(--muted); font-size: 0.88rem; }
.error { color: var(--warning); font-weight: 650; font-size: 0.9rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; margin: 0; }
.facts dt { font-weight: 650; color: var(--muted); }
.facts dd { margin: 0; }

/* Lists: menus, stickies, departments, panels, giveaways */
.count { font-size: 0.8rem; font-weight: 650; color: var(--muted); margin-left: 4px; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); }
.items { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.items li { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.item-text { display: grid; gap: 2px; min-width: 0; }
.item-title { font-weight: 700; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.item-title:hover { color: var(--brand); }
.item-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item-actions .button, .item-actions button { padding: 6px 12px; font-size: 0.9rem; }
.add-form { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 8px; }
.confirm { max-width: 600px; }
.confirm h1 { font-size: 1.4rem; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.option-rows { border-collapse: separate; border-spacing: 0 6px; min-width: 640px; }
.option-rows th { text-align: left; font-size: 0.82rem; color: var(--muted); font-weight: 650; padding: 4px 6px; }
.option-rows td { padding: 0 6px; vertical-align: middle; }
.option-rows input[type="text"], .option-rows select { padding: 7px 10px; }
.option-rows .emoji-input { width: 90px; }
.option-rows tr.new-row td { opacity: 0.85; }
.item-body .suggestion-text { white-space: pre-wrap; overflow-wrap: anywhere; }

/* --- The Privacy Policy and the Terms -------------------------------------------------------- */
.legal { max-width: 780px; margin: 0 auto; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); letter-spacing: -0.035em; }
.legal h2 { margin-top: 36px; font-size: 1.3rem; }
.legal .short { margin: 20px 0 8px; }
.legal .short h2 { margin-top: 0; }
.legal li { margin-bottom: 8px; }
.legal-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.94rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal-table thead th { color: var(--faint); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.legal-table tbody th { white-space: nowrap; }

/* --- Module insights: tables and feeds (open tickets, ratings) ----------------------------------- */
.panel.flush { padding: 0; overflow: hidden; }
.data-table { border-collapse: collapse; width: 100%; min-width: 760px; font-size: 0.93rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.data-table thead th { color: var(--faint); font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.06em; background: var(--bg-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--brand-soft); }
.data-table tr.late { box-shadow: inset 3px 0 0 var(--warning); }
.data-table td.wrap { max-width: 260px; overflow-wrap: anywhere; }
.data-table .sub, .feed .sub { display: block; color: var(--faint); font-size: 0.82rem; margin-top: 2px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 0.82rem; font-weight: 600; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.prio-urgent { background: color-mix(in srgb, #ed4245 18%, transparent); border-color: color-mix(in srgb, #ed4245 45%, transparent); }
.chip.prio-high { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 40%, transparent); }
.warn { color: var(--warning); }
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.feed { list-style: none; margin: 0; padding: 6px 18px; }
ol.feed { list-style: decimal inside; }
.feed li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.feed li:last-child { border-bottom: 0; }
.stars { color: #f5c542; letter-spacing: 1px; }
@media (max-width: 860px) { .split-2 { grid-template-columns: 1fr; } }

/* --- Smaller screens ------------------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero, .feature, .band { grid-template-columns: 1fr; }
  .feature.reverse .feature-text { order: 0; }
  .hero { gap: 32px; padding-bottom: 48px; }
  .steps { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-in { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .dash { display: flex; flex-direction: column; gap: 16px; }
  .dash-main { order: 1; }
  .side { order: 2; position: static; max-height: none; }
  .to-menu { display: inline-block; margin-bottom: 12px; font-size: 0.9rem; }
  .side nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
  .side-group { margin: 10px 4px 4px; }
  .side-link { border: 1px solid var(--line); padding: 5px 11px; font-size: 0.9rem; }
  .side-link.current::before { display: none; }
  .side-label { flex: none; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .top-in { flex-wrap: wrap; gap: 10px 16px; padding: 10px 16px; }
  .links { order: 3; width: 100%; overflow-x: auto; margin: 0 -6px; }
  .me span { display: none; }
  main { padding: 24px 16px 48px; }
  h1 { font-size: 1.6rem; }
  .head h1 { font-size: 1.5rem; }
  .guide-steps > li { grid-template-columns: 1fr; }
  .foot-in { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .tiles { grid-template-columns: 1fr; }
  .panel, .module-head { padding: 18px; }
  .hero-picture::before { inset: -30px 0; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 12px 14px; }
  .stat strong { font-size: 1.3rem; }
  .stat span { font-size: 0.82rem; }
}

/* Phones: the avatar goes, so the logo and the account buttons share one row. */
@media (max-width: 400px) {
  .me { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
