/* Component layer. Buttons, panels, chips, fields, status, nav, footer. */

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0 var(--s5);
  height: 44px;
  border: var(--hair) solid var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color var(--t-base) var(--ease), color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease), transform var(--t-micro) var(--ease);
}

.btn:hover {
  border-color: var(--text);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--invert-bg);
  color: var(--invert-text);
  border-color: var(--invert-bg);
}

.btn--primary:hover {
  background: var(--text);
  border-color: var(--text);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text-2);
}

.btn--ghost:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  border-color: var(--line);
}

.btn--sm {
  height: 36px;
  padding-inline: var(--s4);
}

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

.btn .ico {
  transition: transform var(--t-base) var(--ease);
}

.btn:hover .ico--shift {
  transform: translateX(3px);
}

/* Highlight. For the one clause in a paragraph that carries the whole point.

   Resting state is always visible, so it works with JavaScript switched off.
   As the clause crosses the middle of the viewport, highlight.js adds .hl--on
   and it inverts: the strongest emphasis a black and white palette can make
   without borrowing a state colour. Everything around it dims at the same
   moment, because contrast is what the eye actually catches. */

.hl {
  position: relative;
  color: var(--text);
  font-weight: 600;
  /* mark carries a yellow background by default. The design has no yellow. */
  background-color: transparent;
  padding: 0.14em 0.28em;
  margin-inline: -0.1em;
  border-radius: 2px;
  background-image: linear-gradient(var(--hl-band), var(--hl-band)),
    linear-gradient(var(--text), var(--text));
  background-repeat: no-repeat;
  background-position: 0 0, 0 100%;
  background-size: 100% 100%, 100% 2px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: color var(--t-base) var(--ease),
    background-color var(--t-base) var(--ease),
    background-size var(--t-base) var(--ease);
}

/* Active: inverted block. Held while the line sits in the reading band. */
.hl--on {
  color: var(--invert-text);
  background-color: var(--invert-bg);
  background-image: none;
}

/* The surrounding sentence steps back while its highlight is lit. */
p.hl-context {
  color: var(--text-3);
  transition: color var(--t-base) var(--ease);
}

/* Link with an underline that draws in */

.linkline {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  color: var(--text);
  padding-bottom: 2px;
}

.linkline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: var(--hair);
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-base) var(--ease);
}

.linkline:hover::after,
.linkline:focus-visible::after {
  transform: scaleX(1);
}

/* Panels with corner ticks */

.panel {
  position: relative;
  background: var(--surface);
  border: var(--hair) solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s6);
  overflow: hidden;
}

.panel--flush {
  padding: 0;
}

.panel--brick::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--brick) var(--hair), transparent var(--hair)),
    linear-gradient(to bottom, var(--brick) var(--hair), transparent var(--hair));
  background-size: 32px 16px, 100% 16px;
  -webkit-mask-image: radial-gradient(120% 100% at 0% 0%, #000, transparent 78%);
  mask-image: radial-gradient(120% 100% at 0% 0%, #000, transparent 78%);
}

.panel > * {
  position: relative;
  z-index: 1;
}

.ticks::before,
.ticks::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border: var(--hair) solid var(--line-strong);
  pointer-events: none;
  z-index: 2;
}

.ticks::before {
  top: 8px;
  left: 8px;
  border-right: 0;
  border-bottom: 0;
}

.ticks::after {
  bottom: 8px;
  right: 8px;
  border-left: 0;
  border-top: 0;
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  height: 100%;
  transition: border-color var(--t-base) var(--ease), transform var(--t-base) var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
}

.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: var(--hair) solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  color: var(--text);
}

.card__title {
  font-size: var(--fs-lg);
}

/* Chips and status */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 6px var(--s3);
  border: var(--hair) solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--text-3);
  position: relative;
}

.status-dot--ok {
  background: var(--ok);
}
.status-dot--warn {
  background: var(--warn);
}
.status-dot--err {
  background: var(--err);
}
.status-dot--info {
  background: var(--info);
}

.status-dot--pulse::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: inherit;
  opacity: 0.35;
  animation: dot-pulse 2.4s var(--ease) infinite;
}

