/* Karchi's desktop palette (KarchiOS kalendarix colors.toml) and its pixel font, as in Prehľad dvora.
   Departure Mono is drawn on an 11 px grid, so every size is a multiple of 11. */
@font-face {
  font-family: "Departure Mono";
  src: url("DepartureMono-Regular.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #000a07;
  --surface: #0a1512;
  --raised: #1a2320;
  --line: #2b3632;
  --text: #f0f0eb;
  --muted: #a3aca8;
  --accent: #628790;
  --warn: #d9b26f;
  --problem: #e5786d;
  /* the rest of the KarchiOS palette (DESIGN.md), for languages and networks */
  --cyan: #abe7e6;
  --green: #a1d289;
  --teal: #a2cdc4;
  --yellow: #e2c08d;
  --grey: #b4b4b0;
  --radius: 11px;
  font-family: "Departure Mono", ui-monospace, monospace;
  font-size: 11px;
  line-height: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: none; font-smooth: never; }
a { color: var(--text); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.top, main, .foot { max-width: 880px; margin: 0 auto; padding-inline: 22px; }
.top { padding-top: 44px; padding-bottom: 11px; }
h1 { font-size: 44px; line-height: 55px; margin: 0; font-weight: normal; }
h1 .home { text-decoration: none; }
.bio { color: var(--muted); max-width: 66ch; margin: 11px 0; }
.links { display: flex; flex-wrap: wrap; align-items: center; gap: 11px 22px; }
.links a, .links .who { display: inline-flex; align-items: center; height: 33px; padding: 0 11px; border-radius: var(--radius); background: var(--surface); text-decoration: none; }
.links .who { color: var(--muted); background: none; padding: 0; }
.links form { display: contents; }
button { font: inherit; color: var(--text); height: 33px; padding: 0 11px; border: 0; border-radius: var(--radius); background: var(--surface); cursor: pointer; }
button:hover { color: var(--accent); }

.login { display: grid; gap: 4px; max-width: 286px; margin-top: 22px; }
.login label { color: var(--muted); margin-top: 7px; }
.login input { font: inherit; color: var(--text); height: 33px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.login button { margin-top: 18px; justify-self: start; background: var(--raised); }
.error { color: var(--problem); margin: 0; }

h2 { font-size: 22px; line-height: 33px; font-weight: normal; margin: 44px 0 0; }
.hint { color: var(--muted); margin: 0 0 11px; }
.sub { color: var(--muted); display: block; overflow-wrap: anywhere; }

ul { list-style: none; margin: 0; padding: 0; }
.site { display: grid; grid-template-columns: 11px minmax(0, 1fr) auto 99px; align-items: center; gap: 0 11px; padding: 6px 11px; border-radius: var(--radius); background: var(--surface); margin-bottom: 4px; }
.site a { text-decoration: none; }
.site a:hover { text-decoration: underline; }
.dot { width: 11px; height: 11px; border-radius: 3px; background: var(--line); }
.dot.ok { background: var(--accent); }
.dot.bad { background: var(--problem); }
.days { display: grid; grid-template-columns: repeat(30, 4px); gap: 2px; height: 22px; }
.days i { border-radius: 2px; background: var(--raised); }
.days i.ok { background: var(--accent); }
.days i.some { background: var(--warn); }
.days i.bad { background: var(--problem); }
.pct { text-align: right; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.state { color: var(--muted); white-space: nowrap; }
.state.bad { color: var(--problem); }

.links .net { gap: 8px; }
.links .net b { font-weight: normal; color: var(--muted); }
.links .net::before { content: ""; width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.net.gh { --c: var(--text); }
.net.ig { --c: var(--problem); }
.net.fb { --c: var(--accent); }
.net.dc { --c: var(--cyan); }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 11px; }
.card { --c: var(--grey); display: flex; flex-direction: column; padding: 11px; border-radius: var(--radius); background: var(--surface); }
.card .head { display: flex; align-items: center; gap: 11px; margin-bottom: 4px; }
.card .mark { flex: none; width: 33px; height: 33px; shape-rendering: crispEdges; }
.card .mark rect { fill: var(--c); }
.card:hover { background: var(--raised); }
.card .name { font-size: 22px; line-height: 33px; color: var(--c); text-decoration: none; overflow-wrap: anywhere; }
.card .name:hover { text-decoration: underline; }
.card p { margin: 0 0 11px; flex: 1; }
.card .meta { display: flex; flex-wrap: wrap; gap: 0 18px; color: var(--muted); }
.card .meta a { color: var(--c); }
.card .lang { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.card .lang i { width: 11px; height: 11px; border-radius: 3px; background: var(--c); }
.l-ts { --c: var(--cyan); }
.l-go { --c: var(--green); }
.l-py { --c: var(--yellow); }
.l-sh { --c: var(--teal); }
.l-rs { --c: var(--problem); }

.foot { color: var(--muted); padding-top: 44px; padding-bottom: 44px; }

.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(264px, 1fr)); gap: 11px; margin-top: 11px; }
.machine { background: var(--surface); border-radius: var(--radius); padding: 11px; }
.machine.off { opacity: .6; }
.machine h3 { display: grid; grid-template-columns: 22px auto 1fr; align-items: center; gap: 0 8px; font-size: 11px; font-weight: normal; margin: 0 0 6px; }
.machine h3 b { font-weight: normal; }
.machine h3 .sub { text-align: right; }
.pix { width: 22px; height: 22px; image-rendering: pixelated; }
.pix rect { fill: currentColor; }
.cpu { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: end; gap: 0 11px; margin-bottom: 6px; }
.cpu .big { font-size: 33px; line-height: 44px; grid-row: 1 / 3; }
.cpu .k { color: var(--muted); }
.spark { width: 100%; height: 33px; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.big.some, .fill.some { color: var(--warn); }
.big.bad, .fill.bad { color: var(--problem); }
.meter { display: grid; grid-template-columns: 33px 1fr auto; align-items: center; gap: 0 8px; }
.meter .k { color: var(--muted); }
.track { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.fill { display: block; height: 100%; border-radius: 3px; background: currentColor; color: var(--accent); }
.meter .v { font-variant-numeric: tabular-nums; }
.machine .hint { margin: 6px 0 0; }

@media (max-width: 560px) {
  h1 { font-size: 33px; line-height: 44px; }
  .site { grid-template-columns: 11px minmax(0, 1fr) 88px; }
  .days { grid-column: 2 / 4; grid-row: 2; margin-top: 4px; grid-template-columns: repeat(30, 1fr); }
}
