/* Pinxhuri HQ: the studio's dashboard, in the visual world of the game's interface (DESIGN.md, "Instruments
   over the map"): graphite layers, 1px lines, square corners, Barlow in two real weights, one cold steel
   accent for what can be acted on, selected or in progress. States read by a word or a mark as well as
   by colour. Dark: it is read at a desk in the evening, after the day's publications. */

@font-face { font-family: "Barlow"; src: url("fonts/Barlow-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("fonts/Barlow-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
/* Commands and code only (the game ships the same face). */
@font-face { font-family: "IBM Plex Mono"; src: url("fonts/IBMPlexMono-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --bg-0: rgb(12, 14, 16);
  --bg-1: rgb(19, 22, 25);
  --bg-2: rgb(26, 30, 34);
  --bg-3: rgb(35, 40, 45);
  --scrim: rgba(6, 8, 10, 0.64);
  --line-1: rgb(42, 48, 53);
  --line-2: rgb(61, 69, 76);
  --line-3: rgb(94, 104, 113);
  --text-1: rgb(230, 233, 235);
  --text-2: rgb(163, 171, 178);
  --text-3: rgb(128, 136, 144);
  --accent: rgb(143, 180, 206);
  --accent-fill: rgb(190, 210, 224);
  --accent-fill-hover: rgb(213, 227, 237);
  --on-accent: rgb(13, 17, 20);
  --accent-soft: rgba(143, 180, 206, 0.12);
  --accent-line: rgba(143, 180, 206, 0.55);
  --good: rgb(110, 176, 138);
  --good-soft: rgba(110, 176, 138, 0.12);
  --warn: rgb(201, 165, 80);
  --warn-soft: rgba(201, 165, 80, 0.12);
  --bad: rgb(208, 88, 78);
  --bad-soft: rgba(208, 88, 78, 0.14);
  --danger-fill: rgb(126, 42, 36);
  --danger-fill-hover: rgb(150, 52, 44);
  --on-danger: rgb(246, 233, 231);
  --brand-lid: #B3412E;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.35), 0 8px 22px rgba(0, 0, 0, 0.26);
  --rail: 212px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg-0); }
body {
  margin: 0; min-height: 100vh; background: var(--bg-0); color: var(--text-1);
  font: 400 14px/1.45 "Barlow", system-ui, sans-serif; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(143, 180, 206, 0.32); color: var(--text-1); }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border: 3px solid var(--bg-0); }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ------------------------------------------------------------------------------- frame */

.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-0); border-right: 1px solid var(--line-1); padding: 14px 0 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 16px 16px; border-bottom: 1px solid var(--line-1); }
.brand img { width: 30px; height: 30px; }
.brand b { display: block; font-size: 15px; letter-spacing: 1.5px; font-weight: 600; }
.brand span { display: block; font-size: 11px; color: var(--text-3); letter-spacing: 1px; }
.nav { display: flex; flex-direction: column; padding: 10px 8px; gap: 1px; overflow-y: auto; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: 1px; color: var(--text-3); text-transform: uppercase; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; color: var(--text-2); font-size: 13.5px;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.nav a:hover { background: var(--bg-2); color: var(--text-1); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--bg-3); color: var(--text-1); }
.nav a[aria-current="page"] svg { color: var(--accent); }
.nav a .count { margin-left: auto; font-size: 11px; color: var(--text-3); }
.nav a .flag { margin-left: auto; width: 6px; height: 6px; background: var(--bad); }
.rail-foot { margin-top: auto; padding: 10px 16px 0; border-top: 1px solid var(--line-1); display: grid; gap: 8px; font-size: 12px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; min-height: 56px;
  padding: 8px 26px; background: rgba(12, 14, 16, 0.94); border-bottom: 1px solid var(--line-1);
  backdrop-filter: blur(8px);
}
.topbar h1 { font-size: 20px; letter-spacing: 0.3px; }
.topbar .sub { color: var(--text-3); font-size: 12.5px; }
.topbar .tools { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.menu-button { display: none; }
.page { padding: 22px 26px 60px; display: grid; gap: 18px; align-content: start; }

/* ------------------------------------------------------------------------------- panels and layout */

.panel {
  background: var(--bg-1); border: 1px solid var(--line-1); border-top-color: var(--line-2);
  box-shadow: var(--shadow); min-width: 0;
}
.panel > header {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line-1); min-height: 42px;
}
.panel > header h2 { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.panel > header .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel > .body { padding: 12px 14px; }
.panel > .body.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.caption { font-size: 11px; color: var(--text-3); }
.label { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.strong { font-weight: 600; }
.mono { font-family: "IBM Plex Mono", monospace; font-size: 12px; }
.prose { max-width: 72ch; color: var(--text-2); }
.prose strong { color: var(--text-1); }

/* ------------------------------------------------------------------------------- the instrument strip (figures of a period) */

.figures { display: flex; flex-wrap: wrap; }
.figure { flex: 1 1 150px; padding: 12px 16px 13px; border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); min-width: 0; }
.figure .label { display: flex; align-items: center; gap: 6px; }
.figure .value { font-size: 28px; font-weight: 600; line-height: 1.15; margin-top: 4px; letter-spacing: 0.2px; }
.figure .value small { font-size: 14px; color: var(--text-2); font-weight: 400; margin-left: 3px; }
.figure .delta { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.figure .delta svg { width: 10px; height: 10px; stroke-width: 0; fill: currentColor; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.figure.empty .value { color: var(--text-3); }
.figure a.value { display: block; color: var(--text-1); }

/* ------------------------------------------------------------------------------- controls */

button, .button {
  font: 600 13px/1 "Barlow", sans-serif; color: var(--text-1); background: var(--bg-2); border: 1px solid var(--line-2);
  padding: 8px 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease);
}
button:hover, .button:hover { background: var(--bg-3); border-color: var(--line-3); text-decoration: none; }
button:active { background: var(--bg-1); }
button:disabled, .button[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
button.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
button.primary:hover { background: var(--accent-fill-hover); border-color: var(--accent-fill-hover); }
button.order { border-color: var(--accent-line); }
button.order:hover { background: var(--accent-soft); }
button.danger { background: var(--bg-2); color: var(--text-2); }
button.danger.armed { background: var(--danger-fill); border-color: var(--danger-fill); color: var(--on-danger); }
button.danger.armed:hover { background: var(--danger-fill-hover); }
button.small, .button.small { padding: 5px 9px; font-size: 12px; }
button.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
button.ghost:hover { background: var(--bg-2); color: var(--text-1); }
button.busy { position: relative; color: transparent !important; }
button.busy::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border: 1.5px solid var(--text-2); border-right-color: transparent; animation: spin 700ms linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line-1); }
.tabs.inline { border-bottom: 0; }
.tabs button {
  background: transparent; border: 0; border-bottom: 2px solid transparent; color: var(--text-2); padding: 8px 10px 7px; margin-bottom: -1px;
}
.tabs button:hover { background: transparent; color: var(--text-1); }
.tabs button[aria-selected="true"] { color: var(--text-1); border-bottom-color: var(--accent); }

input, select, textarea {
  font: 400 13.5px/1.4 "Barlow", sans-serif; color: var(--text-1); background: var(--bg-2); border: 1px solid var(--line-2);
  padding: 7px 9px; min-width: 0; border-radius: 0;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:hover, select:hover, textarea:hover { border-color: var(--line-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
textarea { resize: vertical; width: 100%; }
select { padding-right: 26px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a3abb2' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; }
label.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--text-2); }
label.field > span:first-child { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3); }
.field-hint { font-size: 12px; color: var(--text-3); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-2); font-size: 13px; user-select: none; }
.switch input { appearance: none; width: 30px; height: 16px; padding: 0; background: var(--bg-3); border: 1px solid var(--line-2); position: relative; cursor: pointer; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; background: var(--text-3); transition: transform 150ms var(--ease), background 150ms var(--ease); }
.switch input:checked { background: var(--accent-soft); border-color: var(--accent-line); }
.switch input:checked::after { transform: translateX(14px); background: var(--accent); }
.switch input:focus { box-shadow: none; }

.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; background: var(--bg-2); border: 1px solid var(--line-1); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.chip.on { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text-1); }
.chip button { padding: 0; border: 0; background: transparent; color: var(--text-3); }
.chip button:hover { color: var(--text-1); background: transparent; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* A state: a mark and a word, the colour on top. */
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.state svg { width: 12px; height: 12px; stroke-width: 2; }
.state.ok { color: var(--good); }
.state.warn { color: var(--warn); }
.state.bad { color: var(--bad); }
.state.off { color: var(--text-3); }
.state.accent { color: var(--accent); }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--bg-2); border: 1px solid var(--line-1); color: var(--text-2); font-size: 13px; }
.notice svg { margin-top: 2px; }
.notice.bad { background: var(--bad-soft); border-color: rgba(208, 88, 78, 0.4); color: var(--text-1); }
.notice.good { background: var(--good-soft); border-color: rgba(110, 176, 138, 0.4); color: var(--text-1); }
.notice.warn { background: var(--warn-soft); border-color: rgba(201, 165, 80, 0.4); color: var(--text-1); }

