/* Copyright 2026 Beacon Contributors. SPDX-License-Identifier: AGPL-3.0-or-later */

/* Fonts are self-hosted latin subsets under the SIL OFL 1.1, see fonts/*-OFL.txt. */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Chakra Petch"; font-weight: 500; font-display: swap; src: url(fonts/chakra-petch-latin-500-normal.woff2) format("woff2"); }

:root {
  color-scheme: light dark;
  --fg: #1b1f24; --muted: #5d6670; --bg: #fafaf8; --field: #fff; --code: #f0f0ec; --line: #d6d9dc;
  --accent: #0b6e4f; --on-accent: #fff; --warn: #b07400; --err: #a1261c;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --fg: #e8eaed; --muted: #98a1ab; --bg: #121417; --field: #1a1d21; --code: #1c2024; --line: #333a41;
    --accent: #4cc38a; --on-accent: #0b1a13; --warn: #e0b050; --err: #f08a80; }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0 auto; max-width: 36.5rem; padding: 0 1.25rem; font: 1.0625rem/1.6 var(--sans); color: var(--fg);
  background: var(--bg); -webkit-font-smoothing: antialiased; }

header { padding: 1.75rem 0 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--fg); text-decoration: none; }
.mark { color: var(--accent); flex: none; }
.wordmark { font: 500 1.0625rem/1 "Chakra Petch", var(--sans); letter-spacing: .18em; }
.product { font-weight: 600; color: var(--muted); }

main { padding: 3.5rem 0 4.5rem; }
h1 { font-size: clamp(2rem, 7vw, 2.625rem); font-weight: 700; line-height: 1.1; letter-spacing: -.025em;
  margin: 0 0 1.25rem; text-wrap: balance; }
h2 { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; margin: 2.75rem 0 .5rem; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.1875rem; line-height: 1.55; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: .35rem 0; padding-left: .2rem; }
li::marker { color: var(--accent); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
.hint { color: var(--muted); font-size: .9375rem; line-height: 1.5; }

form { margin-top: 2.25rem; }
.field { margin-bottom: 1.75rem; }
label { display: block; font-weight: 600; margin-bottom: .45rem; }
.optional { font-weight: 400; color: var(--muted); }
input:not([type=checkbox]) { display: block; width: 100%; font: inherit; padding: .7rem .85rem; border: 1px solid var(--line);
  border-radius: 8px; background: var(--field); color: var(--fg); }
input::placeholder { color: var(--muted); opacity: .7; }
input:focus { border-color: var(--accent); outline: 3px solid color-mix(in srgb, var(--accent) 25%, transparent); outline-offset: 0; }
.field .hint { margin: .45rem 0 0; }
.check { display: flex; gap: .65rem; align-items: baseline; font-weight: 400; margin: 2rem 0 0; }
.check input { accent-color: var(--accent); width: 1.05rem; height: 1.05rem; flex: none; position: relative; top: .15rem; }

button, .button { display: inline-block; margin-top: 2rem; font: inherit; font-weight: 600; padding: .75rem 1.35rem;
  border: 0; border-radius: 8px; background: var(--accent); color: var(--on-accent); text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: color-mix(in srgb, var(--accent) 86%, var(--fg)); }
button:focus-visible, .button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
main > p:has(> .button) { margin-top: 2.5rem; }
main > p > .button { margin-top: 0; }

code, pre { font-family: var(--mono); }
code { font-size: .875em; background: var(--code); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.code { margin: 1.75rem 0; }
.code-head { display: flex; justify-content: space-between; align-items: center; min-height: 2rem; margin-bottom: .35rem;
  font: .8125rem/1 var(--mono); color: var(--muted); }
pre { margin: 0; padding: 1rem 1.1rem; background: var(--code); border-radius: 8px; font-size: .875rem; line-height: 1.65;
  white-space: pre-wrap; overflow-wrap: anywhere; user-select: all; }
button.copy { margin: 0; padding: .35rem .7rem; font: 500 .8125rem/1 var(--sans); background: none; color: var(--fg);
  border: 1px solid var(--line); border-radius: 6px; }
button.copy:hover { background: var(--code); }

.warning, .error { border-left: 3px solid; padding: .1rem 0 .1rem .9rem; margin: 1.5rem 0; font-weight: 600; }
.warning { border-color: var(--warn); }
.error { border-color: var(--err); color: var(--err); }
.support { margin-top: 3.5rem; padding: 1.5rem 1.5rem 1.6rem; background: var(--code); border-radius: 12px; }
.support h2 { margin-top: 0; }
.kofi { display: inline-flex; align-items: center; gap: .6rem; margin-top: .25rem; padding: .65rem 1.15rem .65rem .9rem;
  font-weight: 600; color: #1b1f24; background: #fff; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.kofi:hover { border-color: #ff5e5b; }
.kofi:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.kofi img { display: block; }
.server { margin-top: 2rem; padding: 1.5rem 1.5rem 1.25rem; background: var(--field); border: 1px solid var(--line);
  border-radius: 14px; }
.server-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.server h2 { margin: 0; font-size: 1.375rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.pill { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 600; background: var(--code); }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.pill-active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.pill-suspended { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.server-id { display: flex; flex-wrap: wrap; gap: .35rem .75rem; align-items: baseline; margin: .6rem 0 0;
  color: var(--muted); font-size: .9375rem; }
.server-id span { overflow-wrap: anywhere; }

.today { margin: 1.5rem 0 0; }
.today-figure { margin: 0 0 .6rem; color: var(--muted); }
.today-figure strong { font-size: 2.5rem; font-weight: 700; line-height: 1; letter-spacing: -.03em; color: var(--fg);
  margin-right: .3rem; font-variant-numeric: tabular-nums; }
.today-figure span { float: right; margin-top: 1.1rem; font-variant-numeric: tabular-nums; }
.today progress { display: block; width: 100%; height: .625rem; border: 0; border-radius: 999px; overflow: hidden;
  background: color-mix(in srgb, var(--line) 70%, transparent); -webkit-appearance: none; appearance: none; }
.today progress::-webkit-progress-bar { background: color-mix(in srgb, var(--line) 70%, transparent); border-radius: 999px; }
.today progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.today progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.today.near progress::-webkit-progress-value { background: var(--warn); }
.today.near progress::-moz-progress-bar { background: var(--warn); }
.today .hint { margin: .6rem 0 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 1.5rem 0 0; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.stats div { background: var(--field); padding: .8rem .9rem; display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.stats dt { color: var(--muted); font-size: .8125rem; line-height: 1.3; }
.stats dd { margin: 0 0 .15rem; font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 34rem) { .stats { grid-template-columns: repeat(2, 1fr); } }

.server form.action { margin-top: 1.5rem; }
.server form.action button { margin-top: 0; }
.server form .hint { margin: .5rem 0 0; }
.remove { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.remove summary { cursor: pointer; width: fit-content; color: var(--err); font-weight: 600; font-size: .9375rem; }
.remove summary:focus-visible { outline: 2px solid var(--err); outline-offset: 3px; border-radius: 4px; }
.remove form { margin-top: 0; }
.remove .check { margin-top: 1rem; font-size: .9375rem; }
.remove button { margin-top: 1rem; }
button.danger { background: var(--err); color: var(--bg); }
button.danger:hover { background: color-mix(in srgb, var(--err) 86%, var(--fg)); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: .875rem; }
footer a { color: inherit; text-decoration: none; }
footer a:hover { color: var(--fg); text-decoration: underline; }
