/* Functional Weave registry — visual system
 *
 * Grounded in accounting stationery rather than dashboard convention. Three
 * devices carry the whole design:
 *
 *   1. The margin rail. Accountants tick and tie: a mark in the margin means
 *      checked. Verification lives there, not in badges scattered through the
 *      content.
 *   2. Greenbar banding. Continuous-form accounting paper alternates pale
 *      green and white so the eye tracks across a wide row. Used only in
 *      tables of figures, where it does that job.
 *   3. Ledger red. Negative and failing values are red because that is what
 *      red has meant in a ledger for four hundred years.
 *
 * Everything else stays quiet.
 */

/* Fonts, served from here rather than a font CDN, so a page view makes no
 * third-party request. Newsreader (variable: opsz 6-72, wght 200-800) and
 * IBM Plex Mono 400/500, Latin and Latin Extended subsets, from Fontsource.
 * Both are under the SIL Open Font License 1.1: fonts/OFL-*.txt. */

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/newsreader-latin-ext-opsz-normal.woff2) format("woff2-variations"), url(fonts/newsreader-latin-ext-opsz-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "Newsreader";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2-variations"), url(fonts/newsreader-latin-opsz-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-ext-500-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/ibm-plex-mono-latin-500-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root {
  --paper: #fafaf7;
  --paper-sunk: #f2f3ec;
  --band: #edf2ea;
  --ink: #16241d;
  --ink-soft: #46554d;
  --ink-faint: #78857d;
  --rule: #dcdcd2;
  --rule-strong: #c3c5b8;
  --green: #2f6b4f;
  --green-bright: #3d8a66;
  --red: #a6291f;
  --amber: #8a6a1d;
  --shadow: rgba(22, 36, 29, 0.08);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --measure: 66ch;
  --rail: 2.25rem;
  --page: 62rem;
  --page-wide: 74rem;
  --radius: 3px;
  --radius-lg: 6px;
}

/* The palette follows the system by default, and an explicit choice from the
   footer overrides it in both directions. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #101713;
    --paper-sunk: #16201a;
    --band: #1b2a21;
    --ink: #e7ece6;
    --ink-soft: #a9b4ac;
    --ink-faint: #7d8a82;
    --rule: #26332b;
    --rule-strong: #35453a;
    --green: #74c294;
    --green-bright: #8ed6ab;
    --red: #e8796c;
    --amber: #d9b45f;
    --shadow: rgba(0, 0, 0, 0.4);
  }
}

:root[data-theme="dark"] {
  --paper: #101713;
  --paper-sunk: #16201a;
  --band: #1b2a21;
  --ink: #e7ece6;
  --ink-soft: #a9b4ac;
  --ink-faint: #7d8a82;
  --rule: #26332b;
  --rule-strong: #35453a;
  --green: #74c294;
  --green-bright: #8ed6ab;
  --red: #e8796c;
  --amber: #d9b45f;
  --shadow: rgba(0, 0, 0, 0.4);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* ----------------------------------------------------------- typography */

h1,
h2,
h3,
h4 {
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.012em;
}

h1 {
  font-size: 2.3rem;
}
h2 {
  font-size: 1.6rem;
  margin-top: 2.2rem;
}
h3 {
  font-size: 1.22rem;
  margin-top: 1.6rem;
}

p {
  margin: 0 0 1rem;
  max-width: var(--measure);
}

a {
  color: var(--ink);
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-color: var(--green);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 1px;
}

code,
kbd,
pre,
.mono,
.id {
  font-family: var(--mono);
  font-size: 0.86em;
  font-variant-ligatures: none;
}

code {
  background: var(--paper-sunk);
  padding: 0.1em 0.32em;
  border-radius: 2px;
}

pre {
  background: var(--paper-sunk);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--rule-strong);
  padding: 0.9rem 1rem;
  overflow-x: auto;
  margin: 0 0 1.2rem;
  line-height: 1.55;
}

pre code {
  background: none;
  padding: 0;
}

.lede {
  font-size: 1.16rem;
  color: var(--ink-soft);
  max-width: 58ch;
}

.dim {
  color: var(--ink-faint);
}

.muted {
  color: var(--ink-soft);
}

.credit {
  color: var(--red);
}

.numeric {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------- layout */

.page {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.page--wide {
  max-width: var(--page-wide);
}

/* The margin rail: verification marks and record numbers sit outside the
   text column, the way an auditor's ticks sit outside a ledger entry. */
.railed {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 0.85rem;
  align-items: start;
}

.railed > .rail {
  padding-top: 0.28rem;
  color: var(--green);
  text-align: right;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.4;
}

@media (max-width: 640px) {
  .railed {
    grid-template-columns: 1fr;
  }
  .railed > .rail {
    text-align: left;
    padding-top: 0;
  }
}

/* ---------------------------------------------------------------- header */

/* One row on a desktop: wordmark, sections, search, language, account. Below
   1000px the sections and the account fold into the Menu button; below 640px
   search takes a row of its own. Nothing in the masthead ever scrolls
   sideways. */
.masthead {
  position: relative;
  z-index: 30;
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
}

.masthead__inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 0.7rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem 1.4rem;
  min-height: 3.6rem;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 1.28rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  flex: none;
}

.wordmark .tick {
  color: var(--green);
}

.wordmark span {
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.masthead__nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.94rem;
}

.masthead__nav a,
.masthead__signin {
  color: var(--ink-soft);
  text-decoration: none;
  white-space: nowrap;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
}

.masthead__nav a:hover,
.masthead__signin:hover {
  color: var(--ink);
  background: var(--paper-sunk);
}

.masthead__nav a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--green);
  border-radius: 0;
}