.toast {
  position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(440px, calc(100vw - 44px)); padding: 11px 14px;
  background: var(--bg-0); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13px;
  animation: rise 220ms var(--ease);
}
.toast.bad { border-color: rgba(208, 88, 78, 0.6); }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ------------------------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--text-3);
  padding: 8px 14px; border-bottom: 1px solid var(--line-1); white-space: nowrap; position: sticky; top: 0; background: var(--bg-1);
}
table.data td { padding: 7px 14px; border-bottom: 1px solid var(--line-1); vertical-align: middle; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--bg-2); }
table.data .num { text-align: right; white-space: nowrap; }
table.data .key { max-width: 0; width: 100%; }
table.data .key > div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.data td.key { position: relative; }
.bar { position: absolute; left: 14px; bottom: 3px; height: 2px; background: var(--accent-line); max-width: calc(100% - 28px); }
.scroll-y { max-height: 420px; overflow-y: auto; }
.thumb { width: 64px; height: 36px; object-fit: cover; display: block; background: var(--bg-2); }
.thumb.v { width: 28px; height: 50px; }
.empty-row td { color: var(--text-3); text-align: center; padding: 22px 14px; }

/* ------------------------------------------------------------------------------- charts */

.chart { position: relative; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart .grid-line { stroke: var(--line-1); stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis { fill: var(--text-3); font-size: 11px; font-family: "Barlow", sans-serif; }
.chart .series { fill: none; stroke-width: 1.75; stroke-linejoin: round; }
.chart .series.s0 { stroke: var(--accent); }
.chart .series.s1 { stroke: var(--text-2); stroke-dasharray: 4 3; }
.chart .series.s2 { stroke: var(--line-3); }
.chart .area { fill: var(--accent-soft); }
.chart .cursor { stroke: var(--line-3); stroke-width: 1; shape-rendering: crispEdges; }
.chart .dot { fill: var(--bg-1); stroke-width: 1.75; }
.chart .dot.s0 { stroke: var(--accent); }
.chart .dot.s1 { stroke: var(--text-2); }
.chart .bars rect { fill: var(--accent-line); }
.chart .bars rect.s1 { fill: var(--line-3); }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; background: var(--bg-0); border: 1px solid var(--line-2); padding: 7px 9px;
  font-size: 12px; box-shadow: var(--shadow); white-space: nowrap; transform: translate(-50%, -100%); margin-top: -10px;
}
.chart-tip .k { color: var(--text-3); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend i { display: inline-block; width: 14px; height: 0; border-top: 2px solid var(--accent); vertical-align: middle; margin-right: 6px; }
.legend i.s1 { border-top: 2px dashed var(--text-2); }
.legend i.s2 { border-top-color: var(--line-3); }

/* The overview's strip recorder: one band per audience, the same thirty days across. */
.strips { display: grid; }
.strip { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; align-items: center; border-bottom: 1px solid var(--line-1); min-height: 64px; }
.strip:last-child { border-bottom: 0; }
.strip .who { padding: 10px 14px; }
.strip .who b { display: block; font-size: 13px; font-weight: 600; }
.strip .who span { font-size: 11px; color: var(--text-3); }
.strip .trace { height: 64px; border-left: 1px solid var(--line-1); border-right: 1px solid var(--line-1); }
.strip .now { padding: 10px 14px; text-align: right; }
.strip .now b { display: block; font-size: 18px; font-weight: 600; }
.strip .now span { font-size: 11px; color: var(--text-3); }
.strip.none .trace { display: grid; place-items: center; color: var(--text-3); font-size: 12px; }
.strip-days { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; font-size: 11px; color: var(--text-3); }
.strip-days div:nth-child(2) { display: flex; justify-content: space-between; padding: 5px 4px 0; }

/* ------------------------------------------------------------------------------- the agent's week */

.week { display: grid; grid-template-columns: 96px repeat(7, minmax(108px, 1fr)); overflow-x: auto; }
.week > div { border-right: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); padding: 8px 10px; min-height: 52px; min-width: 0; }
.week > div:nth-child(8n) { border-right: 0; }
.week .head { background: var(--bg-0); min-height: 0; }
.week .head b { display: block; font-size: 13px; }
.week .head span { font-size: 11px; color: var(--text-3); }
.week .head.today { box-shadow: inset 0 -2px 0 var(--accent); }
.week .lane { font-size: 12px; color: var(--text-2); background: var(--bg-0); }
.week .lane b { display: block; color: var(--text-1); font-size: 12.5px; }
.week .topic { font-size: 12.5px; }
.week .topic .kind { font-size: 11px; color: var(--text-3); letter-spacing: 0.5px; text-transform: uppercase; }
.week .slot { font-size: 12px; display: grid; gap: 3px; align-content: start; }
.week .slot a { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week .slot.off { color: var(--text-3); background: repeating-linear-gradient(135deg, transparent 0 6px, rgba(255, 255, 255, 0.018) 6px 12px); }

/* ------------------------------------------------------------------------------- reports */

.report { max-width: 78ch; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.report h1, .report h2, .report h3 { color: var(--text-1); margin: 22px 0 8px; }
.report h1 { font-size: 20px; }
.report h2 { font-size: 17px; }
.report h3 { font-size: 15px; }
.report > :first-child { margin-top: 0; }
.report p, .report ul, .report ol, .report table, .report pre { margin: 0 0 10px; }
.report ul, .report ol { padding-left: 20px; }
.report li { margin: 3px 0; }
.report strong { color: var(--text-1); font-weight: 600; }
.report code { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; background: var(--bg-2); padding: 1px 4px; }
.report pre { background: var(--bg-0); border: 1px solid var(--line-1); padding: 10px 12px; overflow-x: auto; font-size: 12.5px; }
.report pre code { background: none; padding: 0; }
.report table { border-collapse: collapse; font-size: 13px; }
.report th, .report td { border: 1px solid var(--line-1); padding: 5px 9px; text-align: left; }
.report th { color: var(--text-1); background: var(--bg-2); }
.report blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 1px solid var(--line-3); }

.list { display: grid; }
.list > button, .list > a {
  display: grid; gap: 3px; text-align: left; padding: 10px 14px; background: transparent; border: 0; border-bottom: 1px solid var(--line-1);
  color: var(--text-1); font-weight: 400; white-space: normal; line-height: 1.35;
}
.list > button:hover { background: var(--bg-2); }
.list > button[aria-current="true"] { background: var(--bg-3); }
.diff { display: grid; gap: 6px; font-size: 13px; }
.diff div { display: grid; grid-template-columns: 130px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-1); }
.diff div:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------------------- connections */

.connection { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 14px; border-bottom: 1px solid var(--line-1); }
.connection:last-child { border-bottom: 0; }
.connection h3 { font-size: 15px; display: flex; gap: 10px; align-items: center; }
.connection .actions { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; justify-content: flex-end; }
.connection details { grid-column: 1 / -1; }
.connection summary { cursor: pointer; color: var(--accent); font-size: 13px; list-style: none; display: inline-flex; gap: 6px; align-items: center; }
.connection summary::-webkit-details-marker { display: none; }
.connection details[open] summary { margin-bottom: 10px; }
.steps { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13px; display: grid; gap: 5px; max-width: 80ch; }
.copyline { display: flex; gap: 0; max-width: 620px; }
.copyline input { flex: 1; font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--text-2); }
.copyline button { border-left: 0; }

