/* UPTIME — classic Windows chrome. Grey is furniture, white is data, and the
   only saturated colour on screen is the phosphor on the black glass. */

:root {
  --desk:        #F2F1ED;   /* the desktop behind the windows */
  --face:        #D4D0C8;   /* window furniture */
  --face-2:      #E4E1DA;
  --client:      #FFFFFF;   /* data surfaces */
  --hi:          #FFFFFF;
  --light:       #EFEDE7;
  --shadow:      #808080;
  --dark:        #404040;

  --ink:         #101010;
  --ink-2:       #3A3E42;
  --ink-3:       #6A6F74;

  --sel:         #0A246A;   /* selection blue */
  --title-a:     linear-gradient(90deg, #151489 0%, #0147CB 44%, #016FE2 100%);

  --up:          #16751F;
  --down:        #A32B21;

  /* the glass, measured off the reference art */
  --screen:      #000000;
  --phosphor:    #2BD431;
  --phosphor-2:  #0E6B14;
  --screen-down: #6E1A14;
  --void:        #1E1E1E;

  --rail:        212px;

  --ui:   Tahoma, "Segoe UI", Verdana, Geneva, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .3, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 13px;
  line-height: 1.5;
}

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

/* ------------------------------------------------------------------ window */

.win {
  background: var(--face);
  padding: 3px;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}

.win-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 26px;
  padding: 0 3px 0 7px;
  background: var(--title-a);
}

