/* Fonts: SIL Open Font License 1.1, notices at /assets/licenses.ba9c714b6d63.txt */
@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/sora-latin-wght-normal.fa26406eeda9.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/assets/manrope-latin-wght-normal.a30ddcd34970.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/assets/jetbrains-mono-latin-wght-normal.18be452724bf.woff2") format("woff2");
}

/*
 * TaruBot's design tokens, shared by the web dashboard and the documentation site. Ported from
 * the Orrery design system export (tokens/colors.css, typography.css, spacing.css, effects.css and
 * motion.css, in that order), dark only. Deliberate changes from the export: the display face is
 * Sora instead of the export's, with the display scale, weight and tracking retuned for it (see
 * Typography below); type sizes are in rem; there is no --holo-conic token (see Holographic below)
 * and no unused --holo-shift property.
 *
 * site/src/styles/tokens.css is the source. src/web/styles/tokens.ts carries the same text for the
 * dashboard, and tests/unit/web-parity.test.ts fails when the two differ: edit the site file, then
 * copy its text there. No @font-face here: each surface declares its own, as the font URLs differ.
 */

/* Color. Neutrals are an indigo-tinted "night"; accents share L/C and vary the hue. */
:root {
  color-scheme: dark;

  /* Night: base neutrals */
  --night-975: oklch(0.095 0.024 280);
  --night-950: oklch(0.12 0.03 280);
  --night-900: oklch(0.15 0.036 280);
  --night-850: oklch(0.18 0.042 280);
  --night-800: oklch(0.215 0.047 280);
  --night-700: oklch(0.26 0.052 280);
  --night-600: oklch(0.33 0.05 280);
  --night-500: oklch(0.43 0.045 280);
  --night-400: oklch(0.56 0.038 280);
  --night-300: oklch(0.69 0.03 280);
  --night-200: oklch(0.82 0.02 280);
  --night-100: oklch(0.91 0.014 280);
  --night-50: oklch(0.97 0.008 280);

  /* Accents: L 0.80 / C 0.13 shared, hue varies */
  --cyan-200: oklch(0.93 0.055 210);
  --cyan-400: oklch(0.8 0.13 210);
  --cyan-600: oklch(0.62 0.12 214);
  --cyan-900: oklch(0.3 0.07 220);

  --violet-200: oklch(0.92 0.05 298);
  --violet-400: oklch(0.8 0.13 298);
  --violet-600: oklch(0.6 0.15 296);
  --violet-900: oklch(0.29 0.09 292);

  /* Rose: a holographic stop only, not a UI accent */
  --rose-400: oklch(0.8 0.13 350);

  /* Starlight: a warm highlight for stars and rare emphasis */
  --starlight-400: oklch(0.88 0.09 85);

  /* Semantic hues, from the same L/C family */
  --green-400: oklch(0.8 0.13 162);
  --green-900: oklch(0.3 0.06 165);
  --amber-400: oklch(0.82 0.13 78);
  --amber-900: oklch(0.31 0.06 70);
  --red-400: oklch(0.74 0.15 18);
  --red-900: oklch(0.3 0.08 18);

  /* Semantic aliases */
  --bg-void: var(--night-975);
  --bg-app: var(--night-950);
  --bg-raised: var(--night-900);
  --surface-1: var(--night-850);
  --surface-2: var(--night-800);
  --surface-3: var(--night-700);
  --surface-hover: oklch(0.8 0.06 280 / 0.06);
  --surface-active: oklch(0.8 0.08 280 / 0.1);
  --surface-selected: oklch(0.8 0.13 210 / 0.1);
  --scrim: oklch(0.08 0.03 280 / 0.72);

  --border-subtle: oklch(0.82 0.05 280 / 0.08);
  --border-default: oklch(0.82 0.05 280 / 0.14);
  --border-strong: oklch(0.86 0.06 280 / 0.26);
  --border-accent: oklch(0.8 0.13 210 / 0.55);
  /*
   * A form control's frame, its only boundary (WCAG 1.4.11): opaque, about 4.6:1 against a card and
   * 5:1 against the control's own fill; lighter still on hover. The translucent borders above
   * stay near 1.1:1 there.
   */
  --border-control: oklch(0.6 0.04 280);
  --border-control-hover: oklch(0.72 0.05 280);

  /* --text-faint is under 4.5:1 on every surface: never use it for text that carries meaning. */
  --text-primary: var(--night-50);
  --text-secondary: var(--night-200);
  --text-muted: var(--night-300);
  --text-faint: var(--night-400);
  --text-on-accent: var(--night-975);
  --text-accent: var(--cyan-400);
  --text-link: var(--cyan-400);
  --text-link-hover: var(--cyan-200);

  --accent: var(--cyan-400);
  --accent-strong: var(--cyan-200);
  --accent-deep: var(--cyan-900);
  --accent-2: var(--violet-400);
  --accent-2-deep: var(--violet-900);
  --focus-ring: var(--cyan-400);

  --success: var(--green-400);
  --success-bg: oklch(0.8 0.13 162 / 0.12);
  --warning: var(--amber-400);
  --warning-bg: oklch(0.82 0.13 78 / 0.12);
  --danger: var(--red-400);
  --danger-bg: oklch(0.74 0.15 18 / 0.13);
  --info: var(--cyan-400);
  --info-bg: oklch(0.8 0.13 210 / 0.12);

  /* Presence dots (vocabulary from the design system) */
  --presence-online: var(--green-400);
  --presence-idle: var(--amber-400);
  --presence-dnd: var(--red-400);
  --presence-offline: var(--night-400);
}

/*
 * Typography. The display face (Sora) for titles and the wordmark, sans for the interface, mono for
 * labels and readouts. Sizes are in rem, so text follows the reader's default font size; the px
 * equivalents below are at the usual 16px default.
 */
:root {
  --font-display: "Sora", "Manrope", system-ui, sans-serif;
  --font-sans: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* Size scale: 10, 11, 13, 14, 16, 18 and 22px */
  --text-2xs: 0.625rem;
  --text-xs: 0.6875rem;
  --text-sm: 0.8125rem;
  --text-md: 0.875rem;
  --text-lg: 1rem;
  --text-xl: 1.125rem;
  --text-2xl: 1.375rem;

  /*
   * Display scale: 22, 28, 36, 48 and 64px. Sora is wider and heavier than the export's display
   * face, so each step is about three quarters of the export's (28 to 88px), set at weight 600.
   */
  --display-sm: 1.375rem;
  --display-md: 1.75rem;
  --display-lg: 2.25rem;
  --display-xl: 3rem;
  --display-2xl: 4rem;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.55;

  /* The display face: tight at display sizes, nearly normal for small titles and the wordmark. */
  --tracking-display: -0.025em;
  --tracking-title: -0.01em;
  --tracking-ui: -0.005em;
  --tracking-label: 0.14em;
  --tracking-readout: 0.02em;

  /* Semantic type roles (font shorthand) */
  --type-display-hero: 600 var(--display-2xl) / 1.05 var(--font-display);
  --type-h1: 600 var(--display-lg) / 1.1 var(--font-display);
  --type-h2: 600 var(--display-md) / 1.15 var(--font-display);
  --type-h3: 600 var(--display-sm) / 1.2 var(--font-display);
  --type-title: 600 var(--text-xl) / 1.3 var(--font-sans);
  --type-subtitle: 600 var(--text-lg) / 1.35 var(--font-sans);
  --type-body: 400 var(--text-md) / 1.55 var(--font-sans);
  --type-body-lg: 400 var(--text-lg) / 1.6 var(--font-sans);
  --type-ui: 500 var(--text-md) / 1.3 var(--font-sans);
  --type-ui-sm: 500 var(--text-sm) / 1.3 var(--font-sans);
  --type-caption: 400 var(--text-sm) / 1.45 var(--font-sans);
  --type-label: 500 var(--text-xs) / 1.2 var(--font-mono);
  --type-readout: 500 var(--text-md) / 1.2 var(--font-mono);
  --type-readout-lg: 400 1.75rem / 1 var(--font-mono);
  --type-code: 400 var(--text-sm) / 1.5 var(--font-mono);
}

/* Spacing, sizing and layout. A 4px base and balanced density. */
:root {
  --space-0: 0px;
  --space-0-5: 2px;
  --space-1: 4px;
  --space-1-5: 6px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Control heights */
  --control-sm: 30px;
  --control-md: 36px;
  --control-lg: 44px;

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-pill: 999px;

  /* Layout */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --content-max: 1180px;
  --gutter: var(--space-8);
  --card-pad: var(--space-5);

  /* Z layers */
  --z-sticky: 10;
  --z-dropdown: 40;
  --z-overlay: 80;
  --z-toast: 100;
  --z-tooltip: 120;
}

/*
 * Effects: elevation, glow, glass and the holographic gradients. --holo-angle is registered so an
 * animation interpolates it as an angle (an unregistered property would jump), and inherits so a
 * pseudo-element reads its host's angle.
 */
@property --holo-angle {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

:root {
  /* Elevation: deep and cool, never pure black */
  --shadow-1: 0 1px 2px oklch(0.05 0.03 280 / 0.5), 0 6px 16px -8px oklch(0.05 0.03 280 / 0.7);
  --shadow-2: 0 2px 4px oklch(0.05 0.03 280 / 0.5), 0 16px 32px -12px oklch(0.05 0.03 280 / 0.8);
  --shadow-3: 0 4px 8px oklch(0.05 0.03 280 / 0.5), 0 32px 64px -16px oklch(0.04 0.03 280 / 0.9);
  --inner-highlight: inset 0 1px 0 0 oklch(1 0 0 / 0.07);
  --inner-shade: inset 0 -1px 0 0 oklch(0 0 0 / 0.25);

  /* Glows */
  --glow-cyan-sm: 0 0 10px oklch(0.8 0.13 210 / 0.35);
  --glow-cyan: 0 0 2px oklch(0.8 0.13 210 / 0.6), 0 0 22px oklch(0.8 0.13 210 / 0.32);
  --glow-cyan-lg:
    0 0 3px oklch(0.8 0.13 210 / 0.6), 0 0 40px oklch(0.8 0.13 210 / 0.38),
    0 0 80px oklch(0.8 0.13 210 / 0.18);
  --glow-violet-sm: 0 0 10px oklch(0.8 0.13 298 / 0.35);
  --glow-violet: 0 0 2px oklch(0.8 0.13 298 / 0.6), 0 0 22px oklch(0.8 0.13 298 / 0.32);
  --glow-holo: 0 0 18px oklch(0.8 0.13 210 / 0.28), 0 0 36px oklch(0.8 0.13 298 / 0.22);
  --glow-danger: 0 0 2px oklch(0.74 0.15 18 / 0.6), 0 0 20px oklch(0.74 0.15 18 / 0.3);
  --glow-success: 0 0 10px oklch(0.8 0.13 162 / 0.4);
  --text-glow: 0 0 16px oklch(0.8 0.13 210 / 0.45);
  --text-glow-soft: 0 0 24px oklch(0.85 0.08 260 / 0.3);
  --focus-glow:
    0 0 0 1px var(--bg-app), 0 0 0 3px oklch(0.8 0.13 210 / 0.75),
    0 0 18px oklch(0.8 0.13 210 / 0.35);

  /* Glass */
  --glass-fill: linear-gradient(
    180deg,
    oklch(0.3 0.055 280 / 0.46) 0%,
    oklch(0.2 0.045 280 / 0.34) 100%
  );
  --glass-fill-strong: linear-gradient(
    180deg,
    oklch(0.27 0.055 280 / 0.82) 0%,
    oklch(0.19 0.045 280 / 0.78) 100%
  );
  --glass-blur: blur(18px) saturate(150%);
  --glass-border: oklch(0.86 0.06 280 / 0.14);
  --glass-edge: inset 0 1px 0 0 oklch(1 0 0 / 0.09), inset 0 0 0 1px oklch(0.86 0.06 280 / 0.06);

  /*
   * Holographic: a pastel iridescence, cyan to violet to rose and back. There is deliberately no
   * --holo-conic token. A custom property's var() references are resolved on the element that
   * declares it, so a conic gradient declared here would freeze --holo-angle at its initial 0deg
   * and the rotating edge would never turn. A rule that draws the edge writes
   * conic-gradient(from var(--holo-angle, 0deg), var(--holo-stops)) itself; the 0deg fallback
   * keeps the edge visible in browsers without @property.
   */
  --holo-stops:
    var(--cyan-400), var(--violet-400), var(--rose-400), var(--violet-400), var(--cyan-400);
  --holo-linear: linear-gradient(110deg, var(--holo-stops));
  --holo-text: linear-gradient(
    100deg,
    var(--cyan-200) 0%,
    var(--violet-400) 28%,
    var(--rose-400) 46%,
    var(--cyan-400) 68%,
    var(--violet-200) 100%
  );
  --holo-sheen: linear-gradient(115deg, transparent 35%, oklch(1 0 0 / 0.22) 48%, transparent 62%);
  --holo-fill: linear-gradient(
    110deg,
    oklch(0.8 0.13 210 / 0.16),
    oklch(0.8 0.13 298 / 0.16) 50%,
    oklch(0.8 0.13 350 / 0.12)
  );

  /* Nebula washes: page backdrops behind glass, used sparingly */
  --nebula-cyan: radial-gradient(60% 50% at 20% 0%, oklch(0.5 0.12 220 / 0.22), transparent 70%);
  --nebula-violet: radial-gradient(
    50% 45% at 85% 10%,
    oklch(0.45 0.16 298 / 0.22),
    transparent 70%
  );
}

/* Motion. Slow ambient loops (shimmer drifts, stars twinkle, orbits turn); quick feedback. */
:root {
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  --dur-instant: 80ms;
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
  --dur-enter: 460ms;

  /* Ambient loops */
  --dur-holo: 9s;
  --dur-sheen: 6s;
  --dur-twinkle: 5s;
  --dur-orbit: 60s;
  --dur-pulse: 2.8s;
}

/*
 * Reduced motion zeroes the ambient loops here. Entrances, hover lift, press scale and sheen are
 * stopped by each surface's own reduced-motion rules, which these durations can't reach.
 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-holo: 0s;
    --dur-sheen: 0s;
    --dur-twinkle: 0s;
    --dur-orbit: 0s;
    --dur-pulse: 0s;
  }
}

/* Base: from the Orrery design system's styles/base.css */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg-app);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  color: var(--text-primary);
  font: var(--type-body);
  letter-spacing: var(--tracking-ui);
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

/*
 * The export sets headings at weight 400 for its display face; TaruBot's display face (Sora) is
 * set at 600, and so is a sans heading. Small titles keep near-normal tracking; a display-sized
 * title sets --tracking-display itself.
 */
h1,
h2,
h3 {
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-title);
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out);
}

/*
 * The design's link hover, at zero specificity: a component that is a link (a button, a card, a
 * nav item, the wordmark) sets its own color and decoration, and the underline and link color must
 * not bleed into it, such as the holographic sign-in button turning cyan and underlined.
 */
:where(a:hover) {
  color: var(--text-link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/*
 * A link inside running text, such as the Free Company's name, is underlined: its cyan is too
 * close to the text around it to mark a link by color alone (WCAG 1.4.1). Link components carry a
 * class and keep their own look.
 */
main :is(p, dd) a:not([class]) {
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, currentColor 45%, transparent);
  text-underline-offset: 3px;
}

main :is(p, dd) a:not([class]):hover {
  text-decoration-color: currentColor;
}

code,
kbd {
  font: var(--type-code);
}

::selection {
  background: oklch(0.8 0.13 210 / 0.32);
  color: var(--text-primary);
}

/* The thumb is often the only sign that a table scrolls, so it keeps 3:1 against every surface. */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--night-400) transparent;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}

/*
 * Focus is an outline, which forced-colors mode keeps; the design's box-shadow ring would vanish
 * there. Components may add a glow beside it, as decoration only.
 */
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: calc(var(--z-tooltip) + 1);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--text-primary);
  font: var(--type-ui);
  transform: translateY(calc(-100% - 24px));
}

.skip:focus {
  transform: none;
}

/* Present for assistive technology, invisible on screen. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/*
 * Headings in a page: section titles in the display face (Sora), the rest in sans. Synthesis is
 * off wherever the display face is used: it has no italic, and nothing may fake one or a weight.
 */
main h2 {
  color: var(--text-primary);
  font: var(--type-h3);
  font-synthesis: none;
  letter-spacing: var(--tracking-display);
}

main h3 {
  color: var(--text-primary);
  font: var(--type-subtitle);
  letter-spacing: var(--tracking-ui);
}

/*
 * A timestamp reads as one unit, so a line never breaks inside its date ("2026-10-" | "09 00:06
 * UTC"). Under 20rem of measure (the narrowest phones, or a large text setting, which scales this
 * rem query too) it may wrap again, rather than run out of its box.
 */
main time {
  white-space: nowrap;
}

@media (max-width: 19.99rem) {
  main time {
    white-space: normal;
  }
}

/* Effects: from the Orrery design system's styles/effects.css */

/*
 * The ambient loops (holographic edge and button drift, starfield twinkle, orbit rings) keep
 * looping, with no pause control: the owner accepted the WCAG 2.2.2 (Pause, Stop, Hide) finding
 * on 2026-10-08. prefers-reduced-motion stops every loop (media.ts). Don't re-raise it without a
 * new owner decision.
 */
@keyframes orr-holo-drift {
  from {
    background-position: 0% 50%;
  }
  to {
    background-position: 200% 50%;
  }
}

@keyframes orr-holo-spin {
  to {
    --holo-angle: 360deg;
  }
}

@keyframes orr-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orr-twinkle {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 1;
  }
}

@keyframes orr-rise-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/*
 * Holographic edge: a 1px iridescent border that slowly turns, on at most one card per page. The
 * host needs a border-radius; the mask cuts the gradient down to the padding ring.
 */
.orr-holo-edge {
  position: relative;
}

.orr-holo-edge::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--holo-angle, 0deg), var(--holo-stops));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: orr-holo-spin var(--dur-holo) linear infinite;
  pointer-events: none;
  opacity: var(--holo-edge-opacity, 0.85);
  transition: opacity var(--dur-slow) var(--ease-out);
}

/* The mono instrument label: written in sentence case, uppercased here. */
.orr-label {
  font: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Instrument scale: astrolabe graduation ticks, used as a divider. */
.orr-scale {
  height: 7px;
  background-image:
    repeating-linear-gradient(90deg, var(--border-strong) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--border-default) 0 1px, transparent 1px 8px);
  background-position:
    0 0,
    0 100%;
  background-size:
    100% 7px,
    100% 3px;
  background-repeat: no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}

.orr-hairline {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--border-strong) 20%,
    var(--border-strong) 80%,
    transparent
  );
}

