/* SuperPower FX website. Plain CSS, no framework, no inline styles (the Content-Security-Policy forbids them).
   Design notes: a dark operations console. Cards on a near-black canvas, pill-shaped controls, one lime accent for the
   main action, amber for "needs attention", green for "fine", red for "careful". The two dials on the home page are the
   one showpiece; the faint motion paths behind everything are the product's own subject (animation curves with
   keyframes). The site is dark only, on purpose. */

@font-face {
  font-family: "Instrument Sans";
  src: url("/static/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #141414;
  --card: #1f1f1f;
  --card-hi: #242424;
  --panel: #282828;
  --chip: #252525;
  --inset: #181818;
  --line: #2f2f2f;
  --line-soft: #292929;
  --text: #f4f4f4;
  --text-2: #c1c1c1;
  --text-3: #9a9a9a;
  --lime: #f3fca8;
  --lime-ink: #141414;
  --green: #92f390;
  --amber: #eca544;
  --amber-wash: #3a3023;
  --red: #e36867;
  --red-wash: #3a2423;
  --green-wash: #1f3a25;
  --teal: #7cafbf;
  --focus: #f3fca8;
  --sans: "Instrument Sans", "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --radius: 1.25rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text-2);
  font: 400 1rem/1.55 var(--sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* The motion paths: faint animation curves with keyframe diamonds, fixed behind the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/static/paths.svg") center / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

main {
  flex: 1 0 auto;
}

img,
svg,
canvas {
  max-width: 100%;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  color: var(--text);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.5rem);
  letter-spacing: -0.03em;
}
h2 {
  font-size: 1.25rem;
}
h3 {
  font-size: 1.05rem;
}
p {
  margin: 0 0 1em;
}
strong {
  color: var(--text);
  font-weight: 600;
}

a {
  color: var(--lime);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover {
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 0.5rem;
}

.small {
  font-size: 0.875rem;
}
.soft {
  color: var(--text-3);
}
.mono {
  font-family: var(--mono);
  font-size: 0.9em;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  z-index: 10;
}
.skip:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  /* At least T + the tag's clear zone from the left edge, where the Pro-Motion tag hangs (below): the column keeps clear of it
     only where it would otherwise come closer (the percentage is of the page width, so the margin of a centred column counts). */
  padding-left: max(1rem, 4vw, calc(var(--pm-tag) + var(--pm-gap) - max(0px, (100% - 72rem) / 2)));
  padding-right: max(1rem, 4vw);
}

/* ---- The Pro-Motion tag (owner 2026-10-21) ----
   The owner's label (static/brand/pro-motion-tag-v9-left.svg, version 9, unchanged) hangs from the left edge of every page and
   scrolls with it, at the size it has on pro-motion.dev: T = 29 px wide (279/48 T = 168.56 px long), 26 px below the top, with
   a clear zone of 14 px; in windows of 780 px and narrower 25 px (145.31 px long), 22 px down, 12 px clear. The corners of the
   link (its focus ring) are the artwork's: 7.39913 and 6.24 of its 48 units. Above the page and its sticky bar, below the skip
   link. Hover and pressed are #E85F00 and #D15500: colour filters defined in the page (views/proMotionTag.ts), so the white
   square and name stay white. */
:root {
  --pm-tag: 29px;
  --pm-top: 26px;
  --pm-gap: 14px;
}
@media (max-width: 780px) {
  :root {
    --pm-tag: 25px;
    --pm-top: 22px;
    --pm-gap: 12px;
  }
}
.pm-tag {
  position: absolute;
  top: var(--pm-top);
  left: 0;
  z-index: 6;
  display: block;
  width: var(--pm-tag);
  border-radius: 0 calc(var(--pm-tag) * 7.39913 / 48) calc(var(--pm-tag) * 6.24 / 48) 0;
  line-height: 0;
}
.pm-tag img {
  display: block;
  width: 100%;
  height: auto;
}
.pm-tag:hover img {
  filter: url(#pm-tag-hover);
}
.pm-tag:active img {
  filter: url(#pm-tag-pressed);
}
.pm-tag:focus-visible {
  outline: 2px solid #ff6b00;
  outline-offset: 3px;
  border-radius: 0 calc(var(--pm-tag) * 7.39913 / 48) calc(var(--pm-tag) * 6.24 / 48) 0;
}
.pm-tag-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
@media print {
  .pm-tag {
    display: none;
  }
}

/* ---- Header and footer ---- */
.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(20, 20, 20, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.bar-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.25rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}
.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.mark:hover {
  color: var(--text);
}
/* The product's logo: the owner's artwork (brand/superpower-fx-logo.png at the repository root, not served), resized by scripts/make-fx-logo.mjs to
   28 px and 56 px (static/brand/superpower-fx/logo-28.*, logo-56.*). */
.mark-logo {
  display: block;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
}
.mark-logo img {
  display: block;
  width: 100%;
  height: 100%;
}
/* The sample element's icon on the home page (an element, not the product). */
.el-mark {
  position: relative;
  display: inline-block;
  flex: none;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.75rem;
  background: linear-gradient(145deg, #fbffd0, var(--lime) 55%, #d9e58a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.el-mark::after {
  content: "";
  position: absolute;
  inset: 0.6rem;
  background: var(--lime-ink);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}
.nav form {
  margin: 0;
}
.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-2);
  font: 500 0.9rem/1.3 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.pill-link:hover {
  background: #333;
  color: #fff;
}
.pill-link[aria-current="page"] {
  background: #3a3a3a;
  color: #fff;
}
.pill-accent {
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
}
.pill-accent:hover {
  background: #fff;
  color: var(--lime-ink);
}
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.2rem 0.85rem 0.2rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  min-width: 0;
}
.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 0.8rem;
  font-weight: 700;
}
.user-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}
.user-name {
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}
.user-role {
  color: var(--text-3);
  font-size: 0.72rem;
}

.foot {
  margin-top: 3.5rem;
  padding: 1.25rem 0 1.75rem;
  border-top: 1px solid var(--line-soft);
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.foot-chip {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-3);
  font-size: 0.82rem;
  text-decoration: none;
}
a.foot-chip:hover {
  color: #fff;
}

/* ---- Cards and panels ---- */
.card {
  background: linear-gradient(180deg, var(--card-hi), var(--card) 40%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.panel {
  background: var(--panel);
  border-radius: 1rem;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}
.card-title {
  margin: 0;
  font-size: 1.1rem;
}
.meta {
  margin: 0;
  color: var(--text-3);
  font-size: 0.85rem;
}
.foot-note {
  margin: 1rem 0 0;
  color: var(--text-3);
  font-size: 0.85rem;
}

/* ---- Pages ---- */
.page {
  padding-top: 2.25rem;
}
.page > * + * {
  margin-top: 1.25rem;
}
.page-head h1 {
  margin-bottom: 0.4rem;
}
.page-head p {
  max-width: 60ch;
  margin: 0;
  color: var(--text-2);
}
.page h2 {
  margin-top: 1.75rem;
}
.page-head + * {
  margin-top: 1.5rem;
}

.prose {
  max-width: 46rem;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.page.prose {
  margin-top: 2.25rem;
}
.prose h1 {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}
.prose h2 {
  margin-top: 1.8em;
  font-size: 1.2rem;
}
.prose p,
.prose ul,
.prose ol {
  max-width: 68ch;
}
.prose code {
  padding: 0.1em 0.4em;
  border-radius: 0.35rem;
  background: var(--panel);
  font-family: var(--mono);
  font-size: 0.88em;
}

/* ---- Buttons ---- */
.btn,
.btn-quiet,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 0.95rem/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn {
  background: var(--lime);
  color: var(--lime-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.btn:hover {
  background: #fff;
  color: var(--lime-ink);
}
.btn-quiet {
  background: var(--chip);
  border-color: var(--line);
  color: var(--text);
}
.btn-quiet:hover {
  background: #333;
  color: #fff;
}
.btn-danger {
  background: transparent;
  border-color: rgba(227, 104, 103, 0.5);
  color: var(--red);
}
.btn-danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #141414;
}
.btn-small {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}
.btn:disabled,
.btn-quiet:disabled,
.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.ico {
  flex: none;
}

/* ---- Forms ---- */
form {
  margin: 0;
}
.stack {
  display: grid;
  gap: 1.1rem;
}
form.stack {
  max-width: 34rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
details form.stack,
.section form.stack,
.card form.stack {
  max-width: none;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}
.field {
  display: grid;
  gap: 0.4rem;
}
label,
.label {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
}
.hint {
  color: var(--text-3);
  font-size: 0.85rem;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #383838;
  border-radius: 0.8rem;
  background: var(--inset);
  color: var(--text);
  font: 400 1rem/1.4 var(--sans);
}
input::placeholder,
textarea::placeholder {
  color: #6f6f6f;
}
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(243, 252, 168, 0.18);
}
textarea {
  min-height: 7rem;
  resize: vertical;
}
select {
  appearance: none;
  padding-right: 2.2rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c1c1c1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1rem;
}
input[type="file"] {
  width: 100%;
  padding: 0.5rem;
  border: 1px dashed #4a4a4a;
  border-radius: 0.8rem;
  background: var(--inset);
  color: var(--text-2);
  font: inherit;
}
input[type="file"]::file-selector-button {
  margin-right: 0.8rem;
  padding: 0.35rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text);
  font: 600 0.85rem var(--sans);
  cursor: pointer;
}
.codefield {
  font-family: var(--mono);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.codefield::placeholder {
  text-transform: none;
  letter-spacing: 0.02em;
}
.cert {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-all;
}
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}
.row-select {
  width: auto;
  min-width: 9rem;
}
.row-number {
  width: 7rem;
}
.row-search {
  flex: 1 1 14rem;
  width: auto;
}
form.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--panel);
  border-radius: 1rem;
}
form.grid .full {
  grid-column: 1 / -1;
}
form.grid h3 {
  margin: 0;
}
td form,
td .btn-small {
  display: inline-block;
}

/* ---- Notices and tags ---- */
.notice {
  padding: 0.85rem 1.1rem;
  border: 1px solid;
  border-radius: 1rem;
}
.notice p {
  margin: 0;
}
.notice p + p {
  margin-top: 0.5rem;
}
.notice-ok {
  background: var(--green-wash);
  border-color: rgba(146, 243, 144, 0.35);
  color: #d4f9d2;
}
.notice-bad {
  background: var(--red-wash);
  border-color: rgba(227, 104, 103, 0.45);
  color: #ffd2d1;
}
.restricted-banner {
  margin-top: 1rem;
}
.notice-info {
  background: var(--amber-wash);
  border-color: rgba(236, 165, 68, 0.4);
  color: #f6d9ae;
}
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}
.tag::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.8;
}
.tag-ok {
  background: var(--green-wash);
  color: var(--green);
}
.tag-bad {
  background: var(--red-wash);
  color: var(--red);
}
.tag-warn {
  background: var(--amber-wash);
  color: #f6d9ae;
}
.chip {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 0.55rem;
  background: var(--panel);
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  word-break: break-all;
}
.count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--amber);
  color: #141414;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ---- Fact chips: icon, label, bold value ---- */