.win-title {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}
.win-title .mark { width: 17px; height: 13px; fill: #9FB6D8; }
.win-title .mark .mark-live { fill: var(--phosphor); }

.win-btns { display: flex; gap: 2px; }
.win-btns i, .cmd-btns i {
  width: 21px;
  height: 19px;
  display: grid;
  place-items: center;
  font: 700 10px/1 var(--ui);
  font-style: normal;
  color: #000;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}
.win-btns i.max::before, .cmd-btns i.max::before {
  content: "";
  width: 9px; height: 8px;
  border: 1px solid #000;
  border-top-width: 2px;
  display: block;
}

.win-menu {
  display: flex;
  gap: 2px;
  padding: 2px 2px 3px;
  border-bottom: 1px solid var(--shadow);
  box-shadow: 0 1px 0 var(--hi);
  margin-bottom: 3px;
}
.win-menu a {
  padding: 2px 8px;
  color: var(--ink);
  text-decoration: none;
  cursor: default;
}
.win-menu a:hover { background: var(--sel); color: #fff; }
.win-menu u { text-decoration: underline; }

.win-status {
  display: flex;
  gap: 2px;
  margin-top: 3px;
  height: 24px;
  flex: none;
}
.win-status span {
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--face);
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-status span:first-child { flex: 1 1 auto; min-width: 0; }
.win-status .grip {
  width: 18px;
  padding: 0;
  box-shadow: none;
  background:
    linear-gradient(135deg, transparent 45%, var(--hi) 45% 55%, transparent 55%) 2px 0/5px 5px,
    linear-gradient(135deg, transparent 62%, var(--shadow) 62% 72%, transparent 72%) 2px 0/5px 5px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  font: 12px/1 var(--ui);
  color: var(--ink);
  background: var(--face);
  border: 0;
  padding: 6px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}
a.btn { text-decoration: none; }
.btn:hover { background: var(--face-2); }
.btn:active {
  box-shadow:
    inset  1px  1px 0 var(--dark),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--shadow);
  padding: 7px 13px 5px 15px;
}
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
.btn[data-variant="ghost"] { color: var(--ink-2); }
.btn:disabled { color: var(--shadow); text-shadow: 1px 1px 0 var(--hi); cursor: not-allowed; }

/* ------------------------------------------------------------------- shell */

.shell { display: flex; flex-direction: column; height: 100vh; padding: 12px; }
.shell > .win { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.shell-body { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); gap: 3px; flex: 1; min-height: 0; overflow: hidden; }

/* -------------------------------------------------------------------- rail */

.rail {
  background: var(--client);
  padding: 4px;
  display: flex;
  flex-direction: column;
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--dark),
    inset -2px -2px 0 var(--light);
}

.brand { display: none; }

.nav { display: flex; flex-direction: column; padding: 4px 3px; }
.nav a {
  display: block;
  padding: 4px 8px;
  color: var(--ink);
  text-decoration: none;
}
.nav a:hover { background: #E8E8E8; }
.nav a[aria-current="page"] { background: var(--sel); color: #fff; }

.rail-foot { margin-top: auto; padding: 8px 8px 6px; display: flex; flex-direction: column; gap: 5px; }
.rail-stat { display: none; }
.rail-stat .k { color: var(--ink-3); }
.rail-stat .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.rail-note { color: var(--ink-3); line-height: 1.5; border-top: 1px solid #E2E2E2; padding-top: 7px; }

/* ----------------------------------------------------------------- toolbar */

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 5px 8px;
  background: var(--face);
  box-shadow: inset 0 1px 0 var(--hi), inset 0 -1px 0 var(--shadow);
  flex: none;
}
.topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 14px; flex: none; }

.state-dot { width: 8px; height: 8px; flex: none; background: var(--shadow); box-shadow: inset -1px -1px 0 var(--dark); }
.state-dot[data-state="live"] { background: var(--up); animation: beat 2.4s var(--ease) infinite; }
.state-dot[data-state="down"] { background: var(--down); }
@keyframes beat { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.state-label { font-weight: 700; }
.state-detail {
  color: var(--ink-3);
  border-left: 1px solid var(--shadow);
  padding-left: 9px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.interval { display: flex; align-items: center; gap: 7px; }
.interval .k { color: var(--ink-3); }
.interval .v { font-family: var(--mono); }
.interval-track {
  display: block; width: 62px; height: 12px;
  background: var(--client);
  box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hi), inset 2px 2px 0 var(--dark);
  padding: 2px;
}
.interval-track i { display: block; height: 100%; width: 0; background: var(--sel); transition: width 900ms linear; }

/* ------------------------------------------------------------------- views */

.view { padding: 12px; overflow-y: auto; flex: 1; }
.view-head { margin-bottom: 12px; }
.view-head h1 { margin: 0 0 3px; font-size: 13px; font-weight: 700; }
.view-head p { margin: 0; color: var(--ink-3); max-width: 82ch; }

/* every framed block is a raised panel — the classic dialog surface */
.hero, .panel, .card, .lrule, .spec, .lconsole {
  background: var(--face);
  padding: 3px;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}

.hero { margin-bottom: 8px; padding: 10px; }
.hero-head { margin-bottom: 9px; }
.hero-title { margin: 0 0 2px; font-size: 12px; font-weight: 700; }
.hero-sub { margin: 0; color: var(--ink-3); }

/* ------------------------------------------------------------------ screen */

.screen {
  background: var(--screen);
  padding: 12px 14px 14px;
  box-shadow:
    inset  1px  1px 0 var(--dark),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 #000,
    inset -2px -2px 0 var(--light);
}
.screen-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.screen-k { color: #6F7A6F; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; }
.screen-v {
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.screen-v[data-empty] { font-size: 15px; letter-spacing: 0.16em; color: var(--phosphor-2); }

.uptime-bar { display: flex; gap: 2px; height: 38px; align-items: stretch; }
.uptime-bar i { flex: 1 1 0; min-width: 0; background: var(--void); transition: background-color 180ms var(--ease); }
.uptime-bar i[data-s="full"] { background: var(--phosphor); }
.uptime-bar i[data-s="part"] { background: var(--phosphor-2); }
.uptime-bar i[data-s="none"] { background: var(--screen-down); }
.uptime-bar i[data-s="open"] { background: repeating-linear-gradient(180deg, var(--phosphor) 0 3px, var(--screen) 3px 6px); }

.uptime-legend {
  display: flex; align-items: center; gap: 14px;
  margin-top: 9px; padding-top: 8px;
  border-top: 1px solid var(--shadow);
  color: var(--ink-3); font-size: 11px;
}
.uptime-legend span { display: flex; align-items: center; gap: 5px; }
.legend-right { margin-left: auto; font-family: var(--mono); }
.sw { width: 8px; height: 8px; display: inline-block; box-shadow: inset -1px -1px 0 rgba(0, 0, 0, .45); }
.sw-full { background: var(--phosphor); }
.sw-part { background: var(--phosphor-2); }
.sw-none { background: var(--screen-down); }
.sw-void { background: var(--void); }

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

.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }

.card { padding: 9px 11px 10px; display: flex; flex-direction: column; gap: 3px; min-height: 84px; }
.card-k { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
.card-v { font-family: var(--mono); font-size: 20px; line-height: 1.2; }
.card-v[data-tone="down"] { color: var(--down); }
.card-v[data-tone="up"] { color: var(--up); }
.card-note { color: var(--ink-3); font-size: 11px; margin-top: auto; }

/* ------------------------------------------------------------------ panels */

.split { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 8px; }

.panel { display: flex; flex-direction: column; min-height: 224px; }
.panel.wide { margin-top: 8px; min-height: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; }
.panel-head h2 { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.panel-meta { color: var(--ink-3); font-size: 11px; text-transform: uppercase; }
.panel-foot { margin: 3px 0 0; padding: 6px; color: var(--ink-3); font-size: 11px; line-height: 1.5; }

.log, .kv, .incidents, .table-wrap, .rules {
  background: var(--client);
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--dark),
    inset -2px -2px 0 var(--light);
}

.log { list-style: none; margin: 0; padding: 5px 0; overflow-y: auto; max-height: 300px; flex: 1; }
.log li { display: flex; gap: 10px; padding: 2px 9px; font-family: var(--mono); font-size: 11px; }
.log li:hover { background: #EFEFEF; }
.log .t { color: var(--ink-3); flex: none; }
.log .m { color: var(--ink-2); }
.log .m b { color: var(--ink); font-weight: 700; }
.log li[data-tone="down"] .m b { color: var(--down); }
.log li[data-tone="up"] .m b { color: var(--up); }

.log:has(.log-empty) { display: flex; align-items: center; justify-content: center; }
.log-empty {
  color: var(--ink-3);
  padding: 14px 22px;
  display: block;
  text-align: center;
  max-width: 46ch;
  line-height: 1.6;
}
.incidents .log-empty { text-align: left; max-width: none; padding: 14px 10px; }

.kv { margin: 0; padding: 3px 0; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 4px 9px; }
.kv > div + div { border-top: 1px solid #ECECEC; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; word-break: break-all; font-family: var(--mono); }

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

.table-wrap { overflow-x: auto; }
.table-wrap.flush { box-shadow: none; background: transparent; }
.table { width: 100%; border-collapse: collapse; font-size: 11px; }
.table th {
  text-align: left;
  font-weight: 400;
  color: var(--ink);
  padding: 4px 9px;
  white-space: nowrap;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--shadow),
    inset  1px  1px 0 var(--hi);
}
.table td {
  padding: 4px 9px;
  font-family: var(--mono);
  color: var(--ink-2);
  white-space: nowrap;
  border-bottom: 1px solid #EFEFEF;
}
.table tbody tr:hover td { background: var(--sel); color: #fff; }
.table .r, .table td.r { text-align: right; }
.table .empty td { color: var(--ink-3); font-family: var(--ui); padding: 14px 9px; }
.table .empty:hover td { background: transparent; color: var(--ink-3); }
.table td.open { color: var(--ink-3); }

/* --------------------------------------------------------------- incidents */

.incidents { list-style: none; margin: 0; padding: 0; }
.incidents li { display: flex; align-items: baseline; gap: 12px; padding: 8px 10px; }
.incidents li + li { border-top: 1px solid #EFEFEF; }
.incidents .sev { color: var(--down); font-size: 11px; text-transform: uppercase; font-weight: 700; flex: none; width: 66px; }
.incidents .body { color: var(--ink-2); }
.incidents .body b { color: var(--ink); font-weight: 700; }
.incidents .when { margin-left: auto; color: var(--ink-3); font-family: var(--mono); flex: none; }

/* ------------------------------------------------------------------- rules */

.rules { list-style: none; counter-reset: r; margin: 0 0 10px; padding: 0; }
.rules li { counter-increment: r; padding: 11px 14px 12px 46px; position: relative; }
.rules li + li { border-top: 1px solid #EFEFEF; }
.rules li::before {
  content: counter(r, decimal-leading-zero);
  position: absolute; left: 14px; top: 11px;
  color: var(--ink-3); font-family: var(--mono);
}
.rules h3 { margin: 0 0 3px; font-size: 12px; font-weight: 700; }
.rules p { margin: 0; color: var(--ink-3); max-width: 88ch; line-height: 1.55; }

.spec h2 { margin: 0; padding: 4px 6px 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

.foot { display: flex; gap: 16px; margin-top: 12px; padding-top: 8px; color: var(--ink-3); font-size: 11px; border-top: 1px solid var(--shadow); }
.foot span:last-child { margin-left: auto; }

/* -------------------------------------------------------------- cmd window */

.cmd {
  background: var(--face);
  padding: 3px;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}

.cmd-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 26px; padding: 0 3px 0 7px;
  background: var(--title-a);
}
.cmd-title { color: #fff; font-size: 12px; font-weight: 700; }
.cmd-btns { display: flex; gap: 2px; }

.cmd-body {
  background: #000;
  padding: 14px 16px 22px;
  color: #fff;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.75;
  min-height: 186px;
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--hi);
}
.cmd-body p { margin: 0; color: #fff; white-space: pre-wrap; }
.cmd-body .ok { color: var(--phosphor); }
.cmd-body .dim { color: #fff; }
.cmd-body #cmd-prompt { margin-top: 1.75em; }

.caret { display: inline-block; color: #fff; font-style: normal; animation: caret 1.06s steps(1) infinite; }
@keyframes caret { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }

/* ----------------------------------------------------------------- landing */

.landing { padding: 12px; min-height: 100vh; display: flex; flex-direction: column; }
.landing > .win { display: flex; flex-direction: column; }

.lhead, .brand-name, .lnav, .lstrip, .lfoot { display: none; }

.lmain { padding: 14px; flex: 1; }

.lhero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: 40px;
  padding: 24px 8px 32px;
}
.lhero h1 {
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  text-transform: uppercase;
  font-weight: 700;
}
.lhero-copy p { margin: 0 0 22px; color: var(--ink-2); max-width: 48ch; line-height: 1.65; }
.lcta { display: flex; gap: 8px; flex-wrap: wrap; }

.lconsole {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 12px 14px;
}
.lconsole-copy h2 { margin: 0 0 2px; font-size: 12px; font-weight: 700; }
.lconsole-copy p { margin: 0; color: var(--ink-3); }
.lconsole-cmd { display: flex; align-items: center; gap: 8px; }
.lconsole-cmd code {
  background: #000;
  color: var(--phosphor);
  padding: 8px 12px;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--hi);
}
.lconsole-cmd code b { color: #fff; font-weight: 400; }

.lrules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.lrule { padding: 11px 13px 13px; }
.lrule .n { color: var(--ink-3); font-family: var(--mono); }
.lrule h2 { margin: 4px 0 4px; font-size: 12px; font-weight: 700; }
.lrule p { margin: 0; color: var(--ink-3); line-height: 1.6; }

/* -------------------------------------------------------------- responsive */

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

@media (max-width: 900px) {
  .lhero { grid-template-columns: minmax(0, 1fr); gap: 24px; padding: 14px 0 24px; }
  .lhero-art { order: -1; }
  .lrules, .lconsole { grid-template-columns: minmax(0, 1fr); }
  .shell-body { grid-template-columns: minmax(0, 1fr); }
  .rail { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; }
  .nav { flex-direction: row; }
  .rail-foot { margin: 0; flex-direction: row; gap: 14px; }
  .rail-note, .state-detail { display: none; }
}

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

/* ------------------------------------------------------------- drop menus */

.win-menu .menu { position: relative; }
.win-menu .menu > button {
  font: inherit;
  background: none;
  border: 0;
  padding: 3px 9px;
  color: var(--ink);
  cursor: default;
}
.win-menu .menu[data-open] > button,
.win-menu .menu > button:hover { background: var(--sel); color: #fff; }

.menu-pop { display: none; }
.menu[data-open] .menu-pop {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 40;
  min-width: 214px;
  padding: 3px;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light),
    2px 2px 0 rgba(0, 0, 0, .28);
}
.menu-pop a, .menu-pop button {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  width: 100%;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  padding: 4px 10px;
  color: var(--ink);
  text-decoration: none;
  cursor: default;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--sel); color: #fff; }
.menu-pop a span, .menu-pop button span { color: var(--ink-3); }
.menu-pop a:hover span, .menu-pop button:hover span { color: #C9D4EA; }
.menu-pop hr { border: 0; border-top: 1px solid var(--shadow); border-bottom: 1px solid var(--hi); margin: 3px 2px; }

/* ----------------------------------------------------------------- dialog */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 20, .28);
}
.dialog { width: min(460px, calc(100vw - 40px)); }
.dialog-body { display: flex; gap: 16px; align-items: flex-start; padding: 20px 18px 16px; }
.dialog-icon {
  flex: none;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--sel);
  color: #fff;
  font: 700 18px/1 Georgia, "Times New Roman", serif;
}
.dialog-text { margin: 0; line-height: 1.6; padding-top: 6px; }
.dialog-foot { display: flex; justify-content: center; gap: 8px; padding: 0 18px 18px; }
.dialog-foot .btn { min-width: 88px; text-align: center; }

/* ------------------------------------------------------------- onboarding */

.onboard {
  background: var(--face);
  padding: 14px 16px 16px;
  margin-bottom: 8px;
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}
.onboard h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; }
.onboard ol { margin: 0 0 14px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; counter-reset: s; }
.onboard li {
  counter-increment: s;
  background: var(--client);
  padding: 10px 12px 11px 34px;
  position: relative;
  line-height: 1.55;
  color: var(--ink-2);
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--dark),
    inset -2px -2px 0 var(--light);
}
.onboard li::before {
  content: counter(s);
  position: absolute; left: 12px; top: 10px;
  width: 15px; height: 15px;
  display: grid; place-items: center;
  background: var(--sel); color: #fff;
  font: 700 10px/1 var(--ui);
}
.onboard li b { color: var(--ink); }
.onboard-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.onboard-note { margin: 0; color: var(--ink-3); }

/* --------------------------------------------------------------- X account */

.x-mark { width: 11px; height: 11px; fill: currentColor; margin-right: 6px; vertical-align: -1px; }
.x-btn { padding: 6px 10px; display: inline-flex; align-items: center; }
.x-btn .x-mark { margin: 0; width: 12px; height: 12px; }
.x-link { color: var(--ink-2); text-decoration: none; }
.x-link:hover { color: var(--ink); text-decoration: underline; }
.lcta .btn .x-mark { margin-right: 7px; }

/* -------------------------------------------------------------------- docs */
/* Laid out like a Windows help window: contents on the left, one topic right. */

.view-docs { padding: 0; overflow: hidden; display: flex; }

.docs { display: grid; grid-template-columns: 244px minmax(0, 1fr); gap: 3px; flex: 1; min-height: 0; padding: 3px; }

.docs-contents {
  background: var(--client);
  overflow-y: auto;
  padding: 0 0 8px;
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--dark),
    inset -2px -2px 0 var(--light);
}
.docs-contents-head {
  position: sticky;
  top: 0;
  background: var(--face);
  padding: 5px 10px;
  font-weight: 700;
  box-shadow: inset 0 -1px 0 var(--shadow), inset 0 1px 0 var(--hi);
}
.docs-contents ol { list-style: none; margin: 0; padding: 6px 0 0; }
.docs-contents .book {
  padding: 8px 10px 3px 24px;
  font-weight: 700;
  color: var(--ink);
  position: relative;
}
.docs-contents .book::before {
  content: "";
  position: absolute;
  left: 9px; top: 11px;
  width: 9px; height: 7px;
  background: var(--face);
  box-shadow: inset -1px -1px 0 var(--shadow), inset 1px 1px 0 var(--hi), 0 0 0 1px var(--dark);
}
.docs-contents li + .book { margin-top: 4px; }
.docs-contents a {
  display: block;
  padding: 3px 10px 3px 26px;
  color: var(--ink);
  text-decoration: none;
  position: relative;
}
.docs-contents a::before {
  content: "";
  position: absolute;
  left: 11px; top: 6px;
  width: 6px; height: 8px;
  background: var(--client);
  box-shadow: 0 0 0 1px var(--shadow);
}
.docs-contents a:hover { background: #E8E8E8; }
.docs-contents a[aria-current="page"] { background: var(--sel); color: #fff; }
.docs-contents a[aria-current="page"]::before { background: #fff; box-shadow: 0 0 0 1px var(--sel); }

.docs-body {
  background: var(--client);
  overflow-y: auto;
  padding: 20px 26px 34px;
  box-shadow:
    inset  1px  1px 0 var(--shadow),
    inset -1px -1px 0 var(--hi),
    inset  2px  2px 0 var(--dark),
    inset -2px -2px 0 var(--light);
}

.topic { max-width: 74ch; }
.topic h1 {
  margin: 0 0 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--shadow);
}
.topic h2 { margin: 22px 0 7px; font-size: 14px; font-weight: 700; }
.topic p { margin: 0 0 11px; line-height: 1.65; color: var(--ink-2); }
.topic p.lede { color: var(--ink); font-size: 14px; line-height: 1.6; }
.topic b { color: var(--ink); }
.topic a { color: #0A3A8C; }
.topic a:hover { color: var(--sel); }

.topic .steps { margin: 0 0 14px; padding: 0 0 0 22px; }
.topic .steps li { margin-bottom: 6px; line-height: 1.6; color: var(--ink-2); }

.topic .doc-table { margin: 4px 0 16px; background: var(--client); }
.topic .doc-table th { font-weight: 700; }
.topic .doc-table td { font-family: var(--ui); color: var(--ink-2); white-space: normal; }
.topic .doc-table td.r, .topic .doc-table td.mono { font-family: var(--mono); white-space: nowrap; }
.topic .doc-table tbody tr:hover td { background: transparent; color: var(--ink-2); }
.topic .doc-table .sw { margin-right: 6px; vertical-align: -1px; }

.topic .term {
  margin: 0 0 14px;
  padding: 12px 14px;
  background: #000;
  color: var(--phosphor);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  box-shadow: inset 1px 1px 0 var(--dark), inset -1px -1px 0 var(--hi);
}

.topic kbd {
  font-family: var(--ui);
  font-size: 11px;
  padding: 1px 6px 2px;
  background: var(--face);
  box-shadow:
    inset -1px -1px 0 var(--dark),
    inset  1px  1px 0 var(--hi),
    inset -2px -2px 0 var(--shadow),
    inset  2px  2px 0 var(--light);
}

.note {
  display: flex;
  gap: 12px;
  margin: 0 0 16px;
  padding: 11px 13px;
  background: #F4F3EE;
  box-shadow: inset 1px 1px 0 var(--shadow), inset -1px -1px 0 var(--hi);
}
.note-k {
  flex: none;
  font-weight: 700;
  color: var(--sel);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.note p { margin: 0; }

.glossary { margin: 0; }
.glossary dt { font-weight: 700; margin-top: 12px; }
.glossary dd { margin: 2px 0 0; color: var(--ink-2); line-height: 1.6; }

.related {
  margin-top: 22px !important;
  padding-top: 10px;
  border-top: 1px solid var(--line-2, #CECBC1);
  font-size: 11px;
  color: var(--ink-3);
}

@media (max-width: 900px) {
  .docs { grid-template-columns: minmax(0, 1fr); }
  .docs-contents { max-height: 190px; }
}
