/* lanjaeger public — varmox-ui tokens (assets/tokens.css) + page components. 4 px grid. */
:root {
  --accent: #0072a3; --accent-ink: #ffffff;
  --text: #1b2a32; --text-2: #4a5a63; --muted: #5f6e76;
  --surface: #ffffff; --surface-2: #f4f6f7; --bg: #f4f6f7;
  --hairline: rgba(27, 42, 50, 0.1); --hairline-2: rgba(27, 42, 50, 0.24);
  --ok: #2e7d32; --warn: #b26a00; --bad: #c62828; --neutral: #8a979e;
  --radius: 12px; --radius-ctl: 8px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #4aaed9; --accent-ink: #0b1418; --text: #e3e9ec; --text-2: #b8c4ca; --muted: #93a3ab;
    --surface: #1b2a32; --surface-2: #22333c; --bg: #17242b;
    --hairline: rgba(227, 233, 236, 0.1); --hairline-2: rgba(227, 233, 236, 0.28);
    --ok: #6cc070; --warn: #e8b04a; --bad: #ff7b72; --neutral: #7d8c93;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --accent: #4aaed9; --accent-ink: #0b1418; --text: #e3e9ec; --text-2: #b8c4ca; --muted: #93a3ab;
  --surface: #1b2a32; --surface-2: #22333c; --bg: #17242b;
  --hairline: rgba(227, 233, 236, 0.1); --hairline-2: rgba(227, 233, 236, 0.28);
  --ok: #6cc070; --warn: #e8b04a; --bad: #ff7b72; --neutral: #7d8c93;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--font);
  min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto;
  padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); }
main.wrap { padding-block: 32px 48px; flex: 1; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
h1 { font-size: 24px; line-height: 32px; }
h2 { font-size: 16px; line-height: 24px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-family: var(--mono); font-size: 12px; font-variant-numeric: tabular-nums; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* header / footer */
.top { background: var(--surface); border-bottom: 1px solid var(--hairline); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; flex-wrap: wrap; padding-block: 8px; }
.brand { color: var(--text); font-weight: 600; font-size: 15px; }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 20px; flex-wrap: wrap; }
nav a { color: var(--text-2); }
nav a[aria-current="page"] { color: var(--text); font-weight: 500; }
.foot { border-top: 1px solid var(--hairline); }
.foot .wrap { padding-block: 24px 32px; display: grid; gap: 4px; }

/* page grid */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-desc { color: var(--muted); max-width: 72ch; margin-top: 4px; margin-bottom: 24px; }
.sec { margin-top: 40px; display: grid; gap: 12px; }
.notice { margin-bottom: 24px; }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 20px; }
.card > * + * { margin-top: 12px; }
.stack { display: grid; gap: 16px; }
.stack.card > * + * { margin-top: 0; }

/* status (dot + word) */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--neutral); flex: none; }
.tone-ok .dot { background: var(--ok); }
.tone-warn .dot { background: var(--warn); }
.tone-bad .dot { background: var(--bad); }
.tone-bad { color: var(--bad); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 16px 0 0; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; min-width: 0; overflow-wrap: anywhere; }

/* form */
fieldset.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
legend { padding: 0; margin-bottom: 12px; font-weight: 500; }
.choice { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; padding: 12px;
  border: 1px solid var(--hairline); border-radius: var(--radius-ctl); cursor: pointer; }
.choice:hover { background: var(--surface-2); }
.choice input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
.choice > span { display: grid; gap: 0; min-width: 0; }
.choice-t { font-weight: 500; }
.choice .muted { font-size: 13px; }

button { font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 4px 16px;
  border-radius: var(--radius-ctl); border: 1px solid var(--hairline-2); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); border-color: var(--bad); }
.btn.quiet { border-color: transparent; color: var(--accent); background: transparent; }
.btn.quiet:hover { background: var(--surface-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
form.inline { display: inline; }

/* Valve's "Sign in through Steam" button, served from this site */
button.steam { padding: 0; border: 0; background: none; border-radius: 4px; cursor: pointer; line-height: 0; }
button.steam img { display: block; width: 180px; height: 35px; }
button.steam:hover img { filter: brightness(1.15); }

/* who / avatars */
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.name { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.avatar { width: 40px; height: 40px; border-radius: 8px; flex: none; object-fit: cover; background: var(--surface-2); }
.avatar.sm { width: 32px; height: 32px; border-radius: 6px; }
.avatar.ph { display: inline-grid; place-items: center; color: var(--muted); font-weight: 600; border: 1px solid var(--hairline); }

/* who's playing */
.summary { font-weight: 500; margin-bottom: 16px; }
.stale { margin-bottom: 16px; }
.servers-sec .stale { margin-bottom: 0; }
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.game-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.game-head h2 { font-size: 15px; overflow-wrap: anywhere; }
.players { list-style: none; margin: 0; padding: 0; }
.players li { display: grid; grid-template-columns: 32px 1fr auto; gap: 12px; align-items: center; padding: 8px 0;
  border-top: 1px solid var(--hairline); }
.players li:first-child { border-top: 0; padding-top: 0; }
.card > .players, .card > .plain { margin-top: 12px; }   /* .players/.plain reset margin; keep the card's 12 px rhythm */
.players li:last-child { padding-bottom: 0; }
.pname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foot-note { margin-top: 32px; }

/* privacy */
.prose { display: grid; gap: 24px; max-width: 72ch; }
.prose section { display: grid; gap: 8px; }
.prose ul { margin: 0; padding-left: 20px; display: grid; gap: 4px; }

@media (max-width: 600px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  main.wrap { padding-block: 24px 40px; }
  nav { gap: 16px; }
  .card { padding: 16px; }
}

/* shared bits for attendance / games / servers */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.links { list-style: none; margin: 0; padding: 0; }
.links li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 20px; border-top: 1px solid var(--hairline); }
.links li:first-child { border-top: 0; }
.links a { font-weight: 500; min-width: 96px; }
.card.links > * + * { margin-top: 0; }
.card.links { padding: 0; }
.sub-h { margin-bottom: 16px; }
.servers-sec { display: grid; gap: 12px; margin-bottom: 40px; }
.server h3, .day-card h3 { font-size: 15px; }
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--hairline); }
.plain li:first-child { border-top: 0; padding-top: 0; }
.plain .afk { flex-basis: 100%; }

