/* Help (templates/docs/): the layout, the mock app and its walkthroughs, the
   pickers, and the command line. Loaded only on Help pages, after site.css,
   whose tokens, type and pieces it uses (README, "Help").

   The mock app copies the app window (mt-tray ui/app.css) at a small size:
   the same ink side bar, band over contour lines, rows with hairlines, ring
   switches and stations on a line. It is a picture (aria-hidden), so its
   text still meets 4.5:1, but nothing in it is a control.

   Motion, as everywhere on the site, only under prefers-reduced-motion:
   no-preference: frames cross-fade, the highlighted control pulses gently
   (it stops after three beats), and the connecting ring turns. */

:root {
  --warn: #C2410C;
  --warn-text: #B03A0B;   /* 5.4:1 on --bg */
  --warn-bg: #FBEDE3;
  --hot: #C2410C;         /* the highlighted control: the brand's "look here" orange */
  --code-bg: #0F1B2D;
  --code-text: #E9EDF3;   /* 15:1 */
  --code-muted: #B9C3D1;  /* 9.6:1 */
}
@media (prefers-color-scheme: dark) {
  :root {
    --warn: #FF8A3D;
    --warn-text: #FF9A55;
    --warn-bg: #2A1A12;
    --hot: #FF8A3D;
    --code-bg: #050A11;
  }
}

/* ── The page ── */

.band--docs { padding: 52px 0 48px; }
.band--docs > .wrap, .section--docs-hub > .wrap { max-width: calc(1320px + 2 * var(--gutter)); }
.band--docs h1 { font-size: clamp(2.2rem, 1.3rem + 2.3vw, 3.3rem); }
.band--docs .band__inner { gap: 14px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font: 500 1rem/1.3 var(--label); color: var(--muted); }
.crumbs a { display: inline-block; padding: 4px 0; color: var(--accent-text); }
.crumbs > span[aria-hidden] { color: var(--muted); }

.docs {
  max-width: calc(1320px + 2 * var(--gutter));
  display: grid; grid-template-columns: 236px minmax(0, 1fr);
  grid-template-areas: "menu main"; gap: 0 56px; align-items: start;
  padding-top: 48px; padding-bottom: 24px;
}
.docs__main { grid-area: main; min-width: 0; container-type: inline-size; }
.docs__toc { display: none; }

/* The Help menu: stations down a dashed line for this page's topics. */
.docs__menu {
  grid-area: menu; position: sticky; top: calc(var(--bar) + 24px);
  max-height: calc(100vh - var(--bar) - 40px); overflow: auto; overscroll-behavior: contain;
  padding: 0 6px 16px 0; scrollbar-width: thin;
}
.docs__menu ul { list-style: none; padding: 0; margin: 0; display: grid; }
.docs__menu a { display: block; padding: 6px 10px; color: var(--muted); text-decoration: none; font: 500 1rem/1.3 var(--label); border-radius: 3px; }
.docs__menu a:hover { color: var(--text); background: var(--surface); }
.docs__menu a[aria-current] { color: var(--text); font-weight: 600; box-shadow: inset 3px 0 0 var(--teal); border-radius: 0; }
.docs__menu-head a { font-weight: 600; color: var(--accent-text); }
.docs__single { margin-top: 6px !important; }
.docs__group { margin: 18px 10px 4px; font: 500 0.82rem/1.3 var(--label); letter-spacing: 0.04em; color: var(--muted); }
.docs__here { position: relative; margin: 2px 0 8px 14px !important; }
.docs__here::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px;
  background: repeating-linear-gradient(180deg, var(--grey) 0 6px, transparent 6px 10px); }
.docs__here a { position: relative; padding: 4px 8px 4px 22px; font-size: 0.93rem; font-weight: 400; }
.docs__here a::before { content: ""; position: absolute; left: 2px; top: 0.72em; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--grey); background: var(--bg); }
.docs__here a:hover::before { border-color: var(--teal); }

/* On this page (narrow screens): a compact list before the tasks. */
.docs__toc { grid-area: toc; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); }
.docs__toc-head { font: 600 1rem/1.3 var(--label); margin-bottom: 6px; }
.docs__toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0 24px; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.docs__toc a { display: block; padding: 5px 0; }

/* A task: hairline above, heading, a line of introduction, then the app's
   steps, then the command line. */
.task { padding: 44px 0; border-top: 1px solid var(--line); display: grid; gap: 20px; justify-items: start; }
.task > * { max-width: 100%; }
.task:first-child { border-top: 0; padding-top: 0; }
.task h2 { font-size: clamp(1.7rem, 1.3rem + 1vw, 2.25rem); }
.task h3 { font-size: 1.25rem; }
.task__intro { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }
.task__after { color: var(--muted); max-width: 64ch; }
.task .prose { max-width: 66ch; }
.ui { font: 600 0.97em/1.2 var(--label); color: var(--text); letter-spacing: 0.005em; }
q { quotes: "\201C" "\201D"; }