/*
 * Starfield: CSS only, behind the entry pages. Two static layers on coprime tiles (613px and
 * 877px) and a third that twinkles (719px), so the repetition never lines up.
 */
.orr-starfield {
  position: relative;
  background-color: var(--bg-void);
  background-image:
    var(--nebula-cyan),
    var(--nebula-violet),
    radial-gradient(1px 1px at 177px 129px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1.2px 1.2px at 202px 461px, oklch(0.97 0.01 280 / 0.6), transparent 70%),
    radial-gradient(1.2px 1.2px at 420px 390px, oklch(0.97 0.01 280 / 0.6), transparent 70%),
    radial-gradient(1.2px 1.2px at 229px 434px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1.2px 1.2px at 419px 287px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1.2px 1.2px at 75px 315px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1.2px 1.2px at 395px 354px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1.2px 1.2px at 228px 206px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1.2px 1.2px at 94px 182px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1px 1px at 575px 342px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1.2px 1.2px at 36px 168px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1px 1px at 258px 118px, oklch(0.97 0.01 280 / 0.6), transparent 70%),
    radial-gradient(1.2px 1.2px at 224px 211px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1px 1px at 316px 101px, oklch(0.97 0.01 280 / 0.45), transparent 70%),
    radial-gradient(1px 1px at 223px 260px, oklch(0.97 0.01 280 / 0.9), transparent 70%),
    radial-gradient(1px 1px at 376px 143px, oklch(0.97 0.01 280 / 0.6), transparent 70%),
    radial-gradient(1.8px 1.8px at 757px 557px, oklch(0.92 0.05 298 / 0.75), transparent 70%),
    radial-gradient(1.8px 1.8px at 443px 604px, oklch(0.92 0.05 298 / 0.75), transparent 70%),
    radial-gradient(1.8px 1.8px at 621px 220px, oklch(0.92 0.05 298 / 0.75), transparent 70%),
    radial-gradient(1.8px 1.8px at 290px 343px, oklch(0.92 0.05 298 / 0.75), transparent 70%),
    radial-gradient(1.8px 1.8px at 97px 718px, oklch(0.97 0.01 280 / 0.8), transparent 70%),
    radial-gradient(1.5px 1.5px at 135px 68px, oklch(0.92 0.05 298 / 0.75), transparent 70%),
    radial-gradient(1.8px 1.8px at 555px 127px, oklch(0.93 0.05 210 / 0.85), transparent 70%);
  background-size:
    100% 100%,
    100% 100%,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    613px 613px,
    877px 877px,
    877px 877px,
    877px 877px,
    877px 877px,
    877px 877px,
    877px 877px,
    877px 877px;
  overflow: hidden;
}

.orr-starfield::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 99px 663px, oklch(0.93 0.06 210), transparent 70%),
    radial-gradient(2.4px 2.4px at 636px 653px, oklch(0.92 0.05 298), transparent 70%),
    radial-gradient(2.4px 2.4px at 8px 179px, oklch(0.98 0.01 280), transparent 70%),
    radial-gradient(2px 2px at 444px 166px, oklch(0.98 0.01 280), transparent 70%),
    radial-gradient(2.4px 2.4px at 494px 171px, oklch(0.93 0.06 210), transparent 70%),
    radial-gradient(2.4px 2.4px at 269px 643px, oklch(0.98 0.01 280), transparent 70%),
    radial-gradient(2.8px 2.8px at 2px 656px, oklch(0.95 0.06 85), transparent 70%);
  background-size: 719px 719px;
  animation: orr-twinkle var(--dur-twinkle) var(--ease-in-out) infinite;
}

.orr-starfield > * {
  position: relative;
}

/* Orbit rings: the astrolabe motif. Rings nest inside .orr-orbit, a planet rides a ring. */
.orr-orbit {
  position: relative;
  aspect-ratio: 1;
  pointer-events: none;
}

.orr-orbit__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border-default);
  animation: orr-spin var(--dur-orbit) linear infinite;
}

.orr-orbit__ring--dashed {
  border-style: dashed;
  border-color: var(--border-strong);
}

/* The kit's three-ring composition: 60s outer, 90s reversed middle, 40s inner. */
.orr-orbit__ring--middle {
  inset: 14%;
  animation-duration: calc(var(--dur-orbit) * 1.5);
  animation-direction: reverse;
}

.orr-orbit__ring--inner {
  inset: 28%;
  animation-duration: calc(var(--dur-orbit) * 2 / 3);
}

.orr-orbit__planet {
  position: absolute;
  top: -4px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--planet, var(--cyan-400));
  box-shadow: 0 0 12px var(--planet, var(--cyan-400));
}

.orr-orbit__planet--violet {
  --planet: var(--violet-400);
}

/* The page entrance; server-rendered pages replay it on every load. */
.orr-enter {
  animation: orr-rise-in var(--dur-enter) var(--ease-out) backwards;
}

/* Components: from the Orrery design system's styles/components.css */

/* Icon: the class sits on the inline svg itself (icons.ts), sized by the text around it. */
.orr-icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  stroke-width: var(--icon-stroke, 1.85);
}

/*
 * Button: primary (holographic, one per page), secondary (glass) and ghost. Fix: the export's
 * labels never wrap, so a large text setting on a phone pushed a button past the screen's edge;
 * here a label wraps when it must, and the block padding keeps wrapped lines off the edges. A
 * label that fits keeps the export's one line and height.
 */
.orr-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: var(--control-md);
  padding: var(--space-1-5) var(--space-4);
  border: 0;
  border-radius: var(--radius-md);
  font: var(--type-ui);
  font-weight: var(--weight-semibold);
  text-align: center;
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  transition:
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out),
    background-color var(--dur-base) var(--ease-out),
    color var(--dur-base) var(--ease-out);
}

.orr-btn .orr-icon {
  font-size: 1rem;
}

.orr-btn:focus-visible {
  box-shadow: var(--glow-cyan-sm);
}

.orr-btn:active:not(:disabled) {
  transform: scale(0.975);
}

.orr-btn--sm {
  min-height: var(--control-sm);
  padding: var(--space-1) var(--space-3);
  gap: var(--space-1-5);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.orr-btn--sm .orr-icon {
  font-size: 0.875rem;
}

.orr-btn--lg {
  min-height: var(--control-lg);
  padding: var(--space-1-5) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
}

.orr-btn--lg .orr-icon {
  font-size: 1.125rem;
}

.orr-btn--block {
  width: 100%;
}

/* Dark text on the holographic fill, never white (the design's rule; white would be 1.6:1). */
.orr-btn--primary {
  color: var(--text-on-accent);
  background: var(--holo-linear);
  background-size: 200% 100%;
  animation: orr-holo-drift var(--dur-holo) linear infinite;
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.45),
    inset 0 -1px 0 oklch(0.3 0.08 280 / 0.25),
    var(--glow-holo);
}

/* The hover sheen sweeps once, behind the label; leaving resets it at once. */
.orr-btn--primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: var(--holo-sheen);
  background-size: 250% 100%;
  background-position: 130% 0;
  opacity: 0;
  transition:
    opacity var(--dur-base) var(--ease-out),
    background-position 0s;
}

.orr-btn--primary:hover:not(:disabled)::after {
  opacity: 1;
  background-position: -30% 0;
  transition:
    opacity var(--dur-base) var(--ease-out),
    background-position 900ms var(--ease-out);
}

.orr-btn--primary:hover:not(:disabled),
.orr-btn--primary:focus-visible {
  color: var(--text-on-accent);
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.5),
    inset 0 -1px 0 oklch(0.3 0.08 280 / 0.25),
    var(--glow-cyan-lg);
}

.orr-btn--secondary {
  color: var(--text-primary);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--inner-highlight);
}

.orr-btn--secondary:hover:not(:disabled),
.orr-btn--secondary:focus-visible {
  color: var(--accent-strong);
  box-shadow:
    inset 0 0 0 1px var(--border-accent),
    var(--inner-highlight),
    var(--glow-cyan-sm);
}

.orr-btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}

.orr-btn--ghost:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--surface-hover);
}

/*
 * Never glass inside glass (the design's rule): a secondary button on a glass surface, and a card
 * nested in a card, turn solid by where they sit, with no variant class for a view to forget.
 */
:where(.orr-card, .sidebar, .topbar) .orr-btn--secondary {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: var(--surface-2);
}

/*
 * Badge: a short mono, uppercase status word. TaruBot's status tokens are the design's badges: a
 * check ([OK], [WARN], ...) and a job marker keep their exact text and pinned classes, which pick
 * the tone. Text always carries the meaning; the tone only reinforces it.
 */
.check,
.marker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font: 500 0.65625rem / 1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-default);
  font-variant-emoji: text;
}

/* Accent: work in progress and checks waiting on something. */
.check-wait,
.marker-running {
  color: var(--cyan-400);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.3);
}

/* Violet: work that will retry or continue later. */
.marker-waiting {
  color: var(--violet-400);
  background: oklch(0.8 0.13 298 / 0.12);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 298 / 0.3);
}

.check-ok,
.marker-done {
  color: var(--success);
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 162 / 0.3);
}

.check-warn,
.marker-blocked {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.3);
}

.check-fail,
.marker-failed {
  color: var(--danger);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.15 18 / 0.32);
}

/* Neutral is the base look: .check-off and the queued, paused, skipped and unchanged markers. */

/*
 * Avatar: initials only (the CSP admits no Discord images), a 28% squircle for a server. The hue
 * is a class, since the design's per-avatar custom properties would need style attributes;
 * layout.ts picks it from the server ID, and a frame sets the size through --size.
 */
.orr-avatar {
  --size: 40px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  font: 600 calc(var(--size) * 0.38) / 1 var(--font-sans);
  letter-spacing: 0;
  color: var(--text-primary);
  background: linear-gradient(145deg, var(--night-600), var(--violet-900));
  box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.08);
}

.orr-avatar--square {
  border-radius: 28%;
}

.orr-avatar--hue-0 {
  background: linear-gradient(145deg, oklch(0.46 0.12 210), oklch(0.27 0.08 250));
}

.orr-avatar--hue-1 {
  background: linear-gradient(145deg, oklch(0.46 0.12 250), oklch(0.27 0.08 290));
}

.orr-avatar--hue-2 {
  background: linear-gradient(145deg, oklch(0.46 0.12 290), oklch(0.27 0.08 330));
}

.orr-avatar--hue-3 {
  background: linear-gradient(145deg, oklch(0.46 0.12 330), oklch(0.27 0.08 10));
}

.orr-avatar--hue-4 {
  background: linear-gradient(145deg, oklch(0.46 0.12 20), oklch(0.27 0.08 60));
}

.orr-avatar--hue-5 {
  background: linear-gradient(145deg, oklch(0.46 0.12 70), oklch(0.27 0.08 110));
}

.orr-avatar--hue-6 {
  background: linear-gradient(145deg, oklch(0.46 0.12 150), oklch(0.27 0.08 190));
}

.orr-avatar--hue-7 {
  background: linear-gradient(145deg, oklch(0.46 0.12 180), oklch(0.27 0.08 220));
}

.orr-avatar .orr-icon {
  font-size: 0.9em;
}

/*
 * Card: glass by default, solid inside another card, holographic (with .orr-holo-edge) for the
 * page's one featured card. Its head holds an optional eyebrow (.orr-label), a title and a
 * description. 16px of padding (12px for a small readout) keeps a grid of cards compact, as the
 * kit's dashboard is; the head sits 12px over the body.
 */
.orr-card {
  --card-pad: var(--space-4);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: var(--radius-lg);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--glass-edge),
    var(--shadow-1);
  transition:
    transform var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

:where(.orr-card) .orr-card {
  background: var(--surface-1);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow:
    inset 0 0 0 1px var(--border-subtle),
    var(--inner-highlight);
}

.orr-card--holo {
  box-shadow:
    var(--glass-edge),
    var(--shadow-2),
    var(--glow-holo);
}

.orr-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--card-pad) var(--card-pad) 0;
}

.orr-card__titles {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.orr-card__title {
  font: 600 0.9375rem / 1.3 var(--font-sans);
  letter-spacing: var(--tracking-ui);
  color: var(--text-primary);
}

.orr-card__desc {
  font: var(--type-caption);
  color: var(--text-muted);
}

.orr-card__body {
  flex: 1;
  min-width: 0;
  padding: var(--card-pad);
}

.orr-card__head + .orr-card__body {
  padding-top: var(--space-3);
}

.orr-card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--card-pad);
  border-top: 1px solid var(--border-subtle);
}

.orr-card--pad-sm {
  --card-pad: var(--space-3);
}

/* Stat: a label over a mono readout; as a dl, dt is the label and dd the value. */
.orr-stat {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
}

.orr-stat__label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.orr-stat__label .orr-icon {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.orr-stat__value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin: 0;
  font: 400 1.875rem / 1 var(--font-mono);
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/*
 * Table, in a scroll region (.table-scroll: role="region", tabindex="0" and a label) so a wide
 * table scrolls by itself on a phone instead of the page. Only column headers (thead th) are mono
 * labels; a row header (tbody th scope="row") reads as the row's title. Rows align to the top,
 * because TaruBot's cells stack several lines.
 */
.table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

.orr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font: var(--type-body);
  text-align: left;
}

.orr-table thead th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
  font: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

.orr-table tbody th,
.orr-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.orr-table tbody th {
  font: 600 var(--text-md) / 1.45 var(--font-sans);
  color: var(--text-primary);
}

.orr-table td {
  color: var(--text-secondary);
}

.orr-table tbody tr:last-child > * {
  border-bottom: 0;
}

.orr-table tbody tr > * {
  transition: background-color var(--dur-fast) var(--ease-out);
}

.orr-table tbody tr:hover > * {
  background: var(--surface-hover);
}

/* TaruBot's shared page vocabulary */

/*
 * The page's lede, directly under the page header, at a comfortable 70ch measure; and quieter
 * supporting text.
 */
.lead {
  max-width: 70ch;
  color: var(--text-secondary);
  font: var(--type-body-lg);
}

.note,
.ref {
  color: var(--text-muted);
  font: var(--type-caption);
}

/*
 * A static callout, such as "Read-only. Update settings with /config in Discord.". With an info
 * icon, the icon sits level with the first line, and the words go in one span after it, so a code
 * chip among them stays in the line rather than become a flex item of its own.
 */
.notice {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.22);
  font: var(--type-caption);
}

.notice:has(> .orr-icon) {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.notice > .orr-icon {
  margin-top: 1px;
  font-size: 1rem;
  color: var(--info);
}

/*
 * A page's notice right after its lead joins the description: 12px under it, not main's
 * --section-gap (shell.ts). The fallback is the entry pages' gap, where no .main sets it.
 */
.lead + .notice {
  margin-top: calc(var(--space-3) - var(--section-gap, var(--space-6)));
}

/* A chip that wraps onto another line gets its padding and corners on every line. */
main code {
  padding: 1px 5px;
  border-radius: var(--radius-xs);
  color: var(--text-primary);
  background: var(--surface-2);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/*
 * A section of a page: its heading row, then content. The title shares its row only with a
 * short count, kept at the end like the design's "All logs"; a description sentence wraps under
 * the title, where it reads as the title's own, at a readable measure (the lead's, a little wider
 * for the smaller text). On the narrowest phones the count goes under the title instead, so a
 * two-word title keeps one line at its full size.
 */
.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--space-1) var(--space-6);
  margin-bottom: var(--space-3);
}

.section-heading > .section-description {
  grid-column: 1 / -1;
}

.section-heading > .section-count {
  grid-row: 1;
  grid-column: 2;
}

.section-description {
  color: var(--text-muted);
  font: var(--type-caption);
}

.section-description:not(.section-count) {
  max-width: 72ch;
}

@media (max-width: 21.24rem) {
  .section-heading > .section-count {
    grid-row: auto;
    grid-column: 1 / -1;
  }
}

/* A role or channel mention (mentions.ts), the design's Discord mention chip. */
.mention {
  padding: 0 4px;
  border-radius: var(--radius-xs);
  color: var(--cyan-200);
  background: oklch(0.8 0.13 210 / 0.16);
  font-weight: 500;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/*
 * Facts: a dl of label and value rows (the design's setting rows), dt and dd as direct siblings.
 * Values may be long untrusted text, so the value column shrinks and wraps.
 */
.facts {
  display: grid;
  grid-template-columns: minmax(6.5rem, 36%) minmax(0, 1fr);
  margin: 0;
}

.facts > dt,
.facts > dd {
  margin: 0;
  padding: var(--space-2) 0;
  border-top: 1px solid var(--border-subtle);
}

.facts > dt:first-of-type,
.facts > dt:first-of-type + dd {
  border-top: 0;
}

.facts > dt {
  padding-right: var(--space-3);
  color: var(--text-muted);
  font: var(--type-caption);
}

.facts > dd {
  color: var(--text-primary);
}

/*
 * A timestamp among facts, on either page, is a mono readout like the times in Background work's
 * rows (the design's face for numbers, IDs and timestamps); a time inside a sentence stays sans.
 */
.facts time,
.settings-facts time {
  color: var(--text-secondary);
  font: var(--type-code);
}

/*
 * A checklist: one row per check, its status token in a fixed column so the texts line up. The
 * column fits the widest token ([WARN], [FAIL], [WAIT]) with the 1px border forced colors and
 * print give it, and no more, so a phone keeps most of the row for the sentence.
 */
.checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-row {
  display: grid;
  grid-template-columns: 3.875rem minmax(0, 1fr);
  align-items: start;
  column-gap: 10px;
  padding: 6px 0;
}

.check-row + .check-row {
  border-top: 1px solid var(--border-subtle);
}

.check-row > .check {
  justify-self: start;
  margin-top: 1px;
}

.check-copy {
  color: var(--text-secondary);
}

/* A disclosure in a page: details and diagnostics open in place, without script. */
main details > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  min-height: 2.25rem;
  color: var(--text-link);
  font: var(--type-ui-sm);
  cursor: pointer;
  list-style: none;
}

main details > summary::-webkit-details-marker {
  display: none;
}

main details > summary::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-inline: 2px 4px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
  transition: transform var(--dur-fast) var(--ease-out);
}

main details[open] > summary::before {
  transform: rotate(45deg);
}

main details > summary:hover {
  color: var(--text-link-hover);
}

/* An empty table or list: a statement, then how to start work; centered, no illustration. */
.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  padding: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  color: var(--text-muted);
  text-align: center;
}

/* Forms: from the Orrery design system's styles/components.css */

/* A form's fields and groups, one under another (views/forms.ts's postForm). */
.form {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

/* Field: the label, then its hint and error, then the control. */
.orr-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.orr-field__label {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text-secondary);
  font: 600 0.8125rem / 1.2 var(--font-sans);
}