@keyframes dot-pulse {
  0% {
    transform: scale(0.6);
    opacity: 0.45;
  }
  70% {
    transform: scale(1.8);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.state-ok {
  color: var(--ok);
}
.state-warn {
  color: var(--warn);
}
.state-err {
  color: var(--err);
}
.state-info {
  color: var(--info);
}

/* Fields */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.field > label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field__input {
  width: 100%;
  padding: var(--s3) var(--s4);
  min-height: 44px;
  background: var(--surface-2);
  border: var(--hair) solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.field__input::placeholder {
  color: var(--text-3);
}

.field__input:hover {
  border-color: var(--line-strong);
}

.field__input:focus {
  outline: none;
  border-color: var(--text);
  background: var(--surface);
}

textarea.field__input {
  resize: vertical;
  min-height: 112px;
  line-height: 1.6;
}

select.field__input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: var(--s8);
}

.field__hint {
  font-size: var(--fs-xs);
  color: var(--text-3);
}

.field__error,
.errorlist {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  font-size: var(--fs-xs);
  color: var(--err);
}

.errorlist li {
  color: var(--err);
  font-size: var(--fs-xs);
}

.field--invalid .field__input {
  border-color: var(--err);
}

.helptext,
.helptext ul {
  font-size: var(--fs-xs);
  color: var(--text-3);
  line-height: 1.5;
}

.helptext li {
  position: relative;
  padding-left: var(--s4);
}

.helptext li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: var(--hair);
  background: var(--line-strong);
}

/* Notice bar */

.notice {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border: var(--hair) solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
  font-size: var(--fs-sm);
}

.notice--ok {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}
.notice--warn {
  border-color: var(--warn);
  background: var(--warn-soft);
  color: var(--warn);
}
.notice--err {
  border-color: var(--err);
  background: var(--err-soft);
  color: var(--err);
}
.notice--info {
  border-color: var(--info);
  background: var(--info-soft);
  color: var(--info);
}

/* Navigation */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 80;
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  border-bottom: var(--hair) solid transparent;
  transition: border-color var(--t-base) var(--ease), background-color var(--t-base) var(--ease);
}

.nav.is-stuck {
  border-bottom-color: var(--line);
}

/* Over a dark photographic section the bar dissolves into the image. */
.nav.is-over-dark {
  color: var(--text);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0));
  backdrop-filter: none;
  border-bottom-color: transparent;
}

/* Reading progress along the bottom edge of the nav. Reads the same
   --scroll-progress value the landing rail does. */
.nav__progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  height: 2px;
  width: var(--scroll-progress, 0%);
  background: var(--text);
  opacity: 0.9;
  pointer-events: none;
  transition: width var(--t-micro) linear;
}

/* Keyboard hint */

kbd {
  display: inline-block;
  min-width: 20px;
  padding: 2px 6px;
  border: var(--hair) solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.4;
  text-align: center;
}

.kbd-hint {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
}

/* Spotlight. A lamp that follows the pointer across the brick lattice. */

.spot {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    var(--glow),
    transparent 68%
  );
}

.spot--wide {
  background: radial-gradient(
    560px circle at var(--mx, 50%) var(--my, 50%),
    var(--glow),
    transparent 66%
  );
}

.is-lit > .spot {
  opacity: 1;
}

/* .panel > * forces position relative and z-index 1 on children, which the
   spotlight must opt out of to sit behind the content. */
.panel > .spot {
  position: absolute;
  z-index: 0;
}

/* Copy button. Swaps to a check for a moment after a successful copy. */

.btn .ico--copied {
  display: none;
}

.btn.is-copied {
  border-color: var(--ok);
  color: var(--ok);
}

.btn.is-copied .ico--copy {
  display: none;
}

.btn.is-copied .ico--copied {
  display: block;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  height: 68px;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
}

.mark__glyph {
  width: 30px;
  height: 30px;
  color: var(--text);
}

.mark__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.mark__name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: var(--fs-base);
}

.mark__sub {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-top: 3px;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--s2);
}

.nav__link {
  position: relative;
  padding: var(--s2) var(--s3);
  border-radius: var(--r);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color var(--t-base) var(--ease);
}

.nav__link:hover,
.nav__link.is-active,
.nav__link[aria-current="page"] {
  color: var(--text);
}

.nav__link.is-active::after,
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: var(--s3);
  right: var(--s3);
  bottom: 2px;
  height: var(--hair);
  background: var(--text);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
}

