/* Vigil: a watch over the servers. Quiet means fine; only trouble gets
   colour. One typeface, Atkinson Hyperlegible Next, chosen because its
   characters cannot be mistaken for one another at a glance (0 and O, 1 and
   l, rn and m), which is the whole job of a watch screen. */

@font-face { font-family: "Atkinson Next"; font-weight: 400 800; font-display: swap; src: url(fonts/next-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Next"; font-weight: 400 800; font-display: swap; src: url(fonts/next-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Atkinson Mono"; font-weight: 400 600; font-display: swap; src: url(fonts/mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Atkinson Mono"; font-weight: 400 600; font-display: swap; src: url(fonts/mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* Colours: each one written once, as light-dark(day, night). Night watch
   is the dark one; day watch is cool daylight, not paper, with the same lamp
   darkened to keep its contrast on light ground. Which applies follows the
   device, unless this browser chose one on the account page (data-theme). */
:root {
  --bg: light-dark(#EDF1F5, #18212E);  /* the ground */
  --raised: light-dark(#FFFFFF, #212C3B);  /* deck: panels, inputs, logs */
  --rule: light-dark(#D3DAE3, #2D3A4D);
  --ink: light-dark(#16202B, #E9E4D8);
  --dim: light-dark(#5A6678, #8D97A6);
  --lamp: light-dark(#B07A0F, #F0B94A);  /* brand, focus, an action under way */
  --amber: light-dark(#B5600B, #E39B3B);  /* degraded */
  --red: light-dark(#C23A32, #E5534B);  /* down */
  --calm: light-dark(#B9C4D1, #3A4A60);  /* quiet lines: a stopped square, a done banner */
  --well: light-dark(#8496AE, #61779A);  /* a running square, a meter's fill: present, not loud */
  --err-ink: light-dark(#A3322B, #F3B1A8);
  --button: light-dark(#16202B, #E9E4D8);
  --button-ink: light-dark(#FFFFFF, #18212E);
  --glow: light-dark(rgba(176, 122, 15, .35), rgba(240, 185, 74, .45));
  --flash: light-dark(rgba(176, 122, 15, .14), rgba(240, 185, 74, .16));
  --shadow: light-dark(rgba(22, 32, 43, .14), rgba(0, 0, 0, .35));
  --sans: "Atkinson Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Mono", ui-monospace, "SF Mono", "Cascadia Mono", monospace;
  /* Corners: 6px for what you press or type in, 8px for panels, 3px for
     status squares and meters, round for the avatar. */
  --frame: 1320px;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: light dark;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
/* The scrollbar's room is kept on every page, long or short, so the centred
   page does not jump sideways when one page scrolls and the next does not. */
html { scrollbar-gutter: stable; }
html { background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); font-variant-numeric: tabular-nums; -webkit-text-size-adjust: 100%; }
/* 100dvh is the height the phone actually shows, browser bars included;
   plain 100vh is taller than that, and made short pages scroll. */
body { margin: 0; min-height: 100vh; min-height: 100dvh; }
a { color: inherit; text-decoration-color: var(--calm); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
code, kbd, pre { font-family: var(--mono); }

/* Type scale: 13, 15, 17, 22, and the headline. */
.small, .cname, .problem, .apps thead th, .tag { font-size: 13px; }
section > h2, .fold h2, .logs-head h2 { font-size: 17px; font-weight: 700; letter-spacing: -.005em; }
.headline { font-size: clamp(32px, 4.6vw, 52px); line-height: 1.08; font-weight: 750; letter-spacing: -.02em; margin: 0; max-width: 20ch; text-wrap: balance; }

/* The bar */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px var(--gutter); border-bottom: 1px solid var(--rule); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; text-decoration: none; margin: 0; }
/* The mark: a crescent moon, and the lamp beside it like the first star. */
.mark { width: 26px; height: 26px; flex: none; color: var(--ink); overflow: visible; }
.mark .moon { fill: currentColor; }
.mark .star { fill: var(--lamp); filter: drop-shadow(0 0 3px var(--glow)); }
.brand .word { font-size: 17px; font-weight: 750; letter-spacing: -.01em; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; justify-content: flex-end; }
/* Each link carries a line under it, drawn from the centre: half-way out and
   quiet under the pointer, full and lit on the page you are on. */
.nav a { position: relative; color: var(--dim); text-decoration: none; padding: 4px 0; }
.nav a:not(.who)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--lamp); transform: scaleX(0); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (hover: hover) {
  .nav a:hover { color: var(--ink); }
  .nav a:not([aria-current="page"]):hover::after { transform: scaleX(.5); background: var(--dim); }
  .nav a.who:hover .avatar { transform: scale(1.08); }
}
@media (prefers-reduced-motion: no-preference) {
  .nav a { transition: color .16s ease-out; }
  .nav a::after { transition: transform .22s cubic-bezier(.2, .7, .2, 1), background-color .16s ease-out; }
  .avatar { transition: background-color .16s ease-out, transform .16s ease-out; }
}
.nav-sep { width: 1px; height: 18px; background: var(--rule); }
.nav a.who { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--bg); background: var(--dim); }
.nav a.who[aria-current="page"] .avatar { background: var(--lamp); }
@media (hover: hover) { .nav a.who:hover .avatar { background: var(--lamp); } }

/* The next page is on its way */
.progress { position: fixed; top: 0; left: 0; height: 2px; width: 0; background: var(--lamp); z-index: 10; opacity: 0; }
body.loading .progress { opacity: 1; width: 85%; transition: width 8s cubic-bezier(.1, .7, .2, 1), opacity .2s; }

/* Buttons */
button { font: inherit; color: var(--button-ink); background: var(--button); border: 0; border-radius: 6px; padding: 9px 16px; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button.quiet { color: var(--dim); background: none; padding: 4px 6px; font-weight: 400; }
button.quiet:hover { color: var(--ink); filter: none; }
button.secondary { color: var(--ink); background: var(--raised); box-shadow: inset 0 0 0 1px var(--rule); font-weight: 600; }
button.secondary:hover { box-shadow: inset 0 0 0 1px var(--dim); filter: none; }
button.danger { background: var(--red); color: #fff; }
/* Stop takes something down, so it carries a little of the red its
   confirmation page asks with, where Restart and Start stay neutral. */
button.secondary.stop { color: var(--err-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--red) 55%, transparent); }
button.secondary.stop:hover { box-shadow: inset 0 0 0 1px var(--red); }
button.quiet.stop { color: color-mix(in srgb, var(--err-ink) 75%, var(--dim)); }
button.quiet.stop:hover { color: var(--err-ink); }
button:disabled { cursor: progress; opacity: .7; }
.cancel { color: var(--dim); }

/* The bar spans the window; the page is one frame, centred. Narrow pages
   read from the same left edge, in a shorter line. */
main, .crumbs, .logs { padding: 0 var(--gutter); max-width: var(--frame); margin-inline: auto; }
main.narrow > * { max-width: 684px; }
.crumbs { padding-top: 18px; color: var(--dim); }

/* The watch: one sentence, every stack as a square, the server's vitals */
.watch { padding: clamp(32px, 7vh, 72px) 0 28px; }
.headline.attention { color: var(--amber); }
.headline.down { color: var(--red); }
.sub { color: var(--dim); margin: 12px 0 0; max-width: 70ch; }
.warn-line { color: var(--amber); }
.sub:empty { display: none; }
.sub.where { margin-top: 6px; }
.sub.where code { font-size: 13px; color: var(--ink); overflow-wrap: anywhere; }
.sub.where .cname { margin-top: 2px; }
.strip { list-style: none; display: flex; flex-wrap: wrap; gap: 5px; padding: 0; margin: 26px 0 0; max-width: 760px; }
.cell { display: block; width: 16px; height: 16px; border-radius: 3px; background: var(--well); }
.cell.state-degraded { background: var(--amber); box-shadow: none; }
.cell.state-down { background: var(--red); box-shadow: none; }
.cell.state-stopped { background: none; box-shadow: inset 0 0 0 1.5px var(--calm); }
/* What the squares mean, with how many of each */
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 12px 0 0; color: var(--dim); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .cell { width: 10px; height: 10px; border-radius: 2px; }

/* Vitals: one slim row. The processor moves, so it gets a line; memory and
   disk are a question of how full, so they get a meter. */
.vitals-wrap { margin: 36px 0 0; padding-top: 20px; border-top: 1px solid var(--rule); }
.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px 56px; margin: 0; }
.vital { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: 2px 12px; margin: 0; }
.vital .meter { grid-column: 1 / -1; margin: 38px 0 0; }
.meter svg { display: block; width: 100%; height: 8px; overflow: visible; border-radius: 3px; }
.meter .track { fill: var(--raised); }
.meter .fill { fill: var(--well); }
.meter.warn .fill { fill: var(--amber); }
.meter .limit { stroke: var(--amber); stroke-width: 2; vector-effect: non-scaling-stroke; opacity: .8; }
.vital dt { color: var(--dim); }
.vital dd { margin: 0; }
.vital .reading { text-align: right; }
.vital .chart { grid-column: 1 / -1; }
.vital .chart .spark { width: 100%; height: 36px; display: block; }
.vital .chart { margin-top: 10px; }
.vital .trend { grid-column: 1 / -1; color: var(--dim); font-size: 13px; margin-top: 4px; }

.num { color: var(--ink); font-weight: 700; }
.reading .num { font-size: 22px; letter-spacing: -.01em; }
.of { color: var(--dim); }
.num.warn { color: var(--amber); }

/* Charts, and the readout under the pointer */
.spark { width: 120px; height: 28px; display: inline-block; overflow: visible; }
.spark polyline { fill: none; stroke: var(--dim); stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.spark line { stroke: var(--rule); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark line.mark { stroke: var(--amber); stroke-dasharray: 3 3; opacity: .7; }
.spark line.base { stroke: var(--rule); }
.spark[data-pts] { cursor: crosshair; touch-action: pan-y; }
.tip { position: fixed; z-index: 20; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: var(--raised); color: var(--ink);
  box-shadow: 0 0 0 1px var(--rule), 0 8px 24px var(--shadow); font-size: 13px; white-space: nowrap; }
.tip b { font-weight: 700; }
.tip span { color: var(--dim); margin-left: 6px; }
.tip-line { position: fixed; z-index: 19; pointer-events: none; width: 1px; background: var(--lamp); opacity: .8; }

/* Filter */
.filterrow { position: relative; max-width: 360px; margin: 8px 0 -10px; }
.filterrow input { width: 100%; font: inherit; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 34px 8px 12px; }
.filterrow input:focus { border-color: var(--lamp); outline: none; }
.filterrow kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 12px; color: var(--dim); border: 1px solid var(--rule); border-radius: 6px; padding: 0 5px; }
.filterrow input:focus + kbd, .filterrow input:not(:placeholder-shown) + kbd { display: none; }

/* Tables of stacks, containers, people */
section > h2 { margin: 34px 0 10px; }
.note { color: var(--dim); margin: -4px 0 12px; max-width: 70ch; }
table.apps { width: 100%; border-collapse: collapse; }
.apps th, .apps td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.apps thead th { color: var(--dim); font-weight: 400; padding-bottom: 6px; white-space: nowrap; }
.apps tbody th { font-weight: 700; width: 30%; }
.apps tbody th a { text-decoration: none; }
.apps tbody th a:hover { text-decoration: underline; }
.apps .n { text-align: right; padding-right: 0; padding-left: 12px; white-space: nowrap; }
.apps td.chart .num { display: inline-block; min-width: 5.5em; }
.apps td.chart .spark { vertical-align: middle; margin-left: 8px; }
.problem, .cname { display: block; font-weight: 400; }
.problem { color: var(--amber); }
.state-down .problem { color: var(--red); }
.cname { color: var(--dim); }
.sha { color: var(--dim); white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.sha .cname { font-family: var(--sans); }
.ctrs td.status { white-space: nowrap; }

.none { color: var(--dim); font-style: italic; }
tr.state-degraded th { box-shadow: inset 3px 0 0 var(--amber); padding-left: 12px; }
tr.state-down th { box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
tr.state-stopped th { box-shadow: inset 3px 0 0 var(--calm); padding-left: 12px; }
.apps td.acts { white-space: nowrap; text-align: right; padding-right: 0; width: 1%; }
.apps td.acts form { display: inline; margin: 0; }
.apps td.acts button.quiet { padding: 2px 6px; }
table.people tbody th { width: auto; }

/* Quiet sections fold away */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; margin: 34px 0 10px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary h2 { margin: 0; }
details.fold > summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid var(--dim); border-bottom: 1.5px solid var(--dim); transform: rotate(-45deg); }
details.fold[open]:not(.closing) > summary::before { transform: rotate(45deg) translate(-2px, -2px); }
details.fold > summary:hover h2 { color: var(--ink); }
.count { color: var(--dim); font-weight: 400; margin-left: 4px; }

/* Something changed state since the last look: one flash, then quiet */
@media (prefers-reduced-motion: no-preference) {
  tr.changed > * { animation: changed 2.4s ease-out; }
  .cell.changed { animation: pop .9s ease-out; }
  @keyframes changed { 0%, 30% { background: var(--flash); } 100% { background: transparent; } }
  @keyframes pop { 0% { transform: scale(1.8); } 100% { transform: scale(1); } }
  .cell { transition: transform .12s ease-out, background-color .6s, box-shadow .6s; }
  .cell:hover { transform: scale(1.25); }
  details.fold > summary::before { transition: transform .15s ease-out; }
  .banner.busy { animation: watch 1.6s ease-in-out infinite; }
  @keyframes watch { 50% { box-shadow: inset 3px 0 0 var(--glow); } }
}
@media (prefers-reduced-motion: reduce) { body.loading .progress { transition: none; width: 100%; } }

/* Moving between pages: one transition, the same everywhere. The bar holds
   still, since it is the same on every page; the page beneath fades out
   quickly and the next one settles in from a few pixels below. Done by the
   browser between full page loads (cross-document view transitions), so it
   needs no script; a browser without them simply loads the page as before.
   Off for anyone who asks for less motion. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  .bar { view-transition-name: bar; background: var(--bg); }
  ::view-transition-old(bar), ::view-transition-new(bar) { animation: none; }
  ::view-transition-old(root) { animation: 110ms ease-in both page-out; }
  ::view-transition-new(root) { animation: 220ms cubic-bezier(.2, .7, .2, 1) 50ms both page-in; }
  @keyframes page-out { to { opacity: 0; } }
  @keyframes page-in { from { opacity: 0; transform: translateY(8px); } }
}

/* Actions */
.stack-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 22px; }
.stack-actions form { margin: 0; }
.banner { margin: 18px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--raised); max-width: 72ch; }
.banner.busy { box-shadow: inset 3px 0 0 var(--lamp); }
.banner.done { box-shadow: inset 3px 0 0 var(--calm); }
.banner.failed { box-shadow: inset 3px 0 0 var(--red); color: var(--err-ink); }
.watch .error { margin: 18px 0 0; max-width: 72ch; }
.watch .note { margin: 14px 0 0; }
ol.plan { margin: 10px 0 0; padding-left: 1.4em; }
ol.plan li { padding: 2px 0; }
ul.actlog { list-style: none; padding: 0; margin: 0; max-width: 80ch; }
ul.actlog li { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
ul.actlog time { color: var(--dim); white-space: nowrap; }
ul.actlog li.failed span { color: var(--err-ink); }
ul.actlog li.busy span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); margin-right: 8px; vertical-align: middle; }

/* Logs */
.logs { margin: 40px auto 60px; }
.logs-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; }
.logs-head h2 { margin: 0; }
.controls { display: flex; gap: 18px; align-items: center; color: var(--dim); }
.controls select { font: inherit; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 2px 4px; margin-left: 6px; }
.controls input { accent-color: var(--lamp); }
pre.log { font: 12.5px/1.6 var(--mono); background: var(--raised); border-radius: 8px; padding: 14px 16px; margin: 12px 0 0; height: 60vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: inset 0 0 0 1px var(--rule); }
pre.log .t { color: var(--dim); margin-right: 12px; user-select: none; }
pre.log .err { color: var(--err-ink); }
pre.log .warn { color: var(--amber); }
.logs.fetching .logs-head h2::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 10px; border-radius: 50%; background: var(--lamp); vertical-align: middle; }

/* Forms: sign-in, account, users */
body.gate { display: grid; place-items: center; padding: 24px; }
.gate-box { width: min(100%, 400px); padding: 0; }
.gate-box .brand { margin-bottom: 36px; }
.gate-box h1 { font-size: 28px; font-weight: 750; margin: 0 0 22px; letter-spacing: -.015em; }
.gate-box form, .stack-form { display: grid; gap: 16px; }
.stack-form { max-width: 420px; gap: 14px; }
.gate-box label, .stack-form label, .inline-code label { display: grid; gap: 6px; color: var(--dim); }
.gate-box input, .stack-form input, .inline-code input, .copyrow input { font: inherit; color: var(--ink); background: var(--raised); border: 1px solid var(--rule); border-radius: 6px; padding: 10px 12px; }
.gate-box input:focus, .stack-form input:focus, .inline-code input:focus { border-color: var(--lamp); outline: none; }
.gate-box button, .stack-form button { justify-self: start; margin-top: 4px; }
.stack-form .small { margin: 0; color: var(--dim); }
.error { color: var(--red); background: color-mix(in srgb, var(--red) 10%, transparent); border-radius: 8px; padding: 10px 12px; margin: 0 0 18px; }
.steps { padding-left: 1.2em; display: grid; gap: 22px; }
.steps p { margin: 0 0 10px; }
.qr { background: #fff; padding: 10px; border-radius: 8px; image-rendering: pixelated; }
code.secret { color: var(--ink); word-break: break-all; }
.tag { display: inline-block; font-weight: 600; color: var(--bg); background: var(--dim); border-radius: 6px; padding: 0 6px; margin-left: 6px; vertical-align: 2px; }
ul.devices { list-style: none; padding: 0; margin: 0 0 16px; }
ul.devices li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
ul.devices form { margin: 0; }
.linkbox { margin-top: 20px; padding: 14px 16px; border-radius: 8px; background: var(--raised); box-shadow: inset 3px 0 0 var(--lamp); }
.linkbox p { margin: 0 0 10px; }
.copyrow { display: flex; gap: 8px; }
.copyrow input { flex: 1; min-width: 0; font-size: 13px; }
details.menu { position: relative; display: inline-block; text-align: left; }
details.menu summary { list-style: none; cursor: pointer; color: var(--dim); padding: 2px 6px; border-radius: 6px; }
details.menu summary::-webkit-details-marker { display: none; }
details.menu summary:hover, details.menu[open] summary { color: var(--ink); }
.menu-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: 280px; display: grid; gap: 14px; padding: 14px; border-radius: 8px; background: var(--raised); box-shadow: 0 0 0 1px var(--rule), 0 12px 32px var(--shadow); }
.inline-code { display: grid; gap: 8px; margin: 0; }
.inline-code button { justify-self: start; }
/* Sign out ends the account page, apart from the forms above it. */
.signout-here { margin: 40px 0 56px; padding-top: 24px; border-top: 1px solid var(--rule); }
.signout-here form { margin: 0; }
.inline-code .choices-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.menu-body input { background: var(--bg); }
/* Manage opens and closes: it says so with the same chevron as a fold. */
details.menu summary { display: inline-flex; align-items: center; gap: 8px; }
details.menu summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
details.menu[open] summary::after { transform: rotate(-135deg) translate(-1px, -1px); }
a.row-link { color: var(--dim); text-decoration: underline; text-decoration-color: var(--calm); padding: 2px 6px; border-radius: 6px; }
a.row-link:hover { color: var(--ink); }

/* Phones */
@media (max-width: 720px) {
  .nav { gap: 4px 14px; }
  .headline { max-width: none; }
  .vitals { grid-template-columns: 1fr; gap: 14px; }
  .apps thead { display: none; }
  .apps tr { display: grid; grid-template-columns: 1fr auto auto; gap: 0 14px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
  .apps th, .apps td { border: 0; padding: 2px 0; width: auto !important; }
  .apps td.sha, .apps td.n:not(.chart) { display: none; }
  .apps td.chart .spark { display: none; }
  .apps td.chart .num { min-width: 0; }
  .ctrs td:nth-child(2) { grid-column: 1 / -1; order: 9; color: var(--dim); font-size: 13px; }
  .ctrs td.acts { grid-column: 1 / -1; order: 10; text-align: left; }
  /* People: Manage sits under each person and opens in place, pushing
     what follows down instead of covering it. */
  .people tr { grid-template-columns: 1fr; }
  .people td:nth-child(2), .people td:nth-child(3) { color: var(--dim); font-size: 13px; }
  .people td.acts { text-align: left; padding-top: 4px; }
  .people details.menu { display: block; }
  .people details.menu summary, .people a.row-link { padding: 8px 10px; margin-left: -10px; }
  .people a.row-link { display: inline-block; }
  .people .menu-body { position: static; width: auto; margin: 6px 0 4px; box-shadow: inset 0 0 0 1px var(--rule); }
  ul.devices li { flex-wrap: wrap; }
  .stack-actions button { padding: 9px 12px; }
  .ctrs td.status { white-space: normal; }
  /* The bar: the moon alone, so the links get room and a thumb-sized height. */
  .nav-sep, .who-name, .bar .brand .word { display: none; }
  /* Stack pages: less air above the sentence, more width for the output. */
  .watch { padding-top: 20px; }
  .crumbs + main .watch { padding-top: 12px; }
  pre.log { padding: 10px 10px; font-size: 12px; }
  pre.log .t { margin-right: 8px; }
  pre.log .day { display: none; }
  .signout-here button { width: 100%; }
  .nav a { padding: 10px 0; }
  /* Vitals: three small columns, so the stacks start on the first screen. */
  .vitals-wrap { margin-top: 26px; padding-top: 16px; }
  .vitals { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
  .vital { grid-template-columns: 1fr; gap: 0; }
  .vital dt { font-size: 13px; }
  .vital .reading { text-align: left; }
  .reading .num { font-size: 17px; }
  .vital .of, .vital .trend { display: none; }
  .vital .chart { margin-top: 6px; }
  .vital .chart .spark { height: 24px; }
  .vital .meter { margin-top: 22px; }
  /* Row actions: big enough to tap. */
  .apps td.acts button.quiet { padding: 8px 10px; }
  .ctrs td.acts form:first-child button.quiet { margin-left: -10px; }
}

/* Alerts */
dl.facts { display: grid; gap: 10px; margin: 24px 0 0; max-width: 70ch; }
dl.facts div { display: grid; grid-template-columns: 13em 1fr; gap: 16px; }
dl.facts dt { color: var(--dim); }
dl.facts dd { margin: 0; }
code.cmd { display: inline-block; padding: 6px 10px; border-radius: 6px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--rule); user-select: all; }
ul.changes li span { white-space: pre-line; }
ul.changes .cell { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 10px; vertical-align: 0; }
ul.changes li.bad > span { color: var(--ink); }
ul.changes li.good > span { color: var(--dim); }
@media (max-width: 720px) { dl.facts div { grid-template-columns: 1fr; gap: 2px; } }
fieldset.choices { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
fieldset.choices legend { color: var(--dim); padding: 0; margin-bottom: 6px; }
label.choice { display: flex !important; align-items: baseline; gap: 10px; color: var(--ink) !important; padding: 10px 12px; border-radius: 6px; background: var(--raised); box-shadow: inset 0 0 0 1px var(--rule); cursor: pointer; }
label.choice:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--lamp); }
label.choice input { accent-color: var(--lamp); }
label.choice .cname { display: inline; }
.code-to-send { max-width: 420px; margin: 4px 0 10px; }
.code-to-send input { font-family: var(--mono); font-size: 16px; letter-spacing: .04em; }
