/* uppies styles. Every colour, size and space comes from tokens.css. */

*, *::before, *::after { box-sizing: border-box; }

/* no rubber-band bounce past the ends of the page, the sidebar or a scrolling table */
html, body, .sidebar, .table-scroll, .heat-scroll, dialog { overscroll-behavior: none; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-body);
  line-height: var(--leading-body);
}
body.admin { font-size: var(--text-ui); line-height: var(--leading-ui); }

.column {
  max-inline-size: var(--content-width);
  margin-inline: auto;
  padding: var(--space-6) var(--space-4) var(--space-8);
}

h1, h2, h3 { margin: 0; font-weight: var(--weight-semibold); text-wrap: balance; }
h1 { font-size: var(--text-title); letter-spacing: var(--tracking-heading); }
h2, h3 { font-size: var(--text-heading); }
/* section headings on the public pages sit over body text of the same size
   as --text-heading, so they take one step more. the scale has no value
   between 17 and 24, so this one is named here. */
:root { --text-section: 20px; }
.column h2 { font-size: var(--text-section); letter-spacing: var(--tracking-heading); }
section, .card, .incident { margin-block-start: var(--space-6); }
section > h2, .title-row { margin-block-end: var(--space-3); }
p { margin-block: var(--space-2); }
a { color: inherit; text-underline-offset: 0.2em; }
@media (hover: hover) { a:hover { color: var(--accent); } }
strong { font-weight: var(--weight-semibold); }

.muted, .meta, .hint { color: var(--muted); }
.meta, .hint { font-size: var(--text-sm); }
.hint { margin-block: var(--space-1) 0; }
p.hint, p.muted { max-inline-size: 75ch; }

.wordmark, .wordmark-title { font-family: var(--font-rounded); }
.wordmark { font-size: var(--text-heading); font-weight: var(--weight-semibold); text-decoration: none; }
.wordmark-title { font-size: var(--text-display); letter-spacing: var(--tracking-display); line-height: var(--leading-display); }

/* sign-in and setup: one card in the middle of the screen */
/* card pages: the art fills the screen or a column, the side holds the card */
.auth { min-block-size: 100vh; display: grid; background: var(--surface); }
.auth-side { position: relative; display: grid; place-content: center; justify-items: center; gap: var(--space-4); padding: var(--space-4); }
.auth-card { inline-size: min(100vw - var(--space-6), 360px); padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-surface); background: var(--background); }
.auth-art { overflow: hidden; background: var(--surface); }
.auth-art img { display: block; inline-size: 100%; block-size: 100%; object-fit: cover; }
.auth-art-gradient { background:
  radial-gradient(circle at 20% 15%, color-mix(in oklab, var(--accent) 42%, transparent), transparent 60%),
  radial-gradient(circle at 85% 80%, color-mix(in oklab, var(--status-info) 30%, transparent), transparent 55%),
  radial-gradient(circle at 60% 40%, color-mix(in oklab, var(--status-success) 18%, transparent), transparent 50%),
  var(--surface); }
.auth-centered .auth-art { position: fixed; inset: 0; }
/* over art the link under the card needs its own ground to stay readable */
.auth-centered .auth-art:not(.auth-art-plain) + .auth-side .auth-foot { padding: var(--space-1) var(--space-3); border-radius: var(--radius-round); background: var(--background); }
/* split: the form takes two fifths on the left, the art the other three */
.auth-split { grid-template-columns: 2fr 3fr; }
.auth-split .auth-side { grid-area: 1 / 1; background: var(--background); border-inline-end: 1px solid var(--border); }
.auth-split .auth-art { grid-area: 1 / 2; }
.auth-split .auth-card { padding: 0; border: 0; background: none; }
@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-split .auth-art { display: none; }
  .auth-split .auth-side { border-inline-end: 0; }
}
.auth-brand { display: flex; align-items: center; gap: var(--space-3); margin: 0 0 var(--space-5); }
.auth-brand .wordmark { font-size: var(--text-title); letter-spacing: var(--tracking-heading); }
/* the logo takes the wordmark's type size, so .logo makes it 1.5 lines of it tall */
.auth-brand > .logo { font-size: var(--text-title); }
.auth-card .form { margin-block-start: var(--space-5); }
/* the sign-in form is often used on a phone, so its fields and button are touch sized for every pointer */
.auth-card input { min-block-size: var(--control-height-touch); font-size: var(--text-body); }
.button.wide { inline-size: 100%; block-size: var(--control-height-touch); font-size: var(--text-body); }
.auth-foot { margin: 0; }
.auth-card h1 { margin-block-end: var(--space-1); }
.index-list { margin-block-start: var(--space-4); }
.index-footer { overflow-wrap: anywhere; }
/* the public list as a page: one row or one card per status page */
.index-rows, .index-cards { list-style: none; margin: var(--space-5) 0 0; padding: 0; }
.index-rows > li + li { border-block-start: 1px solid var(--border); }
.index-uptime { padding-block-end: var(--space-3); }
.index-uptime .strip { block-size: var(--space-5); }
.index-item { display: flex; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); color: var(--ink); text-decoration: none; }
.index-rows .index-item { padding-inline: 0; }
@media (hover: hover) {
  .index-rows .index-item:hover { color: var(--ink); }
  .index-rows .index-item:hover .index-name { color: var(--accent); text-decoration: underline; }
  .index-cards .index-item:hover { background: var(--hover); }
}
.index-logo { flex: none; display: grid; place-items: center; inline-size: var(--space-6); block-size: var(--space-6); border-radius: var(--radius-control); overflow: hidden; }
.index-logo img { inline-size: 100%; block-size: 100%; object-fit: contain; }
.index-copy { flex: 1; display: grid; gap: var(--space-0-5); min-inline-size: 0; }
.index-name { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.index-tagline { color: var(--muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.index-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.index-state { white-space: nowrap; }
.index-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--space-8) * 3), 1fr)); gap: var(--space-3); }
.index-cards .index-item { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "logo state" "copy copy" "count count"; align-content: start; block-size: 100%; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); }
.index-cards .index-logo { grid-area: logo; }
.index-cards .index-state { grid-area: state; justify-self: end; }
.index-cards .index-copy { grid-area: copy; margin-block-start: var(--space-2); }
/* a card without a logo has no empty first row: its name sits beside its state */
.index-cards .index-item:not(:has(.index-logo)) { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy state" "count count"; }
.index-cards .index-item:not(:has(.index-logo)) .index-copy { margin-block-start: 0; }
.index-cards .index-item:not(:has(.index-logo)) .index-state { align-self: start; }
.index-cards .index-count { grid-area: count; }
@media (max-width: 520px) {
  .index-rows .index-count { display: none; }
}
.index-list .row-link { align-items: center; padding-block: var(--space-3); }
@media (hover: hover) { .index-list .row-link:hover { color: var(--accent); } }

/* admin shell: a fixed sidebar and a wide content column.
   256px and 1088px follow measured dashboards and have no token yet. */
:root { --sidebar-width: 256px; --content-wide: 1088px; }
.shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-block-size: 100vh; }
.sidebar {
  position: sticky;
  inset-block-start: 0;
  block-size: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-3);
  border-inline-end: 1px solid var(--border);
  background: var(--surface);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; }
.sidebar-head .sidebar-menu { display: none; }
.sidebar-links { display: flex; flex: 1; flex-direction: column; gap: var(--space-4); }
.sidebar .wordmark { display: flex; align-items: center; min-block-size: var(--row-height); padding-inline: var(--space-2); }

