/* The console. One stylesheet, light by default and dark when the system asks.
   A sidebar from 860px up, the sections as a row of links above that. */

:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --side: #efede7;
  --line: #e2dfd7;
  --text: #1d1f23;
  --muted: #696c73;
  --accent: #2f6b8f;
  --accent-soft: #e2edf4;
  --accent-ink: #ffffff;
  --good: #2e6b4f;
  --good-soft: #e3f0e8;
  --warn: #8a5a17;
  --warn-soft: #f7eed8;
  --bad: #b23b2e;
  --bad-soft: #f8e3e0;
  --radius: 10px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121418;
    --panel: #1b1e23;
    --side: #16191d;
    --line: #2a2f37;
    --text: #e7e9ed;
    --muted: #979ca6;
    --accent: #6aaed4;
    --accent-soft: #1b2a35;
    --accent-ink: #0e1419;
    --good: #66b48d;
    --good-soft: #16271e;
    --warn: #e0bb6a;
    --warn-soft: #2c2414;
    --bad: #e2766a;
    --bad-soft: #2e1a18;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  display: flex;
  min-height: 100vh;
}
a { color: var(--accent); }
h1 { font-size: 1.6rem; margin: 0 0 .4rem; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .8rem; }
h2 small { font-weight: 400; color: var(--muted); }
h3 { font-size: .95rem; margin: 1.2rem 0 .5rem; }
p { margin: .4rem 0; }
small, .muted { color: var(--muted); }
.lead { color: var(--muted); max-width: 62ch; margin-bottom: 1.2rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; word-break: break-all; }
.bad { color: var(--bad); }

/* frame */
.side {
  width: 240px;
  flex: 0 0 240px;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.side li a:hover { background: var(--line); }
.side li a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.app-name { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 1.05rem; padding: 0 10px; flex-wrap: wrap; }
.to-app { padding: 0 10px; font-size: .9rem; }
.who { margin-top: auto; padding: 0 10px; font-size: .85rem; color: var(--muted); }
main { flex: 1; min-width: 0; padding: 28px 32px 64px; max-width: 1100px; }
main.solo { margin: 0 auto; max-width: 760px; }
.top { display: flex; justify-content: flex-end; margin-bottom: 12px; }

@media (max-width: 859px) {
  body { flex-direction: column; }
  .side { position: static; width: auto; height: auto; flex: none; border-right: 0; border-bottom: 1px solid var(--line); padding: 12px 16px; gap: 8px; }
  .side ul { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .side li a { white-space: nowrap; padding: 6px 10px; }
  .who { margin: 0; }
  main { padding: 20px 16px 56px; }
}

/* pieces */
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 16px;
}
.card.is-todo { border-color: var(--warn); background: var(--warn-soft); }
.card.is-todo ul { margin: 0; padding-left: 1.2em; }
.card.is-demo { display: flex; gap: 20px; align-items: center; border-color: var(--accent); }
.demo-qr { flex: 0 0 168px; }
.demo-qr svg { width: 168px; height: 168px; display: block; border-radius: 6px; }
@media (max-width: 600px) { .card.is-demo { flex-direction: column; align-items: flex-start; } }
.flash { background: var(--good-soft); color: var(--good); border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.flash.is-bad { background: var(--bad-soft); color: var(--bad); }
.note { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; }

.tag {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--line);
  color: var(--muted);
  white-space: nowrap;
  vertical-align: middle;
}
.tag.is-info { background: var(--accent-soft); color: var(--accent); }
.tag.is-changed, .tag.is-warn { background: var(--warn-soft); color: var(--warn); }
.tag.is-closed { background: var(--bad-soft); color: var(--bad); }
.tag.is-good { background: var(--good-soft); color: var(--good); }

.rows { list-style: none; margin: 0; padding: 0; }
ol.rows { counter-reset: n; }
.row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; padding-top: 0; }
.row.is-past, .is-past .row { opacity: .62; }
.row p { margin: .2rem 0; }
.row .grow > strong, .row .grow > small { display: block; }
.row .grow > small { margin-top: 2px; }
.grow { flex: 1; min-width: 0; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.rec-c { color: var(--muted); font-size: .85rem; }
@media (max-width: 600px) {
  .row { flex-wrap: wrap; }
  .row .acts { width: 100%; justify-content: flex-start; }
}

/* forms */
button, .btn {
  font: inherit;
  font-weight: 600;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 8px;
  padding: 8px 14px;
  min-height: 40px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
button.is-quiet, .btn.is-quiet { background: transparent; color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
form.inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
form.inline input, form.inline select { width: auto; }
.form { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
.form label, label.form { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: .9rem; }
.form label small { font-weight: 400; }
input, textarea, select {
  font: inherit;
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
  min-height: 40px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 6px; width: 100%; }
.form label.check, .pills label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.pills input[type="datetime-local"] { width: auto; }
.check input, .pills input[type="radio"] { width: auto; min-height: 0; }
.keys { display: flex; flex-direction: column; gap: 6px; padding-left: 26px; max-height: 260px; overflow-y: auto; width: 100%; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; max-width: none; }
.row-form label { flex: 1 1 200px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.picker { display: flex; flex-direction: column; gap: 2px; }
.source { background: var(--bg); border-radius: 8px; padding: 10px 14px; margin: 14px 0; }
.was { background: var(--bg); border-left: 3px solid var(--line); padding: 6px 10px; margin: 0 0 6px; font-weight: 400; }
.thumb { max-width: 160px; border-radius: 6px; }
.err { color: var(--bad); }
[hidden] { display: none !important; }

/* the push preview */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .split { grid-template-columns: 1fr; } .phone { display: none; } }
.phone { position: sticky; top: 24px; border: 10px solid #1d1f23; border-radius: 36px; background: linear-gradient(160deg, #6d8aa3, #2b4256); height: 520px; padding: 54px 12px; }
.phone-note { background: rgba(255, 255, 255, .86); color: #1d1f23; border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font-size: .85rem; backdrop-filter: blur(8px); }
.phone-note b { font-size: .9rem; }
.phone-note span { overflow-wrap: anywhere; }
.phone-app { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #555; }

/* numbers */
.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th, .t td { text-align: left; padding: 8px 6px; border-top: 1px solid var(--line); vertical-align: top; }
.t th { border-top: 0; color: var(--muted); font-weight: 600; }
.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tiles div { background: var(--bg); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; }
.tiles b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.tiles span { color: var(--muted); font-size: .85rem; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) 120px 40px; gap: 10px; align-items: center; }
.bars meter { width: 100%; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }

/* lists of apps, signing in */
.apps { list-style: none; padding: 0; display: grid; gap: 10px; }
.apps a { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; text-decoration: none; color: var(--text); }
.signin { max-width: 440px; margin: 10vh auto 0; display: flex; flex-direction: column; gap: 12px; }
.signin details { margin-top: 24px; }
