/*
  guide.css — the guide's own layout: the topic sidebar, the article, "On this
  page", previous/next, tables and notes. 2026-10-12, the site redesign
  ("Show It Running", workstream G): the one 17,000 px page became a page per
  topic.

  It reads only the tokens site.css defines on :root (--bg, --ink, --accent,
  --l-*, --f-*, --r-*, --measure …) and leaves the shared parts to site.css:
  .nav, .foot, .win, q.ui and kbd are styled there, never here.

  No left-border accents, anywhere (the owner's rule): a note is a tint with a
  small lamp dot, the current topic is a tint with a lit dot.
*/

/* ── the three columns ─────────────────────────────────────────────────── */

.g {
  box-sizing: border-box;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 32px 88px;
  display: grid;
  grid-template-columns: 228px minmax(0, 780px) 188px;
  justify-content: center;
  column-gap: 56px;
  align-items: start;
}
.g *,
.g *::before,
.g *::after {
  box-sizing: border-box;
}
.g-main {
  min-width: 0;
  grid-column: 2;
  grid-row: 1;
}
.g-side {
  grid-column: 1;
  grid-row: 1;
}
.g-toc {
  grid-column: 3;
  grid-row: 1;
}

/* ── the topic sidebar ─────────────────────────────────────────────────── */

.g-side {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 16px 0;
  font-size: 14px;
  line-height: 1.3;
}
.g-side__title {
  display: block;
  margin: 0 0 6px;
  padding: 6px 10px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-1);
}
.g-side__title:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}
.g-side__h {
  margin: 14px 0 3px;
  padding: 0 10px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-3);
}
.g-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.g-side li a {
  position: relative;
  display: block;
  padding: 4px 10px 4px 22px;
  border-radius: var(--r-1);
  color: var(--ink-2);
  text-decoration: none;
}
.g-side li a:hover {
  background: color-mix(in srgb, var(--ink) 6%, transparent);
  color: var(--ink);
}
/* The current topic: a tint and a lit lamp, as the tab strip marks its tab. */
.g-side li a[aria-current="page"] {
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  color: var(--ink);
  font-weight: 600;
}
.g-side li a[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 50%;
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-radius: 50%;
  background: var(--l-ok);
}

/* ── the article ───────────────────────────────────────────────────────── */

.g-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-3);
}
.g-crumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.g-crumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--line);
}
.g-crumb a {
  color: var(--ink-3);
  text-decoration: none;
}
.g-crumb a:hover {
  color: var(--accent);
  text-decoration: underline;
}
/* "All topics", for phones, where the sidebar sits under the article. */
.g-crumb__all {
  display: none;
}

.g-h1 {
  margin: 10px 0 0;
  max-width: 20ch;
  font-family: var(--f-display);
  font-weight: 750;
  font-size: clamp(34px, 4.4vw, 46px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-wrap: balance;
}
.g-lede {
  margin: 16px 0 0;
  max-width: var(--measure);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
}

.g-prose {
  margin-top: 12px;
  font-size: 16.5px;
  line-height: 1.62;
  color: var(--ink-2);
}
.g-prose > p,
.g-prose > ul,
.g-prose > ol,
.g-prose > h2,
.g-prose > h3,
.g-prose > dl,
.g-prose > .g-note,
.g-prose > .g-cmd,
.g-prose section > p,
.g-prose section > ul,
.g-prose section > ol,
.g-prose section > h2,
.g-prose section > h3,
.g-prose section > dl,
.g-prose section > .g-note,
.g-prose section > .g-cmd {
  max-width: var(--measure);
}
.g-prose h2 {
  margin: 52px 0 0;
  font-family: var(--f-display);
  font-weight: 720;
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -0.022em;
  color: var(--ink);
  text-wrap: balance;
  scroll-margin-top: 76px;
}
.g-prose h3 {
  margin: 32px 0 0;
  font-family: var(--f-display);
  font-weight: 680;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--ink);
  scroll-margin-top: 76px;
}
/* The prose's element rules stop at a scene: a picture of the app is the
   app's own markup, and `.g-prose code` (0,1,1) outranked opsty.css's reset
   (`.opsty *`, 0,1,0) wherever the app sets no value of its own — so every
   path, address and command in a scene on a guide page sat in a grey box
   (found photographing the 0.6.0 scenes, 2026-10-15). `:where()` keeps each
   rule's weight and leaves the scene out. */