/* Numbered steps: stations down a dashed line. */
.steps-list { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; max-width: 66ch; }
.steps-list > li { position: relative; counter-increment: s; padding: 2px 0 18px 46px; min-height: 34px; }
.steps-list > li::before {
  content: counter(s); position: absolute; left: 0; top: 0; z-index: 1;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--teal); background: var(--bg); font: 600 0.95rem/1 var(--label); color: var(--text);
}
.steps-list > li:first-child::before { border-color: var(--mark-you); }
.steps-list > li:not(:last-child)::after {
  content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px;
  background: repeating-linear-gradient(180deg, var(--grey) 0 6px, transparent 6px 10px);
}
.steps-list > li:last-child { padding-bottom: 0; }

.good { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; max-width: 66ch; }
.good li { position: relative; padding-left: 22px; }
.good li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 10px; height: 3px; background: var(--teal); }

.words { display: grid; border-top: 1px solid var(--line); width: 100%; max-width: 60rem; margin: 0; }
.words > div { display: grid; grid-template-columns: minmax(0, 14rem) minmax(0, 1fr); gap: 4px 28px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.words dt { font: 600 1.05rem/1.35 var(--label); }
.words dd { margin: 0; color: var(--muted); }

.split--docs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 48px; width: 100%; max-width: 62rem; align-items: start; }
.split--docs > div { display: grid; gap: 8px; align-content: start; }
.split--docs p { color: var(--muted); }

.ledger--glyphs li { grid-template-columns: 40px minmax(0, 1fr); column-gap: 18px; }
.ledger--glyphs li > * { grid-column: 2; }
.ledger--glyphs .ledger__glyph { grid-column: 1; grid-row: 1 / span 2; width: 36px; height: 36px; margin-top: 2px; }

.still { display: grid; gap: 10px; width: 100%; max-width: 760px; }
.still figcaption { color: var(--muted); font-size: 0.95rem; }

/* Previous and next. */
.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding-top: 32px; border-top: 1px solid var(--line); }
.pager__link { display: grid; gap: 4px; padding: 16px 20px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--text); }
.pager__link:hover { border-color: var(--muted); }
.pager__link--next { grid-column: 2; text-align: right; }
.pager__dir { font: 500 0.92rem/1.2 var(--label); color: var(--muted); }
.pager__title { font: 600 1.25rem/1.2 var(--display); color: var(--accent-text); }

.only {
  display: inline-block; margin-left: 4px; padding: 0 8px; white-space: nowrap; vertical-align: 1px;
  font: 500 0.78rem/1.6 var(--label); color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
}

/* ── The landing page ── */

.band--help { padding-bottom: 56px; }
.find { display: grid; gap: 8px; width: 100%; max-width: 40rem; margin-top: 10px; }
.find[hidden] { display: none; }
.find__label { font: 600 1.05rem/1.3 var(--label); }
.find__input {
  width: 100%; min-height: 54px; padding: 0 18px; border: 1.5px solid var(--text); border-radius: 4px;
  background: var(--surface); color: var(--text); font: 400 1.12rem/1.2 var(--font);
}
.find__input::placeholder { color: var(--muted); opacity: 1; }
.find__count { min-height: 1.5em; color: var(--muted); font-size: 0.98rem; }
.find__none { padding: 16px 20px; margin-bottom: 24px; background: var(--surface); border-left: 3px solid var(--teal); max-width: 60ch; }
.find__none[hidden] { display: none; }

.section--docs-hub { padding: 56px 0 88px; }
.hub { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.hub__group { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 20px 56px; padding: 36px 0; border-bottom: 1px solid var(--line); }
.hub__group[hidden] { display: none; }
.hub__head { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 18px; align-content: start; }
.hub__n {
  grid-row: span 2; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  border: 5px solid var(--teal); font: 600 1.2rem/1 var(--display); background: var(--bg);
}
.hub__group:nth-child(odd) .hub__n { border-color: var(--mark-you); }
.hub__title { font-size: 1.6rem; padding-top: 8px; }
.hub__title a { color: var(--text); text-decoration: none; }
.hub__title a:hover { text-decoration: underline; text-decoration-color: var(--teal); }
.hub__head p { color: var(--muted); }
.hub__topics { list-style: none; padding: 0; margin: 0; columns: 2 16rem; column-gap: 40px; }
.hub__topics li { break-inside: avoid; }
.hub__topics li[hidden] { display: none; }
.hub__topics a { position: relative; display: block; padding: 7px 0 7px 20px; text-decoration: none; color: var(--text); }
.hub__topics a::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 9px; height: 3px; background: var(--teal); }
.hub__topics a:hover { color: var(--accent-text); text-decoration: underline; }
.hub__page a { font: 600 1.05rem/1.4 var(--label); }