/* collapsed, the sidebar is a rail of icons. nothing may move or wrap while
   it slides: every label stays on one line and only fades, the sidebar clips
   what no longer fits, and each icon sits at the same place in both states
   (12px sidebar padding + 8px item padding centres a 16px icon in the 56px rail). */
:root { --rail-width: 56px; }
.sidebar { overflow-x: hidden; }
.nav-item, .nav-heading, .sidebar .wordmark { white-space: nowrap; }
.nav-label { transition: opacity var(--motion-fast) var(--ease-out); }
.sidebar-head .icon-button { flex: none; margin-inline-start: auto; font: inherit; }
[data-sidebar="rail"] .shell { grid-template-columns: var(--rail-width) minmax(0, 1fr); }
[data-sidebar="rail"] .nav-label { opacity: 0; pointer-events: none; }
/* out of the flow and hidden, so the invisible wordmark cannot sit on top of the toggle and take its clicks */
[data-sidebar="rail"] .sidebar .wordmark { position: absolute; visibility: hidden; }
[data-sidebar="rail"] .sidebar-head .icon-button { margin-inline: auto; }
/* the collapsed sidebar has no room for the section's name, so a line stands where it would be */
.nav-heading { position: relative; }
.nav-heading::after { content: ""; position: absolute; inset-inline: var(--space-2); inset-block-start: 50%; border-block-start: 1px solid var(--border); opacity: 0; transition: opacity var(--motion-fast) var(--ease-out); }
[data-sidebar="rail"] .nav-heading::after { opacity: 1; }
.nav-logo { flex: none; inline-size: var(--icon-size); block-size: var(--icon-size); border-radius: var(--radius-inner); object-fit: contain; }

/* icons take the size and colour of the text they sit in */
.sidebar-symbols { position: absolute; }
.icon { flex: none; inline-size: var(--icon-size); block-size: var(--icon-size); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button {
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: var(--control-height);
  block-size: var(--control-height);
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--muted);
  cursor: pointer;
}
@media (hover: hover) { .icon-button:hover { background: var(--hover); color: var(--ink); } }
.with-icon, table.dense tbody th a.with-icon { display: inline-flex; align-items: flex-start; gap: var(--space-2); }
.with-icon .icon { margin-block-start: var(--space-0-5); }
.with-icon .icon, .nav-item .icon, .channel .icon { color: var(--muted); }

/* dialogs: one raised surface over a dimmed page */
dialog {
  inline-size: min(100% - var(--space-6), 440px);
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--elevated);
  color: var(--ink);
  box-shadow: var(--shadow-popover);
}
dialog::backdrop { background: var(--backdrop); }
dialog > h2 { margin-block-end: var(--space-2); }
dialog .form, dialog form.actions { margin-block-start: var(--space-4); }
.nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-0-5); }
.nav-list > li { min-inline-size: 0; }
.nav-heading { margin: var(--space-4) 0 var(--space-1); padding-inline: var(--space-2); color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  inline-size: 100%;
  min-block-size: var(--row-height);
  padding: 0 var(--space-2);
  border: 0;
  border-radius: var(--radius-control);
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--motion-fast) var(--ease-out);
}
@media (hover: hover) { .nav-item:hover { background: var(--hover); color: var(--ink); } }
.nav-item[aria-current] { background: var(--active); font-weight: var(--weight-semibold); }
.nav-name { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-count { font-size: var(--text-xs); white-space: nowrap; }
.nav-add, .nav-empty { color: var(--muted); }
.nav-empty { padding: var(--space-1) var(--space-2); font-size: var(--text-sm); }
.sidebar-foot { margin-block-start: auto; display: grid; gap: var(--space-0-5); }
.sidebar-foot form { margin: 0; }
.content { position: relative; inline-size: 100%; max-inline-size: var(--content-wide); margin-inline: auto; padding: var(--space-5) var(--space-6) var(--space-8); }
.content > section { margin-block-start: var(--space-6); }
.skip { position: absolute; inset-inline-start: var(--space-2); inset-block-start: var(--space-2); z-index: 1; padding: var(--space-1) var(--space-2); background: var(--background); translate: 0 -200%; }
.skip:focus { translate: 0 0; }

/* settings: one narrow column of bordered groups. each row has its label and
   help on the left and its control on the right, after the settings of mux. */
.settings { inline-size: 100%; }
/* tabs: one rule under the bar, and the open tab carries it in ink */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-block: var(--space-4) var(--space-2); border-block-end: 1px solid var(--border); }
.tabs a { display: inline-flex; align-items: center; min-block-size: calc(var(--control-height) + var(--space-1)); margin-block-end: -1px; border-block-end: 2px solid transparent; color: var(--muted); font-weight: var(--weight-semibold); text-decoration: none; }
@media (hover: hover) { .tabs a:hover { color: var(--ink); border-block-end-color: var(--border-strong); } }
.tabs a[aria-current] { color: var(--ink); border-block-end-color: var(--ink); }
.pane[hidden] { display: none; }
.pane > .group-title:first-child { margin-block-start: var(--space-4); }
.group-title { margin: var(--space-5) 0 var(--space-2); color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-semibold); scroll-margin-block-start: var(--space-4); }
.group-title h2 { color: inherit; font: inherit; }
.group { border: 1px solid var(--border); border-radius: var(--radius-card); }
.group > * + * { border-block-start: 1px solid var(--border); }
.group .empty { padding: var(--space-4); }
.srow { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); min-block-size: var(--control-height-touch); padding: var(--space-2) var(--space-3); font-weight: var(--weight-regular); }
label.srow { cursor: pointer; }
.srow-copy { display: grid; gap: var(--space-0-5); flex: 1 1 260px; min-inline-size: 0; font-weight: var(--weight-regular); }
.srow-copy > :first-child { color: var(--ink); font-size: var(--text-ui); font-weight: var(--weight-regular); }
.srow-copy small { color: var(--muted); font-size: var(--text-sm); line-height: var(--leading-body); overflow-wrap: anywhere; }
.srow-control { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); flex: 0 1 auto; min-inline-size: 0; margin-inline-start: auto; }
.srow-control > input:not([type="checkbox"], [type="file"], [type="radio"]), .srow-control > select { inline-size: 240px; max-inline-size: 100%; }
.srow-control > .number-field { font-variant-numeric: tabular-nums; }
.srow-control form { margin: 0; }
.srow-problem { flex-basis: 100%; }
.srow[data-stack] { align-items: stretch; flex-direction: column; }
.srow[data-stack] > .srow-copy { flex: none; }
.savebar { display: flex; gap: var(--space-2); margin-block-start: var(--space-3); }
.push-end { margin-inline-start: auto; }
.facts { display: flex; flex-wrap: wrap; gap: var(--space-1-5) var(--space-4); margin: var(--space-2) 0 0; padding: 0; list-style: none; color: var(--muted); font-size: var(--text-sm); }
.facts strong { color: var(--ink); }
.update-row { display: grid; gap: var(--space-1); padding: var(--space-3); }
.update-row .update-body { font-size: var(--text-ui); }
/* an update's edit button sits at the end of its heading line. negative
   margins make it take one line of text in the layout, so the heading keeps
   its own height and stays at the top. the button still draws and clicks at
   full size. */