.fact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.4rem 0 0;
}
.fact-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font-size: 0.88rem;
}
.fact-chip .ico {
  color: var(--lime);
}
.fact-chip b {
  color: var(--text);
  font-weight: 600;
}
.fact-chip.warn {
  background: var(--amber-wash);
  border-color: rgba(236, 165, 68, 0.4);
  color: #f6d9ae;
}
.fact-chip.warn .ico {
  color: var(--amber);
}
.fact-chip.good .ico {
  color: var(--green);
}

/* ---- Home ---- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  padding-top: 2.5rem;
  align-items: start;
}
@media (min-width: 62rem) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    grid-template-areas:
      "text console"
      "code console";
    gap: 1.5rem 3rem;
    padding-top: 3.5rem;
  }
  .hero-text {
    grid-area: text;
  }
  .console {
    grid-area: console;
  }
  .code-card {
    grid-area: code;
  }
}
.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 650;
  max-width: 17ch;
}
.lede {
  max-width: 34rem;
  color: var(--text-2);
  font-size: 1.12rem;
}
.hero .actions {
  margin-top: 1.5rem;
}
.hero .hint {
  margin: 0.9rem 0 0;
}

.console {
  padding: 1.25rem;
  background: linear-gradient(180deg, #262626, #1d1d1d 45%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 30px 60px -34px rgba(0, 0, 0, 0.9);
}
.stage {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #1d1d1d;
  background-image: conic-gradient(#272727 25%, #1d1d1d 0 50%, #272727 0 75%, #1d1d1d 0);
  background-size: 22px 22px;
}
.stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.stage-note {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.82);
  color: var(--text-3);
  font-size: 0.75rem;
}
.dials {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.dial-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.85rem 1.05rem;
}
.dial-label {
  align-self: flex-start;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: var(--chip);
  color: var(--text-2);
  font-size: 0.8rem;
}
.dial {
  display: block;
  width: 100%;
  max-width: 10.5rem;
  height: auto;
}
.dial-track,
.dial-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}
.dial-track {
  stroke: #3a3a3a;
}
.dial-ticks line {
  stroke: #5b5b5b;
  stroke-width: 1.2;
  stroke-linecap: round;
}
.dial-dots circle {
  fill: #4d4d4d;
}
.dial-dots circle.on {
  fill: var(--lime);
}
.needle line {
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
}
.hub {
  fill: var(--card);
  stroke: #fff;
  stroke-width: 2;
}
.dial-num {
  fill: #fff;
  font: 650 27px var(--sans);
  letter-spacing: -0.02em;
}
.dial-unit {
  fill: var(--text-3);
  font: 400 11px var(--sans);
}

input.range {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  --p: 0%;
}
input.range::-webkit-slider-runnable-track {
  height: 0.4rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime) var(--p), #3d3d3d var(--p));
}
input.range::-moz-range-track {
  height: 0.4rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime) var(--p), #3d3d3d var(--p));
}
input.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: -0.375rem;
  border: 2px solid var(--canvas);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
input.range::-moz-range-thumb {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--canvas);
  border-radius: 50%;
  background: #fff;
}
input.range:focus {
  box-shadow: none;
}
input.range:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 999px;
}

.code-card {
  overflow: hidden;
}
.code-head {
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #333;
  color: var(--text-3);
  font-size: 0.8rem;
}
.codeblock {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  color: var(--text-2);
  font: 400 0.85rem/1.65 var(--mono);
  white-space: pre;
}
.codeblock .k {
  color: var(--lime);
}

/* The steps: a sequence, so they are numbered. */
.rail {
  counter-reset: step;
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail > li {
  counter-increment: step;
  position: relative;
  padding: 1.25rem 1.25rem 1.25rem 4rem;
}
.rail > li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: 1.2rem;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 50%;
  background: var(--chip);
  border: 1px solid #3d3d3d;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 600;
}
.rail > li.now::before {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--lime-ink);
}
.rail > li.done::before {
  content: "\2713";
  background: var(--green-wash);
  border-color: rgba(146, 243, 144, 0.5);
  color: var(--green);
}
.rail > li h2,
.rail > li h3 {
  margin: 0 0 0.4rem;
  font-size: 1.1rem;
}
.rail > li p {
  margin: 0 0 0.9rem;
}
.rail > li p:last-child {
  margin-bottom: 0;
}
.rail-state {
  margin-left: 0.6rem;
  padding: 0.1rem 0.65rem;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 500;
  vertical-align: middle;
}
.rail-row {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  margin-top: 1rem;
}
.rail-row > li {
  padding: 4rem 1.25rem 1.25rem;
}
.page .rail-row > li h3 {
  margin-top: 0;
}