/* ── Walkthroughs: the mock beside its steps ── */

html:not(.js) .walk-hint { display: none; }

.walk {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px 36px; align-items: start;
  width: 100%;
}
.walk__stage { min-width: 0; container-type: inline-size; display: grid; gap: 10px; }
.walk__panel { display: grid; gap: 18px; padding: 22px 22px 20px; background: var(--surface); border: 1px solid var(--line); }
.walk__steps { margin: 0; padding-left: 1.4em; display: grid; gap: 18px; }
.walk__steps li::marker { font: 600 1rem var(--label); color: var(--accent-text); }
.walk__title { font-size: 1.3rem; margin-bottom: 6px; }
.walk__text { display: grid; gap: 8px; }
.walk__text p { color: var(--muted); }

/* Live: one step at a time, with its stations above and Back and Next below. */
.walk.is-live .walk__steps { padding-left: 0; list-style: none; }
.walk.is-live .walk__step[hidden] { display: none; }
.walk__head { display: grid; gap: 8px; }
.walk__head .walk__count { order: -1; }
.walk__count { font: 500 0.92rem/1.2 var(--label); color: var(--muted); white-space: nowrap; }
.walk__dots { position: relative; display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.walk__dots button {
  position: relative; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 2px solid var(--grey); border-radius: 50%; background: var(--surface); color: var(--muted);
  font: 600 0.75rem/1 var(--label); cursor: pointer;
}
.walk__dots button:hover { border-color: var(--teal); color: var(--text); }
.walk__dots .is-done { border-color: var(--teal); color: var(--accent-text); }
.walk__dots [aria-current] { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); }
.walk__nav { display: flex; flex-wrap: wrap; gap: 10px; }
.walk__nav .btn { min-height: 44px; padding: 8px 18px; }
.walk__nav .btn[disabled] { opacity: 0.5; cursor: default; }
.walk__nav .btn--primary { margin-left: auto; }

/* ── The mock app ── */

.m-win {
  position: relative; display: grid; grid-template-columns: 148px minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px); background-size: 14px 14px;
  font: 400 13px/1.38 var(--font); color: var(--text); text-align: left;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -30px rgba(15, 27, 45, 0.45);
}
.m-win > * { min-width: 0; }

/* Glyphs: the mark small, as the app draws it in lists. */
.glyph { display: block; flex: none; width: 22px; height: 22px; overflow: visible; }
.glyph path, .glyph circle { fill: none; stroke-width: 8; }
.glyph__you { stroke: var(--mark-you); }
.glyph__net { stroke: var(--mark-net); }
.glyph--off .glyph__you, .glyph--off .glyph__net, .glyph--attention .glyph__you, .glyph--attention .glyph__net { stroke: var(--grey); }
.glyph--connecting .glyph__net { stroke-dasharray: 7 5.2; }
.glyph .glyph__dot { fill: var(--warn); stroke: none; }
.glyph .glyph__halo { fill: var(--bg); stroke: none; }

