/* Anping docs: plain CSS, no build. Colours and fonts are Kisarto's tokens (tokens.css, the same file
   as web/src/tokens.css); dark mode follows the system. Statuses never by colour alone: ✓ solid blue,
   ◐ blue outline, ○ grey dashed, ✕ dark orange thick line, always with their words. */
@import url('tokens.css');

:root {
  --bg: var(--k-bg);
  --surface: var(--k-surface);
  --text: var(--k-text-2);
  --heading: var(--k-text);
  --muted: var(--k-text-3);
  --border: var(--k-border);
  --control: var(--k-border-strong);
  --accent: var(--k-accent);
  --accent-soft: var(--k-accent-soft);
  --accent-line: var(--k-accent-line);
  --on-accent: var(--k-on-accent);
  --code-bg: var(--k-surface-2);
  --done: var(--k-ok);
  --partly: var(--k-progress);
  --neutral: var(--k-neutral);
  --no: var(--k-fail);
  --no-soft: var(--k-fail-soft);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--k-font-body);
}

a {
  color: var(--accent);
}

h1,
h2,
h3 {
  color: var(--heading);
  line-height: 1.3;
}

h1 {
  font-size: 2rem;
  margin: 0.5rem 0 1rem;
}

h2 {
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1.1rem;
  margin: 1.75rem 0 0.5rem;
}

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

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 2;
  background: var(--surface);
  padding: 4px 8px;
}

/* Header and navigation */
.top {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.top-inner,
.nav {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 16px;
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--heading);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
}

.lang {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 12px;
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 4px;
}

.nav a {
  padding: 8px 10px 10px;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--heading);
}

.nav a[aria-current='page'] {
  color: var(--heading);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Content */
main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.toc ul {
  margin: 0.25rem 0 0;
  padding-left: 1.25rem;
}

.note {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 10px 16px;
  margin: 1rem 0;
}

.note > :first-child {
  margin-top: 0;
}

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

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 12px;
  padding: 0;
  list-style: none;
}

.cards li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
}

.cards strong {
  display: block;
  color: var(--heading);
  margin-bottom: 4px;
}

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.flow li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.flow li.arrow {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
}

.checklist {
  list-style: none;
  padding-left: 0;
}

.checklist li {
  padding-left: 1.75rem;
  position: relative;
  margin: 0.4rem 0;
}

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3rem;
  width: 1rem;
  height: 1rem;
  border: 2px solid var(--muted);
  border-radius: 3px;
}

/* Code */
code,
pre {
  font-family: var(--k-font-mono);
  font-size: 0.875em;
}

:not(pre) > code {
  background: var(--code-bg);
  border-radius: 4px;
  padding: 1px 4px;
  overflow-wrap: anywhere;
}

.code {
  position: relative;
  margin: 1rem 0;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  overflow-x: auto;
  line-height: 1.5;
  margin: 0;
}

.copy {
  position: absolute;
  top: 6px;
  right: 6px;
  font: inherit;
  font-size: 0.8rem;
  padding: 2px 10px;
  border: 1px solid var(--control);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

details {
  margin: 0.75rem 0;
}

summary {
  cursor: pointer;
  font-weight: 600;
}

/* Tables: rows become cards on narrow screens, so the page never scrolls sideways. */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  border-collapse: collapse;
  width: 100%;
  background: var(--surface);
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border: 1px solid var(--border);
}

th {
  color: var(--heading);
  background: var(--code-bg);
}

@media (max-width: 40rem) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack thead {
    display: none;
  }

  table.stack tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
  }

  table.stack td {
    border: 0;
    border-top: 1px solid var(--border);
  }

  table.stack td:first-child {
    border-top: 0;
    background: var(--code-bg);
  }

  table.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    color: var(--muted);
  }

  table.stack td:first-child::before {
    display: none;
  }

  h1 {
    font-size: 1.6rem;
  }

  /* Eight pages: keep the menu to about three short rows on a phone. */
  .nav a {
    padding: 6px 6px 8px;
    font-size: 0.9rem;
  }
}

.status {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0 8px;
  white-space: nowrap;
}

/* Thinfinity comparison: ✓ done (solid blue), ◐ partly (blue outline), ✕ not possible (dark orange,
   thick line), an extra (soft blue), ○ untested (grey dashed). The glyphs before the words are not read
   out; done is a ✓ with its own label. */