.update-head > .update-edit { align-self: center; margin-block: calc((1lh - var(--control-height)) / 2); margin-inline-start: auto; }
/* the list of all monitors is arranged by dragging: a row inside or between
   categories, a category by its name. a category with no rows shows its note. */
[data-order] [data-drag="row"] { cursor: grab; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-1); }
[data-order] .dragging { opacity: 0.5; }
.order-grip { display: inline-grid; place-items: center; margin-inline-end: var(--space-1); color: var(--muted); cursor: grab; vertical-align: middle; }
tbody:has(> [data-drag]) > .empty-row { display: none; }
/* the editor of a status page: its controls on the left, the page itself on the right */
/* the page is the two panes and nothing else: the left one holds the page's
   own heading and every control and scrolls, the right one is the preview
   from the top of the window to the bottom */
.content:has(.editor) { max-inline-size: none; padding: 0; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: start; }
.editor-controls { padding: var(--space-5) var(--space-5) var(--space-8) var(--space-6); }
.editor-preview { position: sticky; inset-block-start: 0; block-size: 100vh; padding: var(--space-3) var(--space-3) var(--space-3) 0; }
.preview { display: block; inline-size: 100%; block-size: 100%; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--background); }
.editor-group { margin-block-start: var(--space-4); }
.editor-group-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.editor-group-head h3 { margin: 0; color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.editor-list { list-style: none; margin: var(--space-2) 0 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-card); overflow: hidden; }
.editor-list > .empty-row { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); }
.editor-list:has(> [data-drag]) > .empty-row { display: none; }
.editor-add > input { flex: 1; min-inline-size: 0; }
.editor-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--space-2) var(--space-3); padding: var(--space-2) var(--space-3); background: var(--background); }
.editor-row + .editor-row { border-block-start: 1px solid var(--border); }
.editor-grip { display: grid; place-items: center; color: var(--muted); cursor: grab; }
.editor-name { display: grid; gap: var(--space-0-5); min-inline-size: 0; }
.editor-name > a { color: var(--ink); font-weight: var(--weight-semibold); text-decoration: none; overflow-wrap: anywhere; }
.editor-moves { display: flex; gap: var(--space-0-5); }
.editor-look { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.editor-look > .select, .editor-look > select { flex: 1 1 0; inline-size: auto; min-inline-size: 0; }
.editor-look .select-button { min-inline-size: 0; }
.editor-status { flex-basis: 100%; }
@media (pointer: coarse) { .editor-status { min-block-size: var(--control-height-touch); } }
.editor-controls > section { margin-block-start: var(--space-6); }
.editor-add { display: flex; gap: var(--space-2); margin-block-start: var(--space-3); }
.editor-add > .select, .editor-add > select { flex: 1; min-inline-size: 0; }
@media (max-width: 1100px) {
  .editor { grid-template-columns: minmax(0, 1fr); }
  .editor-preview { position: static; block-size: 80vh; padding: var(--space-3); }
}
/* with script a form marked data-autosave saves itself, so its save button goes */
.has-script form[data-autosave] .savebar > button[type="submit"] { display: none; }
.toast { position: fixed; inset-block-end: var(--space-4); inset-inline-end: var(--space-4); z-index: 10; margin: 0; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-round); background: var(--elevated); box-shadow: var(--shadow-popover); color: var(--ink); font-size: var(--text-ui); opacity: 0; translate: 0 var(--space-2); pointer-events: none; transition: opacity var(--motion-fast) var(--ease-out), translate var(--motion-fast) var(--ease-out); }
.toast-shown { opacity: 1; translate: 0 0; }
.toast-failed { border-color: var(--status-danger); color: var(--status-danger); }
.checks { display: grid; gap: var(--space-1); }

/* a checkbox drawn as a switch */
input[type="checkbox"].switch { appearance: none; position: relative; flex: none; inline-size: var(--switch-width); block-size: var(--switch-height); margin: 0; border-radius: var(--radius-round); background: var(--border-control); cursor: pointer; transition: background var(--motion-fast) var(--ease-out); translate: none; }
input[type="checkbox"].switch::before { content: ""; position: absolute; inset: var(--space-0-5); inline-size: calc(var(--switch-height) - var(--space-1)); border-radius: var(--radius-round); background: var(--background); transition: translate var(--motion-fast) var(--ease-out); }
input[type="checkbox"].switch:checked { background: var(--accent); }
input[type="checkbox"].switch:checked::before { translate: calc(var(--switch-width) - var(--switch-height)) 0; }

/* radio buttons drawn as one segmented control */
.segmented { display: inline-flex; padding: var(--space-0-5); border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--surface); }
.segmented label { position: relative; font-weight: var(--weight-regular); cursor: pointer; }
.segmented input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.segmented span { display: inline-flex; align-items: center; min-block-size: var(--control-height-sm); padding-inline: var(--space-2); border-radius: var(--radius-inner); }
.segmented input:checked + span { background: var(--background); box-shadow: 0 0 0 1px var(--border-strong); font-weight: var(--weight-semibold); }
.segmented input:focus-visible + span { outline: var(--focus-width) solid var(--focus-color); outline-offset: var(--focus-offset); }

/* radio buttons drawn as colour swatches. the colours match what the status page will use. */
.swatches { display: flex; flex-wrap: wrap; gap: var(--space-1-5); }
.swatch { position: relative; display: inline-flex; align-items: center; justify-content: center; inline-size: var(--control-height-sm); block-size: var(--control-height-sm); border-radius: var(--radius-round); background: light-dark(oklch(0.45 0.075 var(--hue)), oklch(0.8 0.075 var(--hue))); cursor: pointer; }
.swatch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.swatch:has(input:checked) { outline: var(--focus-width) solid var(--ink); outline-offset: var(--focus-offset); }
.swatch:has(input:focus-visible) { outline-color: var(--focus-color); }
/* a custom hue has no class of its own, so its colour is drawn by an svg circle */
.swatch-custom { background: none; }
.swatch-custom svg { inline-size: 100%; block-size: 100%; }
.swatch-25 { --hue: 25; }
.swatch-55 { --hue: 55; }
.swatch-85 { --hue: 85; }
.swatch-150 { --hue: 150; }
.swatch-200 { --hue: 200; }
.swatch-245 { --hue: 245; }
.swatch-290 { --hue: 290; }
.swatch-330 { --hue: 330; }
.visually-hidden { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.list-intro { margin-block-end: var(--space-5); }
.table-search { margin-block-end: var(--space-3); }
.table-search:not([hidden]) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
.table-search > input { flex: 1 1 calc(var(--space-8) * 3); min-inline-size: 0; inline-size: auto; }
.table-search .hint { flex: 0 0 100%; margin: 0; }
.table-search .hint:empty { display: none; }
.table-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); max-inline-size: 100%; }
.table-filters .field { grid-template-columns: minmax(0, 1fr); inline-size: calc(var(--space-8) * 2 + var(--space-4)); min-inline-size: 0; max-inline-size: 100%; }
.table-filters .select-button { background: var(--surface); }
.table-filters .select-list { max-inline-size: calc(100vw - var(--space-4)); }
.table-filters .select-list [role="option"] { display: block; align-content: center; overflow: hidden; text-overflow: ellipsis; }
.table-filters .button[hidden] { display: none; }
@media (max-width: 520px) {
  .table-filters { inline-size: 100%; }
  .table-filters .field { flex: 0 0 calc((100% - var(--space-3)) / 2); }
}
[data-filtered] .order-grip { visibility: hidden; }

