/* Sentinel dashboard — "night watch": midnight blue, one amber lamp. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/BricolageGrotesque-var.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0b1020;
  --bg-2: #0f1630;
  --surface: #131b34;
  --surface-2: #19234a;
  --line: #263256;
  --line-soft: #1d2745;
  --text: #e8ecf7;
  --muted: #9aa6c7;
  --amber: #f5b544;
  --amber-hi: #ffc965;
  --amber-ink: #1b1204;
  --ok: #5ad6a0;
  --danger: #ff7a7a;
  --warn: #f5b544;
  --info: #7aa7ff;
  --radius: 12px;
  --radius-sm: 8px;
  --font-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: var(--amber-hi); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.01em; font-weight: 700; }
h1 { font-size: clamp(2.2rem, 5vw + 0.5rem, 3.9rem); letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.4vw + 0.6rem, 2.3rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 0.08em 0.4em;
  color: var(--amber-hi);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sr-default { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--amber); color: var(--amber-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ------------------------------------------------------------ logo & brand */
.logo__shield { fill: var(--surface); stroke: var(--amber); stroke-width: 2; stroke-linejoin: round; }
.logo__lamp { fill: var(--amber); }
.logo__stem { stroke: var(--amber); stroke-width: 2; stroke-linecap: round; fill: none; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.brand--small { font-size: 1.05rem; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .1s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-primary:hover { background: var(--amber-hi); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--amber); background: rgba(245, 181, 68, .08); }
.btn-quiet { color: var(--muted); background: transparent; }
.btn-quiet:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 12px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 0.85rem; }