.masthead__search {
  flex: 1 1 12rem;
  min-width: 8rem;
  max-width: 24rem;
  margin-left: auto;
}

.masthead__search .search-input {
  padding: 0.42rem 0.7rem;
  background: var(--paper-sunk);
  border-color: var(--rule);
}

.masthead__search .search-input:focus {
  background: var(--paper);
  border-color: var(--rule-strong);
}

.masthead__account {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: none;
  font-size: 0.94rem;
}

/* The initial in a circle: the account, a member, an organisation. */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--green);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1;
  user-select: none;
}

.avatar--small {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.75rem;
}

.avatar--large {
  width: 3.2rem;
  height: 3.2rem;
  font-size: 1.3rem;
}

.avatar--org {
  border-radius: var(--radius-lg);
  background: var(--ink);
}

/* The account menu and the folded menu share one dropdown. */
.usermenu,
.navmenu {
  position: relative;
}

.usermenu__toggle,
.navmenu__toggle {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  border: 1px solid transparent;
  border-radius: 999px;
  user-select: none;
  white-space: nowrap;
}

.usermenu__toggle::-webkit-details-marker,
.navmenu__toggle::-webkit-details-marker,
.confirm > summary::-webkit-details-marker {
  display: none;
}

.usermenu__toggle::after {
  content: "";
  width: 0.38rem;
  height: 0.38rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  color: var(--ink-faint);
}

.usermenu__toggle:hover,
.usermenu[open] > .usermenu__toggle {
  border-color: var(--rule-strong);
  background: var(--paper-sunk);
}

.usermenu__name {
  color: var(--ink);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 40;
  min-width: 15rem;
  padding: 0.4rem 0;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px var(--shadow);
  font-size: 0.95rem;
}

/* A closed menu's panel takes no room at all, in any browser. */
details:not([open]) > .menu-panel,
details:not([open]) > .confirm__panel {
  display: none;
}

.menu-panel__who {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  margin: 0;
  padding: 0.5rem 1rem 0.6rem;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.menu-panel__who .dim {
  font-family: var(--mono);
  font-size: 0.8rem;
  flex-basis: 100%;
}

.menu-panel__list {
  list-style: none;
  margin: 0;
  padding: 0.3rem 0;
}

.menu-panel__list a,
.menu-panel__signout {
  display: block;
  width: 100%;
  padding: 0.45rem 1rem;
  color: var(--ink-soft);
  text-decoration: none;
  text-align: left;
}

.menu-panel__list a:hover,
.menu-panel__list a:focus-visible {
  background: var(--paper-sunk);
  color: var(--ink);
  outline-offset: -2px;
}

.menu-panel__list a[aria-current="page"] {
  color: var(--ink);
  box-shadow: inset 2px 0 0 var(--green);
}

.menu-panel .signout {
  border-top: 1px solid var(--rule);
  padding-top: 0.3rem;
  margin-top: 0.1rem;
}

button.menu-panel__signout {
  font-size: 0.95rem;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--ink-soft);
}

button.menu-panel__signout:hover,
button.menu-panel__signout:focus-visible {
  background: var(--paper-sunk);
  color: var(--red);
  outline-offset: -2px;
}