/* overview */
.panel { border: 1px solid var(--border); border-radius: var(--space-2); }
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: var(--space-4) 0 0; border: 1px solid var(--border); border-radius: var(--space-2); }
.stat { padding: var(--space-3) var(--space-4); border-inline-start: 1px solid var(--border); }
.stat:first-child { border-inline-start: 0; }
.stat dt { color: var(--muted); font-size: var(--text-sm); }
.stat dd { margin: var(--space-1) 0 0; }
.stat-value { font-size: var(--text-title); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; line-height: var(--leading-display); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li + li { border-block-start: 1px solid var(--border); }
.list-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-2) var(--space-3); text-decoration: none; }
@media (hover: hover) { a.list-row:hover { background: var(--surface); color: inherit; } }
.list-row { flex-wrap: wrap; }
.list-row .state { white-space: normal; align-items: baseline; overflow-wrap: anywhere; }
.list-row .mark { translate: 0 var(--space-0-5); }
.list-note { overflow-wrap: anywhere; text-align: end; }
.empty { margin: 0; padding: var(--space-5) var(--space-4); color: var(--muted); }
.list form { margin: 0; }
.panel.list-row { align-items: center; }
table.dense .cell-note { margin-block-start: var(--space-0-5); }
.monitor-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin: var(--space-1) 0 0; padding: 0; list-style: none; }
.monitor-tags li { max-inline-size: 22ch; overflow: hidden; padding-inline: var(--space-1-5); border-radius: var(--radius-inner); background: var(--surface); text-overflow: ellipsis; white-space: nowrap; }
/* the icon is part of the name, so what stands under the name starts at the name line's left edge */
/* a name is centred in its row, and what stands under it sits close to it:
   the link is taller than its text so that it stays an easy target */
table.dense tbody th a.with-icon {
  --icon-size: var(--text-sm);
  position: relative;
  display: inline-block;
  max-inline-size: min(26ch, 45vw);
  padding-inline-start: calc(var(--icon-size) + var(--space-1-5));
}
table.dense tbody th a.with-icon > :is(.icon, .nav-logo) {
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: 50%;
  margin-block-start: 0;
  translate: 0 -50%;
}
table.dense tbody th a.with-icon + .cell-note { margin-block-start: calc(-1 * var(--space-0-5)); }
table.dense .grip-cell { inline-size: var(--space-5); padding-inline-end: 0; }
table.dense td.grip-cell .order-grip { display: grid; justify-content: start; margin: 0; }
table.dense td time { white-space: nowrap; }
table.dense th, table.dense td { padding: var(--space-1-5) var(--space-3); vertical-align: middle; }
table.dense tbody tr:last-child > * { border-block-end: 0; }
@media (hover: hover) { table.dense tbody tr:hover { background: var(--surface); } }
table.dense thead th, table.dense tbody th { font-weight: var(--weight-regular); }
table.dense thead th { position: relative; }
table.dense tbody th a, .quiet-link { display: inline-block; min-block-size: var(--target-min); align-content: center; text-decoration: none; }
@media (hover: hover) { table.dense tbody th a:hover { text-decoration: underline; } }
.quiet-link { min-inline-size: var(--target-min); color: var(--muted); }
@media (hover: hover) { .quiet-link:hover { text-decoration: underline; } }
.strip.mini { inline-size: calc(var(--space-8) * 2 + var(--space-5)); block-size: var(--space-4); }

@media (max-width: 860px) {
  .sidebar-head .icon-button { display: none; }
  [data-sidebar="rail"] .nav-label { opacity: 1; pointer-events: auto; }
  [data-sidebar="rail"] .nav-heading::after { opacity: 0; }
  [data-sidebar="rail"] .sidebar .wordmark { position: static; visibility: visible; }
  .shell { display: block; }
  .sidebar { position: static; block-size: auto; gap: 0; padding-block: 0; border-inline-end: 0; border-block-end: 1px solid var(--border); }
  .sidebar-head .wordmark { min-inline-size: 0; min-block-size: var(--control-height-touch); }
  .sidebar-head .nav-label { overflow: hidden; text-overflow: ellipsis; }
  .has-script .sidebar-head .sidebar-menu { display: inline-flex; flex: none; block-size: var(--control-height-touch); border-color: transparent; }
  .sidebar-menu[aria-expanded="true"] .icon { rotate: 180deg; }
  .has-script .sidebar:has(.sidebar-menu[aria-expanded="false"]) .sidebar-links { display: none; }
  .sidebar-links { padding-block: var(--space-2) var(--space-3); }
  .content { padding: var(--space-4); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { border-inline-start: 0; border-block-start: 1px solid var(--border); }
  .stats-overview .stat:first-child { grid-column: 1 / -1; border-block-start: 0; }
  .stats-overview .stat:nth-child(2n+3) { border-inline-start: 1px solid var(--border); }
}

.crumbs a { display: inline-block; min-block-size: var(--target-min); align-content: center; }
.crumbs { margin-block-end: var(--space-2); }
.title-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }

/* controls */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  block-size: var(--control-height);
  padding-inline: var(--space-3);
  border: 1px solid var(--control-fill);
  border-radius: var(--radius-control);
  background: var(--control-fill);
  color: var(--control-ink);
  font: inherit;
  font-size: var(--text-ui);
  font-weight: var(--weight-semibold);
  line-height: 1;
  gap: var(--space-1-5);
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--motion-fast) var(--ease-out);
}
@media (hover: hover) { .button:hover { opacity: 0.85; color: var(--control-ink); } }
.button.quiet { background: transparent; color: var(--ink); border-color: var(--border-control); }
@media (hover: hover) { .button.quiet:hover { background: var(--hover); color: var(--ink); opacity: 1; } }
.button.danger { background: var(--status-danger); border-color: var(--status-danger); color: var(--background); }