/* ---------------------------------------------------------------- landing */
.l-nav { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 32, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.l-nav__in { display: flex; align-items: center; gap: 28px; min-height: 68px; }
.l-nav__links { display: flex; gap: 22px; margin-right: auto; }
.l-nav__links a { color: var(--muted); text-decoration: none; font-size: 0.95rem; padding: 6px 2px; }
.l-nav__links a:hover { color: var(--text); }
.l-nav__actions { display: flex; align-items: center; gap: 8px; }

.l-hero { padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.l-hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(245, 181, 68, .16), transparent 70%);
  pointer-events: none;
}
.l-hero__in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.l-hero__copy h1 { max-width: 14ch; }
.lead { font-size: clamp(1.05rem, 0.4vw + 1rem, 1.2rem); color: #c7cfe6; max-width: 52ch; margin-top: 22px; }
.l-hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { color: var(--muted); font-size: 0.9rem; margin-top: 20px; }

/* The ledger: the single memorable element of the landing page. */
.ledger { margin: 0; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 8px; box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .7); }
.ledger figcaption { color: var(--muted); font-size: 0.85rem; padding: 2px 6px 14px; }
.ledger__list { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: start; padding: 14px 8px; border-top: 1px solid var(--line-soft); border-left: 3px solid var(--tone, var(--line)); margin-left: -3px; padding-left: 12px; }
.entry--auto { --tone: var(--info); }
.entry--warn { --tone: var(--warn); }
.entry--alert { --tone: var(--danger); }
.entry--ban { --tone: #c58bff; }
.entry__no { font-family: var(--mono); font-size: 0.85rem; color: var(--muted); padding-top: 2px; }
.entry__title { font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.entry__meta { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.entry__time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 3px; }
@media (prefers-reduced-motion: no-preference) {
  .entry { animation: ledger-in .5s cubic-bezier(.2, .7, .2, 1) both; }
  .entry:nth-child(1) { animation-delay: .15s; }
  .entry:nth-child(2) { animation-delay: .45s; }
  .entry:nth-child(3) { animation-delay: .75s; }
  .entry:nth-child(4) { animation-delay: 1.05s; }
  @keyframes ledger-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

.manual { padding: clamp(56px, 8vw, 100px) 0; background: var(--bg-2); border-block: 1px solid var(--line-soft); }
.manual__in { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 6vw, 80px); align-items: start; }
.manual__lead { position: sticky; top: 100px; }
.manual__lead p { color: var(--muted); margin-top: 16px; max-width: 40ch; }
.manual__rows { margin: 0; }
.mrow { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 22px 0; border-top: 1px solid var(--line); }
.mrow:first-child { border-top: 0; padding-top: 0; }
.mrow dt { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: var(--amber-hi); }
.mrow dd { margin: 0; color: #c7cfe6; }
.mrow__cmds { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

.steps { padding: clamp(56px, 8vw, 100px) 0; }
.steps h2 { max-width: 20ch; }
.steps__list { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.step p { color: var(--muted); flex: 1; }
.step__no { font-family: var(--font-head); font-weight: 800; font-size: 2.4rem; line-height: 1; color: var(--amber); }

.cmds { padding: 0 0 clamp(56px, 8vw, 100px); }
.cmds__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.cmds__grid > div { border-top: 2px solid var(--line); padding-top: 16px; }
.cmds__grid ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; color: var(--muted); font-size: 0.95rem; }

.cta-band { padding: clamp(48px, 7vw, 80px) 0; background: linear-gradient(180deg, var(--bg-2), var(--surface-2)); border-top: 1px solid var(--line); text-align: center; }
.cta-band__in { display: grid; justify-items: center; gap: 26px; }
.cta-band h2 { max-width: 20ch; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.l-foot { border-top: 1px solid var(--line-soft); padding: 26px 0; color: var(--muted); font-size: 0.88rem; }
.l-foot__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* -------------------------------------------------------------------- app */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 32, .9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.bar__in { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.bar__crumb { color: var(--muted); font-size: 0.95rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar__crumb a { color: var(--muted); text-decoration: none; }
.bar__crumb a:hover { color: var(--text); }
.bar__crumb span:last-child { color: var(--text); }
.bar__user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bar__name { font-size: 0.92rem; color: var(--muted); max-width: 16ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); }

.page { padding: clamp(28px, 5vw, 56px) 0 80px; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.page__head h1 { font-size: clamp(1.9rem, 3vw + 0.6rem, 2.7rem); }
.page__sub { color: var(--muted); margin-top: 8px; max-width: 60ch; }
.page__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.notice { border: 1px solid var(--line); border-left-width: 4px; background: var(--surface); border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 24px; }
.notice--warn { border-left-color: var(--warn); }

.servers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.server { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; transition: border-color .15s, background-color .15s, transform .15s; }
a.server:hover { border-color: var(--amber); background: var(--surface-2); transform: translateY(-2px); }
.server__name { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.server__go { color: var(--amber-hi); font-size: 0.85rem; font-weight: 600; }
.servers--quiet .server { background: transparent; border-style: dashed; }
.server--static { flex-wrap: wrap; }
.gicon { width: 48px; height: 48px; border-radius: 14px; flex: none; background: var(--surface-2); object-fit: cover; }
.gicon--lg { width: 64px; height: 64px; border-radius: 18px; }
.gicon--fallback { display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; color: var(--amber-hi); border: 1px solid var(--line); font-size: 1.05rem; }
.gicon--lg.gicon--fallback { font-size: 1.4rem; }
.more { margin-top: 48px; }
.more h2 { font-size: 1.4rem; }
.more .servers { margin-top: 18px; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: clamp(28px, 5vw, 56px); text-align: center; display: grid; gap: 14px; justify-items: center; }
.empty h2 { font-size: 1.5rem; max-width: 24ch; }
.empty p { color: var(--muted); max-width: 46ch; }

/* ----------------------------------------------------------- guild settings */
.guild { padding: 32px 0 140px; }
.guild__head { display: flex; align-items: center; gap: 18px; margin-bottom: 28px; }
.guild__head h1 { font-size: clamp(1.7rem, 2.4vw + 0.6rem, 2.4rem); overflow-wrap: anywhere; }
.settings__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.toc { position: sticky; top: 88px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 7px 14px; color: var(--muted); text-decoration: none; font-size: 0.93rem; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--text); border-left-color: var(--amber); }
.settings__body { display: grid; gap: 20px; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px clamp(16px, 3vw, 28px) 8px; }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; }
.card__head h2 { font-size: 1.35rem; }
.card__head p { color: var(--muted); font-size: 0.93rem; margin-top: 6px; max-width: 60ch; }

.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 8px 28px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line-soft); }
.row--wide { grid-template-columns: 1fr; }
.row__label { font-weight: 600; display: block; }
.row__help { color: var(--muted); font-size: 0.88rem; margin-top: 2px; max-width: 62ch; }
.row__control { min-width: 0; }
.row--wide .row__control { max-width: 100%; }

.input {
  width: 100%; min-height: 44px; padding: 10px 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px;
  font: inherit; font-size: 0.95rem;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #3a4a7a; }
.input:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245, 181, 68, .25); }
textarea.input { resize: vertical; line-height: 1.5; min-height: 84px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.unit { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; }
.input--num { width: 110px; }

.switch { position: relative; display: inline-block; width: 52px; height: 30px; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background-color .2s; }
.switch__track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--amber); }
.switch input:checked + .switch__track::after { transform: translateX(22px); background: var(--amber-ink); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--amber-hi); outline-offset: 3px; }
.row:has(.switch) .row__control { justify-self: end; }

.rangebox { display: flex; align-items: center; gap: 14px; }
.rangebox input[type=range] { flex: 1; accent-color: var(--amber); height: 28px; }
.rangebox output { font-family: var(--mono); min-width: 3.5ch; text-align: right; color: var(--amber-hi); }

.tokens { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.token { font: 0.82rem var(--mono); color: var(--amber-hi); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; cursor: pointer; }
.token:hover { border-color: var(--amber); }

.multi__filter { margin-bottom: 10px; max-width: 320px; }
.multi__list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 220px; overflow: auto; padding: 2px; }
.chip { position: relative; }
.chip[hidden] { display: none; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-block; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.88rem; color: var(--muted); background: var(--bg); transition: all .12s; }
.chip:hover span { border-color: #3a4a7a; color: var(--text); }
.chip input:checked + span { background: rgba(245, 181, 68, .14); border-color: var(--amber); color: var(--amber-hi); }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.chip--missing span { border-style: dashed; }
.multi__empty { color: var(--muted); font-size: 0.9rem; }

.savebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(15, 22, 48, .94); backdrop-filter: blur(10px); border-top: 1px solid var(--line); }
.savebar.is-dirty { border-top-color: var(--amber); box-shadow: 0 -10px 40px rgba(245, 181, 68, .08); }
.savebar__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.savebar__msg { color: var(--muted); font-size: 0.93rem; }
.savebar.is-dirty .savebar__msg { color: var(--amber-hi); }
.savebar__actions { display: flex; gap: 8px; }

.toasts { position: fixed; z-index: 50; top: 76px; right: 20px; display: grid; gap: 10px; width: min(380px, calc(100% - 40px)); }
.toast { background: var(--surface-2); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); transition: opacity .4s, transform .4s; }
.toast--error { border-left-color: var(--danger); }
.toast--out { opacity: 0; transform: translateY(-6px); pointer-events: none; }