.menu-panel__heading {
  margin: 0;
  padding: 0.6rem 1rem 0.2rem;
  border-top: 1px solid var(--rule);
  font-size: 0.78rem;
  color: var(--ink-faint);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* The folded menu: hidden on a desktop, the only navigation below 1000px. */
.navmenu {
  display: none;
  flex: none;
}

.navmenu__toggle {
  min-height: 2.5rem;
  min-width: 2.75rem;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-color: var(--rule-strong);
  border-radius: var(--radius);
  font-size: 0.94rem;
}

.navmenu[open] > .navmenu__toggle {
  background: var(--paper-sunk);
}

/* Three bars, or a cross when open, drawn so they follow the text colour. */
.navmenu__bars {
  position: relative;
  width: 1rem;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.navmenu[open] .navmenu__bars {
  box-shadow: none;
  background: transparent;
}

.navmenu[open] .navmenu__bars::before,
.navmenu[open] .navmenu__bars::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 1rem;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.navmenu[open] .navmenu__bars::after {
  transform: rotate(-45deg);
}

.navmenu__auth {
  display: flex;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-top: 1px solid var(--rule);
}

.navmenu__auth .button {
  flex: 1;
  text-align: center;
}

.navmenu__langs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0;
  padding: 0.3rem 1rem 0.6rem;
}

.navmenu__langs a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.navmenu__langs a[aria-current="true"] {
  border-color: var(--green);
  color: var(--green);
}

.navmenu .menu-panel__who {
  border-top: 1px solid var(--rule);
  border-bottom: 0;
  padding-top: 0.7rem;
}

@media (max-width: 1180px) {
  .lang-pick__label {
    display: none;
  }
}

@media (max-width: 999px) {
  .masthead__nav,
  .masthead__account,
  .masthead .lang-pick {
    display: none;
  }
  .navmenu {
    display: block;
  }
  .masthead__search {
    max-width: none;
  }
  /* The panel spans the masthead, under it, rather than hanging off the button. */
  .navmenu {
    position: static;
  }
  .navmenu__panel {
    left: 1rem;
    right: 1rem;
    top: calc(100% + 0.3rem);
    max-height: calc(100vh - 7rem);
    overflow-y: auto;
  }
}

@media (min-width: 560px) and (max-width: 999px) {
  .navmenu__panel {
    left: auto;
    width: 20rem;
  }
}

@media (max-width: 639px) {
  .masthead__inner {
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
  }
  .wordmark {
    flex: 1 1 auto;
    min-width: 0;
  }
  .masthead__search {
    order: 3;
    flex: 1 1 100%;
    margin-left: 0;
  }
  .navmenu__label {
    display: none;
  }
  .navmenu__panel {
    left: 1rem;
    right: 1rem;
    width: auto;
  }
}

/* The name is two words: on a small phone it takes a little less room. */
@media (max-width: 400px) {
  .wordmark {
    font-size: 1.12rem;
    gap: 0.35rem;
  }
}

/* ----------------------------------------------------------------- forms */

.field {
  display: block;
  margin: 0 0 1.1rem;
  max-width: 34rem;
}

.field > span {
  display: block;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}

.field .hint {
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.3rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 0.5rem 0.6rem;
}

input::placeholder {
  color: var(--ink-faint);
}

textarea {
  min-height: 6rem;
  resize: vertical;
}

.search-input {
  font-family: var(--mono);
  font-size: 0.9rem;
}

button,
.button {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.44rem 0.95rem;
  border-radius: 2px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.button:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.button--quiet,
button.quiet {
  background: none;
  color: var(--ink);
  border-color: var(--rule-strong);
}

.button--quiet:hover,
button.quiet:hover {
  background: none;
  border-color: var(--green);
  color: var(--green);
}

/* A version's package: the button, then what to check the download against.
   The digest takes a line of its own and breaks anywhere, so it fits at 400px. */
.download {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem 0.9rem;
  margin: 1rem 0 1.4rem;
}

.download__facts {
  font-size: 0.88rem;
  color: var(--ink-faint);
}

.download__sha {
  flex-basis: 100%;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
  word-break: break-all;
}

button.danger {
  background: none;
  color: var(--red);
  border-color: var(--red);
}

button.danger:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.inline-form {
  display: inline;
}

.actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 1.4rem;
}

/* ---------------------------------------------------------------- flash */

.flash {
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--green);
  background: var(--paper-sunk);
  padding: 0.7rem 0.9rem;
  margin: 1.2rem 0;
  max-width: var(--measure);
}

.flash--error {
  border-left-color: var(--red);
  color: var(--red);
}

.flash p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------- register */

/* Capability listings are a ruled register, not a grid of cards: one line per
   record, so twenty of them can be scanned without scrolling past padding. */
.register {
  border-top: 1px solid var(--rule);
  margin: 1.5rem 0 0;
}

.entry {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr) auto;
  gap: 0 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.entry:hover {
  background: var(--paper-sunk);
}

.entry__mark {
  text-align: right;
  color: var(--green);
  font-size: 0.75rem;
  font-family: var(--mono);
  white-space: nowrap;
}

.entry__id {
  font-family: var(--mono);
  font-size: 0.95rem;
  text-decoration: none;
}

.entry__id:hover {
  text-decoration: underline;
  text-decoration-color: var(--green);
}

.entry__summary {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin-top: 0.15rem;
  max-width: 62ch;
}

.entry__meta {
  color: var(--ink-faint);
  font-size: 0.82rem;
  text-align: right;
  white-space: nowrap;
  font-family: var(--mono);
}

@media (max-width: 720px) {
  .entry {
    grid-template-columns: 1.6rem minmax(0, 1fr);
  }
  .entry__meta {
    grid-column: 2;
    text-align: left;
    margin-top: 0.3rem;
  }
}

/* --------------------------------------------------------- vector table */

/* The greenbar band. Alternating rows on continuous-form accounting paper
   exist so the eye tracks across a wide row without losing its place; that is
   exactly the job here, and nowhere else. */
.vectors {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.82rem;
  margin: 0 0 1.2rem;
}

.vectors th {
  text-align: left;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.35rem 0.6rem;
}

.vectors td {
  padding: 0.38rem 0.6rem;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
}

