/* APHEL: a console window, not a skin. One font on one grid, one accent, square corners. */
@font-face {
  font-family: 'Departure Mono';
  src: url('/assets/fonts/DepartureMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

:root {
  --paper: #000;
  --panel: #0a0a0a;
  --line: #2c2c2c;
  --line-2: #4d4d4d;
  --ink: #e6e6e6;
  --ink-2: #a8a8a8;
  --ink-3: #808080;
  /* Calm on black: dark fill, light text in the same hue. Colour tells apart, it doesn't shout. */
  --accent: #93e6a8;
  --accent-bg: #12261a;
  --accent-line: #33693f;
  --accent-press: #1b3a26;
  --warn: #e8b45a;
  --ok: #93e6a8;
  --info: #8cc4f5;
  --tg: #8cc4f5;
  --tg-bg: #101f30;
  --tg-line: #2c5f8f;
  --tg-press: #183149;
  --bad: #f2767c;
  --bad-bg: #2e1315;
  --bad-line: #8c3338;
  --bad-press: #4a1c1f;

  /* Departure Mono is drawn on an 11 px em: these sizes land on its grid. */
  --t-xs: 11px;
  --t-sm: 13.75px;
  --t-md: 16.5px;
  --t-lg: 22px;
  --t-xl: 33px;
  --lh-xs: 16px;
  --lh-sm: 20px;
  --lh-md: 24px;
  --lh-lg: 28px;
  --lh-xl: 40px;

  --gap: 12px;
  --pad: 12px;
  --bar: 28px;
  --btn: 46px;
  --shell: 520px;
  --ease: cubic-bezier(.2, .7, .1, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Departure Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  position: fixed;
  inset: 0;
  overflow: hidden;
  /* One faint dot per cell of the character grid. Windows sit on top of it. */
  background-image:
    radial-gradient(#1c1c1c 1px, transparent 1.5px),
    radial-gradient(120% 55% at 50% -5%, #0d1a12 0%, rgba(0, 0, 0, 0) 70%);
  background-size: 14px 14px, 100% 100%;
  background-position: 0 2px, 0 0;
  background-color: var(--paper);
}

::selection { background: var(--ink); color: var(--paper); }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; font-weight: 400; font-size: inherit; line-height: inherit; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; border-radius: 0; }
button { background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
b, strong { font-weight: 400; color: var(--ink); }
code { font: inherit; }

:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- shell */

.shell {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  min-height: 0;
}

.top {
  position: relative;
  z-index: 2;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1ch;
  padding: calc(var(--safe-top) + 10px) var(--gap) 10px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.top__brand {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: var(--t-lg);
  line-height: var(--lh-lg);
  letter-spacing: .02em;
}

.cursor {
  display: inline-block;
  width: .62em;
  height: 1em;
  margin-left: .12em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.top__state { display: flex; align-items: center; gap: 1ch; color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); white-space: nowrap; }
.top__state .dot { width: 7px; height: 7px; }

.views { position: relative; flex: 1 1 auto; min-height: 0; }

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap) var(--gap) calc(var(--gap) * 2);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}

.view > * { flex: none; }
.view.is-entering > * {
  animation: rise .3s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 45ms);
}
/* Only transform and opacity: the phone's compositor moves these without repainting anything. */
@keyframes rise {
  from { opacity: 0; transform: translate3d(calc(var(--dir, 1) * 16px), 8px, 0); }
  to { opacity: 1; transform: none; }
}

.prompt {
  color: var(--ink-3);
  font-size: var(--t-xs);
  line-height: var(--lh-xs);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt i { font-style: normal; color: var(--info); }
.prompt u { text-decoration: none; color: var(--ok); }

/* The status line: part of the layout, so a message never covers anything. */
.status {
  flex: none;
  padding: 8px var(--gap);
  border-top: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--accent);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
}
.status.is-bad { color: var(--bad); }
.status.is-ok { color: var(--ok); }

.nav {
  position: relative;
  z-index: 2;
  flex: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-2);
  background: var(--paper);
  padding-bottom: var(--safe-bottom);
}

/* One bar travels between the tabs; the chosen one lights up under it. */
.nav__hi {
  position: absolute;
  left: 0;
  top: -1px;
  width: calc(100% / 3);
  height: 2px;
  background: var(--accent);
  transition: transform .24s var(--ease);
  will-change: transform;
}

.nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 56px;
  color: var(--ink-3);
  font-size: var(--t-xs);
  line-height: 1;
  transition: color .18s linear;
}
.nav button .px { width: 18px; height: 18px; }
.nav button[aria-current='page'] { color: var(--accent); }
.nav button:active .px { transform: translateY(1px); }

/* -------------------------------------------------------------- windows */

.win { display: block; width: 100%; border: 1px solid var(--line); background: var(--paper); min-width: 0; text-align: left; box-shadow: 4px 4px 0 #101010; }
.win--link:active { background: var(--panel); border-color: var(--c, var(--line-2)); }

.win__bar {
  display: flex;
  align-items: center;
  gap: 1ch;
  height: var(--bar);
  padding: 0 8px;
  width: 100%;
  border-bottom: 1px solid var(--line);
  color: var(--c, var(--ink));
  font-size: var(--t-xs);
  line-height: 1;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
}

.win__title { flex: none; }

.win__fill {
  flex: 1 1 auto;
  min-width: 0;
  height: 9px;
  background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 3px);
}

.win__ctl { flex: none; color: #5c5c5c; letter-spacing: .35ch; margin-right: -.35ch; }

.win__body { display: flex; flex-direction: column; gap: 10px; padding: var(--pad); min-width: 0; }

/* Open and close in place. */
.fold { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .24s var(--ease); }
.is-open > .fold { grid-template-rows: 1fr; }
.fold__in { min-height: 0; overflow: hidden; }
.win--fold > .win__bar { height: 40px; }
.win--fold:not(.is-open) > .win__bar { border-bottom-color: transparent; }
.sub__toggle {
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 6px 0;
  color: var(--ink-3);
  font-size: var(--t-xs);
  line-height: var(--lh-xs);
}
.sub__toggle:active { color: var(--ink); }
.sub__body { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }

/* The far point of an orbit: the idea behind the name. */
.orbit { position: relative; height: 96px; margin: calc(var(--pad) * -1) calc(var(--pad) * -1) 0; border-bottom: 1px solid var(--line); overflow: hidden; }
.orbit canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.orbit__label { position: absolute; right: 8px; top: 6px; color: #566070; font-size: var(--t-xs); line-height: 1; text-align: right; transition: color .4s linear; }
.orbit__label.is-near { color: var(--accent); }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 1ch; min-height: 36px; }
.chip {
  flex: none;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: 1;
}
.chip:active { background: var(--ink); color: var(--paper); }

.title { font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.note { color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.note--dim { color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); }
.is-bad-text { color: var(--bad); }
.is-ok-text { color: var(--ok); }
.is-warn-text { color: var(--warn); }

.state { display: flex; align-items: center; gap: 1ch; font-size: var(--t-md); line-height: var(--lh-md); }
.dot {
  flex: none;
  display: inline-block;
  width: 9px;
  height: 9px;
  background: currentColor;
}

.clock {
  font-size: var(--t-xl);
  line-height: var(--lh-xl);
  letter-spacing: -.01em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dot--live { animation: live 2.4s steps(1) infinite; }
@keyframes live { 0%, 88%, 94%, 100% { opacity: 1; } 91%, 97% { opacity: .15; } }

/* Figures that matter more than a row. */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  text-align: left;
  min-width: 0;
}
.tile span { color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); }
.tile b { font-size: var(--t-md); line-height: var(--lh-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.tile:active { background: var(--ink); }
button.tile:active span, button.tile:active b { color: var(--paper); }

.servers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.servers li { display: flex; align-items: center; gap: 10px; min-width: 0; }
.servers canvas { flex: none; width: 48px; height: 32px; image-rendering: pixelated; }
.servers span { display: flex; flex-direction: column; min-width: 0; }
.servers b { font-size: var(--t-sm); line-height: var(--lh-xs); }
.servers small { color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* key ........ value */
.rows { display: flex; flex-direction: column; gap: 4px; }
.row { display: flex; align-items: baseline; gap: 1ch; min-width: 0; }
.row > span:first-child { flex: none; color: var(--ink-3); }
.row > i {
  flex: 1 1 8px;
  min-width: 8px;
  height: 1px;
  background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px);
  background-size: 4px 1px;
  transform: translateY(-3px);
}
.row > b { flex: 0 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.row--total > span:first-child, .row--total > b { color: var(--ink); font-size: var(--t-md); line-height: var(--lh-md); }

/* -------------------------------------------------------------- buttons */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1ch;
  width: 100%;
  min-height: var(--btn);
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
  text-align: center;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color .08s linear, color .08s linear, border-color .08s linear, transform .08s linear;
}
.btn:active { transform: translateY(1px); }
.btn:active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.btn--primary, .btn--accent { background-color: var(--accent-bg); border-color: var(--accent-line); color: var(--accent); font-size: var(--t-md); line-height: var(--lh-md); }
.btn--primary:active, .btn--accent:active { background-color: var(--accent-press); border-color: var(--accent); color: var(--accent); }
.btn--accent {
  /* A faint glint crosses it now and then, like light on a phosphor screen. */
  background-image: linear-gradient(100deg, transparent 42%, rgba(147, 230, 168, .16) 50%, transparent 58%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 130% 0;
  animation: glint 6s linear infinite;
}
@keyframes glint { 0%, 80% { background-position: 130% 0; } 100% { background-position: -30% 0; } }
.btn--tg { background-color: var(--tg-bg); border-color: var(--tg-line); color: var(--tg); font-size: var(--t-md); line-height: var(--lh-md); }
.btn--tg:active { background-color: var(--tg-press); border-color: var(--tg); color: var(--tg); }
.btn--danger { background-color: var(--bad-bg); border-color: var(--bad-line); color: #ffc2c5; }
.btn--danger:active { background-color: var(--bad-press); border-color: var(--bad); color: #ffc2c5; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: .45; pointer-events: none; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }

.linkbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1ch;
  width: 100%;
  min-height: 44px;
  padding: 8px 0;
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: var(--lh-sm);
  text-align: left;
  text-decoration: none;
}
.linkbtn + .linkbtn { border-top: 1px solid var(--line); }
.linkbtn::after { content: '>'; flex: none; color: var(--ink-3); }
.linkbtn:active { background: var(--ink); color: var(--paper); }
.linkbtn--bare { padding: 8px 2px; color: var(--ink-2); }

/* A link with its secret part hidden until asked. */
.secretlink {
  padding: 10px;
  border: 1px dashed var(--line-2);
  background: var(--panel);
  color: var(--ink-2);
  font-size: var(--t-xs);
  line-height: var(--lh-xs);
  word-break: break-all;
  user-select: text;
  -webkit-user-select: text;
}
.secretlink.is-copied { border-color: var(--accent-line); }
.secret {
  display: inline;
  padding: 0;
  word-break: break-all;
  font-size: inherit;
  line-height: inherit;
  text-align: left;
  color: transparent;
  text-shadow: 0 0 6px rgba(236, 236, 236, .85);
  user-select: none;
  -webkit-user-select: none;
}
.secret[aria-pressed='true'] { color: var(--ink); text-shadow: none; user-select: text; -webkit-user-select: text; }

.confirm {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--bad-line);
}

/* ---------------------------------------------------------------- plans */

.plans { position: relative; display: flex; flex-direction: column; gap: 6px; }

/* The selection is one block moving between rows: the old row dims as the next one lights up. */
.plans__hi {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 56px;
  background: var(--accent-bg);
  box-shadow: inset 0 0 0 1px var(--accent-line), 0 0 18px rgba(147, 230, 168, .10);
  will-change: transform;
}

.plan {
  position: relative;
  display: grid;
  grid-template-columns: 3ch minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 1ch;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  text-align: left;
  font-size: var(--t-md);
  line-height: var(--lh-md);
  transition: color .2s linear, border-color .2s linear;
}
.plan__mark { color: var(--ink-3); transition: color .2s linear; }
.plan__sub { grid-column: 2; color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); transition: color .2s linear; }
.plan__off { grid-column: 3; color: var(--accent); font-size: var(--t-xs); line-height: var(--lh-xs); text-align: right; transition: color .2s linear; }
.plan[aria-checked='true'] { border-color: transparent; color: var(--accent); }
.plan[aria-checked='true'] .plan__mark,
.plan[aria-checked='true'] .plan__off { color: var(--accent); }
.plan[aria-checked='true'] .plan__sub { color: #6aa888; }
.plan:not([aria-checked='true']) { border-color: var(--line); }
.plan:active { transform: scale(.99); }

.rows--fresh { animation: fresh .22s var(--ease); }
@keyframes fresh { from { opacity: .35; transform: translate3d(0, 3px, 0); } to { opacity: 1; transform: none; } }

/* -------------------------------------------------------------- profile */

.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who__pic {
  flex: none;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--ink);
  font-size: var(--t-lg);
}
.who__pic img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.who__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who__name { font-size: var(--t-md); line-height: var(--lh-md); overflow-wrap: anywhere; }

.slots { display: flex; gap: 4px; }
.slots { width: 100%; }
.slots span { flex: 1 1 0; height: 8px; border: 1px solid var(--line-2); }
.slots span.is-used { background: var(--info); border-color: var(--info); }

.field {
  width: 100%;
  min-height: var(--btn);
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--t-md);
  line-height: var(--lh-md);
  outline: none;
  scroll-margin: 80px;
}
.field:focus { border-color: var(--ink); }
.field::placeholder { color: var(--ink-3); }

/* History rows open in place. */
.record { border-top: 1px solid var(--line); }
.record:first-child { border-top: 0; }
.record summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1ch;
  padding: 8px 0;
  cursor: pointer;
  list-style: none;
}
.record summary::-webkit-details-marker { display: none; }
.record summary > span { display: flex; flex-direction: column; min-width: 0; }
.record small { color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); }
.record__body { display: flex; flex-direction: column; gap: 8px; padding: 0 0 10px; }

/* --------------------------------------------------------------- sheets */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background-color .2s linear;
}
.sheet.is-open { background: rgba(0, 0, 0, .78); }