.status.done {
  border-color: var(--done);
  background: var(--done);
  color: var(--on-accent);
}

.status.partly {
  color: var(--partly);
}

.status.no {
  padding: 0 7px;
  border-width: 2px;
  background: var(--no-soft);
  color: var(--no);
}

.status.extra {
  border-color: var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
}

.status.partly::before {
  content: '\25D0  ';
  content: '\25D0  ' / '';
}

.status.no::before {
  content: '\2715  ';
  content: '\2715  ' / '';
}

.status.untested::before {
  content: '\25CB  ';
  content: '\25CB  ' / '';
}

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

footer p {
  max-width: 52rem;
  margin: 0 auto;
  padding: 16px;
}

/* Room for the Copy button above the first line. */
.code pre {
  padding-top: 36px;
}

/* Diagrams: inline SVG coloured by the tokens above, so dark mode follows. Each figure has a wide
   drawing and a tall one for phones. */
.figure {
  margin: 1.25rem 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.figure svg {
  display: block;
  width: 100%;
  height: auto;
}

.figure svg.tall {
  display: none;
  max-width: 26rem;
  margin: 0 auto;
}

.figure figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 40rem) {
  .figure {
    padding: 8px;
  }

  .figure svg.wide {
    display: none;
  }

  .figure svg.tall {
    display: block;
  }
}

.figure text {
  fill: var(--text);
  font-size: 13px;
}

.figure .d-title {
  fill: var(--heading);
  font-size: 14px;
  font-weight: 600;
}

.figure .d-title.accent,
.figure .d-zone-label {
  fill: var(--accent);
}

.figure .d-sub,
.figure .d-small {
  fill: var(--muted);
  font-size: 12px;
}

.figure .d-label {
  fill: var(--heading);
}

.figure .d-code {
  font-family: var(--k-font-mono);
  font-size: 12px;
}

.figure .d-zone-label {
  font-size: 12px;
  font-weight: 600;
}

.figure .d-zone-label.you {
  fill: var(--muted);
}