.m-side {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px;
  padding: 16px 8px 14px; background: var(--side); color: #E9EDF3;
  --bore: var(--side); --mark-you: #F4F5F7; --mark-net: #3FD0C0;
}
.m-side > * { position: relative; }
.m-side .tubes { position: absolute; width: 300px; left: -130px; bottom: -120px; }
.m-side .glyph--off .glyph__you, .m-side .glyph--off .glyph__net { stroke: #7D8698; }
.m-side .glyph .glyph__halo { fill: var(--side); }
.m-brand { display: flex; align-items: center; gap: 8px; padding: 0 6px 12px; font: 600 15px/1 var(--label); color: #F4F5F7; letter-spacing: -0.01em; }
.m-brand .glyph { width: 20px; height: 20px; }
.m-nav {
  display: flex; align-items: center; gap: 8px; padding: 5px 7px; border-radius: 4px;
  color: #A9B4C4; white-space: nowrap; overflow: hidden;
}
.m-nav > span { overflow: hidden; text-overflow: ellipsis; }
.m-nav .glyph { width: 16px; height: 16px; }
.m-nav.is-current { color: #E9EDF3; font-weight: 600; background: rgba(63, 208, 192, 0.10); box-shadow: inset 3px 0 0 #3FD0C0; }
.m-nav__head { margin: 10px 7px 3px; font: 500 11px/1 var(--label); letter-spacing: 0.04em; color: #A9B4C4; }
.m-nav__group, .m-nav__end { display: flex; flex-direction: column; gap: 2px; border-radius: 4px; }
.m-nav__end { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(233, 237, 243, 0.12); }

.m-main { display: grid; min-width: 0; }
.m-main > .m-frame, .m-main > .m-dialog { grid-area: 1 / 1; min-width: 0; }
.m-frame { display: flex; flex-direction: column; }

.m-band { position: relative; overflow: hidden; padding: 16px 18px 14px; background: var(--band); border-bottom: 1px solid var(--line); }
.m-band .contours { opacity: 0.4; }
.m-band--off .contours { stroke: var(--grey); }
.m-band--connecting .contours { stroke-dasharray: 3 5; opacity: 0.32; }
.m-band--attention .contours { stroke: var(--warn); }
.m-band__in { position: relative; display: grid; gap: 6px; justify-items: start; }
.m-band__in > * { max-width: 100%; }
.m-eyebrow { font: 500 11px/1.3 var(--label); letter-spacing: 0.03em; color: var(--muted); }
.m-h { font: 600 21px/1.1 var(--label); letter-spacing: -0.01em; overflow-wrap: anywhere; }
.m-lede { font-size: 13px; color: var(--muted); }
.m-title { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.m-title > .glyph { width: 32px; height: 32px; }
.m-title > span:nth-child(2) { display: grid; gap: 3px; flex: 1; min-width: 150px; }
.m-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.m-facts > span { display: grid; }
.m-facts small, .m-cols small { font: 500 10.5px/1.4 var(--label); color: var(--muted); letter-spacing: 0.02em; }

.m-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px; }
.m-steps > span { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); }
.m-steps b { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 2px solid var(--grey); font: 600 10px/1 var(--label); }
.m-steps .is-now { color: var(--text); font-weight: 600; }
.m-steps .is-now b { border-color: var(--accent-fill); background: var(--accent-fill); color: var(--on-accent); }
.m-steps .is-done b { border-color: var(--teal); color: var(--accent-text); }

.m-tabs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.m-tabs > span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; font: 500 12px/1.2 var(--label); color: var(--muted); }
.m-tabs > span::before { content: ""; width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--grey); background: var(--band); }
.m-tabs > .is-on { color: var(--text); font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.m-tabs > .is-on::before { border-color: var(--accent-fill); background: var(--accent-fill); }

.m-body { display: grid; gap: 10px; align-content: start; padding: 14px 18px 18px; }
.m-body > * { min-width: 0; }
.m-section { display: flex; align-items: baseline; gap: 8px; font: 600 15px/1.25 var(--label); }
.m-section small { font: 500 11.5px/1 var(--label); color: var(--muted); }
.m-p { display: block; }
.m-quiet { color: var(--muted); }
.m-form { display: grid; gap: 10px; }
.m-field { display: grid; gap: 3px; }
.m-label { font-weight: 600; font-size: 12.5px; }
.m-input {
  display: block; min-height: 30px; padding: 5px 8px; border: 1px solid var(--line); border-bottom: 2px solid var(--muted);
  border-radius: 3px; background: var(--surface); color: var(--text); font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.m-input--area { min-height: 46px; white-space: normal; overflow-wrap: anywhere; font: 12px/1.4 "Cascadia Mono", Consolas, ui-monospace, monospace; }
.m-input--pin { letter-spacing: 0.3em; max-width: 180px; }
.m-hint { font-size: 11.5px; color: var(--muted); }
.m-consent { display: block; white-space: pre-line; padding: 8px 10px; border-left: 3px solid var(--teal); background: var(--surface); font-size: 12px; }
.m-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 12.5px; }
.m-box { position: relative; width: 15px; height: 15px; flex: none; border: 2px solid var(--muted); border-radius: 3px; background: var(--surface); }
.m-box.is-on { border-color: var(--accent-fill); background: var(--accent-fill); }
.m-box.is-on::after { content: ""; position: absolute; left: 3px; top: 0; width: 4px; height: 8px; border: solid var(--on-accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.m-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 2px; }
.m-actions--end { justify-content: flex-end; }
.m-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 4px 12px;
  border: 1px solid var(--text); border-radius: 4px; color: var(--text);
  font: 600 12.5px/1.2 var(--label);
}
.m-btn--primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.m-btn--danger { border-color: var(--warn-text); color: var(--warn-text); }
.m-shield { width: 13px; height: 13px; flex: none; }
.m-shield__half { fill: currentColor; }
.m-shield__edge { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.m-link { display: inline-block; color: var(--accent-text); font: 600 12.5px/1.3 var(--label); border-radius: 3px; }

.m-rows { display: block; border-top: 1px solid var(--line); }
.m-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.m-row > .glyph, .m-row > .m-swap .glyph { width: 24px; height: 24px; }
.m-row__main { display: grid; gap: 2px; min-width: 0; }
.m-row__main b { font: 600 14.5px/1.2 var(--label); }
.m-row__main small { font-size: 11.5px; color: var(--muted); }
.m-row__end { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-width: 0; }
.m-swap { display: inline-flex; align-items: center; border-radius: 999px; }

/* A warning in the app's words, as its warn-text (requests waiting, ADR-030). */
.m-warn { display: block; font-size: 12px; color: var(--warn-text); }

.m-state { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.m-shape { flex: none; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--grey); }
.m-state--linked .m-shape, .states--linked .m-shape { border-color: var(--teal); background: var(--teal); }
.m-state--linking .m-shape, .states--linking .m-shape { border-style: dashed; border-color: var(--teal); }

.m-switch { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; }
.m-switch__track { position: relative; width: 34px; height: 19px; flex: none; border: 1.5px solid var(--muted); border-radius: 999px; background: var(--surface); }
.m-switch__thumb { position: absolute; top: 2.5px; left: 3px; width: 11px; height: 11px; border: 2.5px solid var(--muted); border-radius: 50%; }
.m-switch.is-on .m-switch__track { border-color: var(--teal); background: var(--teal); }
.m-switch.is-on .m-switch__thumb { transform: translateX(14px); border-color: var(--surface); background: var(--surface); }
.m-switch__words { min-width: 6.4em; font: 500 11.5px/1 var(--label); color: var(--muted); }

/* Activity: one change a row, as the app lists them (activityRow). */
.m-act { display: grid; gap: 2px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 11.5px; color: var(--muted); }
.m-act b { font: 600 13px/1.3 var(--label); color: var(--text); }
.m-act code { font: 11px/1.3 "Cascadia Mono", Consolas, ui-monospace, monospace; overflow-wrap: anywhere; }

.m-devices { display: block; }
.m-dev { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1.3fr); gap: 4px 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 12px; }
.m-dev b { font: 600 13px/1.2 var(--label); }
.m-dev.is-down b, .m-row--dev.is-down b { color: var(--muted); }
.m-row--dev { grid-template-columns: 22px minmax(0, 0.8fr) minmax(0, 2fr) auto; }
.m-row--dev > .glyph { width: 22px; height: 22px; }
/* A person's row (People): no rings, as the app's People list has none. */
.m-row--person { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr) auto; }
.m-row--person .m-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.m-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 10px; font-size: 12px; }
.m-cols > span { display: grid; }
.m-tag { display: inline-block; justify-self: start; padding: 0 6px; border: 1px solid var(--line); border-radius: 3px; font-size: 11px; color: var(--muted); background: var(--surface); }
.m-manage {
  position: relative; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 14px;
  margin-top: 6px; padding: 12px 12px 12px 16px; background: var(--surface); border: 1px solid var(--line);
}
.m-manage::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 4px; background: repeating-linear-gradient(180deg, var(--ink) 0 18px, var(--teal) 18px 24px); }
.m-part { display: grid; gap: 4px; align-content: start; justify-items: start; font-size: 12px; }
.m-part b { font: 600 12.5px/1.2 var(--label); }
.m-part--danger b { color: var(--warn-text); }