.form { display: grid; gap: var(--space-4); }
.form.narrow { max-inline-size: 420px; }
.field { display: grid; gap: var(--space-1); }
label, legend { font-size: var(--text-ui); font-weight: var(--weight-semibold); }
input:not([type="checkbox"]), select, textarea {
  inline-size: 100%;
  min-block-size: var(--control-height);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  background: var(--elevated);
  color: var(--ink);
  font: inherit;
  font-size: var(--text-ui);
}
textarea { resize: vertical; }
/* the browser's own arrow sits too close to the edge, so selects draw a chevron with room around it */
select {
  appearance: none;
  padding-inline-end: var(--space-6);
  background-image: url("chevron-light.svg");
  background-repeat: no-repeat;
  background-position: right var(--space-2) center;
  background-size: var(--icon-size);
}
@media (prefers-color-scheme: dark) { select { background-image: url("chevron-dark.svg"); } }
/* with script, a select becomes a button and a list drawn by the page */
.select { position: relative; display: inline-grid; grid-template-columns: minmax(0, 1fr); inline-size: 100%; }
.srow-control > .select { inline-size: 240px; max-inline-size: 100%; }
.select-native { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
.select-button { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); inline-size: 100%; min-block-size: var(--control-height); padding: var(--space-1) var(--space-2); border: 1px solid var(--border-control); border-radius: var(--radius-control); background: var(--elevated); color: var(--ink); font: inherit; font-size: var(--text-ui); text-align: start; cursor: pointer; transition: border-color var(--motion-fast) var(--ease-out); }
.select-button[aria-expanded="true"] { border-color: var(--ink); }
@media (hover: hover) { .select-button:hover { border-color: var(--ink); } }
.select-button[aria-invalid="true"] { border-color: var(--status-danger); }
.select-button .icon { flex: none; color: var(--muted); transition: rotate var(--motion-fast) var(--ease-out); }
.select-button[aria-expanded="true"] .icon { rotate: 180deg; }
.select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-list { position: fixed; inset: auto; margin: 0; padding: var(--space-1); max-block-size: calc(var(--space-8) * 4); overflow-y: auto; overscroll-behavior: contain; list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--elevated); box-shadow: var(--shadow-popover); color: var(--ink); font-size: var(--text-ui); }
.select-list:popover-open { animation: tip var(--motion-fast) var(--ease-out); }
.select-list [role="option"] { display: flex; align-items: center; min-block-size: var(--control-height); padding-inline: var(--space-2); border-radius: var(--radius-control); cursor: pointer; white-space: nowrap; }
.select-list [role="option"].active { background: var(--hover); }
.select-list [role="option"][aria-selected="true"] { font-weight: var(--weight-semibold); }
/* with script, a file field is a button and the name of the chosen file */
.file { display: inline-flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); min-inline-size: 0; }
input[type="file"].file-native { position: absolute; inline-size: 1px; min-block-size: 0; block-size: 1px; overflow: hidden; clip-path: inset(50%); }
.file-native:focus-visible + .button { outline: 2px solid var(--accent); outline-offset: 2px; }
.file-native[aria-invalid="true"] + .button { border-color: var(--status-danger); }
.file .button { cursor: pointer; }
.file-name { color: var(--muted); font-size: var(--text-ui); overflow-wrap: anywhere; }
.file-chosen .file-name { color: var(--ink); }
/* with script, a date and time field is a button and a panel with a month in it */
.datetime { position: relative; display: grid; }
.datetime-button[aria-expanded="true"] .icon { rotate: none; }
.select-value.placeholder { color: var(--muted); }
.datetime-panel { position: fixed; inset: auto; margin: 0; padding: var(--space-3); border: 1px solid var(--border-strong); border-radius: var(--radius-card); background: var(--elevated); box-shadow: var(--shadow-popover); color: var(--ink); font-size: var(--text-ui); }
.datetime-panel:popover-open { display: grid; gap: var(--space-2); animation: tip var(--motion-fast) var(--ease-out); }
.datetime-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.datetime-month { font-weight: var(--weight-semibold); }
.datetime-grid { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.datetime-grid th { inline-size: var(--space-6); block-size: var(--space-5); padding: 0; color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-regular); text-align: center; }
.datetime-grid td { padding: 0; }
.datetime-day { display: grid; place-items: center; inline-size: var(--space-6); block-size: var(--space-6); padding: 0; border: 1px solid transparent; border-radius: var(--radius-control); background: none; color: var(--ink); font: inherit; cursor: pointer; }
@media (hover: hover) { .datetime-day:hover { background: var(--hover); } }
.datetime-day.today { border-color: var(--border-strong); }
.datetime-day[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--background); font-weight: var(--weight-semibold); }
.datetime-time { display: flex; align-items: center; gap: var(--space-1-5); padding-block-start: var(--space-2); border-block-start: 1px solid var(--border); color: var(--muted); }
.datetime-time input { inline-size: calc(var(--space-6) + var(--space-2)); text-align: center; font-variant-numeric: tabular-nums; }
.datetime-time .button { margin-inline-start: auto; }
/* a tick box drawn by the page: checked fills the middle with the accent */
input[type="checkbox"]:not(.switch) { appearance: none; flex: none; inline-size: var(--space-4); block-size: var(--space-4); margin: 0; border: 1px solid var(--border-control); border-radius: var(--space-1); background: var(--elevated); cursor: pointer; transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }
@media (hover: hover) { input[type="checkbox"]:not(.switch):hover { border-color: var(--ink); } }
input[type="checkbox"]:not(.switch):checked { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px var(--elevated); }
/* number fields are typed into, so the browser's stepper arrows go */
input[type="number"] { appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { appearance: none; margin: 0; }
/* the file field keeps the browser's behaviour and takes the page's look */
input[type="file"] { padding: 0; border: 0; background: none; color: var(--muted); cursor: pointer; }
input[type="file"]::file-selector-button { margin-inline-end: var(--space-2); min-block-size: var(--control-height); padding: var(--space-1) var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-control); background: transparent; color: var(--ink); font: inherit; font-size: var(--text-ui); font-weight: var(--weight-semibold); cursor: pointer; transition: background-color var(--motion-fast) var(--ease-out); }
@media (hover: hover) { input[type="file"]::file-selector-button:hover { background: var(--hover); } }
input[type="file"][aria-invalid="true"]::file-selector-button { border-color: var(--status-danger); }
#custom_css { font-family: var(--font-mono); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--status-danger); }
fieldset { margin: 0; padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); display: grid; gap: var(--space-4); }
legend { padding-inline: var(--space-1); }
.check { display: flex; gap: var(--space-2); align-items: center; min-block-size: var(--target-min); font-weight: var(--weight-regular); }
.token-permissions { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }
.token-disclosure { min-block-size: var(--target-min); padding-block: var(--space-1); cursor: pointer; }
@media (pointer: coarse) {
  .token-disclosure, .token-permissions .check { min-block-size: var(--control-height-touch); }
}
input[type="checkbox"] { flex: none; inline-size: var(--icon-size); block-size: var(--icon-size); margin: 0; accent-color: var(--accent); translate: 0 var(--space-0-5); }
.actions { display: flex; gap: var(--space-2); align-items: center; flex-wrap: wrap; }
.problem { margin: 0; color: var(--status-danger); font-size: var(--text-sm); }
/* admonitions: a message that stands apart from the form or page around it.
   the tint is mixed in oklab, which keeps a grey background from shifting hue. */
.admonition,
.page-announcement {
  --tone: var(--status-info);
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0;
  padding: var(--space-2) var(--space-3);
  border: 1px solid color-mix(in oklab, var(--tone) 35%, var(--border));
  border-radius: var(--radius-control);
  background: color-mix(in oklab, var(--tone) 8%, var(--background));
  color: var(--ink);
  overflow-wrap: anywhere;
}
.admonition > .icon { color: var(--tone); margin-block-start: var(--space-0-5); }
.admonition p { margin: 0 0 var(--space-1); }
.admonition p:last-child { margin: 0; }
.admonition-danger, .announcement-red { --tone: var(--status-danger); }
.admonition-warning, .announcement-amber { --tone: var(--status-warning); }
.admonition-success, .announcement-green { --tone: var(--status-success); }
.announcement-neutral { --tone: var(--muted); }
.announcement-accent { --tone: var(--accent); }
.page-announcement { display: block; border-inline-start: var(--focus-width) solid var(--tone); }
/* an admonition keeps its distance from whatever it follows: a heading, a line of text or a row of facts */
.content > .admonition, .content > form > .admonition, .settings > .admonition, .settings > form > .admonition { margin-block: var(--space-4); }
.channel { display: flex; gap: var(--space-2); align-items: baseline; min-inline-size: 0; }
.rows form { margin: 0; }

/* lists and tables */
.rows { list-style: none; margin: 0; padding: 0; border-block-start: 1px solid var(--border); }
.rows > li { border-block-end: 1px solid var(--border); }
.row, .row-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-block: var(--space-2);
}
.row-link { text-decoration: none; }