.orr-field__hint {
  color: var(--text-muted);
  font: var(--type-caption);
}

.orr-field__hint--error {
  color: var(--danger);
  font-weight: var(--weight-semibold);
}

/*
 * Input, textarea, number and select. Fix: the frame is a real border (forced colors keep it), in
 * the opaque control tone, since it is all that shows where to type (WCAG 1.4.11: at least 3:1),
 * and focus is base.ts's outline with the design's glow beside it.
 */
.orr-input {
  width: 100%;
  min-width: 0;
  min-height: var(--control-md);
  padding: 6px var(--space-3);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  background: oklch(0.1 0.026 280 / 0.7);
  box-shadow: inset 0 2px 6px oklch(0 0 0 / 0.25);
  font: var(--type-ui);
  font-size: 1rem;
  font-weight: var(--weight-medium);
  transition:
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

.orr-input:hover:not(:disabled) {
  border-color: var(--border-control-hover);
}

.orr-input:focus-visible {
  border-color: var(--border-accent);
  box-shadow:
    0 0 0 3px oklch(0.8 0.13 210 / 0.14),
    var(--glow-cyan-sm);
}

.orr-input::placeholder {
  color: var(--text-faint);
}

/*
 * A control an error summary link scrolls to keeps its label, hint and error in view above it: the
 * kit puts those between the label and the control, and the shell's scroll padding only clears the
 * sticky bar from the control itself. In rem, so it grows with the text size; most for a field
 * with a hint (and an error), and for the first field under a form's own error.
 */
.orr-field > .orr-input {
  scroll-margin-top: 3.5rem;
}

.orr-field:has(> .orr-field__hint) > .orr-input {
  scroll-margin-top: 6rem;
}

.form-error + .orr-field > .orr-input {
  scroll-margin-top: 9rem;
}

/* A field with a problem: the border carries it, and the message under the label says it. */
.orr-input[aria-invalid="true"],
.orr-input[aria-invalid="true"]:hover {
  border-color: oklch(0.74 0.15 18 / 0.75);
}

.orr-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.orr-input {
  min-height: 88px;
  padding-block: 10px;
  font-weight: var(--weight-regular);
  line-height: 1.5;
  resize: vertical;
}

/* A position or a count: a few digits, so the field stays short. */
input.orr-input[type="number"] {
  max-width: 8rem;
}

/*
 * Phones zoom into a field whose text is under 16px, so the controls' text is 1rem; only where a
 * mouse is used on a wide screen does it match the 14px buttons and the kit's dense pages.
 */
@media (min-width: 64rem) and (pointer: fine) {
  .orr-input {
    font-size: 0.875rem;
  }
}

/* Browsers give a select its own line height; without block padding it matches the inputs. */
select.orr-input {
  padding-block: 0;
  cursor: pointer;
}

select.orr-input option {
  color: var(--text-primary);
  background: var(--night-850);
}

/*
 * Checkbox and radio: one row per choice, the native input then its label and description. Fix:
 * the input stays real and visible, tinted by accent-color.
 */
.orr-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.orr-check__input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.0625rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.orr-check__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.orr-check__label {
  color: var(--text-primary);
  font: var(--type-ui);
  cursor: pointer;
}

.orr-check__desc {
  color: var(--text-muted);
  font: var(--type-caption);
}

.orr-check__input:disabled,
.orr-check__input:disabled + .orr-check__text > .orr-check__label {
  cursor: not-allowed;
}

.orr-check__input:disabled + .orr-check__text {
  opacity: 0.45;
}

/* A group of choices: the fieldset's own frame and padding go, the legend reads as a label. */
.choice-group {
  display: grid;
  gap: 7px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group__legend {
  float: left;
  width: 100%;
  margin-bottom: 2px;
  padding: 0;
  color: var(--text-secondary);
  font: 600 0.8125rem / 1.2 var(--font-sans);
}

.choice-group__legend + * {
  clear: both;
}

.choice-group__choices {
  display: grid;
  gap: var(--space-3);
  margin-top: 3px;
}

/* Button: the danger variant, for a delete inside its confirmation (views/forms.ts). */
.orr-btn--danger {
  color: var(--danger);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.15 18 / 0.35);
}

.orr-btn--danger:hover:not(:disabled),
.orr-btn--danger:focus-visible {
  color: oklch(0.88 0.08 18);
  box-shadow:
    inset 0 0 0 1px oklch(0.74 0.15 18 / 0.6),
    var(--glow-danger);
}

.orr-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/*
 * The error summary at the top of a refused form: a danger-toned panel with a link to each field.
 * It takes focus on load, so base.ts's outline marks it.
 */
.error-summary {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.15 18 / 0.45);
}

main .error-summary__title {
  color: var(--text-primary);
  font: var(--type-subtitle);
}

.error-summary__list {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.25rem;
}

.error-summary__list a {
  color: var(--danger);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* A form's buttons: a row that wraps, after the fields. */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
}

/* A disclosure's contents: an editor, or a confirmation's consequence and its button. */
.disclosure__body {
  display: grid;
  gap: var(--space-3);
  padding-top: var(--space-2);
}

/* The notice after a successful save, shown once on the page the form redirected to. */
.notice--success {
  color: var(--text-primary);
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 162 / 0.3);
}

/*
 * The redirect's #status fragment scrolls on the first frame, while the page entrance still holds
 * main shrunk and lowered (effects.ts's orr-rise-in); the animation then slid the notice up under
 * the sticky bar, by more the taller the page. A page that lands on its notice skips the entrance,
 * as reduced motion does.
 */
main.orr-enter:has(#status) {
  animation: none;
}

/*
 * On phones, a form's buttons stay in reach while its fields scroll: the row sticks to the bottom
 * of the screen, solid so the fields don't show through, and clear of the home indicator. The
 * scroll padding keeps a focused field from scrolling in under the row (WCAG 2.4.11), as the
 * shell's does for its top bar. A short viewport (a phone in landscape, or 400% zoom) can't spare
 * the room, so there the row stays in its place, like the shell's bar. In a card, the row reaches
 * the card's edges, like a card's foot, rather than sitting in it as a dark inset band. It is slim
 * (8px above and below the button), so it takes as little of a phone's screen as it can.
 */
@media (max-width: 63.99rem) and (min-height: 30rem) {
  html:has(.form-actions) {
    scroll-padding-bottom: calc(5rem + env(safe-area-inset-bottom));
  }
  .form-actions {
    position: sticky;
    bottom: 0;
    z-index: var(--z-sticky);
    padding-block: var(--space-2) calc(var(--space-2) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-1);
  }
  /* 1px short of each edge, so the card's own hairline edge stays whole beside the row. */
  .orr-card .form-actions {
    margin-inline: calc(1px - var(--card-pad));
    padding-inline: calc(var(--card-pad) - 1px);
  }
}

/* Shell: the console frame, after the Orrery dashboard kit */

/* Keeps a focused element or an anchor target clear of the sticky bars (WCAG 2.4.11). */
html {
  scroll-padding-top: 7.5rem;
}

/*
 * The nebula wash behind the console's glass: a fixed layer rather than
 * background-attachment: fixed, which repaints on every scroll and which iOS ignores.
 */
.console-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--nebula-cyan), var(--nebula-violet);
  pointer-events: none;
}

.app {
  min-height: 100dvh;
}

/* The bar on phones; the sidebar from 64rem. */
.sidebar {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "wordmark switch account"
    "nav nav nav";
  align-items: center;
  column-gap: var(--space-3);
  padding: 10px var(--space-4) 0;
  background: oklch(0.12 0.03 280 / 0.72);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar > .wordmark {
  grid-area: wordmark;
}

.sidebar > .server-switch {
  grid-area: switch;
}

.sidebar > .side-nav {
  grid-area: nav;
}

.sidebar > .account {
  grid-area: account;
}

/* The type-only wordmark (no logo exists), in the display face (Sora). */
.wordmark {
  font: 600 1.125rem / 1 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-title);
  white-space: nowrap;
  color: var(--text-primary);
  text-decoration: none;
}

/*
 * The server switcher: a link back to the server list, filled like the kit's but without its own
 * blur, since it sits on the glass bar. A long name wraps onto a second line, then truncates; the
 * full name is on the server list.
 */
.server-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  background: var(--glass-fill);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--inner-highlight);
  transition: box-shadow var(--dur-base) var(--ease-out);
}

.server-switch:hover {
  box-shadow:
    inset 0 0 0 1px var(--border-accent),
    var(--inner-highlight),
    var(--glow-cyan-sm);
}

.server-switch .orr-avatar {
  --size: 28px;
}

.server-switch__text {
  display: grid;
  flex: 1;
  gap: 4px;
  min-width: 0;
}

.server-switch__name {
  font: 600 var(--text-md) / 1.2 var(--font-sans);
}

/*
 * The name itself is the isolate (untrusted() gives it dir="auto"), so the two-line clamp and its
 * ellipsis go on it: there the ellipsis cuts the name's end in the name's own direction. On the
 * line box around it, a name in a right-to-left script would lose its start and show only a
 * trailing Latin part. Two lines tell apart servers whose names share a long prefix; a name with
 * no spaces breaks anywhere rather than run out of the box. The name aligns to its own start: the
 * clamp puts its ellipsis after the last line's end, which a right-to-left name forced to the left
 * would push out of the box, so a cut name would look whole.
 */
.server-switch__name > [dir="auto"] {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-align: start;
}

.server-switch__hint {
  overflow: hidden;
  font: 500 var(--text-2xs) / 1.2 var(--font-mono);
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-muted);
}

.server-switch > .orr-icon {
  font-size: 1rem;
  color: var(--text-muted);
}

/* The page navigation: a strip of tabs on phones, the kit's nav items in the sidebar. */
.side-nav {
  min-width: 0;
  margin-top: 6px;
}

.side-nav__caption,
.side-nav__context {
  display: none;
}

.side-nav__list {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px;
  color: var(--text-muted);
  font: var(--type-ui);
  text-align: center;
  text-decoration: none;
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.nav-item .orr-icon {
  font-size: 1rem;
}

.nav-item:hover,
.nav-item[aria-current="page"] {
  color: var(--text-primary);
}

.nav-item[aria-current="page"] {
  font-weight: 600;
}

/* Glow is for the active item only (the design's rule). */
.nav-item[aria-current="page"] .orr-icon {
  color: var(--cyan-400);
  filter: drop-shadow(0 0 6px currentColor);
}

.nav-item::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: var(--cyan-400);
  box-shadow: 0 0 10px var(--cyan-400);
  opacity: 0;
}

.nav-item[aria-current="page"]::after {
  opacity: 1;
}

/*
 * The account menu: a disclosure whose panel floats under its summary on phones and over it in
 * the sidebar. The panel has the strong glass's gradient over an opaque surface and no blur of its
 * own: inside the bar's glass, a nested backdrop blur only reaches the bar, so the page and the
 * sidebar's text would show through it unblurred (and the design never nests glass).
 */
.account {
  position: relative;
}

.account__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: var(--control-md);
  padding: 0 10px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font: var(--type-ui-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  list-style: none;
  box-shadow: inset 0 0 0 1px var(--border-default);
  transition:
    color var(--dur-fast) var(--ease-out),
    background-color var(--dur-fast) var(--ease-out);
}

.account__summary::-webkit-details-marker {
  display: none;
}

.account__summary:hover,
.account[open] > .account__summary {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.account__summary .orr-icon {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: transform var(--dur-fast) var(--ease-out);
}

.account[open] > .account__summary .orr-icon {
  transform: rotate(180deg);
}

.account__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: var(--z-dropdown);
  display: grid;
  gap: 2px;
  width: 16rem;
  max-width: calc(100vw - 2 * var(--space-4));
  padding: 8px;
  border-radius: var(--radius-lg);
  background: var(--glass-fill-strong), var(--surface-1);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--glass-edge),
    var(--shadow-3);
}

.account__caption {
  padding: 6px 10px 8px;
}

.account__menu form {
  margin: 0;
}

.account__action {
  justify-content: flex-start;
  text-align: start;
}

.frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* The top bar (from 64rem): the page's label, repeating the h1 for sight only. */
.topbar {
  display: none;
}

.topbar__separator {
  margin: 0 10px;
  color: var(--text-faint);
}

.topbar__page {
  color: var(--text-secondary);
}

/*
 * The page: its header, then the view's sections, one column of blocks --section-gap apart. The
 * column track is minmax(0, 1fr), so a wide table scrolls in its own region instead of widening
 * the page.
 */
.main {
  --section-gap: var(--space-5);
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--section-gap);
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-10);
}

/*
 * The page header: an eyebrow, then the h1 in the display face (Sora), close together; a view's
 * opening .lead reads as its description, 8px under it.
 */
.page-header {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.page-header__title {
  color: var(--text-primary);
  font: 600 clamp(1.625rem, 4.5vw, 2.125rem) / 1.1 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-display);
}

.page-header + .lead {
  margin-top: calc(var(--space-2) - var(--section-gap));
}

/*
 * The footer: version, source and licenses (AGPL-3.0 section 13), on every page. Each link stays
 * on one line, so a phone never splits "License (AGPL-3.0-only)" at its hyphen.
 */
.site-footer {
  width: 100%;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--space-4) var(--space-6);
  color: var(--text-muted);
  font: var(--type-caption);
}

.site-footer p {
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-subtle);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 3px;
  white-space: nowrap;
}

.site-footer a:hover {
  color: var(--text-primary);
  text-decoration-color: currentColor;
}

/*
 * The bar, below 64rem. The open account menu hangs under the whole bar, at the bar's edge, so it
 * never covers the navigation strip; while it is open the scroll padding grows past its panel, so
 * the panel can't hide whatever takes focus either (WCAG 2.4.11). A disclosure stays open until
 * its summary is used again, so the panel must stay clear of focus by itself.
 */
@media (max-width: 63.99rem) {
  .sidebar > .account {
    position: static;
  }
  .sidebar .account__menu {
    right: var(--space-4);
  }
}

/*
 * Tablets, where the bar has room to spare, so nothing stretches to fill it. The switcher is a
 * pill sized to the server's name, up to 20rem, not a full-width select. The tabs are the design
 * kit's: sized to their labels, 2px apart, the underline 10px in from each side, and the first
 * tab's 12px padding in the gutter, so its label starts in line with the wordmark and the heading.
 */
@media (min-width: 40rem) and (max-width: 63.99rem) {
  .sidebar > .server-switch {
    justify-self: start;
    max-width: 20rem;
  }
  .side-nav__list {
    display: flex;
    gap: 2px;
    margin-inline-start: -12px;
  }
  .nav-item {
    padding-inline: 12px;
  }
  .sidebar .account__menu {
    right: var(--gutter);
  }
}

/*
 * The account menu's summary is as tall as the switcher in the row they share. Not under 15rem,
 * where the bar wraps and its scroll padding (below) is measured for the shorter summary.
 */
@media (min-width: 15rem) and (max-width: 63.99rem) {
  .sidebar .account__summary {
    min-height: 44px;
  }
}

@media (max-width: 63.99rem) and (min-height: 30rem) {
  html:has(.sidebar > .account[open]) {
    scroll-padding-top: 15.5rem;
  }
}

/*
 * A short viewport, such as a phone in landscape or 400% zoom: a sticky bar would take half the
 * screen, so it scrolls away with the page and no longer needs the scroll padding.
 */
@media (max-width: 63.99rem) and (max-height: 29.99rem) {
  .sidebar {
    position: relative;
  }
  html {
    scroll-padding-top: 0;
  }
}

/*
 * Narrow phones: the switcher keeps the server's name, moving its hint to assistive text, and on
 * the narrowest drops the decorative initials too. The navigation tabs get the smaller UI size and
 * tighter padding, and below 360px lose their icons, so each label keeps to one line; a larger
 * text setting may still wrap one, rather than spill out of its tab.
 */
@media (max-width: 23.99rem) {
  .server-switch .orr-avatar {
    display: none;
  }
}

/*
 * The phone tab strip: each tab at least as wide as its longest word, so a label wraps only
 * between words (body's overflow-wrap: anywhere would split "configuration" mid-word and grow the
 * sticky bar), and the strip scrolls sideways when even that doesn't fit, as with a large text
 * setting on a narrow phone, rather than widen the page. A scroll box clips at its edges, so the
 * padding keeps the focus outline (2px, offset 2px) inside it, and the negative margin keeps the
 * tabs where they were.
 */
@media (max-width: 39.99rem) {
  .side-nav__list {
    grid-auto-columns: minmax(min-content, 1fr);
    margin: -4px;
    padding: 4px;
    overflow-x: auto;
  }
  .nav-item {
    overflow-wrap: normal;
  }
}

@media (max-width: 22.49rem) {
  .nav-item .orr-icon {
    display: none;
  }
}

/*
 * Text this large for the screen (under 15rem across, such as a 320px phone at a 24px default
 * font size): one row can't hold the wordmark, the switcher and the account menu. The switcher
 * takes a row of its own under the other two, which wrap onto two rows themselves if even they
 * don't fit, and the open account menu, under the taller bar, needs more scroll padding. A footer
 * link may wrap again, rather than widen the page. The default text size never gets here, as a
 * page is at least 20rem wide.
 */
@media (max-width: 14.99rem) {
  .sidebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2) var(--space-3);
  }
  .sidebar > .account {
    order: 1;
  }
  .sidebar > .server-switch {
    flex: 1 0 100%;
    order: 2;
  }
  .sidebar > .side-nav {
    flex: 1 0 100%;
    order: 3;
  }
  .site-footer a {
    white-space: normal;
  }
}

@media (max-width: 14.99rem) and (min-height: 30rem) {
  html:has(.sidebar > .account[open]) {
    scroll-padding-top: 17rem;
  }
}