.g-prose p:where(:not(.opsty *)),
.g-prose ul:where(:not(.opsty *)),
.g-prose ol:where(:not(.opsty *)),
.g-prose dl:where(:not(.opsty *)) {
  margin: 14px 0 0;
}
.g-prose ul:where(:not(.opsty *)),
.g-prose ol:where(:not(.opsty *)) {
  padding-left: 1.3em;
}
.g-prose li:where(:not(.opsty *)) + li {
  margin-top: 7px;
}
.g-prose li:where(:not(.opsty *)) > ul,
.g-prose li:where(:not(.opsty *)) > ol {
  margin-top: 7px;
}
.g-prose li:where(:not(.opsty *))::marker {
  color: var(--ink-3);
}
.g-prose b:where(:not(.opsty *)),
.g-prose strong:where(:not(.opsty *)) {
  font-weight: 650;
  color: var(--ink);
}
.g-prose a:where(:not(.opsty *)) {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.g-prose a:where(:not(.opsty *)):hover {
  text-decoration-thickness: 2px;
}
.g-prose code:where(:not(.opsty *)) {
  font-family: var(--f-mono);
  font-size: 0.86em;
  padding: 0.08em 0.36em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--ink) 7%, transparent);
  color: var(--ink);
  overflow-wrap: anywhere;
}
/* A command to copy, on a line of its own. */
.g-cmd {
  margin: 14px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-2);
  background: var(--surface);
  font-family: var(--f-mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.g-cmd code {
  padding: 0;
  background: none;
  font-size: inherit;
}

/* A note: a tint and a small lamp, never a stripe down one edge. */
.g-note {
  position: relative;
  margin: 18px 0 0;
  padding: 12px 16px 12px 36px;
  border-radius: var(--r-2);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--ink-2);
}
.g-note::before {
  content: "";
  position: absolute;
  left: 16px;
  top: calc(12px + 0.81em - 4px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--l-work);
}
.g-note--wait {
  background: color-mix(in srgb, var(--l-wait) 9%, var(--surface));
}
.g-note--wait::before {
  background: var(--l-wait);
}
.g-note--warn {
  background: color-mix(in srgb, var(--l-stray) 10%, var(--surface));
}
.g-note--warn::before {
  background: var(--l-stray);
}
.g-note > :first-child {
  margin-top: 0;
}

/* A definition list for buttons and what they do. */
.g-prose dl.g-defs {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 10px 20px;
}
.g-defs dt {
  color: var(--ink);
  font-weight: 600;
}
.g-defs dd {
  margin: 0;
}

/* The scene frames are site.css's (.win); here they only take their place. */
.g-prose .win {
  margin: 30px 0 6px;
  max-width: 100%;
}

/* ── tables ────────────────────────────────────────────────────────────── */

.g-table {
  margin: 20px 0 0;
  max-width: 100%;
  overflow-x: auto;
}
.g-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
.g-table caption {
  text-align: left;
  padding: 0 0 8px;
  font-weight: 650;
  color: var(--ink);
}
.g-table th {
  text-align: left;
  vertical-align: bottom;
  padding: 0 14px 8px 0;
  font-size: 13px;
  font-weight: 650;
  color: var(--ink-3);
}
.g-table td {
  vertical-align: top;
  padding: 10px 14px 10px 0;
  border-top: 1px solid var(--line);
}
.g-table td:first-child {
  color: var(--ink);
}
.g-table td:last-child,
.g-table th:last-child {
  padding-right: 0;
}
.g-table--keys td:first-child {
  white-space: nowrap;
  width: 1%;
}
.g-table th[scope="rowgroup"] {
  padding: 22px 0 8px;
  font-size: 14px;
  color: var(--ink);
}
.g-table tr:first-child > th[scope="rowgroup"] {
  padding-top: 6px;
}
.g-table--keys td:nth-child(2) {
  color: var(--ink);
}
.g-table--keys td:nth-child(3) {
  color: var(--ink-3);
  font-size: 14px;
}
.g-table--config td:first-child code {
  white-space: nowrap;
}