.nav__cta {
  display: none;
}

.menu-toggle {
  display: inline-flex;
}


/* The icon shows the theme you would switch to, so the light default offers a
   moon and the dark override offers a sun. */
.theme-toggle .ico--sun {
  display: none;
}

.theme-toggle .ico--moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .ico--sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .ico--moon {
  display: none;
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }

  .nav__cta {
    display: inline-flex;
  }

  .menu-toggle {
    display: none;
  }

  .drawer {
    display: none;
  }
}

/* Footer */

.footer {
  /* Sized so the wordmark always fits the viewport width. Six characters at
     weight 800 with tight tracking run to roughly 3.6 times the font size. */
  --wordmark: min(21vw, 15rem);

  position: relative;
  border-top: var(--hair) solid var(--line);
  padding-top: var(--s10);
  /* Reserves the room the wordmark needs, so it is never clipped. */
  padding-bottom: calc(var(--wordmark) * 0.78 + 26px);
  overflow: hidden;
  /* Keeps the brick field, which sits at z-index -1, inside the footer. */
  isolation: isolate;
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: var(--s7);
  padding-bottom: var(--s9);
}

.footer__col h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 500;
  margin-bottom: var(--s4);
}

.footer__col li + li {
  margin-top: var(--s2);
}

.footer__col a {
  color: var(--text-2);
  font-size: var(--fs-sm);
  transition: color var(--t-base) var(--ease);
}

.footer__col a:hover {
  color: var(--text);
}

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s5);
  border-top: var(--hair) solid var(--line);
  flex-wrap: wrap;
}

.footer > * {
  position: relative;
  z-index: 1;
}

/* Declared after ".footer > *" on purpose. Both selectors have the same
   specificity, so the later one wins, and the earlier version of this rule sat
   above it: position:absolute lost to position:relative, the wordmark dropped
   into the flow, and overflow:hidden cut off whatever spilled. */
.footer__wordmark {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 0;
  font-size: var(--wordmark);
  line-height: 0.78;
  font-weight: 800;
  letter-spacing: -0.06em;
  color: var(--text);
  opacity: 0.06;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .footer__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Photo plates.
   Monochrome photographs framed like plates in a technical document: a hairline
   frame, corner ticks from .ticks, and a mono caption. The files are already
   black and white (tools/retouch_photos.py), so no colour ever enters the page
   through a photo and the state palette keeps its meaning. */

.plate {
  margin: 0;
  display: flex;
  flex-direction: column;
}

.plate__stack,
.plate__media {
  position: relative;
  aspect-ratio: var(--plate-ratio, 4 / 3);
  overflow: hidden;
  background: var(--surface-2);
}

.plate__stack img,
.plate__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Carousel slides: stacked, cross faded, with a slow settle on the active one. */
.plate__stack .plate__img {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 900ms var(--ease), transform 7s linear;
}

.plate__stack .plate__img.is-active {
  opacity: 1;
  transform: scale(1);
}

.plate__caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  border-top: var(--hair) solid var(--line);
}

.plate__label {
  color: var(--text);
}

/* Hairline that fills over one autoplay interval. */
.plate__progress {
  position: relative;
  height: 2px;
  background: var(--line);
}

.plate__progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: var(--text);
}

.plate__progress.is-running span {
  animation: plate-fill var(--plate-interval, 6000ms) linear forwards;
}

@keyframes plate-fill {
  to {
    width: 100%;
  }
}

/* Dark theme: pull the photos down a touch so they sit in the page, not on it. */
[data-theme="dark"] .plate__stack img,
[data-theme="dark"] .plate__media img {
  filter: brightness(0.86);
}

@media (prefers-reduced-motion: reduce) {
  .plate__stack .plate__img {
    transform: none;
  }
}


/* Status panel. Shared: the landing status table, system pages and the dashboard. */

.statuspanel {
  padding: 0;
}

.statuspanel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) var(--s6);
  border-bottom: var(--hair) solid var(--line);
  background: var(--surface-2);
  flex-wrap: wrap;
}

.statusrow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px minmax(0, 1.3fr);
  gap: var(--s4);
  align-items: center;
  padding: var(--s5) var(--s6);
  border-bottom: var(--hair) solid var(--line);
}

.statusrow:last-child {
  border-bottom: 0;
}