@media (max-width: 29.99rem) {
  .server-switch__hint {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .server-switch > .orr-icon {
    display: none;
  }
  .nav-item {
    padding-inline: 4px;
    font: var(--type-ui-sm);
  }
}

@media (min-width: 30rem) {
  .wordmark {
    font-size: 1.25rem;
  }
}

/* From tablet width, the 32px gutters, and 24px between the page's blocks. */
@media (min-width: 40rem) {
  .sidebar {
    padding-inline: var(--gutter);
  }
  .main {
    --section-gap: var(--space-6);
    padding-inline: var(--gutter);
  }
  .site-footer {
    padding-inline: var(--gutter);
  }
}

@media (min-width: 64rem) {
  html {
    scroll-padding-top: calc(var(--topbar-h) + 1.5rem);
  }
  .app {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }
  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
    align-self: start;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 20px 14px 14px;
    background: oklch(0.105 0.027 280 / 0.78);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 0;
  }
  .sidebar > .wordmark {
    padding: 0 8px;
  }
  .server-switch {
    padding: 8px;
  }
  .server-switch .orr-avatar {
    --size: 34px;
  }
  .side-nav {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    margin: 0;
  }
  .side-nav__caption {
    display: block;
    padding: 6px 10px 8px;
    font-size: var(--text-2xs);
  }
  .side-nav__list {
    grid-auto-flow: row;
    gap: 2px;
  }
  .nav-item {
    justify-content: flex-start;
    gap: 11px;
    min-height: 36px;
    padding: 0 10px;
    border-radius: 9px;
    text-align: left;
  }
  .nav-item .orr-icon {
    font-size: 1.125rem;
  }
  .nav-item:hover {
    background: var(--surface-hover);
  }
  /*
   * The current page: the pill's accent edge is the cue that reaches 3:1 against the sidebar, as
   * the strip's underline does on phones; the fill and the weight only add to it.
   */
  .nav-item[aria-current="page"] {
    background: var(--surface-active);
    box-shadow:
      inset 0 0 0 1px var(--border-accent),
      var(--inner-highlight);
  }
  .nav-item::after {
    display: none;
  }
  .side-nav__context {
    display: grid;
    gap: var(--space-2);
    margin-top: auto;
    padding: var(--space-4) 10px 0;
    color: var(--text-muted);
    font: var(--type-caption);
  }
  /* Two notes, not one ragged paragraph: what the pages cover, then where changes happen. */
  .side-nav__context > :first-child {
    color: var(--text-secondary);
  }
  .side-nav__note {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
  }
  .side-nav__note > .orr-icon {
    margin-top: 0.15em;
    color: var(--info);
  }
  .sidebar > .account {
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
  }
  .sidebar .account__summary {
    min-height: 40px;
    box-shadow: none;
  }
  .sidebar .account__summary .orr-icon {
    transform: rotate(180deg);
  }
  .sidebar .account[open] > .account__summary .orr-icon {
    transform: none;
  }
  .sidebar .account__menu {
    top: auto;
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    width: auto;
  }
  /* The label starts where the page's column starts, however wide the screen (as .main). */
  .topbar {
    position: sticky;
    top: 0;
    z-index: var(--z-sticky);
    display: flex;
    align-items: center;
    height: var(--topbar-h);
    padding: 0 max(var(--gutter), calc((100% - var(--content-max)) / 2));
    background: oklch(0.12 0.03 280 / 0.6);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
  }
  .main {
    padding-top: var(--space-6);
  }
}

/* Entry pages: after the Orrery website kit */
.entry-page {
  display: flex;
  flex-direction: column;
}

/*
 * The starfield and the rings, fixed to the viewport behind the page (layout.ts's backdrop): they
 * take no space, so a phone's layout never shifts for them, and they don't scroll with the page.
 */
.orr-starfield.entry-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.entry-backdrop > .entry-orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 150vmin);
  opacity: 0.45;
  transform: translate(-50%, -50%);
}

/*
 * Where the planets start, and where they rest under reduced motion. From twelve o'clock the cyan
 * planet would sit in the heading and the violet one on the bar's hairline. The orbit is centered
 * on the screen, so the inner ring always crosses the centered content and no angle clears all of
 * it: these were measured on every entry page from 320px to 2560px wide to keep both planets off
 * every heading (on a phone the cyan one can still rest behind the No access card's text).
 * `rotate` adds to the spin's transform, so the loop turns on from there.
 */
.entry-orbit > .orr-orbit__ring--inner {
  rotate: 105deg;
}

.entry-orbit > .orr-orbit__ring:not(.orr-orbit__ring--middle, .orr-orbit__ring--inner) {
  rotate: 40deg;
}

/*
 * The bar over every entry page but the sign-in: the wordmark home, the account menu, which wraps
 * under the wordmark when a large text setting leaves no room beside it. It stays at the bar's
 * end when it wraps: its menu opens leftward from the summary's right edge (shell.ts), so a summary
 * at the start would push the menu off the screen.
 *
 * The bar is as tall without the account menu (no access, or an error when signed out) as with
 * it, so its hairline and the centered page under it don't jump between entry pages: at least the
 * summary's height (shell.ts), the padding and the hairline. It is a floor, so a large text
 * setting still grows the bar around its contents.
 */
.entry-bar {
  --bar-pad-block: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  min-height: calc(var(--control-md) + 2 * var(--bar-pad-block) + 1px);
  padding: var(--bar-pad-block) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.entry-bar > .account {
  margin-inline-start: auto;
}

/*
 * The page: one centered column, vertically centered when it is shorter than the screen. The
 * heading and lede center over it; a card or the tile grid follows.
 */
.entry {
  display: grid;
  flex: 1 0 auto;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: center;
  gap: var(--space-6);
  width: 100%;
  max-width: calc(1080px + 2 * var(--space-10));
  margin: 0 auto;
  padding: var(--space-10) var(--space-4) var(--space-16);
}

.entry > .page-header {
  justify-items: center;
  text-align: center;
}

.entry > .lead {
  margin-top: calc(var(--space-2) - var(--space-6));
  text-align: center;
}

/* "No access", an error, or no servers: one card of short paragraphs and a way home. */
.entry-panel {
  display: grid;
  gap: var(--space-3);
  width: min(560px, 100%);
  padding: var(--space-6);
}

.entry-panel__lead {
  color: var(--text-primary);
  font: var(--type-body-lg);
}

.entry-panel > p:not([class]) {
  color: var(--text-secondary);
}

/* Its links: back to the page a refused form came from, when there is one, then home. */
.entry-panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.entry-page .site-footer {
  text-align: center;
}

/*
 * The server list: a tile per server, its initials and name, then its page links. The columns
 * keep a tile's width and center as a group, so one or two servers sit under the heading.
 */
.servers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 340px));
  justify-content: center;
  gap: 14px;
  justify-self: stretch;
  margin: var(--space-2) 0 0;
  padding: 0;
  list-style: none;
}

.server-tile {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5);
}

.server-tile__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.server-tile .orr-avatar {
  --size: 52px;
}

.server-tile__titles {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.server-tile__name {
  color: var(--text-primary);
  font: 600 var(--text-lg) / 1.3 var(--font-sans);
  letter-spacing: var(--tracking-ui);
}

.server-tile__links {
  display: grid;
  margin: 0;
  padding: 6px 0 0;
  border-top: 1px solid var(--border-subtle);
  list-style: none;
}

.server-tile__links > li + li {
  border-top: 1px solid var(--border-subtle);
}

.server-tile__link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: 2px -10px;
  padding: 0 10px;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font: var(--type-ui);
  text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.server-tile__link .orr-icon {
  font-size: 1rem;
  color: var(--cyan-400);
}

.server-tile__label {
  flex: 1;
  min-width: 0;
}

.server-tile__link > .orr-icon:last-child {
  color: var(--text-muted);
  transition:
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}

.server-tile__link:hover {
  background: var(--surface-hover);
}

.server-tile__link:hover > .orr-icon:last-child {
  color: var(--text-primary);
  transform: translateX(2px);
}

/*
 * The sign-in (titled with the brand): the large wordmark heading, the welcome copy and the
 * login card. On a phone the card comes right after the heading, ahead of the copy; the copy holds
 * no control, so the keyboard order is unchanged.
 */
.entry--welcome {
  grid-template-columns: minmax(0, 36rem);
  grid-template-areas:
    "header"
    "sign-in"
    "copy";
  justify-content: center;
  justify-items: stretch;
  gap: var(--space-8);
  max-width: calc(1160px + 2 * var(--space-10));
}

.entry--welcome > .page-header {
  grid-area: header;
  justify-items: start;
  text-align: left;
}

.entry--welcome .page-header__eyebrow {
  color: var(--cyan-400);
}

/*
 * The brand heading, up to the display scale's top step: TaruBot's largest type. Its smallest size
 * is also capped by the screen's width, so a large text setting on a phone can't split the name.
 */
.entry--welcome .page-header__title {
  font-size: clamp(min(2.75rem, 14vw), 10vw, var(--display-2xl));
  line-height: 1.05;
}

.welcome-copy {
  grid-area: copy;
  display: grid;
  gap: var(--space-5);
  min-width: 0;
  max-width: 36rem;
}

.welcome-copy__title {
  font: 600 clamp(var(--display-sm), 3vw, var(--display-md)) / 1.15 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-display);
}

.welcome-copy__lead {
  color: var(--text-secondary);
  font: 400 var(--text-xl) / 1.6 var(--font-sans);
}

.features {
  display: grid;
  gap: var(--space-3);
  margin: var(--space-2) 0 0;
}

.feature {
  padding: var(--space-4) 18px;
  border-radius: var(--radius-lg);
  background: var(--glass-fill);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--glass-edge);
}

.feature dt {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--text-primary);
  font: var(--type-subtitle);
  letter-spacing: var(--tracking-ui);
}

.feature dd {
  margin: 6px 0 0 calc(36px + var(--space-3));
  color: var(--text-muted);
}

/* A feature's icon tile, a fixed size: one of the places the design lets an icon glow. */
.feature__icon {
  display: inline-grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--cyan-400);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.25);
  font-size: 18px;
}

.feature__icon--violet {
  color: var(--violet-400);
  background: oklch(0.8 0.13 298 / 0.12);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 298 / 0.25);
}

.feature__icon .orr-icon {
  filter: drop-shadow(0 0 6px currentColor);
}

/* The login card: the page's one holographic card and its one primary button. */
.sign-in {
  grid-area: sign-in;
  display: grid;
  gap: var(--space-4);
  padding: var(--space-6);
}

.sign-in__title {
  font: 600 clamp(var(--display-sm), 3vw, var(--display-md)) / 1.15 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-display);
}

.sign-in__text {
  color: var(--text-muted);
}

.sign-in .orr-hairline {
  margin-block: var(--space-1);
}

.sign-in .disclosure {
  color: var(--text-muted);
  font: var(--type-caption);
}

.sign-in .disclosure > p {
  margin-top: var(--space-2);
}

/* The public status page's link (2.41.0), quiet under the disclosure. */
.sign-in__status {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--text-muted);
  font: var(--type-caption);
}

.sign-in__status > .orr-icon {
  flex-shrink: 0;
  align-self: center;
  color: var(--cyan-400);
}

@media (min-width: 40rem) {
  .entry-bar,
  .entry {
    padding-inline: var(--gutter);
  }
}

@media (min-width: 64rem) {
  .entry-bar {
    --bar-pad-block: 16px;
    padding: var(--bar-pad-block) 40px;
  }
  .entry {
    padding: var(--space-16) var(--space-10) var(--space-24);
  }
  .entry--welcome {
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-areas:
      "header sign-in"
      "copy sign-in";
    align-items: start;
    column-gap: 72px;
  }
  .entry--welcome > .sign-in {
    align-self: center;
  }
}

/* Server configuration */

/* The summary: the health snapshot and the state readouts, closer together than sections. */
.config-summary {
  display: grid;
  gap: var(--space-4);
}

/*
 * Health snapshot. Phones stack the head, the readouts and the foot; from 48rem the readouts sit
 * beside the heading. The instrument scale divides both from the foot.
 */
.health-card > .orr-card__head {
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-4);
}

/*
 * The featured card's title, in the display face a step under the section titles at every width,
 * tracked as a small title; a long count wraps onto a second line instead.
 */
.health-card__title {
  font-size: 1.25rem;
  letter-spacing: var(--tracking-title);
}

/*
 * A tone tile behind the mark, by the worst check; the heading's words carry the meaning. The tile
 * is a fixed 44px, so its icon keeps a fixed size too.
 */
.health-card__mark {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  font-size: 22px;
}

.health-card__mark--ok {
  color: var(--success);
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 162 / 0.3);
}

.health-card__mark--wait {
  color: var(--cyan-400);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.3);
}

.health-card__mark--warn {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.3);
}

.health-card__mark--fail {
  color: var(--danger);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.15 18 / 0.32);
}

/* The counts sit side by side, wrapping whole rather than breaking a label on the narrowest phones. */
.health-card__counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4) var(--space-5);
  margin: 0;
}

.health-count {
  min-width: 4rem;
}

.health-count > .orr-stat__label {
  white-space: nowrap;
}

/* Each count's tone, as a dot before its label: passed, waiting, off. */
.health-count > .orr-stat__label::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.health-count--ok > .orr-stat__label::before {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

.health-count--wait > .orr-stat__label::before {
  background: var(--cyan-400);
  box-shadow: 0 0 8px var(--cyan-400);
}

.health-count--off > .orr-stat__label::before {
  background: var(--night-300);
}

.health-card__scale {
  margin: 0 var(--card-pad);
}

.health-card__foot {
  justify-content: space-between;
  border-top: 0;
}

/*
 * The state readouts: three small cards side by side from 40rem. On phones they stack, each a
 * single line with its label at the start and the state at the end, so the stack stays short.
 */
.state-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.state-readout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
}

/* A state in words, with its check token (if any) level with the first line when the words wrap. */
.state-readout > .orr-stat__value {
  align-items: flex-start;
  gap: var(--space-2);
  font: var(--type-subtitle);
  letter-spacing: var(--tracking-ui);
}

.state-readout > .orr-stat__value > .check {
  margin-top: 1px;
}

/* Settings: the read-only notice, then cards that add a column whenever one fits. */
.settings-notice {
  margin-bottom: var(--space-4);
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-4);
}

/* A card's facts: each mono label over its value, rows split by hairlines. */
.settings-facts {
  margin: 0;
}

.settings-facts > dt {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.settings-facts > dt:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.settings-facts > dd {
  margin: 6px 0 0;
  padding-bottom: var(--space-3);
  color: var(--text-primary);
}

.settings-facts > dd:last-of-type {
  padding-bottom: 0;
}

/* A command, ID or mode stays whole; untrusted names around it still wrap. */
.settings-facts code {
  white-space: nowrap;
}

/* The roster diagnostic, opened in place: untrusted text, wrapped rather than scrolled. */
.roster-diagnostic pre {
  max-width: 100%;
  margin: var(--space-2) 0 0;
  white-space: pre-wrap;
}

.roster-diagnostic pre code {
  display: block;
  padding: var(--space-3);
  white-space: inherit;
  overflow-wrap: anywhere;
}

/*
 * The health checklist: one card of groups, each group's name above (later beside) its rows. The
 * note under the heading keeps the section description's measure.
 */
.checklist-note {
  max-width: 72ch;
  margin-bottom: var(--space-4);
}

.checklist-card > .orr-card__body {
  padding-block: var(--space-1);
}

.check-group {
  display: grid;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}

.check-group + .check-group {
  border-top: 1px solid var(--border-subtle);
}

.check-group__title {
  font: 600 var(--text-md) / 1.3 var(--font-sans);
}

.check-group__fold > summary .orr-icon {
  font-size: 1rem;
  color: var(--success);
}

@media (min-width: 40rem) {
  .state-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .state-readout {
    display: grid;
    justify-content: normal;
  }
}

@media (min-width: 48rem) {
  .health-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .health-card > .orr-card__head {
    padding-bottom: var(--card-pad);
  }
  .health-card > .orr-card__body {
    padding: var(--card-pad) var(--card-pad) var(--card-pad) 0;
  }
  .health-card__counts {
    flex-wrap: nowrap;
    gap: var(--space-8);
  }
  .health-count {
    min-width: 5.5rem;
  }
  .health-card__scale,
  .health-card__foot {
    grid-column: 1 / -1;
  }
  .check-group {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: var(--space-6);
    align-items: start;
    padding-bottom: var(--space-1);
  }
  /* Level with the first row's text (the rows' own 6px top padding). */
  .check-group__title {
    padding-top: 6px;
  }
}

/*
 * Text this large for the screen (under 15rem across, as shell.ts's bar): a whole FC ID can be
 * wider than its card, so commands and IDs wrap like the text around them. The default text size
 * never gets here, as a page is at least 20rem wide.
 */
@media (max-width: 14.99rem) {
  .settings-facts code {
    white-space: normal;
  }
}

@media print {
  /* A long checklist may break between groups, though never inside one. */
  .checklist-card.orr-card {
    break-inside: auto;
  }
  .check-group {
    break-inside: avoid;
  }
  .health-card__scale {
    display: none;
  }
}

/* Background work */

/* Process health */
.process-health__checks {
  display: grid;
}

.process-health__summary .check-copy {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.process-health .orr-scale {
  margin-top: var(--space-5);
}

/* A page's sections: the heading (title, count and description), then content, 16px apart. */
.status-section {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.status-section > .section-heading {
  margin-bottom: 0;
}

/* The sample counts: a stat card per marker, the badge over its count. */
.metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin: 0;
}

.metrics > .orr-stat {
  gap: 14px;
  padding: var(--space-3);
}

.metrics .metric-none .orr-stat__value {
  color: var(--text-muted);
}

/* At a large text setting, a badge wraps inside its card rather than run out of it. */
.metrics .marker {
  white-space: normal;
}

/* The tables: the card is the scroll region, so it is a block, not the card's flex column. */
.status-section > .table-scroll {
  display: block;
}

/*
 * The narrowest a table may be before its region scrolls, so long names wrap instead of squeezing
 * every column. Unbreakable badges and times set most of the width; the column labels wrap
 * between words, so both tables fit a tablet's column. Words break only when nothing else fits
 * (body's overflow-wrap: anywhere would split "Completed" sooner than widen a column).
 */
.status-table {
  min-width: 40rem;
  overflow-wrap: break-word;
}

.status-table thead th {
  white-space: normal;
}

/* Cells keep 12px a side between columns, and the design's 16px at the table's outer edges. */
.status-table thead th,
.status-table tbody th,
.status-table td {
  padding-inline: 12px;
}

.status-table tr > :first-child {
  padding-left: 16px;
}

.status-table tr > :last-child {
  padding-right: 16px;
}

/*
 * The details column has its share of the table before any disclosure opens. An open panel adds
 * nothing to the column's width (its inline size is contained, so the table never reflows) and
 * lays out in the space the column has: its facts sit beside their labels where the column is
 * wide, and under them where it isn't.
 */
.status-table thead th:last-child {
  width: 32%;
}

.cell-title,
.cell-meta {
  display: block;
}

.cell-title {
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.cell-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font: var(--type-caption);
}

.status-table .marker + .cell-meta {
  margin-top: var(--space-2);
}

/* A column's name inside a cell (views/status.ts): only a stacked card shows it, see below. */
.cell-label {
  display: none;
}

/* Short IDs and job kinds read as plain mono text in a row, not as code chips. */
.cell-meta code,
.row-details > summary code {
  padding: 0;
  background: none;
  color: inherit;
  white-space: nowrap;
}

/*
 * Each moment in a row is a small label and its time: the label over the time, like the design's
 * log times, until a wide screen has room for the labels as a column beside the times.
 */
.time-stack {
  display: grid;
  gap: var(--space-2);
}

.moment {
  display: grid;
  gap: 2px;
}

.time-stack time {
  color: var(--text-secondary);
  font: var(--type-code);
}

/* A run's aggregate outcome: its words, after a dot in the outcome's tone. */
.run-outcome {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
}

.run-outcome::before {
  content: "";
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--run-tone, var(--text-muted));
  box-shadow: 0 0 8px var(--run-tone, transparent);
  transform: translateY(-1px);
}

.run-outcome--queued {
  --run-tone: var(--info);
}

.run-outcome--completed {
  --run-tone: var(--success);
}

.run-outcome--blocked {
  --run-tone: var(--warning);
}

.run-outcome--paused {
  --run-tone: var(--text-muted);
}

.run-outcome--failed {
  --run-tone: var(--danger);
}

.run-progress {
  display: block;
  color: var(--text-primary);
  font: var(--type-readout);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* A row's disclosure: its summary under the badge, its body a recessed solid panel. */
.status-table .marker + .row-details,
.status-table .cell-meta + .row-details {
  margin-top: var(--space-1);
}

.row-details > summary {
  white-space: nowrap;
}

/*
 * A disclosure that opens its cell (a job's): the summary's tap height centers its label half a
 * rem under the cell's top, so it rises by that much to read on the row's first line, beside the
 * name. A run's summary follows its badge instead, and a stacked card resets this (see below).
 */
.status-table td > .row-details:first-child > summary {
  margin-top: -0.5rem;
}

.row-details__panel {
  container-type: inline-size;
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-1);
  padding: 4px 14px 12px;
  border-radius: var(--radius-md);
  background: var(--surface-1);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  font: var(--type-caption);
}

.row-details .facts {
  grid-template-columns: 7.5rem minmax(0, 1fr);
}

/* The panel's labels are the card's mono labels, as every other label in the row. */
.row-details .facts > dt {
  font: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.row-details .facts > dt,
.row-details .facts > dd {
  padding-block: 8px;
}

.row-details .facts code {
  white-space: normal;
  overflow-wrap: anywhere;
}

/*
 * A narrow panel (the column's width, see .status-table above): each value under its label, and a
 * time may wrap before "UTC" rather than run into the panel's edge.
 */
@container (max-width: 18rem) {
  .row-details .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .row-details .facts time {
    white-space: normal;
  }
  .row-details .facts > dt {
    padding-bottom: 0;
  }
  .row-details .facts > dd {
    padding-top: 2px;
    border-top: 0;
  }
}

.row-details__panel > .note,
.row-details__panel > .diagnostic {
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}

/* A stored diagnostic: officer-only text, kept as written. */
.diagnostic {
  color: var(--text-primary);
  font: var(--type-code);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* From tablet width: the stats three across; process health's checks token over sentence. */
@media (min-width: 40rem) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .metrics > .orr-stat {
    padding: var(--space-4);
  }
  .process-health__checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px var(--space-4);
  }
  .process-health__checks > .check-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: var(--space-2);
    padding: 0;
    border-top: 0;
  }
  .process-health__checks .check-copy {
    color: var(--text-primary);
    font: var(--type-ui);
  }
  .process-health__checks > .process-health__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    grid-column: 1 / -1;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .process-health__summary .check-copy {
    font: var(--type-title);
  }
}