/* heatmap */
.table-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); }
.heat-wrap { margin-top: 8px; }
table.heat { width: 100%; min-width: 760px; table-layout: fixed; border-collapse: collapse; }
.heat tbody tr:last-child th, .heat tbody tr:last-child td { border-bottom: 0; }
.heat th, .heat td { padding: 0; text-align: center; border-bottom: 1px solid var(--hairline); border-left: 1px solid var(--hairline); height: 40px; font-variant-numeric: tabular-nums; }
.heat thead th { height: 28px; font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--muted); }
.heat th.day { width: 96px; text-align: left; padding: 0 12px; border-left: 0; white-space: nowrap; font-weight: 500; color: var(--text); }
.heat thead th.day { color: var(--muted); font-family: var(--font); font-size: 12px; }
.heat th.day .small { display: block; font-weight: 400; line-height: 1.2; }
.heat td { font-size: 12px; color: var(--text); }
/* lv1–lv4 keep --text (≥ 4.5:1 in both themes up to 50 %); only the solid lv5 switches to --accent-ink */
.heat td.lv1 { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.heat td.lv2 { background: color-mix(in srgb, var(--accent) 24%, transparent); }
.heat td.lv3 { background: color-mix(in srgb, var(--accent) 36%, transparent); }
.heat td.lv4 { background: color-mix(in srgb, var(--accent) 50%, transparent); }
.heat td.lv5 { background: var(--accent); color: var(--accent-ink); }
.heat tbody tr:hover { background: none; }
.heat-note { margin-top: 8px; }
.days { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

/* forms: attendance / games */
fieldset.day-form { margin: 0; min-width: 0; display: grid; gap: 12px; }
fieldset.day-form > * + * { margin-top: 0; }
fieldset.has-error { border-color: var(--bad); }
.check { display: flex; gap: 12px; align-items: center; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.times { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 12px; }
.afk-row { grid-template-columns: 1fr 1fr; }
.afk-row label:first-child { grid-column: 1 / -1; }
.times label, .manual > label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); min-width: 0; }
input[type="time"], input[type="text"], input[type="search"], select {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--hairline-2);
  border-radius: var(--radius-ctl); min-height: 36px; padding: 4px 8px; width: 100%; min-width: 0; }
.search { display: flex; gap: 12px; }
.search input { flex: 1; }
.result { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 8px 12px;
  border: 1px solid var(--hairline); border-radius: var(--radius-ctl); }
label.result { justify-content: flex-start; cursor: pointer; }
label.result:hover { background: var(--surface-2); }
.result input { margin: 0; accent-color: var(--accent); }
details summary { cursor: pointer; color: var(--accent); }
details[open] summary { margin-bottom: 12px; }

/* ranking */
.rank { list-style: none; margin: 0; padding: 0; }
.card.rank > * + * { margin-top: 0; }
.card.rank { padding: 0 20px; }
.rank li { display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--hairline); }
.rank li:first-child { border-top: 0; }
.rank li:target { background: var(--surface-2); }
.pos { color: var(--muted); }
.g-main { min-width: 0; display: grid; gap: 4px; }
.g-name { font-weight: 500; overflow-wrap: anywhere; }
.g-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.g-meta .status { font-size: 12px; }
.g-vote { display: flex; align-items: center; gap: 8px; }
.votes { min-width: 56px; text-align: right; }
.btn.sm { min-height: 28px; padding: 4px 12px; font-size: 13px; }
.btn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

@media (max-width: 600px) {
  .rank li { grid-template-columns: 20px 1fr; }
  .g-vote { grid-column: 2; justify-content: flex-start; }
  .votes { text-align: left; min-width: 0; }
  .card.rank { padding: 0 16px; }
  .links li { padding: 12px 16px; }
}
.server p { overflow-wrap: anywhere; }
.heat th.day { position: sticky; left: 0; z-index: 1; background: var(--surface); }