.card { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-block-end: var(--space-2); }

.table-scroll { overflow-x: auto; }
table { inline-size: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-block-end: 1px solid var(--border); text-align: start; vertical-align: top; }
thead th { color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
tbody th { font-weight: var(--weight-regular); }
.number { text-align: end; white-space: nowrap; }
.target { overflow-wrap: anywhere; color: var(--muted); }
td time { white-space: nowrap; }
.cell-note, .cell-text { display: block; }
table.dense :is(a.with-icon, .cell-note, .cell-text) {
  max-inline-size: min(32ch, 45vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
code { font-family: var(--font-mono); font-size: var(--text-sm); }

/* state: a word, a colour and a shape together */
.state { display: inline-flex; align-items: center; gap: var(--space-1-5); white-space: nowrap; font-size: var(--text-sm); }
.mark { flex: none; fill: currentColor; }
.mark .hollow { fill: none; stroke: currentColor; stroke-width: 2; }
.state-ok { color: var(--status-success); }
.state-warn { color: var(--status-warning); }
.state-down { color: var(--status-danger); }
.state-none { color: var(--muted); }

/* status page */
/* the status page's own top bar: its name on the left, its links on the right */
.site-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5); margin-block-end: var(--space-6); padding-block-end: var(--space-3); border-block-end: 1px solid var(--border); }
.site-brand { display: inline-flex; align-items: center; gap: var(--space-2); min-inline-size: 0; color: var(--accent); font-size: var(--text-heading); font-weight: var(--weight-semibold); text-decoration: none; overflow-wrap: anywhere; }
.site-brand-icon { min-block-size: var(--target-min); min-inline-size: var(--target-min); }
.site-brand-icon .logo { block-size: var(--space-6); max-inline-size: calc(var(--space-8) * 2); }
.site-brand-icon > .icon { inline-size: var(--space-5); block-size: var(--space-5); }
.site-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); font-size: var(--text-heading); }
.site-links a { display: inline-flex; align-items: center; min-block-size: var(--target-min); color: var(--muted); text-decoration: none; }
@media (hover: hover) { .site-links a:hover { color: var(--accent); } }
.site-links a[aria-current] { color: var(--ink); font-weight: var(--weight-semibold); }
.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
.cards .incident { margin: 0; }
.maintenance h3 { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.maintenance > .meta { margin: var(--space-1) 0 0; }
.maintenance-now { border-color: var(--status-info); }
.chip { padding: var(--space-0-5) var(--space-2); border-radius: var(--radius-round); background: color-mix(in oklab, var(--status-info) 14%, var(--background)); color: var(--status-info); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
/* a timeline with one entry is only a line and a dot, so it drops its rail */
.page-head { margin-block-end: var(--space-5); }
.page-head h1 { display: flex; align-items: center; gap: var(--space-3); }
/* beside the name, a logo is one line of the name tall, so it scales with the name's type */
.logo { block-size: 1.5em; inline-size: auto; max-inline-size: 3em; object-fit: contain; }
.logo-preview { flex: none; inline-size: var(--space-7); block-size: var(--space-7); object-fit: contain; }
.background-preview { block-size: var(--space-7); aspect-ratio: 16 / 10; object-fit: cover; border: 1px solid var(--border); border-radius: var(--radius-control); }
.favicon-preview { block-size: var(--space-6); inline-size: var(--space-6); }
.page-head a { color: var(--accent); }
.banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--surface);
  font-size: var(--text-title);
}
/* the banner takes the colour of the state it reports, so an outage does not look like a calm day */
.banner-ok { border-color: color-mix(in oklab, var(--status-success) 50%, var(--border)); }
.banner-warn { border-color: var(--status-warning); background: color-mix(in oklab, var(--status-warning) 8%, var(--surface)); }
.banner-down { border-color: var(--status-danger); background: color-mix(in oklab, var(--status-danger) 8%, var(--surface)); }
.banner-text { margin: 0; font-size: 1em; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-heading); }
.page-description { margin-block-end: var(--space-5); }
.status-checked { margin-block: var(--space-2) 0; text-align: center; font-variant-numeric: tabular-nums; }
.column .title-row > a.meta { display: inline-flex; align-items: center; min-block-size: var(--target-min); }
/* a round status icon is as tall as the text it stands beside */
.status-icon { flex: none; inline-size: 1em; block-size: 1em; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.auth-brand > .status-icon { font-size: var(--text-title); }
.status-icon .status-dot { fill: currentColor; stroke: none; }
.status-icon-wrench path { stroke-width: 2.5; }
.status-icon-check { color: var(--status-success); }
.status-icon-warning { color: var(--status-warning); }
.status-icon-cross { color: var(--status-danger); }
.status-icon-wrench { color: var(--status-info); }
.status-icon-dash, .status-icon-slash { color: var(--muted); }

.components { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
.category h3 { margin-block-start: var(--space-3); padding-block-end: var(--space-2); border-block-end: 1px solid var(--border); color: var(--muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
.category:first-child h3 { margin-block-start: 0; }
.component-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-block-end: var(--space-2); }
.component-name { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
.strip { display: flex; align-items: flex-end; gap: var(--space-0-5); block-size: var(--space-6); }
.component .strip { block-size: var(--space-5); }
.day { flex: 1; min-inline-size: 0; border-radius: var(--space-0-5); }
.day-ok { block-size: 100%; background: var(--status-success); }
.day-warn { block-size: 70%; background: var(--status-warning); }
.day-down { block-size: 40%; background: var(--status-danger); }
.day-none { block-size: 100%; background: var(--active); }
/* hover feedback above sits inside (hover: hover), so a touch screen does not
   keep it stuck after a tap. the tooltips below stay outside it on purpose:
   on a touch screen a tap is the only way to open one. */
/* a tooltip for each day, drawn without script. it opens on hover and on a
   tap, and the cells near either end align it inward so it stays on screen. */
.day { position: relative; }
/* no fade on the hovered bar: its tooltip is part of it and would turn see-through with it */
.day:hover::after {
  content: attr(data-tip);
  position: absolute;
  inset-block-end: calc(100% + var(--space-1-5));
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: 1;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--elevated);
  box-shadow: var(--shadow-popover);
  color: var(--ink);
  font-size: var(--text-sm);
  font-variant-numeric: tabular-nums;
  line-height: var(--leading-ui);
  white-space: nowrap;
  pointer-events: none;
}
.day:nth-child(-n+10):hover::after { inset-inline-start: 0; translate: 0 0; }
.day:nth-last-child(-n+10):hover::after { inset-inline-start: auto; inset-inline-end: 0; translate: 0 0; }
.day-warn::after, .day-down::after { inset-block-end: calc(100% + var(--space-1-5)); }
.strip { position: relative; }
.index-uptime .day { position: static; }
.index-uptime .day:hover::after {
  inset-inline: 0 auto;
  inline-size: max-content;
  max-inline-size: 100%;
  white-space: normal;
  translate: 0 0;
}
.index-uptime .day:where(:nth-last-child(-n+15):not(:first-child)):hover::after { inset-inline: auto 0; }
/* center the tip on its bar and use the strip's insets to keep it in view */
@supports (justify-self: anchor-center) and (position-anchor: --uptime-day) {
  .index-uptime .day:hover { anchor-name: --uptime-day; }
  .index-uptime .day:hover::after {
    position-anchor: --uptime-day;
    inset-inline: 0;
    justify-self: anchor-center;
  }
}
.table-scroll:has(.day:hover) { overflow: visible; }
/* one unseen column per day lies over the line, so each day has a tooltip like the bars do */
.spark-box { position: relative; }
.spark-days { position: absolute; inset: 0; display: flex; }
.spark-day { block-size: 100%; }
.spark-day:hover { background: color-mix(in oklab, var(--accent) 18%, transparent); }
/* the area under a graph's line: one flat tint, or a fade from the tint to nothing */
.area { stroke: none; }
.area-flat { fill: color-mix(in oklab, var(--accent) 20%, transparent); }
.area-top { stop-color: var(--accent); stop-opacity: 0.55; }
.area-bottom { stop-color: var(--accent); stop-opacity: 0; }
.checks { display: grid; gap: var(--space-1); inline-size: 100%; }
/* the detail view of a monitor */
.stats-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; }
@media (max-width: 520px) { .stats-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats-wide .stat { margin-inline-start: -1px; border-block-end: 1px solid var(--border); margin-block-end: -1px; }
.chart-box { position: relative; margin-block-start: var(--space-3); border-block-end: 1px solid var(--border); }
.chart { display: block; inline-size: 100%; block-size: calc(var(--space-8) * 2); overflow: visible; }
.chart polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart-failed { background: color-mix(in oklab, var(--status-danger) 22%, transparent); }
a.component-name { display: inline-flex; align-items: center; min-inline-size: var(--target-min); min-block-size: var(--target-min); color: inherit; text-decoration: none; }
@media (hover: hover) { a.component-name:hover { color: var(--accent); text-decoration: underline; } }
.badge88 { flex: none; image-rendering: pixelated; }
/* the swatch that stands for "the colour of the state": half up, half down */
.swatch-state { background: linear-gradient(90deg, var(--status-success) 50%, var(--status-danger) 50%); }
.badge88-large { inline-size: 176px; block-size: 62px; }
.has-script form[data-autosubmit] .savebar { display: none; }
.badge-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.spark { display: block; inline-size: 100%; block-size: var(--space-6); overflow: visible; }
.spark-baseline { stroke: var(--muted); stroke-width: 1; vector-effect: non-scaling-stroke; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin: 0; }
.figures dd { margin: 0; font-size: var(--text-heading); font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; }
/* past about 120 days the bars sit shoulder to shoulder, or they would vanish */
.strip-dense { gap: 0; }
.strip-dense .day { border-radius: 0; }
.strip-legend { display: flex; justify-content: space-between; gap: var(--space-3); margin-block-start: var(--space-1); font-variant-numeric: tabular-nums; }
.narrow-only { display: none; }

.incident { padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-card); }
.incident-open { border-color: var(--status-warning); }
.timeline { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: var(--space-3); }
.timeline li { display: grid; gap: var(--space-0-5); }
.update-body { overflow-wrap: anywhere; }
/* the timeline: the day on the left, what happened on the right. each
   incident's updates run down a rail that reads line, space, dot, space, line:
   a dot per update in the colour of its status, and a line that stops short
   of the dots on both ends. */
.title-ruled { padding-block-end: var(--space-2); border-block-end: 1px solid var(--border); }
.tl { list-style: none; margin: var(--space-4) 0 0; padding: 0; }
.tl-day { display: grid; grid-template-columns: calc(var(--space-8) * 2 + var(--space-6)) minmax(0, 1fr); gap: var(--space-2) var(--space-5); padding-block-end: var(--space-6); }
.tl-day:last-child { padding-block-end: 0; }
.tl-when { display: grid; justify-items: start; align-content: start; gap: var(--space-2); margin: 0; }
.tl-date { margin: 0; font-size: var(--text-heading); font-weight: var(--weight-semibold); }
.tl-what { display: grid; gap: var(--space-5); min-inline-size: 0; }
.tl-incident { overflow-wrap: anywhere; }
.tl-incident h4, .incident-open h2 { margin: 0; font-size: var(--text-heading); font-weight: var(--weight-semibold); }
.tl-calm { padding-block-end: var(--space-4); color: var(--muted); font-size: var(--text-sm); }
.tl-calm .tl-date { font-size: inherit; font-weight: var(--weight-regular); text-wrap: balance; }
.tl-quiet { margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-1-5); margin: var(--space-2) 0 0; }
.chip-plain { border-radius: var(--radius-control); background: var(--surface); color: var(--muted); font-weight: var(--weight-regular); }
.incident-open .chip-plain { background: var(--hover); }
.updates { list-style: none; margin: var(--space-3) 0 0; padding: 0; }
.updates > li { position: relative; padding-inline-start: var(--space-5); padding-block-end: var(--space-4); }
.updates > li:last-child { padding-block-end: 0; }
.updates > li::before {
  content: "";
  position: absolute;
  box-sizing: border-box;
  inset-inline-start: var(--space-0-5);
  inset-block-start: var(--space-1-5);
  inline-size: var(--space-2);
  block-size: var(--space-2);
  border-radius: var(--radius-round);
  background: var(--border-strong);
}
.updates > li::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(var(--space-1) + 1px);
  inset-block: calc(var(--space-4) + var(--space-0-5)) calc(-1 * var(--space-0-5));
  inline-size: 2px;
  border-radius: var(--radius-round);
  background: var(--border);
}
.updates > li:last-child::after { display: none; }
.updates > .update-investigating::before { background: var(--status-danger); }
.updates > .update-identified::before { background: var(--status-warning); }
.updates > .update-monitoring::before { background: var(--status-info); }
.updates > .update-resolved::before { background: var(--status-success); }
.update-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  overflow-wrap: anywhere;
}
.updates .update-body { margin: var(--space-1) 0 0; }
/* a long update shows its first six lines and fades out until its read more
   toggle opens. markdown.go decides which updates are long. */