/*
 * Wide screens: the four checks in one row, each token beside its sentence, the six counts in one
 * row, labels beside times.
 */
@media (min-width: 72rem) {
  .process-health__checks {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: var(--space-3);
  }
  .process-health__checks > .check-row:not(.process-health__summary) {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: var(--space-2);
  }
  .process-health__checks > .process-health__summary {
    padding-bottom: var(--space-3);
  }
  .process-health .orr-scale {
    margin-top: var(--space-3);
  }
  .metrics {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .time-stack {
    grid-template-columns: max-content max-content;
    align-items: baseline;
    gap: 6px 10px;
  }
  /* The moment's label and time become cells of the stack's two columns. */
  .moment {
    display: contents;
  }
}

/*
 * The runs table from tablet width to 80rem: its five columns would squeeze the first to about
 * 100px and break "Lodestone fetch" and "Run <ID>" in two, while the times have room to spare. So
 * the details column takes only what it needs, not its share, and the cells close up to 8px a side
 * (16px still at the table's edges). From 80rem the share returns, so an open panel keeps room for
 * its facts beside their labels. A run's title and short ID are short fixed words, kept whole.
 */
@media screen and (min-width: 48rem) {
  .status-table[aria-describedby="run-sample"] th > :is(.cell-title, .cell-meta) {
    white-space: nowrap;
  }
}

@media screen and (min-width: 48rem) and (max-width: 79.99rem) {
  .status-table[aria-describedby="run-sample"] thead th:last-child {
    width: auto;
  }
  .status-table[aria-describedby="run-sample"] :is(thead th, tbody th, td) {
    padding-inline: 8px;
  }
  .status-table[aria-describedby="run-sample"] tr > :first-child {
    padding-left: 16px;
  }
  .status-table[aria-describedby="run-sample"] tr > :last-child {
    padding-right: 16px;
  }
}

/*
 * Phones and small tablets: each row is a card, stacked 16px apart like the stat cards above,
 * instead of a table row that scrolls sideways. The tables need a 40rem column: under 44rem the
 * gutters leave less than that, and up to 48rem they would fit only at their tightest, with no
 * room for a long name. The table keeps its markup, roles and caption; only the display changes,
 * and the column headers leave the screen but stay for assistive technology. The region drops
 * its glass, so each card is glass over the nebula, never glass in glass; it no longer scrolls or
 * clips (the cards' shadows reach past it), so focusing it only rings the stack.
 *
 * A card is a grid of three columns: labels, values, and the row's state.
 * - The head: the row header (the name, a job's kind, and the short ID) beside the state cell (a
 *   job's marker and attempts, or a run's aggregate outcome).
 * - The labelled lines, under a rule: a run's progress, then each moment ("Added" beside its time).
 *   Their cells subgrid the card's columns, so labels share one column and every value lines up.
 * - The last cell, under a rule, across the card: a run's acquisition, then the disclosure.
 * Nothing here keeps the table's no-wrap: with no scroll region to fall back on, a long name,
 * kind, badge, summary or time wraps inside the card instead of running off the screen. Screen
 * only, so print keeps the table.
 */
@media screen and (max-width: 47.99rem) {
  .status-section > .table-scroll {
    overflow: visible;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .status-table {
    display: block;
    min-width: 0;
  }
  .status-table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .status-table > tbody {
    display: grid;
    gap: var(--space-4);
  }
  .status-table > tbody > tr {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr) auto;
    gap: var(--space-2) 12px;
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--glass-fill);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow:
      inset 0 0 0 1px var(--glass-border),
      var(--glass-edge),
      var(--shadow-1);
  }
  /* Cells drop the table's padding, rules and row hover: the card draws the row. */
  .status-table tbody th,
  .status-table td,
  .status-table tr > :first-child,
  .status-table tr > :last-child,
  .status-table tbody tr:hover > * {
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    background: none;
  }
  .status-table tbody th {
    grid-column: 1 / 3;
    text-align: start;
  }
  .status-table .row-state {
    grid-column: 3;
    grid-row: 1;
    text-align: end;
  }
  .status-table .row-state .marker {
    white-space: normal;
  }
  /*
   * The labelled lines. The two-column template is the fallback where subgrid is missing: each
   * cell then sizes its own label column.
   */
  .status-table td:not(.row-state, :last-child) {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-columns: subgrid;
    align-items: baseline;
  }
  .status-table td:not(.row-state, :last-child) > * {
    grid-column: 2 / -1;
  }
  .status-table td > .cell-label {
    display: block;
    grid-column: 1;
  }
  /* A subgrid's normal gap is the card's, so the times line up with the progress above them. */
  .status-table td > .time-stack {
    grid-column: 1 / -1;
    grid-template-columns: max-content minmax(0, 1fr);
    grid-template-columns: subgrid;
    column-gap: normal;
    align-items: baseline;
  }
  .status-table .moment {
    display: contents;
  }
  .status-table .moment > .orr-label {
    grid-column: 1;
  }
  .status-table .moment > time {
    grid-column: 2 / -1;
  }
  /*
   * The last cell: a run's acquisition label and badge on one line, then the disclosure; a job's
   * disclosure keeps its whole tap height under the rule.
   */
  .status-table td:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-2) var(--space-3);
    grid-column: 1 / -1;
  }
  .status-table td:last-child > *,
  .status-table td > .row-details:first-child > summary {
    margin-top: 0;
  }
  .status-table td:last-child > .row-details {
    flex-basis: 100%;
  }
  /* A rule opens the lines and the last cell, 12px clear on both sides; lines are 8px apart. */
  .status-table .row-state + td,
  .status-table td:last-child {
    margin-top: calc(var(--space-3) - var(--space-2));
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
  }
  .status-table .time-stack time,
  .status-table .facts time,
  .status-table .cell-meta code,
  .status-table .run-progress,
  .status-table .row-details > summary {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/*
 * Under 20rem of measure (the narrowest phones, or any phone at a large text setting, which
 * scales these rem breakpoints too), the state no longer fits beside the head's name: it goes
 * under it, so the name keeps the card's width.
 */
@media screen and (max-width: 19.99rem) {
  .status-table tbody th {
    grid-column: 1 / -1;
  }
  .status-table .row-state {
    grid-column: 1 / -1;
    grid-row: auto;
    text-align: start;
  }
}

@media screen and (max-width: 47.99rem) and (prefers-reduced-transparency: reduce) {
  .status-table > tbody > tr {
    background: var(--surface-1);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* Forced colors: each card gets the border media.ts gives every card, and the region none. */
@media screen and (max-width: 47.99rem) and (forced-colors: active) {
  .status-section > .table-scroll {
    border: 0;
  }
  .status-table > tbody > tr {
    border: 1px solid CanvasText;
  }
}

/*
 * Forced colors drop backgrounds and box-shadows: the outcome dot takes a system color, and the
 * details panel, whose edge is a box-shadow, gets a real border.
 */
@media (forced-colors: active) {
  .run-outcome::before {
    background: CanvasText;
  }
  .row-details__panel {
    border: 1px solid CanvasText;
  }
}

@media print {
  .status-table {
    min-width: 0;
  }
}

/* Role menu */

/*
 * Badge: the design's short mono, uppercase state word (styles/components.css's .orr-badge), for
 * a category's or a role's state. The text carries the meaning; the tone only reinforces it.
 */
.orr-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  font: 500 0.65625rem / 1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text-secondary);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-default);
}

.orr-badge--violet {
  color: var(--violet-400);
  background: oklch(0.8 0.13 298 / 0.12);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 298 / 0.3);
}

.orr-badge--success {
  color: var(--success);
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 162 / 0.3);
}

.orr-badge--warning {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.3);
}

/* A callout that needs acting on: the notice in the warning tone. */
.notice--warning {
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.28);
}

.notice--warning > .orr-icon {
  color: var(--warning);
}

/*
 * The intro: the opening sentence, a small line on the one change TaruBot makes unasked, and My
 * roles' address to share, joined to the page header as its description (as shell.ts's
 * .page-header + .lead).
 */
.menu-intro {
  display: grid;
  gap: var(--space-1-5);
  min-width: 0;
}

.page-header + .menu-intro {
  margin-top: calc(var(--space-2) - var(--section-gap));
}

.menu-intro__note {
  max-width: 80ch;
  color: var(--text-muted);
  font: var(--type-caption);
}

/* My roles' address: a label, then the chip, which one click selects whole, ready to copy. */
.menu-share {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  min-width: 0;
}

.menu-share > code {
  min-width: 0;
  overflow-wrap: anywhere;
  user-select: all;
}

/* The banners, or the setup callout: close under the intro, like a page's notice under its lead. */
.menu-banners {
  display: grid;
  gap: var(--space-2);
}

.menu-intro + .menu-banners,
.menu-intro + .notice {
  margin-top: calc(var(--space-3) - var(--section-gap));
}

/*
 * The summary card, compact. Phones stack the head, the counts and the foot; from 48rem the counts
 * sit beside the heading, as on Server configuration's health snapshot.
 */
.menu-summary > .orr-card__head {
  justify-content: flex-start;
  align-items: center;
  gap: var(--space-3);
}

.menu-summary .orr-card__titles {
  gap: var(--space-1);
}

.menu-summary__title {
  font-size: 1.125rem;
  letter-spacing: var(--tracking-title);
}

/* Where the problems are: links to the cards' headings, under the summary's title. */
.menu-summary__where {
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}

/* A tone tile behind the mark; the heading's words carry the meaning. */
.menu-summary__mark {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 18px;
}

.menu-summary__mark--ok {
  color: var(--success);
  background: var(--success-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 162 / 0.3);
}

.menu-summary__mark--wait {
  color: var(--cyan-400);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.3);
}

.menu-summary__mark--warn {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.3);
}

/* The counts: two by two on phones, so the columns line up; four across from 40rem. */
.menu-summary__counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3) var(--space-6);
  margin: 0;
}

.menu-summary .menu-summary__count {
  gap: var(--space-1);
}

/* A label may wrap on a phone (at 200% text "Not offered" is wider than its column). */
.menu-summary__count > .orr-stat__label {
  overflow-wrap: anywhere;
}

.menu-summary__count > .orr-stat__value {
  font-size: 1.5rem;
}

/*
 * The foot: why publishing matters, at a readable measure, then the page's one primary button at
 * the row's end.
 */
.menu-summary__foot {
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.menu-summary__foot > .note {
  flex: 1 1 16rem;
  max-width: 80ch;
}

/* A refused Publish N drafts says why on a row of its own, above the button. */
.menu-summary__foot > .form-error {
  flex-basis: 100%;
}

/*
 * Categories: one card each, in the members' order, one column until 72rem and two from there.
 * Cards in a row share its height, so their toolbars line up at the foot. No editor opens inside a
 * card, so that never changes while one is open.
 */
.menu-categories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

/*
 * The Add a category card's form follows its own width (container queries below); a card is a
 * container too, so its head and roles follow the card's width, which two columns halve.
 */
.menu-category,
.menu-create {
  container-type: inline-size;
}

/*
 * The head: the name, the pick rule and how many roles, then the badges, on one line that wraps,
 * so every card's name starts at its left edge; the description goes under them. The markup puts
 * the badges first, hidden from assistive technology (the heading says the state in words), so
 * only their place on screen moves: nothing in the head takes focus.
 */
.menu-category__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1-5) var(--space-2);
  padding: var(--card-pad) var(--card-pad) 0;
}

/* The success notice (order 0, first), and the description, each take a line of their own. */
.menu-category__head > .notice,
.menu-category__desc {
  flex-basis: 100%;
}

.menu-category__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1-5);
  order: 3;
}

.menu-category__title {
  order: 1;
  min-width: 0;
  font: 600 1.0625rem / 1.3 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
  /*
   * A link to the heading (the error summary's, the summary card's) keeps the card's top edge in
   * view too, clear of the sticky bars the shell's scroll padding already clears.
   */
  scroll-margin-top: 1.5rem;
}

/* The pick rule and the count, set apart by a small dot drawn between them (no text). */
.menu-category__facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  order: 2;
}

.menu-category__facts > * + *::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-inline-end: var(--space-2);
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
}

.menu-category__desc {
  order: 4;
  color: var(--text-muted);
  font: var(--type-caption);
  overflow-wrap: anywhere;
}

/* The roles take what height the row gives the card, so the foot stays at the card's bottom. */
.menu-category__body {
  flex: 1;
  min-width: 0;
  padding: var(--space-3) var(--card-pad) var(--card-pad);
}

/*
 * The roles, as members will see them: mention chips that wrap side by side, a role with a
 * description taking at least 13rem (its description, then "Opens:", under its chip). With any
 * description, a card with room lists its roles in two columns instead (container query below):
 * the names in the first, each description and "Opens:" beside its name. A phone keeps the
 * wrapping chips, so roles without one still share a line.
 */
.menu-options {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-option {
  display: grid;
  gap: 2px;
  min-width: 0;
  max-width: 100%;
}

.menu-option:has(> .menu-option__desc) {
  flex: 1 1 13rem;
}

/* Without descriptions, "Opens:" follows its chip on the chip's line while it fits. */
.menu-options:not(.menu-options--described) > .menu-option {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: var(--space-2);
}

.menu-options:not(.menu-options--described) > .menu-option > .menu-problems {
  flex-basis: 100%;
}

.menu-option__role {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  overflow-wrap: anywhere;
}

.menu-option__desc {
  color: var(--text-muted);
  font: var(--type-caption);
  overflow-wrap: anywhere;
}

/*
 * "Opens:" and its channel chips, after the role's description, small and muted. A chip moves to
 * the next line whole rather than split at a hyphen ("#valheim-" / "voice"); only a name wider
 * than the line wraps inside its chip.
 */
.menu-option__opens {
  color: var(--text-muted);
  font: var(--type-caption);
}

.menu-option__opens > .mention {
  display: inline-block;
  max-width: 100%;
}

/*
 * A role with a problem takes a row of its own, tinted like a warning callout, so drift stands out
 * among the chips; the warning lines say what is wrong, across the row's full width.
 */
.menu-options > .menu-option--attention {
  flex-basis: 100%;
  grid-column: 1 / -1;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.28);
}

/* A role's problems: warning lines, the icon level with the first line. */
.menu-problems {
  display: grid;
  gap: var(--space-1);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font: var(--type-caption);
}

.menu-problems > li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
}

.menu-problems .orr-icon {
  margin-top: 2px;
  color: var(--warning);
}

/* The foot: what the state means and what each state button does, then the toolbar. */
.menu-category__foot {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3) var(--card-pad) var(--card-pad);
  border-top: 1px solid var(--border-subtle);
}

.menu-category__state {
  max-width: 80ch;
  color: var(--text-muted);
  font: var(--type-caption);
}

/*
 * The toolbar: one row that wraps. A .menu-tool wrapper only keeps an editor's button and its
 * panel together in the markup, so the button is one of the row's items (a closed panel draws
 * nothing, an open one is on top of the page); the state buttons and the moves are each one item,
 * a group that wraps as a unit, so a pair is never split across rows (Move up ending one row, Move
 * down starting the next).
 */
.menu-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.menu-tool {
  display: contents;
}

.menu-states,
.menu-moves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

/*
 * The row's buttons, compact: 32px tall for a mouse, 40px where the pointer is a finger. The
 * forms' own buttons, in the panels, keep their size.
 */