.sheet__win {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--shell);
  height: 86%;
  max-height: calc(100% - var(--safe-top) - 8px);
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  box-shadow: 0 -18px 40px rgba(0, 0, 0, .75);
  transform: translate3d(0, 100%, 0);
  transition: transform .22s var(--ease);
  will-change: transform;
}
.sheet.is-open .sheet__win { transform: none; }
.sheet--full .sheet__win { height: 100%; max-height: none; border: 0; padding-top: var(--safe-top); }

.sheet__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1ch;
  min-height: 44px;
  padding: 0 0 0 12px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: 1;
  white-space: nowrap;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.sheet__close {
  flex: none;
  width: 48px;
  height: 44px;
  border-left: 1px solid var(--line);
  color: var(--bad);
  font-size: var(--t-lg);
  line-height: 44px;
  text-align: center;
}
.sheet__close:active { background: var(--bad-bg); }

.sheet__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--gap) var(--gap) calc(var(--safe-bottom) + var(--gap) * 2);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
.sheet__body > * { flex: none; }

/* Two-way switch inside a sheet. */
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line-2); }
.seg button { min-height: 40px; padding: 6px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-selected='true'] { background: var(--accent-bg); color: var(--accent); }

.device { border: 1px solid var(--line-2); }
.device__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 1ch;
  width: 100%;
  padding: 10px;
  text-align: left;
}
.device__name { font-size: var(--t-sm); line-height: var(--lh-sm); overflow-wrap: anywhere; }
.device__usage { color: var(--ink-2); white-space: nowrap; font-size: var(--t-xs); line-height: var(--lh-sm); text-align: right; }
.device__meta { color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); }
.presence { display: flex; align-items: center; gap: 1ch; font-size: var(--t-xs); line-height: var(--lh-xs); color: var(--ink-3); }
.presence .dot { width: 7px; height: 7px; }
.presence.is-online { color: var(--ok); }
.presence.is-revoked { color: var(--bad); }
.device__body { display: flex; flex-direction: column; gap: 10px; padding: 0 10px 10px; }
.device.is-revoked .device__name { color: var(--ink-2); }