.update-long:has(> .update-more:not([open])) > .update-body {
  max-block-size: 6lh;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black calc(100% - 2lh), transparent);
}
.update-more > summary {
  display: inline-flex;
  align-items: center;
  min-block-size: var(--target-min);
  color: var(--muted);
  font-size: var(--text-sm);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
  list-style: none;
}
.update-more > summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .update-more > summary:hover { color: var(--accent); } }
.update-more[open] .update-more-closed, .update-more:not([open]) .update-more-open { display: none; }
@media (max-width: 520px) {
  .tl-day { grid-template-columns: minmax(0, 1fr); }
  .tl-when { display: flex; flex-wrap: wrap; align-items: center; padding-block-end: var(--space-2); border-block-end: 1px solid var(--border); }
  .tl-calm .tl-when { padding-block-end: 0; border-block-end: 0; }
}

/* the incident map: a year of days, one column per week */
.heat-scroll { overflow-x: auto; padding-block: var(--space-5) var(--space-1); }
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 1fr); grid-auto-columns: minmax(var(--space-2), 1fr); gap: var(--space-0-5); }
.heat-cell { position: relative; aspect-ratio: 1; border-radius: var(--space-0-5); background: var(--active); }
.heat-blank { background: none; }
/* a day that has not happened yet: an empty outline that holds its place */
.heat-future { background: none; outline: 1px dashed var(--border-strong); outline-offset: -1px; }
.heat-frame { display: grid; grid-template-columns: auto minmax(560px, 1fr); column-gap: var(--space-2); }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: var(--space-0-5); color: var(--muted); font-size: var(--text-xs); line-height: 1; }
.heat-days span { display: flex; align-items: center; }
.pager { justify-content: center; margin-block-start: var(--space-4); }
.heat-1 { background: color-mix(in oklab, var(--status-warning) 60%, var(--background)); }
.heat-2 { background: var(--status-warning); }
.heat-3 { background: var(--status-danger); }
.heat-cell[data-tip]:hover::after {
  content: attr(data-tip);
  position: absolute;
  inset-block-end: calc(100% + var(--space-1-5));
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: 1;
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-control);
  background: var(--elevated);
  box-shadow: var(--shadow-popover);
  color: var(--ink);
  font-size: var(--text-sm);
  white-space: nowrap;
  pointer-events: none;
}
.heat-cell:nth-child(-n+70):hover::after { inset-inline-start: 0; translate: 0 0; }
.heat-cell:nth-last-child(-n+70):hover::after { inset-inline-start: auto; inset-inline-end: 0; translate: 0 0; }
.heat-months { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(var(--space-2), 1fr); gap: var(--space-0-5); margin-block-end: var(--space-1); color: var(--muted); font-size: var(--text-xs); }
.heat-months span { white-space: nowrap; overflow: visible; }
.heat-legend { display: flex; align-items: center; gap: var(--space-1-5); margin-block-start: var(--space-2); }
.heat-legend .heat-cell { inline-size: var(--space-3); margin-inline-start: var(--space-2); }