.vectors tbody tr:nth-child(odd) {
  background: var(--band);
}

.vectors .case {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--ink);
}

.vectors .arrow {
  color: var(--ink-faint);
  padding: 0.38rem 0.2rem;
}

.table-scroll {
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

/* ----------------------------------------------------------------- tick */

.tick {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  vertical-align: baseline;
}

.tick path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The one orchestrated moment on the site: on the landing page the three
   language ticks land in sequence, the way a check runs. Nothing else moves. */
.parity__tick path {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: strike 0.42s ease-out forwards;
}

.parity__lang:nth-child(1) .parity__tick path {
  animation-delay: 0.15s;
}
.parity__lang:nth-child(2) .parity__tick path {
  animation-delay: 0.45s;
}
.parity__lang:nth-child(3) .parity__tick path {
  animation-delay: 0.75s;
}

@keyframes strike {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .parity__tick path {
    animation: none;
    stroke-dashoffset: 0;
  }
}

/* ----------------------------------------------------------------- hero */

.hero {
  padding: 3rem 0 1rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 5vw, 3rem);
  max-width: 18ch;
  margin-bottom: 0.6rem;
}

.parity {
  border: 1px solid var(--rule-strong);
  background: var(--paper-sunk);
  margin: 2rem 0 1rem;
}

.parity__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}

.parity__id {
  font-family: var(--mono);
  font-size: 0.88rem;
}

.parity__body {
  padding: 0.2rem 0.9rem 0.9rem;
}

.parity__langs {
  display: flex;
  gap: 1.6rem;
  padding: 0.7rem 0.9rem;
  border-top: 1px solid var(--rule);
  flex-wrap: wrap;
  align-items: center;
}

.parity__lang {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  color: var(--green);
}

.parity__lang b {
  font-weight: 500;
  color: var(--ink);
}

/* ---------------------------------------------------------------- facts */

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0 2.4rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 0.9rem 0;
  margin: 2.5rem 0;
}

.facts div {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.facts b {
  font-family: var(--mono);
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 500;
  display: block;
}

/* --------------------------------------------------------------- detail */

.record-head {
  border-bottom: 1px solid var(--rule-strong);
  padding-bottom: 1rem;
  margin-bottom: 1.4rem;
}

.record-head h1 {
  font-family: var(--mono);
  font-size: clamp(1.3rem, 3.4vw, 1.9rem);
  letter-spacing: -0.01em;
  word-break: break-word;
}

.spec {
  display: grid;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0.35rem 1rem;
  margin: 0 0 1.6rem;
  font-size: 0.94rem;
}

.spec dt {
  color: var(--ink-faint);
}

.spec dd {
  margin: 0;
}

@media (max-width: 560px) {
  .spec {
    grid-template-columns: 1fr;
    gap: 0 0;
  }
  .spec dd {
    margin-bottom: 0.6rem;
  }
}

.columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 860px) {
  .columns {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* A column never grows to fit a long line of code: the code block scrolls. */
.columns > * {
  min-width: 0;
}

.side h3 {
  margin-top: 0;
  font-size: 0.95rem;
  color: var(--ink-faint);
  font-weight: 400;
}

.side ul {
  list-style: none;
  margin: 0 0 1.6rem;
  padding: 0;
  font-size: 0.92rem;
}

.side li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.side li a {
  font-family: var(--mono);
  font-size: 0.85rem;
  text-decoration: none;
}

.side li a:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- misc */

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tags a {
  font-size: 0.8rem;
  font-family: var(--mono);
  color: var(--ink-soft);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.08rem 0.4rem;
}

.tags a:hover {
  border-color: var(--green);
  color: var(--green);
}

.level {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

table.plain {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
  margin-bottom: 1.4rem;
}

table.plain th {
  text-align: left;
  font-weight: 500;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule-strong);
  padding: 0.4rem 0.6rem 0.4rem 0;
  font-size: 0.9rem;
}

table.plain td {
  padding: 0.5rem 0.6rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}

.empty {
  border: 1px dashed var(--rule-strong);
  padding: 1.6rem;
  text-align: center;
  color: var(--ink-soft);
  margin: 1.5rem 0;
}

.empty p {
  margin: 0 auto 0.8rem;
  max-width: 44ch;
}

.footer {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding: 1.5rem 0 3rem;
  color: var(--ink-faint);
  font-size: 0.88rem;
}

.footer__inner {
  max-width: var(--page-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.footer a {
  color: var(--ink-soft);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 0.5rem;
  background: var(--paper);
  padding: 0.5rem 0.8rem;
  border: 1px solid var(--green);
  z-index: 10;
}

.secret {
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--paper-sunk);
  border: 1px solid var(--green);
  padding: 0.7rem 0.9rem;
  word-break: break-all;
  margin-bottom: 0.6rem;
}

.role {
  font-size: 0.82rem;
  font-family: var(--mono);
  color: var(--ink-faint);
}

.filters {
  display: flex;
  gap: 0.8rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 1.2rem 0;
}

.filters .field {
  margin: 0;
  max-width: 11rem;
}


/* ------------------------------------------------------------ theme pick */

.theme-pick {
  display: inline-flex;
  gap: 0.5rem;
}

.theme-pick a[aria-current="true"] {
  color: var(--green);
  text-decoration: none;
}

/* ---------------------------------------------------- settings sub-nav */

/* The account pages are one record seen from four sides, so they share a
   rule-underlined index rather than a second masthead. The current page is
   marked by the same green the rail uses, not by a filled tab. */
.subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.2rem;
  border-bottom: 1px solid var(--rule);
  margin: 1.4rem 0 1.8rem;
  font-size: 0.94rem;
}

.subnav a {
  display: inline-block;
  padding: 0.35rem 0;
  margin-bottom: -1px;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.subnav a:hover {
  color: var(--ink);
  border-bottom-color: var(--rule-strong);
}

.subnav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--green);
}

/* ------------------------------------------------------------------ seams */

/* Where a project hooks its own code in: each kind, then its marker lines. */
.seams > p {
  max-width: var(--measure);
}

.seams .seam {
  margin: 0 0 0.35rem;
}

.seams pre {
  margin-bottom: 0.9rem;
}

/* ------------------------------------------------------------------ tests */

/* The line under a capability's summary: how many tests pin it. */
.tests-line {
  margin: 0.5rem 0 0;
  font-size: 0.96rem;
}

.tests-line b {
  font-family: var(--mono);
  font-weight: 500;
}

.tests-line__fns {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.84rem;
  color: var(--ink-faint);
  font-family: var(--mono);
}

.fn-tests {
  font-size: 0.8em;
  font-weight: 400;
}

.entry__tests {
  color: var(--ink-faint);
}

/* A long table of tests folds after its first rows; <details> needs no script. */
.tests-more {
  margin: -0.6rem 0 1.2rem;
}

.tests-more summary {
  cursor: pointer;
  color: var(--green);
  font-size: 0.94rem;
  padding: 0.3rem 0;
}

.tests-more[open] summary {
  margin-bottom: 0.4rem;
}

/* A vector's case name is the column you scan, so it keeps its own width
   rather than collapsing to one word per line beside a long argument list. */
.vectors td:first-child {
  min-width: 11rem;
}

/* ------------------------------------------------------------- language */

/* Which language capabilities are shown in: set anywhere, kept everywhere.
   Marked the way the theme pick marks its choice. */
.lang-pick {
  position: relative;
  font-size: 0.86rem;
}

.lang-pick > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  white-space: nowrap;
  user-select: none;
}