.menu-states .orr-btn,
.menu-moves .orr-btn,
.menu-opener {
  min-height: 2rem;
  padding: var(--space-1) 10px;
  border-radius: var(--radius-sm);
  font: var(--type-ui-sm);
  font-weight: var(--weight-semibold);
}

@media (pointer: coarse) {
  .menu-states .orr-btn,
  .menu-moves .orr-btn,
  .menu-opener {
    min-height: 2.5rem;
  }
}

/* A state or move form in the toolbar is its one button. */
.menu-state,
.menu-move {
  display: flex;
}

/*
 * Move up and Move down only reorder the menu, so they are the row's quietest buttons, apart from
 * the state buttons that change what members see: secondary text on a hairline, with no fill.
 * Hover and focus keep the shared button's look; forced colors keep its border (media.ts).
 */
.menu-moves .orr-btn:not(:hover):not(:focus-visible) {
  color: var(--text-secondary);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

/*
 * An editor's button looks like the state buttons beside it (a secondary button, solid in the
 * card), with a small chevron first that marks it as one that opens a panel rather than acting at
 * once; set a little closer than a button's, so a phone's first row holds the three editors.
 */
.menu-opener {
  gap: var(--space-1-5);
  padding-inline-start: var(--space-2);
}

.menu-opener::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-inline: 1px 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg);
}

/*
 * While its panel is open the button stays lit, and while it holds a refused form (a conflict,
 * views/role-menu.ts's .menu-opener--kept); a link stands in for it while a refused editor is
 * drawn open. So it is plain which button the panel belongs to once it closes.
 */
.menu-toolbar .menu-opener:is(a, .menu-opener--kept, :has(+ :is(.overlay:modal, .overlay:popover-open))) {
  color: var(--accent-strong);
  background: oklch(0.8 0.13 210 / 0.12);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

/* Delete category: the row's last item, at its end, in the danger tone. */
.menu-toolbar .menu-opener--danger {
  margin-inline-start: auto;
  color: var(--danger);
}

.menu-toolbar .menu-opener--danger:is(:hover, :focus-visible, :has(+ :is(.overlay:modal, .overlay:popover-open))) {
  color: var(--danger);
  background: var(--danger-bg);
  box-shadow: inset 0 0 0 1px oklch(0.74 0.15 18 / 0.45);
}

/*
 * An editor's panel (views/role-menu.ts's panel()): a <dialog>, which a browser without invoker
 * commands opens as a popover instead. A head holds the title (the action, the category's name
 * under it) and Close, then the body, laid out by its own width (a container). A closed one
 * is display: none by the browser's own rules, so nothing here sets the panel's display unless it
 * is open; these base rules replace the browser's dialog and popover look. The panel takes clicks
 * while the page under a popover doesn't (below).
 */
.overlay {
  --card-pad: var(--space-5);
  --overlay-width: 40rem;
  --overlay-foot: var(--card-pad);
  min-width: 0;
  max-width: none;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  pointer-events: auto;
}

/* Edit roles and Add roles put their rows and checklist in columns; a confirmation is short. */
.overlay--wide {
  --overlay-width: 48rem;
}

.overlay--narrow {
  --overlay-width: 32rem;
}

.overlay__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--card-pad) var(--card-pad) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.overlay__title {
  display: grid;
  gap: 2px;
  min-width: 0;
  color: var(--text-primary);
  font: 600 1.125rem / 1.3 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
}

.overlay__subject {
  color: var(--text-muted);
  font: var(--type-caption);
  letter-spacing: normal;
}

.overlay__close {
  flex-shrink: 0;
  min-height: 2rem;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-sm);
  font: var(--type-ui-sm);
  font-weight: var(--weight-semibold);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

@media (pointer: coarse) {
  .overlay__close {
    min-height: 2.5rem;
  }
}

.overlay__body {
  display: grid;
  gap: var(--space-3);
  min-width: 0;
  padding: var(--card-pad) var(--card-pad) var(--overlay-foot);
  container-type: inline-size;
}

/*
 * Open, on top of the page: a modal dialog or a popover in the top layer, or a refused editor
 * drawn open, fixed over its backdrop. As wide as its form needs, its top a fixed way down the
 * screen, so a panel whose content grows (Add roles' list of the roles it can't add) grows
 * downward only and its title stays where it was; at most the screen's height less that margin
 * twice. That is where a panel opens when it isn't anchored to its button (below). The body
 * scrolls under the head, so Close and the title stay in view. Glass over the dimmed page (it sits
 * on no other glass). :is() keeps the rule working in a browser without :popover-open, which would
 * otherwise drop it whole.
 */
:is(.overlay--open, .overlay:popover-open, .overlay:modal) {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-overlay) + 1);
  display: flex;
  flex-direction: column;
  width: min(100% - 2 * var(--space-4), var(--overlay-width));
  height: fit-content;
  max-height: calc(100dvh - 2 * min(12dvh, 6rem));
  margin: min(12dvh, 6rem) auto auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--glass-fill-strong);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 0 0 1px var(--glass-border),
    var(--glass-edge),
    var(--shadow-3);
}

:is(.overlay--open, .overlay:popover-open, .overlay:modal) > .overlay__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

/* A panel rises into place as it opens (never with reduced motion, below). */
:is(.overlay:popover-open, .overlay:modal) {
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
}

@starting-style {
  :is(.overlay:popover-open, .overlay:modal) {
    opacity: 0;
    transform: translateY(8px);
  }
}

/*
 * What lies under an open panel: the page, dimmed and lightly blurred, fading in as the panel
 * rises, which a click on closes the panel. A refused editor's backdrop is an element of its own,
 * which takes the page's clicks (only its Close link closes it). Literal values: a ::backdrop may
 * not inherit the tokens.
 */