/* ------------------------------------------------------------ documents */

.doc { display: flex; flex-direction: column; gap: 12px; font-size: var(--t-sm); line-height: 21px; color: #9c9c9c; }
.doc h1 { font-size: var(--t-md); line-height: var(--lh-md); color: var(--ink); }
.doc .meta { margin-top: -8px; color: var(--ink-3); font-size: var(--t-xs); line-height: var(--lh-xs); }
.doc section { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); background: var(--paper); box-shadow: 4px 4px 0 #101010; }
.doc h2 { margin: -2px 0 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--accent); font-size: var(--t-sm); line-height: var(--lh-sm); }
.doc h3 { margin-top: 2px; color: var(--ink-2); font-size: var(--t-sm); line-height: var(--lh-sm); }
.doc strong { color: #d0d0d0; }
.doc p, .doc li { overflow-wrap: break-word; }
.doc ol, .doc ul { display: flex; flex-direction: column; gap: 8px; }
.doc ol { counter-reset: step; }
.doc ol > li { counter-increment: step; display: grid; grid-template-columns: 3ch minmax(0, 1fr); gap: 0 .5ch; }
.doc ol > li::before { content: counter(step) '.'; color: #5c5c5c; }
.doc ul > li { display: grid; grid-template-columns: 2ch minmax(0, 1fr); gap: 0 .5ch; }
.doc ul > li::before { content: '-'; color: #5c5c5c; }
.doc li > span { min-width: 0; }
.doc a { color: var(--info); text-decoration: none; }
.doc a:active { background: var(--tg-bg); }
.doc code { color: var(--ink-2); background: var(--panel); padding: 0 2px; }
.doc .downloads { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.doc .downloads a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--tg-line);
  background: var(--tg-bg);
  color: var(--tg);
  text-align: center;
  font-size: var(--t-sm);
}
.doc .downloads a:active { background: var(--tg-press); }
.doc .tip { padding: 10px; border: 1px dashed var(--line); color: var(--ink-2); }

/* ------------------------------------------------------- boot and locks */

.boot.is-leaving { opacity: 0; transition: opacity .2s linear; pointer-events: none; }
.boot {
  z-index: 60;
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap);
  padding: calc(var(--safe-top) + var(--gap)) var(--gap) calc(var(--safe-bottom) + var(--gap));
  background: var(--paper);
}
.figlet {
  margin: 0;
  color: var(--ink);
  font-family: inherit;
  font-size: min(calc((100vw - 26px) / 25.5), 13.75px);
  line-height: 1.04;
  white-space: pre;
  overflow: hidden;
}
.bootlog { display: flex; flex-direction: column; gap: 2px; font-size: var(--t-sm); line-height: var(--lh-sm); color: var(--ink-2); }
.bootlog .is-ok { color: var(--ok); }
.bootlog .is-bad { color: var(--bad); }

/* Pixels thrown by a press and the travelling selection share this layer. */
.fx { position: fixed; inset: 0; z-index: 90; width: 100%; height: 100%; pointer-events: none; }

/* -------------------------------------------------------- wider screens */

@media (pointer: coarse) {
  .view, .sheet__body { scrollbar-width: none; }
  .view::-webkit-scrollbar, .sheet__body::-webkit-scrollbar { display: none; }
}

@media (min-width: 560px) {
  .shell { border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
}

/* --------------------------------------------------------------- motion */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cursor { opacity: 1; }
}