.lang-pick > summary::-webkit-details-marker {
  display: none;
}

/* The caret, drawn with borders so it follows the text colour in both themes. */
.lang-pick > summary::after {
  content: "";
  align-self: center;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.15rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.lang-pick[open] > summary::after {
  transform: translateY(1px) rotate(-135deg);
}

.lang-pick > summary:hover,
.lang-pick[open] > summary {
  border-color: var(--ink-soft);
}

.lang-pick > summary:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.lang-pick__label {
  color: var(--ink-faint);
}

.lang-pick__current {
  color: var(--ink);
  font-weight: 500;
}

.lang-pick__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.3rem);
  z-index: 20;
  min-width: 9rem;
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  box-shadow: 0 6px 18px var(--shadow);
}

.lang-pick__menu a {
  display: block;
  padding: 0.4rem 0.8rem;
  color: var(--ink-soft);
  text-decoration: none;
}

.lang-pick__menu a:hover,
.lang-pick__menu a:focus-visible {
  background: var(--paper-sunk);
  color: var(--ink);
}

.lang-pick__menu a[aria-current="true"] {
  color: var(--green);
  font-weight: 500;
}

.lang-pick__menu a[aria-current="true"]::before {
  content: "✓ ";
}

/* The switcher on a capability page is the settings sub-nav, one tab per
   language the version implements. */
.lang-tabs {
  margin: 0.4rem 0 1rem;
}

.lang-fallback {
  font-size: 0.92rem;
}

/* A group: an index of its functions, then each one under its own anchor,
   ruled off from the next like entries in a ledger. The per-function
   switcher is smaller, since the page's own sits above the index. */
.fn-index {
  padding-left: 1.4rem;
  margin: 0.4rem 0 1.2rem;
}

.fn-index li {
  margin: 0.2rem 0;
  overflow-wrap: anywhere;
}

.function__one {
  border-top: 1px solid var(--rule);
  padding-top: 0.8rem;
  margin-top: 1.6rem;
  scroll-margin-top: 1rem;
}

.function__one h3 {
  margin-top: 0;
}

.function__one h3 a {
  font-family: var(--mono);
  color: inherit;
  text-decoration: none;
}

.lang-tabs--fn {
  margin: 0.2rem 0 0.6rem;
  font-size: 0.86rem;
}

/* ------------------------------------------------------------- the code */

/* The function is the record: the implementation file in full, in a block
   that scrolls sideways on its own, so a long line never widens the page. */
.code {
  margin: 1.2rem 0 1.6rem;
  min-width: 0;
}