.overlay::backdrop {
  background: oklch(0.08 0.02 280 / 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  transition: opacity 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

@starting-style {
  :is(.overlay:popover-open, .overlay:modal)::backdrop {
    opacity: 0;
  }
}

.overlay-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: oklch(0.08 0.02 280 / 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

/*
 * A popover (where the browser has no invoker commands) isn't modal: a click outside it would close
 * it and also press whatever lies under the pointer, such as a state button. While one is open the
 * page takes no clicks, so a click outside only closes it (the panel takes clicks again, .overlay).
 * A modal dialog's page is inert already.
 */
:root:has(.overlay:popover-open) .app {
  pointer-events: none;
}

/*
 * The page doesn't scroll under an open panel, where a wheel or a swipe over the backdrop would
 * slide it along, blurred. Its scrollbar's gutter is kept whether or not it is locked, so locking
 * it moves nothing sideways where scrollbars take room.
 */
:root:has(.overlay) {
  scrollbar-gutter: stable;
}

:root:has(:is(.overlay--open, .overlay:popover-open, .overlay:modal)) {
  overflow: hidden;
}

/*
 * A page drawn with a panel open skips the page entrance, as reduced motion does: the entrance's
 * transform would make main the fixed panel's frame while it plays, drawing it off-centre.
 */
main.orr-enter:has(.overlay--open) {
  animation: none;
}

/* The Edit roles rows: each role's fields under its name, split by hairlines. */
.option-rows {
  display: grid;
  gap: var(--space-3);
}

.option-row {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.option-row + .option-row {
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.option-row__role {
  float: left;
  width: 100%;
  padding: 0;
  overflow-wrap: anywhere;
}

.option-row__role + * {
  clear: both;
}

.option-row__fields {
  display: grid;
  gap: var(--space-2) var(--space-3);
}

/* Add roles: the form, then why the other roles can't be added. */
.menu-add {
  display: grid;
  gap: var(--space-3);
}

/*
 * Each role to add is a row at least 32px tall (44px for a finger) whose whole area is its label's,
 * as on My roles: the label's ::after covers the row, so a click anywhere on it ticks the box, and
 * the box stays above the cover, real and visible, with its own focus outline.
 */
.menu-add .orr-check {
  position: relative;
  align-items: center;
  min-height: 2rem;
}

.menu-add .orr-check__input {
  position: relative;
  z-index: 1;
}

.menu-add .orr-check__label::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (pointer: coarse) {
  .menu-add .orr-check {
    min-height: 2.75rem;
  }
}

.menu-refusals {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-refusals > li {
  display: grid;
  gap: 2px;
  padding: var(--space-2) 0;
}

.menu-refusals > li + li {
  border-top: 1px solid var(--border-subtle);
}

.menu-refusals__role {
  overflow-wrap: anywhere;
}

/* A refused form's message about the form as a whole, at its top. */
.form-error {
  margin: 0;
}

/* The unreadable menu's card: the warning, then Reset role menu behind its consequence. */
.menu-reset {
  display: grid;
  gap: var(--space-3);
}

/*
 * Side by side in a card with room: a role's place and state share a line under its description,
 * and all three share one in a wider card (the state choices are short enough for a 13rem select);
 * Edit category and Add a category put the name and description side by side, the limit and the
 * button under them; Add roles lists its roles in columns. Each field's error, then its hint, go
 * under its control (order: the stacked field's label, hint, error, control, mirrored), so the
 * controls in a row line up whatever their hints' lengths.
 */
@container (min-width: 22rem) {
  .option-row__fields {
    grid-template-columns: 4.5rem minmax(0, 1fr);
    align-items: start;
  }
  .option-row__fields > :first-child {
    grid-column: 1 / -1;
  }
  .option-row__fields .orr-field__hint {
    order: 2;
  }
  .option-row__fields .orr-field__hint--error {
    order: 1;
  }
}

/*
 * A card with room puts its state badges at the head's end, like the kit's status badge, and lists
 * described roles in two columns: each role is a row of the list, its own columns the list's
 * (subgrid), so every name lines up in the first column (up to 45% of the card) and every
 * description and "Opens:" line in the second, beside its name; a role's warnings span both.
 * Without subgrid, a role's description and "Opens:" sit beside its own name instead.
 */
@container (min-width: 28rem) {
  .menu-category__meta {
    margin-inline-start: auto;
  }
  .menu-options--described {
    display: grid;
    grid-template-columns: fit-content(45%) minmax(0, 1fr);
    gap: var(--space-2) var(--space-4);
  }
  .menu-options--described > .menu-option {
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    align-items: baseline;
    /* A subgrid's "normal" column gap is the list's. */
    gap: 2px normal;
  }
  .menu-options--described > .menu-option > .menu-option__role {
    grid-row: span 2;
    grid-column: 1;
    align-self: start;
  }
  .menu-options--described > .menu-option > :is(.menu-option__desc, .menu-option__opens) {
    grid-column: 2;
  }
  .menu-options--described > .menu-option > .menu-problems {
    grid-column: 1 / -1;
    margin-top: var(--space-1);
  }
  .menu-add .choice-group[id$="-roles"] > .choice-group__choices {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
    gap: var(--space-2) var(--space-4);
  }
}

@container (min-width: 30rem) {
  .menu-form {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: start;
    column-gap: var(--space-3);
  }
  .menu-form > .form-error,
  .menu-form > .form-actions {
    grid-column: 1 / -1;
  }
  /* Within each field only: the form's own message (.form-error) stays at the form's top. */
  .menu-form .orr-field > .orr-field__hint {
    order: 2;
  }
  .menu-form .orr-field > .orr-field__hint--error {
    order: 1;
  }
}

@container (min-width: 32rem) {
  .option-row__fields {
    grid-template-columns: minmax(0, 1fr) 4.5rem minmax(0, 13rem);
  }
  .option-row__fields > :first-child {
    grid-column: auto;
  }
}

@media (min-width: 40rem) {
  .menu-summary__counts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .menu-summary__count > .orr-stat__label {
    white-space: nowrap;
  }
}

@media (min-width: 48rem) {
  .menu-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }
  .menu-summary > .orr-card__head {
    padding-bottom: var(--card-pad);
  }
  .menu-summary > .orr-card__body {
    padding: var(--card-pad) var(--card-pad) var(--card-pad) 0;
  }
  .menu-summary__counts {
    grid-template-columns: repeat(4, auto);
    gap: var(--space-6);
  }
  .menu-summary__foot {
    grid-column: 1 / -1;
  }
}

/*
 * A wide form on a wide screen, where its button row no longer sticks: the name, the description,
 * the limit and the button in one row, the button level with the controls (under the labels).
 */
@media (min-width: 64rem) {
  @container (min-width: 56rem) {
    .menu-form {
      grid-template-columns: minmax(0, 14rem) minmax(0, 1fr) minmax(0, 13rem) auto;
    }
    .menu-form > .form-actions {
      grid-column: auto;
      margin-top: calc(0.8125rem * 1.2 + 7px);
    }
  }
}

@media (min-width: 72rem) {
  .menu-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/*
 * On a wide screen beside the fixed sidebar, a panel is centred over the page's own column rather
 * than the whole screen, clear of the sidebar.
 */
@media (min-width: 64rem) {
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) {
    inset-inline-start: var(--sidebar-w);
    width: min(100% - var(--sidebar-w) - 2 * var(--space-6), var(--overlay-width));
  }
}

/*
 * On a phone, an open panel is a sheet from the bottom edge, the full width, its body clear of the
 * home indicator. It is as tall as its content (up to 85% of the screen), so it never shows an
 * empty band; a disclosure opening inside it (Add roles' list of the roles it can't add) grows the
 * sheet upward from the bottom edge, as sheets do, while the page under it stays where it was.
 */
@media (max-width: 39.99rem) {
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) {
    --overlay-foot: calc(var(--card-pad) + env(safe-area-inset-bottom));
    inset: auto 0 0;
    width: 100%;
    max-height: 85dvh;
    margin: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  }
}

/*
 * A short screen (a phone on its side, or 400% zoom): the panel takes all but a little of the
 * screen's height, and its title shares one line with the category's name, so the body keeps room.
 */
@media (max-height: 29.99rem) {
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) {
    max-height: calc(100dvh - 1rem);
    margin-top: 0.5rem;
  }
  .overlay__title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: var(--space-2);
  }
}

/*
 * Beside its button (the owner's ask, 2026-10-10: bring the panel closer to the button that opened
 * it), where the browser has anchor positioning and the screen has room: from 40rem wide and 30rem
 * tall. A phone keeps its sheet and a short screen its near-full panel (above), and so does a
 * browser without anchor positioning, which keeps the centred panel. A refused editor drawn open
 * (.overlay--open) stays centred too: its page loads at the top, where the button may be off the
 * screen, so views/role-menu.ts gives it no anchor class, and these rules name only open dialogs and
 * popovers. They override the centred rules above at the same specificity, so they stay after them.
 *
 * Each editor's button is an anchor and its panel points at it (ANCHOR_PAIRS, and PAGE_ANCHORS for
 * the other pages' buttons). The panel opens just under the button, a small gap between them, its
 * start edge at the button's, as wide as before; it moves back toward the start only as far as it
 * takes to stay on the screen, clear of the sidebar from 64rem. The area spans the screen's whole
 * width and the start is clamped, rather than an area beside the button that flips to its other
 * side: a panel wider than the room on either side (Edit roles at 48rem on a 768px screen) would
 * then overflow every option, and the browser would fall back to the first one, off the bottom of
 * the screen.
 *
 * When its content doesn't fit under the button it opens above it (flip-block). When it fits on
 * neither side it fills the side with more room, its body scrolling: the capped options' floor,
 * half the screen less 4rem, is what the larger side always holds (for a button up to 5rem tall)
 * and the smaller one only when the two are about equal, so the first is skipped when below is the
 * smaller; the content is taller than that floor by then, so it never adds an empty band. The page
 * still never moves: the panel is in the top layer, and the anchor only reads where the button is.
 * A modal panel never hides itself, even where the browser would judge its button clipped
 * (position-visibility).
 */
@supports (anchor-name: --a) {
  @position-try --overlay-below {
    position-area: block-end span-all;
    margin: var(--overlay-gap) 0 var(--overlay-edge);
    min-height: calc(50dvh - 4rem);
    max-height: calc(100% - var(--overlay-gap) - var(--overlay-edge));
  }

  @position-try --overlay-above {
    position-area: block-start span-all;
    margin: var(--overlay-edge) 0 var(--overlay-gap);
    min-height: calc(50dvh - 4rem);
    max-height: calc(100% - var(--overlay-gap) - var(--overlay-edge));
  }

  @media (min-width: 40rem) and (min-height: 30rem) {
    .anchor-c0-edit-roles {
      anchor-name: --c0-edit-roles;
    }

    .anchored-c0-edit-roles {
      position-anchor: --c0-edit-roles;
    }

    .anchor-c0-add-roles {
      anchor-name: --c0-add-roles;
    }

    .anchored-c0-add-roles {
      position-anchor: --c0-add-roles;
    }

    .anchor-c0-edit-category {
      anchor-name: --c0-edit-category;
    }

    .anchored-c0-edit-category {
      position-anchor: --c0-edit-category;
    }

    .anchor-c0-delete {
      anchor-name: --c0-delete;
    }

    .anchored-c0-delete {
      position-anchor: --c0-delete;
    }

    .anchor-c1-edit-roles {
      anchor-name: --c1-edit-roles;
    }

    .anchored-c1-edit-roles {
      position-anchor: --c1-edit-roles;
    }

    .anchor-c1-add-roles {
      anchor-name: --c1-add-roles;
    }

    .anchored-c1-add-roles {
      position-anchor: --c1-add-roles;
    }

    .anchor-c1-edit-category {
      anchor-name: --c1-edit-category;
    }

    .anchored-c1-edit-category {
      position-anchor: --c1-edit-category;
    }

    .anchor-c1-delete {
      anchor-name: --c1-delete;
    }

    .anchored-c1-delete {
      position-anchor: --c1-delete;
    }

    .anchor-c2-edit-roles {
      anchor-name: --c2-edit-roles;
    }

    .anchored-c2-edit-roles {
      position-anchor: --c2-edit-roles;
    }

    .anchor-c2-add-roles {
      anchor-name: --c2-add-roles;
    }

    .anchored-c2-add-roles {
      position-anchor: --c2-add-roles;
    }

    .anchor-c2-edit-category {
      anchor-name: --c2-edit-category;
    }

    .anchored-c2-edit-category {
      position-anchor: --c2-edit-category;
    }

    .anchor-c2-delete {
      anchor-name: --c2-delete;
    }

    .anchored-c2-delete {
      position-anchor: --c2-delete;
    }

    .anchor-c3-edit-roles {
      anchor-name: --c3-edit-roles;
    }

    .anchored-c3-edit-roles {
      position-anchor: --c3-edit-roles;
    }

    .anchor-c3-add-roles {
      anchor-name: --c3-add-roles;
    }

    .anchored-c3-add-roles {
      position-anchor: --c3-add-roles;
    }

    .anchor-c3-edit-category {
      anchor-name: --c3-edit-category;
    }

    .anchored-c3-edit-category {
      position-anchor: --c3-edit-category;
    }

    .anchor-c3-delete {
      anchor-name: --c3-delete;
    }

    .anchored-c3-delete {
      position-anchor: --c3-delete;
    }

    .anchor-c4-edit-roles {
      anchor-name: --c4-edit-roles;
    }

    .anchored-c4-edit-roles {
      position-anchor: --c4-edit-roles;
    }

    .anchor-c4-add-roles {
      anchor-name: --c4-add-roles;
    }

    .anchored-c4-add-roles {
      position-anchor: --c4-add-roles;
    }

    .anchor-c4-edit-category {
      anchor-name: --c4-edit-category;
    }

    .anchored-c4-edit-category {
      position-anchor: --c4-edit-category;
    }

    .anchor-c4-delete {
      anchor-name: --c4-delete;
    }

    .anchored-c4-delete {
      position-anchor: --c4-delete;
    }

    .anchor-c5-edit-roles {
      anchor-name: --c5-edit-roles;
    }

    .anchored-c5-edit-roles {
      position-anchor: --c5-edit-roles;
    }

    .anchor-c5-add-roles {
      anchor-name: --c5-add-roles;
    }

    .anchored-c5-add-roles {
      position-anchor: --c5-add-roles;
    }

    .anchor-c5-edit-category {
      anchor-name: --c5-edit-category;
    }

    .anchored-c5-edit-category {
      position-anchor: --c5-edit-category;
    }

    .anchor-c5-delete {
      anchor-name: --c5-delete;
    }

    .anchored-c5-delete {
      position-anchor: --c5-delete;
    }

    .anchor-c6-edit-roles {
      anchor-name: --c6-edit-roles;
    }

    .anchored-c6-edit-roles {
      position-anchor: --c6-edit-roles;
    }

    .anchor-c6-add-roles {
      anchor-name: --c6-add-roles;
    }

    .anchored-c6-add-roles {
      position-anchor: --c6-add-roles;
    }

    .anchor-c6-edit-category {
      anchor-name: --c6-edit-category;
    }

    .anchored-c6-edit-category {
      position-anchor: --c6-edit-category;
    }

    .anchor-c6-delete {
      anchor-name: --c6-delete;
    }

    .anchored-c6-delete {
      position-anchor: --c6-delete;
    }

    .anchor-c7-edit-roles {
      anchor-name: --c7-edit-roles;
    }

    .anchored-c7-edit-roles {
      position-anchor: --c7-edit-roles;
    }

    .anchor-c7-add-roles {
      anchor-name: --c7-add-roles;
    }

    .anchored-c7-add-roles {
      position-anchor: --c7-add-roles;
    }

    .anchor-c7-edit-category {
      anchor-name: --c7-edit-category;
    }

    .anchored-c7-edit-category {
      position-anchor: --c7-edit-category;
    }

    .anchor-c7-delete {
      anchor-name: --c7-delete;
    }

    .anchored-c7-delete {
      position-anchor: --c7-delete;
    }

    .anchor-c8-edit-roles {
      anchor-name: --c8-edit-roles;
    }

    .anchored-c8-edit-roles {
      position-anchor: --c8-edit-roles;
    }

    .anchor-c8-add-roles {
      anchor-name: --c8-add-roles;
    }

    .anchored-c8-add-roles {
      position-anchor: --c8-add-roles;
    }

    .anchor-c8-edit-category {
      anchor-name: --c8-edit-category;
    }

    .anchored-c8-edit-category {
      position-anchor: --c8-edit-category;
    }

    .anchor-c8-delete {
      anchor-name: --c8-delete;
    }

    .anchored-c8-delete {
      position-anchor: --c8-delete;
    }

    .anchor-c9-edit-roles {
      anchor-name: --c9-edit-roles;
    }

    .anchored-c9-edit-roles {
      position-anchor: --c9-edit-roles;
    }

    .anchor-c9-add-roles {
      anchor-name: --c9-add-roles;
    }

    .anchored-c9-add-roles {
      position-anchor: --c9-add-roles;
    }

    .anchor-c9-edit-category {
      anchor-name: --c9-edit-category;
    }

    .anchored-c9-edit-category {
      position-anchor: --c9-edit-category;
    }

    .anchor-c9-delete {
      anchor-name: --c9-delete;
    }

    .anchored-c9-delete {
      position-anchor: --c9-delete;
    }

    .anchor-modmail-open {
      anchor-name: --modmail-open;
    }

    .anchored-modmail-open {
      position-anchor: --modmail-open;
    }

    .anchor-moderation-pause {
      anchor-name: --moderation-pause;
    }

    .anchored-moderation-pause {
      position-anchor: --moderation-pause;
    }

    .anchor-moderation-pause-found {
      anchor-name: --moderation-pause-found;
    }

    .anchored-moderation-pause-found {
      position-anchor: --moderation-pause-found;
    }

    .overlay--anchored:is(:popover-open, :modal) {
      --overlay-gap: var(--space-2);
      --overlay-edge: var(--space-4);
      --overlay-start: var(--overlay-edge);
      --overlay-fit: min(100% - var(--overlay-start) - var(--overlay-edge), var(--overlay-width));
      position-area: block-end span-all;
      position-try-fallbacks: flip-block, --overlay-below, --overlay-above;
      position-visibility: always;
      inset-block: 0;
      inset-inline: clamp(
          var(--overlay-start),
          anchor(start, var(--overlay-start)),
          100% - var(--overlay-edge) - var(--overlay-fit)
        )
        0;
      justify-self: start;
      width: var(--overlay-fit);
      max-height: calc(100dvh - 2 * var(--overlay-edge));
      margin: var(--overlay-gap) 0 var(--overlay-edge);
    }

    /*
     * While one is open the page is locked, so the root's scroll padding (shell.ts's, which keeps
     * focus clear of the sticky bars, and forms.ts's) has nothing to do. WebKit would still scroll
     * the page under the panel to keep its focused title clear of it, by as much as the title sits
     * inside it near the top of the screen, though scrolling can't move a fixed panel. Two classes
     * outrank the shell's rule for an open account menu.
     */
    :root:has(.overlay.overlay--anchored:is(:popover-open, :modal)) {
      scroll-padding: 0;
    }
  }

  @media (min-width: 64rem) and (min-height: 30rem) {
    .overlay--anchored:is(:popover-open, :modal) {
      --overlay-start: calc(var(--sidebar-w) + var(--overlay-edge));
    }
  }
}

/*
 * An open panel's form ends in its button row, its foot: the row sticks to the panel's bottom edge
 * while the body scrolls, solid, set off by a hairline and reaching the panel's sides (1px short,
 * so the panel's hairline edge stays whole beside it). It takes the body's bottom padding (a
 * sticky offset counts from inside the scroller's padding), so it sits flush with the bottom edge
 * whether or not the body scrolls, and nothing scrolls by under it; on a phone its padding clears
 * the home indicator, and focus scrolls clear of it (WCAG 2.4.11). A short screen can't spare the
 * room, so there the row stays in its place, as forms.ts's does.
 */
@media (min-height: 30rem) {
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) .form-actions {
    position: sticky;
    bottom: calc(-1 * var(--overlay-foot));
    z-index: var(--z-sticky);
    margin: 0 calc(1px - var(--card-pad)) calc(-1 * var(--overlay-foot));
    padding: var(--space-2) calc(var(--card-pad) - 1px)
      calc(var(--space-2) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border-subtle);
    background: var(--surface-1);
  }
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) > .overlay__body {
    scroll-padding-bottom: 5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.overlay:popover-open, .overlay:modal),
  .overlay::backdrop {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) {
    background: var(--surface-1);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .overlay::backdrop,
  .overlay-backdrop {
    background: oklch(0.08 0.02 280 / 0.85);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (forced-colors: active) {
  .orr-badge,
  .menu-options > .menu-option--attention,
  .overlay {
    border: 1px solid CanvasText;
  }
  :is(.overlay--open, .overlay:popover-open, .overlay:modal) {
    color: CanvasText;
    background: Canvas;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  /* The system palette isn't blurred under a panel; the dimming still marks the page inactive. */
  .overlay::backdrop,
  .overlay-backdrop {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .menu-toolbar .menu-opener:is(a, .menu-opener--kept, :has(+ :is(.overlay:modal, .overlay:popover-open))) {
    border-color: Highlight;
  }
}

@media print {
  .orr-badge,
  .menu-options > .menu-option--attention {
    border: 1px solid #888;
  }
  /* The editors and buttons are for the screen; paper keeps the menu itself. */
  .menu-category__foot,
  .menu-summary__foot,
  .overlay-backdrop,
  .overlay--open {
    display: none;
  }
}

/* My roles */

/*
 * The opening sentence and the privacy note under it, joined to the page header as its
 * description (as shell.ts's .page-header + .lead).
 */
.my-roles-intro {
  display: grid;
  gap: var(--space-1);
}

.page-header + .my-roles-intro {
  margin-top: calc(var(--space-2) - var(--section-gap));
}

.my-roles-intro__privacy {
  max-width: 80ch;
}

/* The status banners and the callouts: one block each, close under the intro like a page notice. */
.my-roles-status,
.my-roles-callouts {
  display: grid;
  gap: var(--space-2);
}

.my-roles-intro + .my-roles-status,
.my-roles-intro + .my-roles-callouts,
.my-roles-status + .my-roles-callouts {
  margin-top: calc(var(--space-3) - var(--section-gap));
}

/*
 * The form: the cards, the Save hint, then the Save row. On phones and tablets the hint is its own
 * line above the row, never in it: the row sticks to the bottom of the screen, and beside the
 * button the hint grew it into a tall column with enlarged text, covering the focused input.
 */
.my-roles-form {
  gap: var(--space-4);
}

.my-roles-form__hint {
  max-width: 62ch;
}

/*
 * From 64rem nothing sticks, so the Save button and its hint share one row, the button first: the
 * hint is the button's description and holds no control, so drawing it after the button moves
 * nothing in the focus order.
 */
@media (min-width: 64rem) {
  .my-roles-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: var(--space-4);
  }
  .my-roles-form > * {
    flex: 1 0 100%;
  }
  .my-roles-form > .form-actions {
    flex: 0 0 auto;
    order: 1;
  }
  .my-roles-form > .my-roles-form__hint {
    flex: 1 1 16rem;
    order: 2;
  }
}

/*
 * The categories: a card each, in the officers' order, in as many columns of at least 19rem as
 * fit (one on phones). Cards in a row share its height, so their edges line up.
 */
.my-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: var(--space-4);
}

/* A category's heading and rule, in its legend (or on their own when it has nothing to tick). */
.my-category .choice-group__legend,
.my-category__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin-bottom: var(--space-1);
}

main .my-category__title {
  font: 600 1.0625rem / 1.3 var(--font-display);
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
}

/*
 * The rule beside the name, small, as on Role menu's cards; the lines under them: the description,
 * then a line each for a draft's note, the roles that can't change and a note about an odd state.
 */
.my-category__draft,
.my-category__note {
  display: block;
}

.my-category__rule {
  color: var(--text-accent);
  font: 500 0.6875rem / 1.6 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.my-category__desc {
  overflow-wrap: anywhere;
}

/*
 * A hint that holds only the rule for assistive technology (no description, roles kept or note)
 * shows nothing, so it takes no row, and no gap, in the group: out of the flow, still in the page.
 */
.my-category .choice-group > .orr-field__hint:not(:has(> :not(.visually-hidden))) {
  position: absolute;
}

.my-category__draft,
.my-category__note {
  margin-top: var(--space-1);
  font-weight: var(--weight-semibold);
}

.my-category__draft {
  color: var(--violet-400);
}

.my-category__note {
  color: var(--warning);
}

.my-category__plain {
  display: grid;
  gap: var(--space-1);
}

/*
 * The roles: pills that wrap side by side, each as wide as its name. Pills on one line share its
 * height, so a line mixing pills with and without a description reads as one even row; a one-line
 * pill keeps its label centred (align-content below).
 */
.my-category .choice-group__choices {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

/*
 * One role: a pill all of whose area is the label's to tap, 44px tall for a thumb, and 36px where
 * a mouse picks on a wider screen.
 */
.my-category .orr-check {
  position: relative;
  grid-template-columns: auto minmax(0, auto);
  align-content: center;
  gap: var(--space-2);
  max-width: 100%;
  min-height: 2.75rem;
  padding: var(--space-1-5) var(--space-3) var(--space-1-5) 0.6875rem;
  border-radius: 1.375rem;
  background: oklch(0.1 0.026 280 / 0.35);
  box-shadow: inset 0 0 0 1px var(--border-default);
  transition:
    background var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}

@media (min-width: 40rem) and (pointer: fine) {
  .my-category .orr-check {
    min-height: 2.25rem;
    border-radius: 1.125rem;
  }
}

.my-category .orr-check__text {
  gap: 0;
}

.my-category .orr-check__label {
  overflow-wrap: anywhere;
}

.my-category .orr-check__label::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

/* The input stays above the label's cover, so a tap on the box itself lands on the box. */
.my-category .orr-check__input {
  position: relative;
  z-index: 1;
}

.my-category .orr-check:hover:not(:has(> .orr-check__input:disabled)) {
  box-shadow: inset 0 0 0 1px var(--border-control-hover);
}

.my-category .orr-check:has(> .orr-check__input:checked) {
  background: oklch(0.8 0.13 210 / 0.12);
  box-shadow: inset 0 0 0 1px var(--border-accent);
}

/* Focus: the input's own outline marks it; the pill's accent edge and glow only add to it. */
.my-category .orr-check:has(> .orr-check__input:focus-visible) {
  box-shadow:
    inset 0 0 0 1px var(--border-accent),
    var(--glow-cyan-sm);
}

.my-category .orr-check__desc {
  line-height: 1.35;
  overflow-wrap: anywhere;
}

/*
 * Roles held that can't change here now, beside roles that can: a line each in the group's hint,
 * so they are read with the group, framed like a pill but without an input.
 */
.my-category__fixed {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: var(--space-2);
  padding: var(--space-1-5) var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  color: var(--text-secondary);
  font: var(--type-caption);
  overflow-wrap: anywhere;
}

/*
 * A category with nothing to pick: its roles in one plain sentence, unframed, so nothing in the
 * card passes for a pill to tap.
 */
.my-category__kept {
  display: block;
  margin-top: var(--space-1);
  overflow-wrap: anywhere;
}

/*
 * A locked form (a time-out, or role changes paused) still shows the person their own roles, so
 * only the inputs dim: the names and descriptions keep the contrast they have when enabled, the
 * names in the secondary text color as the one sign they can't be changed now. A draft, which
 * only officers preview, stays dimmed as forms.ts dims any disabled row.
 */
.my-categories--locked .my-category:not(.my-category--draft) .orr-check__input:disabled + .orr-check__text {
  opacity: 1;
}

.my-categories--locked .my-category:not(.my-category--draft) .orr-check__input:disabled + .orr-check__text > .orr-check__label {
  color: var(--text-secondary);
}

.my-categories--locked .my-category:not(.my-category--draft) .orr-check__input:disabled {
  opacity: 0.6;
}

/*
 * A badge beside a category's or a role's name moves to a line of its own when the line is full,
 * and wraps inside itself only when even that can't hold it (a large text setting on a phone),
 * rather than run out of its pill or card.
 */
.my-category .orr-badge {
  line-height: 1.2;
  white-space: normal;
}

/* A draft, which only officers see: its badge in the drafts' violet. */
.my-category--draft .orr-badge {
  color: var(--violet-400);
  background: oklch(0.8 0.13 298 / 0.12);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 298 / 0.3);
}

/*
 * Forced colors drop the pills' inset frame and tint; a border keeps each pill's edge, and a
 * ticked pill's border takes the highlight color beside its ticked input.
 */
@media (forced-colors: active) {
  .my-category .orr-check,
  .my-category__fixed {
    border: 1px solid CanvasText;
  }
  .my-category .orr-check:has(> .orr-check__input:checked) {
    border-color: Highlight;
  }
}

/*
 * On phones the Save row sticks to the bottom of the screen (forms.ts). This form sits in the page,
 * not in a card, so the row reaches the page's own edges, its button lined up with the cards. The
 * row holds the button alone, so at any text size it stays one button tall, within the page's
 * scroll padding.
 */
@media (max-width: 63.99rem) and (min-height: 30rem) {
  .my-roles-form .form-actions {
    margin-inline: calc(-1 * var(--space-4));
    padding-inline: var(--space-4);
  }
}

@media (min-width: 40rem) and (max-width: 63.99rem) and (min-height: 30rem) {
  .my-roles-form .form-actions {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
  }
}

/* Mod mail */

/* The privacy line: the lock, then the sentence. */
.modmail-privacy {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  max-width: 80ch;
}

.modmail-privacy > .orr-icon {
  margin-top: 0.2em;
}

/* The officers' inbox: the cases, then the settings card; two columns from 64rem. */
.modmail-inbox {
  display: grid;
  gap: var(--space-6);
}

.modmail-inbox__cases,
.modmail-inbox__side,
.modmail-mine {
  display: grid;
  gap: var(--space-4);
  align-content: start;
  min-width: 0;
}

@media (min-width: 88rem) {
  .modmail-inbox {
    grid-template-columns: minmax(0, 1fr) 22rem;
    align-items: start;
  }
}

/* The filters: pills that wrap, each a link with a count. */
.modmail-filters ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* A pill never shrinks or breaks inside a word: the row wraps between pills instead. */
.modmail-filters li {
  flex: 0 0 auto;
}

.modmail-filter {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
  font: var(--type-ui);
  text-decoration: none;
}

.modmail-filter:hover {
  color: var(--text-primary);
  background: var(--surface-hover);
}

.modmail-filter[aria-current="page"] {
  color: var(--text-primary);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.modmail-filters__count {
  font: 500 0.75rem / 1 var(--font-mono);
  color: var(--text-muted);
}

@media (min-width: 40rem) {
  .modmail-filter {
    min-height: 36px;
  }
}

/* A case's number links to it; a topic wraps rather than widen its column. */
.modmail-case-link {
  white-space: nowrap;
}

.modmail-table .orr-table {
  min-width: 36rem;
  overflow-wrap: break-word;
}

/* A topic wraps between words; its column keeps room for a few words a line. */
.modmail-topic {
  min-width: 12rem;
  overflow-wrap: break-word;
}

.modmail-unreadable {
  color: var(--text-muted);
  font-style: italic;
}

/* The state badges: the words carry the state, the tone repeats it. */
.modmail-state--officers {
  color: var(--warning);
  background: var(--warning-bg);
  box-shadow: inset 0 0 0 1px oklch(0.82 0.13 78 / 0.3);
}

.modmail-state--member {
  color: var(--cyan-400);
  background: var(--info-bg);
  box-shadow: inset 0 0 0 1px oklch(0.8 0.13 210 / 0.3);
}

/*
 * Below 48rem a case table stacks each row into a glass card, as Background work's tables do: the
 * case link and state on the first line, then each value under its column's name. The column
 * headers leave the screen but stay for assistive technology; screen only, so print keeps the
 * table.
 */
@media screen and (max-width: 47.99rem) {
  .modmail-table {
    overflow: visible;
    background: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none;
  }
  .modmail-table .orr-table {
    display: block;
    min-width: 0;
  }
  .modmail-table .orr-table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .modmail-table .orr-table > tbody {
    display: grid;
    gap: var(--space-3);
  }
  .modmail-table .orr-table > tbody > tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--space-2) var(--space-3);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--glass-fill);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    box-shadow:
      inset 0 0 0 1px var(--glass-border),
      var(--glass-edge),
      var(--shadow-1);
  }
  .modmail-table .orr-table tbody th,
  .modmail-table .orr-table td,
  .modmail-table .orr-table tbody tr:hover > * {
    min-width: 0;
    padding: 0;
    border-bottom: 0;
    background: none;
  }
  .modmail-table .orr-table td {
    grid-column: 1 / -1;
  }
  /* The state badge beside the case link. */
  .modmail-table .orr-table td:has(> .modmail-state) {
    grid-column: 2;
    grid-row: 1;
    text-align: end;
  }
  .modmail-table .orr-table td > .cell-label {
    display: block;
    margin-bottom: 2px;
  }
}

/* The settings card: its heading with the on/off token, the checks, then the switch. */
.modmail-settings .orr-card__body {
  display: grid;
  gap: var(--space-3);
}

.modmail-settings__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

main .modmail-settings__title {
  font: 600 1.0625rem / 1.3 var(--font-display);
  letter-spacing: var(--tracking-title);
}

.modmail-switch {
  gap: var(--space-2);
}

/* The checks, then the switch; side by side where the card spans the page (stacked layout). */
.modmail-settings__grid {
  display: grid;
  gap: var(--space-3) var(--space-6);
  align-items: start;
}

@media (min-width: 48rem) and (max-width: 87.99rem) {
  .modmail-settings__grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  }
}