.figure .halo {
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.d-box {
  fill: var(--bg);
  stroke: var(--border);
  stroke-width: 1.5;
}

.d-anping {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.d-inner,
.d-band {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 1;
}

.d-band {
  fill: var(--accent-soft);
}

.d-zone {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
}

.d-zone.you {
  stroke: var(--muted);
}

.d-life {
  stroke: var(--border);
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.d-arrow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
}

.d-arrow.back {
  stroke-dasharray: 6 4;
}

.d-head {
  fill: var(--accent);
}

.d-step circle {
  fill: var(--accent);
}

.figure .d-step text {
  fill: var(--surface);
  font-size: 11px;
  font-weight: 700;
}

/* Numbered legend under a diagram. */
.legend {
  list-style: none;
  counter-reset: legend;
  padding: 0;
  margin: 0.75rem 0 0;
}

.legend li {
  counter-increment: legend;
  position: relative;
  padding-left: 2rem;
  margin: 0.35rem 0;
}

.legend li::before,
.steps strong::before {
  content: counter(legend);
  position: absolute;
  left: 0;
  top: 0.15rem;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
}

/* Three steps in a row; a column on phones. */
.steps {
  list-style: none;
  counter-reset: legend;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  padding: 0;
  margin: 1rem 0;
}

.steps li {
  counter-increment: legend;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}

.steps li:not(:last-child)::after {
  content: '\2192';
  position: absolute;
  right: -18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.steps strong {
  display: block;
  position: relative;
  padding-left: 2rem;
  margin-bottom: 4px;
  color: var(--heading);
}

@media (max-width: 40rem) {
  .steps {
    grid-template-columns: 1fr;
  }

  .steps li:not(:last-child)::after {
    content: '\2193';
    right: auto;
    left: 50%;
    top: auto;
    bottom: -21px;
    transform: none;
  }
}

/* The short box at the top of a reference page. */
.quick {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 1rem 0 1.25rem;
}

.quick > :first-child {
  margin-top: 0;
}

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

.quick .code pre {
  background: var(--surface);
}

/* On this page, as one wrapping row of links. */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.chips a {
  display: inline-block;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 10px;
  background: var(--surface);
  text-decoration: none;
  font-size: 0.9rem;
}

/* Reference tables: rarely needed detail folds away in the cell. */
details.more {
  margin: 0.25rem 0 0;
}

details.more summary {
  display: inline-block;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--accent);
}

details.more[open] {
  font-size: 0.925rem;
}

table.ref td:first-child code {
  white-space: nowrap;
}

@media (min-width: 40.01rem) {
  table.ref td:first-child {
    width: 25%;
  }
}

.status.untested {
  border-style: dashed;
  color: var(--neutral);
  font-weight: 400;
}

td .status + .status {
  margin-top: 4px;
}

.small {
  font-size: 0.9rem;
  color: var(--muted);
}

/* Timeline parts. */
.d-axis {
  stroke: var(--border);
  stroke-width: 2;
}

.d-axis.dotted {
  stroke: var(--muted);
  stroke-dasharray: 2 5;
}

.d-seg.wait {
  fill: var(--border);
}

.d-seg.on {
  fill: var(--accent);
}

.d-seg.window {
  fill: var(--accent-soft);
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-dasharray: 4 3;
}

.d-tick,
.d-bracket {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
}

.d-end {
  stroke: var(--no);
  stroke-width: 3;
}

.figure .d-label.no {
  fill: var(--no);
  font-weight: 600;
}

/* Feature cards with an icon; the icons are symbols defined once in the page. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
  gap: 12px;
  padding: 0;
  margin: 1rem 0;
  list-style: none;
}

.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

.features .icon {
  float: left;
  width: 24px;
  height: 24px;
  margin: 1px 8px 0 0;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.features strong {
  display: block;
  color: var(--heading);
  margin-bottom: 2px;
}

.features .not-yet {
  display: block;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.features .not-yet b {
  color: var(--neutral);
  font-weight: 600;
}

.features .not-yet b::before {
  content: '\25CB  ';
  content: '\25CB  ' / '';
}

.features strong a {
  color: inherit;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.figure .d-title.narrow {
  font-size: 12.5px;
}

.d-dot {
  fill: var(--accent);
}

/* Same column widths in every parameter and settings table. */
@media (min-width: 40.01rem) {
  table.params,
  table.settings {
    table-layout: fixed;
  }

  table.params th:nth-child(1) {
    width: 11rem;
  }

  table.params th:nth-child(2) {
    width: 9rem;
  }

  table.params th:nth-child(4) {
    width: 7.5rem;
  }

  table.params td:nth-child(2) code {
    overflow-wrap: normal;
  }

  table.settings th:nth-child(1) {
    width: 16.5rem;
  }

  table.settings th:nth-child(2) {
    width: 8rem;
  }

  table.params td:first-child,
  table.settings td:first-child {
    width: auto;
  }
}

details.more summary::before {
  content: '\25B8\00A0';
}

details.more[open] > summary::before {
  content: '\25BE\00A0';
}

@media (max-width: 40rem) {
  table.ref td[data-label]::before {
    display: inline;
    margin-right: 0.5em;
  }

  table.ref td {
    padding: 6px 10px;
  }

  table.ref.nolabel td[data-label]::before,
  table.ref.params td:nth-child(3)[data-label]::before,
  table.ref.settings td:nth-child(3)[data-label]::before {
    display: none;
  }

  /* Parameter cards: name, then default and status side by side, then what it does. */
  table.params tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  table.params td:nth-child(1),
  table.params td:nth-child(3) {
    grid-column: 1 / -1;
  }

  table.params td:nth-child(2) {
    grid-row: 2;
    grid-column: 1;
  }

  table.params td:nth-child(4) {
    grid-row: 2;
    grid-column: 2;
    border-left: 1px solid var(--border);
  }

  table.params td:nth-child(3) {
    grid-row: 3;
  }
}

.status.untested {
  white-space: normal;
}

/* Deploy, toolbar and samples drawings. */
.d-vol {
  fill: var(--code-bg);
  stroke: var(--border);
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.d-link {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.5;
  stroke-dasharray: 2 3;
}

.d-barbg {
  fill: var(--bg);
  stroke: var(--border);
}

.d-logo,
.d-bars,
.d-ok {
  fill: var(--accent);
}

.d-ok {
  fill: var(--done);
}

.d-okmark {
  fill: none;
  stroke: var(--on-accent);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* What you need before starting, as a row of chips. */
.need {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 1rem 0;
  padding: 10px 14px;
  list-style: none;
  background: var(--accent-soft);
  border-radius: 8px;
}

.need li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 10px;
}

.need li.label {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  color: var(--heading);
}

.need li.from {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
}

/* Step numbers in headings and tables. */
.n {
  display: inline-block;
  width: 1.35rem;
  height: 1.35rem;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35rem;
  text-align: center;
  vertical-align: 0.1em;
}

h2 .n {
  width: 1.6rem;
  height: 1.6rem;
  margin-right: 8px;
  font-size: 0.95rem;
  line-height: 1.6rem;
  vertical-align: 0.15em;
}

/* Checklist groups that fold. */
details.check {
  margin: 0.5rem 0;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

details.check .count {
  display: inline-block;
  min-width: 1.4rem;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  text-align: center;
}

/* Toolbar icons in the toolbar diagram (help.html's `t-*` symbols). */
.d-icon {
  fill: none;
  stroke: var(--heading);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Touch gestures and toolbar buttons with a small drawing each. */
.gicon {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: -5px;
  color: var(--accent);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gicon .fill,
.sprite .fill {
  fill: currentColor;
  stroke: none;
}

table.gestures td:first-child {
  white-space: nowrap;
}

@media (min-width: 40.01rem) {
  table.msgs td:first-child {
    width: 50%;
  }
}

@media (min-width: 40.01rem) {
  table.ref.narrow1 td:first-child {
    width: 1%;
    white-space: nowrap;
  }
}

/* Front page: the product intro (from the company site's Anping page) above the docs. Colours are the
   aliases at the top, and --k-* tokens with a fallback where an alias has none, so Kisarto's palette
   (tokens.css) applies wherever it is loaded. No company logo, shapes or layout: the docs' own look. */
main.home {
  max-width: 64rem;
}

main.home h2 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.sec {
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.sec > p:not(.kicker, .notyet) {
  max-width: 42em;
}

.kicker {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px;
  align-items: center;
  padding: 16px 0 8px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  line-height: 1.2;
  text-wrap: balance;
}

.hero h1 .accent {
  color: var(--accent);
}

.hero .lead {
  margin: 0 0 24px;
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--k-accent-strong, var(--accent));
  color: var(--k-on-accent, var(--surface));
  font-weight: 700;
  text-decoration: none;
}

.btn:hover {
  background: var(--k-accent-strong-hover, var(--heading));
}

.btn:focus-visible,
.more-link:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.more-link {
  font-weight: 700;
  text-underline-offset: 4px;
}

.cta-note {
  margin: 14px 0 0;
  max-width: 36em;
  color: var(--muted);
  font-size: 0.9rem;
}

/* The illustration: a browser tab with the remote desktop and Anping's toolbar open at the top centre. */
.mock-fig {
  margin: 0;
}

.mock {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--heading) 14%, transparent);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--code-bg);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.8rem;
}

.mock-bar i {
  flex: none;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
}

.mock-bar span {
  flex: 1;
  min-width: 0;
  margin-left: 6px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mock-desk {
  position: relative;
  height: 15rem;
  overflow: hidden;
  background: linear-gradient(160deg, var(--k-accent-strong, var(--accent)), color-mix(in srgb, var(--accent) 70%, var(--surface)));
}

.mock-tools {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateX(-50%);
}

.mock-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 10px 10px;
  background: var(--surface);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--heading) 22%, transparent);
  white-space: nowrap;
}

.mock-row svg,
.mock-handle svg {
  width: 18px;
  height: 18px;
  margin: 3px;
  fill: none;
  stroke: var(--heading);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mock-ok {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--k-ok, var(--accent));
  color: var(--k-on-accent, var(--surface));
  font-size: 10px;
  font-weight: 700;
}

.mock-name {
  margin: 0 6px 0 2px;
  color: var(--heading);
  font-size: 0.75rem;
}

.mock-handle {
  display: flex;
  justify-content: center;
  width: 56px;
  height: 18px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--surface);
}

