/* fortress web systems: tokens, then the shell, then the systems. Plain CSS, no framework. */
/* tokens: generated from fortress-tokens, checked by tests/tokens.rs */
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexSans-Regular-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url(/fonts/IBMPlexSans-Medium-latin.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexMono-Regular-latin.woff2) format("woff2"); }
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f5f5f4;
  --hover: #e7e5e4;
  --selected: #e7e5e4;
  --rule: #e7e5e4;
  --rule-strong: #d6d3d1;
  --ink: #0c0c0f;
  --muted: #78716c;
  --faint: #a8a29e;
  --accent: #9a5f0a;
  --problem: #e03131;
  --focus: #9a5f0a;
  --track-bg: #e7e5e4;
  --track-fill: #78716c;
  --size-display: 22px;
  --size-title: 16px;
  --size-body: 14px;
  --size-small: 13px;
  --size-tiny: 12px;
  --gap: 8px;
  --gutter: 16px;
  --row: 30px;
  --bar: 44px;
  --tabs: 40px;
  --track: 2px;
  --control: 30px;
  --radius: 6px;
  --stroke: 1px;
  --pad: 10px;
  --weight-medium: 500;
  --font: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0c0f;
    --surface: #16161a;
    --hover: #26262b;
    --selected: #26262b;
    --rule: #26262b;
    --rule-strong: #44403c;
    --ink: #f5f5f4;
    --muted: #a8a29e;
    --faint: #78716c;
    --accent: #f1ac4b;
    --problem: #e03131;
    --focus: #f1ac4b;
    --track-bg: #26262b;
    --track-fill: #a8a29e;
  }
}
/* end tokens */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--size-body)/1.4 var(--font);
}
h1, h2 { margin: 0; font-weight: 400; }
h1 { font-size: var(--size-title); }
h2 { font-size: var(--size-body); color: var(--muted); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

button, .button {
  display: inline-grid;
  place-items: center;
  min-width: var(--control);
  height: var(--control);
  padding: 0 var(--gutter);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
button:hover:enabled, .button:hover { background: var(--hover); }
button:disabled { color: var(--muted); cursor: default; }
input, select {
  height: var(--control);
  min-width: 0;
  padding: 0 var(--gap);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  font: inherit;
}
label { display: grid; gap: 4px; font-size: var(--size-small); color: var(--muted); }
.stack { display: grid; gap: var(--gap); }
.row { display: flex; align-items: center; gap: var(--gap); }
.row > input { flex: 1; }
.muted { color: var(--muted); }
.state { min-height: 20px; margin: 0; color: var(--muted); font-size: var(--size-small); }
.problem { color: var(--problem); }

/* Shell */
.shell { border-bottom: 1px solid var(--rule-strong); }
.shell .bar { display: flex; align-items: center; gap: 4px; height: 52px; padding: 0 var(--gutter); }
.shell .bar > a, .shell .menu a {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}
.shell a:hover { background: var(--hover); }
/* The current page is the title: larger and in ink, on a flat tint. */
.shell .bar > a.current { color: var(--ink); font-size: var(--size-title); background: var(--selected); }
.shell .menu a.current { color: var(--ink); background: var(--selected); }
.shell .more { position: relative; }
.shell .more button { height: 32px; padding: 0 10px; border: 0; color: var(--muted); }
.shell .menu {
  position: absolute;
  z-index: 2;
  min-width: 180px;
  padding: 4px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--bg);
}
.shell .more .menu { top: 36px; left: 0; }
.shell .end { margin-left: auto; color: var(--muted); font-size: var(--size-small); white-space: nowrap; }
.shell .phone { display: none; position: relative; padding: 8px var(--gutter); }
.shell .phone .title {
  gap: var(--gap);
  grid-auto-flow: column;
  height: 36px;
  padding: 0;
  border: 0;
  font-size: var(--size-title);
}
.shell .phone .title:hover { background: transparent; }
.shell .phone .menu { top: 48px; left: var(--gutter); right: var(--gutter); }
@media (max-width: 640px) {
  .shell .bar { display: none; }
  .shell .phone { display: block; }
}
main { display: grid; gap: 24px; width: min(560px, 100%); margin: 0 auto; padding: 24px var(--gutter); }
main > * { min-width: 0; }

/* Systems */
.sign-in { display: grid; gap: var(--gap); width: min(360px, 100%); margin: 0 auto; }
.sign-in .row > * { flex: 1; }
.notices { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.notices li { display: flex; justify-content: space-between; align-items: center; gap: var(--gap); color: var(--problem); }
.notices button { height: 32px; padding: 0 var(--gap); font-size: var(--size-small); }
.presence ul, .people { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.presence li { display: flex; justify-content: space-between; gap: var(--gutter); }
.list { display: grid; gap: var(--gap); }
.list .count { color: var(--muted); font-size: var(--size-small); white-space: nowrap; font-variant-numeric: tabular-nums; }
.list table { width: 100%; border-collapse: collapse; font-size: var(--size-small); }
.list th { padding: 4px 6px; color: var(--muted); font-weight: 400; text-align: left; }
.list td { padding: 6px; border-top: 1px solid var(--rule-strong); overflow-wrap: anywhere; }
.list tr.pickable { cursor: pointer; }
.list tr.pickable:hover { background: var(--hover); }
.list tr.selected { background: var(--selected); }