/* A case page: the case's card, then the thread with its forms. */
.modmail-back {
  margin: 0;
}

.modmail-case {
  display: grid;
  gap: var(--space-5);
}

.modmail-case__head .orr-card__body {
  display: grid;
  gap: var(--space-3);
}

main .modmail-case__title {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  align-items: baseline;
  font: 600 1.25rem / 1.3 var(--font-display);
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
}

.modmail-case__number {
  color: var(--text-muted);
  font: 500 0.9375rem / 1.3 var(--font-mono);
  white-space: nowrap;
}

.modmail-case__thread {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

/* The thread: messages lean to their side's edge, state lines sit centred between them. */
.modmail-thread {
  display: grid;
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.modmail-message {
  display: flex;
  min-width: 0;
}

.modmail-message__card {
  width: min(100%, 44rem);
  min-width: 0;
}

.modmail-message--own {
  justify-content: flex-end;
}

.modmail-message--own .modmail-message__card {
  box-shadow:
    inset 0 0 0 1px oklch(0.8 0.13 210 / 0.35),
    var(--glass-edge),
    var(--shadow-1);
}

.modmail-message__card {
  padding: var(--space-3) var(--space-4);
}

.modmail-message__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  margin-bottom: var(--space-2);
}

main .modmail-message__by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-1) var(--space-2);
  margin: 0;
  font: 600 var(--text-md) / 1.4 var(--font-sans);
  overflow-wrap: anywhere;
}

.modmail-message__time,
.modmail-line__time {
  color: var(--text-muted);
  font: var(--type-caption);
  white-space: nowrap;
}

.modmail-message__body {
  margin: 0;
  max-width: 72ch;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text-primary);
}

.modmail-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: var(--space-1) var(--space-2);
  padding: var(--space-1) 0;
  color: var(--text-secondary);
  font: var(--type-caption);
  text-align: center;
}

/* Open a case: the button, then its line (why it's unavailable, or /modmail), wrapping as one. */
.modmail-open-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
}

.modmail-opener {
  flex: 0 0 auto;
}

.modmail-open-bar__note {
  flex: 1 1 18rem;
  min-width: 0;
  margin: 0;
}

/* The open form: the privacy sentence, then the fields. */
.modmail-open-form {
  gap: var(--space-3);
}

/* The reply form and the case's actions. */
.modmail-reply {
  gap: var(--space-3);
}

.modmail-reply .orr-input,
.modmail-open-form textarea.orr-input {
  min-height: 8rem;
}

/* The two signing choices side by side where both fit, rather than one long column. */
.modmail-reply .choice-group__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-2) var(--space-4);
}

.modmail-case__actions {
  display: grid;
  gap: var(--space-3);
}

.modmail-state-form {
  gap: var(--space-2);
}

/* The read log: names and what happened wrap between words; the side and the time stay whole. */
.modmail-reads .orr-table td {
  overflow-wrap: break-word;
}

.modmail-reads .orr-table td:nth-child(2),
.modmail-reads .orr-table td:nth-child(4) {
  white-space: nowrap;
}

/*
 * Below 48rem each read is one block: the reader on its own line, then the side, what happened and
 * when, wrapping as they must. The column headers leave the screen but stay for assistive
 * technology, and the table keeps its explicit roles; screen only, so print keeps the table.
 */
@media screen and (max-width: 47.99rem) {
  .modmail-reads .table-scroll {
    overflow: visible;
  }
  .modmail-reads .orr-table,
  .modmail-reads .orr-table > tbody {
    display: block;
  }
  .modmail-reads .orr-table > thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .modmail-reads .orr-table tr {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border-subtle);
  }
  .modmail-reads .orr-table td,
  .modmail-reads .orr-table tbody tr:hover > * {
    padding: 0;
    border-bottom: 0;
    background: none;
  }
  .modmail-reads .orr-table td:first-child {
    flex-basis: 100%;
    color: var(--text-primary);
    font-weight: var(--weight-semibold);
  }
}

/* From 80rem the thread is the main column and the case's card sits beside it. */
@media (min-width: 80rem) {
  .modmail-case {
    grid-template-columns: 20rem minmax(0, 1fr);
    align-items: start;
  }
  .modmail-case__head {
    position: sticky;
    top: var(--space-6);
  }
}

@media (forced-colors: active) {
  .modmail-filter {
    border: 1px solid CanvasText;
  }
  .modmail-filter[aria-current="page"] {
    border: 2px solid Highlight;
  }
}

@media print {
  .modmail-reply,
  .modmail-case__actions,
  .modmail-open-bar,
  .modmail-filters {
    display: none;
  }
  .modmail-case__head {
    position: static;
  }
}

/* Moderation */

/* The second line of the intro sits close under the lead, as the Role menu's does. */
.lead + .mod-intro {
  max-width: 80ch;
  margin-top: calc(var(--space-1) - var(--section-gap, var(--space-6)));
}

.mod-limits {
  max-width: 80ch;
}

/* The toolbar card: the finder, then the button, on one row that wraps. */
.mod-toolbar {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-3) var(--space-5);
  padding: var(--card-pad);
}

.mod-finder {
  display: flex;
  flex: 1 1 24rem;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--space-2);
  min-width: 0;
}

.mod-finder > .orr-field {
  flex: 1 1 16rem;
}

.mod-toolbar__tool {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* A button that opens a panel, or the link that stands in for it, in a toolbar or a chip. */
.mod-opener,
.mod-signin {
  flex: 0 0 auto;
  min-height: 2rem;
}

@media (pointer: coarse) {
  .mod-opener,
  .mod-signin {
    min-height: 2.5rem;
  }
}

/* A section of the page: its heading, then its grid. */
.mod-section {
  display: grid;
  gap: var(--space-3);
  align-content: start;
  min-width: 0;
}

.mod-section > .section-heading {
  margin-bottom: 0;
}

/* The people and the ended entries: as many columns as fit. */
.mod-people,
.mod-dones {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
  gap: var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mod-dones {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
  gap: var(--space-2);
}

/* A person's card: the name, then their chips; the sign-in link goes at the foot when needed. */
.mod-person {
  gap: var(--space-3);
  padding: var(--card-pad);
  align-content: start;
}

.mod-person__name,
.mod-found__name {
  margin: 0;
  color: var(--text-primary);
  font: 600 1rem / 1.3 var(--font-display);
  font-synthesis: none;
  letter-spacing: var(--tracking-title);
  overflow-wrap: anywhere;
}

.mod-person__name a {
  color: inherit;
  text-decoration: none;
}

.mod-person__name a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mod-person__foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.mod-id {
  color: var(--text-secondary);
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.mod-gone {
  color: var(--text-muted);
  font: var(--type-caption);
}

/* A chip: one paused feature. */
.mod-pauses {
  display: grid;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.mod-pause,
.mod-done {
  display: grid;
  gap: var(--space-1);
  min-width: 0;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.mod-pause p,
.mod-done p {
  margin: 0;
}

.mod-pause__head,
.mod-done__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}

.mod-pause__feature,
.mod-done__feature {
  color: var(--text-primary);
  font: var(--type-ui);
  font-weight: var(--weight-semibold);
  overflow-wrap: anywhere;
}

.mod-until {
  color: var(--text-secondary);
  font: 500 0.75rem / 1.3 var(--font-mono);
}

.mod-pause__reason,
.mod-done__why,
.mod-done__was {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.mod-pause__reason,
.mod-done__why {
  color: var(--text-secondary);
}

.mod-pause__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  min-width: 0;
  color: var(--text-muted);
  font: var(--type-caption);
}

.mod-pause__by,
.mod-pause__note {
  flex: 1 1 12rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.mod-done__how {
  color: var(--text-secondary);
  font: var(--type-caption);
}

.mod-done__head a {
  color: var(--text-primary);
  overflow-wrap: anywhere;
}

/* The finder's result: one card, its chips filling its width. */
.mod-found {
  gap: var(--space-3);
  padding: var(--card-pad);
}

.mod-found__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
}

.mod-found .mod-pauses {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
}

.mod-found__line,
.mod-found__none {
  margin: 0;
  color: var(--text-secondary);
}

.mod-found__sub {
  margin: 0;
  color: var(--text-secondary);
  font: var(--type-label);
}

/* The panels' forms: the member and the length side by side where there is room. */
.mod-form {
  gap: var(--space-3);
}

.mod-form__note {
  margin: 0;
  max-width: 70ch;
}

.mod-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: var(--space-3) var(--space-4);
}

.mod-form .choice-group__choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: var(--space-2) var(--space-4);
}

.mod-form textarea.orr-input {
  min-height: 6rem;
}

@media (forced-colors: active) {
  .mod-pause,
  .mod-done {
    border: 1px solid CanvasText;
  }
}

@media print {
  .mod-toolbar,
  .mod-opener,
  .mod-signin {
    display: none;
  }
}

/* Public status */
.status-page {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  justify-self: stretch;
  width: 100%;
  min-width: 0;
}

/* The overall card: a label, the word with its dot, a sentence and three facts. */
.status-overall {
  --card-pad: var(--space-5);
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--card-pad);
}

.status-overall__word {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font: var(--type-h2);
  font-synthesis: none;
  letter-spacing: var(--tracking-display);
}

.status-dot {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.status-overall--operational .status-overall__word {
  color: var(--success);
}

.status-overall--degraded .status-overall__word {
  color: var(--warning);
}

.status-overall--down .status-overall__word {
  color: var(--danger);
}

.status-overall__text {
  color: var(--text-secondary);
}

.status-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-6);
  margin: var(--space-2) 0 0;
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.status-facts > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.status-facts dd {
  margin: 0;
  color: var(--text-primary);
  font: var(--type-readout);
  font-variant-numeric: tabular-nums;
}

/*
 * The components, a tile each: two across, or one above the other where two tiles of 10rem don't
 * fit (a narrow phone, or large text). Never more than two, so the four stay a 2×2 grid.
 */
.status-components__grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fit,
    minmax(max(min(100%, 10rem), calc((100% - var(--space-3)) / 2)), 1fr)
  );
  gap: var(--space-3);
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.status-component {
  display: grid;
  align-content: start;
  gap: var(--space-2);
  padding: var(--space-4);
}

.status-component__name {
  color: var(--text-primary);
  font: var(--type-subtitle);
  letter-spacing: var(--tracking-ui);
}

.status-component__state {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px var(--space-2);
}

.status-component__text {
  color: var(--text-secondary);
  font: var(--type-caption);
}

.status-component__about {
  margin-top: auto;
  color: var(--text-muted);
  font: var(--type-caption);
}

/*
 * The history: heading and summary on one line where they fit, then the bars. One column that may
 * shrink below its content, so the open table scrolls in its own region instead of widening the
 * card and the page.
 */
.uptime {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-5);
}

.uptime__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-4);
}

.uptime__title {
  color: var(--text-primary);
  font: var(--type-title);
}

.uptime__summary {
  color: var(--text-secondary);
  font: var(--type-ui-sm);
}

/* One row the bars stand in, bottoms aligned, so their heights compare like a chart's. */
.uptime-bars {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  grid-template-rows: minmax(0, 1fr);
  align-items: end;
  gap: 3px;
  height: 36px;
}

.uptime-bar {
  min-width: 0;
  height: calc(var(--band-height, 1) * 100%);
  border-radius: 2px;
  background: var(--surface-3);
}

/* Phones show the last 30 days; the first 60 bars wait for a wider screen. */
.uptime-bar:nth-child(-n + 60) {
  display: none;
}

/* A band's height, a share of the row (or of a legend swatch's 12px), then its color. */
.uptime-bar--full {
  --band-height: 1;
  background: var(--success);
}

.uptime-bar--high {
  --band-height: 0.8;
  background: color-mix(in oklch, var(--success) 45%, var(--warning));
}

.uptime-bar--mid {
  --band-height: 0.55;
  background: var(--warning);
}

.uptime-bar--low {
  --band-height: 0.3;
  background: var(--danger);
}

.uptime-bar--none {
  --band-height: 1;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

.uptime-axis {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
}

.uptime-axis__far {
  display: none;
}

.uptime-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font: var(--type-caption);
  list-style: none;
}

/* Swatches stand on the text's baseline, each its band's share of 12px tall, like the bars. */
.uptime-legend > li {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.uptime-swatch {
  display: inline-block;
  flex-shrink: 0;
  width: 8px;
  height: calc(var(--band-height, 1) * 12px);
  border-radius: 2px;
}

.uptime__method {
  font: var(--type-caption);
}

.uptime-days {
  min-width: 0;
}

.uptime-days > .table-scroll {
  margin-top: var(--space-2);
  box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.uptime-table {
  min-width: 20rem;
}

/* Short figures that never wrap: a narrow phone scrolls the region rather than split "98.86%". */
.uptime-table thead th,
.uptime-table td,
.uptime-table tbody th {
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.uptime-table tr > :first-child {
  padding-left: 14px;
}

@media (min-width: 40rem) {
  .uptime-table thead th,
  .uptime-table td,
  .uptime-table tbody th {
    padding-inline: 16px;
  }
  .uptime-bars {
    grid-template-columns: repeat(90, minmax(0, 1fr));
    gap: 2px;
  }
  .uptime-bar:nth-child(-n + 60) {
    display: block;
  }
  .uptime-axis__far {
    display: inline;
  }
  .uptime-axis__near {
    display: none;
  }
}

@media (min-width: 64rem) {
  .status-page {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    gap: var(--space-5);
  }
  .status-page > .uptime {
    grid-column: 1 / -1;
  }
}

/*
 * Forced colors replace the bands' colors, so the heights carry them: every bar and swatch takes
 * the text color, and a day with no data the background, with a border where its inset frame was.
 */
@media (forced-colors: active) {
  .uptime-bar,
  .uptime-swatch {
    background-color: CanvasText;
  }
  .uptime-bar--none {
    background-color: Canvas;
    border: 1px solid CanvasText;
  }
}

@media print {
  .uptime-bar,
  .uptime-swatch {
    border: 1px solid #888;
  }
}

/* Preferences and print */
@media (prefers-reduced-motion: reduce) {
  .orr-enter,
  .orr-holo-edge::before,
  .orr-starfield::before,
  .orr-orbit__ring,
  .orr-btn--primary {
    animation: none !important;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0s !important;
  }
  .orr-btn--primary::after {
    display: none;
  }
  .orr-btn:active:not(:disabled),
  .server-tile__link:hover > .orr-icon:last-child {
    transform: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .orr-card,
  .orr-btn--secondary,
  .feature {
    background: var(--surface-1);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .sidebar,
  .topbar {
    background: var(--bg-raised);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .server-switch {
    background: var(--surface-2);
  }
}

@media (forced-colors: active) {
  .orr-card,
  .check,
  .marker,
  .notice,
  .empty-state,
  .feature,
  .server-switch,
  .account__summary,
  .account__menu,
  .orr-input,
  .error-summary {
    border: 1px solid CanvasText;
  }
  .orr-btn {
    border: 1px solid ButtonText;
  }
  .nav-item[aria-current="page"] {
    outline: 2px solid CanvasText;
    outline-offset: -2px;
  }
  /* The current page's outline marks the page, so focus there needs a ring of its own. */
  .nav-item[aria-current="page"]:focus-visible {
    outline: 2px solid Highlight;
    outline-offset: 2px;
  }
  .orr-holo-edge::before,
  .orr-starfield::before,
  .entry-orbit,
  .console-page::before {
    display: none;
  }
}

@media print {
  /* Light paper: without this the dark color scheme would give the canvas a dark default. */
  :root {
    color-scheme: light;
  }
  *,
  *::before,
  *::after {
    color: #000 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    animation: none !important;
    transition: none !important;
  }
  html {
    background: #fff !important;
  }
  .skip,
  .sidebar,
  .topbar,
  .entry-bar,
  .entry-backdrop,
  .console-page::before,
  .orr-holo-edge::before {
    display: none !important;
  }
  .app {
    display: block;
  }
  .main,
  .entry {
    max-width: none;
    padding: 0;
  }
  a {
    text-decoration: underline;
  }
  .orr-card,
  .orr-btn,
  .check,
  .marker,
  .notice,
  .empty-state,
  .feature,
  .orr-input,
  .error-summary {
    border: 1px solid #888;
  }
  .form-actions {
    position: static;
    border: 0;
  }
  .orr-card,
  .feature,
  .orr-table tr {
    break-inside: avoid;
  }
  .table-scroll {
    overflow: visible;
  }
}
