:root {
  --ink: #111113; --paper: #f5f5f7; --card: #fff; --muted: #6e6e73; --line: #e3e3e8; --red: #e0383e; --soft: #ebebf0;
  --red-fill: #cf3036;  
  --good: #248a3d; --warn: #a84a0c; --danger: #c42b31;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f5f5f7; --paper: #111113; --card: #1c1c1e; --muted: #a1a1a6; --line: #2c2c2e; --soft: #232326; --good: #30d158; --warn: #ff9f0a; --danger: #ff6961; }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .spinner { animation-duration: 2s; } }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.hidden-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased; }
a { color: inherit; }
[hidden] { display: none !important; }
.dot { color: var(--red); }
.muted { color: var(--muted); }
@media (prefers-color-scheme: dark) { .mark { outline: 1px solid #3a3a3c; outline-offset: -1px; } }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; padding: 11px 20px;
  font: 600 15px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; text-decoration: none; border: 0; cursor: pointer;
  white-space: nowrap; color: var(--ink); background: var(--soft); transition: filter .15s, opacity .15s; }
.btn:hover { filter: brightness(0.97); }
.btn.primary { background: var(--red-fill); color: #fff; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.line { background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }
.btn.big { padding: 14px 26px; font-size: 17px; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
input.field, textarea.field, select.field { width: 100%; font: 17px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--card);
  border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; outline: none; transition: border-color .15s, box-shadow .15s; }
input.field:focus, textarea.field:focus, select.field:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink) 10%, transparent); }
input.code { font-size: 28px; letter-spacing: .32em; text-indent: .32em; text-align: center; font-variant-numeric: tabular-nums; padding: 14px 10px; }
input.code::placeholder { color: var(--line); }
@media (prefers-color-scheme: dark) {
  .org { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
  .org .intro, .org .kicker, .org p { color: var(--muted); }
}
@media (prefers-color-scheme: dark) { .org .btn { background: var(--ink); color: var(--paper); } .org .btn.ghost { background: transparent; color: var(--ink); } }
.error { color: var(--warn); font-size: 15px; margin: 4px 0 0; }
.small { font-size: 14px; color: var(--muted); }
.linkish { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid color-mix(in srgb, currentColor 25%, transparent); border-top-color: currentColor;
  animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* The owner console's layout (site/console/), on the site's own look (minne.css): a sidebar of parts, numbers first. */
body { font-size: 15px; }
.center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.gate { max-width: 380px; margin: 0 auto; text-align: center; }
.gate h1 { font-size: 34px; letter-spacing: -0.02em; margin: 6px 0 0; }
.gate .field { width: 100%; }
.big-mark { width: 48px; height: 48px; border-radius: 12px; }

#app { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 22px 16px;
  border-right: 1px solid var(--line); background: var(--card); }
.mark { width: 28px; height: 28px; border-radius: 7px; display: block; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 17px; text-decoration: none; }
.tag { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--soft);
  border-radius: 6px; padding: 2px 6px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; }
#nav a:hover { background: var(--soft); color: var(--ink); }
#nav a.on { background: var(--soft); color: var(--ink); }
.count { background: var(--red-fill); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 650; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; font-size: 13px; }
.who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.out-link { text-decoration: none; font-weight: 600; }

.main { padding: 22px 32px 64px; min-width: 0; }
.bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.bar h1 { font-size: 26px; letter-spacing: -0.02em; margin: 0; }
.small-btn { padding: 6px 14px; font-size: 13px; }
.back { font-size: 13px; color: var(--muted); text-decoration: none; display: inline-block; margin-bottom: 6px; }

/* Numbers */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; display: block; }
a.tile:hover { border-color: var(--muted); }
.tile .label { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile .note { font-size: 12px; color: var(--muted); margin-top: 2px; }
.good { color: var(--good); } .warn { color: var(--warn); } .bad { color: var(--danger); }

/* Cards and lists */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 16px; }
.card h2 { font-size: 15px; margin: 0 0 10px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid2 > .card { margin-bottom: 0; }
.needs { list-style: none; margin: 0; padding: 0; }
.needs li a { display: flex; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid var(--line); text-decoration: none; }
.needs li:first-child a { border-top: 0; }
.needs .pip { width: 8px; height: 8px; border-radius: 50%; flex: none; transform: translateY(-1px); }
.pip.urgent { background: var(--danger); } .pip.warn { background: var(--warn); } .pip.info { background: var(--muted); }
.clear { display: flex; gap: 10px; align-items: center; color: var(--good); font-weight: 600; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; }

/* Tables */
.tools { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.tools .field { max-width: 320px; padding: 9px 13px; font-size: 15px; }
.scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
th.n, td.n { text-align: right; font-variant-numeric: tabular-nums; }
th[aria-sort="ascending"]::after { content: " ↑"; } th[aria-sort="descending"]::after { content: " ↓"; }
td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr.open { cursor: pointer; } tbody tr.open:hover td { background: var(--soft); }
td .sub { display: block; color: var(--muted); font-size: 12px; }
.badge { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 1px 9px; background: var(--soft); color: var(--muted); }
.badge.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.empty { color: var(--muted); padding: 18px; text-align: center; }

/* Charts: bars, drawn as divs */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; }
.bars i { flex: 1; background: var(--ink); opacity: .8; border-radius: 3px 3px 0 0; min-height: 2px; }
.bars i.zero { opacity: .15; }
.bars-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
.meter { height: 8px; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; position: relative; }
.meter i { position: absolute; inset: 0 auto 0 0; background: var(--ink); border-radius: 999px; }
.meter b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--warn); }

/* Forms in cards */
.form { display: grid; gap: 10px; max-width: 520px; }
.form label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.form .field { padding: 9px 13px; font-size: 15px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.history { font-size: 13px; color: var(--muted); margin: 10px 0 0; padding-left: 18px; }

/* Mail */
.letter pre { white-space: pre-wrap; font: inherit; margin: 10px 0; }
.letter textarea { width: 100%; min-height: 120px; }

@media (max-width: 760px) {
  #app { grid-template-columns: minmax(0, 1fr); }  /* the tab row scrolls, rather than stretching the page */
  .side { position: sticky; top: 0; z-index: 5; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  #nav { flex-direction: row; overflow-x: auto; gap: 4px; width: 100%; min-width: 0; order: 3; }
  #nav a { padding: 6px 10px; white-space: nowrap; }
  .side-foot { margin: 0 0 0 auto; flex-direction: row; gap: 12px; }
  .who { display: none; }
  .main { padding: 16px 14px 48px; }
  .tile .value { font-size: 22px; }
}