.m-ticket { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 2px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 2px; }
.m-ticket > .glyph { width: 26px; height: 26px; margin-top: 22px; }
.m-ticket > span { display: grid; gap: 2px; }
.m-fp { font: 600 22px/1.2 "Cascadia Mono", Consolas, ui-monospace, monospace; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.m-fp--small { font-size: 17px; }
.m-check-code { display: grid; gap: 3px; padding: 8px 10px; border-left: 3px solid var(--teal); background: var(--bg); font-size: 12.5px; }

.m-desk { position: relative; display: grid; gap: 8px; justify-items: start; padding: 16px 14px 14px; background: var(--surface); border: 1px solid var(--line); }
.m-desk > * { max-width: 100%; }
.m-desk.m-form { justify-items: stretch; }
.m-desk.m-form > .m-actions, .m-desk.m-form > .m-section { justify-self: start; }
.m-desk::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: repeating-linear-gradient(90deg, var(--ink) 0 18px, var(--teal) 18px 24px); }
.m-note { display: block; padding: 7px 10px; border-left: 3px solid var(--line); background: var(--surface); font-size: 12.5px; }
.m-note--ok { border-left-color: var(--teal); }
.m-next { display: grid; gap: 3px; font-size: 12px; }
.m-actions .m-link { margin-left: 4px; }

/* A box Windows shows over the window. */
.m-dialog { position: relative; z-index: 2; display: grid; place-items: center; padding: 16px; background: rgba(15, 27, 45, 0.3); }
.m-dialog__box {
  display: grid; gap: 8px; width: min(100%, 330px); padding: 12px 16px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 20px 44px -18px rgba(0, 0, 0, 0.55); font-size: 12.5px;
}
.m-dialog__title { font: 600 12.5px/1.3 var(--label); padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* The tray: the corner of the taskbar, the rings, the clock. */
.m-tray { display: grid; justify-items: end; gap: 6px; }
.m-tray__bar {
  display: inline-flex; align-items: center; gap: 10px; padding: 5px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  font: 500 12px/1 var(--font); color: var(--text);
}
.m-tray__more { color: var(--muted); font-size: 12px; }
.m-tray__icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 4px; }
.m-tray__icon .glyph { width: 20px; height: 20px; }
.m-tray__clock { font-variant-numeric: tabular-nums; }
.m-tip {
  display: inline-block; padding: 5px 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 8px 18px -10px rgba(15, 27, 45, 0.45); font: 400 12px/1.3 var(--font); color: var(--text);
}