.code__head {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  font-size: 0.86rem;
  margin-bottom: 0.35rem;
}

.code__why {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}

.code__body {
  margin: 0;
  max-width: 100%;
  font-size: 0.82rem;
  tab-size: 4;
}

.code__body a {
  color: inherit;
  text-decoration-color: var(--green);
}

/* Where an import comes from: said beside the line, in the page's voice
   rather than the code's, and left out when the code is copied. */
.code__note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95em;
  color: var(--ink-faint);
  user-select: none;
}

.signature {
  font-size: 0.86rem;
  border-left-color: var(--green);
}

.tok-k {
  color: var(--green);
}

.tok-s {
  color: var(--amber);
}

.tok-c {
  color: var(--ink-faint);
  font-style: italic;
}

.tok-n {
  color: var(--ink-soft);
}

/* A few worked calls, straight from the vectors. */
.examples {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
}

.examples li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
  overflow-wrap: anywhere;
}

.examples .example__call {
  background: none;
  padding: 0;
}

.examples .arrow {
  color: var(--ink-faint);
  padding: 0 0.2rem;
}

.examples .example__case {
  display: block;
  font-size: 0.86rem;
}

/* A listing row names the function the way the visitor's language does. */
.entry__use {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

.entry__use code {
  font-size: 0.82rem;
}

.entry__lang {
  color: var(--green);
  font-weight: 500;
}

/* A capability's signature in one language, rendered from its manifest. */
.lang-block {
  margin: 0 0 1rem;
}

.lang-block__label {
  margin: 0 0 0.25rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ------------------------------------------------- frameworks and subsets */

/* What a capability runs on, when that is less than everything: "React ^19 ·
   TypeScript only". A ruled label like a tag, in amber rather than green,
   because it is a limit and not a verification (ticks stay in the rail). */
.platform {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--amber);
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.02rem 0.4rem;
  white-space: nowrap;
  vertical-align: 0.08em;
}

.platform--framework {
  border-left-width: 3px;
}

.entry__id + .platform {
  margin-left: 0.35rem;
}

.platform-line {
  margin: -0.4rem 0 0.6rem;
  max-width: var(--measure);
}

.platform-line .platform {
  margin-right: 0.3rem;
}

@media (max-width: 400px) {
  .platform {
    white-space: normal;
  }
}

/* A language the version is not written in: in its place in the switcher,
   struck through and not a link, with the reason in its title. */
.lang-tabs__off {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink-faint);
  cursor: not-allowed;
}

.lang-tabs__off s {
  text-decoration-thickness: 1px;
}

/* Browse by framework, and the collection link under it. */
.framework-nav {
  margin: 1rem 0 0.6rem;
}

.collections-line {
  font-size: 0.94rem;
  margin: 0 0 0.4rem;
}

/* A component's props: the name, then ? for one the caller may leave out. */
.props td:first-child {
  white-space: nowrap;
}

/* Render tests: the props in, as JSX, and the exact HTML out. Not a table of
   figures, so no greenbar: each case is ruled off like an entry. */
.renders {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 1.2rem;
  border-top: 1px solid var(--rule);
}

.render {
  padding: 0.7rem 0 0.2rem;
  border-bottom: 1px solid var(--rule);
  min-width: 0;
}

.render__case {
  margin: 0 0 0.35rem;
  font-weight: 500;
}

.render__label {
  margin: 0 0 0.25rem;
  font-size: 0.86rem;
  font-style: italic;
}

.render pre {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
}

/* The HTML wraps rather than scrolling: it is one long line, and reading it
   is the point. */
.render__out {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-left-color: var(--green);
}

/* ------------------------------------------------ status, licence, yank */

/* A version's review status, beside its id: "Unreviewed" (rules awaiting an
   expert's sign-off) in amber like a platform limit, "Deprecated" in faint
   ink. Stable says nothing. */
.status {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 400;
  line-height: 1.35;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.02rem 0.4rem;
  white-space: nowrap;
  vertical-align: 0.08em;
}

h1 .status {
  font-size: 0.95rem;
  vertical-align: 0.3em;
}

.status--unreviewed {
  color: var(--amber);
  border-style: dashed;
}

.status--deprecated {
  color: var(--ink-faint);
}

.entry__id ~ .status {
  margin-left: 0.35rem;
}

/* The licence in a listing row's right-hand column. */
.entry__license {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-faint);
  overflow-wrap: anywhere;
}

/* "Before you rely on this": the regulated-function disclaimer, above the
   record. Amber rule, not red: it is a caution, not a failure. */
.disclaimer {
  border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--amber);
  background: var(--paper-sunk);
  padding: 0.7rem 0.9rem;
  margin: 1.2rem 0;
  max-width: var(--measure);
  font-size: 0.95rem;
}

.disclaimer p:last-child {
  margin-bottom: 0;
}

.flash--deprecated {
  border-left-color: var(--ink-faint);
}

@media (max-width: 400px) {
  .status {
    white-space: normal;
  }
}

/* ---------------------------------------------------------------- suites */