.fail { padding: 80px 0; display: grid; gap: 18px; justify-items: start; max-width: 560px; }
.fail h1 { font-size: clamp(1.8rem, 3vw + 0.5rem, 2.6rem); margin-top: 20px; }
.fail p { color: var(--muted); }
.fail p:last-child { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 920px) {
  .l-hero__in, .manual__in { grid-template-columns: 1fr; }
  .manual__lead { position: static; }
  .steps__list, .cmds__grid { grid-template-columns: 1fr; }
  .settings__layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc ul { display: flex; overflow-x: auto; border: 0; gap: 8px; padding-bottom: 4px; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; white-space: nowrap; margin: 0; }
}
@media (max-width: 680px) {
  .l-nav__links { display: none; }
  .l-nav__in { justify-content: space-between; }
  .l-nav__actions .btn-quiet { display: none; }
  .mrow { grid-template-columns: 1fr; gap: 6px; }
  .row { grid-template-columns: 1fr; }
  .row:has(.switch) { grid-template-columns: 1fr auto; }
  .bar__name, .bar__crumb { display: none; }
  .savebar__in { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 0; min-height: 0; }
  .savebar__actions { justify-content: space-between; }
  .savebar__actions .btn { flex: 1; }
  .toasts { top: auto; bottom: 120px; right: 50%; transform: translateX(50%); }
  .card__head { flex-direction: column; }
  .page__tools { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.servers--quiet { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.servers--quiet .server__name { flex: 1 1 140px; }
@media (max-width: 420px) { .servers--quiet { grid-template-columns: 1fr; } }

@media (max-width: 920px) {
  .settings__layout { grid-template-columns: minmax(0, 1fr); }
  .toc { min-width: 0; max-width: 100%; }
}
@media (max-width: 680px) {
  .row { grid-template-columns: minmax(0, 1fr); }
  .row:has(.switch) { grid-template-columns: minmax(0, 1fr) auto; }
  .card__head > div { min-width: 0; }
}

/* ------------------------------------------------------- global statistics */
:root { --series-1: #3987e5; --series-2: #d95926; }
.bar__nav { display: flex; gap: 4px; margin-left: 8px; }
.bar__nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: 0.93rem; }
.bar__nav a:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.bar__nav a[aria-current="page"] { color: var(--text); background: var(--surface-2); }

.range { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.range__opt { padding: 8px 14px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.range__opt:hover { color: var(--text); }
.range__opt[aria-current="page"] { background: var(--surface-2); color: var(--text); font-weight: 600; }

.botline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; color: var(--muted); font-size: 0.9rem; margin: -8px 0 22px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; font-weight: 600; font-size: 0.85rem; border: 1px solid var(--line); }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill--ok { color: var(--ok); }
.pill--bad { color: var(--danger); }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.tile__label { color: var(--muted); font-size: 0.88rem; }
.tile__value { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.7rem, 2vw + 1rem, 2.3rem); line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; }
.tile__note { color: var(--muted); font-size: 0.82rem; margin-top: 6px; }
.fine { color: var(--muted); font-size: 0.85rem; margin-top: 14px; }

.charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.chartcard { padding-bottom: 20px; min-width: 0; }
.chartcard--wide { grid-column: 1 / -1; }
.chartcard h2 { font-size: 1.15rem; }
.chartcard__sub { color: var(--muted); font-size: 0.88rem; margin: 4px 0 14px; }
.empty-note { color: var(--muted); font-size: 0.92rem; padding: 12px 0; }
.tablecard { margin-top: 16px; padding-bottom: 20px; }
.tablecard h2 { font-size: 1.15rem; }

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line-soft); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .bar.s1 { fill: var(--series-1); }
.chart .bar.s2 { fill: var(--series-2); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.s1 { stroke: var(--series-1); }
.chart .line.s2 { stroke: var(--series-2); }
.chart .area { opacity: .1; }
.chart .f1 { fill: var(--series-1); }
.chart .f2 { fill: var(--series-2); }
.chart .dot { stroke: var(--surface); stroke-width: 2; }
.chart .xhair { stroke: var(--muted); stroke-width: 1; visibility: hidden; }
.chart.is-hover .xhair { visibility: visible; }
.chart .hit { fill: transparent; outline: none; cursor: crosshair; }
.chart .hit:hover, .chart .hit:focus-visible { fill: rgba(255, 255, 255, .06); }
.chart .hit:focus-visible { stroke: var(--amber); stroke-width: 2; }

.legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; gap: 18px; color: var(--muted); font-size: 0.88rem; }
.key { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: middle; }
.s1k { background: var(--series-1); }
.s2k { background: var(--series-2); }

.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank__row { display: grid; grid-template-columns: minmax(90px, 160px) minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.rank__label { color: var(--text); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__bar { width: 100%; max-width: 300px; height: auto; display: block; }
.rank__bar .s1f { fill: var(--series-1); }
.rank__bar .s2f { fill: var(--series-2); }
.rank__val { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 3ch; text-align: right; }

.tview { margin-top: 12px; }
.tview summary { color: var(--muted); font-size: 0.85rem; cursor: pointer; width: fit-content; }
.tview summary:hover { color: var(--text); }
.tview__scroll { overflow-x: auto; max-height: 340px; overflow-y: auto; margin-top: 10px; }
.tview table, .gtable { width: 100%; border-collapse: collapse; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.tview th, .tview td, .gtable th, .gtable td { text-align: left; padding: 8px 12px; border-top: 1px solid var(--line-soft); font-weight: 400; }
.tview thead th, .gtable thead th { color: var(--muted); font-size: 0.82rem; font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.gtable tbody th { font-weight: 600; }
.gtable .num, .tview td { text-align: right; }
.tview thead th:not(:first-child) { text-align: right; }

.tooltip { position: fixed; z-index: 60; pointer-events: none; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); min-width: 120px; }
.tooltip[hidden] { display: none; }
.tooltip__t { color: var(--muted); font-size: 0.8rem; margin-bottom: 6px; }
.tooltip__row { display: flex; align-items: center; gap: 0; font-size: 0.9rem; }
.tooltip__row strong { font-size: 1rem; margin-right: 8px; font-variant-numeric: tabular-nums; }
.tooltip__n { color: var(--muted); }

@media (max-width: 920px) {
  .charts { grid-template-columns: minmax(0, 1fr); }
  .bar__nav { margin-left: 0; }
}
@media (max-width: 680px) {
  .bar__in { flex-wrap: wrap; padding: 8px 0; }
  .bar__nav { order: 3; width: 100%; }
  .rank__row { grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) auto; }
}
@media (max-width: 680px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile { padding: 14px; }
}

/* ------------------------------------------------------------ command docs */
.cmds__more { margin-top: 8px; }
.docs { padding: clamp(32px, 6vw, 72px) 0 80px; }
.docs__head h1 { font-size: clamp(2rem, 3vw + 1rem, 3.2rem); }
.docs__head .lead { margin-top: 14px; }
.docs__layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; margin-top: 40px; align-items: start; }
.docs__body { display: grid; gap: 44px; min-width: 0; max-width: 820px; }
.doc h2 { font-size: 1.6rem; }
.doc__intro { color: var(--muted); margin-top: 6px; }
.cmdlist { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.cmd { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.cmd__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cmd__usage { font-size: 0.95rem; white-space: normal; }
.cmd p { color: #c7cfe6; }
.cmd__ex { color: var(--muted) !important; font-size: 0.88rem; margin-top: 6px; }
.who { font-size: 0.8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.who--staff { color: var(--info); border-color: rgba(122, 167, 255, .4); }
.who--admin { color: var(--amber-hi); border-color: rgba(245, 181, 68, .45); }
.who--all { color: var(--ok); border-color: rgba(90, 214, 160, .4); }
.plain { margin: 14px 0 0; padding-left: 20px; display: grid; gap: 10px; color: #c7cfe6; }
@media (max-width: 920px) { .docs__layout { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* language switch in the site header */
.l-nav__lang { color: var(--muted); font-size: 0.9rem; text-decoration: none; padding: 6px 4px; }
.l-nav__lang:hover { color: var(--text); text-decoration: underline; }