/* The desktop corner for the tray menu. */
.m-screen {
  position: relative; display: grid; justify-items: end; align-content: end; gap: 8px; min-height: 400px; padding: 14px;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background-color: var(--band);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px); background-size: 14px 14px;
  font: 400 12.5px/1.35 var(--font); color: var(--text);
}
.m-menu {
  position: relative; display: grid; width: max-content; max-width: 100%; padding: 4px 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 16px 36px -18px rgba(15, 27, 45, 0.5);
}
.m-menu__item { position: relative; display: block; padding: 5px 30px 5px 22px; white-space: nowrap; border-radius: 3px; margin: 0 4px; }
.m-menu__item.is-grey { color: var(--muted); }
.m-menu__item.is-bold { font-weight: 600; }
.m-menu__item.is-current { background: rgba(14, 138, 126, 0.12); }
.m-menu__sub::after { content: "›"; position: absolute; right: 10px; top: 4px; color: var(--muted); }
.m-menu__sep { display: block; height: 1px; margin: 4px 0; background: var(--line); }
.m-menu--sub { position: absolute; right: calc(100% + 2px); top: -5px; width: max-content; z-index: 3; white-space: nowrap; }

/* What a walkthrough highlights: an orange ring, the brand's "look here". */
.walk [data-hot].is-hot { outline: 2px solid var(--hot); outline-offset: 3px; cursor: pointer; }
.m-nav[data-hot].is-hot, .m-nav__group.is-hot, .m-nav__end.is-hot { outline-offset: 1px; }

/* No script, or not yet: the finished picture. With script, docs.js hides
   what isn't in the current step, and the picture takes the size of the
   step it shows. */
.walk:not(.is-live) [data-steps]:not([data-rest]) { display: none; }
.walk.is-live .is-gone { display: none; }
.m-nav.is-cur { color: #E9EDF3; font-weight: 600; background: rgba(63, 208, 192, 0.10); box-shadow: inset 3px 0 0 #3FD0C0; }
.m-menu__item.is-cur { background: rgba(14, 138, 126, 0.12); }

/* A middling picture: a network's switch and Open go under its name, as the
   app's own rows do under 820 px of page. */
@container (max-width: 640px) {
  .m-row { grid-template-columns: 24px minmax(0, 1fr); }
  .m-row__end { grid-column: 2; justify-self: start; }
  .m-row--dev { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .m-row--dev .m-cols { grid-column: 2 / -1; grid-row: 2; }
  .m-row--person { grid-template-columns: minmax(0, 1fr) auto; }
  .m-row--person .m-cols { grid-column: 1 / -1; grid-row: 2; }
}

/* The mock at a phone's width: the side bar becomes a band across the top,
   its items wrapping, as the app's own narrow window does. */
@container (max-width: 520px) {
  .m-win { grid-template-columns: minmax(0, 1fr); }
  .m-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 2px 4px; padding: 10px 8px 8px; }
  .m-brand { flex: 0 0 100%; padding: 0 4px 6px; }
  .m-nav__head { display: none; }
  .m-nav__group, .m-nav__end { flex-direction: row; flex-wrap: wrap; margin: 0; padding: 0; border: 0; }
  .m-nav { padding: 4px 8px; }
  .m-dev { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .m-dev > span:last-child { grid-column: 1 / -1; color: var(--muted); }
  .m-menu__item { white-space: normal; }
  .m-menu { width: 100%; }
  .m-menu--sub { right: auto; left: 30px; top: 100%; width: auto; }
  .m-screen { min-height: 420px; }
}

/* ── Pickers ── */

.pick { display: grid; gap: 16px; width: 100%; }
.pick__choices { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.pick__choices[hidden] { display: none; }
.pick__choices legend { padding: 0; margin-bottom: 10px; font: 600 1.05rem/1.3 var(--label); }
.pick__opt {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 4px; background: var(--surface); cursor: pointer;
}
.pick__opt:hover { border-color: var(--muted); }
.pick__opt:has(input:checked) { border-color: var(--accent-fill); box-shadow: inset 0 0 0 1px var(--accent-fill); }
.pick__opt input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent-fill); }
.pick__text { display: flex; align-items: center; gap: 10px; }
.pick__glyph { width: 30px; height: 30px; }
.pick--looks .pick__choices { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.pick--looks .pick__text { font: 600 1rem/1.25 var(--label); }
.pick--row .pick__choices { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.pick--switches .pick__choices { grid-template-columns: minmax(0, 1fr); max-width: 44rem; }
.pick__panels { display: grid; gap: 16px; }
.pick__panel { display: grid; gap: 12px; align-content: start; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--teal); }
.pick__panel[hidden] { display: none; }
.pick__panel h3 { font-size: 1.3rem; }
.pick__panel > p { max-width: 64ch; }

/* What the rings mean: the tray, large, beside the words. */
.looks { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 20px 32px; align-items: center; }
.looks__art {
  display: grid; justify-items: end; align-content: end; gap: 8px; min-height: 170px; padding: 18px;
  border: 1px solid var(--line); border-radius: 6px; background-color: var(--band);
  background-image: radial-gradient(circle, var(--dots) 1px, transparent 1.3px); background-size: 14px 14px;
}
.looks__tip { max-width: 100%; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; font-size: 0.92rem; box-shadow: 0 8px 18px -10px rgba(15, 27, 45, 0.45); }
.looks__bar { padding: 8px 14px; font-size: 0.95rem; }
.looks__bar .m-tray__icon { width: 40px; height: 40px; }
.looks__bar .glyph { width: 30px; height: 30px; }
.looks__text { display: grid; gap: 10px; }
.looks__more { color: var(--muted); font-size: 0.97rem; }

.verdict h3 { display: flex; align-items: center; gap: 10px; }
.verdict h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--grey); }
.verdict--yes h3::before { border-color: var(--teal); background: var(--teal); }