/* A suite member's tier beside its id: core is ink, optional faint. */
.tier {
  display: inline-block;
  font-family: var(--serif);
  font-size: 0.78rem;
  line-height: 1.35;
  border: 1px solid currentColor;
  border-radius: 2px;
  padding: 0.02rem 0.35rem;
  margin-left: 0.35rem;
  vertical-align: 0.1em;
}

.tier--core {
  color: var(--ink-soft);
}

.tier--optional {
  color: var(--ink-faint);
  border-style: dashed;
}

/* The line that uses a member: compact, under its summary. */
.suite-ref {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  overflow-x: auto;
}

/* What Functional Weave does not cover: ruled in ledger red, since it is what is owed. */
.gaps {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
}

.gaps li {
  border-left: 3px solid var(--red);
  padding: 0.25rem 0 0.25rem 0.7rem;
  margin-bottom: 0.4rem;
}

.gap-key {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--red);
  margin-right: 0.35rem;
}

.suite-section h2 {
  margin-bottom: 0.2rem;
}

/* ============================================================ forms, v2
 *
 * The shared pieces in src/views/forms.ts: a field whose label is a
 * <label for>, its hint and its own error; the button sizes; cards; the
 * centred card of the sign-in pages; numbered steps; the confirmation in
 * front of anything destructive.
 */

.field > label {
  display: block;
  font-size: 0.94rem;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.field__optional {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-left: 0.25rem;
}

.field > .hint {
  margin: 0.35rem 0 0;
  max-width: none;
}

.field input,
.field select,
.field textarea {
  border-radius: var(--radius);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--green);
}

.field--error input,
.field--error select,
.field--error textarea {
  border-color: var(--red);
  box-shadow: 0 0 0 1px var(--red);
}

.field__error {
  margin: 0.35rem 0 0;
  color: var(--red);
  font-size: 0.9rem;
  display: flex;
  gap: 0.35rem;
}

.field__error::before {
  content: "✗";
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.6;
}

.field--check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.field--check input {
  width: 1.05rem;
  height: 1.05rem;
  margin-top: 0.3rem;
  accent-color: var(--green);
  flex: none;
}

.field--check label {
  font-weight: 500;
}

.field--check .hint {
  display: block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--ink-faint);
  margin-top: 0.1rem;
}

/* A short form on one line: input, select, button. Stacks on a phone. */
.form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0 0.8rem;
}

.form-row select {
  min-height: 2.62rem;
}

.form-row .field {
  flex: 1 1 12rem;
  margin-bottom: 0.6rem;
}

.form-row__submit {
  padding-top: 1.85rem;
}

@media (max-width: 560px) {
  .form-row__submit {
    padding-top: 0;
    flex-basis: 100%;
  }
}

button,
.button {
  border-radius: var(--radius);
  line-height: 1.4;
}

.button--small,
button.button--small {
  font-size: 0.86rem;
  padding: 0.3rem 0.7rem;
}

.button--block,
button.button--block {
  display: block;
  width: 100%;
  text-align: center;
  padding: 0.6rem 1rem;
  margin-top: 0.4rem;
}

.button--danger {
  background: none;
  color: var(--red);
  border-color: var(--red);
}