/* ── "On this page" ────────────────────────────────────────────────────── */

.g-toc {
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  overflow: auto;
  padding-top: 4px;
  font-size: 13.5px;
  line-height: 1.35;
}
.g-toc__h {
  margin: 0 0 8px;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--ink-3);
}
.g-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.g-toc li a {
  display: block;
  padding: 4px 0;
  color: var(--ink-3);
  text-decoration: none;
}
.g-toc li a:hover {
  color: var(--accent);
}

/* ── previous and next ─────────────────────────────────────────────────── */

.g-pn {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 64px 0 0;
  padding: 0;
  list-style: none;
}
.g-pn a {
  display: block;
  height: 100%;
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-3);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.g-pn a:hover {
  border-color: var(--accent);
}
.g-pn small {
  display: block;
  font-size: 13px;
  color: var(--ink-3);
}
.g-pn span {
  display: block;
  margin-top: 3px;
  font-size: 16.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.g-pn .g-pn__next {
  grid-column: 2;
  text-align: right;
}

/* ── the guide's front page ────────────────────────────────────────────── */

.g--index {
  grid-template-columns: minmax(0, 1060px);
}
.g--index .g-main {
  grid-column: 1;
}
.gi-facts {
  margin: 18px 0 0;
  max-width: var(--measure);
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-3);
}
.gi-groups {
  margin: 44px 0 0;
}
.gi-group {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  column-gap: 48px;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
}
.gi-group h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 720;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.gi-group h2 + p {
  margin: 6px 0 0;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-3);
}
.gi-topics {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 40px;
}
.gi-topics a {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.gi-topics a:hover {
  color: var(--accent);
  text-decoration-color: currentColor;
}
.gi-topics p {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.gi-topics .gi-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-3);
}
.gi-topics .gi-sub a {
  font-size: inherit;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-2);
  text-underline-offset: 3px;
}

/* ── narrower screens ──────────────────────────────────────────────────── */

@media (max-width: 1239px) {
  .g {
    grid-template-columns: 216px minmax(0, 1fr);
    column-gap: 44px;
  }
  .g-toc {
    display: none;
  }
}

@media (max-width: 899px) {
  .g {
    grid-template-columns: minmax(0, 1fr);
    padding: 20px 16px 64px;
  }
  .g-main {
    grid-column: 1;
    grid-row: 1;
  }
  /* The sidebar becomes the topic list under the article. */
  .g-side {
    grid-column: 1;
    grid-row: 2;
    position: static;
    max-height: none;
    overflow: visible;
    margin-top: 48px;
    padding: 20px 0 0;
    border-top: 1px solid var(--line);
    columns: 2;
    column-gap: 24px;
  }
  .g-side__title {
    column-span: all;
  }
  .g-side__group {
    break-inside: avoid;
  }
  .g-crumb__all {
    display: inline;
  }
  .g-crumb__all a {
    color: var(--accent);
  }
  .g--index {
    grid-template-columns: minmax(0, 1fr);
  }
  .gi-group {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 14px;
  }
  .gi-topics {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .g-lede {
    font-size: 17.5px;
  }
  .g-prose {
    font-size: 16px;
  }
  .g-prose h2 {
    font-size: 23px;
    margin-top: 44px;
  }
  .g-side {
    columns: 1;
  }
  .g-pn {
    grid-template-columns: minmax(0, 1fr);
  }
  .g-pn .g-pn__next {
    grid-column: 1;
  }
  .g-prose dl.g-defs {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }
  .g-defs dd + dt {
    margin-top: 10px;
  }
  .g-table--keys td:first-child {
    white-space: normal;
  }
}

@media print {
  .g {
    display: block;
    padding: 0;
  }
  .g-side,
  .g-toc,
  .g-pn {
    display: none;
  }
}