/* A checklist to tick through. */
.checks { list-style: none; padding: 0; margin: 0; display: grid; border-top: 1px solid var(--line); max-width: 66ch; }
.checks li { border-bottom: 1px solid var(--line); }
.checks label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; padding: 12px 0; cursor: pointer; }
.checks input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent-fill); }
.checks input:checked + span { color: var(--muted); }

.reach { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 66ch; }
.reach li { position: relative; padding-left: 28px; }
.reach li::before { content: ""; position: absolute; left: 2px; top: 0.35em; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--grey); }
.reach--yes::before { border-color: var(--teal) !important; background: var(--teal); }

/* The states a network can be in. */
.states { display: grid; border-top: 1px solid var(--line); width: 100%; max-width: 60rem; margin: 0; }
.states > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 28px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.states dt { display: flex; align-items: baseline; gap: 10px; font: 600 1rem/1.35 var(--label); }
.states dt .m-shape { position: relative; top: 1px; }
.states dd { margin: 0; color: var(--muted); }

/* ── The command line ── */

.cli { width: 100%; max-width: 52rem; }
.cli__body { gap: 12px; }
.cli__how { font-size: 0.95rem; }
.cli__how a { white-space: nowrap; }
.cmd { display: grid; gap: 6px; width: 100%; max-width: 52rem; }
.cmd__os { display: grid; gap: 4px; }
.cmd__label { font: 500 0.85rem/1.2 var(--label); color: var(--muted); }
.cmd pre, .code {
  margin: 0; padding: 12px 14px; border-radius: 4px; background: var(--code-bg); color: var(--code-text);
  font: 0.92rem/1.5 "Cascadia Mono", Consolas, ui-monospace, monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2;
}
.code { width: 100%; max-width: 52rem; }
.cmd code, .code code { font-size: inherit; }
.cmd__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cmd__tab, .cmd__copy {
  min-height: 30px; padding: 3px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: 500 0.88rem/1 var(--label); cursor: pointer;
}
.cmd__tab:hover, .cmd__copy:hover { color: var(--text); border-color: var(--muted); }
.cmd__tab[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.cmd__copy { margin-left: auto; }
/* Once script has chosen, one form at a time, and the labels become the tabs. */
html[data-os] .cmd:not(.cmd--one) .cmd__label { display: none; }
html[data-os="win"] .cmd:not(.cmd--one) .cmd__os--linux,
html[data-os="linux"] .cmd:not(.cmd--one) .cmd__os--win,
html[data-os="win"] .cli__how .cmd__os--linux,
html[data-os="linux"] .cli__how .cmd__os--win { display: none; }
.cmd--one .cmd__label { display: block; }

.table-wrap { width: 100%; }
.ref { width: 100%; max-width: 60rem; border-collapse: collapse; }
.ref th, .ref td { padding: 10px 16px 10px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ref thead th { font: 500 0.9rem/1.3 var(--label); color: var(--muted); }
.ref td:first-child { width: 42%; }
.ref code { overflow-wrap: anywhere; }
.ref__group th { padding-top: 26px; font: 600 1.15rem/1.3 var(--display); }
.ref__group a { display: inline-block; padding: 4px 0; color: var(--text); }

/* ── Motion ── */

@media (prefers-reduced-motion: no-preference) {
  .walk.is-live .m-frame, .walk.is-live .m-dialog, .walk.is-live .m-menu { animation: step-in 0.3s var(--ease-out); }
  .walk [data-hot].is-hot { animation: hot 1.2s var(--ease-out) 3; }
  @keyframes hot { 0% { outline-offset: 3px; outline-color: var(--hot); } 50% { outline-offset: 6px; outline-color: transparent; } 100% { outline-offset: 3px; outline-color: var(--hot); } }
  .m-switch__thumb { transition: transform 0.18s var(--ease-out); }
  .walk__panel .walk__step:not([hidden]) { animation: step-in 0.3s var(--ease-out); }
  @keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ── Narrower ── */

@media (max-width: 1080px) {
  .docs { grid-template-columns: minmax(0, 1fr); grid-template-areas: "toc" "main" "menu"; gap: 32px; padding-top: 36px; }
  .docs__toc { display: block; }
  .docs__menu { position: static; max-height: none; overflow: visible; padding: 28px 0 0; border-top: 1px solid var(--line); columns: 2 15rem; column-gap: 32px; }
  .docs__menu > * { break-inside: avoid; }
  .docs__here { display: none !important; }
}

@container (max-width: 820px) {
  .walk { grid-template-columns: minmax(0, 1fr); }
  /* Under the picture, the steps stay at the foot of the screen, compact:
     the count, the step, and Back and Next. */
  .walk__panel.is-stuck { position: sticky; bottom: 0; z-index: 5; gap: 8px; padding: 12px 16px; box-shadow: 0 -12px 24px -18px rgba(15, 27, 45, 0.5); }
  .walk__panel.is-stuck .walk__dots { display: none; }
  .walk__panel.is-stuck .walk__title { font-size: 1.1rem; margin-bottom: 2px; }
  .walk__panel.is-stuck .walk__text { gap: 4px; font-size: 0.95rem; line-height: 1.45; }
  .walk__panel.is-stuck .walk__nav .btn { min-height: 40px; padding: 6px 16px; }
  .looks { grid-template-columns: minmax(0, 1fr); }
  .states > div, .words > div { grid-template-columns: minmax(0, 1fr); }
  .hub__group { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 820px) {
  .hub__group { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .split--docs { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .ref thead { display: none; }
  .ref, .ref tbody, .ref tr, .ref td, .ref th { display: block; width: 100% !important; }
  .ref tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  .ref td, .ref th { padding: 2px 0; border: 0; }
  .ref__group { border-bottom: 0 !important; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__link--next { grid-column: 1; }
  .walk__panel { padding: 16px 16px 14px; gap: 12px; }
  .task { padding: 36px 0; }
  .docs__menu { columns: 1; }
}

@media (max-width: 520px) {
  .hub__topics { columns: 1; }
  .hub__head { grid-template-columns: 40px minmax(0, 1fr); gap: 6px 14px; }
  .hub__n { width: 40px; height: 40px; border-width: 4px; font-size: 1.05rem; }
  .hub__title { font-size: 1.4rem; padding-top: 6px; }
  .walk__nav .btn { flex: 1 1 auto; }
  .pick__panel { padding: 18px 16px; }
}

@media (max-width: 300px) {
  .walk__dots button { width: 24px; height: 24px; }
  .find__input { font-size: 1rem; padding: 0 10px; }
}

/* ── Windows high contrast ── */

@media (forced-colors: active) {
  .glyph path, .glyph circle { stroke: CanvasText; }
  .glyph--off path, .glyph--attention path { stroke: GrayText; }
  .glyph .glyph__dot { fill: CanvasText; }
  .m-side { border-right: 1px solid CanvasText; }
  .m-nav.is-current, .m-nav.is-cur { outline: 2px solid Highlight; outline-offset: -2px; }
  .walk [data-hot].is-hot { outline: 3px solid Highlight; }
  .m-switch__track, .m-switch__thumb, .m-shape, .m-box, .m-steps b, .m-tabs > span::before { border-color: CanvasText; }
  .m-switch.is-on .m-switch__track, .m-box.is-on, .m-state--linked .m-shape, .states--linked .m-shape { background: Highlight; border-color: Highlight; }
  .m-desk::before, .m-manage::before { background: CanvasText; }
  .steps-list > li::before, .hub__n, .walk__dots button, .docs__here a::before { border-color: CanvasText; }
  .walk__dots [aria-current] { background: Highlight; color: HighlightText; border-color: Highlight; }
  .cmd pre, .code { border: 1px solid CanvasText; }
  .cmd__tab[aria-pressed="true"] { background: Highlight; color: HighlightText; border-color: Highlight; }
  .pick__opt:has(input:checked) { outline: 2px solid Highlight; }
  .docs__menu a[aria-current] { text-decoration: underline; text-decoration-thickness: 3px; }
}

@media print {
  .docs__menu, .docs__toc, .pager, .walk__nav, .walk__dots, .cmd__bar { display: none; }
  .docs { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
  .cli > *:not(summary) { display: block; }
  .walk.is-live .walk__step[hidden], .pick__panel[hidden] { display: block; }
}