.zone-picker { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1); margin-block-start: var(--space-7); }
/* a menu without script: the summary reads as a link, the list opens above it */
.menu { position: relative; }
.menu > summary { display: inline-flex; align-items: center; gap: var(--space-0-5); min-block-size: var(--target-min); color: var(--ink); text-decoration: underline; text-underline-offset: var(--space-0-5); cursor: pointer; list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
/* an open menu lays an unseen sheet over the page. a click anywhere outside
   the list lands on it, and so on the summary, which closes the menu. */
.menu[open] > summary::before { content: ""; position: fixed; inset: 0; z-index: 1; cursor: default; }
.menu > summary .icon { transition: rotate var(--motion-fast) var(--ease-out); }
.menu[open] > summary .icon { rotate: 180deg; }
.menu-list { position: absolute; inset-block-end: 100%; inset-inline-start: 0; z-index: 2; min-inline-size: max-content; max-block-size: calc(var(--space-8) * 4); overflow-y: auto; overscroll-behavior: contain; margin: 0; padding: var(--space-1); list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-control); background: var(--elevated); box-shadow: var(--shadow-popover); }
.menu-list a { display: flex; align-items: center; min-block-size: var(--control-height); padding-inline: var(--space-2); border-radius: var(--radius-control); color: var(--ink); text-decoration: none; }
@media (hover: hover) { .menu-list a:hover { background: var(--hover); } }
.menu-list a[aria-current] { font-weight: var(--weight-semibold); background: var(--active); }
.zone-picker + .page-foot { margin-block-start: var(--space-3); }
.page-foot { margin-block-start: var(--space-7); }

/* phones show 30 days so each day stays wide enough to see */
@media (max-width: 520px) {
  .strip > .day:nth-last-child(n+31) { display: none; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .banner { font-size: var(--text-heading); }
}

/* motion. everything that changes state eases into it, with the house
   durations. tokens.css sets them to zero for people who ask for less motion. */

/* controls answer a hover at once and give a little under a press */
.button, .icon-button, .nav-item, .tabs a, .list-row, .row-link, .segmented span, .swatch, .day, .heat-cell, a {
  transition: background-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out), opacity var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-out), scale var(--motion-fast) var(--ease-out);
}
.button:active, .icon-button:active, .swatch:active { scale: 0.96; }
.nav-item:active { scale: 0.98; }
input, select, textarea { transition: border-color var(--motion-fast) var(--ease-out), background-color var(--motion-fast) var(--ease-out); }
@media (hover: hover) { input:hover, select:hover, textarea:hover { border-color: var(--ink); } }
table.dense tbody tr { transition: background-color var(--motion-fast) var(--ease-out); }

/* a dialog rises into place and its backdrop fades in. closing reverses it. */
dialog {
  opacity: 0;
  scale: 0.97;
  transition: opacity var(--motion-exit) var(--ease-out), scale var(--motion-exit) var(--ease-out),
    overlay var(--motion-exit) allow-discrete, display var(--motion-exit) allow-discrete;
}
dialog[open] { opacity: 1; scale: 1; transition-duration: var(--motion-base); }
@starting-style { dialog[open] { opacity: 0; scale: 0.97; } }
dialog::backdrop { opacity: 0; transition: opacity var(--motion-exit) var(--ease-out), overlay var(--motion-exit) allow-discrete, display var(--motion-exit) allow-discrete; }
dialog[open]::backdrop { opacity: 1; transition-duration: var(--motion-base); }
@starting-style { dialog[open]::backdrop { opacity: 0; } }

/* messages and tooltips arrive instead of popping in */
@keyframes arrive { from { opacity: 0; translate: 0 calc(-1 * var(--space-1)); } }
.admonition { animation: arrive var(--motion-base) var(--ease-out); }
@keyframes tip { from { opacity: 0; } }
.day:hover::after, .heat-cell[data-tip]:hover::after { animation: tip var(--motion-fast) var(--ease-out); }

/* the sidebar slides between its full width and the rail. this is the one
   place where a size is animated, since the content beside it has to follow. */
.shell { transition: grid-template-columns var(--motion-base) var(--ease-out); }

/* a touch screen gets form text of 16px, which also keeps ios from zooming into a field */
@media (pointer: coarse) {
  /* 16px is the size below which ios zooms into a focused field. the tool density shrinks every text token, so the number is written out. */
  input, select, textarea, .select-button { font-size: 16px; }
  .site-brand, .site-links a, .column .title-row > a.meta, .zone-picker .menu > summary, a.component-name {
    min-inline-size: var(--control-height-touch);
    min-block-size: var(--control-height-touch);
  }
  .component-head { align-items: center; }
}
/* text written in markdown: update bodies, status page descriptions and footers */
.md { overflow-wrap: anywhere; }
.md > :first-child { margin-block-start: 0; }
.md > :last-child { margin-block-end: 0; }
.md :is(p, ul, ol, blockquote, pre, h5, h6) { margin-block: var(--space-2) 0; }
/* an update already sits in a list, so its own lists would take the nested bullet styles */
.md :is(ul, ol) { padding-inline-start: var(--space-5); }
.md ul { list-style-type: disc; }
.md ol { list-style-type: decimal; }
.md li + li { margin-block-start: var(--space-0-5); }
.md :is(h5, h6) { font-size: inherit; font-weight: var(--weight-semibold); text-wrap: balance; }
.md .md-subtext { color: var(--muted); font-size: var(--text-sm); }
.md blockquote { margin-inline: 0; padding-inline-start: var(--space-3); border-inline-start: 2px solid var(--border-strong); }
.md :not(pre) > code { padding-inline: var(--space-1); border-radius: var(--radius-control); background: var(--surface); }
.md pre { overflow-x: auto; padding: var(--space-2) var(--space-3); border-radius: var(--radius-control); background: var(--surface); overflow-wrap: normal; }
.md hr { margin-block: var(--space-3); border: 0; border-block-start: 1px solid var(--border); }