/* ------------------------------------------------------------------------------- loading and empty states */

.skeleton { background: var(--bg-2); position: relative; overflow: hidden; min-height: 14px; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent); animation: sweep 1.3s var(--ease) infinite;
}
@keyframes sweep { to { transform: translateX(100%); } }
.empty { display: grid; gap: 10px; justify-items: start; padding: 26px 18px; color: var(--text-2); max-width: 70ch; }
.empty h3 { color: var(--text-1); font-size: 16px; }

/* ------------------------------------------------------------------------------- sign-in */

.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(1200px 600px at 50% -10%, rgba(143, 180, 206, 0.06), transparent 60%), var(--bg-0); }
.login form { width: min(380px, 100%); display: grid; gap: 14px; padding: 26px 24px 24px; }
.login .brand { padding: 0 0 16px; }
.login .brand img { width: 40px; height: 40px; }
.login .brand b { font-size: 18px; }

/* ------------------------------------------------------------------------------- small screens */

@media (max-width: 1180px) {
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.wide-left { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; inset: 0 auto 0 0; width: min(280px, 84vw); z-index: 40; transform: translateX(-100%); transition: transform 220ms var(--ease); }
  .app.open .rail { transform: none; box-shadow: var(--shadow); }
  .app.open::after { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 30; }
  .menu-button { display: inline-flex; }
  .topbar { padding: 8px 14px; gap: 10px; flex-wrap: wrap; }
  .topbar h1 { font-size: 18px; }
  .topbar .tools { margin-left: 0; width: 100%; justify-content: flex-start; }
  .page { padding: 14px 14px 40px; gap: 14px; }
  .grid.two, .grid.three { grid-template-columns: minmax(0, 1fr); }
  .figure { flex-basis: 40%; }
  .figure .value { font-size: 23px; }
  .strip, .strip-days { grid-template-columns: 112px minmax(0, 1fr) 76px; }
  .strip .now b { font-size: 15px; }
  table.data th, table.data td { padding-left: 10px; padding-right: 10px; }
  .connection { grid-template-columns: minmax(0, 1fr); }
  .connection .actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