.statusrow__name {
  font-weight: 600;
  letter-spacing: -0.01em;
}

.statusrow__state {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.statusrow__note {
  font-size: var(--fs-sm);
  color: var(--text-2);
}

@media (max-width: 760px) {
  .statusrow {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s2);
  }
}


/* Systems menu in the desktop nav (nav.js). */

.navdrop {
  position: relative;
}

.navdrop__toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  background: none;
  border: 0;
  cursor: pointer;
}

.navdrop__chev {
  transition: transform var(--t-base) var(--ease);
}

.navdrop.is-open .navdrop__chev {
  transform: rotate(180deg);
}

.navdrop.is-open .navdrop__toggle {
  color: var(--text);
}

.navdrop__panel {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  transform: translateX(-50%);
  width: min(820px, calc(100vw - 48px));
  padding: var(--s5);
  z-index: 90;
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.35);
}

.navdrop__panel[hidden] {
  display: none;
}

.navdrop__groups {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s5);
}

.navdrop__label {
  display: block;
  padding-bottom: var(--s2);
  margin-bottom: var(--s3);
  border-bottom: var(--hair) solid var(--line);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.navdrop__group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s1);
}

.navdrop__item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s2);
  margin-inline: calc(var(--s2) * -1);
  border-radius: var(--r);
  color: var(--text);
  transition: background-color var(--t-base) var(--ease);
}

.navdrop__item:hover,
.navdrop__item:focus-visible {
  background: var(--surface-2);
}

.navdrop__icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: var(--hair) solid var(--line);
  border-radius: var(--r);
  background: var(--surface-2);
}

.navdrop__name {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
}

.navdrop__meta {
  display: block;
  margin-top: 3px;
  font-size: var(--fs-xs);
  line-height: 1.45;
  color: var(--text-3);
}

/* Inline, so the dot stays with its stage when the line wraps. */
.navdrop__meta .status-dot {
  display: inline-block;
  margin-right: 5px;
  vertical-align: 1px;
}

.navdrop__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: var(--hair) solid var(--line);
}

/* Mobile sidebar: slides in from the right (nav.js). Outside the header, so it
   is positioned against the viewport. Hidden from 900px up. */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 120;
  visibility: hidden;
  pointer-events: none;
  /* Stay visible until the sheet has slid out, then hide. */
  transition: visibility 0s linear var(--t-slow);
}

.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity var(--t-slow) var(--ease);
}

.drawer.is-open .drawer__scrim {
  opacity: 1;
}

.drawer__sheet {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  height: 100dvh;
  width: min(88vw, 380px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-left: var(--hair) solid var(--line);
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
  outline: none;
}

.drawer.is-open .drawer__sheet {
  transform: none;
}

.drawer__head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 var(--s5);
  border-bottom: var(--hair) solid var(--line);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--s5) var(--s6);
}

.drawer__label {
  display: block;
  margin: var(--s6) 0 var(--s2);
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.drawer__link,
.drawer__system {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) 0;
  border-bottom: var(--hair) solid var(--line);
  color: var(--text);
}

.drawer__link {
  font-weight: 600;
}

.drawer__link .mono {
  color: var(--text-3);
}

.drawer__system-name {
  flex: 1;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.drawer__all {
  justify-content: space-between;
  margin-top: var(--s2);
  border-bottom: 0;
}

.drawer__foot {
  flex: none;
  display: grid;
  gap: var(--s2);
  padding: var(--s4) var(--s5) calc(var(--s4) + env(safe-area-inset-bottom, 0px));
  border-top: var(--hair) solid var(--line);
  background: var(--surface);
}

/* The page behind the open sidebar does not scroll. */
html.is-locked {
  overflow: hidden;
}

/* Word reveal ([data-split], motion.js). Words rise out of their own line box
   when first seen. Only while motion is live: otherwise text is simply there. */
.w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.wi {
  display: inline-block;
}

.motion-live [data-split] .wi {
  transform: translateY(110%);
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.1, 1) calc(var(--i, 0) * 60ms);
}

.motion-live [data-split].is-in .wi {
  transform: none;
}

/* Status rows that open a page. */
.statusrow--link {
  color: inherit;
  text-decoration: none;
  transition: background-color var(--t-base) var(--ease);
}

.statusrow--link:hover {
  background: var(--surface-2);
}