.button--danger:hover,
button.danger--solid,
.button.danger--solid {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

button.danger--solid:hover {
  filter: brightness(1.1);
  background: var(--red);
}

.actions--tight {
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* The nav's link colour would otherwise win over the button's own. */
.masthead a.button {
  color: var(--paper);
}

.masthead a.button--quiet {
  color: var(--ink);
}

/* ---------------------------------------------------------------- flash */

.flash {
  border-radius: var(--radius);
}

.flash--warning {
  border-left-color: var(--amber);
}

.flash__title {
  font-weight: 500;
  margin-bottom: 0.2rem;
}

/* ---------------------------------------------------------------- cards */

.card {
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 1.4rem 1.5rem;
  margin: 0 0 1.5rem;
}

.card > :last-child {
  margin-bottom: 0;
}

.card__title {
  font-size: 1.3rem;
  margin: 0 0 0.8rem;
}

.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.card__count {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  margin-left: 0.3rem;
}

.card--danger {
  border-color: color-mix(in srgb, var(--red) 35%, var(--rule));
}

.card--reveal {
  border: 1px solid var(--green);
  border-left-width: 3px;
  background: var(--paper-sunk);
}

.card--reveal .card__title {
  font-size: 1.12rem;
}

.card .register,
.card .empty {
  margin-top: 0.4rem;
}

.card .empty {
  margin-bottom: 0;
}

.stack {
  max-width: 44rem;
}

@media (max-width: 560px) {
  .card {
    padding: 1.1rem 1rem;
  }
}

/* ------------------------------------------------------------ page head */

.page-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin: 2.2rem 0 0;
}

.page-head h1 {
  margin-bottom: 0.3rem;
  overflow-wrap: anywhere;
}

.page-head .lede {
  margin: 0.4rem 0 0;
}

.page-head .avatar {
  margin-top: 0.4rem;
}

.page-head__kicker {
  margin: 0 0 0.2rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
}

.page-head__kicker a {
  color: var(--ink-faint);
}

.page-head__meta {
  margin: 0;
  font-size: 0.92rem;
}

.page-head--split {
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1.6rem;
}

.page-head + .subnav {
  margin-top: 1.2rem;
}

@media (max-width: 560px) {
  .page-head .avatar--large {
    display: none;
  }
}

/* ----------------------------------------------------------------- pills */

.pill {
  display: inline-block;
  padding: 0.02rem 0.5rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  white-space: nowrap;
  vertical-align: 0.08em;
}

.pill--ok {
  border-color: var(--green);
  color: var(--green);
}

.pill--bad {
  border-color: var(--red);
  color: var(--red);
}

.pill--role {
  font-size: 0.78rem;
}

/* ---------------------------------------------------------------- auth */

/* Sign in, sign up and the password pages: one card, centred, then where
   else to go. */
.auth {
  max-width: 27rem;
  margin: 3rem auto 0;
}

.auth__card {
  padding: 2rem 2rem 1.6rem;
  box-shadow: 0 1px 2px var(--shadow), 0 8px 28px var(--shadow);
}

.auth__card h1 {
  font-size: 1.9rem;
  margin-bottom: 0.4rem;
}

.auth__lede {
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.auth__mark {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--green);
  margin-bottom: 0.4rem;
}

.auth .field {
  max-width: none;
}

.auth__aside {
  margin: -0.4rem 0 0.8rem;
  text-align: right;
  font-size: 0.9rem;
}

.auth__after {
  text-align: center;
  margin-top: 1.3rem;
  font-size: 0.95rem;
}

.auth__after p {
  margin: 0 auto 0.5rem;
}

.auth__after .dim {
  font-size: 0.88rem;
}

@media (max-width: 480px) {
  .auth {
    margin-top: 1.5rem;
  }
  .auth__card {
    padding: 1.4rem 1.1rem 1.2rem;
  }
}

/* ---------------------------------------------------------------- steps */

.steps {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
}

.steps__item {
  display: grid;
  grid-template-columns: 1.9rem minmax(0, 1fr);
  gap: 0 0.75rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--rule);
}

.steps__item:first-child {
  border-top: 0;
}

.steps__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 1px solid var(--rule-strong);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

.steps__item--done .steps__num {
  border-color: var(--green);
  color: var(--green);
}

.steps__item--done strong {
  color: var(--ink-soft);
}

.steps__item--current .steps__num {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.steps__body {
  font-size: 0.93rem;
  color: var(--ink-soft);
  margin: 0.1rem 0 0.4rem;
}

.steps .button {
  margin-top: 0.2rem;
}

/* ------------------------------------------------------------- confirm */

/* A destructive action's first button opens a panel with the real one in it. */
.confirm {
  display: inline-block;
  vertical-align: top;
}

.confirm > summary {
  list-style: none;
  cursor: pointer;
  display: inline-block;
  font-size: 0.86rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--red);
  border-radius: var(--radius);
  color: var(--red);
  white-space: nowrap;
  user-select: none;
}

.confirm > summary:hover {
  background: color-mix(in srgb, var(--red) 8%, transparent);
}

.confirm[open] > summary {
  color: var(--ink-soft);
  border-color: var(--rule-strong);
}

.confirm__panel {
  margin-top: 0.5rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--red);
  border-left-width: 3px;
  border-radius: var(--radius);
  background: var(--paper-sunk);
  max-width: 26rem;
  font-size: 0.92rem;
}

.confirm__panel p {
  margin-bottom: 0.4rem;
}

.confirm__panel .actions {
  margin-top: 0.4rem;
}

/* --------------------------------------------------------------- copying */

.copyable {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.copyable .secret {
  flex: 1;
  margin: 0;
  display: block;
  border-radius: var(--radius);
}

.copyable--block pre {
  flex: 1;
  margin: 0;
  min-width: 0;
}

.copyable button {
  flex: none;
  align-self: flex-start;
}

.copyable button[data-copied] {
  border-color: var(--green);
  color: var(--green);
}

@media (max-width: 560px) {
  .copyable {
    flex-direction: column;
  }
}

/* ------------------------------------------------------------- odds */

tr.is-revoked td {
  color: var(--ink-faint);
}

.role-form select {
  width: auto;
  padding: 0.25rem 0.4rem;
  font-size: 0.88rem;
}

.entry__mark .avatar {
  margin-top: 0.1rem;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 0.9rem;
}

/* Never sideways on a phone: a long word or a wide table scrolls inside its
   own box, not the page. */
html,
body {
  overflow-x: clip;
}

/* Steps in a sidebar keep their own rules, not the sidebar list's. */
.side .steps__item {
  border-bottom: 0;
  padding: 0.6rem 0;
}

/* Device login: the code the terminal shows */
.device-code { font-family: var(--mono, ui-monospace, monospace); font-size: 2rem; letter-spacing: .2em; text-align: center; margin: 1rem 0; }