.mock-handle svg {
  width: 14px;
  height: 14px;
  margin: 1px;
}

.mock-win {
  position: absolute;
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--heading) 25%, transparent);
}

.mock-win::before {
  content: '';
  display: block;
  height: 16px;
  border-bottom: 1px solid var(--border);
  border-radius: 6px 6px 0 0;
  background: var(--code-bg);
}

.mock-win.w1 {
  left: 7%;
  top: 22%;
  width: 54%;
  height: 52%;
}

.mock-win.w2 {
  right: 7%;
  top: 36%;
  width: 38%;
  height: 40%;
}

.mock-lines {
  display: grid;
  gap: 6px;
  padding: 10px;
}

.mock-lines i {
  display: block;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.mock-task {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 26px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.mock-task i {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: var(--accent);
}

.mock-task i:first-child {
  background: var(--heading);
}

.mock-fig figcaption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

/* Switching from Thinfinity: the one line that changes. Removed and added read by sign and style, not colour. */
.switch {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 32px;
  align-items: center;
}

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

.diff {
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  font-size: 0.8rem;
  line-height: 1.9;
}

.diff .del {
  color: var(--muted);
  text-decoration: line-through;
}

.diff .add {
  color: var(--heading);
  font-weight: 700;
}

/* What never reaches the browser, under the how-it-works drawing. */
.figure figcaption.never {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  color: var(--text);
  font-size: 0.9rem;
}

.never strong {
  color: var(--heading);
}

.never span::before {
  content: '\2715  ';
  content: '\2715  ' / '';
  color: var(--accent);
}

/* The how-it-works drawing: dots travel along each line in step order and each step's number pops. */
.figure .d-steplabel {
  font-weight: 600;
}

.d-arrow.strong {
  stroke-width: 3.5;
}

.d-flow path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 0.1 14;
  opacity: 0;
}

.anim .d-step {
  transform-box: fill-box;
  transform-origin: center;
}

@media (prefers-reduced-motion: no-preference) {
  svg.play .d-flow path {
    animation: d-flow 8s linear 2;
  }

  svg.play .d-flow .f2 {
    animation-delay: 1.6s;
  }

  svg.play .d-flow .f3 {
    animation-delay: 3.2s;
  }

  svg.play .d-flow .f4 {
    animation-name: d-flow-long;
    animation-delay: 4.8s;
  }

  svg.play .d-step {
    animation: d-pop 8s ease-out 2;
  }

  svg.play .d-step.n2 {
    animation-delay: 1.6s;
  }

  svg.play .d-step.n3 {
    animation-delay: 3.2s;
  }

  svg.play .d-step.n4 {
    animation-delay: 4.8s;
  }

  @keyframes d-flow {
    0% {
      opacity: 1;
      stroke-dashoffset: 56.4;
    }

    19% {
      opacity: 1;
      stroke-dashoffset: 0;
    }

    20%,
    100% {
      opacity: 0;
    }
  }

  @keyframes d-flow-long {
    0% {
      opacity: 1;
      stroke-dashoffset: 98.7;
    }

    34% {
      opacity: 1;
      stroke-dashoffset: 0;
    }

    36%,
    100% {
      opacity: 0;
    }
  }

  @keyframes d-pop {
    0% {
      transform: scale(1);
    }

    4% {
      transform: scale(1.45);
    }

    12%,
    100% {
      transform: scale(1);
    }
  }
}

/* Specs for IT: a row heading and its answer; one under the other on phones. */
table.specs th {
  width: 22%;
  background: var(--surface);
}

table.specs td {
  color: var(--text);
}

@media (max-width: 40rem) {
  table.specs,
  table.specs tbody,
  table.specs tr,
  table.specs th,
  table.specs td {
    display: block;
    width: 100%;
  }

  table.specs tr {
    border-bottom: 1px solid var(--border);
  }

  table.specs th,
  table.specs td {
    border: 0;
    padding: 4px 12px;
  }

  table.specs th {
    padding-top: 10px;
  }

  table.specs td {
    padding-bottom: 10px;
  }

  table.specs {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
  }

  table.specs tr:last-child {
    border-bottom: 0;
  }
}

/* What is not done or not tried yet: a dashed box with an open circle, never colour alone. */
.notyet {
  margin: 1.25rem 0 0;
  padding: 12px 16px;
  border: 1.5px dashed var(--muted);
  border-radius: 8px;
  background: var(--surface);
  font-size: 0.95rem;
}

.notyet strong {
  margin-right: 6px;
  color: var(--heading);
}

.notyet strong::before {
  content: '\25CB  ';
  content: '\25CB  ' / '';
}

/* Closing band: the contact path. */
.band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 3rem;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--accent-soft);
}

main.home .band h2 {
  margin: 0 0 4px;
}

.band p {
  margin: 0;
}

@media (max-width: 52rem) {
  .hero,
  .switch {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero {
    gap: 28px;
  }
}