/* ---- Account ---- */
.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (min-width: 60rem) {
  .account-grid {
    grid-template-columns: minmax(0, 1fr) 22.5rem;
  }
}
.side h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.facts {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0.55rem 1.1rem;
  margin: 0 0 1rem;
}
.facts dt {
  color: var(--text-3);
  font-size: 0.88rem;
}
.facts dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.files {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.file {
  padding: 1rem 1.1rem;
  background: var(--panel);
  border-radius: 1rem;
}
.file-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.file-name {
  margin-top: 0.3rem;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}
.sum {
  margin: 0.2rem 0 0.8rem;
  color: var(--text-3);
  font-family: var(--mono);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}
.meter {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 0.4rem;
  margin: 0.5rem 0 1rem;
  border: 0;
  border-radius: 999px;
  background: #3d3d3d;
  overflow: hidden;
}
.meter::-webkit-progress-bar {
  background: #3d3d3d;
}
.meter::-webkit-progress-value {
  background: var(--lime);
  border-radius: 999px;
}
.meter::-moz-progress-bar {
  background: var(--lime);
  border-radius: 999px;
}
.invites {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.invites li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed #4a4a4a;
  border-radius: 0.9rem;
}
.invites li.used {
  border-style: solid;
  border-color: var(--line-soft);
  background: var(--inset);
}
.invites li.used .chip {
  color: var(--text-3);
  text-decoration: line-through;
}
.invites .btn-small,
.invites .soft {
  margin-left: auto;
}
.dia {
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
  background: var(--lime);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}
.used .dia {
  background: #4a4a4a;
}
details {
  margin-top: 1.1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
}
summary {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(-45deg);
  transition: transform 0.15s;
}
details[open] > summary::before {
  transform: rotate(45deg);
}
details > :not(summary) {
  margin-top: 0.9rem;
}
.danger-zone {
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(227, 104, 103, 0.06);
  border: 1px solid rgba(227, 104, 103, 0.3);
  border-radius: var(--radius);
}
.danger-zone h2 {
  margin-top: 0;
  font-size: 1.1rem;
}
.danger-zone p:last-child {
  margin-bottom: 0;
}

/* ---- Administration ---- */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--inset);
}
.admin-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.admin-nav a:hover {
  background: var(--chip);
  color: #fff;
}
.admin-nav a[aria-current="page"] {
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 600;
}
@media (max-width: 52rem) {
  .admin-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: auto;
    border-radius: 1rem;
  }
}
.section {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section > h2:first-child {
  margin-top: 0;
  font-size: 1.1rem;
}
.section > p:last-child {
  margin-bottom: 0;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem;
}
.stat {
  display: grid;
  gap: 0.15rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(180deg, var(--card-hi), var(--card));
  border: 1px solid var(--line);
  border-radius: 1rem;
}
.stat-warn {
  background: var(--amber-wash);
  border-color: rgba(236, 165, 68, 0.4);
}
.stat-warn b {
  color: #f6d9ae;
}
.stat b {
  color: var(--text);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat span {
  color: var(--text-3);
  font-size: 0.85rem;
}
.table-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.section .table-wrap {
  background: none;
  border-color: var(--line-soft);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
th,
td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line-soft);
}
th {
  color: var(--text-3);
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}
td {
  color: var(--text);
}
td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.codes {
  display: grid;
  gap: 0.2rem;
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  background: var(--panel);
  border-radius: 1rem;
  color: var(--lime);
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
pre.json {
  max-height: 24rem;
  margin: 0.75rem 0;
  padding: 1rem;
  overflow: auto;
  background: var(--inset);
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  color: var(--text-2);
  font: 400 0.8rem/1.55 var(--mono);
}

.ask h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

@media (max-width: 40rem) {
  .rail > li {
    padding: 1.1rem;
  }
  .rail > li::before {
    position: static;
    margin-bottom: 0.7rem;
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }
  .facts dd {
    margin-bottom: 0.6rem;
  }
  .file {
    padding: 0.9rem;
  }
  .rail-row > li {
    padding: 1.1rem;
  }
  .dials {
    gap: 0.5rem;
  }
  .user-name {
    max-width: 8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

/* My presets (account page): one row per preset, with the remove button at the end */
.my-presets { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.my-preset { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.my-preset-info { min-width: 0; overflow-wrap: anywhere; }
.pager { display: flex; gap: 1rem; align-items: center; margin: 0 0 1.5rem; }

/* The participant's card (/u/<nickname>) and avatars: the copy of the Pro-Motion avatar, or the nickname's first letter */
.face { display: inline-grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; background: var(--panel); }
.face-large { width: 6rem; height: 6rem; }
.face-letter { background: var(--lime); color: var(--lime-ink); font-weight: 700; font-size: 0.9rem; }
.face-large.face-letter { font-size: 2.4rem; }
.profile { display: grid; gap: 1rem; }
.profile-head { display: flex; align-items: center; gap: 1.25rem; min-width: 0; }
.profile-names { min-width: 0; overflow-wrap: anywhere; }
.profile-names h1 { margin: 0; }
.profile-names p { margin: 0.2rem 0 0; }
.profile-nick { color: var(--text-2); font-family: var(--mono); font-size: 0.95rem; }
.profile-about { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--text-2); }
.profile-link { margin: 0; overflow-wrap: anywhere; }
.nick { font-weight: 600; }
.clamp { overflow-wrap: anywhere; }

/* Administration: comments */
.admin-comments { list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.75rem; }
.admin-comment { display: grid; gap: 0.5rem; }
.admin-comment p { margin: 0; }
.admin-comment-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; overflow-wrap: anywhere; }
.comment-text { white-space: pre-wrap; overflow-wrap: anywhere; padding: 0.75rem 1rem; background: var(--inset); border: 1px solid var(--line-soft); border-radius: 1rem; color: var(--text); }
